[
  {
    "path": ".changeset/README.md",
    "content": "# Changesets\n\nHello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works\nwith multi-package repos, or single-package repos to help you version and publish your code. You can\nfind the full documentation for it [in our repository](https://github.com/changesets/changesets)\n\nWe have a quick list of common questions to get you started engaging with this project in\n[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)\n"
  },
  {
    "path": ".changeset/config.json",
    "content": "{\n  \"$schema\": \"https://unpkg.com/@changesets/config@1.7.0/schema.json\",\n  \"changelog\": [\"@changesets/changelog-github\", {\"repo\": \"onflow/fcl-js\"}],\n  \"commit\": false,\n  \"fixed\": [],\n  \"linked\": [],\n  \"access\": \"public\",\n  \"baseBranch\": \"master\",\n  \"updateInternalDependencies\": \"patch\",\n  \"ignore\": [\"@onflow/transport-grpc\"]\n}\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Reporting a Problem/Bug\ndescription: Reporting a Problem/Bug\ntitle: \"[BUG] <title>\"\nlabels: [Bug, Needs Triage]\nbody:\n  - type: markdown\n    attributes:\n      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.\n  - type: textarea\n    attributes:\n      label: Current Behavior\n      description: A concise description of what you're experiencing.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Expected Behavior\n      description: A concise description of what you expected to happen.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Steps To Reproduce\n      description: Steps to reproduce the behavior.\n      placeholder: |\n        1. In this environment...\n        2. With this config...\n        3. Run '...'\n        4. See error...\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Environment\n      description: |\n        examples:\n          - **OS**: Ubuntu 20.04\n          - **Node**: 13.14.0\n          - **npm**: 7.6.3\n      value: |\n        - OS:\n        - Node:\n        - npm:\n      render: markdown\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: What are you currently working on that this is blocking?\n    validations:\n      required: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Requesting a Feature or Improvement\ndescription: For feature requests. Please search for existing issues first. Also see CONTRIBUTING.\ntitle: \"[FEATURE] <title>\"\nlabels: [Feature, Needs Triage]\nbody:\n  - type: markdown\n    attributes:\n      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.\n  - type: textarea\n    attributes:\n      label: Issue to be solved\n      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.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Suggest A Solution\n      description: |\n        A concise description of your preferred solution. Things to address include:\n          * Details of the technical implementation\n          * Tradeoffs made in design decisions\n          * Caveats and considerations for the future\n\n        If there are multiple solutions, please present each one separately. Save comparisons for the very end.)\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: What are you currently working on that this is blocking?\n    validations:\n      required: false\n"
  },
  {
    "path": ".github/scripts/prevent-major-bumps.js",
    "content": "/**\n * DO NOT REMOVE ME UNLESS YOU KNOW WHAT YOU'RE DOING!!\n */\n\nconst {execSync} = require(\"child_process\")\nconst fs = require(\"fs\")\n\n// Fetch the latest changes from the main branch\nexecSync(\"git fetch origin master\")\n\nconst packageJsons = execSync(\"git ls-files 'packages/*/package.json'\")\n  .toString()\n  .split(\"\\n\")\n  .filter(Boolean)\n\n// Assert that the package.json files exist\nif (packageJsons.length === 0) {\n  console.error(\"Error: No package.json files found.\")\n  process.exit(1) // Fail the CI\n}\n\nfor (const packageJson of packageJsons) {\n  // Get the current version from package.json\n  const newPackageJson = JSON.parse(fs.readFileSync(packageJson, \"utf8\"))\n  const newPackageName = newPackageJson.name\n  const newVersion = newPackageJson.version\n\n  // Get the version from the main branch (or latest release)\n  let prevPackageJson\n  try {\n    prevPackageJson = JSON.parse(\n      execSync(`git show origin/master:${packageJson}`).toString()\n    )\n  } catch (error) {\n    console.info(\"Skipping new package\", newPackageName)\n    continue\n  }\n  const prevPackageName = prevPackageJson.name\n  const prevVersion = prevPackageJson.version\n\n  // Assert that the package names match\n  if (newPackageName !== prevPackageName) {\n    console.error(\n      `Error: Package name mismatch for ${newPackageName} (${prevPackageName} -> ${newPackageName}).`\n    )\n    process.exit(1) // Fail the CI\n  }\n\n  // Extract major, minor, and patch numbers\n  const newMajor = parseInt(newVersion.split(\".\")[0])\n  const prevMajor = parseInt(prevVersion.split(\".\")[0])\n\n  // Check if it's a major version bump\n  if (newMajor > prevMajor) {\n    console.error(\n      `Error: Major version bump detected for ${newPackageName} (${prevVersion} -> ${newVersion}).`\n    )\n    process.exit(1) // Fail the CI\n  }\n\n  console.log(\n    `Version bump allowed for ${newPackageName}: ${prevVersion} -> ${newVersion}`\n  )\n}\n\nprocess.exit(0) // Allow the CI to pass\n"
  },
  {
    "path": ".github/workflows/add-pitches-to-project.yml",
    "content": "name: Adds all issues to the project board.\n\non:\n  issues:\n    types:\n      - opened\n\njobs:\n  add-to-project:\n    name: Add issue to project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/add-to-project@v0.4.1\n        with:\n          project-url: https://github.com/orgs/onflow/projects/85\n          github-token: ${{ secrets.GH_ACTION_FOR_PROJECTS }}\n"
  },
  {
    "path": ".github/workflows/changeset-check.yml",
    "content": "# Changeset Enforcement Action\n#\n# This workflow ensures that when developers make changes to package code,\n# they include a \"changeset\" file that describes what changed and how it\n# should affect the version number (major/minor/patch).\n#\n# Changesets are used by the @changesets/cli tool to automatically:\n# - Generate changelogs\n# - Determine version bumps\n# - Coordinate releases across multiple packages in this monorepo\n#\n# The check can be bypassed by adding the \"skip-changeset\" label to a PR\n# (useful for docs-only changes, CI fixes, etc. that don't need version bumps)\n\nname: Changeset Check\n\non:\n  pull_request:\n\njobs:\n  changeset-check:\n    name: Check for Changeset\n    runs-on: ubuntu-latest\n    # Skip draft PRs - only run on PRs ready for review\n    if: github.event.pull_request.draft == false\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          # Need full history to compare against base branch\n          fetch-depth: 0\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: \"18\"\n          cache: \"npm\"\n\n      - name: Install dependencies\n        run: npm ci\n\n      # Check if PR has the skip-changeset label to bypass this check\n      - name: Check for opt-out label\n        id: check-labels\n        uses: actions/github-script@v7\n        with:\n          script: |\n            const labels = context.payload.pull_request.labels.map(label => label.name);\n            const hasOptOut = labels.includes('skip-changeset');\n\n            core.setOutput('skip-changeset', hasOptOut);\n\n            if (hasOptOut) {\n              core.info('Changeset check skipped due to skip-changeset label');\n            }\n\n      # Use changesets CLI to check if changeset is needed for this PR\n      - name: Check changeset status\n        id: changeset-check\n        if: steps.check-labels.outputs.skip-changeset != 'true'\n        run: |\n          # First check what packages have changed\n          echo \"Checking for package changes...\"\n          CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)\n          PACKAGE_CHANGES=$(echo \"$CHANGED_FILES\" | grep -E \"(packages/.*/src/|packages/.*/package\\.json)\" || true)\n\n          if [ -z \"$PACKAGE_CHANGES\" ]; then\n            echo \"status=no-changes\" >> $GITHUB_OUTPUT\n            echo \"ℹ️  No package changes detected, changeset not required\"\n            exit 0\n          fi\n\n          echo \"📦 Package changes detected:\"\n          echo \"$PACKAGE_CHANGES\"\n\n          # Now check changeset status - capture both output and exit code\n          echo \"Checking changeset status...\"\n          set +e  # Don't exit on error\n          npx changeset status --since=origin/${{ github.base_ref }} --verbose > changeset-output.txt 2>&1\n          EXIT_CODE=$?\n          set -e  # Re-enable exit on error\n\n          echo \"Changeset status output:\"\n          cat changeset-output.txt\n\n          if [ $EXIT_CODE -eq 0 ]; then\n            echo \"status=valid\" >> $GITHUB_OUTPUT\n            echo \"✅ Changeset requirements satisfied\"\n          else\n            echo \"status=missing\" >> $GITHUB_OUTPUT\n            echo \"❌ Missing changeset for package changes\"\n          fi\n\n      # Clean up old changeset comments to avoid PR pollution\n      - name: Clean up old comments\n        uses: actions/github-script@v7\n        with:\n          script: |\n            // Find and delete old changeset comments from this bot\n            const comments = await github.rest.issues.listComments({\n              issue_number: context.issue.number,\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n            });\n\n            const botComments = comments.data.filter(comment => \n              comment.user.type === 'Bot' && \n              comment.body.includes('📦 Changeset Required')\n            );\n\n            for (const comment of botComments) {\n              await github.rest.issues.deleteComment({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                comment_id: comment.id,\n              });\n              console.log(`Deleted old changeset comment: ${comment.id}`);\n            }\n\n      # Add a helpful comment when changeset is missing\n      - name: Comment on PR - Missing Changeset\n        if: |\n          steps.check-labels.outputs.skip-changeset != 'true' && \n          steps.changeset-check.outputs.status == 'missing'\n        uses: actions/github-script@v7\n        with:\n          script: |\n            const comment = `## 📦 Changeset Required\n\n            This PR appears to modify package code but doesn't include a changeset. \n\n            A changeset helps track version changes and generate release notes.\n\n            ### To add a changeset:\n            \\`\\`\\`bash\n            npm run changeset\n            \\`\\`\\`\n\n            ### To skip this check (if no version bump is needed):\n            Add the \\`skip-changeset\\` label to this PR`;\n\n            github.rest.issues.createComment({\n              issue_number: context.issue.number,\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              body: comment\n            });\n\n      # Determine final status and fail the check if needed\n      - name: Set final status\n        id: final-status\n        run: |\n          if [ \"${{ steps.check-labels.outputs.skip-changeset }}\" = \"true\" ]; then\n            echo \"status=skipped\" >> $GITHUB_OUTPUT\n            echo \"✅ Changeset check skipped (skip-changeset label detected)\"\n          elif [ \"${{ steps.changeset-check.outputs.status }}\" = \"no-changes\" ]; then\n            echo \"status=not-required\" >> $GITHUB_OUTPUT\n            echo \"✅ Changeset not required (no package changes)\"\n          elif [ \"${{ steps.changeset-check.outputs.status }}\" = \"valid\" ]; then\n            echo \"status=success\" >> $GITHUB_OUTPUT\n            echo \"✅ Changeset requirements satisfied\"\n          else\n            echo \"status=missing\" >> $GITHUB_OUTPUT\n            echo \"❌ Missing required changeset\"\n            exit 1\n          fi\n\n      # Create a summary for the GitHub Actions UI\n      - name: Summary\n        run: |\n          case \"${{ steps.final-status.outputs.status }}\" in\n            \"skipped\")\n              echo \"### ✅ Changeset Check: Skipped\" >> $GITHUB_STEP_SUMMARY\n              echo \"The changeset requirement was bypassed using the skip-changeset label.\" >> $GITHUB_STEP_SUMMARY\n              ;;\n            \"not-required\")\n              echo \"### ✅ Changeset Check: Not Required\" >> $GITHUB_STEP_SUMMARY\n              echo \"No package changes detected, so no changeset is needed.\" >> $GITHUB_STEP_SUMMARY\n              ;;\n            \"success\")\n              echo \"### ✅ Changeset Check: Passed\" >> $GITHUB_STEP_SUMMARY\n              echo \"Changeset requirements satisfied for this PR.\" >> $GITHUB_STEP_SUMMARY\n              ;;\n            \"missing\")\n              echo \"### ❌ Changeset Check: Failed\" >> $GITHUB_STEP_SUMMARY\n              echo \"Package changes detected but no valid changeset found.\" >> $GITHUB_STEP_SUMMARY\n              echo \"\" >> $GITHUB_STEP_SUMMARY\n              echo \"**To fix:** Run \\`npm run changeset\\` or add the \\`skip-changeset\\` label if no version bump is needed.\" >> $GITHUB_STEP_SUMMARY\n              ;;\n          esac\n"
  },
  {
    "path": ".github/workflows/code-analysis.yml",
    "content": "# This workflow is used to run CodeQL analysis on the codebase.\n# If a code scanning alert is found, it will fail the PR,\n# and prompt the user to fix the issue in a comment.\n\nname: \"CodeQL Analysis\"\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\n  schedule:\n    - cron: \"0 0 * * *\"\njobs:\n  analyze-code:\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n      pull-requests: write\n    strategy:\n      matrix:\n        languages: [javascript-typescript]\n      fail-fast: false\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v3\n        with:\n          languages: ${{ matrix.languages }}\n          queries: security-extended\n\n      - name: Autobuild\n        uses: github/codeql-action/autobuild@v3\n\n      - name: Analyze\n        uses: github/codeql-action/analyze@v3\n        with:\n          category: \"/language:${{ matrix.languages}}\"\n"
  },
  {
    "path": ".github/workflows/dependancy-review.yml",
    "content": "# Dependency Review Action\n\n# PRs introducing NEW known-vulnerable packages will be blocked from merging.\n# This will output a GHAS comment in the PR with the details of the vulnerabilities.\n# and will also provide a comment on what to do next.\n\n# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement\nname: \"Dependency review\"\non:\n  pull_request:\n    branches: [\"master\"]\n\npermissions:\n  contents: read\n  pull-requests: write # Required for PR comments\n\njobs:\n  dependency-review:\n    runs-on: ubuntu-latest\n    outputs:\n      vulnerable-changes: ${{ steps.review.outputs.vulnerable-changes }}\n    steps:\n      - name: \"Checkout repository\"\n        uses: actions/checkout@v4\n      - name: \"Dependency Review\"\n        id: review\n        uses: actions/dependency-review-action@v4\n        with:\n          comment-summary-in-pr: always\n          fail-on-severity: moderate\n          #allow-ghsas: GHSA-q34m-jh98-gwm2,GHSA-f9vj-2wh5-fj8j  EXAMPLE of how to whitelist!\n\n  dependency-review-failure-info:\n    needs: dependency-review\n    if: failure()\n    runs-on: ubuntu-latest\n    steps:\n      - name: Add PR Comment\n        uses: actions/github-script@v7\n        env:\n          VULN_OUTPUT: ${{ needs.dependency-review.outputs.vulnerable-changes }}\n        with:\n          script: |\n            try {\n              const vulnData = JSON.parse(process.env.VULN_OUTPUT || '[]');\n              let details = '';\n              \n              for (const pkg of vulnData) {\n                details += `\\n📦 **${pkg.name}@${pkg.version}**\\n`;\n              }\n\n              const comment = `⚠️ **Security Dependency Review Failed** ⚠️\n\n              This pull request introduces dependencies with security vulnerabilities of moderate severity or higher.\n\n              ### Vulnerable Dependencies:${details}\n\n              ### What to do next?\n              1. Review the vulnerability details in the Dependency Review Comment above, specifically the \"Vulnerabilities\" section\n              2. Click on the links in the \"Vulnerability\" section to see the details of the vulnerability\n              3. If multiple versions of the same package are vulnerable, please update to the common latest non-vulnerable version\n              4. If you are unsure about the vulnerability, please contact the security engineer\n              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**\n              \\nSecurity Engineering contact: #security on slack`;\n\n              await github.rest.issues.createComment({\n                issue_number: context.issue.number,\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                body: comment\n              });\n            } catch (error) {\n              console.error('Error processing vulnerability data:', error);\n              throw error;\n            }\n"
  },
  {
    "path": ".github/workflows/integrate.yml",
    "content": "name: FLOW-JS-SDK Continuous Integration\n\non:\n  pull_request:\n\njobs:\n  test_pull_request:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v1\n        with:\n          node-version: 18.x\n\n      # This step is VERY important.  Changesets has a bug where peer dependencies will cause major version bumps\n      # This script will prevent that from happening.  You must manually edit any changesets PRs which have this issue\n      # to correct the version bump.\n      #\n      # If you wish to allow a major version bump, you will have to override this check, but be VERY careful with it.\n      #\n      # See:\n      # https://github.com/changesets/changesets/pull/1132\n      # https://github.com/changesets/changesets/issues/1011\n      # https://github.com/changesets/changesets/issues/960\n      # https://github.com/changesets/changesets/issues/822\n      #- name: Prevent Major Version Bumps\n      #  run: node ./.github/scripts/prevent-major-bumps.js\n\n      - run: make ci\n"
  },
  {
    "path": ".github/workflows/promote-playground.yml",
    "content": "name: Promote playground on release\n\non:\n  # Automatically trigger after Release workflow completes on master\n  workflow_run:\n    workflows: [\"Release\"]\n    types:\n      - completed\n    branches:\n      - master\n  # Optional: Allow manual triggering (will auto-detect latest tag)\n  workflow_dispatch:\n    branches:\n      - master\n\npermissions:\n  contents: write\n\nconcurrency:\n  group: promote-playground\n  cancel-in-progress: false\n\njobs:\n  promote:\n    runs-on: ubuntu-latest\n    # Only run if Release workflow succeeded (or if manually triggered)\n    # Note: workflow_run already filters for master branch, so we only need to check success\n    if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}\n    steps:\n      - name: Checkout with full history\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Move playground branch to tag\n        run: |\n          echo \"Setting up git configuration...\"\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n\n          echo \"Fetching tags...\"\n          git fetch --tags\n\n          # Check if this is a manual trigger (skip time check for manual runs)\n          if [ \"${{ github.event_name }}\" != \"workflow_dispatch\" ]; then\n            echo \"Checking if a new tag was created recently...\"\n            # Get the latest stable tag first (excluding alpha/beta/rc)\n            LATEST_STABLE_TAG=$(git tag -l \"@onflow/react-sdk@*\" --sort=-version:refname | grep -v -E '(alpha|beta|rc)' | head -n 1)\n\n            # Get the timestamp of that specific stable tag\n            LATEST_TAG_TIME=$(git log -1 --format='%ct' \"$LATEST_STABLE_TAG\")\n            CURRENT_TIME=$(date +%s)\n            TIME_DIFF=$((CURRENT_TIME - LATEST_TAG_TIME))\n\n            if [ $TIME_DIFF -gt 3600 ]; then\n              echo \"No new @onflow/react-sdk tag created within the last hour\"\n              exit 0\n            fi\n\n            echo \"New tag detected within the last hour, proceeding with promotion\"\n          else\n            echo \"Manual trigger detected, skipping time check\"\n          fi\n\n          # Get the latest stable @onflow/react-sdk tag (excluding alpha/beta/rc versions)\n          TAG=$(git tag -l \"@onflow/react-sdk@*\" --sort=-version:refname | grep -v -E '(alpha|beta|rc)' | head -n 1)\n\n          if [ -z \"$TAG\" ]; then\n            echo \"Error: No @onflow/react-sdk tag found\"\n            exit 1\n          fi\n\n          echo \"Found latest tag: $TAG\"\n          git show --no-patch --pretty=fuller \"$TAG\"\n\n          # Create/update branch at the tag commit and push\n          echo \"Updating playground branch to point to $TAG...\"\n          git branch -f playground \"$TAG\"\n          git push --force-with-lease origin playground\n\n          echo \"Successfully updated playground branch to $TAG\"\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Release\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    types: [closed]\n    branches:\n      - master\n\nconcurrency: ${{ github.workflow }}-${{ github.ref }}\n\njobs:\n  # Job 1: Create/update Version PR (on push to master)\n  version:\n    if: github.event_name == 'push'\n    name: Create Version PR\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - name: Checkout Repo\n        uses: actions/checkout@v4\n        with:\n          # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits\n          fetch-depth: 0\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: 22\n\n      - name: Install Dependencies\n        run: npm i\n\n      - name: Create Release Pull Request\n        uses: changesets/action@v1\n        with:\n          title: \"Version Packages\"\n          commit: \"Version Packages\"\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  # Job 2: Publish to npm (when Version PR is merged)\n  publish:\n    if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Version Packages')\n    name: Publish to npm\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: write\n    steps:\n      - name: Checkout Repo\n        uses: actions/checkout@v4\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          fetch-depth: 0\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: 22\n          registry-url: \"https://registry.npmjs.org\"\n\n      - name: Upgrade npm for OIDC support\n        run: npm install -g npm@latest\n\n      - name: Install Dependencies\n        run: npm i\n\n      - name: Build packages\n        run: npm run build\n\n      - name: Publish to npm\n        uses: changesets/action@v1\n        with:\n          publish: npx changeset publish\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          # Clear tokens to allow OIDC authentication\n          # https://github.com/orgs/community/discussions/176761\n          # https://github.com/changesets/changesets/issues/1152\n          NODE_AUTH_TOKEN: \"\"\n          NPM_TOKEN: \"\"\n"
  },
  {
    "path": ".gitignore",
    "content": "# 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.log\n*.log\n.vscode/*\n\n# type declarations\npackages/*/types/\n\n# generated documentation\n/docs-generator/output/*"
  },
  {
    "path": ".prettierignore",
    "content": "README.md\n*.md\n*.mdx\npackages/protobuf/src/generated/\n**/*.hbs"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"semi\": false,\n  \"trailingComma\": \"es5\",\n  \"bracketSpacing\": false,\n  \"arrowParens\": \"avoid\",\n  \"plugins\": [\"prettier-plugin-tailwindcss\", \"prettier-plugin-classnames\"]\n}\n"
  },
  {
    "path": "AGENTS.md",
    "content": "# AGENTS.md\n\nGuidance for AI coding agents (Claude Code, Codex, Cursor, Copilot, and others) working in\nthis repository. Loaded into agent context automatically — keep edits concise.\n\n## Overview\n\n`fcl-js` is the TypeScript/JavaScript **Flow Client Library** monorepo: the reference client\nfor connecting browser and server apps to the Flow blockchain and FCL-compatible wallets\n(`README.md`). It is a **Lerna monorepo with independent package versioning** (`lerna.json`:\n`\"version\": \"independent\"`) using **npm workspaces** (`package.json`:\n`\"workspaces\": [\"./packages/*\"]`), with releases driven by **Changesets** from the `master`\nbranch (`.changeset/config.json`, `.github/workflows/release.yml`). The flagship package is\n`@onflow/fcl` (`packages/fcl/`); `@onflow/sdk` (`packages/sdk/`) is the lower-level Flow\nAccess API client FCL is built on.\n\n## Build and Test Commands\n\nThis repo uses **npm + Lerna**, not pnpm or yarn. There is no `pnpm-workspace.yaml`; the\ncommitted lockfile is `package-lock.json`.\n\nRoot scripts (`package.json`):\n\n- `npm i` — install workspace dependencies (CONTRIBUTING.md). `make install` runs `npm ci`.\n- `npm run build` — `lerna run build` across all packages.\n- `npm test` — runs `jest` with `projects: [\"<rootDir>/packages/*\"]` (`jest.config.js`).\n- `npm start` — `npm run build && lerna run start --parallel` (per-package watch mode).\n- `npm run prettier:check` / `npm run prettier` — check/write formatting.\n- `npm run generate-all-docs` — `node docs-generator/generate-all-docs.js`; scans packages\n  that declare a `generate-docs` script and invokes each one.\n- `npm run demo` — runs emulator + dev-wallet + Vite in `packages/demo` (requires `flow` CLI).\n- `npm run demo:testnet` — same demo app pointed at testnet.\n- `npm run changeset` / `npm run release` — changeset CLI / `build && changeset publish`.\n\nMakefile wrappers (`Makefile`):\n\n- `make all` → `clean install build test`.\n- `make ci` → `clean install build`, then `npm run test -- --ci` and `npm run prettier:check`.\n  This is exactly what `.github/workflows/integrate.yml` runs on every PR.\n- `make clean` — deletes `node_modules/`, `dist/`, `types/` inside every `packages/*`.\n- `make publish` — runs `npm publish` in every package (not typical; CI uses Changesets).\n\nPer-package scripts are uniform (see `packages/fcl/package.json`, `packages/sdk/package.json`,\netc.): `test` → `jest`, `build` → `fcl-bundle` (often preceded by `eslint .`), `start` →\n`fcl-bundle --watch`, `build:types` → `tsc` (where present). The bundler is the in-tree\n`@onflow/fcl-bundle` package (`packages/fcl-bundle/`, wraps Rollup). To work on one package,\n`cd packages/<name> && npm test` (or `npm run test:watch` where declared).\n\nCI uses **Node 18** for PRs (`integrate.yml`) and **Node 22** for releases (`release.yml`).\nNo `engines` field is declared in any package.json.\n\n## Architecture\n\nEverything ships from `packages/*`. Verified packages (29):\n\n**Flagship / entry points**\n- `fcl/` — `@onflow/fcl`, the browser-first high-level client (wallet discovery, authn,\n  `query`, `mutate`, transactions, signatures).\n- `fcl-core/` — `@onflow/fcl-core`, platform-agnostic core that `fcl` and `fcl-react-native`\n  build on. Houses `wallet-provider-spec/` and `wallet-utils/`.\n- `fcl-react-native/` — `@onflow/fcl-react-native`, React Native variant of FCL.\n- `sdk/` — `@onflow/sdk`, low-level Flow Access API client (builders, interactions, encode/\n  decode, resolvers). FCL wraps this.\n\n**React kits**\n- `react-core/` — `@onflow/react-core`, platform-agnostic React hooks (TanStack Query-based).\n- `react-sdk/` — `@onflow/react-sdk`, web React bindings built on `react-core` + `fcl`.\n- `react-native-sdk/` — `@onflow/react-native-sdk`, RN bindings built on `react-core` +\n  `fcl-react-native`.\n\n**EVM / cross-VM**\n- `fcl-ethereum-provider/` — EIP-1193 Ethereum provider backed by an FCL wallet.\n- `fcl-wagmi-adapter/` — Wagmi connector built on `fcl-ethereum-provider`.\n- `fcl-rainbowkit-adapter/` — RainbowKit adapter built on `fcl-wagmi-adapter`.\n\n**Wallet connectivity**\n- `fcl-wc/` — `@onflow/fcl-wc`, WalletConnect v2 adapter for FCL.\n\n**Transports / encoding / types**\n- `transport-http/` — HTTP transport against the Flow Access API (used by `sdk`).\n- `transport-grpc/` — gRPC-Web transport. **Ignored by Changesets**\n  (`.changeset/config.json` `\"ignore\": [\"@onflow/transport-grpc\"]`) — do not add changesets\n  for it.\n- `protobuf/` — `@onflow/protobuf`, generated gRPC protobuf bindings (built via webpack,\n  not `fcl-bundle`).\n- `rlp/` — RLP encoder port (MPL-2.0; every other package is Apache-2.0).\n- `types/` — Cadence value type codecs (`t.Int`, `t.Address`, …).\n- `typedefs/` — `@onflow/typedefs`, public TypeScript definitions (see README § TypeScript).\n\n**Shared utilities** (`util-*`)\n- `util-actor`, `util-address`, `util-encode-key`, `util-invariant`, `util-logger`,\n  `util-rpc`, `util-semver`, `util-template`, `util-uid`.\n\n**Config + tooling + dev**\n- `config/` — `@onflow/config`, FCL's config store (e.g. `fcl.config({...})`).\n- `fcl-bundle/` — the internal Rollup-based bundler every publishable package uses.\n- `demo/` — `@onflow/demo` (private), Vite app for manual testing against emulator/testnet/\n  mainnet. See `packages/demo/README.md`.\n\n## Conventions and Gotchas\n\n- **Do not switch package managers.** The repo is npm + Lerna + Changesets. Switching to\n  pnpm/yarn breaks lockfile and CI.\n- **Do not add a top-level integration test.** `jest.config.js` aggregates\n  `packages/*` Jest projects; tests live inside each package next to source (`*.test.ts`).\n- **Write a changeset for any package-facing change.** Run `npx changeset` per\n  CONTRIBUTING.md. The baseBranch is `master`, not `main`.\n- **`@onflow/transport-grpc` is Changeset-ignored** — do not create a changeset entry\n  targeting it (`.changeset/config.json`).\n- **Never edit `packages/protobuf/src/generated/`** — regenerate via the package's\n  `generate` script (`protoc ...`). This path is also in `.prettierignore`.\n- **Versions are independent.** Lerna `\"version\": \"independent\"`; bumping `@onflow/fcl` does\n  not bump siblings. Cross-package imports use pinned versions — update them explicitly\n  when changing a shared util's API.\n- **Builds run lint.** Most packages define `\"build\": \"npm run lint && fcl-bundle\"`; a lint\n  error will fail `npm run build` and therefore `make ci`.\n- **`@onflow/fcl-bundle` is in-tree.** When debugging build output, edit\n  `packages/fcl-bundle/` rather than searching for it in `node_modules`.\n- **Commit message format** (CONTRIBUTING.md): `TOPIC -- [package-name] description`.\n  Topics: `PKG` (package change, needs changelog), `DOC`, `OPS`, `VSN`.\n- **Prettier config**: `semi: false`, `bracketSpacing: false`, `arrowParens: \"avoid\"`\n  (`.prettierrc`). CI runs `prettier --check .` as part of `make ci`.\n- **Wallet provider spec** lives in the repo at\n  `packages/fcl-core/src/wallet-provider-spec/` (active draft: `draft-v4.md`). Link here\n  rather than duplicating spec text.\n- **`@onflow/sdk` vs `@onflow/fcl`**: SDK is low-level (Access API only, no wallet).\n  FCL depends on SDK. Don't reimplement SDK primitives inside `fcl` or `fcl-core`.\n\n## Files Not to Modify\n\n- `packages/protobuf/src/generated/` — generated from `.proto` (also in `.prettierignore`).\n- `package-lock.json` — regenerate via `npm i`, don't hand-edit.\n- `packages/*/CHANGELOG.md` — managed by Changesets.\n- `packages/*/dist/`, `packages/*/types/` — build output (cleaned by `make clean`).\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nRelease notes and version history for fcl-js are tracked via GitHub Releases:\n\n- https://github.com/onflow/fcl-js/releases\n\nFor user-facing changes per version, see the Releases page.\n"
  },
  {
    "path": "CITATION.cff",
    "content": "cff-version: 1.2.0\nmessage: \"If you use fcl-js in your research or reference it, please cite it as below.\"\ntitle: \"fcl-js: Flow Client Library for JavaScript and TypeScript\"\nauthors:\n  - name: \"Flow Foundation\"\n    website: \"https://flow.com\"\nrepository-code: \"https://github.com/onflow/fcl-js\"\nurl: \"https://flow.com\"\nlicense: Apache-2.0\ntype: software\nkeywords:\n  - flow\n  - flow-network\n  - fcl\n  - flow-client-library\n  - typescript\n  - javascript\n  - sdk\n  - wallet-authentication\n  - dapp\n  - cadence\n"
  },
  {
    "path": "CODEOWNERS",
    "content": "* @onflow/fcl\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n- Demonstrating empathy and kindness toward other people\n- Being respectful of differing opinions, viewpoints, and experiences\n- Giving and gracefully accepting constructive feedback\n- Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n- Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n- The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n- Trolling, insulting or derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at <community@onflow.org>.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to FCL and the Flow JS SDK\n\nThe following is a set of guidelines for contributing to FCL and the Flow JS SDK\nThese are mostly guidelines, not rules.\nUse your best judgment, and feel free to propose changes to this document in a pull request.\n\n## Table Of Contents\n\n[Getting Started](#project-overview)\n\n[How Can I Contribute?](#how-can-i-contribute)\n\n- [Reporting Bugs](#reporting-bugs)\n- [Suggesting Enhancements](#suggesting-enhancements)\n- [Your First Code Contribution](#your-first-code-contribution)\n- [Pull Requests](#pull-requests)\n- [Building the Repo](#building-the-repo)\n- [Release Process](#release-process)\n\n[Styleguides](#styleguides)\n\n- [Git Commit Messages](#git-commit-messages)\n- [JavaScript Styleguide](#javascript-styleguide)\n\n[Additional Notes](#additional-notes)\n\n## How Can I Contribute?\n\n### Reporting Bugs\n\n#### Before Submitting A Bug Report\n\n- **Search existing issues** to see if the problem has already been reported.\n  If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.\n\n#### How Do I Submit A (Good) Bug Report?\n\nExplain the problem and include additional details to help maintainers reproduce the problem:\n\n- **Use a clear and descriptive title** for the issue to identify the problem.\n- **Describe the exact steps which reproduce the problem** in as many details as possible.\n  When listing steps, **don't just say what you did, but explain how you did it**.\n- **Provide specific examples to demonstrate the steps**.\n  Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples.\n  If you're providing snippets in the issue,\n  use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).\n- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.\n- **Explain which behavior you expected to see instead and why.**\n- **Include error messages and stack traces** which show the output / crash and clearly demonstrate the problem.\n\nProvide more context by answering these questions:\n\n- **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens\n  and under which conditions it normally happens.\n\nInclude details about your configuration and environment:\n\n- **What is the version of the Cadence you're using**?\n- **What's the name and version of the Operating System you're using**?\n\n### Suggesting Enhancements\n\n#### Before Submitting An Enhancement Suggestion\n\n- **Perform a cursory search** to see if the enhancement has already been suggested.\n  If it has, add a comment to the existing issue instead of opening a new one.\n\n#### How Do I Submit A (Good) Enhancement Suggestion?\n\nEnhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/).\nCreate an issue and provide the following information:\n\n- **Use a clear and descriptive title** for the issue to identify the suggestion.\n- **Provide a step-by-step description of the suggested enhancement** in as many details as possible.\n- **Provide specific examples to demonstrate the steps**.\n  Include copy/pasteable snippets which you use in those examples,\n  as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).\n- **Describe the current behavior** and **explain which behavior you expected to see instead** and why.\n- **Explain why this enhancement would be useful** to Cadence users.\n\n### Your First Code Contribution\n\nUnsure where to begin contributing to Cadence?\nYou can start by looking through these `good-first-issue` and `help-wanted` issues:\n\n- [Good first issues][https://github.com/onflow/cadence/labels/good%20first%20issue]:\n  issues which should only require a few lines of code, and a test or two.\n- [Help wanted issues][https://github.com/onflow/cadence/labels/help%20wanted]:\n  issues which should be a bit more involved than `good-first-issue` issues.\n\nBoth issue lists are sorted by total number of comments.\nWhile not perfect, number of comments is a reasonable proxy for impact a given change will have.\n\n### Pull Requests\n\nThe process described here has several goals:\n\n- Maintain code quality\n- Fix problems that are important to users\n- Engage the community in working toward the best possible Developer/User Experience\n- Enable a sustainable system for the Cadence's maintainers to review contributions\n\nPlease follow the [styleguides](#styleguides) to have your contribution considered by the maintainers.\nReviewer(s) may ask you to complete additional design work, tests,\nor other changes before your pull request can be ultimately accepted.\n\n### Building the Repo\n\n```shell\nnpm i\nnpm run build\n```\n\n### Release Process\n\nPackages stable versions releases are controlled by [changesets](https://github.com/changesets/changesets) from the `master` branch\n\n#### Creating a changeset\n\nChangesets 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.\n\nTo create a changeset, run:\n```\nnpx changeset\n```\n\n#### Prerelease(alpha)\nIn order to create an `alpha` (pre-)release\n- create a branch with `release-<VERSION>` as a branch name\n- run:\n```\nnpm run changeset pre enter alpha\nnpm run changeset version\nnpm run changeset publish\n```\n\n*NOTE: you need to have an npm account and be a member of [OnFlow organization](https://www.npmjs.com/org/onflow)*\n\n`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\nwhen the release is ready to be published as stable run from the release branch\n```\nnpm run changeset pre exit\n```\nand merge `release-<VERSION>` branch to `master`\n\n## Styleguides\n\n### Git Commit Messages\n\n- Use the present tense (\"Add feature\" not \"Added feature\")\n- Use the imperative mood (\"Move cursor to...\" not \"Moves cursor to...\")\n- Limit the first line to 72 characters or less\n- Reference issues and pull requests liberally after the first line\n- Start commits with a 3 character topic\n  - Topics:\n    - PKG -- Modified a package (Requires a Changelog Entry)\n    - DOC -- Modified a some form of documentation\n    - OPS -- Modified repository tooling/scripts\n    - VSN -- Changed a version number\n- Scope commits to individual packages and include package name in commit message\n\nFormat: TOPIC -- [package-name] what is change\n\nExamples:\n\n- OPS -- [root] tests only run once now for ci master branch\n- PKG -- [decode] fix issue with using regex for type matching\n- DOC -- [root] update readme with emulator instructions\n- VSN -- [interaction] 0.0.3 -> 0.0.4\n- VSN -- [fcl] 1.5.3 -> 2.0.0 breaking change\n- VSN -- [sdk] @onflow/send 0.0.5 -> 0.0.6\n\n### JavaScript Styleguide\n\nUse Prettier with the setting in the root `.prettierrc` file\n\n## Additional Notes\n\nThank you for your interest in contributing to the FCL and Flow JS SDK\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2019-2021 Dapper Labs, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "Makefile",
    "content": "PACKAGES := ls -d1 packages/*\nRUN := xargs -n1 -t\nEXEC := $(PACKAGES) | $(RUN)\n\n.PHONY: default\ndefault:\n\t$(info Available Make Commands)\n\t@awk -F: '/^[A-z\\-_]+\\:/ {print \"  - make \" $$1}' Makefile | sort\n\n.PHONY: all\nall: clean install build test\n\t$(info TSK all)\n\n.PHONY: doctor\ndoctor: clean install build test\n\t$(info TSK: doctor)\n\n.PHONY: clean\nclean:\n\t$(info TSK clean)\n\t$(info delete packages/*/node_modules)\n\t$(EXEC) sh -c 'rm -rf $$0/node_modules'\n\t$(info delete packages/*/dist)\n\t$(EXEC) sh -c 'rm -rf $$0/dist'\n\t$(info delete packages/*/types)\n\t$(EXEC) sh -c 'rm -rf $$0/types'\n\n.PHONY: install\ninstall:\n\t$(info TSK: install)\n\tsh -c 'npm ci || exit 255'\n\n.PHONY: build\nbuild:\n\t$(info TSK: build)\n\tsh -c 'npm run build || exit 255'\n\n.PHONY: test\ntest:\n\t$(info TSK: test)\n\tsh -c 'npm run test || exit 255'\n\n.PHONY: publish\npublish:\n\t$(info TSK: publish)\n\t$(info run \"npm publish\" in packages/*)\n\t$(EXEC) sh -c 'npm publish $$0'\n\n.PHONY: ci\nci: clean install build\n\t$(info TSK: ci)\n\tsh -c 'npm run test -- --ci || exit 255'\n\tsh -c 'npm run prettier:check || exit 255'\n"
  },
  {
    "path": "NOTICE",
    "content": "Flow\nCopyright 2019-2020 Dapper Labs, Inc.\n\nThis product includes software developed at Dapper Labs, Inc. (https://www.dapperlabs.com/). \n"
  },
  {
    "path": "README.md",
    "content": "# fcl-js — Flow Client Library for JavaScript and TypeScript\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)\n[![Release](https://img.shields.io/github/v/release/onflow/fcl-js?include_prereleases&sort=semver)](https://github.com/onflow/fcl-js/releases)\n[![Discord](https://img.shields.io/discord/613813861610684416?label=Discord&logo=discord&logoColor=white)](https://discord.gg/flow)\n[![Built on Flow](https://img.shields.io/badge/Built%20on-Flow-00EF8B?logo=flow)](https://flow.com)\n[![npm (@onflow/fcl)](https://img.shields.io/npm/v/@onflow/fcl.svg?label=%40onflow%2Ffcl)](https://www.npmjs.com/package/@onflow/fcl)\n\n[![FLOW-JS-SDK Continuous Integration](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml/badge.svg)](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n<p align=\"center\">\n  <i>Connect your dapp to users, their wallets and Flow.</i>\n  <br />\n  <br />\n  <a href=\"https://developers.flow.com/tutorials/flow-app-quickstart\">Quickstart</a>\n  ·\n  <a href=\"https://github.com/onflow/fcl-js/issues\">Report Bug</a>\n  ·\n  <a href=\"https://github.com/onflow/fcl-js/blob/master/CONTRIBUTING.md\">Contribute</a>\n</p>\n\n## TL;DR\n\n- **What:** FCL (Flow Client Library) in TypeScript and JavaScript. Connect Flow dApps to wallets, send transactions, and read on-chain data from the browser.\n- **Who it's for:** JavaScript and TypeScript developers building dApps, wallets, and tools on Flow.\n- **Why use it:** Standardized wallet discovery and authentication, Cadence script and transaction execution, and a flexible runtime that works in browser and server environments.\n- **Status:** see [Releases](https://github.com/onflow/fcl-js/releases) for the latest version.\n- **License:** Apache-2.0.\n- **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)\n- The reference JavaScript/TypeScript client library for the Flow network, open-sourced since 2020.\n\n## 🌟 What is FCL?\n\nThe **Flow Client Library (FCL) JS** is a package designed to facilitate interactions between dapps, wallets, and the Flow network. It provides a standardized way for applications to connect with users and their wallets, **eliminating the need for custom integrations**.\n\n### 🔑 Key Features:\n- 🔌 **Universal Wallet Support** – Works seamlessly with all FCL-compatible wallets, making authentication simple.\n- 🔐 **Secure Authentication** – Standardized authentication flow ensures a smooth user experience.\n- ⚡ **Blockchain Interactions** – Enables querying, mutating, and interacting with smart contracts on Flow.\n- 🛠️ **Full-Featured Utilities** – Offers built-in functions to streamline blockchain development.\n- 🌍 **Flexible Environment** – Can run in both browser and server environments, though wallet interactions are browser-only.\n\nFCL was created to make building Flow-connected applications **easy, secure, and scalable** by defining **standardized communication patterns** between wallets, applications, and users.\n\nFor iOS, we also offer [FCL Swift](https://github.com/Outblock/fcl-swift).\n\n---\n## Getting Started\n\n### Requirements\n-  Node version `v12.0.0 or higher`.\n\n### Installation\n\nTo use the FCL JS in your application, install using **yarn** or **npm**\n\n```shell\nnpm i -S @onflow/fcl\n```\n\n```shell\nyarn add @onflow/fcl\n```\n#### Importing\n\n**ES6**\n```js\nimport * as fcl from \"@onflow/fcl\";\n```\n**Node.js**\n```js\nconst fcl = require(\"@onflow/fcl\");\n```\n---\n## FCL for Dapps\n#### Wallet Interactions\n\n- *Wallet Discovery* and *Sign-up/Login*: Onboard users with ease. Never worry about supporting multiple wallets. \nAuthenticate users with any [FCL compatible wallet](#current-wallet-providers).\n```js\n// in the browser\nimport * as fcl from \"@onflow/fcl\"\n\nfcl.config({\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\", // Endpoint set to Testnet\n})\n\nfcl.authenticate()\n```\n![FCL Default Discovery UI](docs/images/discovery.png)\n\n> **Note**: A [Dapper Wallet](https://meetdapper.com/developers) developer account is required. To enable Dapper Wallet inside FCL, you need to [follow this guide](https://docs.meetdapper.com/get-started).\n\n- *Interact with smart contracts*: Authorize transactions via the user's chosen wallet \n- *Prove ownership of a wallet address*: Signing and verifying user signed data\n\n[Learn more about wallet interactions >](https://developers.flow.com/tooling/fcl-js/api#wallet-interactions)\n\n#### Blockchain Interactions\n- *Query the chain*: Send arbitrary Cadence scripts to the chain and receive back decoded values\n```js\nimport * as fcl from \"@onflow/fcl\";\n\nconst result = await fcl.query({\n  cadence: `\n    access(all) fun main(a: Int, b: Int, addr: Address): Int {\n      log(addr)\n      return a + b\n    }\n  `,\n  args: (arg, t) => [\n    arg(7, t.Int), // a: Int\n    arg(6, t.Int), // b: Int\n    arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n  ],\n});\nconsole.log(result); // 13\n```\n- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.\n\n> **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.\n\n```js\nimport * as fcl from \"@onflow/fcl\";\n// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) => [arg(\"myName\", t.String)],\n});\n```\n\n[Learn more about on-chain interactions >](https://developers.flow.com/tooling/fcl-js/api#on-chain-interactions)\n\n#### Utilities\n- Get account details from any Flow address\n- Get the latest block\n- Transaction status polling\n- Event polling\n- Custom authorization functions\n\n[Learn more about utilities >](https://developers.flow.com/tooling/fcl-js/api#pre-built-interactions)\n\n## Typescript Support\n\nFCL JS supports TypeScript. If you need to import specific types, you can do so via the [@onflow/typedefs](./packages/typedefs/README.md) package.\n\n```typescript\nimport {CurrentUser} from \"@onflow/typedefs\"\n\nconst newUser: CurrentUser = { \n  addr: null,\n  cid: null,\n  expiresAt: null,\n  f_type: 'User',\n  f_vsn: '1.0.0',\n  loggedIn: null,\n  services: []\n}\n```\n\nFor all type definitions available, see [this file](./packages/typedefs/src/index.ts)\n\n## Next Steps\n\n- See the [Flow App Quick Start](https://developers.flow.com/build/getting-started/fcl-quickstart).\n- See the full [API Reference](https://developers.flow.com/tools/clients/fcl-js/api) for all FCL functionality.\n- Learn Cadence — the smart contract language for Flow — to build scripts and transactions: [Cadence](https://cadence-lang.org).\n- Explore all of Flow [docs and tools](https://developers.flow.com).\n\n## Development & Testing\n\n### Internal Demo App\n\nA lightweight demo application is available for testing FCL and Kit packages during development:\n\n```bash\n# Build all packages\nnpm run build\n\n# Start the demo\nnpm run demo\n```\n\nThe demo provides:\n\n- **Hot Reload**: Instant feedback for code changes\n- **Focused Testing**: Clean interface for testing authentication, queries, and transactions\n- **Debug Tools**: Real-time inspection of FCL state and responses\n- **Lightweight**: Vite-based setup for fast iteration\n- **Workspace Integration**: Proper Lerna workspace setup with automatic symlinks\n\nSee [`packages/demo/README.md`](./packages/demo/README.md) for detailed usage instructions.\n\n---\n## FCL for Wallet Providers\nWallet providers on Flow have the flexibility to build their user interactions and UI through a variety of ways:\n- Front channel communication via Iframe, pop-up, tab, or extension\n- Back channel communication via HTTP\n\nFCL is agnostic to the communication channel and be configured to create both custodial and non-custodial wallets. This enables users to interact with wallet providers without needing to download an app or extension.\n\nThe communication channels involve responding to a set of pre-defined FCL messages to deliver the requested information to the dapp.  Implementing a FCL compatible wallet on Flow is as simple as filling in the responses with the appropriate data when FCL requests them. If using any of the front-channel communication methods, FCL also provides a set of [wallet utilities](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-utils/index.js) to simplify this process.\n\n\n### Current Wallet Providers\n- [Flow Wallet](https://wallet.flow.com/)\n- [NuFi Wallet](https://nu.fi/)\n- [Blocto](https://blocto.portto.io/en/)\n- [Ledger](https://ledger.com) (limited transaction support)\n- [Dapper Wallet](https://www.meetdapper.com/) (beta access - general availability coming soon)\n\n### Wallet Discovery\nIt can be difficult to get users to discover new wallets on a chain. To solve this, we created a [wallet discovery service](https://github.com/onflow/fcl-discovery) that can be configured and accessed through FCL to display all available Flow wallet providers to the user. This means:\n- Dapps can display and support all FCL compatible wallets that launch on Flow without needing to change any code\n- Users don't need to sign up for new wallets - they can carry over their existing one to any dapp that uses FCL for authentication and authorization.\n\nThe discovery feature can be used via API allowing you to customize your own UI or you can use the default UI without any additional configuration.\n\n> Note: To get your wallet added to the discovery service, make a PR in [fcl-discovery](https://github.com/onflow/fcl-discovery).\n\n### Building a FCL compatible wallet\n\n- Read the [wallet guide](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-provider-spec/draft-v4.md) to understand the implementation details.\n- Review the architecture of the [FCL dev wallet](https://github.com/onflow/fcl-dev-wallet) for an overview.\n- If building a non-custodial wallet, see the [Account API](https://github.com/onflow/flow-account-api) and the [FLIP](https://github.com/onflow/flow/pull/727) on derivation paths and key generation.\n\n---\n\n## 🛠 Want to Use the Flow SDK Directly?\n\nIf you prefer to interact with Flow at a **lower level** without using FCL, you can use the [Flow JavaScript SDK](packages/sdk/readme.md) directly. The SDK provides raw access to the Flow Access API for sending transactions, executing scripts, and managing accounts.\n\nFCL is built **on top of the Flow SDK**, making it easier to handle authentication, wallet interactions, and dapp connectivity. Choose the approach that best fits your use case.\n\n## Support\n\n- Notice a problem or want to request a feature? [Add an issue](https://github.com/onflow/fcl-js/issues).\n- Join the Flow community on [Discord](https://discord.gg/flow) to keep up to date and to talk to the team.\n- Read the [Contributing Guide](./CONTRIBUTING.md) to learn how to contribute to the project.\n\n## FAQ\n\n**What is FCL?**\nFCL (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.\n\n**How is FCL different from the Flow JavaScript SDK?**\nFCL 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.\n\n**Which environments does FCL run in?**\nFCL 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.\n\n**Does FCL support TypeScript?**\nYes. Types are available in the [`@onflow/typedefs`](./packages/typedefs) package and exported from the main FCL packages.\n\n**What wallets does FCL support?**\nFCL 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).\n\n**Can I use FCL with Flow EVM?**\nYes. 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.\n\n**Where do I report bugs or request features?**\nOpen 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).\n\n## About Flow\n\nThis repo is part of the [Flow network](https://flow.com), a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale.\n\n- Developer docs: https://developers.flow.com\n- Cadence language: https://cadence-lang.org\n- Community: [Flow Discord](https://discord.gg/flow) · [Flow Forum](https://forum.flow.com)\n- Governance: [Flow Improvement Proposals](https://github.com/onflow/flips)\n"
  },
  {
    "path": "SECURITY.md",
    "content": "\n# Responsible Disclosure Policy\n\nFlow was built from the ground up with security in mind. Our code, infrastructure, and development methodology helps us keep our users safe.\n\nWe really appreciate the community's help. Responsible disclosure of vulnerabilities helps to maintain the security and privacy of everyone.\n\nIf you care about making a difference, please follow the guidelines below.\n\n# **Guidelines For Responsible Disclosure**\n\nWe ask that all researchers adhere to these guidelines [here](https://flow.com/flow-responsible-disclosure).\n"
  },
  {
    "path": "docs/flow-docs.json",
    "content": "{\n  \"$schema\": \"https://developers.flow.com/schemas/flow-docs.json\",\n  \"displayName\": \"Flow Client Library (JS)\",\n  \"headers\": {\n    \"\": {\n      \"icon\": \"fcl-js\",\n      \"title\": \"Flow Client Library\",\n      \"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\",\n      \"headerCards\": [\n        {\n          \"title\": \"Installation\",\n          \"tags\": [\"setup\", \"guide\"],\n          \"description\": \"Set up your local environment and install the necessary dependencies to start using FCL\",\n          \"href\": \"/tools/fcl-js#getting-started\"\n        },\n        {\n          \"title\": \"Flow App Quickstart\",\n          \"tags\": [\"tutorial\", \"dapp\"],\n          \"description\": \"A tutorial that will allow you to start building with web3 on the Flow blockchain and FCL\",\n          \"href\": \"/tools/fcl-js/tutorials/flow-app-quickstart\"\n        },\n        {\n          \"title\": \"Wallet Discovery\",\n          \"tags\": [\"wallets\", \"reference\"],\n          \"description\": \"Learn more about integrating Flow compatible wallets with your dapp\",\n          \"href\": \"/tools/fcl-js/reference/discovery\"\n        }\n      ]\n    }\n  },\n  \"sidebars\": {\n    \"\": [\n      {\n        \"title\": \"Flow Client Library JS\",\n        \"items\": [\n          {\n            \"title\": \"Introduction\",\n            \"href\": \"\"\n          }\n        ]\n      },\n      {\n        \"title\": \"Tutorials\",\n        \"items\": [\n          {\n            \"title\": \"Flow App Quickstart\",\n            \"href\": \"tutorials/flow-app-quickstart\"\n          }\n        ]\n      },\n      {\n        \"title\": \"Reference\",\n        \"items\": [\n          {\n            \"title\": \"API\",\n            \"href\": \"reference/api\"\n          },\n          {\n            \"title\": \"Authentication\",\n            \"href\": \"reference/authentication\"\n          },\n          {\n            \"title\": \"Configuring FCL\",\n            \"href\": \"reference/configure-fcl\"\n          },\n          {\n            \"title\": \"Discovery\",\n            \"href\": \"reference/discovery\"\n          },\n          {\n            \"title\": \"Interaction Templates\",\n            \"href\": \"reference/interaction-templates\"\n          },\n          {\n            \"title\": \"Proving Authentication\",\n            \"href\": \"reference/proving-authentication\"\n          },\n          {\n            \"title\": \"Scripts\",\n            \"href\": \"reference/scripts\"\n          },\n          {\n            \"title\": \"SDK Guidelines\",\n            \"href\": \"reference/sdk-guidelines\"\n          },\n          {\n            \"title\": \"Transactions\",\n            \"href\": \"reference/transactions\"\n          },\n          {\n            \"title\": \"User Signatures\",\n            \"href\": \"reference/user-signatures\"\n          },\n          {\n            \"title\": \"Add FCL Support for WalletConnect 2.0\",\n            \"href\": \"reference/wallet-connect\"\n          }\n        ]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "docs/index.md",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.md\n"
  },
  {
    "path": "docs/index.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.mdx.txt\n"
  },
  {
    "path": "docs/reference/api.md",
    "content": "# 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",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/authentication.mdx\n"
  },
  {
    "path": "docs/reference/configure-fcl.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/configure-fcl.mdx\n"
  },
  {
    "path": "docs/reference/discovery.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/discovery.mdx\n"
  },
  {
    "path": "docs/reference/installation.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/installation.mdx\n"
  },
  {
    "path": "docs/reference/interaction-templates.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/interaction-templates.mdx\n"
  },
  {
    "path": "docs/reference/proving-authentication.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/proving-authentication.mdx\n"
  },
  {
    "path": "docs/reference/scripts.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/scripts.mdx\n"
  },
  {
    "path": "docs/reference/sdk-guidelines.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/sdk-guidelines.mdx\n"
  },
  {
    "path": "docs/reference/transactions.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/transactions.mdx\n"
  },
  {
    "path": "docs/reference/user-signatures.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/user-signatures.mdx\n"
  },
  {
    "path": "docs/reference/wallet-connect.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/wallet-connect.mdx\n"
  },
  {
    "path": "docs/tutorials/flow-app-quickstart.mdx",
    "content": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tutorials/flow-app-quickstart.mdx\n"
  },
  {
    "path": "docs-generator/README.md",
    "content": "# Docs Generator\n\nThis directory contains scripts to generate documentation for Flow Client Library (FCL) packages.\n\n## Overview\n\nThe 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.\n\n## Directory Structure\n\n- `generate-docs.js` - Main script for generating documentation for a single package\n- `generate-all-docs.js` - Script to generate documentation for all packages with the generate-docs script\n- `templates/` - Handlebars templates for generating documentation pages\n- `output/` - Where generated files are created\n- `generators/` - Function utils to generate pages from templates and data\n\n## Features\n\n- Automatic discovery of packages with generate-docs scripts\n- Support for JSDoc comments including function descriptions, parameter info, and usage examples\n- Handlebars templates for easy customization of output format\n- Consistent documentation structure across all packages\n- Package index page listing all available packages\n- Core types documentation from the @onflow/typedefs package\n\n### JSDoc Support\n\nThe documentation generator extracts information from JSDoc comments in code. JSDoc comments can be added to improve the generated documentation:\n\n```javascript\n/**\n * This description will be used in the documentation.\n * \n * @param {string} param1 - This description will be used for the parameter\n * @returns {number} This description will be used for the return value\n * @example\n * // This example will be used in the documentation\n * const result = myFunction(\"test\")\n */\nexport function myFunction(param1) {\n  // ...\n}\n```\n\n## Usage\n\n### For Individual Packages\n\nEach package that needs documentation should include a `generate-docs` script in its `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"generate-docs\": \"node ../../docs-generator/generate-docs.js\"\n  }\n}\n```\n\nTo generate documentation for a single package, run:\n\n```bash\ncd packages/<package-name>\nnpm run generate-docs\n```\n\n### For All Packages\n\nTo generate documentation for all packages that have a `generate-docs` script:\n\n```bash\nnpm run generate-docs-all\n```\n\nThis will:\n1. Find all packages with a `generate-docs` script\n2. Run the script for each package\n3. Generate documentation in the `/docs-generator/output/packages-docs/<package-name>` directory\n4. Generate core types documentation in `/docs-generator/output/packages-docs/types/index.md`\n\n## Output Structure\n\nThe generated documentation follows this structure:\n\n```\n/docs-generator/output/\n  └── packages-docs/         # Main folder containing\n      ├── package-a/         # Documentation for package-a\n      │   ├── index.md       # Main package page with installation instructions and API \n      │   ├── functionName1.md\n      │   ├── functionName2.md\n      │   └── ...\n      ├── package-b/\n      ├── types/\n      │   └── index.md       # Type definitions page with interfaces, type aliases, and enums\n      └── index.md           # List contents of the folder\n```\n\nEach package has a main page that includes:\n- Package overview \n- Installation instructions\n- API reference with links to individual function documentation\n\n### Auto-generation Notes\n\nAll generated files are automatically generated from the source code of FCL packages and are ignored by git (except this README).\nDo not modify these files directly as they will be overwritten when documentation is regenerated.\n\nInstead:\n- Update the JSDoc comments in the source code\n- Customize the templates in `docs-generator/templates/`\n- Create a `docs-generator.config.js` file in the package root for custom content\n\n## Customizing Templates\n\nYou can customize the generated documentation by editing the Handlebars templates in the `templates/` directory.\n\n### Custom Package Documentation\n\nPackages can provide custom documentation content by creating a `docs-generator.config.js` file in the package root directory. The following customizations are supported:\n\n```js\nmodule.exports = {\n  customData: {\n    displayName: `Custom Package Reference`,   // Used for Docusaurus sidebar title\n    sections: {\n      overview: ``,                            // Custom overview section\n      requirements: ``,                        // Custom requirements section\n      importing: ``,                           // Custom importing section\n    },\n    extra: ``,                                 // Additional content\n  },\n};\n```\n\nAll properties in the configuration are optional. If a property is not specified, default values will be used.\n\n## Adding Documentation to a New Package\n\nTo add documentation generation to a new package:\n\n1. Add the generate-docs script to the package's `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"generate-docs\": \"node ../../docs-generator/generate-docs.js\"\n  }\n}\n```\n\n2. Ensure the code has proper JSDoc comments for better documentation.\n\n3. Run the generate-docs script to test it.\n\nThis package will now be included when running the `generate-docs-all` command. \n\n## Core Types Documentation\n\nThe 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.\n\nThe types documentation in the `types` directory includes:\n\n- **Interfaces** - Documented with their properties and methods\n- **Types** - Documented with their underlying types\n- **Enums** - Documented with all their members and values\n\nAll type documentation includes JSDoc descriptions when available.\n\n## Integration with Documentation Projects\n\nAfter 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.\n\n## Notes\n\n- Avoid relative path linking outside of packages-docs folder to avoid docusaurus linking problems. Use only packages-docs relative links or absolute paths.\n- If adding an example to a jsdoc, avoid adding backticks, it will be directly embedded into typescript backticks on pages generation.\n- Don't use multiple @returns in jsdocs, they are not supported.\n"
  },
  {
    "path": "docs-generator/generate-all-docs.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst {execSync} = require(\"child_process\")\n\nasync function main() {\n  try {\n    // Get packages source directory\n    const sourcePackagesDir = path.resolve(__dirname, \"../packages\")\n    // Find packages with generate-docs script\n    console.log(`Scanning for packages in ${sourcePackagesDir}`)\n    const packages =\n      fs.readdirSync(sourcePackagesDir).filter(name => {\n        try {\n          const itemPath = path.join(sourcePackagesDir, name)\n          // Check if it's a directory first\n          if (!fs.statSync(itemPath).isDirectory()) {\n            return false\n          }\n\n          const packageJsonPath = path.join(\n            sourcePackagesDir,\n            name,\n            \"package.json\"\n          )\n          const packageJson = JSON.parse(\n            fs.readFileSync(packageJsonPath, \"utf8\")\n          )\n          return packageJson.scripts && packageJson.scripts[\"generate-docs\"]\n        } catch (error) {\n          console.warn(`Error checking package ${name}: ${error.message}`)\n          return false\n        }\n      }) || []\n    if (packages.length === 0) {\n      console.warn(\"No packages with generate-docs script were found.\")\n      return\n    }\n    console.log(`Found ${packages.length} packages with generate-docs script:`)\n    packages.forEach(pkg => console.log(`- ${pkg}`))\n\n    // Navigate to the package directory and run the generate-docs script\n    for (const pkg of packages) {\n      const pkgDir = path.join(sourcePackagesDir, pkg)\n      execSync(`cd ${pkgDir} && npm run generate-docs`, {\n        stdio: \"inherit\",\n        env: {...process.env},\n      })\n      console.log(\"\")\n    }\n\n    // Report results\n    console.log(`All docs correctly generated.`)\n  } catch (error) {\n    console.error(\"Error:\")\n    console.error(error.message || error)\n    process.exit(1)\n  }\n}\n\nmain().catch(error => {\n  console.error(\"Unhandled error:\")\n  console.error(error.message || error)\n  process.exit(1)\n})\n"
  },
  {
    "path": "docs-generator/generate-docs.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst {Project} = require(\"ts-morph\")\nconst Handlebars = require(\"handlebars\")\nconst {\n  generateRootPage,\n  generatePackagePage,\n  generateFunctionPage,\n  generateTypesPage,\n  generateNamespacePage,\n} = require(\"./generators\")\nconst {\n  discoverWorkspacePackages,\n  extractExportsFromEntryFile,\n} = require(\"./utils\")\n\nasync function main() {\n  try {\n    // Extract package name from the name field of the package where the command is run (@onflow/fcl -> fcl)\n    const packageJson = JSON.parse(\n      fs.readFileSync(path.resolve(process.cwd(), \"package.json\"), \"utf8\")\n    )\n    const packageName = packageJson.name.split(\"/\").pop()\n    console.log(`Generating docs for ${packageName}...`)\n\n    // Get the entry file from package.json source field\n    const entryFile = packageJson.source || \"\"\n    const ENTRY_FILE_PATH = path.resolve(process.cwd(), entryFile)\n\n    // Configuration with updated directory structure\n    const TEMPLATES_DIR = path.resolve(__dirname, \"./templates\")\n    const OUTPUT_DIR = path.resolve(__dirname, \"./output\")\n\n    const ROOT_DIR = path.join(OUTPUT_DIR, \"packages-docs\")\n    const PACKAGE_DIR = path.join(ROOT_DIR, packageName)\n    const TYPES_DIR = path.join(ROOT_DIR, \"types\")\n\n    // Ensure output directories exist\n    await fs.promises.mkdir(OUTPUT_DIR, {recursive: true})\n    await fs.promises.mkdir(ROOT_DIR, {recursive: true})\n    // Clean existing output directory content for the package before creating its folder\n    await fs.promises.rm(PACKAGE_DIR, {recursive: true, force: true})\n    await fs.promises.mkdir(PACKAGE_DIR, {recursive: true})\n    await fs.promises.mkdir(TYPES_DIR, {recursive: true})\n\n    // Handlebars templates to be used for generating the docs\n    const templates = {\n      root: Handlebars.compile(\n        fs.readFileSync(path.join(TEMPLATES_DIR, \"root.hbs\"), \"utf8\")\n      ),\n      package: Handlebars.compile(\n        fs.readFileSync(path.join(TEMPLATES_DIR, \"package.hbs\"), \"utf8\")\n      ),\n      function: Handlebars.compile(\n        fs.readFileSync(path.join(TEMPLATES_DIR, \"function.hbs\"), \"utf8\")\n      ),\n      types: Handlebars.compile(\n        fs.readFileSync(path.join(TEMPLATES_DIR, \"types.hbs\"), \"utf8\")\n      ),\n      namespace: Handlebars.compile(\n        fs.readFileSync(path.join(TEMPLATES_DIR, \"namespace.hbs\"), \"utf8\")\n      ),\n    }\n\n    // Initialize ts-morph project and add source files\n    const project = new Project({\n      skipAddingFilesFromTsConfig: true,\n    })\n    // Add the entry file\n    project.addSourceFileAtPath(ENTRY_FILE_PATH)\n    // Automatically discover and add all workspace packages for resolving imports\n    const workspacePackagePaths = discoverWorkspacePackages()\n    for (const packagePath of workspacePackagePaths) {\n      try {\n        project.addSourceFilesAtPaths(packagePath)\n      } catch (e) {\n        console.warn(\n          `Could not add source files from ${packagePath}: ${e.message}`\n        )\n      }\n    }\n\n    // Get the entry source file and extract exports from it\n    const entrySourceFile = project.getSourceFile(ENTRY_FILE_PATH)\n    const {functions, namespaces} = extractExportsFromEntryFile(entrySourceFile)\n    console.log(\n      `Found ${functions.length} functions and ${namespaces.length} namespaces`\n    )\n\n    // Collect all namespace functions for the package index\n    let allNamespaceFunctions = []\n    namespaces.forEach(namespace => {\n      allNamespaceFunctions = allNamespaceFunctions.concat(namespace.functions)\n    })\n\n    // Generate documentation\n    generateRootPage(templates, ROOT_DIR, packageName)\n    generatePackagePage(\n      templates,\n      PACKAGE_DIR,\n      packageName,\n      functions,\n      namespaces,\n      allNamespaceFunctions\n    )\n\n    // Generate function pages for regular functions only\n    functions.forEach(func => {\n      generateFunctionPage(templates, PACKAGE_DIR, packageName, func)\n    })\n\n    // Generate single namespace pages (no individual function pages)\n    namespaces.forEach(namespace => {\n      generateNamespacePage(templates, PACKAGE_DIR, packageName, namespace)\n    })\n\n    // Generate the types documentation\n    generateTypesPage(templates, TYPES_DIR)\n\n    console.log(`Docs generated correctly for ${packageName}.`)\n    return true\n  } catch (error) {\n    console.error(\"Error generating docs:\")\n    console.error(error.message)\n    return false\n  }\n}\n\nmain().catch(error => {\n  console.error(\"Unhandled error:\")\n  console.error(error.message || error)\n  process.exit(1)\n})\n"
  },
  {
    "path": "docs-generator/generators/generate-function-page.js",
    "content": "const path = require(\"path\")\nconst {Project} = require(\"ts-morph\")\nconst fs = require(\"fs\")\nconst {generatePage, getFirstWord} = require(\"./utils\")\nconst {stripGenericParams} = require(\"../utils/type-utils\")\nconst {formatTypeScript} = require(\"../utils/typescript-formatter\")\n\n// Cache for type structures to avoid repeated processing\nconst typeStructureCache = new Map()\n\nfunction getGenericTypeStructure(baseTypeName, packageName, sourceFilePath) {\n  // Input validation\n  if (!baseTypeName || typeof baseTypeName !== \"string\") {\n    return null\n  }\n\n  // Check cache first\n  const cacheKey = `${packageName}:${baseTypeName}`\n  if (typeStructureCache.has(cacheKey)) {\n    return typeStructureCache.get(cacheKey)\n  }\n\n  let result = null\n  try {\n    const project = new Project({skipAddingFilesFromTsConfig: true})\n\n    // Only add necessary source files\n    const sourcePaths = []\n    if (sourceFilePath) {\n      const fullSourcePath = path.resolve(process.cwd(), \"../\", sourceFilePath)\n      if (fs.existsSync(fullSourcePath)) {\n        sourcePaths.push(fullSourcePath)\n      }\n    }\n\n    if (packageName) {\n      const packageSrcDir = path.resolve(\n        process.cwd(),\n        \"../\",\n        packageName,\n        \"src\"\n      )\n      if (fs.existsSync(packageSrcDir)) {\n        sourcePaths.push(`${packageSrcDir}/**/*.ts`)\n      }\n    }\n\n    // Add source files in batch\n    if (sourcePaths.length > 0) {\n      try {\n        project.addSourceFilesAtPaths(sourcePaths)\n      } catch (e) {\n        // If batch add fails, try individually\n        sourcePaths.forEach(sourcePath => {\n          try {\n            if (!sourcePath.includes(\"*\")) {\n              project.addSourceFileAtPath(sourcePath)\n            } else {\n              project.addSourceFilesAtPaths(sourcePath)\n            }\n          } catch (e) {\n            // Skip problematic source paths\n          }\n        })\n      }\n    }\n\n    // Find the type definition efficiently\n    const sourceFiles = project.getSourceFiles()\n    for (const sourceFile of sourceFiles) {\n      const typeAlias = sourceFile.getTypeAlias(baseTypeName)\n      if (typeAlias) {\n        result = extractTypeStructure(typeAlias)\n        if (result) break // Stop on first successful extraction\n      }\n    }\n  } catch (e) {\n    // Fail silently to avoid breaking the docs generation\n  }\n\n  // Cache the result (including null results to avoid repeated failures)\n  typeStructureCache.set(cacheKey, result)\n  return result\n}\n\nfunction extractTypeStructure(typeAlias) {\n  try {\n    const typeNode = typeAlias.getTypeNode()\n    if (!typeNode || typeof typeNode.getProperties !== \"function\") {\n      return null\n    }\n\n    const properties = typeNode.getProperties()\n    if (properties.length === 0) {\n      return null\n    }\n\n    const structure = {}\n\n    for (const prop of properties) {\n      try {\n        const propName = prop.getName()\n        if (!propName) continue\n\n        const propType = prop.getType()\n        const cleanPropType = propType\n          ? extractTypeName(propType.getText())\n          : \"unknown\"\n\n        // Get JSDoc comments efficiently\n        let propDescription = \"\"\n        const jsDocComments = prop.getJsDocs()\n        if (jsDocComments?.length > 0) {\n          propDescription = jsDocComments[0].getDescription()?.trim() || \"\"\n        }\n\n        structure[propName] = {\n          type: cleanPropType,\n          description: propDescription,\n          optional: prop.hasQuestionToken?.() || false,\n        }\n      } catch (e) {\n        // Skip problematic properties but continue processing others\n        continue\n      }\n    }\n\n    return Object.keys(structure).length > 0 ? structure : null\n  } catch (e) {\n    return null\n  }\n}\n\n// Basic primitive types that don't need definitions\nconst PRIMITIVE_TYPES = new Set([\n  \"string\",\n  \"number\",\n  \"boolean\",\n  \"object\",\n  \"any\",\n  \"void\",\n  \"unknown\",\n  \"never\",\n  \"null\",\n  \"undefined\",\n])\n\n// Cache for type definitions and core types to avoid repeated lookups\nconst typeCache = new Map()\nconst coreTypesCache = new Set()\nlet hasLoadedCoreTypes = false\n\n// Function to escape MDX-sensitive characters in example code\nfunction escapeMDXCharacters(text) {\n  if (!text) return text\n\n  // Handle already escaped curly braces by converting them to inline code\n  // This pattern matches things like A.\\{AccountAddress\\}.\\{ContractName\\}.\\{EventName\\}\n  text = text.replace(/A\\.\\\\{[^}]+\\\\}\\.\\\\{[^}]+\\\\}\\.\\\\{[^}]+\\\\}/g, match => {\n    // Remove the backslashes and wrap in backticks\n    const cleanMatch = match.replace(/\\\\/g, \"\")\n    return `\\`${cleanMatch}\\``\n  })\n\n  // Handle other patterns of escaped curly braces by converting to inline code\n  text = text.replace(/\\\\{[^}]+\\\\}/g, match => {\n    // Remove the backslashes and wrap in backticks\n    const cleanMatch = match.replace(/\\\\/g, \"\")\n    return `\\`${cleanMatch}\\``\n  })\n\n  // Split text by both multi-line code blocks (triple backticks) and inline code (single backticks)\n  // This regex captures both patterns while preserving them\n  const parts = text.split(/(```[\\s\\S]*?```|`[^`\\n]*`)/g)\n\n  return parts\n    .map((part, index) => {\n      // Check if this part is a code block (either multi-line or inline)\n      const isCodeBlock =\n        part.startsWith(\"```\") ||\n        (part.startsWith(\"`\") && part.endsWith(\"`\") && !part.includes(\"\\n\"))\n\n      if (isCodeBlock) {\n        // Don't escape anything inside code blocks (both multi-line and inline)\n        return part\n      } else {\n        // Escape curly braces only outside code blocks\n        return part.replace(/(?<!\\\\)\\{/g, \"\\\\{\").replace(/(?<!\\\\)\\}/g, \"\\\\}\")\n      }\n    })\n    .join(\"\")\n}\n\nfunction extractCoreTypes() {\n  if (hasLoadedCoreTypes) return coreTypesCache\n\n  try {\n    const typedefsSrcDir = path.join(\n      path.resolve(process.cwd(), \"../typedefs\"),\n      \"src\"\n    )\n    const project = new Project({skipAddingFilesFromTsConfig: true})\n    project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)\n\n    project.getSourceFiles().forEach(sourceFile => {\n      sourceFile.getInterfaces().forEach(iface => {\n        if (iface.isExported()) coreTypesCache.add(iface.getName())\n      })\n      sourceFile.getTypeAliases().forEach(typeAlias => {\n        if (typeAlias.isExported()) coreTypesCache.add(typeAlias.getName())\n      })\n      sourceFile.getEnums().forEach(enumDef => {\n        if (enumDef.isExported()) coreTypesCache.add(enumDef.getName())\n      })\n    })\n\n    hasLoadedCoreTypes = true\n    return coreTypesCache\n  } catch (error) {\n    console.warn(`Error extracting core types: ${error.message}`)\n    return new Set()\n  }\n}\n\nfunction extractTypeName(fullType) {\n  if (!fullType) return fullType\n\n  // Clean up import references and comments\n  let cleanType = fullType\n    .replace(/import\\([^)]+\\)\\./g, \"\")\n    .replace(/\\/\\*[\\s\\S]*?\\*\\//g, \"\")\n    .trim()\n\n  // For union types, preserve the structure\n  if (cleanType.includes(\"|\")) {\n    return cleanType\n  }\n\n  // For simple types without complex structures\n  if (\n    !cleanType.includes(\"Promise<\") &&\n    !cleanType.includes(\"=>\") &&\n    !cleanType.includes(\"{\")\n  ) {\n    return cleanType\n  }\n\n  // Handle Promise types\n  if (cleanType.startsWith(\"Promise<\")) {\n    const innerType = cleanType.match(/Promise<(.+)>/)\n    if (innerType && innerType[1]) {\n      return `Promise<${extractTypeName(innerType[1])}>`\n    }\n  }\n\n  // Handle function types\n  if (cleanType.includes(\"=>\")) {\n    return cleanType\n  }\n\n  // Handle array types\n  if (cleanType.endsWith(\"[]\")) {\n    return `${extractTypeName(cleanType.slice(0, -2))}[]`\n  }\n\n  // Handle complex objects - return as is for now\n  if (cleanType.includes(\"{\") && cleanType.includes(\"}\")) {\n    return cleanType\n  }\n\n  return cleanType\n}\n\n// Check if a type name exists in the typedefs package\nfunction isTypeInTypedefs(typeName, coreTypes) {\n  // Handle Promise<Type> - extract the inner type\n  if (typeName.startsWith(\"Promise<\") && typeName.endsWith(\">\")) {\n    const innerType = typeName.slice(8, -1).trim() // Remove Promise< and >\n    return coreTypes.has(innerType)\n  }\n\n  // Handle Array types - extract the base type\n  if (typeName.endsWith(\"[]\")) {\n    const baseType = typeName.slice(0, -2).trim()\n    return coreTypes.has(baseType)\n  }\n\n  // Handle union types - check if any part is in typedefs\n  if (typeName.includes(\"|\")) {\n    const types = typeName.split(\"|\").map(t => t.trim())\n    return types.some(t => coreTypes.has(t))\n  }\n\n  return coreTypes.has(typeName)\n}\n\n// Check if a type is non-primitive (interface, type alias, or arrow function)\nfunction isNonPrimitiveType(typeString) {\n  if (!typeString || PRIMITIVE_TYPES.has(typeString)) {\n    return false\n  }\n\n  // Remove whitespace for better pattern matching\n  const cleanType = typeString.trim()\n\n  // Function types (arrow functions)\n  if (cleanType.includes(\"=>\")) {\n    return true\n  }\n\n  // Object types with properties (inline object types)\n  if (cleanType.includes(\"{\") && cleanType.includes(\":\")) {\n    return true\n  }\n\n  // Complex union types (more than just primitive types)\n  if (cleanType.includes(\"|\")) {\n    const unionTypes = cleanType.split(\"|\").map(t => t.trim())\n    // If any part of the union is not primitive, show definition\n    const hasNonPrimitive = unionTypes.some(\n      t =>\n        !PRIMITIVE_TYPES.has(t) &&\n        !t.match(/^(null|undefined)$/) &&\n        (t.match(/^[A-Z][a-zA-Z0-9]*$/) || t.includes(\"=>\") || t.includes(\"{\"))\n    )\n    if (hasNonPrimitive) return true\n  }\n\n  // Generic types like Promise<SomeType>, Array<CustomType>, etc.\n  if (cleanType.includes(\"<\") && cleanType.includes(\">\")) {\n    // Extract the inner type from generics\n    const genericMatch = cleanType.match(\n      /^([A-Za-z][a-zA-Z0-9]*)<(.+)>(\\[\\])?$/\n    )\n    if (genericMatch) {\n      const [, outerType, innerType] = genericMatch\n\n      // If outer type is Promise, Array, etc., check if inner type is non-primitive\n      if ([\"Promise\", \"Array\"].includes(outerType)) {\n        return isNonPrimitiveType(innerType.trim())\n      }\n\n      // For other generic types, if the outer type starts with uppercase, it's likely custom\n      if (/^[A-Z]/.test(outerType)) {\n        return true\n      }\n    }\n    return true // Any other generic type is likely non-primitive\n  }\n\n  // Tuple types\n  if (\n    cleanType.startsWith(\"[\") &&\n    cleanType.endsWith(\"]\") &&\n    cleanType.includes(\",\")\n  ) {\n    return true\n  }\n\n  // Mapped types or conditional types\n  if (\n    cleanType.includes(\"keyof\") ||\n    cleanType.includes(\"extends\") ||\n    cleanType.includes(\"infer\")\n  ) {\n    return true\n  }\n\n  // Array types with custom base types\n  if (cleanType.endsWith(\"[]\")) {\n    const baseType = cleanType.slice(0, -2).trim()\n    return isNonPrimitiveType(baseType)\n  }\n\n  // Custom type names (PascalCase starting with uppercase)\n  if (/^[A-Z][a-zA-Z0-9]*$/.test(cleanType)) {\n    return true\n  }\n\n  // Type names with namespaces (e.g., FCL.SomeType)\n  if (/^[A-Z][a-zA-Z0-9]*\\.[A-Z][a-zA-Z0-9]*$/.test(cleanType)) {\n    return true\n  }\n\n  // Function types in different formats\n  if (cleanType.match(/^\\(.+\\)\\s*=>/)) {\n    return true\n  }\n\n  // Constructor types\n  if (cleanType.startsWith(\"new \") && cleanType.includes(\"=>\")) {\n    return true\n  }\n\n  return false\n}\n\nfunction extractTypeDefinition(sourceFile, node) {\n  if (!node) return null\n\n  const text = sourceFile.getFullText().substring(node.getPos(), node.getEnd())\n\n  // Remove comments and extra whitespace\n  return text\n    .replace(/^[\\r\\n\\s]+/, \"\") // Trim leading whitespace\n    .replace(/[\\r\\n\\s]+$/, \"\") // Trim trailing whitespace\n    .replace(/\\/\\*\\*[\\s\\S]*?\\*\\//g, \"\") // Remove JSDoc comments\n    .replace(/\\/\\*[\\s\\S]*?\\*\\//g, \"\") // Remove multi-line comments\n    .replace(/\\/\\/.*$/gm, \"\") // Remove single-line comments\n    .replace(/\\n\\s*\\n+/g, \"\\n\") // Replace multiple blank lines with a single one\n    .trim()\n}\n\nfunction findTypeInFile(sourceFile, typeName) {\n  // Check for interface\n  const iface = sourceFile.getInterface(typeName)\n  if (iface) return extractTypeDefinition(sourceFile, iface)\n  // Check for type alias\n  const typeAlias = sourceFile.getTypeAlias(typeName)\n  if (typeAlias) return extractTypeDefinition(sourceFile, typeAlias)\n  // Check for enum\n  const enumDef = sourceFile.getEnum(typeName)\n  if (enumDef) return extractTypeDefinition(sourceFile, enumDef)\n\n  return null\n}\n\nfunction getTypeDefinition(typeName, packageName, sourceFilePath) {\n  if (!typeName || PRIMITIVE_TYPES.has(typeName)) {\n    return null\n  }\n\n  // Handle Promise and array types - extract base type\n  let baseTypeName = typeName\n  if (baseTypeName.startsWith(\"Promise<\")) {\n    const match = baseTypeName.match(/Promise<(.+)>/)\n    if (match) baseTypeName = match[1]\n  }\n  if (baseTypeName.endsWith(\"[]\")) {\n    baseTypeName = baseTypeName.slice(0, -2)\n  }\n\n  // Check cache first\n  const cacheKey = `${packageName}:${baseTypeName}`\n  if (typeCache.has(cacheKey)) {\n    return typeCache.get(cacheKey)\n  }\n\n  let definition = null\n\n  try {\n    // Create a new project for type searching to avoid conflicts\n    const project = new Project({skipAddingFilesFromTsConfig: true})\n\n    // First check source file if provided\n    if (sourceFilePath) {\n      const fullSourcePath = path.resolve(process.cwd(), \"../\", sourceFilePath)\n      if (fs.existsSync(fullSourcePath)) {\n        const sourceFile = project.addSourceFileAtPath(fullSourcePath)\n        definition = findTypeInFile(sourceFile, baseTypeName)\n\n        // If not found in the source file, check its imports and re-exports\n        if (!definition) {\n          definition = searchTypeInImports(sourceFile, baseTypeName, project)\n        }\n      }\n    }\n\n    // If not found, search package src directory\n    if (!definition) {\n      const packageSrcDir = path.resolve(\n        process.cwd(),\n        \"../\",\n        packageName,\n        \"src\"\n      )\n      if (fs.existsSync(packageSrcDir)) {\n        // Add all TypeScript files in the package\n        project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)\n\n        // Search through all source files in the package\n        for (const sourceFile of project.getSourceFiles()) {\n          definition = findTypeInFile(sourceFile, baseTypeName)\n          if (definition) break\n        }\n      }\n    }\n\n    // If still not found, search in common Flow workspace packages\n    if (!definition) {\n      definition = searchTypeInWorkspacePackages(baseTypeName, project)\n    }\n\n    // Cache the result\n    typeCache.set(cacheKey, definition)\n    return definition\n  } catch (error) {\n    console.warn(\n      `Error getting type definition for ${typeName}: ${error.message}`\n    )\n    return null\n  }\n}\n\n// Helper function to search for types in imports and re-exports\nfunction searchTypeInImports(sourceFile, typeName, project) {\n  try {\n    // Check import declarations\n    const importDeclarations = sourceFile.getImportDeclarations()\n    for (const importDecl of importDeclarations) {\n      const namedImports = importDecl.getNamedImports()\n      const hasImport = namedImports.some(\n        namedImport => namedImport.getName() === typeName\n      )\n\n      if (hasImport) {\n        const moduleSpecifier = importDecl.getModuleSpecifier()\n        if (moduleSpecifier) {\n          const moduleSpecValue = moduleSpecifier.getLiteralValue()\n          const resolvedFile = resolveImportPath(\n            sourceFile,\n            moduleSpecValue,\n            project\n          )\n          if (resolvedFile) {\n            const definition = findTypeInFile(resolvedFile, typeName)\n            if (definition) return definition\n          }\n        }\n      }\n    }\n\n    // Check export declarations (re-exports)\n    const exportDeclarations = sourceFile.getExportDeclarations()\n    for (const exportDecl of exportDeclarations) {\n      const namedExports = exportDecl.getNamedExports()\n      const hasExport = namedExports.some(\n        namedExport => namedExport.getName() === typeName\n      )\n\n      if (hasExport) {\n        const moduleSpecifier = exportDecl.getModuleSpecifier()\n        if (moduleSpecifier) {\n          const moduleSpecValue = moduleSpecifier.getLiteralValue()\n          const resolvedFile = resolveImportPath(\n            sourceFile,\n            moduleSpecValue,\n            project\n          )\n          if (resolvedFile) {\n            const definition = findTypeInFile(resolvedFile, typeName)\n            if (definition) return definition\n            // Recursively search in the resolved file's imports\n            const recursiveDefinition = searchTypeInImports(\n              resolvedFile,\n              typeName,\n              project\n            )\n            if (recursiveDefinition) return recursiveDefinition\n          }\n        }\n      }\n    }\n\n    return null\n  } catch (error) {\n    console.warn(`Error searching type in imports: ${error.message}`)\n    return null\n  }\n}\n\n// Helper function to resolve import paths\nfunction resolveImportPath(sourceFile, moduleSpecifier, project) {\n  try {\n    // Handle @onflow/ package imports\n    if (moduleSpecifier.startsWith(\"@onflow/\")) {\n      const packageName = moduleSpecifier.replace(\"@onflow/\", \"\")\n      const packageDir = path.resolve(process.cwd(), \"../\", packageName)\n      const packageJsonPath = path.join(packageDir, \"package.json\")\n\n      if (fs.existsSync(packageJsonPath)) {\n        const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"))\n        const entryFile =\n          packageJson.source || packageJson.main || \"src/index.ts\"\n        const entryFilePath = path.resolve(packageDir, entryFile)\n\n        if (fs.existsSync(entryFilePath)) {\n          let targetFile = project.getSourceFile(entryFilePath)\n          if (!targetFile) {\n            targetFile = project.addSourceFileAtPath(entryFilePath)\n          }\n          return targetFile\n        }\n      }\n    }\n\n    // Handle relative imports\n    else if (\n      moduleSpecifier.startsWith(\"./\") ||\n      moduleSpecifier.startsWith(\"../\")\n    ) {\n      const sourceDir = path.dirname(sourceFile.getFilePath())\n      const resolvedPath = path.resolve(sourceDir, moduleSpecifier)\n\n      // Try different extensions\n      const possiblePaths = [\n        resolvedPath + \".ts\",\n        resolvedPath + \".d.ts\",\n        resolvedPath + \"/index.ts\",\n        resolvedPath + \"/index.d.ts\",\n      ]\n\n      for (const possiblePath of possiblePaths) {\n        if (fs.existsSync(possiblePath)) {\n          let targetFile = project.getSourceFile(possiblePath)\n          if (!targetFile) {\n            targetFile = project.addSourceFileAtPath(possiblePath)\n          }\n          return targetFile\n        }\n      }\n    }\n\n    return null\n  } catch (error) {\n    console.warn(\n      `Error resolving import path ${moduleSpecifier}: ${error.message}`\n    )\n    return null\n  }\n}\n\n// Helper function to search for types in common workspace packages\nfunction searchTypeInWorkspacePackages(typeName, project) {\n  try {\n    const workspacePackages = [\"sdk\", \"typedefs\", \"fcl-core\", \"types\"]\n\n    for (const packageName of workspacePackages) {\n      const packageSrcDir = path.resolve(\n        process.cwd(),\n        \"../\",\n        packageName,\n        \"src\"\n      )\n      if (fs.existsSync(packageSrcDir)) {\n        try {\n          project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)\n\n          for (const sourceFile of project.getSourceFiles()) {\n            if (sourceFile.getFilePath().includes(packageName)) {\n              const definition = findTypeInFile(sourceFile, typeName)\n              if (definition) return definition\n            }\n          }\n        } catch (e) {\n          // Continue to next package if this one fails\n          console.warn(\n            `Could not search in package ${packageName}: ${e.message}`\n          )\n        }\n      }\n    }\n\n    return null\n  } catch (error) {\n    console.warn(`Error searching workspace packages: ${error.message}`)\n    return null\n  }\n}\n\nfunction processTypeForDisplay(\n  typeString,\n  coreTypes,\n  packageName,\n  sourceFilePath\n) {\n  if (!typeString) {\n    return {\n      displayType: typeString,\n      hasLink: false,\n      linkedType: null,\n      typeDefinition: null,\n    }\n  }\n\n  const extractedType = extractTypeName(typeString)\n\n  // Handle union types specially\n  if (extractedType.includes(\"|\")) {\n    const unionTypes = extractedType.split(\"|\").map(t => t.trim())\n    let hasAnyLink = false\n\n    const processedTypes = unionTypes.map(type => {\n      if (isTypeInTypedefs(type, coreTypes)) {\n        hasAnyLink = true\n        let linkType = type\n        let linkFragment = type.toLowerCase()\n\n        // Handle Promise<Type> - link to the inner type\n        if (type.startsWith(\"Promise<\") && type.endsWith(\">\")) {\n          const innerType = type.slice(8, -1).trim()\n          linkFragment = innerType.toLowerCase()\n        }\n\n        // Handle Array types\n        if (type.endsWith(\"[]\")) {\n          const baseType = type.slice(0, -2).trim()\n          linkFragment = baseType.toLowerCase()\n        }\n\n        return `[\\`${type}\\`](../types#${linkFragment})`\n      } else {\n        return `\\`${type}\\``\n      }\n    })\n\n    if (hasAnyLink) {\n      return {\n        displayType: extractedType,\n        hasLink: true,\n        linkedType: processedTypes.join(\" | \"),\n        typeDefinition: null,\n      }\n    }\n  }\n\n  // Check if type exists in typedefs package\n  if (isTypeInTypedefs(extractedType, coreTypes)) {\n    let linkType = extractedType\n    let linkFragment = extractedType.toLowerCase()\n\n    // Handle Promise<Type> - link to the inner type\n    if (extractedType.startsWith(\"Promise<\") && extractedType.endsWith(\">\")) {\n      const innerType = extractedType.slice(8, -1).trim()\n      linkFragment = innerType.toLowerCase()\n    }\n\n    // Handle Array types\n    if (extractedType.endsWith(\"[]\")) {\n      const baseType = extractedType.slice(0, -2).trim()\n      linkFragment = baseType.toLowerCase()\n    }\n\n    // Handle TypeScript utility types - link to the inner type\n    const utilityTypeMatch = extractedType.match(\n      /^(Partial|Required|Omit|Pick|Record|Exclude|Extract|NonNullable|ReturnType|Parameters|ConstructorParameters|InstanceType|ThisParameterType|OmitThisParameter|ThisType)<(.+)>$/\n    )\n    if (utilityTypeMatch) {\n      const [, utilityType, innerType] = utilityTypeMatch\n      const firstTypeParam = innerType.split(\",\")[0].trim()\n      linkFragment = firstTypeParam.toLowerCase()\n    }\n\n    return {\n      displayType: extractedType,\n      hasLink: true,\n      linkedType: `[\\`${extractedType}\\`](../types#${linkFragment})`,\n      typeDefinition: null,\n    }\n  }\n\n  // Check if it's a non-primitive type that should have a definition shown\n  if (isNonPrimitiveType(extractedType)) {\n    const typeDefinition = getTypeDefinition(\n      extractedType,\n      packageName,\n      sourceFilePath\n    )\n\n    // If we found a definition, use it\n    if (typeDefinition) {\n      return {\n        displayType: extractedType,\n        hasLink: false,\n        linkedType: null,\n        typeDefinition: typeDefinition,\n      }\n    }\n\n    // If no definition found but it's clearly a function type, show it anyway\n    if (extractedType.includes(\"=>\")) {\n      return {\n        displayType: extractedType,\n        hasLink: false,\n        linkedType: null,\n        typeDefinition: formatTypeScript(extractedType),\n      }\n    }\n\n    // If no definition found but it looks like an interface/type name,\n    // don't show a fallback message - just show nothing\n    if (/^[A-Z][a-zA-Z0-9]*$/.test(extractedType)) {\n      return {\n        displayType: extractedType,\n        hasLink: false,\n        linkedType: null,\n        typeDefinition: null,\n      }\n    }\n\n    // For other complex types, show them as type definitions\n    return {\n      displayType: extractedType,\n      hasLink: false,\n      linkedType: null,\n      typeDefinition: formatTypeScript(extractedType),\n    }\n  }\n\n  // For primitive types or simple types, just show the type name\n  return {\n    displayType: extractedType,\n    hasLink: false,\n    linkedType: null,\n    typeDefinition: null,\n  }\n}\n\nfunction generateFunctionPage(templates, outputDir, packageName, func) {\n  const coreTypes = extractCoreTypes()\n\n  // Escape MDX characters in description\n  if (func.description) {\n    func.description = escapeMDXCharacters(func.description)\n  }\n\n  // Process parameters\n  func.parameters = func.parameters.map(param => {\n    const typeInfo = processTypeForDisplay(\n      param.type,\n      coreTypes,\n      packageName,\n      func.sourceFilePath\n    )\n\n    // Check if this is a generic type and try to expand it\n    let expandedType = null\n    if (param.type.includes(\"<\") && param.type.includes(\">\")) {\n      const baseTypeName = stripGenericParams(param.type)\n      // Try to get the structure - if the type doesn't exist, it will return null\n      expandedType = getGenericTypeStructure(\n        baseTypeName,\n        packageName,\n        func.sourceFilePath\n      )\n    }\n\n    // Escape MDX characters in parameter description\n    const description = param.description\n      ? escapeMDXCharacters(param.description)\n      : param.description\n\n    return {\n      ...param,\n      type: typeInfo.displayType,\n      description,\n      linkedType: typeInfo.linkedType,\n      hasLink: typeInfo.hasLink,\n      typeDefinition: typeInfo.typeDefinition,\n      expandedType: expandedType,\n    }\n  })\n\n  // Process return type\n  const returnTypeInfo = processTypeForDisplay(\n    func.returnType,\n    coreTypes,\n    packageName,\n    func.sourceFilePath\n  )\n\n  func.returnType = returnTypeInfo.displayType\n  func.returnHasLink = returnTypeInfo.hasLink\n  func.linkedType = returnTypeInfo.linkedType\n  func.returnTypeDefinition = returnTypeInfo.typeDefinition\n\n  // Generate the page directly in the package folder instead of in a reference subfolder\n  const filename = func.name.charAt(0).toLowerCase() + func.name.slice(1)\n  generatePage(templates, \"function\", path.join(outputDir, `${filename}.md`), {\n    ...func,\n    packageName,\n    packageFirstWord: getFirstWord(packageName),\n  })\n}\n\nmodule.exports = {generateFunctionPage}\n"
  },
  {
    "path": "docs-generator/generators/generate-namespace-page.js",
    "content": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {Project} = require(\"ts-morph\")\nconst {generatePage, getFirstWord} = require(\"./utils\")\nconst {formatTypeScript} = require(\"../utils/typescript-formatter\")\n\n// Basic primitive types that don't need definitions\nconst PRIMITIVE_TYPES = new Set([\n  \"string\",\n  \"number\",\n  \"boolean\",\n  \"object\",\n  \"any\",\n  \"void\",\n  \"unknown\",\n  \"never\",\n  \"null\",\n  \"undefined\",\n])\n\nconst typeCache = new Map()\nconst coreTypesCache = new Set()\nlet hasLoadedCoreTypes = false\n\n// Function to escape MDX-sensitive characters in example code\nfunction escapeMDXCharacters(text) {\n  if (!text) return text\n\n  // Handle already escaped curly braces by converting them to inline code\n  // This pattern matches things like A.\\{AccountAddress\\}.\\{ContractName\\}.\\{EventName\\}\n  text = text.replace(/A\\.\\\\{[^}]+\\\\}\\.\\\\{[^}]+\\\\}\\.\\\\{[^}]+\\\\}/g, match => {\n    // Remove the backslashes and wrap in backticks\n    const cleanMatch = match.replace(/\\\\/g, \"\")\n    return `\\`${cleanMatch}\\``\n  })\n\n  // Handle other patterns of escaped curly braces by converting to inline code\n  text = text.replace(/\\\\{[^}]+\\\\}/g, match => {\n    // Remove the backslashes and wrap in backticks\n    const cleanMatch = match.replace(/\\\\/g, \"\")\n    return `\\`${cleanMatch}\\``\n  })\n\n  // Split text by both multi-line code blocks (triple backticks) and inline code (single backticks)\n  // This regex captures both patterns while preserving them\n  const parts = text.split(/(```[\\s\\S]*?```|`[^`\\n]*`)/g)\n\n  return parts\n    .map((part, index) => {\n      // Check if this part is a code block (either multi-line or inline)\n      const isCodeBlock =\n        part.startsWith(\"```\") ||\n        (part.startsWith(\"`\") && part.endsWith(\"`\") && !part.includes(\"\\n\"))\n\n      if (isCodeBlock) {\n        // Don't escape anything inside code blocks (both multi-line and inline)\n        return part\n      } else {\n        // Escape curly braces only outside code blocks\n        return part.replace(/(?<!\\\\)\\{/g, \"\\\\{\").replace(/(?<!\\\\)\\}/g, \"\\\\}\")\n      }\n    })\n    .join(\"\")\n}\n\nfunction extractCoreTypes() {\n  if (hasLoadedCoreTypes) return coreTypesCache\n\n  try {\n    const typedefsSrcDir = path.join(\n      path.resolve(process.cwd(), \"../typedefs\"),\n      \"src\"\n    )\n    const project = new Project({skipAddingFilesFromTsConfig: true})\n    project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)\n\n    project.getSourceFiles().forEach(sourceFile => {\n      sourceFile.getInterfaces().forEach(iface => {\n        if (iface.isExported()) coreTypesCache.add(iface.getName())\n      })\n      sourceFile.getTypeAliases().forEach(typeAlias => {\n        if (typeAlias.isExported()) coreTypesCache.add(typeAlias.getName())\n      })\n      sourceFile.getEnums().forEach(enumDef => {\n        if (enumDef.isExported()) coreTypesCache.add(enumDef.getName())\n      })\n    })\n\n    hasLoadedCoreTypes = true\n    return coreTypesCache\n  } catch (error) {\n    console.warn(`Error extracting core types: ${error.message}`)\n    return new Set()\n  }\n}\n\nfunction extractTypeName(fullType) {\n  if (!fullType) return fullType\n\n  // Clean up import references and comments\n  let cleanType = fullType\n    .replace(/import\\([^)]+\\)\\./g, \"\")\n    .replace(/\\/\\*[\\s\\S]*?\\*\\//g, \"\")\n    .trim()\n\n  // For union types, preserve the structure\n  if (cleanType.includes(\"|\")) {\n    return cleanType\n  }\n\n  // For simple types without complex structures\n  if (\n    !cleanType.includes(\"Promise<\") &&\n    !cleanType.includes(\"=>\") &&\n    !cleanType.includes(\"{\")\n  ) {\n    return cleanType\n  }\n\n  // Handle Promise types\n  if (cleanType.startsWith(\"Promise<\")) {\n    const innerType = cleanType.match(/Promise<(.+)>/)\n    if (innerType && innerType[1]) {\n      return `Promise<${extractTypeName(innerType[1])}>`\n    }\n  }\n\n  // Handle function types\n  if (cleanType.includes(\"=>\")) {\n    return cleanType\n  }\n\n  // Handle array types\n  if (cleanType.endsWith(\"[]\")) {\n    return `${extractTypeName(cleanType.slice(0, -2))}[]`\n  }\n\n  // Handle complex objects - return as is for now\n  if (cleanType.includes(\"{\") && cleanType.includes(\"}\")) {\n    return cleanType\n  }\n\n  return cleanType\n}\n\n// Check if a type name exists in the typedefs package\nfunction isTypeInTypedefs(typeName, coreTypes) {\n  // Handle Promise<Type> - extract the inner type\n  if (typeName.startsWith(\"Promise<\") && typeName.endsWith(\">\")) {\n    const innerType = typeName.slice(8, -1).trim() // Remove Promise< and >\n    return coreTypes.has(innerType)\n  }\n\n  // Handle Array types - extract the base type\n  if (typeName.endsWith(\"[]\")) {\n    const baseType = typeName.slice(0, -2).trim()\n    return coreTypes.has(baseType)\n  }\n\n  // Handle union types - check if any part is in typedefs\n  if (typeName.includes(\"|\")) {\n    const types = typeName.split(\"|\").map(t => t.trim())\n    return types.some(t => coreTypes.has(t))\n  }\n\n  return coreTypes.has(typeName)\n}\n\n// Check if a type is non-primitive (interface, type alias, or arrow function)\nfunction isNonPrimitiveType(typeString) {\n  if (!typeString || PRIMITIVE_TYPES.has(typeString)) {\n    return false\n  }\n\n  // Function types (arrow functions)\n  if (typeString.includes(\"=>\")) {\n    return true\n  }\n\n  // Object types with properties\n  if (typeString.includes(\"{\") && typeString.includes(\":\")) {\n    return true\n  }\n\n  // Complex union types\n  if (typeString.includes(\"|\") && typeString.length > 20) {\n    return true\n  }\n\n  // If it's not a primitive type and is a single word (likely an interface/type alias name)\n  // that starts with uppercase (TypeScript convention), it's probably a custom type\n  if (/^[A-Z][a-zA-Z0-9]*(\\[\\])?$/.test(typeString)) {\n    return true\n  }\n\n  // Generic types like Promise<SomeType> where SomeType is not primitive\n  if (typeString.startsWith(\"Promise<\") && typeString.endsWith(\">\")) {\n    const innerType = typeString.slice(8, -1).trim()\n    return isNonPrimitiveType(innerType)\n  }\n\n  return false\n}\n\nfunction extractTypeDefinition(sourceFile, node) {\n  if (!node) return null\n\n  const text = sourceFile.getFullText().substring(node.getPos(), node.getEnd())\n\n  // Remove comments and extra whitespace\n  return text\n    .replace(/^[\\r\\n\\s]+/, \"\") // Trim leading whitespace\n    .replace(/[\\r\\n\\s]+$/, \"\") // Trim trailing whitespace\n    .replace(/\\/\\*\\*[\\s\\S]*?\\*\\//g, \"\") // Remove JSDoc comments\n    .replace(/\\/\\*[\\s\\S]*?\\*\\//g, \"\") // Remove multi-line comments\n    .replace(/\\/\\/.*$/gm, \"\") // Remove single-line comments\n    .replace(/\\n\\s*\\n+/g, \"\\n\") // Replace multiple blank lines with a single one\n    .trim()\n}\n\nfunction findTypeInFile(sourceFile, typeName) {\n  // Check for interface\n  const iface = sourceFile.getInterface(typeName)\n  if (iface) return extractTypeDefinition(sourceFile, iface)\n  // Check for type alias\n  const typeAlias = sourceFile.getTypeAlias(typeName)\n  if (typeAlias) return extractTypeDefinition(sourceFile, typeAlias)\n  // Check for enum\n  const enumDef = sourceFile.getEnum(typeName)\n  if (enumDef) return extractTypeDefinition(sourceFile, enumDef)\n\n  return null\n}\n\nfunction getTypeDefinition(typeName, packageName, sourceFilePath) {\n  if (!typeName || PRIMITIVE_TYPES.has(typeName)) {\n    return null\n  }\n\n  // Handle Promise and array types - extract base type\n  let baseTypeName = typeName\n  if (baseTypeName.startsWith(\"Promise<\")) {\n    const match = baseTypeName.match(/Promise<(.+)>/)\n    if (match) baseTypeName = match[1]\n  }\n  if (baseTypeName.endsWith(\"[]\")) {\n    baseTypeName = baseTypeName.slice(0, -2)\n  }\n\n  // Check cache first\n  const cacheKey = `${packageName}:${baseTypeName}`\n  if (typeCache.has(cacheKey)) {\n    return typeCache.get(cacheKey)\n  }\n\n  let definition = null\n\n  try {\n    // First check source file if provided\n    if (sourceFilePath) {\n      const fullSourcePath = path.resolve(process.cwd(), \"../\", sourceFilePath)\n      if (fs.existsSync(fullSourcePath)) {\n        const project = new Project({skipAddingFilesFromTsConfig: true})\n        const sourceFile = project.addSourceFileAtPath(fullSourcePath)\n        definition = findTypeInFile(sourceFile, baseTypeName)\n      }\n    }\n\n    // If not found, search package src directory\n    if (!definition) {\n      const packageSrcDir = path.resolve(\n        process.cwd(),\n        \"../\",\n        packageName,\n        \"src\"\n      )\n      if (fs.existsSync(packageSrcDir)) {\n        const project = new Project({skipAddingFilesFromTsConfig: true})\n        project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)\n\n        for (const sourceFile of project.getSourceFiles()) {\n          definition = findTypeInFile(sourceFile, baseTypeName)\n          if (definition) break\n        }\n      }\n    }\n\n    // Cache the result\n    typeCache.set(cacheKey, definition)\n    return definition\n  } catch (error) {\n    console.warn(\n      `Error getting type definition for ${typeName}: ${error.message}`\n    )\n    return null\n  }\n}\n\nfunction processTypeForDisplay(\n  typeString,\n  coreTypes,\n  packageName,\n  sourceFilePath\n) {\n  if (!typeString) {\n    return {\n      displayType: typeString,\n      hasLink: false,\n      linkedType: null,\n      typeDefinition: null,\n    }\n  }\n\n  const extractedType = extractTypeName(typeString)\n\n  // Check if type exists in typedefs package\n  if (isTypeInTypedefs(extractedType, coreTypes)) {\n    let linkType = extractedType\n    let linkFragment = extractedType.toLowerCase()\n\n    // Handle Promise<Type> - link to the inner type\n    if (extractedType.startsWith(\"Promise<\") && extractedType.endsWith(\">\")) {\n      const innerType = extractedType.slice(8, -1).trim()\n      linkFragment = innerType.toLowerCase()\n    }\n\n    // Handle Array types\n    if (extractedType.endsWith(\"[]\")) {\n      const baseType = extractedType.slice(0, -2).trim()\n      linkFragment = baseType.toLowerCase()\n    }\n\n    return {\n      displayType: extractedType,\n      hasLink: true,\n      linkedType: `[\\`${extractedType}\\`](../types#${linkFragment})`,\n      typeDefinition: null,\n    }\n  }\n\n  // Check if it's a non-primitive type that should have a definition shown\n  if (isNonPrimitiveType(extractedType)) {\n    const typeDefinition = getTypeDefinition(\n      extractedType,\n      packageName,\n      sourceFilePath\n    )\n\n    return {\n      displayType: extractedType,\n      hasLink: false,\n      linkedType: null,\n      typeDefinition: formatTypeScript(typeDefinition || extractedType), // Show the type itself if no definition found\n    }\n  }\n\n  // For primitive types or simple types, just show the type name\n  return {\n    displayType: extractedType,\n    hasLink: false,\n    linkedType: null,\n    typeDefinition: null,\n  }\n}\n\nfunction processFunction(func, packageName, coreTypes) {\n  // Escape MDX characters in description\n  if (func.description) {\n    func.description = escapeMDXCharacters(func.description)\n  }\n\n  // Process parameters\n  func.parameters = func.parameters.map(param => {\n    const typeInfo = processTypeForDisplay(\n      param.type,\n      coreTypes,\n      packageName,\n      func.sourceFilePath\n    )\n\n    // Escape MDX characters in parameter description\n    const description = param.description\n      ? escapeMDXCharacters(param.description)\n      : param.description\n\n    return {\n      ...param,\n      type: typeInfo.displayType,\n      description,\n      linkedType: typeInfo.linkedType,\n      hasLink: typeInfo.hasLink,\n      typeDefinition: typeInfo.typeDefinition,\n    }\n  })\n\n  // Process return type\n  const returnTypeInfo = processTypeForDisplay(\n    func.returnType,\n    coreTypes,\n    packageName,\n    func.sourceFilePath\n  )\n\n  func.returnType = returnTypeInfo.displayType\n  func.returnHasLink = returnTypeInfo.hasLink\n  func.linkedType = returnTypeInfo.linkedType\n  func.returnTypeDefinition = returnTypeInfo.typeDefinition\n\n  return func\n}\n\nfunction truncateDescription(description, maxLength = 80) {\n  if (!description || description.length <= maxLength) {\n    // Still normalize whitespace even for short descriptions\n    return description ? description.replace(/\\s+/g, \" \").trim() : description\n  }\n\n  // Remove line breaks and normalize whitespace\n  const normalizedDescription = description.replace(/\\s+/g, \" \").trim()\n\n  // Find the last space before the maxLength to avoid cutting words\n  let truncateAt = maxLength\n  const lastSpace = normalizedDescription.lastIndexOf(\" \", maxLength)\n  if (lastSpace > maxLength * 0.8) {\n    // Only use space if it's not too far back\n    truncateAt = lastSpace\n  }\n\n  return normalizedDescription.substring(0, truncateAt).trim() + \"...\"\n}\n\nfunction generateNamespacePage(templates, outputDir, packageName, namespace) {\n  const coreTypes = extractCoreTypes()\n\n  // Deduplicate functions with the same name\n  const uniqueFunctions = []\n  const seenFunctionNames = new Set()\n  namespace.functions.forEach(func => {\n    if (!seenFunctionNames.has(func.name)) {\n      seenFunctionNames.add(func.name)\n      uniqueFunctions.push(func)\n    }\n  })\n\n  // Sort functions alphabetically, case insensitively\n  uniqueFunctions.sort((a, b) =>\n    a.name.toLowerCase().localeCompare(b.name.toLowerCase())\n  )\n\n  // Process each function to add type definitions and links\n  const processedFunctions = uniqueFunctions.map(func => {\n    const processedFunc = processFunction(func, packageName, coreTypes)\n    // Add lowercase_name property for use in templates\n    processedFunc.lowercase_name =\n      func.name.charAt(0).toLowerCase() + func.name.slice(1)\n    return processedFunc\n  })\n\n  // Generate lowercase filename like functions\n  const filename =\n    namespace.name.charAt(0).toLowerCase() + namespace.name.slice(1)\n\n  generatePage(templates, \"namespace\", path.join(outputDir, `${filename}.md`), {\n    packageName,\n    packageFirstWord: getFirstWord(packageName),\n    namespaceName: namespace.name,\n    namespaceDescription: namespace.description,\n    functions: processedFunctions,\n  })\n}\n\nmodule.exports = {generateNamespacePage}\n"
  },
  {
    "path": "docs-generator/generators/generate-package-page.js",
    "content": "const path = require(\"path\")\nconst {generatePage, parseConfigCustomData, getFirstWord} = require(\"./utils\")\nconst fs = require(\"fs\")\n\nfunction truncateDescription(description, maxLength = 80) {\n  if (!description || description.length <= maxLength) {\n    // Still normalize whitespace even for short descriptions\n    return description ? description.replace(/\\s+/g, \" \").trim() : description\n  }\n\n  // Remove line breaks and normalize whitespace\n  const normalizedDescription = description.replace(/\\s+/g, \" \").trim()\n\n  // Find the last space before the maxLength to avoid cutting words\n  let truncateAt = maxLength\n  const lastSpace = normalizedDescription.lastIndexOf(\" \", maxLength)\n  if (lastSpace > maxLength * 0.8) {\n    // Only use space if it's not too far back\n    truncateAt = lastSpace\n  }\n\n  return normalizedDescription.substring(0, truncateAt).trim() + \"...\"\n}\n\nfunction getPackageDescription(packageName) {\n  try {\n    const packageJsonPath = path.resolve(process.cwd(), \"package.json\")\n    if (fs.existsSync(packageJsonPath)) {\n      const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"))\n      return packageJson.description || \"\"\n    }\n  } catch (error) {\n    console.warn(\n      `Error reading package.json for ${packageName}: ${error.message}`\n    )\n  }\n  return \"\"\n}\n\nfunction generatePackagePage(\n  templates,\n  outputDir,\n  packageName,\n  functions,\n  namespaces = [],\n  allNamespaceFunctions = []\n) {\n  const configPath = path.resolve(process.cwd(), \"docs-generator.config.js\")\n  const {displayName, sections, extra} = parseConfigCustomData(configPath)\n  const packageDescription = getPackageDescription(packageName)\n\n  // Combine regular functions with namespace functions for the API reference\n  const allFunctions = [...functions, ...allNamespaceFunctions]\n\n  // Deduplicate functions with the same name\n  const uniqueFunctions = []\n  const seenFunctionNames = new Set()\n  allFunctions.forEach(func => {\n    if (!seenFunctionNames.has(func.name)) {\n      seenFunctionNames.add(func.name)\n      uniqueFunctions.push(func)\n    }\n  })\n\n  // Process namespaces for display\n  const processedNamespaces = namespaces.map(namespace => ({\n    ...namespace,\n    displayDescription: truncateDescription(namespace.description), // Only truncate for display\n    type: \"namespace\", // Mark as namespace for sorting\n    isNamespace: true, // Add boolean flag for template\n    displayName: namespace.name,\n    filePath: `./${namespace.name.charAt(0).toLowerCase() + namespace.name.slice(1)}.md`,\n  }))\n\n  // Process functions for display\n  const processedFunctions = uniqueFunctions.map(func => ({\n    ...func,\n    lowercase_name: func.name.charAt(0).toLowerCase() + func.name.slice(1),\n    displayDescription: truncateDescription(func.description), // Only truncate for display\n    type: \"function\", // Mark as function for sorting\n    isNamespace: false, // Add boolean flag for template\n    displayName: func.namespace ? `${func.namespace}.${func.name}` : func.name,\n    filePath: func.namespace\n      ? `./${func.namespace.charAt(0).toLowerCase() + func.namespace.slice(1)}.md#${func.name}`\n      : `./${func.name.charAt(0).toLowerCase() + func.name.slice(1)}.md`,\n  }))\n\n  // Combine functions and namespaces for unified sorting\n  const allApiItems = [...processedFunctions, ...processedNamespaces]\n\n  // Sort all items alphabetically, case insensitively\n  allApiItems.sort((a, b) =>\n    a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase())\n  )\n\n  generatePage(templates, \"package\", path.join(outputDir, \"index.md\"), {\n    packageName,\n    packageFirstWord: getFirstWord(packageName),\n    displayName: displayName || `@onflow/${packageName}`,\n    displayDescription:\n      packageDescription || `${packageName} package documentation.`,\n    customOverview: sections.overview,\n    customRequirements: sections.requirements,\n    customImporting: sections.importing,\n    extra,\n    functions: uniqueFunctions, // Keep original functions with full descriptions for individual pages\n    namespaces: processedNamespaces,\n    allApiItems, // Use processed items with truncated descriptions for the index\n  })\n}\n\nmodule.exports = {generatePackagePage}\n"
  },
  {
    "path": "docs-generator/generators/generate-root-page.js",
    "content": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {generatePage, parseConfigCustomData} = require(\"./utils\")\n\nfunction getPackageDescription(packageName) {\n  try {\n    const packageJsonPath = path.resolve(\n      process.cwd(),\n      \"..\",\n      packageName,\n      \"package.json\"\n    )\n    if (fs.existsSync(packageJsonPath)) {\n      const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"))\n      return packageJson.description || \"\"\n    }\n  } catch (error) {\n    console.warn(\n      `Error reading package.json for ${packageName}: ${error.message}`\n    )\n  }\n  return \"\"\n}\n\nfunction generateRootPage(templates, packagesDir, currentPackageName) {\n  const configPath = path.resolve(process.cwd(), \"docs-generator.config.js\")\n  const {displayName} = parseConfigCustomData(configPath)\n\n  const currentDisplayName = displayName || `@onflow/${currentPackageName}`\n  const currentPackageDescription =\n    getPackageDescription(currentPackageName) ||\n    `${currentPackageName} package documentation.`\n  const rootPagePath = path.join(packagesDir, \"index.md\")\n  const packages = []\n\n  // Read existing packages from the file if it exists\n  if (fs.existsSync(rootPagePath)) {\n    try {\n      const content = fs.readFileSync(rootPagePath, \"utf8\")\n      const regex = /\\- \\[(.*?)\\]\\(\\.\\/(.*?)\\/index\\.md\\)/g\n      let match\n      while ((match = regex.exec(content)) !== null) {\n        if (match[1] && match[2] && match[1] !== \"Type Definitions\") {\n          packages.push({\n            displayName: match[1],\n            packageName: match[2],\n            displayDescription: getPackageDescription(match[2]),\n          })\n        }\n      }\n    } catch (error) {\n      console.warn(`Error reading root page: ${error.message}`)\n    }\n  }\n\n  // Check if current package already exists\n  const packageExists = packages.some(\n    pkg => pkg.packageName === currentPackageName\n  )\n  // Add it if not already in the list\n  if (!packageExists) {\n    packages.push({\n      displayName: currentDisplayName,\n      packageName: currentPackageName,\n      displayDescription: currentPackageDescription,\n    })\n  }\n  // Sort packages by display name\n  packages.sort((a, b) => a.displayName.localeCompare(b.displayName))\n\n  // Generate the root page\n  generatePage(templates, \"root\", rootPagePath, {packages})\n}\n\nmodule.exports = {generateRootPage}\n"
  },
  {
    "path": "docs-generator/generators/generate-types-page.js",
    "content": "const path = require(\"path\")\nconst {Project, Node, TypeFormatFlags} = require(\"ts-morph\")\nconst {generatePage} = require(\"./utils\")\n\nfunction decodeHtmlEntities(text) {\n  if (!text) return text\n\n  const decoded = text\n    .replace(/&lt;/g, \"<\")\n    .replace(/&gt;/g, \">\")\n    .replace(/&amp;/g, \"&\")\n    .replace(/&quot;/g, '\"')\n    .replace(/&#39;/g, \"'\")\n\n  // Escape also pipe characters which would break markdown tables\n  return decoded.replace(/\\|/g, \"\\\\|\")\n}\n\nfunction extractJSDocDescription(node) {\n  if (!node) return null\n\n  try {\n    if (typeof node.getJsDocs === \"function\") {\n      const jsDocs = node.getJsDocs()\n      if (jsDocs && jsDocs.length > 0) {\n        const jsDoc = jsDocs[0]\n        const description = jsDoc.getDescription() || \"\"\n        return description.trim() || null\n      }\n    }\n\n    // Fallback: try to parse JSDoc from the node leading comments\n    if (typeof node.getLeadingCommentRanges === \"function\") {\n      const commentRanges = node.getLeadingCommentRanges()\n      if (commentRanges && commentRanges.length > 0) {\n        const commentText = commentRanges\n          .map(range => range.getText())\n          .join(\"\\n\")\n        // Simple regex to extract JSDoc description\n        const match = /\\/\\*\\*\\s*([\\s\\S]*?)\\s*\\*\\//.exec(commentText)\n        if (match && match[1]) {\n          const description = match[1].replace(/^\\s*\\*\\s?/gm, \"\").trim()\n          return description || null\n        }\n      }\n    }\n  } catch (error) {\n    console.warn(`Error extracting JSDoc description: ${error.message}`)\n  }\n  return null\n}\n\nfunction extractInterfaces(sourceFiles) {\n  const interfaces = []\n\n  sourceFiles.forEach(sourceFile => {\n    // Get exported interfaces\n    sourceFile.getInterfaces().forEach(iface => {\n      if (!iface.isExported()) return\n\n      const name = iface.getName()\n      const description = extractJSDocDescription(iface)\n\n      // Extract properties\n      const properties = iface.getProperties().map(prop => {\n        const propName = prop.getName()\n        const propType = decodeHtmlEntities(\n          prop.getType().getText(undefined, TypeFormatFlags.None)\n        )\n        const propDescription = extractJSDocDescription(prop)\n\n        return {\n          name: propName,\n          type: propType,\n          description: propDescription,\n        }\n      })\n\n      interfaces.push({\n        name,\n        description,\n        properties,\n        importStatement: `import { type ${name} } from \"@onflow/fcl\"`,\n      })\n    })\n  })\n  // Sort interfaces alphabetically by name\n  return interfaces.sort((a, b) => a.name.localeCompare(b.name))\n}\n\nfunction extractTypeAliases(sourceFiles) {\n  const types = []\n\n  sourceFiles.forEach(sourceFile => {\n    // Get exported type aliases\n    sourceFile.getTypeAliases().forEach(typeAlias => {\n      if (!typeAlias.isExported()) return\n\n      const name = typeAlias.getName()\n      const description = extractJSDocDescription(typeAlias)\n      const type = decodeHtmlEntities(\n        typeAlias.getType().getText(undefined, TypeFormatFlags.None)\n      )\n\n      // For object types, try to extract properties\n      const properties = []\n      const aliasType = typeAlias.getType()\n\n      if (aliasType.isObject()) {\n        const propSymbols = aliasType.getProperties()\n\n        propSymbols.forEach(propSymbol => {\n          const propName = propSymbol.getName()\n          let propType = \"unknown\"\n\n          try {\n            const valueDeclaration = propSymbol.getValueDeclaration()\n            if (valueDeclaration) {\n              if (Node.isPropertySignature(valueDeclaration)) {\n                const typeNode = valueDeclaration.getTypeNode()\n                if (typeNode) {\n                  propType = typeNode.getText()\n                }\n              }\n            }\n\n            // If we couldn't get the type from the declaration, use the symbol's type\n            if (propType === \"unknown\") {\n              propType = propSymbol\n                .getTypeAtLocation(typeAlias)\n                .getText(undefined, TypeFormatFlags.None)\n            }\n\n            properties.push({\n              name: propName,\n              type: decodeHtmlEntities(propType),\n              description:\n                extractJSDocDescription(propSymbol.getDeclarations()[0]) ||\n                null,\n            })\n          } catch (error) {\n            console.warn(\n              `Error extracting property ${propName} from type ${name}: ${error.message}`\n            )\n            properties.push({\n              name: propName,\n              type: \"unknown\",\n              description: null,\n            })\n          }\n        })\n      }\n\n      types.push({\n        name,\n        description,\n        type,\n        properties,\n        importStatement: `import { type ${name} } from \"@onflow/fcl\"`,\n      })\n    })\n  })\n  // Sort type aliases alphabetically by name\n  return types.sort((a, b) => a.name.localeCompare(b.name))\n}\n\nfunction extractEnums(sourceFiles) {\n  const enums = []\n\n  sourceFiles.forEach(sourceFile => {\n    // Get exported enums\n    sourceFile.getEnums().forEach(enumDef => {\n      if (!enumDef.isExported()) return\n\n      const name = enumDef.getName()\n      const description = extractJSDocDescription(enumDef)\n\n      // Extract members\n      const members = enumDef.getMembers().map(member => {\n        const memberName = member.getName()\n        const memberDescription = extractJSDocDescription(member)\n        let memberValue = null\n\n        // Try to get the value\n        const valueNode = member.getInitializer()\n        if (valueNode) {\n          memberValue = valueNode.getText()\n        }\n\n        return {\n          name: memberName,\n          value: memberValue,\n          description: memberDescription,\n        }\n      })\n\n      enums.push({\n        name,\n        description,\n        members,\n        importStatement: `import { ${name} } from \"@onflow/fcl\"`,\n      })\n    })\n  })\n  // Sort enums alphabetically by name\n  return enums.sort((a, b) => a.name.localeCompare(b.name))\n}\n\nfunction generateTypesPage(templates, outputDir) {\n  // Path to the typedefs package\n  const typedefsDir = path.resolve(process.cwd(), \"../typedefs\")\n  const typedefsSrcDir = path.join(typedefsDir, \"src\")\n\n  // Initialize ts-morph project\n  const project = new Project({\n    skipAddingFilesFromTsConfig: true,\n  })\n  // Add source files from typedefs package\n  project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)\n  const sourceFiles = project.getSourceFiles()\n\n  // Extract types data\n  const interfaces = extractInterfaces(sourceFiles)\n  const types = extractTypeAliases(sourceFiles)\n  const enums = extractEnums(sourceFiles)\n\n  // Generate the types index page\n  generatePage(templates, \"types\", path.join(outputDir, \"index.md\"), {\n    interfaces,\n    types,\n    enums,\n  })\n}\n\nmodule.exports = {generateTypesPage}\n"
  },
  {
    "path": "docs-generator/generators/index.js",
    "content": "const {generatePackagePage} = require(\"./generate-package-page\")\nconst {generateFunctionPage} = require(\"./generate-function-page\")\nconst {generateTypesPage} = require(\"./generate-types-page\")\nconst {generateRootPage} = require(\"./generate-root-page\")\nconst {generateNamespacePage} = require(\"./generate-namespace-page\")\n\nmodule.exports = {\n  generatePackagePage,\n  generateFunctionPage,\n  generateTypesPage,\n  generateRootPage,\n  generateNamespacePage,\n}\n"
  },
  {
    "path": "docs-generator/generators/utils/extract-utils.js",
    "content": "function getFirstWord(packageName) {\n  return packageName.split(\"-\")[0]\n}\n\nmodule.exports = {getFirstWord}\n"
  },
  {
    "path": "docs-generator/generators/utils/generate-page.js",
    "content": "const fs = require(\"fs\")\n\nfunction generatePage(templates, templateName, outputPath, context) {\n  try {\n    const content = templates[templateName](context)\n    fs.writeFileSync(outputPath, content)\n  } catch (error) {\n    console.error(`Error generating ${templateName} page: ${error.message}`)\n    throw error\n  }\n}\n\nmodule.exports = {generatePage}\n"
  },
  {
    "path": "docs-generator/generators/utils/index.js",
    "content": "const {generatePage} = require(\"./generate-page\")\nconst {parseConfigCustomData} = require(\"./parse-config-custom-data\")\nconst {getFirstWord} = require(\"./extract-utils\")\n\nmodule.exports = {generatePage, parseConfigCustomData, getFirstWord}\n"
  },
  {
    "path": "docs-generator/generators/utils/parse-config-custom-data.js",
    "content": "const fs = require(\"fs\")\n\nfunction parseConfigCustomData(configPath) {\n  // Parse config custom data if present and return custom one or null for default\n  const config = fs.existsSync(configPath) ? require(configPath) : null\n  return {\n    displayName: config?.customData?.displayName || null,\n    sections: {\n      overview: config?.customData?.sections?.overview || null,\n      requirements: config?.customData?.sections?.requirements || null,\n      importing: config?.customData?.sections?.importing || null,\n    },\n    extra: config?.customData?.extra || null,\n  }\n}\n\nmodule.exports = {parseConfigCustomData}\n"
  },
  {
    "path": "docs-generator/templates/function.hbs",
    "content": "---\ntitle: \"{{name}}\"\ndescription: \"{{name}} function documentation.\"\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}/{{sourceFilePath}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}/{{sourceFilePath}}). DO NOT EDIT MANUALLY -->\n\n# {{name}}\n\n{{#if description}}\n{{{description}}}\n{{/if}}\n\n## Import\n\nYou can import the entire package and access the function:\n\n```typescript\nimport * as {{packageFirstWord}} from \"@onflow/{{packageName}}\"\n\n{{packageFirstWord}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})\n```\n\nOr import directly the specific function:\n\n```typescript\nimport { {{name}} } from \"@onflow/{{packageName}}\"\n\n{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})\n```\n\n{{#if customExample}}\n## Usage\n\n```typescript\n{{{customExample}}}\n```\n{{/if}}\n\n{{#if parameters.length}}\n## Parameters\n\n{{#each parameters}}\n### `{{name}}` {{#unless required}}(optional){{/unless}}\n\n{{#if expandedType}}\n- Type: `{{{type}}}`\n\n#### Properties:\n\n{{#each expandedType}}\n- **`{{@key}}`** {{#if this.optional}}(optional){{/if}} - Type: `{{{this.type}}}`{{#if this.description}} - {{{this.description}}}{{/if}}\n{{/each}}\n\n{{else}}\n{{#if typeDefinition}}{{#unless hasLink}}\n- Type: \n```typescript\n{{{typeDefinition}}}\n```\n{{else}}\n- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}\n{{/unless}}{{else}}\n- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}\n{{/if}}\n{{#if description}}\n- Description: {{{description}}}\n{{/if}}\n\n{{#if nestedParams}}\n#### Properties:\n\n{{#each nestedParams}}\n- **`{{name}}`** {{#unless required}}(optional){{/unless}} - {{{description}}}\n{{/each}}\n\n{{/if}}\n{{/if}}\n{{/each}}\n{{/if}}\n\n## Returns\n\n{{#if returnTypeDefinition}}\n```typescript\n{{{returnTypeDefinition}}}\n```\n{{else}}\n{{#if returnHasLink}}{{{linkedType}}}{{else}}`{{{returnType}}}`{{/if}}\n{{/if}}\n\n{{#if returnDescription}}\n\n{{{returnDescription}}}\n{{/if}}\n\n---"
  },
  {
    "path": "docs-generator/templates/namespace.hbs",
    "content": "---\ntitle: \"{{namespaceName}}\"\ndescription: \"{{namespaceDescription}}\"\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}). DO NOT EDIT MANUALLY -->\n\n# {{namespaceName}}\n\n## Overview\n\n{{namespaceDescription}}\n\n## Functions\n\n{{#each functions}}\n### {{name}}\n\n{{#if description}}\n{{{description}}}\n{{/if}}\n\n#### Import\n\nYou can import the entire package and access the function:\n\n```typescript\nimport * as {{../packageFirstWord}} from \"@onflow/{{../packageName}}\"\n\n{{../packageFirstWord}}.{{../namespaceName}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})\n```\n\nOr import the namespace directly:\n\n```typescript\nimport { {{../namespaceName}} } from \"@onflow/{{../packageName}}\"\n\n{{../namespaceName}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})\n```\n\n{{#if customExample}}\n#### Usage\n\n```typescript\n{{{customExample}}}\n```\n{{/if}}\n\n{{#if parameters.length}}\n#### Parameters\n\n{{#each parameters}}\n##### `{{name}}`{{#unless required}} (optional){{/unless}}\n\n{{#if typeDefinition}}{{#unless hasLink}}\n- Type: \n```typescript\n{{{typeDefinition}}}\n```\n{{else}}\n- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}\n{{/unless}}{{else}}\n- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}\n{{/if}}\n{{#if description}}\n- Description: {{{description}}}\n{{/if}}\n\n{{/each}}\n{{/if}}\n#### Returns\n\n{{#if returnTypeDefinition}}\n```typescript\n{{{returnTypeDefinition}}}\n```\n{{else}}\n{{#if returnHasLink}}{{{linkedType}}}{{else}}`{{{returnType}}}`{{/if}}\n{{/if}}\n\n{{/each}}\n\n---"
  },
  {
    "path": "docs-generator/templates/package.hbs",
    "content": "---\ntitle: \"{{displayName}}\"\ndescription: \"{{#if displayDescription}}{{displayDescription}}{{else}}{{displayName}} package documentation.{{/if}}\"\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}). DO NOT EDIT MANUALLY -->\n\n# {{displayName}}\n\n## Overview\n\n{{#if customOverview}}\n{{{customOverview}}}\n{{else}}\nThe Flow {{packageName}} library provides a set of tools for developers to build applications on the Flow blockchain.\n{{/if}}\n\n## Installation\n\nYou can install the @onflow/{{packageName}} package using npm or yarn:\n\n```bash\nnpm install @onflow/{{packageName}}\n```\n\nOr using yarn:\n\n```bash\nyarn add @onflow/{{packageName}}\n```\n\n### Requirements\n\n{{#if customRequirements}}\n{{{customRequirements}}}\n{{else}}\n- Node.js 14.x or later\n{{/if}}\n\n### Importing\n\n{{#if customImporting}}\n{{{customImporting}}}\n{{else}}\nYou can import the entire package:\n\n```typescript\nimport * as {{packageFirstWord}} from \"@onflow/{{packageName}}\"\n```\n\nOr import specific functions:\n\n```typescript\nimport { functionName } from \"@onflow/{{packageName}}\"\n```\n{{/if}}\n\n{{#if extra}}\n{{{extra}}}\n{{/if}}\n\n## API Reference\n\nThis section contains documentation for all of the functions and namespaces in the {{packageName}} package.\n\n{{#each allApiItems}}\n{{#if isNamespace}}\n- [{{displayName}}]({{filePath}}) (namespace){{#if displayDescription}} - {{displayDescription}}{{/if}}\n{{else}}\n- [{{displayName}}]({{filePath}}){{#if displayDescription}} - {{displayDescription}}{{/if}}\n{{/if}}\n{{/each}}\n\n--- "
  },
  {
    "path": "docs-generator/templates/root.hbs",
    "content": "---\nsidebar_position: 1\ntitle: Packages Docs\ndescription: Packages documentation.\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl-js](https://github.com/onflow/fcl-js). DO NOT EDIT MANUALLY -->\n\n# Packages Docs\n\nA list of all packages available inside Flow Client Library (FCL) with functions and type definitions.\n\n{{#each packages}}\n- [{{this.displayName}}](./{{this.packageName}}/index.md) - {{this.displayDescription}}\n{{/each}}\n\n- [Type Definitions](./types/index.md) - Type definitions for the Flow Client Library (FCL) packages.\n\n---\n"
  },
  {
    "path": "docs-generator/templates/types.hbs",
    "content": "---\ntitle: Type Definitions\ndescription: Type definitions for the Flow Client Library (FCL) packages.\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/typedefs](https://github.com/onflow/fcl-js/tree/master/packages/typedefs). DO NOT EDIT MANUALLY -->\n\n# Type Definitions\n\nDocumentation for core types used throughout the Flow Client Library (FCL).\n\n{{#if interfaces.length}}\n## Interfaces\n\n{{#each interfaces}}\n### {{name}}\n\n```typescript\n{{{importStatement}}}\n```\n\n{{#if description}}\n{{{description}}}\n{{/if}}\n\n{{#if properties.length}}\n**Properties:**\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n{{#each properties}}\n| `{{name}}` | `{{{type}}}` | {{#if description}}{{{description}}}{{/if}} |\n{{/each}}\n{{/if}}\n\n{{/each}}\n{{/if}}\n\n{{#if types.length}}\n## Types\n\n{{#each types}}\n### {{name}}\n\n```typescript\n{{{importStatement}}}\n```\n\n{{#if description}}\n{{{description}}}\n{{/if}}\n\n{{#if properties.length}}\n**Properties:**\n\n| Name | Type | Description |\n| ---- | ---- | ----------- |\n{{#each properties}}\n| `{{name}}` | `{{{type}}}` | {{#if description}}{{{description}}}{{/if}} |\n{{/each}}\n{{/if}}\n\n{{/each}}\n{{/if}}\n\n{{#if enums.length}}\n## Enums\n\n{{#each enums}}\n### {{name}}\n\n```typescript\n{{{importStatement}}}\n```\n\n{{#if description}}\n{{{description}}}\n{{/if}}\n\n**Members:**\n\n| Name | Value |\n| ---- | ----- |\n{{#each members}}\n| `{{name}}` | {{#if value}}{{{value}}}{{else}}`\"{{name}}\"`{{/if}} |\n{{/each}}\n\n{{/each}}\n{{/if}}\n\n---"
  },
  {
    "path": "docs-generator/utils/export-extractor.js",
    "content": "const path = require(\"path\")\nconst {Node} = require(\"ts-morph\")\nconst {parseJsDoc} = require(\"./jsdoc-parser\")\nconst {\n  extractFunctionInfo,\n  resolveReExportedFunction,\n} = require(\"./function-extractor\")\nconst {extractNamespaceFunctions} = require(\"./namespace-utils\")\n\nfunction extractExportsFromEntryFile(sourceFile) {\n  const functions = []\n  const namespaces = []\n  const processedReExports = new Set() // Track already processed re-exports\n  const filePath = sourceFile.getFilePath()\n  const relativeFilePath = path.relative(process.cwd(), filePath)\n\n  try {\n    // Get all import declarations to track namespaces\n    const importDeclarations = sourceFile.getImportDeclarations()\n    const actualNamespaceImports = new Map() // Only for \"import * as X\" style imports\n    const namedImports = new Map() // For regular named imports like \"import {build}\"\n    const typeOnlyImports = new Set() // Track type-only imports\n\n    importDeclarations.forEach(importDecl => {\n      // Skip entire type-only import declarations\n      if (importDecl.isTypeOnly && importDecl.isTypeOnly()) {\n        return\n      }\n\n      // Handle regular named imports\n      const namedImportsList = importDecl.getNamedImports()\n      namedImportsList.forEach(namedImport => {\n        const name = namedImport.getName()\n\n        // Check if this is a type-only import (either the import declaration or the named import)\n        if (\n          namedImport.isTypeOnly() ||\n          (importDecl.isTypeOnly && importDecl.isTypeOnly())\n        ) {\n          typeOnlyImports.add(name)\n          return // Skip adding to namedImports\n        }\n\n        namedImports.set(name, importDecl)\n      })\n\n      // Handle actual namespace imports like \"import * as types\"\n      const namespaceImport = importDecl.getNamespaceImport()\n      if (namespaceImport) {\n        const name = namespaceImport.getText()\n        // Only add if it's not a type-only import\n        if (!(importDecl.isTypeOnly && importDecl.isTypeOnly())) {\n          actualNamespaceImports.set(name, importDecl)\n        }\n      }\n    })\n\n    // Get all export declarations to find re-exports and namespace exports with aliases\n    sourceFile.getExportDeclarations().forEach(exportDecl => {\n      // Skip type-only exports\n      if (exportDecl.isTypeOnly()) {\n        return\n      }\n\n      const namedExports = exportDecl.getNamedExports()\n      namedExports.forEach(namedExport => {\n        // Skip type-only named exports\n        if (namedExport.isTypeOnly()) {\n          return\n        }\n\n        const exportName = namedExport.getName()\n        const alias = namedExport.getAliasNode()?.getText()\n        const finalName = alias || exportName\n        // For aliased exports, exportName is the original and alias is the final name\n        // When resolving, we want to look up the original name (exportName)\n        const originalName = exportName\n\n        // Skip if this is a type-only import\n        if (typeOnlyImports.has(exportName)) {\n          return\n        }\n\n        // Check if this is a re-export from another module\n        const moduleSpecifier = exportDecl.getModuleSpecifier()\n        if (moduleSpecifier) {\n          const moduleSpecifierValue = moduleSpecifier.getLiteralValue()\n          const reExportedFuncInfo = resolveReExportedFunction(\n            sourceFile,\n            originalName,\n            moduleSpecifierValue\n          )\n          if (reExportedFuncInfo) {\n            reExportedFuncInfo.name = finalName\n            functions.push(reExportedFuncInfo)\n            // Track that this function was processed as a re-export\n            processedReExports.add(finalName)\n          }\n        } else {\n          // This is an export of something imported - check if it's an actual namespace\n          if (\n            actualNamespaceImports.has(exportName) &&\n            !typeOnlyImports.has(exportName)\n          ) {\n            const importDecl = actualNamespaceImports.get(exportName)\n            const namespaceFunctions = extractNamespaceFunctions(\n              sourceFile,\n              exportName,\n              importDecl\n            )\n            // Only add as namespace if it actually has functions\n            if (namespaceFunctions.length > 0) {\n              namespaces.push({\n                name: finalName,\n                functions: namespaceFunctions,\n                description: `Namespace containing ${finalName} utilities`,\n              })\n            }\n          }\n          // Also check if it's a named import that might be a namespace object\n          else if (\n            namedImports.has(exportName) &&\n            !typeOnlyImports.has(exportName)\n          ) {\n            const importDecl = namedImports.get(exportName)\n            const namespaceFunctions = extractNamespaceFunctions(\n              sourceFile,\n              exportName,\n              importDecl\n            )\n            // Only add as namespace if it actually has functions\n            if (namespaceFunctions.length > 0) {\n              namespaces.push({\n                name: finalName,\n                functions: namespaceFunctions,\n                description: `Namespace containing ${finalName} utilities`,\n              })\n            }\n          }\n        }\n      })\n    })\n\n    // Get exported declarations from the current file\n    sourceFile.getExportedDeclarations().forEach((declarations, name) => {\n      // Skip if this function was already processed as a re-export\n      if (processedReExports.has(name)) {\n        return\n      }\n\n      declarations.forEach(declaration => {\n        // Skip type declarations, interfaces, and type aliases\n        if (\n          Node.isTypeAliasDeclaration(declaration) ||\n          Node.isInterfaceDeclaration(declaration) ||\n          Node.isEnumDeclaration(declaration)\n        ) {\n          // Skip these as they are types, not functions\n          return\n        }\n\n        const funcInfo = extractFunctionInfo(declaration, name, sourceFile)\n\n        if (funcInfo) {\n          functions.push(funcInfo)\n        }\n        // Check if this is a namespace export for variable declarations\n        else if (Node.isVariableDeclaration(declaration)) {\n          // Only check if this is a namespace export if it's an actual namespace import\n          // and it's not a type-only import\n          if (\n            actualNamespaceImports.has(name) &&\n            !typeOnlyImports.has(name) &&\n            !namespaces.some(ns => ns.name === name)\n          ) {\n            const importDecl = actualNamespaceImports.get(name)\n            const namespaceFunctions = extractNamespaceFunctions(\n              sourceFile,\n              name,\n              importDecl\n            )\n            // Only add as namespace if it actually has functions\n            if (namespaceFunctions.length > 0) {\n              const jsDocInfo = parseJsDoc(declaration)\n              namespaces.push({\n                name,\n                functions: namespaceFunctions,\n                description:\n                  jsDocInfo.description ||\n                  `Namespace containing ${name} utilities`,\n              })\n            }\n          }\n          // Also check if it's a named import that might be a namespace object\n          else if (\n            namedImports.has(name) &&\n            !typeOnlyImports.has(name) &&\n            !namespaces.some(ns => ns.name === name)\n          ) {\n            const importDecl = namedImports.get(name)\n            const namespaceFunctions = extractNamespaceFunctions(\n              sourceFile,\n              name,\n              importDecl\n            )\n            // Only add as namespace if it actually has functions\n            if (namespaceFunctions.length > 0) {\n              const jsDocInfo = parseJsDoc(declaration)\n              namespaces.push({\n                name,\n                functions: namespaceFunctions,\n                description:\n                  jsDocInfo.description ||\n                  `Namespace containing ${name} utilities`,\n              })\n            }\n          }\n        }\n      })\n    })\n  } catch (e) {\n    console.warn(`Error extracting exports from entry file: ${e.message}`)\n    console.warn(e.stack)\n  }\n\n  return {functions, namespaces}\n}\n\nmodule.exports = {\n  extractExportsFromEntryFile,\n}\n"
  },
  {
    "path": "docs-generator/utils/file-utils.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nfunction discoverWorkspacePackages() {\n  try {\n    // Get the workspace root (2 levels up from current package directory)\n    const workspaceRoot = path.resolve(process.cwd(), \"../..\")\n    const packagesDir = path.join(workspaceRoot, \"packages\")\n\n    if (!fs.existsSync(packagesDir)) {\n      console.warn(\"Packages directory not found, using current package only\")\n      return []\n    }\n\n    const packagePaths = []\n    const packageDirs = fs\n      .readdirSync(packagesDir, {withFileTypes: true})\n      .filter(dirent => dirent.isDirectory())\n      .map(dirent => dirent.name)\n\n    for (const packageDir of packageDirs) {\n      const srcPath = path.join(packagesDir, packageDir, \"src\")\n      if (fs.existsSync(srcPath)) {\n        packagePaths.push(`${srcPath}/**/*.ts`)\n      }\n    }\n\n    return packagePaths\n  } catch (e) {\n    console.warn(`Error discovering workspace packages: ${e.message}`)\n    return []\n  }\n}\n\nmodule.exports = {\n  discoverWorkspacePackages,\n}\n"
  },
  {
    "path": "docs-generator/utils/function-extractor.js",
    "content": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {Node} = require(\"ts-morph\")\nconst {parseJsDoc} = require(\"./jsdoc-parser\")\nconst {\n  cleanupTypeText,\n  toCamelCase,\n  escapeParameterNameForMDX,\n  escapeTextForMDX,\n} = require(\"./type-utils\")\n\nfunction extractFunctionInfo(\n  declaration,\n  functionName,\n  sourceFile,\n  namespace = null\n) {\n  try {\n    let funcInfo = null\n\n    // Handle function declarations\n    if (Node.isFunctionDeclaration(declaration)) {\n      const jsDocInfo = parseJsDoc(declaration)\n      const parameters = declaration.getParameters().map(param => {\n        let paramName = param.getName()\n        const paramType = cleanupTypeText(param.getType().getText())\n        const paramJsDoc = jsDocInfo.params && jsDocInfo.params[paramName]\n\n        // Handle destructured parameters by using camelCase of the type name\n        if (paramName.includes(\"{\") && paramName.includes(\"}\")) {\n          // Extract the type name from the parameter type\n          // Handle both direct types (AccountProofData) and import types (import(\"...\").AccountProofData)\n          const typeText = param.getType().getText()\n          let typeMatch = typeText.match(/^([A-Z][a-zA-Z0-9]*)/) // Direct type\n          if (!typeMatch) {\n            typeMatch = typeText.match(/import\\([^)]+\\)\\.([A-Z][a-zA-Z0-9]*)/) // Import type\n          }\n\n          if (typeMatch && typeMatch[1]) {\n            paramName = toCamelCase(typeMatch[1])\n          } else {\n            // Fallback to \"options\" if we can't extract a type name\n            paramName = \"options\"\n          }\n        }\n\n        // Handle nested JSDoc parameters (e.g., queryOptions.height)\n        let nestedParams = []\n        if (jsDocInfo.params) {\n          Object.keys(jsDocInfo.params).forEach(jsDocParamName => {\n            if (jsDocParamName.startsWith(paramName + \".\")) {\n              const nestedParamName = jsDocParamName.substring(\n                paramName.length + 1\n              )\n\n              // Try to extract type information from the parameter's TypeScript type\n              let nestedParamType = \"any\"\n              try {\n                const paramTypeSymbol = param.getType().getSymbol()\n                if (paramTypeSymbol) {\n                  const typeDeclaration = paramTypeSymbol.getDeclarations()?.[0]\n                  if (\n                    typeDeclaration &&\n                    Node.isInterfaceDeclaration(typeDeclaration)\n                  ) {\n                    // Find the property in the interface\n                    const property =\n                      typeDeclaration.getProperty(nestedParamName)\n                    if (property) {\n                      const propertyType = property.getType()\n                      nestedParamType = cleanupTypeText(propertyType.getText())\n                    }\n                  }\n                }\n              } catch (e) {\n                // Fallback to any if type extraction fails\n                nestedParamType = \"any\"\n              }\n\n              nestedParams.push({\n                name: escapeParameterNameForMDX(nestedParamName),\n                type: nestedParamType,\n                required: true, // Default to required\n                description:\n                  escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || \"\",\n              })\n            }\n          })\n        }\n\n        return {\n          name: escapeParameterNameForMDX(paramName),\n          type: paramType,\n          required: !param.isOptional(),\n          description: escapeTextForMDX(paramJsDoc) || \"\",\n          nestedParams: nestedParams.length > 0 ? nestedParams : undefined,\n        }\n      })\n\n      // Get the actual return type, not the function signature\n      let returnType = \"any\"\n      try {\n        const funcReturnType = declaration.getReturnType()\n        const returnTypeText = funcReturnType.getText()\n\n        // If the return type text looks like a function signature, extract just the return part\n        // But don't apply this logic to object literal types (which start with '{')\n        if (\n          returnTypeText.includes(\"=>\") &&\n          !returnTypeText.trim().startsWith(\"{\")\n        ) {\n          const returnPart = returnTypeText.split(\"=>\").pop()?.trim()\n          if (returnPart) {\n            returnType = cleanupTypeText(returnPart)\n          } else {\n            returnType = cleanupTypeText(returnTypeText)\n          }\n        } else {\n          returnType = cleanupTypeText(returnTypeText)\n        }\n      } catch (e) {\n        console.warn(`Error extracting return type: ${e.message}`)\n        returnType = \"any\"\n      }\n\n      // Extract return description from JSDoc\n      let returnDescription = null\n      if (jsDocInfo.returns) {\n        returnDescription = escapeTextForMDX(jsDocInfo.returns)\n      }\n\n      const filePath = sourceFile.getFilePath()\n      const relativeFilePath = path.relative(process.cwd(), filePath)\n\n      funcInfo = {\n        name: functionName,\n        returnType,\n        returnDescription,\n        parameters,\n        description: jsDocInfo.description || \"\",\n        customExample: jsDocInfo.example || \"\",\n        sourceFilePath: relativeFilePath,\n      }\n    }\n    // Handle variable declarations with function values\n    else if (Node.isVariableDeclaration(declaration)) {\n      let jsDocInfo = parseJsDoc(declaration)\n\n      // If no JSDoc found on the declaration, try the parent VariableStatement\n      if (!jsDocInfo.description) {\n        const parentList = declaration.getParent()\n        if (parentList) {\n          const parentStatement = parentList.getParent()\n          if (parentStatement) {\n            jsDocInfo = parseJsDoc(parentStatement)\n          }\n        }\n      }\n\n      const initializer = declaration.getInitializer()\n\n      // Check for function calls that might wrap a function (like withGlobalContext(createAccount))\n      if (initializer && Node.isCallExpression(initializer)) {\n        const args = initializer.getArguments()\n        // Check if the call expression itself is calling a function we can analyze\n        const callExpression = initializer.getExpression()\n        if (Node.isIdentifier(callExpression)) {\n          const functionName_inner = callExpression.getText()\n\n          // Look for the function being called (like createQuery)\n          const calledFunction = sourceFile.getFunction(functionName_inner)\n          if (calledFunction) {\n            // Look for inner function declarations within the called function\n            const innerFunctions = calledFunction.getFunctions()\n            if (innerFunctions.length > 0) {\n              // Get the first inner function (usually the one being returned)\n              const innerFunction = innerFunctions[0]\n              const innerFuncInfo = extractFunctionInfo(\n                innerFunction,\n                functionName,\n                sourceFile,\n                namespace\n              )\n              if (innerFuncInfo) {\n                // Merge JSDoc from the exported variable\n                return {\n                  ...innerFuncInfo,\n                  description:\n                    jsDocInfo.description || innerFuncInfo.description,\n                  customExample:\n                    jsDocInfo.example || innerFuncInfo.customExample,\n                }\n              }\n            }\n\n            // Also look for inner variable declarations that might contain arrow functions\n            const innerVariables = calledFunction.getVariableDeclarations()\n            if (innerVariables.length > 0) {\n              // Look for a variable with the same name as the function we're looking for\n              const matchingVariable = innerVariables.find(\n                v => v.getName() === functionName\n              )\n              if (matchingVariable) {\n                const innerFuncInfo = extractFunctionInfo(\n                  matchingVariable,\n                  functionName,\n                  sourceFile,\n                  namespace\n                )\n                if (innerFuncInfo) {\n                  // Merge JSDoc from the exported variable\n                  return {\n                    ...innerFuncInfo,\n                    description:\n                      jsDocInfo.description || innerFuncInfo.description,\n                    customExample:\n                      jsDocInfo.example || innerFuncInfo.customExample,\n                  }\n                }\n              }\n            }\n          }\n        }\n\n        if (args.length > 0) {\n          const firstArg = args[0]\n          // If the first argument is an identifier, try to resolve it to a function\n          if (Node.isIdentifier(firstArg)) {\n            const argName = firstArg.getText()\n            // Look for the function with this name in the source file\n            const referencedFunction = sourceFile.getFunction(argName)\n            if (referencedFunction) {\n              // Look for inner function declarations within the referenced function\n              const innerFunctions = referencedFunction.getFunctions()\n              if (innerFunctions.length > 0) {\n                // Get the first inner function (usually the one being returned)\n                const innerFunction = innerFunctions[0]\n                const innerFuncInfo = extractFunctionInfo(\n                  innerFunction,\n                  functionName,\n                  sourceFile,\n                  namespace\n                )\n                if (innerFuncInfo) {\n                  // Merge JSDoc from the exported variable, including nested parameters\n                  const mergedParameters = innerFuncInfo.parameters.map(\n                    param => {\n                      // Check if there are nested JSDoc parameters for this parameter\n                      let nestedParams = []\n                      if (jsDocInfo.params) {\n                        Object.keys(jsDocInfo.params).forEach(\n                          jsDocParamName => {\n                            if (jsDocParamName.startsWith(param.name + \".\")) {\n                              const nestedParamName = jsDocParamName.substring(\n                                param.name.length + 1\n                              )\n                              // Extract nested parameter type from the parameter's TypeScript interface\n                              let nestedParamType = \"any\"\n                              try {\n                                // Get the parameter from the inner function for type extraction\n                                const innerParams =\n                                  innerFunction.getParameters()\n                                const matchingParam = innerParams.find(p => {\n                                  let pName = p.getName()\n                                  if (\n                                    pName.includes(\"{\") &&\n                                    pName.includes(\"}\")\n                                  ) {\n                                    const typeText = p.getType().getText()\n                                    let typeMatch =\n                                      typeText.match(/^([A-Z][a-zA-Z0-9]*)/)\n                                    if (!typeMatch) {\n                                      typeMatch = typeText.match(\n                                        /import\\([^)]+\\)\\.([A-Z][a-zA-Z0-9]*)/\n                                      )\n                                    }\n                                    if (typeMatch && typeMatch[1]) {\n                                      pName = toCamelCase(typeMatch[1])\n                                    }\n                                  }\n                                  return pName === param.name\n                                })\n\n                                if (matchingParam) {\n                                  const paramTypeSymbol = matchingParam\n                                    .getType()\n                                    .getSymbol()\n                                  if (paramTypeSymbol) {\n                                    const typeDeclaration =\n                                      paramTypeSymbol.getDeclarations()?.[0]\n                                    if (\n                                      typeDeclaration &&\n                                      Node.isInterfaceDeclaration(\n                                        typeDeclaration\n                                      )\n                                    ) {\n                                      const property =\n                                        typeDeclaration.getProperty(\n                                          nestedParamName\n                                        )\n                                      if (property) {\n                                        const propertyType = property.getType()\n                                        nestedParamType = cleanupTypeText(\n                                          propertyType.getText()\n                                        )\n                                      }\n                                    }\n                                  }\n                                }\n                              } catch (e) {\n                                // Fallback to any\n                                nestedParamType = \"any\"\n                              }\n\n                              nestedParams.push({\n                                name: escapeParameterNameForMDX(\n                                  nestedParamName\n                                ),\n                                type: nestedParamType,\n                                required: true, // Default to required\n                                description:\n                                  escapeTextForMDX(\n                                    jsDocInfo.params[jsDocParamName]\n                                  ) || \"\",\n                              })\n                            }\n                          }\n                        )\n                      }\n\n                      return {\n                        ...param,\n                        // Override description from JSDoc if available\n                        description:\n                          jsDocInfo.params && jsDocInfo.params[param.name]\n                            ? escapeTextForMDX(jsDocInfo.params[param.name])\n                            : param.description,\n                        nestedParams:\n                          nestedParams.length > 0 ? nestedParams : undefined,\n                      }\n                    }\n                  )\n\n                  return {\n                    ...innerFuncInfo,\n                    description:\n                      jsDocInfo.description || innerFuncInfo.description,\n                    customExample:\n                      jsDocInfo.example || innerFuncInfo.customExample,\n                    parameters: mergedParameters,\n                  }\n                }\n              }\n\n              // Fallback: try to extract info directly from the referenced function\n              const referencedFuncInfo = extractFunctionInfo(\n                referencedFunction,\n                functionName,\n                sourceFile,\n                namespace\n              )\n              if (referencedFuncInfo) {\n                // Override with JSDoc from the exported variable\n                return {\n                  ...referencedFuncInfo,\n                  description:\n                    jsDocInfo.description || referencedFuncInfo.description,\n                  customExample:\n                    jsDocInfo.example || referencedFuncInfo.customExample,\n                }\n              }\n            }\n          }\n        }\n      }\n\n      if (\n        initializer &&\n        (Node.isFunctionExpression(initializer) ||\n          Node.isArrowFunction(initializer))\n      ) {\n        const parameters = initializer.getParameters().map(param => {\n          let paramName = param.getName()\n          const paramType = cleanupTypeText(param.getType().getText())\n          const paramJsDoc = jsDocInfo.params && jsDocInfo.params[paramName]\n\n          // Handle destructured parameters by using camelCase of the type name\n          if (paramName.includes(\"{\") && paramName.includes(\"}\")) {\n            // Extract the type name from the parameter type\n            // Handle both direct types (AccountProofData) and import types (import(\"...\").AccountProofData)\n            const typeText = param.getType().getText()\n            let typeMatch = typeText.match(/^([A-Z][a-zA-Z0-9]*)/) // Direct type\n            if (!typeMatch) {\n              typeMatch = typeText.match(/import\\([^)]+\\)\\.([A-Z][a-zA-Z0-9]*)/) // Import type\n            }\n\n            if (typeMatch && typeMatch[1]) {\n              paramName = toCamelCase(typeMatch[1])\n            } else {\n              // Fallback to \"options\" if we can't extract a type name\n              paramName = \"options\"\n            }\n          }\n\n          // Handle nested JSDoc parameters (e.g., queryOptions.height)\n          let nestedParams = []\n          if (jsDocInfo.params) {\n            Object.keys(jsDocInfo.params).forEach(jsDocParamName => {\n              if (jsDocParamName.startsWith(paramName + \".\")) {\n                const nestedParamName = jsDocParamName.substring(\n                  paramName.length + 1\n                )\n\n                // Try to extract type information from the parameter's TypeScript type\n                let nestedParamType = \"any\"\n                try {\n                  const paramTypeSymbol = param.getType().getSymbol()\n                  if (paramTypeSymbol) {\n                    const typeDeclaration =\n                      paramTypeSymbol.getDeclarations()?.[0]\n                    if (\n                      typeDeclaration &&\n                      Node.isInterfaceDeclaration(typeDeclaration)\n                    ) {\n                      // Find the property in the interface\n                      const property =\n                        typeDeclaration.getProperty(nestedParamName)\n                      if (property) {\n                        const propertyType = property.getType()\n                        nestedParamType = cleanupTypeText(\n                          propertyType.getText()\n                        )\n                      }\n                    }\n                  }\n                } catch (e) {\n                  // Fallback to any if type extraction fails\n                  nestedParamType = \"any\"\n                }\n\n                nestedParams.push({\n                  name: escapeParameterNameForMDX(nestedParamName),\n                  type: nestedParamType,\n                  required: true, // Default to required\n                  description:\n                    escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || \"\",\n                })\n              }\n            })\n          }\n\n          return {\n            name: escapeParameterNameForMDX(paramName),\n            type: paramType,\n            required: !param.isOptional(),\n            description: escapeTextForMDX(paramJsDoc) || \"\",\n            nestedParams: nestedParams.length > 0 ? nestedParams : undefined,\n          }\n        })\n\n        // Get the actual return type, not the function signature\n        let returnType = \"any\"\n        try {\n          const funcReturnType = initializer.getReturnType()\n          const returnTypeText = funcReturnType.getText()\n\n          // If the return type text looks like a function signature, extract just the return part\n          if (returnTypeText.includes(\"=>\")) {\n            const returnPart = returnTypeText.split(\"=>\").pop()?.trim()\n            if (returnPart) {\n              returnType = cleanupTypeText(returnPart)\n            } else {\n              returnType = cleanupTypeText(returnTypeText)\n            }\n          } else {\n            returnType = cleanupTypeText(returnTypeText)\n          }\n        } catch (e) {\n          console.warn(`Error extracting return type: ${e.message}`)\n          returnType = \"any\"\n        }\n\n        // Extract return description from JSDoc\n        let returnDescription = null\n        if (jsDocInfo.returns) {\n          returnDescription = escapeTextForMDX(jsDocInfo.returns)\n        }\n\n        const filePath = sourceFile.getFilePath()\n        const relativeFilePath = path.relative(process.cwd(), filePath)\n\n        funcInfo = {\n          name: functionName,\n          returnType,\n          returnDescription,\n          parameters,\n          description: jsDocInfo.description || \"\",\n          customExample: jsDocInfo.example || \"\",\n          sourceFilePath: relativeFilePath,\n        }\n      }\n      // Handle variable declarations with JSDoc that represent functions\n      // (like resolve = pipe([...]) or other function-returning expressions)\n      else if (jsDocInfo.description || jsDocInfo.params || jsDocInfo.returns) {\n        // Extract parameter information from JSDoc if available\n        const parameters = []\n        if (jsDocInfo.params) {\n          // First, get all top-level parameters (those without dots)\n          const topLevelParams = Object.keys(jsDocInfo.params).filter(\n            paramName => !paramName.includes(\".\")\n          )\n\n          topLevelParams.forEach(paramName => {\n            const paramDesc = jsDocInfo.params[paramName]\n\n            // Handle nested JSDoc parameters (e.g., queryOptions.height)\n            let nestedParams = []\n            Object.keys(jsDocInfo.params).forEach(jsDocParamName => {\n              if (jsDocParamName.startsWith(paramName + \".\")) {\n                const nestedParamName = jsDocParamName.substring(\n                  paramName.length + 1\n                )\n\n                // For JSDoc-only cases, try to infer type from variable declaration\n                let nestedParamType = \"any\"\n                try {\n                  const variableType = declaration.getType()\n                  const typeSymbol = variableType.getSymbol()\n                  if (typeSymbol) {\n                    const typeDeclaration = typeSymbol.getDeclarations()?.[0]\n                    if (\n                      typeDeclaration &&\n                      Node.isInterfaceDeclaration(typeDeclaration)\n                    ) {\n                      const property =\n                        typeDeclaration.getProperty(nestedParamName)\n                      if (property) {\n                        const propertyType = property.getType()\n                        nestedParamType = cleanupTypeText(\n                          propertyType.getText()\n                        )\n                      }\n                    }\n                  }\n                } catch (e) {\n                  // Fallback to any\n                  nestedParamType = \"any\"\n                }\n\n                nestedParams.push({\n                  name: escapeParameterNameForMDX(nestedParamName),\n                  type: nestedParamType,\n                  required: true, // Default to required\n                  description:\n                    escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || \"\",\n                })\n              }\n            })\n\n            parameters.push({\n              name: escapeParameterNameForMDX(paramName),\n              type: \"any\", // Default type since we can't infer from call expressions\n              required: true, // Default to required\n              description: escapeTextForMDX(paramDesc) || \"\",\n              nestedParams: nestedParams.length > 0 ? nestedParams : undefined,\n            })\n          })\n        }\n\n        // Get return type from JSDoc or try to infer from the variable type\n        let returnType = \"any\"\n        let returnDescription = null\n        if (jsDocInfo.returns) {\n          returnDescription = escapeTextForMDX(jsDocInfo.returns)\n        }\n\n        // Always try to get the actual TypeScript return type\n        try {\n          returnType = cleanupTypeText(declaration.getType().getText())\n        } catch (e) {\n          // Fallback to any if type inference fails\n          returnType = \"any\"\n        }\n\n        const filePath = sourceFile.getFilePath()\n        const relativeFilePath = path.relative(process.cwd(), filePath)\n\n        funcInfo = {\n          name: functionName,\n          returnType,\n          returnDescription,\n          parameters,\n          description: jsDocInfo.description || \"\",\n          customExample: jsDocInfo.example || \"\",\n          sourceFilePath: relativeFilePath,\n        }\n      }\n    }\n\n    // Add namespace if provided\n    if (funcInfo && namespace) {\n      funcInfo.namespace = namespace\n    }\n\n    return funcInfo\n  } catch (e) {\n    console.warn(\n      `Error extracting function info for ${functionName}: ${e.message}`\n    )\n    return null\n  }\n}\n\nfunction findFunctionInSourceFile(sourceFile, functionName) {\n  try {\n    // First, check if this function is re-exported from another module\n    // If it is, we should NOT try to extract it directly here, but let the re-export resolution handle it\n    const exportDeclarations = sourceFile.getExportDeclarations()\n    for (const exportDecl of exportDeclarations) {\n      const namedExports = exportDecl.getNamedExports()\n      const hasExport = namedExports.some(\n        namedExport => namedExport.getName() === functionName\n      )\n\n      if (hasExport && exportDecl.getModuleSpecifier()) {\n        return null // This will force the caller to use re-export resolution\n      }\n    }\n\n    const exportedDeclarations = sourceFile.getExportedDeclarations()\n    if (exportedDeclarations.has(functionName)) {\n      const declarations = exportedDeclarations.get(functionName)\n\n      for (const declaration of declarations) {\n        // Skip export declarations - we want actual function implementations\n        if (Node.isExportDeclaration(declaration)) {\n          continue\n        }\n\n        const funcInfo = extractFunctionInfo(\n          declaration,\n          functionName,\n          sourceFile\n        )\n        if (funcInfo) {\n          return funcInfo\n        }\n      }\n    }\n\n    return null\n  } catch (e) {\n    console.warn(\n      `Error finding function ${functionName} in source file: ${e.message}`\n    )\n    return null\n  }\n}\n\nfunction resolveOnFlowPackage(packageName) {\n  try {\n    // Look for the package in the workspace packages directory\n    // We need to account for the fact that the current working directory is already in packages/\n    const packagesDir = path.resolve(process.cwd(), \"..\")\n    const packageDir = path.join(packagesDir, packageName)\n    const packageJsonPath = path.join(packageDir, \"package.json\")\n\n    if (fs.existsSync(packageJsonPath)) {\n      const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"))\n      const entryFile = packageJson.source || packageJson.main || \"src/index.ts\"\n      const entryFilePath = path.resolve(packageDir, entryFile)\n\n      if (fs.existsSync(entryFilePath)) {\n        return entryFilePath\n      }\n    }\n\n    return null\n  } catch (e) {\n    console.warn(`Error resolving @onflow/${packageName}: ${e.message}`)\n    return null\n  }\n}\n\nfunction resolveReExportedFunction(sourceFile, exportName, moduleSpecifier) {\n  try {\n    let referencedSourceFile = null\n\n    // Handle @onflow/ package specifiers\n    if (moduleSpecifier.startsWith(\"@onflow/\")) {\n      const packageName = moduleSpecifier.replace(\"@onflow/\", \"\")\n      const packageEntryPath = resolveOnFlowPackage(packageName)\n\n      if (packageEntryPath) {\n        // Get the ts-morph project from the source file\n        const project = sourceFile.getProject()\n\n        // Try to get the source file, or add it if not already added\n        referencedSourceFile = project.getSourceFile(packageEntryPath)\n        if (!referencedSourceFile) {\n          try {\n            referencedSourceFile = project.addSourceFileAtPath(packageEntryPath)\n          } catch (e) {\n            console.warn(\n              `Could not add source file at ${packageEntryPath}: ${e.message}`\n            )\n          }\n        }\n      }\n    } else {\n      // Handle relative imports - existing logic\n      const referencedSourceFiles = sourceFile.getReferencedSourceFiles()\n\n      // Find the source file that matches the module specifier\n      // Try exact matches first, then partial matches\n      const candidates = []\n\n      for (const sf of referencedSourceFiles) {\n        const fileName = path.basename(sf.getFilePath(), \".ts\")\n        const moduleFileName = path.basename(moduleSpecifier, \".ts\")\n\n        // Exact match (highest priority)\n        if (fileName === moduleFileName) {\n          candidates.push({sf, priority: 1})\n        }\n        // Path includes the module specifier\n        else if (\n          sf.getFilePath().includes(moduleSpecifier) ||\n          sf.getFilePath().includes(moduleSpecifier.replace(\"./\", \"\"))\n        ) {\n          candidates.push({sf, priority: 2})\n        }\n      }\n\n      // Sort by priority and take the first (exact matches first)\n      if (candidates.length > 0) {\n        candidates.sort((a, b) => a.priority - b.priority)\n        referencedSourceFile = candidates[0].sf\n      }\n    }\n\n    if (referencedSourceFile) {\n      const funcInfo = findFunctionInSourceFile(\n        referencedSourceFile,\n        exportName\n      )\n      if (funcInfo) {\n        return funcInfo\n      }\n\n      // If not found in the entry file, check if it's re-exported from elsewhere\n      // Look through export declarations to find where this function comes from\n      const exportDeclarations = referencedSourceFile.getExportDeclarations()\n      for (const exportDecl of exportDeclarations) {\n        const namedExports = exportDecl.getNamedExports()\n\n        // Check if this export contains our function (including checking both name and alias)\n        const hasExport = namedExports.some(namedExport => {\n          const name = namedExport.getName()\n          const alias = namedExport.getAliasNode()?.getText()\n          const finalName = alias || name\n          return finalName === exportName || name === exportName\n        })\n\n        if (hasExport) {\n          const moduleSpec = exportDecl.getModuleSpecifier()\n          if (moduleSpec) {\n            const moduleSpecValue = moduleSpec.getLiteralValue()\n\n            // Find the original name to look up in the target module\n            const matchingExport = namedExports.find(namedExport => {\n              const name = namedExport.getName()\n              const alias = namedExport.getAliasNode()?.getText()\n              const finalName = alias || name\n              return finalName === exportName || name === exportName\n            })\n\n            const originalNameToLookup = matchingExport?.getName() || exportName\n\n            // Recursively resolve from the module this export comes from\n            return resolveReExportedFunction(\n              referencedSourceFile,\n              originalNameToLookup,\n              moduleSpecValue\n            )\n          }\n        }\n      }\n    }\n\n    return null\n  } catch (e) {\n    console.warn(\n      `Error resolving re-exported function ${exportName} from ${moduleSpecifier}: ${e.message}`\n    )\n    return null\n  }\n}\n\nmodule.exports = {\n  extractFunctionInfo,\n  findFunctionInSourceFile,\n  resolveReExportedFunction,\n}\n"
  },
  {
    "path": "docs-generator/utils/index.js",
    "content": "const {parseJsDoc} = require(\"./jsdoc-parser\")\nconst {cleanupTypeText, escapeParameterNameForMDX} = require(\"./type-utils\")\nconst {\n  extractFunctionInfo,\n  findFunctionInSourceFile,\n  resolveReExportedFunction,\n} = require(\"./function-extractor\")\nconst {extractNamespaceFunctions} = require(\"./namespace-utils\")\nconst {discoverWorkspacePackages} = require(\"./file-utils\")\nconst {extractExportsFromEntryFile} = require(\"./export-extractor\")\n\nmodule.exports = {\n  parseJsDoc,\n  cleanupTypeText,\n  escapeParameterNameForMDX,\n  extractFunctionInfo,\n  findFunctionInSourceFile,\n  resolveReExportedFunction,\n  extractNamespaceFunctions,\n  discoverWorkspacePackages,\n  extractExportsFromEntryFile,\n}\n"
  },
  {
    "path": "docs-generator/utils/jsdoc-parser.js",
    "content": "function parseJsDoc(node) {\n  try {\n    // Try to get JSDoc using the standard API\n    if (typeof node.getJsDocs === \"function\") {\n      const jsDocs = node.getJsDocs()\n      if (jsDocs && jsDocs.length > 0) {\n        const jsDoc = jsDocs[0]\n\n        // Parse tags if available\n        let parsedTags = {}\n        let description = \"\"\n\n        if (typeof jsDoc.getTags === \"function\") {\n          const tags = jsDoc.getTags()\n\n          tags.forEach(tag => {\n            const tagName = tag.getTagName()\n            let comment = \"\"\n\n            // Try to get comment text\n            if (typeof tag.getComment === \"function\") {\n              comment = tag.getComment() || \"\"\n            }\n\n            // Parse different tag types\n            if (tagName === \"description\") {\n              description = comment\n            }\n            // Parse param tags\n            else if (tagName === \"param\") {\n              if (!parsedTags.params) parsedTags.params = {}\n\n              // Try to get parameter name from the tag\n              let paramName = \"\"\n              if (typeof tag.getName === \"function\") {\n                paramName = tag.getName()\n              }\n\n              // If no name found, try to extract from comment\n              if (!paramName && comment) {\n                const paramMatch = comment.match(/^(\\w+[\\.\\w]*)\\s+(.*)$/)\n                if (paramMatch) {\n                  paramName = paramMatch[1]\n                  comment = paramMatch[2]\n                }\n              }\n\n              if (paramName) {\n                parsedTags.params[paramName] = comment\n              }\n            }\n            // Parse return tag\n            else if (tagName === \"returns\" || tagName === \"return\") {\n              // Handle multiple @returns tags by concatenating them\n              if (parsedTags.returns) {\n                parsedTags.returns += `\\n• ${comment}`\n              } else {\n                parsedTags.returns = comment\n              }\n            }\n            // Parse example tag\n            else if (tagName === \"example\") {\n              parsedTags.example = comment\n            }\n            // Store any other tags\n            else {\n              parsedTags[tagName] = comment\n            }\n          })\n        }\n\n        // If no description from tags, try to get from JSDoc description\n        if (!description && typeof jsDoc.getDescription === \"function\") {\n          description = jsDoc.getDescription() || \"\"\n        }\n\n        return {\n          description: description.trim(),\n          ...parsedTags,\n        }\n      }\n    }\n\n    // For variable declarations, check the parent VariableStatement for JSDoc\n    if (typeof node.getParent === \"function\") {\n      const parent = node.getParent()\n      if (parent && typeof parent.getParent === \"function\") {\n        const grandparent = parent.getParent()\n        if (grandparent && typeof grandparent.getJsDocs === \"function\") {\n          const parentJsDocs = grandparent.getJsDocs()\n          if (parentJsDocs && parentJsDocs.length > 0) {\n            const jsDoc = parentJsDocs[0]\n\n            // Parse tags if available\n            let parsedTags = {}\n            let description = \"\"\n\n            if (typeof jsDoc.getTags === \"function\") {\n              const tags = jsDoc.getTags()\n\n              tags.forEach(tag => {\n                const tagName = tag.getTagName()\n                let comment = \"\"\n\n                // Try to get comment text\n                if (typeof tag.getComment === \"function\") {\n                  comment = tag.getComment() || \"\"\n                }\n\n                // Parse different tag types\n                if (tagName === \"description\") {\n                  description = comment\n                }\n                // Parse param tags\n                else if (tagName === \"param\") {\n                  if (!parsedTags.params) parsedTags.params = {}\n\n                  // Try to get parameter name from the tag\n                  let paramName = \"\"\n                  if (typeof tag.getName === \"function\") {\n                    paramName = tag.getName()\n                  }\n\n                  // If no name found, try to extract from comment\n                  if (!paramName && comment) {\n                    const paramMatch = comment.match(/^(\\w+[\\.\\w]*)\\s+(.*)$/)\n                    if (paramMatch) {\n                      paramName = paramMatch[1]\n                      comment = paramMatch[2]\n                    }\n                  }\n\n                  if (paramName) {\n                    parsedTags.params[paramName] = comment\n                  }\n                }\n                // Parse return tag\n                else if (tagName === \"returns\" || tagName === \"return\") {\n                  // Handle multiple @returns tags by concatenating them\n                  if (parsedTags.returns) {\n                    parsedTags.returns += `\\n• ${comment}`\n                  } else {\n                    parsedTags.returns = comment\n                  }\n                }\n                // Parse example tag\n                else if (tagName === \"example\") {\n                  parsedTags.example = comment\n                }\n                // Store any other tags\n                else {\n                  parsedTags[tagName] = comment\n                }\n              })\n            }\n\n            // If no description from tags, try to get from JSDoc description\n            if (!description && typeof jsDoc.getDescription === \"function\") {\n              description = jsDoc.getDescription() || \"\"\n            }\n\n            return {\n              description: description.trim(),\n              ...parsedTags,\n            }\n          }\n        }\n      }\n    }\n\n    // Fallback: try to parse JSDoc from the node leading comments\n    if (typeof node.getLeadingCommentRanges === \"function\") {\n      const commentRanges = node.getLeadingCommentRanges()\n      if (commentRanges && commentRanges.length > 0) {\n        const commentText = commentRanges\n          .map(range => range.getText())\n          .join(\"\\n\")\n        // Simple regex to extract JSDoc description\n        const match = /\\/\\*\\*\\s*([\\s\\S]*?)\\s*\\*\\//.exec(commentText)\n        if (match && match[1]) {\n          const description = match[1].replace(/^\\s*\\*\\s?/gm, \"\").trim()\n          return {description}\n        }\n      }\n    }\n\n    // Also try to get comments from parent node if current node doesn't have any\n    if (typeof node.getParent === \"function\") {\n      const parent = node.getParent()\n      if (parent && typeof parent.getLeadingCommentRanges === \"function\") {\n        const commentRanges = parent.getLeadingCommentRanges()\n        if (commentRanges && commentRanges.length > 0) {\n          const commentText = commentRanges\n            .map(range => range.getText())\n            .join(\"\\n\")\n          // Simple regex to extract JSDoc description\n          const match = /\\/\\*\\*\\s*([\\s\\S]*?)\\s*\\*\\//.exec(commentText)\n          if (match && match[1]) {\n            const description = match[1].replace(/^\\s*\\*\\s?/gm, \"\").trim()\n            return {description}\n          }\n        }\n      }\n    }\n\n    return {}\n  } catch (e) {\n    console.warn(`Error parsing JSDoc: ${e.message}`)\n    return {}\n  }\n}\n\nmodule.exports = {\n  parseJsDoc,\n}\n"
  },
  {
    "path": "docs-generator/utils/namespace-utils.js",
    "content": "const path = require(\"path\")\nconst {Node} = require(\"ts-morph\")\nconst {extractFunctionInfo} = require(\"./function-extractor\")\n\nfunction extractNamespaceFunctions(\n  sourceFile,\n  namespaceName,\n  importedNamespace\n) {\n  const functions = []\n\n  try {\n    // Get the imported namespace source file\n    const moduleSpecifier = importedNamespace.getModuleSpecifier()\n    if (!moduleSpecifier) {\n      console.warn(`No module specifier for namespace ${namespaceName}`)\n      return functions\n    }\n\n    const moduleSpecifierValue = moduleSpecifier.getLiteralValue()\n\n    // Skip external packages (those starting with @, or not starting with ./)\n    if (\n      moduleSpecifierValue.startsWith(\"@\") ||\n      (!moduleSpecifierValue.startsWith(\".\") &&\n        !moduleSpecifierValue.startsWith(\"/\"))\n    ) {\n      // This is an external package, silently skip\n      return functions\n    }\n\n    // Find the source file using the same logic as resolveReExportedFunction\n    const referencedSourceFiles = sourceFile.getReferencedSourceFiles()\n    let namespaceSourceFile = null\n\n    // Find the source file that matches the module specifier\n    for (const sf of referencedSourceFiles) {\n      const fileName = path.basename(sf.getFilePath(), \".ts\")\n      const moduleFileName = path.basename(moduleSpecifierValue, \".ts\")\n\n      if (\n        fileName === moduleFileName ||\n        sf.getFilePath().includes(moduleSpecifierValue) ||\n        sf.getFilePath().includes(moduleSpecifierValue.replace(\"./\", \"\"))\n      ) {\n        namespaceSourceFile = sf\n        break\n      }\n    }\n\n    if (!namespaceSourceFile) {\n      // Only warn for internal modules (those starting with ./ or ../)\n      if (\n        moduleSpecifierValue.startsWith(\"./\") ||\n        moduleSpecifierValue.startsWith(\"../\")\n      ) {\n        console.warn(\n          `Could not find source file for namespace ${namespaceName} from ${moduleSpecifierValue}`\n        )\n      }\n      return functions\n    }\n\n    // Get all exported declarations from the namespace\n    namespaceSourceFile\n      .getExportedDeclarations()\n      .forEach((declarations, name) => {\n        declarations.forEach(declaration => {\n          const funcInfo = extractFunctionInfo(\n            declaration,\n            name,\n            namespaceSourceFile,\n            namespaceName\n          )\n\n          if (funcInfo) {\n            functions.push(funcInfo)\n          }\n        })\n      })\n  } catch (e) {\n    console.warn(\n      `Error extracting functions from namespace ${namespaceName}: ${e.message}`\n    )\n  }\n\n  return functions\n}\n\nmodule.exports = {\n  extractNamespaceFunctions,\n}\n"
  },
  {
    "path": "docs-generator/utils/type-utils.js",
    "content": "function cleanupTypeText(typeText) {\n  if (!typeText) return typeText\n\n  // Remove import paths and keep only the type name\n  let cleaned = typeText.replace(/import\\(\"([^\"]+)\"\\)\\.([^.\\s<>,\\[\\]]+)/g, \"$2\")\n  // Clean up Promise types with imports\n  cleaned = cleaned.replace(\n    /Promise<import\\(\"([^\"]+)\"\\)\\.([^.\\s<>,\\[\\]]+)>/g,\n    \"Promise<$2>\"\n  )\n  // Remove any remaining file system paths\n  cleaned = cleaned.replace(/\\/[^\"]*\\/([^\"\\/]+)\"/g, '\"$1\"')\n  // Clean up array types\n  cleaned = cleaned.replace(\n    /import\\(\"([^\"]+)\"\\)\\.([^.\\s<>,\\[\\]]+)\\[\\]/g,\n    \"$2[]\"\n  )\n\n  return cleaned\n}\n\nfunction stripGenericParams(typeText) {\n  if (!typeText || typeof typeText !== \"string\") {\n    return typeText\n  }\n  // Strip <T>, <T extends Something>, <T, U>, etc. from type names\n  return typeText.replace(/<[^>]*>/, \"\")\n}\n\nfunction toCamelCase(typeName) {\n  if (!typeName) return typeName\n\n  // Convert PascalCase to camelCase (e.g., AccountProofData -> accountProofData)\n  return typeName.charAt(0).toLowerCase() + typeName.slice(1)\n}\n\nfunction escapeParameterNameForMDX(paramName) {\n  // Don't escape curly braces in parameter names as they are part of destructuring syntax\n  // and don't need to be escaped in code blocks in MDX\n  return paramName\n}\n\nfunction escapeTextForMDX(text) {\n  if (!text) return text\n\n  // Escape angle brackets to prevent MDX from interpreting TypeScript generics as HTML/JSX tags\n  // For example: \"Promise<Interaction>\" becomes \"Promise&lt;Interaction&gt;\"\n  return text.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\")\n}\n\nmodule.exports = {\n  cleanupTypeText,\n  toCamelCase,\n  escapeParameterNameForMDX,\n  escapeTextForMDX,\n  stripGenericParams,\n}\n"
  },
  {
    "path": "docs-generator/utils/typescript-formatter.js",
    "content": "function formatTypeScript(typeText) {\n  if (!typeText || typeof typeText !== \"string\") {\n    return typeText\n  }\n\n  let formatted = typeText\n    // Add newlines after semicolons in object types\n    .replace(/;\\s*/g, \";\\n  \")\n    // Add newlines after opening braces\n    .replace(/\\{\\s*/g, \"{\\n  \")\n    // Add newlines before closing braces\n    .replace(/\\s*\\}/g, \"\\n}\")\n    // Add proper spacing around colons\n    .replace(/\\s*:\\s*/g, \": \")\n    // Add proper spacing around arrows\n    .replace(/\\s*=>\\s*/g, \" => \")\n    // Add proper spacing around pipes\n    .replace(/\\s*\\|\\s*/g, \" | \")\n    // Add proper spacing around ampersands\n    .replace(/\\s*&\\s*/g, \" & \")\n\n  // Clean up excessive whitespace and newlines\n  formatted = formatted\n    .replace(/\\n\\s*\\n/g, \"\\n\")\n    .replace(/^\\s+|\\s+$/g, \"\")\n    .replace(/\\n\\s*;/g, \";\")\n\n  return formatted\n}\n\nmodule.exports = {\n  formatTypeScript,\n}\n"
  },
  {
    "path": "jest.config.js",
    "content": "module.exports = {\n  projects: [\"<rootDir>/packages/*\"],\n}\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"packages\": [\"packages/*\"],\n  \"version\": \"independent\"\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"workspaces\": [\n    \"./packages/*\"\n  ],\n  \"scripts\": {\n    \"build\": \"lerna run build\",\n    \"start\": \"npm run build && lerna run start --parallel\",\n    \"test\": \"jest\",\n    \"release\": \"npm run build && npm run changeset publish\",\n    \"changeset\": \"changeset\",\n    \"clear\": \"find . -name node_modules -type d -prune -exec rm -rf '{}' + && find . -name dist -type d -prune -exec rm -rf '{}' +\",\n    \"prettier:check\": \"prettier --check .\",\n    \"prettier\": \"prettier --write .\",\n    \"generate-all-docs\": \"node docs-generator/generate-all-docs.js\",\n    \"demo\": \"cd packages/demo && npm run dev:emulator\",\n    \"demo:testnet\": \"cd packages/demo && npm run dev:testnet\"\n  },\n  \"name\": \"fcl-js\",\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@changesets/changelog-github\": \"^0.4.8\",\n    \"@changesets/cli\": \"^2.27.9\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/node\": \"^18.19.57\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"handlebars\": \"^4.7.8\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"lerna\": \"^9.0.3\",\n    \"prettier\": \"^3.3.3\",\n    \"prettier-plugin-classnames\": \"^0.7.3\",\n    \"prettier-plugin-tailwindcss\": \"^0.6.8\",\n    \"ts-jest\": \"^29.2.5\",\n    \"ts-morph\": \"^21.0.1\",\n    \"typescript\": \"^5.6.3\"\n  },\n  \"optionalDependencies\": {\n    \"@nx/nx-darwin-arm64\": \"^17.3.2\",\n    \"@nx/nx-darwin-x64\": \"^17.3.2\",\n    \"@nx/nx-linux-x64-gnu\": \"^17.3.2\",\n    \"@nx/nx-win32-x64-msvc\": \"^17.3.2\"\n  },\n  \"dependencies\": {\n    \"@noble/hashes\": \"^1.7.1\"\n  }\n}\n"
  },
  {
    "path": "packages/config/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/config/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/config/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/config/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/config/CHANGELOG.md",
    "content": "# @onflow/config\n\n## 1.11.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.11.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.10.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.9.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.8.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.7.0\n\n### Minor Changes\n\n- [#2747](https://github.com/onflow/fcl-js/pull/2747) [`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65) Thanks [@jribbink](https://github.com/jribbink)! - Add support for fork networks (mainnet-fork, testnet-fork) to enable testing against forked emulator with automatic contract alias inheritance from parent networks. Fork networks allow developers to run their dapps and E2E tests against a local emulator that mirrors mainnet or testnet state, while supporting contract-specific overrides.\n\n## 1.6.3\n\n### Patch Changes\n\n- [#2698](https://github.com/onflow/fcl-js/pull/2698) [`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e) Thanks [@chasefleming](https://github.com/chasefleming)! - Add support for Cadence import aliasing\n\n## 1.6.2\n\n### Patch Changes\n\n- [#2683](https://github.com/onflow/fcl-js/pull/2683) [`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557) Thanks [@jribbink](https://github.com/jribbink)! - Ensure `getContracts` accumulates `flow.json` deployments across multiple accounts\n\n## 1.6.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/util-actor@1.3.5\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n\n## 1.6.0\n\n### Minor Changes\n\n- [#2594](https://github.com/onflow/fcl-js/pull/2594) [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8) Thanks [@jribbink](https://github.com/jribbink)! - Expose `getContracts` function\n\n## 1.6.0-alpha.0\n\n### Minor Changes\n\n- [#2594](https://github.com/onflow/fcl-js/pull/2594) [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8) Thanks [@jribbink](https://github.com/jribbink)! - Expose `getContracts` function\n\n## 1.5.2\n\n### Patch Changes\n\n- [#2327](https://github.com/onflow/fcl-js/pull/2327) [`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01) Thanks [@jribbink](https://github.com/jribbink)! - Fix deprecated `punycode` dependency warning\n\n## 1.5.1\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-logger@1.3.3\n  - @onflow/util-actor@1.3.4\n\n## 1.5.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/util-actor@1.3.4-alpha.0\n\n## 1.5.0\n\n### Minor Changes\n\n- [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f) Thanks [@nialexsan](https://github.com/nialexsan)! - Add `ignoreConflicts` flag to `config.load`\n\n## 1.5.0-alpha.0\n\n### Minor Changes\n\n- [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f) Thanks [@nialexsan](https://github.com/nialexsan)! - Add `ignoreConflicts` flag to `config.load`\n\n## 1.4.1\n\n### Patch Changes\n\n- Updated dependencies [[`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175)]:\n  - @onflow/util-actor@1.3.3\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1870](https://github.com/onflow/fcl-js/pull/1870) [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88) Thanks [@btspoony](https://github.com/btspoony)! - Add previewnet to config.load\n\n### Patch Changes\n\n- Updated dependencies [[`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f)]:\n  - @onflow/util-invariant@1.2.3\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1848](https://github.com/onflow/fcl-js/pull/1848) [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new dependencies field in flow.json\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/util-actor@1.3.2\n\n## 1.3.0-alpha.3\n\n### Minor Changes\n\n- [#1848](https://github.com/onflow/fcl-js/pull/1848) [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new dependencies field in flow.json\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/util-actor@1.3.2-alpha.2\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-logger@1.3.2-alpha.1\n  - @onflow/util-actor@1.3.2-alpha.1\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-actor@1.3.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-logger@1.3.1\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Add Typescript to @onflow/config\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-logger@1.3.0\n  - @onflow/util-actor@1.3.0\n\n## 1.1.2\n\n### Patch Changes\n\n- [#1771](https://github.com/onflow/fcl-js/pull/1771) [`5edbd823`](https://github.com/onflow/fcl-js/commit/5edbd823b1a6d25eb7bb52dc55338f95beae73b1) Thanks [@jribbink](https://github.com/jribbink)! - Fix @onflow/util-logger <-> @onflow/config circular dependency\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n- [#1699](https://github.com/onflow/fcl-js/pull/1699) [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6) Thanks [@chasefleming](https://github.com/chasefleming)! - Throw error in config if keys detected\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n- [#1699](https://github.com/onflow/fcl-js/pull/1699) [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6) Thanks [@chasefleming](https://github.com/chasefleming)! - Throw error in config if keys detected\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1481](https://github.com/onflow/fcl-js/pull/1481) [`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9) Thanks [@chasefleming](https://github.com/chasefleming)! - Remove need to manually add contract placeholders in config by ingesting flow.json with config.load\n\n- [#1511](https://github.com/onflow/fcl-js/pull/1511) [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c) Thanks [@justinbarry](https://github.com/justinbarry)! - Put contract addr in `system.contracts.*` namespace\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n- [#1511](https://github.com/onflow/fcl-js/pull/1511) [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25) Thanks [@justinbarry](https://github.com/justinbarry)! - Add support for `import \"ContractName\"` syntax in scripts and transactions.\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n- [#1570](https://github.com/onflow/fcl-js/pull/1570) [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for config package.\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1629](https://github.com/onflow/fcl-js/pull/1629) [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix key warning when key/file/location format is used in flow.json\n\n- [#1604](https://github.com/onflow/fcl-js/pull/1604) [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix config types when invoked as a function\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/util-actor@1.2.0\n\n## 1.1.0-alpha.8\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/util-actor@1.2.0-alpha.3\n\n## 1.1.0-alpha.7\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-actor@1.2.0-alpha.2\n\n## 1.1.0-alpha.6\n\n### Patch Changes\n\n- [#1629](https://github.com/onflow/fcl-js/pull/1629) [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix key warning when key/file/location format is used in flow.json\n\n- Updated dependencies [[`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e)]:\n  - @onflow/util-actor@1.2.0-alpha.1\n\n## 1.1.0-alpha.5\n\n### Patch Changes\n\n- [#1604](https://github.com/onflow/fcl-js/pull/1604) [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix config types when invoked as a function\n\n## 1.1.0-alpha.4\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/util-actor@1.2.0-alpha.0\n\n## 1.1.0-alpha.3\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1570](https://github.com/onflow/fcl-js/pull/1570) [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for config package.\n\n## 1.1.0-alpha.1\n\n### Minor Changes\n\n- [#1511](https://github.com/onflow/fcl-js/pull/1511) [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c) Thanks [@justinbarry](https://github.com/justinbarry)! - Put contract addr in `system.contracts.*` namespace\n\n- [#1511](https://github.com/onflow/fcl-js/pull/1511) [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25) Thanks [@justinbarry](https://github.com/justinbarry)! - Add support for `import \"ContractName\"` syntax in scripts and transactions.\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1481](https://github.com/onflow/fcl-js/pull/1481) [`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9) Thanks [@chasefleming](https://github.com/chasefleming)! - Remove need to manually add contract placeholders in config by ingesting flow.json with config.load\n\n## 1.0.5\n\n### Patch Changes\n\n- [#1443](https://github.com/onflow/fcl-js/pull/1443) [`7bdfa016`](https://github.com/onflow/fcl-js/commit/7bdfa016823d1caac23143351940b42f65d4d1c4) Thanks [@huyndo](https://github.com/huyndo)! - PKG - [config] Fix config overload prone to race condition\n\n## 1.0.4\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n- Updated dependencies [[`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0)]:\n  - @onflow/util-actor@1.1.2\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/util-actor@1.1.1\n\n## 1.0.3-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/util-actor@1.1.1-alpha.0\n\n## 1.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/util-actor@1.1.0\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/util-actor@1.1.0-alpha.0\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/util-actor@1.0.1\n\n## 1.0.0\n\n### Patch Changes\n\n- [#1124](https://github.com/onflow/fcl-js/pull/1124) [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a) Thanks [@chasefleming](https://github.com/chasefleming)! - Create config package\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n* Updated dependencies [[`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/util-actor@1.0.0\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/util-actor@1.0.0-alpha.2\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1124](https://github.com/onflow/fcl-js/pull/1124) [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a) Thanks [@chasefleming](https://github.com/chasefleming)! - Create config package\n\n- Updated dependencies [[`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60)]:\n  - @onflow/util-actor@1.0.0-alpha.1\n"
  },
  {
    "path": "packages/config/README.md",
    "content": "# @onflow/config\n\nReactive configuration for Flow JS SDK and FCL\n\n## Installation\n\n```bash\nnpm install @onflow/config\n```\n\n## Usage\n\n```javascript\nimport {config} from \"@onflow/sdk\"\n\n// Reactively subscribe to config changes\nconfig().subscribe(configData => console.log(\"CONFIG\", configData))\n\n// Set a config value\nconfig().put(\"foo\", \"bar\")\n\n// .put can be chained\nconfig()\n  .put(\"foo\", \"bar\")\n  .put(\"baz\", \"rawr\")\n\n// Get a config value (it's async)\nvar configValue = await config().get(\"woot\")\nconsole.log(configValue) // undefined\n\n// A fallback can be supplied for .get\nvar configValue = await config().get(\"woot\", \"fallback\")\nconsole.log(configValue) // \"fallback\"\n\nconfig.put(\"woot\", \"woot\")\nvar configValue = await config().get(\"woot\", \"fallback\")\nconsole.log(configValue) // \"woot\"\n\n// Update a config value\nconfig().put(\"count\", 1)\nvar count = await config().get(\"count\", 0)\nconsole.log(count) // 1\n\nconfig().update(\"count\", oldValue => oldValue + 1)\nvar count = await config().get(\"count\", 0)\nconsole.log(count) // 2\n\n// Delete a config value\nconfig().delete(\"woot\")\nvar configValue = await config().get(\"woot\", \"fallback\")\nconsole.log(configValue) // \"fallback\"\n\n// Configs that match a pattern\nconfig()\n  .put(\"scope.A\", 1)\n  .put(\"scope.B\", 1)\n\nvar scopeValues = await config().where(/^scope\\.\\s+/)\nconsole.log(scopeValues) // { \"scope.A\": 1, \"scope.B\": 2 }\n```\n\n## Loading flow.json\n\nBefore loading a `flow.json`, you must set the network:\n\n```javascript\nimport { config } from \"@onflow/config\"\n\n// Set network (required before loading flow.json)\nconfig().put(\"flow.network\", \"testnet\")\n\n// Load flow.json\nawait config().load({ flowJSON: require('./flow.json') })\n```\n\n## Import Aliases\n\nImport aliases allow you to deploy the same contract to multiple addresses with different names, enabling version management and multi-instance deployments.\n\n### flow.json Configuration\n\n```json\n{\n  \"contracts\": {\n    \"FUSD\": {\n      \"source\": \"./contracts/FUSD.cdc\",\n      \"aliases\": {\n        \"testnet\": \"0x9a0766d93b6608b7\"\n      }\n    },\n    \"FUSD1\": {\n      \"source\": \"./contracts/FUSD.cdc\",\n      \"aliases\": {\n        \"testnet\": \"0xe223d8a629e49c68\"\n      },\n      \"canonical\": \"FUSD\"\n    }\n  }\n}\n```\n\n### How It Works\n\nWhen `config.load(flowJSON)` is called:\n\n1. **Contract addresses are extracted** based on the current network\n2. **Canonical references are extracted** from the `canonical` field\n3. **Values are stored in config**:\n   ```typescript\n   system.contracts.FUSD = \"0x9a0766d93b6608b7\"\n   system.contracts.FUSD1 = \"0xe223d8a629e49c68\"\n   system.contracts.FUSD1.canonical = \"FUSD\"\n   ```\n\n### Import Resolution\n\nWhen resolving Cadence imports:\n\n- `import \"FUSD\"` → `import FUSD from 0x9a0766d93b6608b7` (no canonical)\n- `import \"FUSD1\"` → `import FUSD as FUSD1 from 0xe223d8a629e49c68` (with canonical)\n\nThe `canonical` field tells the resolver that `FUSD1` is an alias of the `FUSD` contract, so it generates the `import X as Y` syntax.\n\n### Use Cases\n\n**Multiple Versions:**\n```json\n{\n  \"contracts\": {\n    \"FungibleToken\": {\n      \"source\": \"./contracts/FungibleToken.cdc\",\n      \"aliases\": { \"testnet\": \"0xf233dcee88fe0abe\" }\n    },\n    \"FungibleTokenV2\": {\n      \"source\": \"./contracts/FungibleToken.cdc\",\n      \"aliases\": { \"testnet\": \"0x9a0766d93b6608b7\" },\n      \"canonical\": \"FungibleToken\"\n    }\n  }\n}\n```\n\n**Multiple Instances:**\n```json\n{\n  \"contracts\": {\n    \"Token1\": {\n      \"source\": \"./contracts/Token.cdc\",\n      \"aliases\": { \"testnet\": \"0x1111\" },\n      \"canonical\": \"Token\"\n    },\n    \"Token2\": {\n      \"source\": \"./contracts/Token.cdc\",\n      \"aliases\": { \"testnet\": \"0x2222\" },\n      \"canonical\": \"Token\"\n    }\n  }\n}\n```\n\n### Dependencies\n\nThe `canonical` field also works with dependencies:\n\n```json\n{\n  \"dependencies\": {\n    \"FungibleTokenV2\": {\n      \"source\": \"mainnet://f233dcee88fe0abe.FungibleToken\",\n      \"hash\": \"abc123...\",\n      \"aliases\": {\n        \"testnet\": \"0xf233dcee88fe0abe\"\n      },\n      \"canonical\": \"FungibleToken\"\n    }\n  }\n}\n```\n\n## Known Configuration Values\n\n### Access Node\n\n- `accessNode.api` _(default: emulator url)_ -- Where FCL will communicate with the Flow blockchain.\n- `accessNode.key` _(default: null)_ -- Some Access Nodes require an API key.\n\n```javascript\nimport {config} from \"@onflow/fcl\"\n\nif (process.env.NODE_ENV === \"production\") {\n  config()\n    .put(\"accessNode.api\", process.env.ACCESS_NODE_API)\n    .put(\"accessNode.key\", process.env.ACCESS_NODE_KEY)\n}\n```\n\n### Decode\n\n`decoder.*` -- Custom decoders for parsing JSON-CDC\n\n```javascript\nimport {config, query} from \"@onflow/fcl\"\n\nfunction Woot({x, y}) {\n  this.x = x\n  this.y = y\n}\n\nconfig()\n  .put(\"decoder.Woot\", woot => new Woot(woot))\n\nvar data = await fcl.query({\n  cadence: `\n    pub struct Woot {\n      pub var x: Int\n      pub var y: Int\n\n      init(x: Int, y: Int) {\n        self.x = x\n        self.y = y\n      }\n    }\n\n    pub fun main(): [Woot] {\n      return [Woot(x: 1, y: 2), Woot(x: 3, y: 4), Woot(x: 5, y: 6)]\n    }\n  `\n})\n\nconsole.log(data) // [ Woot{x:1, y:2}, Woot{x:3, y:4}, Woot{x:5, y:6} ]\n```\n\n### Wallets\n\n`wallet.discovery` _(default: FCL wallet discovery service url)_ -- Where FCL will attempt to authenticate\n\n```javascript\nimport {config} from \"@onflow/fcl\"\n\nif (process.env.NODE_ENV === \"development\") {\n  // Use dev wallet during development\n  config()\n    .put(\"discovery.wallet\", \"http://localhost:8701/flow/authenticate\")\n}\n```\n\n## API Reference\n\n### `config()`\n\nReturns the config instance.\n\n### `config().put(key, value)`\n\nSets a configuration value. Can be chained.\n\n### `config().get(key, fallback?)`\n\nGets a configuration value, optionally with a fallback. Returns a Promise.\n\n### `config().update(key, updateFn)`\n\nUpdates a configuration value using a function that receives the old value.\n\n### `config().load({ flowJSON })`\n\nLoads contract addresses and canonical references from a flow.json file.\n\n**Parameters:**\n- `flowJSON`: Flow JSON object or array of Flow JSON objects\n\n**Requirements:**\n- `flow.network` must be set before calling `load()`\n\n### `config().delete(key)`\n\nDeletes a configuration value.\n\n### `config().all()`\n\nReturns all configuration values as an object.\n\n### `config().where(pattern)`\n\nReturns configuration values matching a regex pattern.\n\n### `config().subscribe(callback)`\n\nSubscribes to configuration changes. Returns an unsubscribe function.\n\n## See Also\n\n- [Flow CLI Documentation](https://developers.flow.com/tools/flow-cli)\n- [Flow JavaScript SDK](https://developers.flow.com/tools/fcl-js)\n- [flow.json Configuration](https://developers.flow.com/tools/flow-cli/flow.json)\n"
  },
  {
    "path": "packages/config/package.json",
    "content": "{\n  \"name\": \"@onflow/config\",\n  \"version\": \"1.11.1\",\n  \"description\": \"Config for FCL-JS\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/estree\": \"^1.0.6\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/config.ts\",\n  \"main\": \"dist/config.js\",\n  \"module\": \"dist/config.module.js\",\n  \"unpkg\": \"dist/config.umd.js\",\n  \"types\": \"types/config.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint src\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/util-actor\": \"1.3.5\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\"\n  }\n}\n"
  },
  {
    "path": "packages/config/src/config.test.ts",
    "content": "import {config, clearConfig} from \"./config\"\n\nconst idle = () => new Promise(resolve => setTimeout(resolve, 0))\n\ndescribe(\"config()\", () => {\n  beforeEach(async () => {\n    clearConfig()\n  })\n\n  describe(\"crud methods\", () => {\n    beforeEach(async () => {\n      config({\n        \"config.test.init\": \"rawr\",\n      })\n\n      config()\n        .put(\"config.test.t\", \"t\")\n        .put(\"config.test.z\", \"z\")\n        .put(\"config.test.foo.bar\", \"bar\")\n        .put(\"config.test.foo.baz\", \"baz\")\n        .put(\"config.test.wat.bar\", \"foo\")\n    })\n\n    test(\"get\", async () => {\n      expect(await config().get(\"config.test.foo.bar\")).toBe(\"bar\")\n      expect(await config().get(\"config.test.init\")).toBe(\"rawr\")\n    })\n\n    test(\"get with fallback\", async () => {\n      expect(await config().get(\"config.test.not.a.thing\", \"fallback\")).toBe(\n        \"fallback\"\n      )\n    })\n\n    test(\"update\", async () => {\n      config().update(\"config.test.t\", (v: number) => v + v)\n      expect(await config().get(\"config.test.t\")).toBe(\"tt\")\n    })\n\n    test(\"delete\", async () => {\n      config().delete(\"config.test.z\")\n      expect(await config().get(\"config.test.z\")).toBe(undefined)\n    })\n\n    test(\"where\", async () => {\n      expect(await config().where(/^config.test.foo/)).toEqual({\n        \"config.test.foo.bar\": \"bar\",\n        \"config.test.foo.baz\": \"baz\",\n      })\n    })\n\n    test(\"subscribe\", async () => {\n      const fn1 = jest.fn()\n      const unsub = config().subscribe(fn1)\n      await idle()\n\n      config().put(\"config.test.y\", \"y\").put(\"config.test.x\", \"x\")\n\n      await idle()\n      unsub()\n      await idle()\n\n      config().update(\"config.test.y\", (v: number) => v + v)\n\n      await idle()\n\n      expect(fn1).toHaveBeenCalledTimes(3)\n    })\n\n    test(\"all\", async () => {\n      expect(await config().all()).toEqual({\n        \"config.test.foo.bar\": \"bar\",\n        \"config.test.foo.baz\": \"baz\",\n        \"config.test.init\": \"rawr\",\n        \"config.test.t\": \"t\",\n        \"config.test.wat.bar\": \"foo\",\n        \"config.test.z\": \"z\",\n      })\n    })\n  })\n\n  test(\"empty\", async () => {\n    clearConfig()\n    await idle()\n    expect(await config().all()).toEqual({})\n  })\n\n  describe(\"sans ()\", () => {\n    test(\"config(data)\", async () => {\n      const data = {\n        foo: \"bar\",\n        baz: \"buz\",\n      }\n\n      config(data)\n\n      expect(await config.all()).toEqual(data)\n    })\n\n    test(\"config.put config.get\", async () => {\n      config.put(\"foo\", \"bar\")\n      expect(await config.get(\"foo\")).toBe(\"bar\")\n    })\n  })\n\n  describe(\"overload\", () => {\n    test(\"overload\", async () => {\n      const PRE = {\n        yes: \"yes\",\n        foo: \"bar\",\n        bar: \"baz\",\n      }\n\n      const POST = {\n        foo: \"bar!!\",\n        bar: \"baz!!\",\n        omg: \"omg!!\",\n      }\n\n      config(PRE)\n      expect(await config.all()).toEqual(PRE)\n      const ret = await config.overload(POST, async () => {\n        expect(await config.all()).toEqual({...PRE, ...POST})\n        return \"WOOT WOOT\"\n      })\n      expect(ret).toBe(\"WOOT WOOT\")\n      expect(await config.all()).toEqual(PRE)\n    })\n  })\n\n  describe(\"first\", () => {\n    const A = \"A\",\n      B = null,\n      C = 0,\n      D = {}\n    const FALLBACK = \"FALLBACK\"\n\n    beforeEach(() => config({A: A, B: B, C: C, D: D}))\n    afterEach(clearConfig)\n\n    const examples: ([any, string[]] | [any])[] = [\n      [FALLBACK],\n      [A, [\"A\"]],\n      [FALLBACK, [\"B\"]],\n      [C, [\"C\"]],\n      [D, [\"D\"]],\n      [A, [\"MISSING\", \"A\"]],\n      [FALLBACK, [\"MISSING\", \"B\"]],\n    ]\n\n    for (const [i, [want, from]] of examples.entries()) {\n      test(`Example ${i}: ${from} -> ${want}`, async () => {\n        expect(await config.first(from, FALLBACK)).toBe(want)\n      })\n    }\n  })\n\n  describe(\"load method\", () => {\n    describe(\"with a set network\", () => {\n      beforeEach(() => {\n        // Just picked a random network. Behavior might differ based on network selection at a future date.\n        config().put(\"flow.network\", \"emulator\")\n      })\n\n      describe(\"flow.json v1\", () => {\n        let flowJSON\n\n        describe(\"without aliases\", () => {\n          beforeEach(async () => {\n            flowJSON = {\n              accounts: {\n                \"emulator-account\": {\n                  fromFile: \"./emulator.private.json\",\n                },\n              },\n              contracts: {\n                HelloWorld: {\n                  source: \"./cadence/contracts/HelloWorld.cdc\",\n                  aliases: {\n                    emulator: \"0x1\",\n                    testnet: \"0x01\",\n                    mainnet: \"0x001\",\n                  },\n                },\n                SecondLife: {\n                  aliases: {\n                    testnet: \"0x02\",\n                    mainnet: \"0x002\",\n                  },\n                },\n              },\n              deployments: {\n                emulator: {\n                  \"emulator-account\": [\"HelloWorld\"],\n                },\n              },\n              networks: {\n                emulator: \"127.0.0.1:3569\",\n              },\n            }\n          })\n\n          describe(\"with single config loaded\", () => {\n            beforeEach(async () => {\n              await config().load({flowJSON})\n              await idle()\n            })\n\n            test(\"should load the contract location wrt the currently set network\", async () => {\n              await expect(config().get(\"0xHelloWorld\")).resolves.toBe(\"0x1\")\n              await expect(\n                config().get(\"system.contracts.HelloWorld\")\n              ).resolves.toBe(\"0x1\")\n            })\n\n            test(\"should not set a contract if it does not have an alias\", async () => {\n              await expect(\n                config().get(\"0xSecondLife\")\n              ).resolves.toBeUndefined()\n              await expect(\n                config().get(\"system.contracts.SecondLife\")\n              ).resolves.toBeUndefined()\n            })\n          })\n\n          describe(\"with an array of configs loaded\", () => {\n            beforeEach(async () => {\n              const secondFlowJSON = {\n                accounts: {},\n                contracts: {\n                  ThirdContract: {\n                    aliases: {\n                      emulator: \"0x3\",\n                      testnet: \"0x03\",\n                      mainnet: \"0x003\",\n                    },\n                  },\n                },\n                deployments: {},\n                networks: {},\n              }\n\n              await config().load({flowJSON: [flowJSON, secondFlowJSON]})\n              await idle()\n            })\n\n            test(\"should load the contract locations from the secondFlowJSON\", async () => {\n              await expect(config().get(\"0xThirdContract\")).resolves.toBe(\"0x3\")\n              await expect(\n                config().get(\"system.contracts.ThirdContract\")\n              ).resolves.toBe(\"0x3\")\n            })\n          })\n        })\n        describe(\"without contract aliases\", () => {\n          beforeEach(async () => {\n            flowJSON = {\n              networks: {\n                emulator: \"127.0.0.1:3569\",\n              },\n              accounts: {\n                default: {\n                  address: \"f8d6e0586b0a20c7\",\n                  key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n                },\n              },\n              contracts: {\n                HelloWorld: \"./cadence/contracts/HelloWorld.cdc\",\n              },\n              deployments: {\n                emulator: {\n                  default: [\"HelloWorld\"],\n                },\n              },\n            }\n            await config().load({flowJSON})\n            await idle()\n          })\n\n          test(\"should resolve to the default address through the deployment link\", async () => {\n            await expect(config().get(\"0xHelloWorld\")).resolves.toBe(\n              \"f8d6e0586b0a20c7\"\n            )\n            await expect(\n              config().get(\"system.contracts.HelloWorld\")\n            ).resolves.toBe(\"f8d6e0586b0a20c7\")\n          })\n        })\n\n        describe(\"with both contract aliases and deployments\", () => {\n          beforeEach(async () => {\n            flowJSON = {\n              networks: {\n                emulator: \"127.0.0.1:3569\",\n              },\n              accounts: {\n                default: {\n                  address: \"f8d6e0586b0a20c7\",\n                  key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n                },\n              },\n              contracts: {\n                HelloWorld: {\n                  source: \"./cadence/contracts/HelloWorld.cdc\",\n                  aliases: {\n                    emulator: \"0x1\",\n                  },\n                },\n              },\n              deployments: {\n                emulator: {\n                  default: [\"HelloWorld\"],\n                },\n              },\n            }\n            await config().load({flowJSON})\n            await idle()\n          })\n\n          test(\"should return the alias, not the deployment address\", async () => {\n            await expect(config().get(\"0xHelloWorld\")).resolves.toBe(\"0x1\")\n            await expect(\n              config().get(\"system.contracts.HelloWorld\")\n            ).resolves.toBe(\"0x1\")\n          })\n        })\n\n        describe(\"with dependencies aliases\", () => {\n          beforeEach(async () => {\n            flowJSON = {\n              networks: {\n                emulator: \"127.0.0.1:3569\",\n              },\n              accounts: {\n                default: {\n                  address: \"f8d6e0586b0a20c7\",\n                  key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n                },\n              },\n              dependencies: {\n                FlowToken: {\n                  source: \"mainnet://1654653399040a61.FlowToken\",\n                  hash: \"7e2bb5acf84ddcd8ad4a9ddb1e3595c8148ac0a711551e27aa7231db51b2d7ce\",\n                  aliases: {\n                    emulator: \"0x1\",\n                    mainnet: \"1654653399040a61\",\n                    testnet: \"7e60df042a9c0868\",\n                  },\n                },\n              },\n            }\n            await config().load({flowJSON})\n            await idle()\n          })\n\n          test(\"should return the alias\", async () => {\n            await expect(config().get(\"0xFlowToken\")).resolves.toBe(\"0x1\")\n            await expect(\n              config().get(\"system.contracts.FlowToken\")\n            ).resolves.toBe(\"0x1\")\n          })\n        })\n\n        describe(\"with dependencies aliases and contract aliases\", () => {\n          beforeEach(async () => {\n            flowJSON = {\n              networks: {\n                emulator: \"127.0.0.1:3569\",\n              },\n              accounts: {\n                default: {\n                  address: \"f8d6e0586b0a20c7\",\n                  key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n                },\n              },\n              contracts: {\n                FlowToken: {\n                  source: \"./cadence/contracts/FlowToken.cdc\",\n                  aliases: {\n                    emulator: \"0x1\",\n                  },\n                },\n              },\n              dependencies: {\n                FlowToken: {\n                  source: \"mainnet://1654653399040a61.FlowToken\",\n                  hash: \"7e2bb5acf84ddcd8ad4a9ddb1e3595c8148ac0a711551e27aa7231db51b2d7ce\",\n                  aliases: {\n                    emulator: \"0x2\",\n                    mainnet: \"1654653399040a61\",\n                    testnet: \"7e60df042a9c0868\",\n                  },\n                },\n              },\n            }\n            await config().load({flowJSON})\n            await idle()\n          })\n\n          test(\"should return the dependencies alias, not the contract alias\", async () => {\n            await expect(config().get(\"0xFlowToken\")).resolves.toBe(\"0x2\")\n            await expect(\n              config().get(\"system.contracts.FlowToken\")\n            ).resolves.toBe(\"0x2\")\n          })\n        })\n\n        describe(\"with canonical field\", () => {\n          describe(\"contract with canonical\", () => {\n            beforeEach(async () => {\n              flowJSON = {\n                networks: {\n                  emulator: \"127.0.0.1:3569\",\n                },\n                contracts: {\n                  FUSD1: {\n                    source: \"./contracts/FUSD.cdc\",\n                    aliases: {\n                      emulator: \"0xe223d8a629e49c68\",\n                    },\n                    canonical: \"FUSD\",\n                  },\n                },\n              }\n              await config().load({flowJSON})\n              await idle()\n            })\n\n            test(\"should set contract address\", async () => {\n              await expect(\n                config().get(\"system.contracts.FUSD1\")\n              ).resolves.toBe(\"0xe223d8a629e49c68\")\n              await expect(config().get(\"0xFUSD1\")).resolves.toBe(\n                \"0xe223d8a629e49c68\"\n              )\n            })\n\n            test(\"should set canonical reference\", async () => {\n              await expect(\n                config().get(\"system.contracts.FUSD1.canonical\")\n              ).resolves.toBe(\"FUSD\")\n            })\n          })\n\n          describe(\"multiple contracts with same canonical\", () => {\n            beforeEach(async () => {\n              flowJSON = {\n                networks: {\n                  emulator: \"127.0.0.1:3569\",\n                },\n                contracts: {\n                  FUSD1: {\n                    source: \"./contracts/FUSD.cdc\",\n                    aliases: {\n                      emulator: \"0xe223d8a629e49c68\",\n                    },\n                    canonical: \"FUSD\",\n                  },\n                  FUSD2: {\n                    source: \"./contracts/FUSD.cdc\",\n                    aliases: {\n                      emulator: \"0x0f9df91c9121c460\",\n                    },\n                    canonical: \"FUSD\",\n                  },\n                },\n              }\n              await config().load({flowJSON})\n              await idle()\n            })\n\n            test(\"should set both contract addresses\", async () => {\n              await expect(\n                config().get(\"system.contracts.FUSD1\")\n              ).resolves.toBe(\"0xe223d8a629e49c68\")\n              await expect(\n                config().get(\"system.contracts.FUSD2\")\n              ).resolves.toBe(\"0x0f9df91c9121c460\")\n            })\n\n            test(\"should set both canonical references\", async () => {\n              await expect(\n                config().get(\"system.contracts.FUSD1.canonical\")\n              ).resolves.toBe(\"FUSD\")\n              await expect(\n                config().get(\"system.contracts.FUSD2.canonical\")\n              ).resolves.toBe(\"FUSD\")\n            })\n          })\n\n          describe(\"contract without canonical field\", () => {\n            beforeEach(async () => {\n              flowJSON = {\n                networks: {\n                  emulator: \"127.0.0.1:3569\",\n                },\n                contracts: {\n                  RegularContract: {\n                    source: \"./contracts/Regular.cdc\",\n                    aliases: {\n                      emulator: \"0x123456\",\n                    },\n                  },\n                },\n              }\n              await config().load({flowJSON})\n              await idle()\n            })\n\n            test(\"should set contract address\", async () => {\n              await expect(\n                config().get(\"system.contracts.RegularContract\")\n              ).resolves.toBe(\"0x123456\")\n            })\n\n            test(\"should not set canonical reference\", async () => {\n              await expect(\n                config().get(\"system.contracts.RegularContract.canonical\")\n              ).resolves.toBeUndefined()\n            })\n          })\n\n          describe(\"dependency with canonical field\", () => {\n            beforeEach(async () => {\n              flowJSON = {\n                networks: {\n                  emulator: \"127.0.0.1:3569\",\n                },\n                dependencies: {\n                  FungibleTokenV2: {\n                    source: \"mainnet://f233dcee88fe0abe.FungibleToken\",\n                    hash: \"abc123\",\n                    aliases: {\n                      emulator: \"0xf233dcee88fe0abe\",\n                    },\n                    canonical: \"FungibleToken\",\n                  },\n                },\n              }\n              await config().load({flowJSON})\n              await idle()\n            })\n\n            test(\"should set dependency address\", async () => {\n              await expect(\n                config().get(\"system.contracts.FungibleTokenV2\")\n              ).resolves.toBe(\"0xf233dcee88fe0abe\")\n            })\n\n            test(\"should set canonical reference\", async () => {\n              await expect(\n                config().get(\"system.contracts.FungibleTokenV2.canonical\")\n              ).resolves.toBe(\"FungibleToken\")\n            })\n          })\n        })\n      })\n    })\n  })\n\n  describe(\"without a network set\", () => {\n    test(\"should throw an error\", async () => {\n      await expect(() => config().load({flowJSON: {}})).rejects.toThrowError()\n    })\n  })\n})\n"
  },
  {
    "path": "packages/config/src/config.ts",
    "content": "import {\n  spawn,\n  send,\n  subscriber,\n  SUBSCRIBE,\n  UNSUBSCRIBE,\n  ActorHandlers,\n} from \"@onflow/util-actor\"\nimport * as logger from \"@onflow/util-logger\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {getContracts, cleanNetwork, anyHasPrivateKeys} from \"./utils/utils\"\n\n// Inject config into logger to break circular dependency\nlogger.setConfig(config)\n\nconst NAME = \"config\"\nconst PUT = \"PUT_CONFIG\"\nconst GET = \"GET_CONFIG\"\nconst GET_ALL = \"GET_ALL_CONFIG\"\nconst UPDATE = \"UPDATE_CONFIG\"\nconst DELETE = \"DELETE_CONFIG\"\nconst CLEAR = \"CLEAR_CONFIG\"\nconst WHERE = \"WHERE_CONFIG\"\nconst UPDATED = \"CONFIG/UPDATED\"\n\nconst identity = <T>(v: T) => v\n\nconst HANDLERS: ActorHandlers = {\n  [PUT]: (ctx, _letter, {key, value}) => {\n    if (key == null) throw new Error(\"Missing 'key' for config/put.\")\n    ctx.put(key, value)\n    ctx.broadcast(UPDATED, {...ctx.all()})\n  },\n  [GET]: (ctx, letter, {key, fallback}) => {\n    if (key == null) throw new Error(\"Missing 'key' for config/get\")\n    letter.reply(ctx.get(key, fallback))\n  },\n  [GET_ALL]: (ctx, letter) => {\n    letter.reply({...ctx.all()})\n  },\n  [UPDATE]: (ctx, letter, {key, fn}) => {\n    if (key == null) throw new Error(\"Missing 'key' for config/update\")\n    ctx.update(key, fn || identity)\n    ctx.broadcast(UPDATED, {...ctx.all()})\n  },\n  [DELETE]: (ctx, letter, {key}) => {\n    if (key == null) throw new Error(\"Missing 'key' for config/delete\")\n    ctx.delete(key)\n    ctx.broadcast(UPDATED, {...ctx.all()})\n  },\n  [CLEAR]: ctx => {\n    const keys = Object.keys(ctx.all())\n    for (const key of keys) ctx.delete(key)\n    ctx.broadcast(UPDATED, {...ctx.all()})\n  },\n  [WHERE]: (ctx, letter, {pattern}) => {\n    if (pattern == null) throw new Error(\"Missing 'pattern' for config/where\")\n    letter.reply(ctx.where(pattern))\n  },\n  [SUBSCRIBE]: (ctx, letter) => {\n    ctx.subscribe(letter.from)\n    ctx.send(letter.from, UPDATED, {...ctx.all()})\n  },\n  [UNSUBSCRIBE]: (ctx, letter) => {\n    ctx.unsubscribe(letter.from)\n  },\n}\n\nspawn(HANDLERS, NAME)\n\n/**\n * @description Adds a key-value pair to the config\n * @param key - The key to add\n * @param value - The value to add\n * @returns The config object\n */\nfunction put<T>(key: string, value: T) {\n  send(NAME, PUT, {key, value})\n  return config()\n}\n\n/**\n * @description Gets a key-value pair with a fallback from the config\n * @param key - The key to add\n * @param fallback - The fallback value to return if key is not found\n * @returns The value found at key or fallback\n */\nfunction get<T>(key: string, fallback?: T): Promise<T> {\n  return send(NAME, GET, {key, fallback}, {expectReply: true, timeout: 10})\n}\n\n/**\n * @description Returns the first non null config value or the fallback\n * @param wants - The keys to search for\n * @param fallback - The fallback value to return if key is not found\n * @returns The value found at key or fallback\n */\nasync function first<T>(wants: string[] = [], fallback: T): Promise<T> {\n  if (!wants.length) return fallback\n  const [head, ...rest] = wants\n  const ret = await get<T>(head)\n  if (ret == null) return first(rest, fallback)\n  return ret\n}\n\n/**\n * @description Returns the current config\n * @returns The config object\n */\nfunction all(): Promise<Record<string, unknown>> {\n  return send(NAME, GET_ALL, null, {expectReply: true, timeout: 10})\n}\n\n/**\n * @description Updates a key-value pair in the config\n * @param key - The key to update\n * @param fn - The function to update the value with\n * @returns The config object\n */\nfunction update<T>(key: string, fn: (x: T) => T = identity) {\n  send(NAME, UPDATE, {key, fn})\n  return config()\n}\n\n/**\n * @description Deletes a key-value pair from the config\n * @param key - The key to delete\n * @returns The config object\n */\nfunction _delete(key: string) {\n  send(NAME, DELETE, {key})\n  return config()\n}\n\n/**\n * @description Returns a subset of the config based on a pattern\n * @param pattern - The pattern to match keys against\n * @returns The subset of the config\n */\nfunction where(pattern: RegExp): Promise<Record<string, unknown>> {\n  return send(NAME, WHERE, {pattern}, {expectReply: true, timeout: 10})\n}\n\n/**\n * @description Subscribes to config updates\n * @param callback - The callback to call when config is updated\n * @returns The unsubscribe function\n */\nfunction subscribe(\n  callback: (\n    config: Record<string, unknown> | null,\n    error: Error | null\n  ) => void\n): () => void {\n  return subscriber(NAME, () => spawn(HANDLERS, NAME), callback)\n}\n\n/**\n * @description Clears the config\n */\nexport async function clearConfig(): Promise<void> {\n  await send(NAME, CLEAR)\n}\n\n/**\n * @description Resets the config to a previous state\n * @param oldConfig - The previous config state\n * @returns The config object\n */\nasync function resetConfig(oldConfig: Record<string, unknown>) {\n  return clearConfig().then(() => config(oldConfig))\n}\n\n/**\n * @description Takes in flow.json or array of flow.json files and creates contract placeholders\n * @param data - The data to load\n * @param data.flowJSON - The flow.json or array of flow.json files\n * @param options - override flag\n * @param options.ignoreConflicts - ignore conflicts and override config\n */\nasync function load(\n  data: {\n    flowJSON: Record<string, unknown> | Record<string, unknown>[]\n  },\n  {\n    ignoreConflicts = false,\n  }: {\n    ignoreConflicts?: boolean\n  } = {}\n) {\n  const network: string = await get(\"flow.network\")\n  const cleanedNetwork = cleanNetwork(network)\n  const {flowJSON} = data\n\n  invariant(Boolean(flowJSON), \"config.load -- 'flowJSON' must be defined\")\n\n  invariant(\n    !!cleanedNetwork,\n    `Flow Network Required -- In order for FCL to load your contracts please define \"flow.network\" to \"emulator\", \"local\", \"testnet\", or \"mainnet\" in your config. See more here: https://developers.flow.com/tools/fcl-js/reference/configure-fcl`\n  )\n\n  if (anyHasPrivateKeys(flowJSON)) {\n    const isEmulator = cleanedNetwork === \"emulator\"\n\n    logger.log({\n      title: \"Private Keys Detected\",\n      message: `Private keys should be stored in a separate flow.json file for security. See more here: https://developers.flow.com/tools/flow-cli/security`,\n      level: isEmulator ? logger.LEVELS.warn : logger.LEVELS.error,\n    })\n\n    invariant(\n      isEmulator,\n      `Private keys should be stored in a separate flow.json file for security. See more here: https://developers.flow.com/tools/flow-cli/security`\n    )\n  }\n\n  for (const [key, value] of Object.entries(\n    getContracts(flowJSON, cleanedNetwork)\n  )) {\n    const contractConfigKey = `0x${key}`\n    const existingContractConfigKey = await get(contractConfigKey)\n    if (\n      existingContractConfigKey &&\n      existingContractConfigKey !== value &&\n      !ignoreConflicts\n    ) {\n      logger.log({\n        title: \"Contract Placeholder Conflict Detected\",\n        message: `A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.`,\n        level: logger.LEVELS.warn,\n      })\n    } else {\n      put(contractConfigKey, value)\n    }\n\n    const systemContractConfigKey = `system.contracts.${key}`\n    const systemExistingContractConfigKeyValue = await get(\n      systemContractConfigKey\n    )\n    if (\n      systemExistingContractConfigKeyValue &&\n      systemExistingContractConfigKeyValue !== value &&\n      !ignoreConflicts\n    ) {\n      logger.log({\n        title: \"Contract Placeholder Conflict Detected\",\n        message: `A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.`,\n        level: logger.LEVELS.warn,\n      })\n    } else {\n      put(systemContractConfigKey, value)\n    }\n  }\n}\n\n/**\n * @description Sets the config\n * @param values - The values to set\n * @returns The config object\n */\nfunction config(values?: Record<string, unknown>) {\n  if (values != null && typeof values === \"object\") {\n    Object.keys(values).map(d => put(d, values[d]))\n  }\n\n  return {\n    put,\n    get,\n    all,\n    first,\n    update,\n    delete: _delete,\n    where,\n    subscribe,\n    overload,\n    load,\n  }\n}\n\nconfig.put = put\nconfig.get = get\nconfig.all = all\nconfig.first = first\nconfig.update = update\nconfig.delete = _delete\nconfig.where = where\nconfig.subscribe = subscribe\nconfig.overload = overload\nconfig.load = load\n\nexport {config}\nexport {getContracts} from \"./utils/utils\"\n\n/**\n * @description Temporarily overloads the config with the given values and calls the callback\n * @param values - The values to overload the config with\n * @param callback - The callback to call with the overloaded config\n * @returns The result of the callback\n */\nasync function overload<T>(\n  values: Record<string, unknown>,\n  callback: (oldConfig: Record<string, unknown>) => T\n) {\n  const oldConfig = await all()\n  try {\n    config(values)\n    const result = await callback(await all())\n    return result\n  } finally {\n    await resetConfig(oldConfig)\n  }\n}\n"
  },
  {
    "path": "packages/config/src/utils/utils.test.ts",
    "content": "import {getContracts, anyHasPrivateKeys, FlowJson} from \"./utils\"\n\ndescribe(\"getContracts\", () => {\n  test(\"it should gather contract aliases for flow.json\", () => {\n    const flowJSON: FlowJson = {\n      networks: {\n        emulator: \"127.0.0.1:3569\",\n        mainnet: \"access.mainnet.nodes.onflow.org:9000\",\n        testnet: \"access.devnet.nodes.onflow.org:9000\",\n      },\n      contracts: {\n        HelloWorld: {\n          source: \"./cadence/contracts/HelloWorld.cdc\",\n          aliases: {\n            emulator: \"0x123\",\n            testnet: \"0x124\",\n            mainnet: \"0x125\",\n          },\n        },\n        FooBar: {\n          source: \"./cadence/contracts/FooBar.cdc\",\n          aliases: {\n            emulator: \"0x223\",\n            testnet: \"0x224\",\n            mainnet: \"0x225\",\n          },\n        },\n      },\n      dependencies: {\n        FungibleToken: {\n          source: \"emulator://123.FungibleToken\",\n          hash: \"123\",\n          aliases: {\n            emulator: \"0x333\",\n            testnet: \"0x222\",\n            mainnet: \"0x111\",\n          },\n        },\n      },\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n        },\n      },\n      deployments: {\n        emulator: {\n          \"emulator-account\": [\"HelloWorld\"],\n        },\n      },\n    }\n\n    const emulatorMappings = {\n      HelloWorld: \"0x123\",\n      FooBar: \"0x223\",\n      FungibleToken: \"0x333\",\n    }\n\n    const testnetMappings = {\n      HelloWorld: \"0x124\",\n      FooBar: \"0x224\",\n      FungibleToken: \"0x222\",\n    }\n\n    const mainnetMappings = {\n      HelloWorld: \"0x125\",\n      FooBar: \"0x225\",\n      FungibleToken: \"0x111\",\n    }\n\n    expect(getContracts(flowJSON, \"emulator\")).toEqual(emulatorMappings)\n    expect(getContracts(flowJSON, \"testnet\")).toEqual(testnetMappings)\n    expect(getContracts(flowJSON, \"mainnet\")).toEqual(mainnetMappings)\n\n    // Also takes array\n    expect(getContracts([flowJSON], \"emulator\")).toEqual(emulatorMappings)\n    expect(getContracts([flowJSON], \"testnet\")).toEqual(testnetMappings)\n    expect(getContracts([flowJSON], \"mainnet\")).toEqual(mainnetMappings)\n  })\n\n  test(\"it should handle multiple contracts in deployments section\", () => {\n    const flowJSON: FlowJson = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n        },\n        \"testnet-account\": {\n          address: \"a470920a30c770a5\",\n        },\n      },\n      deployments: {\n        emulator: {\n          \"emulator-account\": [\"ContractA\", \"ContractB\", \"ContractC\"],\n        },\n        testnet: {\n          \"testnet-account\": [\"ContractA\", \"ContractB\"],\n        },\n      },\n    }\n\n    const emulatorMappings = {\n      ContractA: \"f8d6e0586b0a20c7\",\n      ContractB: \"f8d6e0586b0a20c7\",\n      ContractC: \"f8d6e0586b0a20c7\",\n    }\n\n    const testnetMappings = {\n      ContractA: \"a470920a30c770a5\",\n      ContractB: \"a470920a30c770a5\",\n    }\n\n    expect(getContracts(flowJSON, \"emulator\")).toEqual(emulatorMappings)\n    expect(getContracts(flowJSON, \"testnet\")).toEqual(testnetMappings)\n  })\n\n  test(\"it should merge deployments with contract aliases\", () => {\n    const flowJSON: FlowJson = {\n      contracts: {\n        HelloWorld: {\n          source: \"./cadence/contracts/HelloWorld.cdc\",\n          aliases: {\n            emulator: \"0x123\",\n          },\n        },\n      },\n      accounts: {\n        \"emulator-account\": {\n          address: \"0xf8d6e0586b0a20c7\",\n        },\n      },\n      deployments: {\n        emulator: {\n          \"emulator-account\": [\"DeployedContract\"],\n        },\n      },\n    }\n\n    const emulatorMappings = {\n      HelloWorld: \"0x123\",\n      DeployedContract: \"0xf8d6e0586b0a20c7\",\n    }\n\n    expect(getContracts(flowJSON, \"emulator\")).toEqual(emulatorMappings)\n  })\n\n  test(\"it should handle multiple accounts with multiple contracts each\", () => {\n    const flowJSON: FlowJson = {\n      accounts: {\n        \"account-1\": {\n          address: \"0x01\",\n        },\n        \"account-2\": {\n          address: \"0x02\",\n        },\n      },\n      deployments: {\n        emulator: {\n          \"account-1\": [\"Contract1A\", \"Contract1B\"],\n          \"account-2\": [\"Contract2A\", \"Contract2B\"],\n        },\n      },\n    }\n\n    const emulatorMappings = {\n      Contract1A: \"0x01\",\n      Contract1B: \"0x01\",\n      Contract2A: \"0x02\",\n      Contract2B: \"0x02\",\n    }\n\n    expect(getContracts(flowJSON, \"emulator\")).toEqual(emulatorMappings)\n  })\n\n  test(\"it should handle fork networks that inherit from parent network\", () => {\n    const flowJSON: FlowJson = {\n      networks: {\n        emulator: \"127.0.0.1:3569\",\n        mainnet: \"access.mainnet.nodes.onflow.org:9000\",\n        \"mainnet-fork\": {\n          host: \"127.0.0.1:3569\",\n          fork: \"mainnet\",\n        },\n      },\n      contracts: {\n        FlowToken: {\n          source: \"./contracts/FlowToken.cdc\",\n          aliases: {\n            emulator: \"0x0ae53cb6e3f42a79\",\n            mainnet: \"0x1654653399040a61\",\n          },\n        },\n        FungibleToken: {\n          source: \"./contracts/FungibleToken.cdc\",\n          aliases: {\n            emulator: \"0xee82856bf20e2aa6\",\n            mainnet: \"0xf233dcee88fe0abe\",\n          },\n        },\n      },\n    }\n\n    // Fork network should inherit mainnet aliases\n    const mainnetForkMappings = {\n      FlowToken: \"0x1654653399040a61\",\n      FungibleToken: \"0xf233dcee88fe0abe\",\n    }\n\n    expect(getContracts(flowJSON, \"mainnet-fork\")).toEqual(mainnetForkMappings)\n\n    // Regular mainnet should still work\n    expect(getContracts(flowJSON, \"mainnet\")).toEqual(mainnetForkMappings)\n  })\n\n  test(\"it should handle testnet fork networks\", () => {\n    const flowJSON: FlowJson = {\n      networks: {\n        testnet: \"access.devnet.nodes.onflow.org:9000\",\n        \"testnet-fork\": {\n          host: \"127.0.0.1:3569\",\n          fork: \"testnet\",\n        },\n      },\n      dependencies: {\n        USDC: {\n          source: \"testnet://a983fecbed621163.USDC\",\n          hash: \"abc123\",\n          aliases: {\n            testnet: \"0xa983fecbed621163\",\n          },\n        },\n      },\n    }\n\n    const testnetForkMappings = {\n      USDC: \"0xa983fecbed621163\",\n    }\n\n    expect(getContracts(flowJSON, \"testnet-fork\")).toEqual(testnetForkMappings)\n  })\n\n  test(\"it should handle fork networks with explicit deployments\", () => {\n    const flowJSON: FlowJson = {\n      networks: {\n        mainnet: \"access.mainnet.nodes.onflow.org:9000\",\n        \"mainnet-fork\": {\n          host: \"127.0.0.1:3569\",\n          fork: \"mainnet\",\n        },\n      },\n      contracts: {\n        FlowToken: {\n          source: \"./contracts/FlowToken.cdc\",\n          aliases: {\n            mainnet: \"0x1654653399040a61\",\n          },\n        },\n      },\n      accounts: {\n        \"flow-token-mainnet\": {\n          address: \"0x1654653399040a61\",\n        },\n      },\n      deployments: {\n        \"mainnet-fork\": {\n          \"flow-token-mainnet\": [\"FlowToken\"],\n        },\n      },\n    }\n\n    // Deployments are explicit - uses mainnet-fork deployment (not inherited)\n    const mainnetForkMappings = {\n      FlowToken: \"0x1654653399040a61\",\n    }\n\n    expect(getContracts(flowJSON, \"mainnet-fork\")).toEqual(mainnetForkMappings)\n  })\n\n  test(\"it should use fork-specific aliases over inherited aliases (fallback behavior)\", () => {\n    const flowJSON: FlowJson = {\n      networks: {\n        mainnet: \"access.mainnet.nodes.onflow.org:9000\",\n        \"mainnet-fork\": {\n          host: \"127.0.0.1:3569\",\n          fork: \"mainnet\",\n        },\n      },\n      contracts: {\n        FlowToken: {\n          source: \"./contracts/FlowToken.cdc\",\n          aliases: {\n            mainnet: \"0x1654653399040a61\",\n            \"mainnet-fork\": \"0x0000000000000001\", // Override for fork!\n          },\n        },\n        FungibleToken: {\n          source: \"./contracts/FungibleToken.cdc\",\n          aliases: {\n            mainnet: \"0xf233dcee88fe0abe\",\n            // No mainnet-fork alias - should inherit from mainnet\n          },\n        },\n      },\n    }\n\n    const mainnetForkMappings = {\n      FlowToken: \"0x0000000000000001\", // Uses fork-specific alias\n      FungibleToken: \"0xf233dcee88fe0abe\", // Falls back to mainnet alias\n    }\n\n    expect(getContracts(flowJSON, \"mainnet-fork\")).toEqual(mainnetForkMappings)\n  })\n})\n\ndescribe(\"anyHasPrivateKeys\", () => {\n  test(\"it should return true if private keys exist in account\", () => {\n    const flowJSON = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n        },\n      },\n    }\n\n    const flowJSONTwo = {\n      accounts: {\n        \"testnet-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n        },\n      },\n    }\n\n    const flowJSONThree = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n        },\n      },\n    }\n\n    expect(anyHasPrivateKeys(flowJSON)).toBe(true)\n    expect(anyHasPrivateKeys([flowJSON, flowJSONTwo])).toBe(true)\n    expect(anyHasPrivateKeys([flowJSON, flowJSONTwo, flowJSONThree])).toBe(true)\n  })\n\n  test(\"should return false for environmental variables\", async () => {\n    const flowJSON = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: \"$FLOW_EMULATOR_PRIVATE_KEY\",\n        },\n      },\n    }\n\n    expect(anyHasPrivateKeys(flowJSON)).toBe(false)\n  })\n\n  test(\"it should return false if no private keys exist in account\", () => {\n    const flowJSON = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n        },\n      },\n    }\n\n    const flowJSONTwo = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n        },\n      },\n    }\n\n    expect(anyHasPrivateKeys(flowJSON)).toBe(false)\n    expect(anyHasPrivateKeys([flowJSON, flowJSONTwo])).toBe(false)\n  })\n\n  test(\"it should return false if private key value is in separate file\", () => {\n    const flowJSON = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: {\n            type: \"file\",\n            location: \"./emulator.key\",\n          },\n        },\n      },\n    }\n\n    const flowJSONTwo = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n        },\n      },\n    }\n\n    const flowJSONThree = {\n      accounts: {\n        \"emulator-account\": {\n          address: \"f8d6e0586b0a20c7\",\n          key: \"ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646\",\n        },\n      },\n    }\n\n    expect(anyHasPrivateKeys(flowJSON)).toBe(false)\n    expect(anyHasPrivateKeys([flowJSON, flowJSONTwo])).toBe(false)\n    expect(anyHasPrivateKeys(flowJSONThree)).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/config/src/utils/utils.ts",
    "content": "/**\n * Fork network configuration\n * Allows a custom network to inherit contract aliases from a parent network\n */\nexport interface ForkNetworkConfig {\n  host: string\n  fork: string\n}\n\n/**\n * Network configuration - either a string (host) or fork configuration\n */\nexport type NetworkConfig = string | ForkNetworkConfig\n\nexport interface FlowJson {\n  networks?: {\n    [key: string]: NetworkConfig\n  }\n  accounts?: {\n    [key: string]: {\n      address: string\n      key?: string | object\n    }\n  }\n  contracts?: {\n    [key: string]: {\n      source: string\n      aliases: {\n        [key: string]: string\n      }\n      // Optional canonical field for import aliases\n      // When set, indicates this contract is an alias of another contract\n      // Example: FUSD1 has canonical=\"FUSD\" means FUSD1 is an alias of FUSD\n      // Results in: import FUSD as FUSD1 from 0x...\n      canonical?: string\n    }\n  }\n  dependencies?: {\n    [key: string]: {\n      source: string\n      hash: string\n      aliases: {\n        [key: string]: string\n      }\n      // Optional canonical field for import aliases\n      // When set, indicates this dependency is an alias of another contract\n      // Example: FungibleTokenV2 has canonical=\"FungibleToken\"\n      // Results in: import FungibleToken as FungibleTokenV2 from 0x...\n      canonical?: string\n    }\n  }\n  deployments?: {\n    [key: string]: {\n      [contract: string]: string[]\n    }\n  }\n}\n\nconst pipe =\n  (...funcs: ((v: any) => any)[]) =>\n  (v: any) => {\n    return funcs.reduce((res, func) => {\n      return func(res)\n    }, v)\n  }\n\n/***\n * Merge multiple functions returning objects into one object.\n * @param funcs - Functions to merge\n * @return Merged object\n */\nconst mergePipe =\n  (...funcs: ((v: any) => any)[]) =>\n  (v: any) => {\n    return funcs.reduce((res, func) => {\n      return {...res, ...func(v)}\n    }, {})\n  }\n\n/**\n * @description Object check\n * @param value - Value to check\n * @returns Is object status\n */\nconst isObject = <T>(value: T): boolean =>\n  value && typeof value === \"object\" && !Array.isArray(value)\n\n/**\n * @description Deep merge multiple objects.\n * @param target - Target object\n * @param sources - Source objects\n * @returns Merged object\n */\nconst mergeDeep = (target: any, ...sources: any[]): any => {\n  if (!sources.length) return target\n  const source = sources.shift()\n\n  if (isObject(target) && isObject(source)) {\n    for (const key in source) {\n      if (isObject(source[key])) {\n        if (!target[key]) Object.assign(target, {[key]: {}})\n        mergeDeep(target[key], source[key])\n      } else {\n        Object.assign(target, {[key]: source[key]})\n      }\n    }\n  }\n\n  return mergeDeep(target, ...sources)\n}\n\n/**\n * @description Support if/then/else behavior in a function way.\n * @param testFn - Function to test\n * @param posCond - Function to run if testFn is true\n * @param negCond - Function to run it testFn is false\n * @returns Function that returns the result of posCond or negCond\n */\nexport const ifElse =\n  <T, U>(testFn: (v: T) => U, posCond: (v: T) => U, negCond: (v: T) => U) =>\n  (v: T) =>\n    testFn(v) ? posCond(v) : negCond(v)\n\n/**\n * @description Deep merge multiple Flow JSON.\n * @param value - Flow JSON or array of Flow JSONs\n * @returns Merged Flow JSON\n */\nconst mergeFlowJSONs = (value: FlowJson | FlowJson[]) =>\n  Array.isArray(value) ? mergeDeep({}, ...value) : value\n\n/**\n * @description Filter out contracts section of flow.json.\n * @param obj - Flow JSON\n * @returns Contracts section of Flow JSON\n */\nconst filterContracts = (obj: FlowJson) => (obj.contracts ? obj.contracts : {})\n\n/**\n * @description Filter out dependencies section of flow.json.\n * @param obj - Flow JSON\n * @returns Dependencies section of Flow JSON\n */\nconst filterDependencies = (obj: FlowJson) =>\n  obj.dependencies ? obj.dependencies : {}\n\n/**\n * @description Gathers contract addresses by network\n * @param network - Network to gather addresses for\n * @param fallbackNetwork - Optional fallback network for fork networks\n * @returns Contract names by addresses mapping e.g { \"HelloWorld\": \"0x123\" }\n */\nconst mapContractAliasesToNetworkAddress =\n  (network: string, fallbackNetwork?: string) =>\n  (contracts: Record<string, any>) => {\n    return Object.entries(contracts).reduce(\n      (c, [key, value]) => {\n        const alias =\n          value?.aliases?.[network] ||\n          (fallbackNetwork && value?.aliases?.[fallbackNetwork])\n        if (alias) {\n          c[key] = alias\n        }\n        return c\n      },\n      {} as Record<string, string>\n    )\n  }\n\n/**\n * @description Gathers dependency addresses by network\n * @param network - Network to gather addresses for\n * @param fallbackNetwork - Optional fallback network for fork networks\n * @returns Dependency names by addresses mapping e.g { \"HelloWorld\": \"0x123\" }\n */\nconst mapDependencyAliasesToNetworkAddress =\n  (network: string, fallbackNetwork?: string) =>\n  (dependencies: Record<string, any>) => {\n    return Object.entries(dependencies).reduce(\n      (c, [key, value]) => {\n        const alias =\n          value?.aliases?.[network] ||\n          (fallbackNetwork && value?.aliases?.[fallbackNetwork])\n        if (alias) {\n          c[key] = alias\n        }\n        return c\n      },\n      {} as Record<string, string>\n    )\n  }\n\n/**\n * @description Gathers contract canonical references for import aliases\n * @param contracts - Contracts from flow.json\n * @returns Contract canonical names mapping e.g { \"FUSD1.canonical\": \"FUSD\" }\n *\n * Import aliases allow multiple deployments of the same contract to different addresses.\n * The canonical field specifies the actual contract name in the source code.\n *\n * Example:\n * - Input: { FUSD1: { canonical: \"FUSD\" } }\n * - Output: { \"FUSD1.canonical\": \"FUSD\" }\n * - Config stored as: system.contracts.FUSD1.canonical = \"FUSD\"\n * - Resolves to: import FUSD as FUSD1 from 0x...\n */\nconst mapContractCanonicals = (contracts: Record<string, any>) => {\n  return Object.entries(contracts).reduce(\n    (c, [key, value]) => {\n      if (value?.canonical) {\n        c[`${key}.canonical`] = value.canonical\n      }\n      return c\n    },\n    {} as Record<string, string>\n  )\n}\n\n/**\n * @description Gathers dependency canonical references for import aliases\n * @param dependencies - Dependencies from flow.json\n * @returns Dependency canonical names mapping e.g { \"FungibleTokenV2.canonical\": \"FungibleToken\" }\n *\n * Import aliases allow multiple deployments of the same contract to different addresses.\n * The canonical field specifies the actual contract name in the source code.\n *\n * Example:\n * - Input: { FungibleTokenV2: { canonical: \"FungibleToken\" } }\n * - Output: { \"FungibleTokenV2.canonical\": \"FungibleToken\" }\n * - Config stored as: system.contracts.FungibleTokenV2.canonical = \"FungibleToken\"\n * - Resolves to: import FungibleToken as FungibleTokenV2 from 0x...\n */\nconst mapDependencyCanonicals = (dependencies: Record<string, any>) => {\n  return Object.entries(dependencies).reduce(\n    (c, [key, value]) => {\n      if (value?.canonical) {\n        c[`${key}.canonical`] = value.canonical\n      }\n      return c\n    },\n    {} as Record<string, string>\n  )\n}\n\nconst mapDeploymentsToNetworkAddress =\n  (network: string) =>\n  ({\n    deployments = {},\n    accounts = {},\n  }: Pick<FlowJson, \"deployments\" | \"accounts\">) => {\n    const networkDeployment = deployments?.[network]\n    if (!networkDeployment) return {}\n\n    return Object.entries(networkDeployment).reduce((c, [key, value]) => {\n      // Resolve account address\n      const accountAddress = accounts[key]?.address\n      if (!accountAddress) return c\n\n      // Create an object assigning the address to the contract name.\n      return value.reduce((acc, contract) => {\n        return {...acc, [contract]: accountAddress}\n      }, c)\n    }, {})\n  }\n\n/**\n * @description Take in flow.json files and return contract to address mapping by network\n * @param jsons - Flow JSON or array of Flow JSONs\n * @param network - Network to gather addresses for (can be a fork network)\n * @returns Contract names by addresses mapping including canonical references\n *\n * Returns both contract addresses and canonical references for import aliases:\n * - Contract addresses: { \"HelloWorld\": \"0x123\", \"FUSD1\": \"0xe223...\" }\n * - Canonical references: { \"FUSD1.canonical\": \"FUSD\" }\n *\n * These are stored in config as:\n * - system.contracts.FUSD1 = \"0xe223...\"\n * - system.contracts.FUSD1.canonical = \"FUSD\"\n *\n * The canonical reference enables import alias resolution:\n * - import \"FUSD1\" → import FUSD as FUSD1 from 0xe223...\n *\n * Fork networks use fallback resolution:\n * - First collects all aliases from the parent network (e.g., \"mainnet\")\n * - Then overlays aliases from the fork network (e.g., \"mainnet-fork\")\n * - This allows fork-specific overrides while inheriting the rest\n */\nexport const getContracts = (jsons: FlowJson | FlowJson[], network: string) => {\n  const mergedJson = mergeFlowJSONs(jsons)\n\n  // Determine fallback network for fork networks\n  const networkConfig = mergedJson.networks?.[network]\n  const fallbackNetwork =\n    networkConfig &&\n    typeof networkConfig === \"object\" &&\n    \"fork\" in networkConfig\n      ? networkConfig.fork\n      : undefined\n\n  return mergePipe(\n    mapDeploymentsToNetworkAddress(network),\n    pipe(\n      filterContracts,\n      mapContractAliasesToNetworkAddress(network, fallbackNetwork)\n    ),\n    pipe(\n      filterDependencies,\n      mapDependencyAliasesToNetworkAddress(network, fallbackNetwork)\n    ),\n    pipe(filterContracts, mapContractCanonicals),\n    pipe(filterDependencies, mapDependencyCanonicals)\n  )(mergedJson)\n}\n\n/**\n * @description Checks if string is hexidecimal\n * @param str - String to check\n * @returns Is hexidecimal status\n */\nconst isHexidecimal = (str: unknown) => {\n  // Check that it is a string\n  if (typeof str !== \"string\") return false\n  return /^[0-9A-Fa-f]+$/.test(str)\n}\n\n/**\n * @description Checks flow.json file for private keys\n * @param flowJSON - Flow JSON\n * @returns Has private keys status\n */\nconst hasPrivateKeys = (flowJSON: FlowJson) => {\n  return Object.entries(flowJSON?.accounts ?? []).reduce(\n    (hasPrivateKey, [, value]) => {\n      if (hasPrivateKey) return true\n      return (\n        value &&\n        Object.prototype.hasOwnProperty.call(value, \"key\") &&\n        isHexidecimal(value?.key)\n      )\n    },\n    false\n  )\n}\n\n/**\n * @description Take in flow.json or array of flow.json files and checks for private keys\n * @param value - Flow JSON or array of Flow JSONs\n * @returns Has private keys status\n */\nexport const anyHasPrivateKeys = (value: FlowJson | FlowJson[]) => {\n  if (Array.isArray(value)) return value.some(hasPrivateKeys)\n  return hasPrivateKeys(value)\n}\n\n/**\n * @description Format network name, converting 'local' to 'emulator'\n * @param network - Network to format\n * @returns Formatted network name\n *\n * This function now accepts any network name (including custom fork networks).\n * It only transforms \"local\" to \"emulator\" for backward compatibility.\n */\nexport const cleanNetwork = (network: string): string => {\n  return network?.toLowerCase() === \"local\"\n    ? \"emulator\"\n    : network?.toLowerCase()\n}\n"
  },
  {
    "path": "packages/config/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/demo/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "packages/demo/CHANGELOG.md",
    "content": "# @onflow/demo\n\n## 1.9.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338) Thanks [@mfbz](https://github.com/mfbz)! - Added react-native-sdk package, similar to react-sdk but for react-native applications. It fully supports all the same hooks available in react-sdk, plus the connect and profile components. It leverages fcl-react-native for managing blockchain interactions and it's compatible to both react-native and expo applications.\n\n## 1.8.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.8.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.7.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.6.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.5.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.4.0\n\n### Minor Changes\n\n- [#2756](https://github.com/onflow/fcl-js/pull/2756) [`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6) Thanks [@mfbz](https://github.com/mfbz)! - Packages re-released after lerna update.\n\n## 1.3.0\n\n### Minor Changes\n\n- [#2733](https://github.com/onflow/fcl-js/pull/2733) [`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd) Thanks [@mfbz](https://github.com/mfbz)! - Add react-core package with platform-agnostic hooks with common utils and types extracted from react-sdk. Refactored react-sdk to use react-core package.\n\n## 1.2.0\n\n### Minor Changes\n\n- [#2677](https://github.com/onflow/fcl-js/pull/2677) [`58f953381ee0826bfeb6d068c28bf8853b470915`](https://github.com/onflow/fcl-js/commit/58f953381ee0826bfeb6d068c28bf8853b470915) Thanks [@mfbz](https://github.com/mfbz)! - Added `NftCard` component for displaying NFT metadata. The component automatically fetches and renders NFT information including image, name, description, collection details, traits, and external links. Features loading states, error handling, dark mode support and optional display of traits and additional metadata through `showTraits` and `showExtra` props.\n\n- [#2685](https://github.com/onflow/fcl-js/pull/2685) [`f47dd3bd1efce2498b3ab731ca08da2326604f5f`](https://github.com/onflow/fcl-js/commit/f47dd3bd1efce2498b3ab731ca08da2326604f5f) Thanks [@mfbz](https://github.com/mfbz)! - Added standalone Profile component for displaying wallet information. The Profile component has been extracted from the Connect component modal to provide a reusable profile display that can be used independently. The component automatically detects connection state, showing a compact \"No connected wallet\" message when disconnected and full profile information when connected (including address, balance with cross-VM support, multi-token selector, copy/disconnect actions, and optional scheduled transactions).\n\n- [#2679](https://github.com/onflow/fcl-js/pull/2679) [`8ef9cc6933f61c45e32a69c9d723ab669a7757ec`](https://github.com/onflow/fcl-js/commit/8ef9cc6933f61c45e32a69c9d723ab669a7757ec) Thanks [@mfbz](https://github.com/mfbz)! - Added `ScheduledTransactionList` component, a scrollable list that displays scheduled transactions for a Flow account with support for MetadataViews.Display (thumbnails, names, descriptions), transaction cancellation, automatic refresh, responsive design and dark mode. Each card shows the scheduled execution time, fee, priority, and effort with an optional cancel button for pending transactions.\n\n  Enhanced `Connect` component to display scheduled transactions in the profile modal. The modal now shows the user's scheduled transactions below their account info with a configurable `modalConfig` prop to control visibility.\n\n- [#2673](https://github.com/onflow/fcl-js/pull/2673) [`e4e921a552caa78a8ef02b50a3e8431faee6764a`](https://github.com/onflow/fcl-js/commit/e4e921a552caa78a8ef02b50a3e8431faee6764a) Thanks [@mfbz](https://github.com/mfbz)! - Added flow-react-sdk-starter banner.\n\n- [#2681](https://github.com/onflow/fcl-js/pull/2681) [`3d6d1ab75898ff3b2d151ee2d1bd5923461f8b51`](https://github.com/onflow/fcl-js/commit/3d6d1ab75898ff3b2d151ee2d1bd5923461f8b51) Thanks [@mfbz](https://github.com/mfbz)! - Optimized hot reload for demo running locally\n\n## 1.1.0\n\n### Minor Changes\n\n- [#2592](https://github.com/onflow/fcl-js/pull/2592) [`52688c33eb41862a5daa4226e2fdfa98afab79a4`](https://github.com/onflow/fcl-js/commit/52688c33eb41862a5daa4226e2fdfa98afab79a4) Thanks [@mfbz](https://github.com/mfbz)! - Added `useCrossVmBridgeTokenFromEvm` hook for bridging fungible tokens from Flow EVM to Cadence. This hook withdraws tokens from the signer's Cadence-Owned Account (COA) in EVM and deposits them into their Cadence vault, automatically configuring the vault if needed.\n\n- [#2663](https://github.com/onflow/fcl-js/pull/2663) [`8ea4051b2a80024ade40bd58227c81f476011299`](https://github.com/onflow/fcl-js/commit/8ea4051b2a80024ade40bd58227c81f476011299) Thanks [@mfbz](https://github.com/mfbz)! - Added improved Google Analytics tracking for hash anchors\n\n- [#2624](https://github.com/onflow/fcl-js/pull/2624) [`7963d7aa2984e4fd0ad94182a65c8c4065f1d98c`](https://github.com/onflow/fcl-js/commit/7963d7aa2984e4fd0ad94182a65c8c4065f1d98c) Thanks [@mfbz](https://github.com/mfbz)! - Added `useCrossVmBridgeNftFromEvm` hook for bridging NFTs from Flow EVM to Cadence. This hook withdraws an NFT from the signer's Cadence-Owned Account (COA) in EVM and deposits it into their Cadence collection, automatically configuring the collection if needed.\n\n- [#2661](https://github.com/onflow/fcl-js/pull/2661) [`e651d625af8e516d935e74d885524eca741dd9e6`](https://github.com/onflow/fcl-js/commit/e651d625af8e516d935e74d885524eca741dd9e6) Thanks [@mfbz](https://github.com/mfbz)! - Add `useFlowNftMetadata` hook to fetch NFT metadata including name, description, thumbnail, traits, and collection information from Flow blockchain accounts.\n\n- [#2657](https://github.com/onflow/fcl-js/pull/2657) [`5a0e093c5078253266b90cfc01884f532e0bd41e`](https://github.com/onflow/fcl-js/commit/5a0e093c5078253266b90cfc01884f532e0bd41e) Thanks [@mfbz](https://github.com/mfbz)! - Updated playground adding anchoring support and full responsive mode for mobile and tablet\n\n- [#2662](https://github.com/onflow/fcl-js/pull/2662) [`5e88787e5b387bdc7289ff84b8d3e74f355b9ea8`](https://github.com/onflow/fcl-js/commit/5e88787e5b387bdc7289ff84b8d3e74f355b9ea8) Thanks [@mfbz](https://github.com/mfbz)! - Added Google Analytics and SEO improvements\n"
  },
  {
    "path": "packages/demo/DEPLOY.md",
    "content": "# Playground Deployment Workflow\n\n## How It Works\n\nThe `playground` branch always points to the latest release tag and is deployed to Vercel.\n\n**Key principle:** Playground = released version.\n\n## Automatic Sync\n\n### When\n\n- Automatically on every package release (e.g., `@onflow/fcl@1.2.3`)\n- Triggered by changesets when tags are created\n\n### What happens\n\n1. Workflow detects new release tag\n2. Force-updates playground branch to point at the tag\n3. Vercel deploys the tagged release\n\n## Emergency Hotfixes\n\nIf demo needs urgent fix before next release:\n\n### Option 1: Patch Release\n\nCreate a patch release for demo package only with changeset.\n\n### Option 2: Manual Fix\n\n```bash\ngit checkout playground\n# Fix demo files only (packages/demo/**)\ngit commit -m \"fix(demo): emergency hotfix\"\ngit push origin playground\n```\n\n**Warning:** Next release will overwrite playground. Emergency fix MUST go in next release!\n\n## Rules\n\n### DO\n\n- Let the workflow handle normal releases\n- Create patch releases for important fixes\n- Only manually fix demo files (`packages/demo/**`)\n- Ensure emergency fixes go in next release\n\n### DON'T\n\n- Don't let emergency fixes skip the next release\n- Don't use manual fixes for non-critical issues\n"
  },
  {
    "path": "packages/demo/README.md",
    "content": "# Demo\n\nA lightweight internal demo project for testing FCL and Kit packages during development.\n\n## Purpose\n\nThis demo application is designed to:\n\n- Test FCL and Kit packages in a real React environment\n- Provide hot reload capabilities for fast development iteration\n- Serve as a simple sandbox for testing new features\n- Demonstrate integration patterns between FCL and Kit\n- Test contract deployment and interaction with Flow emulator\n\n## Prerequisites\n\nBefore you begin, ensure you have:\n\n- **Node.js** (v14+ recommended)\n- **Flow CLI** installed ([Installation Guide](https://developers.flow.com/tools/flow-cli/install))\n- **npm** or **yarn** package manager\n\nVerify Flow CLI installation:\n```bash\nflow version\n```\n\n## Quick Start\n\nFrom the root of the repository:\n\n```bash\n# Install dependencies (installs all workspace packages)\nnpm install\n\n# Build packages (required for demo to work)\nnpm run build\n\n# Start the demo\nnpm run demo\n```\n\n## Flow Emulator & Dev Wallet Setup\n\n### 1. Start Flow Emulator\n\nThe Flow emulator simulates the Flow blockchain locally for development and testing.\n\n```bash\n# Start the emulator (runs on http://127.0.0.1:3569)\nflow emulator\n```\n\n**Keep this running in a separate terminal** - the emulator needs to stay active for contract deployment and testing.\n\n### 2. Start Dev Wallet\n\nThe dev wallet provides a simple wallet interface for testing on the emulator:\n\n```bash\n# Start the dev wallet (runs on http://localhost:8701)\nflow dev-wallet\n```\n\n**Keep this running in another terminal** - you'll need it for authentication and transaction signing.\n\n### 3. Start the Demo App\n\n```bash\n# From the demo directory\nnpm run dev\n```\n\nThe app will be available at `http://localhost:5173`\n\n## Development Environments\n\n### Local Development (Emulator)\n\n```bash\n# Terminal 1: Start emulator\nflow emulator\n\n# Terminal 2: Start dev wallet  \nflow dev-wallet\n\n# Terminal 3: Start app\ncd packages/demo\nnpm run dev\n```\n\n**Configuration**: Uses `emulator-account` (address: `f8d6e0586b0a20c7`)\n\n### Testnet Development\n\n```bash\n# Run against deployed contracts on Flow Testnet\nnpm run dev:testnet\n```\n\n**Note**: Requires Flow Wallet.\n\n## Features Provided\n\n- `@onflow/react-sdk` setup and configuration\n- Wallet Discovery (including Dev Wallet on Emulator)\n- CLI private key separation for security\n- Flow.json loading for contract placeholders\n- Authentication\n- CDC file loader\n- Custom hooks\n- Interaction examples\n\n## What You Can Test\n\n### Authentication\n\n- Connect/disconnect wallet\n- View user profile information\n- Test authentication state management\n\n### Contract Interaction\n\n- **Execute scripts** to read contract state\n- **Send transactions** to modify contract state\n\n### Queries\n\n- Execute Cadence scripts\n- Test data fetching and caching\n- Debug query responses\n\n### Transactions\n\n- Send transactions to the blockchain\n- Monitor transaction status\n- Test error handling\n- Sign transactions with dev wallet\n\n## Package Dependencies\n\nThis demo uses workspace references to:\n\n- `@onflow/fcl` - Core Flow Client Library\n- `@onflow/react-sdk` - React hooks for Flow\n- `@onflow/typedefs` - Type definitions\n\nChanges to these packages are immediately available via workspace symlinks.\n"
  },
  {
    "path": "packages/demo/emulator.key",
    "content": "ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646"
  },
  {
    "path": "packages/demo/eslint.config.ts",
    "content": "import js from \"@eslint/js\"\nimport globals from \"globals\"\nimport reactHooks from \"eslint-plugin-react-hooks\"\nimport reactRefresh from \"eslint-plugin-react-refresh\"\nimport tseslint, {Config} from \"typescript-eslint\"\n\nconst config: Config = tseslint.config(\n  {ignores: [\"dist\"]},\n  {\n    extends: [js.configs.recommended, ...tseslint.configs.recommended],\n    files: [\"**/*.{ts,tsx}\"],\n    languageOptions: {\n      ecmaVersion: 2020,\n      globals: globals.browser,\n    },\n    plugins: {\n      \"react-hooks\": reactHooks,\n      \"react-refresh\": reactRefresh,\n    },\n    rules: {\n      ...reactHooks.configs.recommended.rules,\n      \"react-refresh/only-export-components\": [\n        \"warn\",\n        {allowConstantExport: true},\n      ],\n      \"@typescript-eslint/no-unused-vars\": \"off\",\n      \"no-unused-vars\": \"off\",\n    },\n  }\n)\n\nexport default config\n"
  },
  {
    "path": "packages/demo/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"/assets/icon.png\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta name=\"theme-color\" content=\"#00EF8B\" />\n    <title>Flow React SDK - Playground for React Hooks & Components</title>\n\n    <!-- SEO Meta Tags -->\n    <meta\n      name=\"description\"\n      content=\"Interactive playground for Flow React SDK. Explore and test React hooks and components for building blockchain applications with the React SDK library.\"\n    />\n    <meta\n      name=\"keywords\"\n      content=\"Flow, React SDK, FCL, blockchain, Web3, React hooks, Flow blockchain, playground\"\n    />\n    <meta name=\"author\" content=\"Flow Foundation\" />\n    <meta name=\"robots\" content=\"index, follow\" />\n    <link rel=\"sitemap\" type=\"application/xml\" href=\"/sitemap.xml\" />\n\n    <!-- Open Graph / Facebook -->\n    <meta property=\"og:type\" content=\"website\" />\n    <meta property=\"og:url\" content=\"https://react.flow.com/\" />\n    <meta\n      property=\"og:title\"\n      content=\"Flow React SDK - Playground for React Hooks & Components\"\n    />\n    <meta\n      property=\"og:description\"\n      content=\"Interactive playground for Flow React SDK. Explore and test React hooks and components for building blockchain applications with the React SDK library.\"\n    />\n    <meta\n      property=\"og:image\"\n      content=\"https://react.flow.com/assets/banner.png\"\n    />\n    <meta property=\"og:image:width\" content=\"1200\" />\n    <meta property=\"og:image:height\" content=\"630\" />\n\n    <!-- Twitter -->\n    <meta property=\"twitter:card\" content=\"summary_large_image\" />\n    <meta property=\"twitter:url\" content=\"https://react.flow.com/\" />\n    <meta\n      property=\"twitter:title\"\n      content=\"Flow React SDK - Playground for React Hooks & Components\"\n    />\n    <meta\n      property=\"twitter:description\"\n      content=\"Interactive playground for Flow React SDK. Explore and test React hooks and components for building blockchain applications with the React SDK library.\"\n    />\n    <meta\n      property=\"twitter:image\"\n      content=\"https://react.flow.com/assets/banner.png\"\n    />\n\n    <!-- Canonical URL -->\n    <link rel=\"canonical\" href=\"https://react.flow.com/\" />\n\n    <!-- Google tag (gtag.js) -->\n    <script\n      async\n      src=\"https://www.googletagmanager.com/gtag/js?id=G-GQJ7YJ8M03\"\n    ></script>\n    <script>\n      window.dataLayer = window.dataLayer || []\n      function gtag() {\n        dataLayer.push(arguments)\n      }\n      gtag(\"js\", new Date())\n\n      // Include hash in initial pageview\n      gtag(\"config\", \"G-GQJ7YJ8M03\", {\n        page_path: window.location.pathname + window.location.hash,\n      })\n\n      // Track hash changes as separate pageviews\n      window.addEventListener(\"hashchange\", function () {\n        gtag(\"event\", \"page_view\", {\n          page_path: window.location.pathname + window.location.hash,\n          page_location: window.location.href,\n          page_title: document.title,\n        })\n      })\n    </script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/demo/package.json",
    "content": "{\n  \"name\": \"@onflow/demo\",\n  \"private\": true,\n  \"version\": \"1.9.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"cross-env VITE_FLOW_NETWORK=emulator vite\",\n    \"dev-wait\": \"npm run dev & wait-on tcp:8888 tcp:8701 tcp:3000\",\n    \"dev:emulator\": \"concurrently \\\"npm run flow:emulator\\\" \\\"npm run flow:dev-wallet\\\" \\\"npm run dev-wait\\\"\",\n    \"dev:testnet\": \"concurrently \\\"npm run watch:react-sdk\\\" \\\"cross-env VITE_FLOW_NETWORK=testnet vite\\\"\",\n    \"dev:mainnet\": \"concurrently \\\"npm run watch:react-sdk\\\" \\\"cross-env VITE_FLOW_NETWORK=mainnet vite\\\"\",\n    \"watch:react-sdk\": \"cd ../react-sdk && npm run start\",\n    \"flow:emulator\": \"flow emulator\",\n    \"flow:dev-wallet\": \"flow dev-wallet\",\n    \"build\": \"tsc -b && vite build\",\n    \"lint\": \"eslint .\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"@onflow/fcl\": \"file:../fcl\",\n    \"@onflow/react-sdk\": \"file:../react-sdk\",\n    \"@onflow/typedefs\": \"file:../typedefs\",\n    \"@react-aria/utils\": \"^3.25.3\",\n    \"@react-stately/flags\": \"^3.0.4\",\n    \"@react-stately/utils\": \"^3.10.4\",\n    \"@types/react-syntax-highlighter\": \"^15.5.13\",\n    \"react\": \"^19.0.0\",\n    \"react-dom\": \"^19.0.0\",\n    \"react-syntax-highlighter\": \"^15.6.6\"\n  },\n  \"devDependencies\": {\n    \"@eslint/js\": \"^9.25.0\",\n    \"@types/react\": \"^19.0.10\",\n    \"@types/react-dom\": \"^19.0.4\",\n    \"@vitejs/plugin-react\": \"^4.4.1\",\n    \"autoprefixer\": \"^10.4.21\",\n    \"concurrently\": \"^8.0.1\",\n    \"cross-env\": \"^7.0.3\",\n    \"eslint\": \"^9.25.0\",\n    \"eslint-plugin-react-hooks\": \"^5.2.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.19\",\n    \"globals\": \"^16.0.0\",\n    \"postcss\": \"^8.5.6\",\n    \"tailwindcss\": \"^3.4.17\",\n    \"typescript\": \"^5.6.3\",\n    \"typescript-eslint\": \"^8.30.1\",\n    \"vite\": \"^6.3.5\",\n    \"wait-on\": \"^7.0.1\"\n  },\n  \"optionalDependencies\": {\n    \"@esbuild/linux-x64\": \"^0.25.8\"\n  },\n  \"alias\": {\n    \"@onflow/fcl\": \"../fcl/src/fcl.ts\",\n    \"@onflow/react-sdk\": \"../react-sdk/src/index.ts\"\n  }\n}\n"
  },
  {
    "path": "packages/demo/postcss.config.js",
    "content": "import tailwindcss from \"tailwindcss\"\nimport tailwindConfig from \"./tailwind.config.js\"\nimport autoprefixer from \"autoprefixer\"\n\nexport default {\n  plugins: [tailwindcss(tailwindConfig), autoprefixer],\n}\n"
  },
  {
    "path": "packages/demo/public/robots.txt",
    "content": "# Allow all crawlers\nUser-agent: *\nAllow: /\n\n# Sitemap\nSitemap: https://react.flow.com/sitemap.xml\n"
  },
  {
    "path": "packages/demo/public/sitemap.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url>\n    <loc>https://react.flow.com/</loc>\n    <changefreq>weekly</changefreq>\n    <priority>1.0</priority>\n  </url>\n</urlset>\n"
  },
  {
    "path": "packages/demo/src/app.css",
    "content": "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap\");\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer utilities {\n  .scrollbar-hide {\n    -ms-overflow-style: none !important; /* IE and Edge */\n    scrollbar-width: none !important; /* Firefox */\n  }\n  .scrollbar-hide::-webkit-scrollbar {\n    display: none !important; /* Chrome, Safari and Opera */\n  }\n\n  /* Also hide scrollbar for all children */\n  .scrollbar-hide * {\n    -ms-overflow-style: none !important;\n    scrollbar-width: none !important;\n  }\n  .scrollbar-hide *::-webkit-scrollbar {\n    display: none !important;\n  }\n\n  .text-balance {\n    text-wrap: balance;\n  }\n}\n\n@layer base {\n  html {\n    font-family: \"Inter\", system-ui, sans-serif;\n    scroll-behavior: smooth;\n    scroll-padding-top: 6rem; /* Account for sticky header */\n  }\n\n  body {\n    margin: 0;\n    padding: 0;\n    overflow-x: hidden;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  /* Smooth transitions for all interactive elements */\n  * {\n    transition-property:\n      color, background-color, border-color, text-decoration-color, fill, stroke;\n    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n    transition-duration: 150ms;\n  }\n}\n\n@layer components {\n  .flow-gradient-text {\n    @apply from-flow-primary via-flow-500 to-flow-600 bg-gradient-to-r bg-clip-text text-transparent;\n  }\n\n  .flow-glow {\n    box-shadow: 0 0 20px rgba(0, 239, 139, 0.3);\n  }\n\n  .dark .flow-glow {\n    box-shadow: 0 0 30px rgba(0, 239, 139, 0.5);\n  }\n\n  .sketch-border {\n    position: relative;\n  }\n\n  .sketch-border::before {\n    content: \"\";\n    position: absolute;\n    top: -1px;\n    left: -1px;\n    right: -1px;\n    bottom: -1px;\n    background: linear-gradient(\n      45deg,\n      transparent,\n      rgba(0, 239, 139, 0.1),\n      transparent\n    );\n    border-radius: inherit;\n    z-index: -1;\n  }\n}\n\n/* Custom scrollbar for webkit browsers */\n::-webkit-scrollbar {\n  width: 6px;\n}\n\n::-webkit-scrollbar-track {\n  @apply bg-gray-100 dark:bg-gray-800;\n}\n\n::-webkit-scrollbar-thumb {\n  @apply rounded-full bg-gray-300 hover:bg-gray-400 dark:bg-gray-600 dark:hover:bg-gray-500;\n}\n\n/* Selection colors */\n::selection {\n  @apply bg-flow-primary/20 text-flow-900;\n}\n\n.dark ::selection {\n  @apply bg-flow-primary/30 text-flow-100;\n}\n"
  },
  {
    "path": "packages/demo/src/app.tsx",
    "content": "import {useEffect, useState} from \"react\"\nimport \"./app.css\"\nimport {ContentSection} from \"./components/content-section\"\nimport {ContentSidebar} from \"./components/content-sidebar\"\nimport FlowProviderWrapper from \"./components/flow-provider-wrapper\"\nimport {Footer} from \"./components/footer\"\nimport {Header} from \"./components/header\"\n\nfunction AppContent() {\n  // Move dark mode state outside FlowProvider to prevent sidebar reset on network change\n  const [darkMode, setDarkMode] = useState(() => {\n    if (typeof window !== \"undefined\") {\n      const saved = localStorage.getItem(\"darkMode\")\n      return saved ? JSON.parse(saved) : false\n    }\n    return false\n  })\n  const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false)\n\n  const toggleDarkMode = () => {\n    setDarkMode((prev: boolean) => {\n      const newValue = !prev\n      if (typeof window !== \"undefined\") {\n        localStorage.setItem(\"darkMode\", JSON.stringify(newValue))\n      }\n      return newValue\n    })\n  }\n\n  // Prevent body scroll when mobile sidebar is open\n  useEffect(() => {\n    if (mobileSidebarOpen) {\n      document.body.style.overflow = \"hidden\"\n    } else {\n      document.body.style.overflow = \"unset\"\n    }\n    return () => {\n      document.body.style.overflow = \"unset\"\n    }\n  }, [mobileSidebarOpen])\n\n  return (\n    <div\n      className={`font-flow transition-colors duration-200 ${\n        darkMode ? \"dark bg-gray-900 text-white\" : \"bg-white text-gray-900\" }`}\n    >\n      <a\n        href=\"#main-content\"\n        className=\"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 z-50 px-4 py-2\n          bg-flow-primary text-black rounded-lg font-medium transition-all\"\n      >\n        Skip to main content\n      </a>\n\n      <FlowProviderWrapper darkMode={darkMode} toggleDarkMode={toggleDarkMode}>\n        <Header\n          onMobileSidebarToggle={() => setMobileSidebarOpen(!mobileSidebarOpen)}\n          mobileSidebarOpen={mobileSidebarOpen}\n        />\n\n        <div className=\"relative\">\n          {mobileSidebarOpen && (\n            <div\n              className=\"fixed inset-0 bg-black/50 z-40 lg:hidden\"\n              onClick={() => setMobileSidebarOpen(false)}\n              aria-hidden=\"true\"\n            />\n          )}\n\n          <div\n            className={`fixed top-0 left-0 h-full w-80 max-w-[85vw] z-50 transform transition-transform\n              duration-300 ease-in-out lg:hidden ${\n              mobileSidebarOpen ? \"translate-x-0\" : \"-translate-x-full\" }\n              ${darkMode ? \"bg-gray-900 border-r border-white/10\" : \"bg-white border-r border-black/5\"}`}\n          >\n            <div className=\"flex flex-col h-full\">\n              <div className=\"flex items-center justify-between gap-3 p-6 pb-4 border-b border-current/10\">\n                <h2\n                  className={`text-lg font-bold ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                >\n                  Menu\n                </h2>\n                <div className=\"flex items-center gap-2\">\n                  <button\n                    onClick={toggleDarkMode}\n                    className={`p-2 rounded-lg transition-colors ${\n                      darkMode\n                        ? \"text-yellow-400 hover:text-yellow-300 hover:bg-gray-800\"\n                        : \"text-gray-600 hover:text-gray-900 hover:bg-gray-100\"\n                      }`}\n                    aria-label={\n                      darkMode ? \"Switch to light mode\" : \"Switch to dark mode\"\n                    }\n                  >\n                    {darkMode ? (\n                      <svg\n                        width=\"16\"\n                        height=\"16\"\n                        viewBox=\"0 0 24 24\"\n                        fill=\"currentColor\"\n                      >\n                        <path d=\"M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z\" />\n                      </svg>\n                    ) : (\n                      <svg\n                        width=\"16\"\n                        height=\"16\"\n                        viewBox=\"0 0 24 24\"\n                        fill=\"currentColor\"\n                      >\n                        <path d=\"M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z\" />\n                      </svg>\n                    )}\n                  </button>\n                  <button\n                    onClick={() => setMobileSidebarOpen(false)}\n                    className={`flex-shrink-0 p-2 rounded-lg transition-colors ${\n                      darkMode\n                        ? \"text-gray-400 hover:text-white hover:bg-gray-800\"\n                        : \"text-gray-600 hover:text-gray-900 hover:bg-gray-100\"\n                      }`}\n                    aria-label=\"Close menu\"\n                  >\n                    <svg\n                      width=\"20\"\n                      height=\"20\"\n                      viewBox=\"0 0 24 24\"\n                      fill=\"none\"\n                      stroke=\"currentColor\"\n                      strokeWidth={2}\n                    >\n                      <path\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                        d=\"M6 18L18 6M6 6l12 12\"\n                      />\n                    </svg>\n                  </button>\n                </div>\n              </div>\n              <div className=\"flex-1 overflow-y-auto px-6 pb-6 pt-6\">\n                <ContentSidebar\n                  darkMode={darkMode}\n                  onItemClick={() => setMobileSidebarOpen(false)}\n                />\n              </div>\n            </div>\n          </div>\n\n          <div className=\"flex min-h-screen\">\n            <div className=\"relative w-80 flex-shrink-0 hidden lg:block\">\n              <svg\n                viewBox=\"0 0 15 15\"\n                className={`absolute -top-2 -right-2 size-[15px] z-10 ${\n                  darkMode ? \"fill-white/20\" : \"fill-black/10\" }`}\n              >\n                <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n              </svg>\n\n              <div className=\"sticky top-0 h-screen overflow-y-auto p-6 scrollbar-hide\">\n                <ContentSidebar darkMode={darkMode} />\n              </div>\n            </div>\n\n            <div className=\"relative flex-1 min-w-0 overflow-x-hidden\">\n              <div className=\"p-4 lg:p-6 max-w-full\">\n                <main id=\"main-content\" role=\"main\" aria-label=\"Main content\">\n                  <ContentSection />\n                </main>\n                <Footer />\n              </div>\n            </div>\n          </div>\n        </div>\n      </FlowProviderWrapper>\n    </div>\n  )\n}\n\nexport function App() {\n  return <AppContent />\n}\n"
  },
  {
    "path": "packages/demo/src/components/advanced-cards/dark-mode-card.tsx",
    "content": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {useState} from \"react\"\n\nconst DARK_MODE_CODE = `import { FlowProvider, useDarkMode } from \"@onflow/react-sdk\"\nimport { useState } from \"react\"\n\nfunction App() {\n  const [isDark, setIsDark] = useState(false)\n\n  return (\n    <FlowProvider config={...} darkMode={isDark}>\n      <DarkModeToggle onToggle={setIsDark} />\n      <MyFlowComponents />\n    </FlowProvider>\n  )\n}\n\nfunction DarkModeToggle({ onToggle }) {\n  const { isDark } = useDarkMode()\n  \n  return (\n    <button \n      onClick={() => onToggle(!isDark)}\n      className=\"p-2 rounded-lg bg-gray-200 dark:bg-gray-700\"\n    >\n      {isDark ? \"🌙\" : \"☀️\"} Toggle Theme\n    </button>\n  )\n}`\n\nexport function DarkModeCard() {\n  const {darkMode, toggleDarkMode} = useDarkMode()\n  const [demoMode, setDemoMode] = useState(darkMode)\n\n  const handleToggle = () => {\n    const newMode = !demoMode\n    setDemoMode(newMode)\n    // Simulate the actual dark mode toggle for demo purposes\n    toggleDarkMode()\n  }\n\n  return (\n    <DemoCard\n      id=\"darkmode\"\n      title=\"Dark Mode Control\"\n      description=\"Implement dynamic dark mode switching with the Flow React SDK. Control theme state manually and access current mode throughout your application.\"\n      code={DARK_MODE_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#-dark-mode\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-6 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-800/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-lg font-semibold mb-4 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n          >\n            Dark Mode Demo\n          </h4>\n\n          <div className=\"flex items-center justify-between\">\n            <div className=\"flex items-center space-x-3\">\n              <div className=\"text-2xl\">{darkMode ? \"🌙\" : \"☀️\"}</div>\n              <div>\n                <p\n                  className={`font-medium ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                >\n                  Current Mode: {darkMode ? \"Dark\" : \"Light\"}\n                </p>\n                <p\n                  className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                >\n                  Click the toggle to switch themes\n                </p>\n              </div>\n            </div>\n\n            <button\n              onClick={handleToggle}\n              className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors\n                focus:outline-none focus:ring-2 focus:ring-offset-2 ${\n                darkMode\n                    ? \"bg-flow-primary focus:ring-flow-primary\"\n                    : \"bg-gray-200 focus:ring-gray-300\"\n                }`}\n            >\n              <span\n                className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${\n                  darkMode ? \"translate-x-6\" : \"translate-x-1\" }`}\n              />\n            </button>\n          </div>\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/advanced-cards/theming-card.tsx",
    "content": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {useState} from \"react\"\nimport {FlowProvider} from \"@onflow/react-sdk\"\nimport {Connect, TransactionButton} from \"@onflow/react-sdk\"\n\nconst THEMING_CODE = `import { FlowProvider } from \"@onflow/react-sdk\"\n\nconst customTheme = {\n  colors: {\n    primary: \"flow-bg-purple-600 dark:flow-bg-purple-400\",\n    primaryForeground: \"flow-text-white dark:flow-text-white\",\n    secondary: \"flow-bg-purple-100 dark:flow-bg-purple-900\",\n    secondaryForeground: \"flow-text-purple-900 dark:flow-text-purple-100\",\n    accent: \"flow-bg-purple-700 dark:flow-bg-purple-300\",\n    background: \"flow-bg-white dark:flow-bg-purple-950\",\n    foreground: \"flow-text-purple-900 dark:flow-text-purple-100\",\n    muted: \"flow-bg-purple-50 dark:flow-bg-purple-800\",\n    mutedForeground: \"flow-text-purple-500 dark:flow-text-purple-400\",\n    border: \"flow-border-purple-200 dark:flow-border-purple-700\",\n  }\n}\n\nfunction App() {\n  return (\n    <FlowProvider \n      config={...} \n      theme={customTheme}\n      colorMode=\"system\"\n    >\n      <CustomThemedComponents />\n    </FlowProvider>\n  )\n}`\n\nexport function ThemingCard() {\n  const {darkMode} = useDarkMode()\n  const [selectedTheme, setSelectedTheme] = useState(\"default\")\n\n  const themes = {\n    default: {\n      name: \"Flow Default\",\n      theme: null,\n      colors: {\n        primary: darkMode ? \"bg-black\" : \"bg-gray-900\",\n        secondary: darkMode ? \"bg-gray-700\" : \"bg-gray-200\",\n        accent: \"bg-flow-primary\",\n      },\n    },\n    purple: {\n      name: \"Purple Theme\",\n      theme: {\n        colors: {\n          primary: \"flow-bg-purple-600 dark:flow-bg-purple-400\",\n          primaryForeground: \"flow-text-white\",\n          secondary: \"flow-bg-purple-100 dark:flow-bg-purple-900\",\n          secondaryForeground: \"flow-text-purple-900 dark:flow-text-purple-100\",\n          accent: \"flow-bg-purple-700 dark:flow-bg-purple-300\",\n          background: \"flow-bg-white dark:flow-bg-purple-950\",\n          foreground: \"flow-text-purple-900 dark:flow-text-purple-100\",\n          muted: \"flow-bg-purple-50 dark:flow-bg-purple-800\",\n          mutedForeground: \"flow-text-purple-500 dark:flow-text-purple-400\",\n          border: \"flow-border-purple-200 dark:flow-border-purple-700\",\n          link: \"flow-text-purple-600 dark:flow-text-purple-300\",\n        },\n      },\n      colors: {\n        primary: darkMode ? \"bg-purple-400\" : \"bg-purple-600\",\n        secondary: darkMode ? \"bg-purple-800\" : \"bg-purple-100\",\n        accent: darkMode ? \"bg-purple-300\" : \"bg-purple-700\",\n      },\n    },\n    emerald: {\n      name: \"Emerald Theme\",\n      theme: {\n        colors: {\n          primary: \"flow-bg-emerald-600 dark:flow-bg-emerald-400\",\n          primaryForeground: \"flow-text-white\",\n          secondary: \"flow-bg-emerald-100 dark:flow-bg-emerald-900\",\n          secondaryForeground:\n            \"flow-text-emerald-900 dark:flow-text-emerald-100\",\n          accent: \"flow-bg-emerald-700 dark:flow-bg-emerald-300\",\n          background: \"flow-bg-white dark:flow-bg-emerald-950\",\n          foreground: \"flow-text-emerald-900 dark:flow-text-emerald-100\",\n          muted: \"flow-bg-emerald-50 dark:flow-bg-emerald-800\",\n          mutedForeground: \"flow-text-emerald-500 dark:flow-text-emerald-400\",\n          border: \"flow-border-emerald-200 dark:flow-border-emerald-700\",\n          link: \"flow-text-emerald-600 dark:flow-text-emerald-300\",\n        },\n      },\n      colors: {\n        primary: darkMode ? \"bg-emerald-400\" : \"bg-emerald-600\",\n        secondary: darkMode ? \"bg-emerald-800\" : \"bg-emerald-100\",\n        accent: darkMode ? \"bg-emerald-300\" : \"bg-emerald-700\",\n      },\n    },\n    rose: {\n      name: \"Rose Theme\",\n      theme: {\n        colors: {\n          primary: \"flow-bg-rose-600 dark:flow-bg-rose-400\",\n          primaryForeground: \"flow-text-white\",\n          secondary: \"flow-bg-rose-100 dark:flow-bg-rose-900\",\n          secondaryForeground: \"flow-text-rose-900 dark:flow-text-rose-100\",\n          accent: \"flow-bg-rose-700 dark:flow-bg-rose-300\",\n          background: \"flow-bg-white dark:flow-bg-rose-950\",\n          foreground: \"flow-text-rose-900 dark:flow-text-rose-100\",\n          muted: \"flow-bg-rose-50 dark:flow-bg-rose-800\",\n          mutedForeground: \"flow-text-rose-500 dark:flow-text-rose-400\",\n          border: \"flow-border-rose-200 dark:flow-border-rose-700\",\n          link: \"flow-text-rose-600 dark:flow-text-rose-300\",\n        },\n      },\n      colors: {\n        primary: darkMode ? \"bg-rose-400\" : \"bg-rose-600\",\n        secondary: darkMode ? \"bg-rose-800\" : \"bg-rose-100\",\n        accent: darkMode ? \"bg-rose-300\" : \"bg-rose-700\",\n      },\n    },\n  }\n\n  const currentTheme = themes[selectedTheme as keyof typeof themes]\n\n  return (\n    <DemoCard\n      id=\"theming\"\n      title=\"Custom Theming\"\n      description=\"Customize the appearance of Flow React SDK components with custom themes. Override colors, styles, and create consistent branding across your application.\"\n      code={THEMING_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#-theming\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-6 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-800/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-lg font-semibold mb-4 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n          >\n            Theme Customization Demo\n          </h4>\n\n          <div className=\"space-y-4\">\n            <div>\n              <label\n                className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Select Theme:\n              </label>\n              <select\n                value={selectedTheme}\n                onChange={e => setSelectedTheme(e.target.value)}\n                className={`w-full p-2 rounded-lg border ${\n                  darkMode\n                    ? \"bg-gray-800 border-white/10 text-white\"\n                    : \"bg-white border-black/10 text-gray-900\"\n                  } focus:outline-none focus:ring-2 focus:ring-flow-primary`}\n              >\n                {Object.entries(themes).map(([key, theme]) => (\n                  <option key={key} value={key}>\n                    {theme.name}\n                  </option>\n                ))}\n              </select>\n            </div>\n\n            <div className=\"grid grid-cols-3 gap-3\">\n              <div className=\"text-center\">\n                <div\n                  className={`w-full h-12 rounded-lg ${currentTheme.colors.primary} mb-2`}\n                />\n                <span\n                  className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                >\n                  Primary\n                </span>\n              </div>\n              <div className=\"text-center\">\n                <div\n                  className={`w-full h-12 rounded-lg ${currentTheme.colors.secondary} mb-2`}\n                />\n                <span\n                  className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                >\n                  Secondary\n                </span>\n              </div>\n              <div className=\"text-center\">\n                <div\n                  className={`w-full h-12 rounded-lg ${currentTheme.colors.accent} mb-2`}\n                />\n                <span\n                  className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                >\n                  Accent\n                </span>\n              </div>\n            </div>\n\n            <div\n              className={`p-4 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <p\n                className={`text-sm font-medium mb-3 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Live Flow Components Preview:\n              </p>\n              <FlowProvider\n                config={{\n                  accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n                  flowNetwork: \"mainnet\",\n                  appDetailTitle: \"Theme Demo\",\n                  appDetailIcon: \"\",\n                  appDetailDescription: \"Testing custom themes\",\n                  appDetailUrl: \"\",\n                }}\n                colorMode={darkMode ? \"dark\" : \"light\"}\n                theme={currentTheme.theme}\n              >\n                <div className=\"flex flex-col sm:flex-row gap-3\">\n                  <Connect />\n                  <TransactionButton\n                    label=\"Demo Transaction\"\n                    transaction={{\n                      cadence: `\n                        transaction(greeting: String) {\n                          prepare(signer: &Account) {\n                            log(greeting)\n                          }\n                        }\n                      `,\n                      args: (arg, t) => [\n                        arg(\"Hello from themed component!\", t.String),\n                      ],\n                      limit: 999,\n                    }}\n                    mutation={{\n                      onSuccess: data => {\n                        console.log(\"Themed transaction succeeded:\", data)\n                      },\n                      onError: error => {\n                        console.error(\"Themed transaction failed:\", error)\n                      },\n                    }}\n                  />\n                </div>\n              </FlowProvider>\n            </div>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-4 rounded-lg border ${\n            darkMode\n              ? \"bg-green-900/20 border-green-800/50\"\n              : \"bg-green-50 border-green-200\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n          <div className=\"flex items-start space-x-3\">\n            <svg\n              className=\"w-5 h-5 text-green-500 mt-0.5 flex-shrink-0\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={2}\n                d=\"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zM21 5a2 2 0 00-2-2h-4a2 2 0 00-2 2v12a4 4 0 004 4h4a2 2 0 002-2V5z\"\n              />\n            </svg>\n            <div>\n              <p\n                className={`text-sm font-medium mb-1 ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n              >\n                Theming Features\n              </p>\n              <ul\n                className={`text-sm space-y-1 ${darkMode ? \"text-green-400/80\" : \"text-green-600/80\"}`}\n              >\n                <li>• Custom color palettes and branding</li>\n                <li>• Tailwind CSS utility class overrides</li>\n                <li>• Light and dark theme variants</li>\n                <li>• Consistent styling across components</li>\n              </ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/connect-card.tsx",
    "content": "import {useState} from \"react\"\nimport {Connect, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {CONTRACT_ADDRESSES} from \"../../constants\"\n\nconst IMPLEMENTATION_CODE = `import { Connect } from \"@onflow/react-sdk\"\n\n// Basic usage - shows FLOW by default\n<Connect />\n\n// With multiple tokens - dropdown selector, first token is default\n// Note: Provide only ONE identifier per token (the bridge derives the other)\n<Connect\n  balanceTokens={[\n    {\n      symbol: \"FLOW\",\n      name: \"Flow Token\",\n      vaultIdentifier: \"A.1654653399040a61.FlowToken.Vault\",\n    },\n    {\n      symbol: \"USDF\",\n      name: \"USDF (PYUSD)\",\n      vaultIdentifier: \"A.1e4aa0b87d10b141.EVMVMBridgedToken_2aabea2058b5ac2d339b163c6ab6f2b6d53aabed.Vault\",\n    },\n  ]}\n  balanceType=\"combined\"\n/>`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"variant\",\n    type: '\"primary\" | \"secondary\" | \"outline\" | \"link\"',\n    required: false,\n    description: \"The visual style variant of the connect button\",\n    defaultValue: '\"primary\"',\n  },\n  {\n    name: \"onConnect\",\n    type: \"() => void\",\n    required: false,\n    description: \"Callback function called when user connects their wallet\",\n  },\n  {\n    name: \"onDisconnect\",\n    type: \"() => void\",\n    required: false,\n    description: \"Callback function called when user disconnects their wallet\",\n  },\n  {\n    name: \"balanceType\",\n    type: '\"cadence\" | \"evm\" | \"combined\"',\n    required: false,\n    description:\n      \"Type of balance to display: cadence (Cadence VM only), evm (EVM only), or combined (sum of both)\",\n    defaultValue: '\"cadence\"',\n  },\n  {\n    name: \"balanceTokens\",\n    type: \"TokenConfig[]\",\n    required: false,\n    description:\n      \"Array of tokens with dropdown selector (first token is default). Each token needs symbol, name, and EXACTLY ONE of: vaultIdentifier OR erc20Address (the bridge derives the other automatically)\",\n  },\n  {\n    name: \"modalConfig\",\n    type: \"ConnectModalConfig\",\n    required: false,\n    description:\n      \"Configuration for the profile modal (like show scheduled transactions, filter handler types)\",\n  },\n  {\n    name: \"modalEnabled\",\n    type: \"boolean\",\n    required: false,\n    description:\n      \"Controls whether the profile modal opens on click when connected. Set to false to manage the profile display externally.\",\n    defaultValue: \"true\",\n  },\n]\n\nexport function ConnectCard() {\n  const {darkMode} = useDarkMode()\n  const {data: chainId, isLoading} = useFlowChainId()\n  const isEmulator = chainId === \"emulator\" || chainId === \"local\"\n  const [showMultiToken, setShowMultiToken] = useState(false)\n  const [modalEnabled, setModalEnabled] = useState(true)\n  const [balanceType, setBalanceType] = useState<\n    \"cadence\" | \"evm\" | \"combined\"\n  >(\"cadence\")\n\n  const getFlowTokenAddress = () => {\n    if (chainId === \"emulator\" || chainId === \"local\") {\n      return CONTRACT_ADDRESSES.FlowToken.emulator\n    }\n    return chainId === \"testnet\"\n      ? CONTRACT_ADDRESSES.FlowToken.testnet\n      : CONTRACT_ADDRESSES.FlowToken.mainnet\n  }\n\n  const multiTokens = [\n    {\n      symbol: \"FLOW\",\n      name: \"Flow Token\",\n      vaultIdentifier: `A.${getFlowTokenAddress().replace(\"0x\", \"\")}.FlowToken.Vault`,\n    },\n    // Only show USDF (PYUSD) on testnet and mainnet\n    // Note: Only vaultIdentifier provided - EVM address is derived by the bridge\n    ...(!isEmulator\n      ? [\n          {\n            symbol: \"USDF\",\n            name: \"USDF (PYUSD)\",\n            vaultIdentifier:\n              chainId === \"testnet\"\n                ? \"A.dfc20aee650fcbdf.EVMVMBridgedToken_f2e5a325f7d678da511e66b1c0ad7d5ba4df93d3.Vault\"\n                : \"A.1e4aa0b87d10b141.EVMVMBridgedToken_2aabea2058b5ac2d339b163c6ab6f2b6d53aabed.Vault\",\n          },\n        ]\n      : []),\n  ]\n\n  return (\n    <DemoCard\n      id=\"connect\"\n      title=\"<Connect />\"\n      description=\"A ready-to-use wallet connection component with built-in styling and authentication flow.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#connect\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-3 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Authentication\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Built-in wallet flow\n            </p>\n          </div>\n\n          <div\n            className={`relative col-span-2 p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Multi-Token Cross-VM\n            </h4>\n            <p\n              className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n            >\n              Multi-token support with cross-VM bridge integration. Provide only\n              a vaultIdentifier or an erc20Address and the bridge derives the\n              other automatically.\n            </p>\n          </div>\n        </div>\n\n        <div className=\"flex gap-4\">\n          <div\n            className={`relative flex-1 p-8 rounded-lg border flex items-center justify-center\n              min-h-[200px] ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            {isLoading ? (\n              <div className=\"text-center\">\n                <div\n                  className={`inline-block animate-spin rounded-full h-8 w-8 border-b-2 ${\n                    darkMode ? \"border-white\" : \"border-black\" }`}\n                ></div>\n              </div>\n            ) : isEmulator ? (\n              <div\n                className={`text-center py-4 px-6 rounded-lg border ${\n                  darkMode\n                    ? \"bg-orange-900/20 border-orange-800/50\"\n                    : \"bg-orange-50 border-orange-200\"\n                  }`}\n              >\n                <svg\n                  className=\"w-8 h-8 mx-auto mb-2 text-orange-500\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={2}\n                    d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm font-medium ${darkMode ? \"text-orange-400\" : \"text-orange-600\"}`}\n                >\n                  Emulator Network Detected\n                </p>\n                <p\n                  className={`text-xs mt-1 ${darkMode ? \"text-orange-400/70\" : \"text-orange-600/70\"}`}\n                >\n                  Connect component requires testnet or mainnet\n                </p>\n              </div>\n            ) : (\n              <div>\n                {showMultiToken ? (\n                  <Connect\n                    balanceType={balanceType}\n                    balanceTokens={multiTokens}\n                    modalEnabled={modalEnabled}\n                  />\n                ) : (\n                  <Connect\n                    balanceType={balanceType}\n                    modalEnabled={modalEnabled}\n                  />\n                )}\n              </div>\n            )}\n          </div>\n\n          {!isEmulator && (\n            <div\n              className={`w-56 p-4 rounded-lg border space-y-4 ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Token Mode\n                </label>\n                <button\n                  onClick={() => setShowMultiToken(!showMultiToken)}\n                  className={`w-full text-sm px-3 py-2 rounded-lg transition-colors ${\n                  showMultiToken\n                      ? darkMode\n                        ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                        : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                      : darkMode\n                        ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                        : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                  }`}\n                >\n                  {showMultiToken ? \"Multi-Token\" : \"Basic\"}\n                </button>\n              </div>\n\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Balance Type\n                </label>\n                <div className=\"space-y-1.5\">\n                  {([\"cadence\", \"evm\", \"combined\"] as const).map(type => (\n                    <button\n                      key={type}\n                      onClick={() => setBalanceType(type)}\n                      className={`w-full text-sm px-3 py-2 rounded-lg transition-colors text-left ${\n                      balanceType === type\n                          ? darkMode\n                            ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                            : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                          : darkMode\n                            ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                            : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                      }`}\n                    >\n                      {type.charAt(0).toUpperCase() + type.slice(1)}\n                    </button>\n                  ))}\n                </div>\n              </div>\n\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Profile Modal\n                </label>\n                <button\n                  onClick={() => setModalEnabled(!modalEnabled)}\n                  className={`w-full text-sm px-3 py-2 rounded-lg transition-colors ${\n                  modalEnabled\n                      ? darkMode\n                        ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                        : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                      : darkMode\n                        ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                        : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                  }`}\n                >\n                  {modalEnabled ? \"Enabled\" : \"Disabled\"}\n                </button>\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/demo-nft-card.tsx",
    "content": "import {NftCard, type NftCardAction, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {DEMO_ADDRESS_TESTNET} from \"../../constants\"\n\nconst IMPLEMENTATION_CODE = `import { NftCard } from \"@onflow/react-sdk\"\n\n<NftCard\n  accountAddress=\"0x123456789abcdef\"\n  tokenId=\"42\"\n  publicPathIdentifier=\"exampleNFTCollection\"\n  showTraits={true}\n  showExtra={true}\n  actions={[\n    {\n      title: \"Transfer\",\n      onClick: async () => {\n        // Handle transfer logic\n        console.log(\"Transfer NFT\")\n      }\n    },\n    {\n      title: \"List for Sale\",\n      onClick: () => {\n        // Handle listing logic\n        console.log(\"List NFT for sale\")\n      }\n    },\n    {\n      title: \"View on Explorer\",\n      onClick: () => {\n        window.open(\"https://flowscan.io\", \"_blank\")\n      }\n    }\n  ]}\n/>`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"accountAddress\",\n    type: \"string\",\n    required: true,\n    description: \"The Flow account address that owns the NFT\",\n  },\n  {\n    name: \"tokenId\",\n    type: \"string | number\",\n    required: true,\n    description: \"The unique identifier of the NFT within the collection\",\n  },\n  {\n    name: \"publicPathIdentifier\",\n    type: \"string\",\n    required: true,\n    description: \"The public path identifier for the NFT collection\",\n  },\n  {\n    name: \"showTraits\",\n    type: \"boolean\",\n    required: false,\n    description:\n      \"Display NFT traits and attributes when available (default: false)\",\n  },\n  {\n    name: \"showExtra\",\n    type: \"boolean\",\n    required: false,\n    description:\n      \"Show additional metadata like serial number, rarity, and external links (default: false)\",\n  },\n  {\n    name: \"actions\",\n    type: \"NftCardAction[]\",\n    required: false,\n    description:\n      \"Array of custom action buttons to display in a 3-dot menu. Each action has a title and onClick handler.\",\n  },\n  {\n    name: \"className\",\n    type: \"string\",\n    required: false,\n    description:\n      \"Additional CSS classes to apply to the card container for custom styling\",\n  },\n  {\n    name: \"style\",\n    type: \"React.CSSProperties\",\n    required: false,\n    description:\n      \"Inline styles to apply to the card container for custom styling\",\n  },\n]\n\nexport function DemoNftCard() {\n  const {darkMode} = useDarkMode()\n  const {data: chainId, isLoading} = useFlowChainId()\n  const [accountAddress, setAccountAddress] = useState(\"\")\n  const [tokenId, setTokenId] = useState(\"\")\n  const [publicPath, setPublicPath] = useState(\"\")\n  const [showTraits, setShowTraits] = useState(true)\n  const [showExtra, setShowExtra] = useState(true)\n  const [showActions, setShowActions] = useState(true)\n\n  const isEmulator = chainId === \"emulator\" || chainId === \"local\"\n  const isTestnet = chainId === \"testnet\"\n  const isMainnet = chainId === \"mainnet\"\n  const canShowDemo = isTestnet || isMainnet\n\n  // Use user input if provided, otherwise use demo values\n  const displayAddress = accountAddress || DEMO_ADDRESS_TESTNET\n  const displayTokenId = tokenId || \"8\"\n  const displayPublicPath = publicPath || \"exampleNFTCollection\"\n\n  return (\n    <DemoCard\n      id=\"nftcard\"\n      title=\"<NftCard />\"\n      description=\"A card component that fetches and renders NFT metadata including image, name, description, traits, and external links.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#nftcard\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              NFT Metadata\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Fetches NFT data automatically\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Rich Display\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Shows traits and attributes\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Custom Actions\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Extensible 3-dot menu\n            </p>\n          </div>\n        </div>\n\n        {isLoading ? (\n          <div className=\"text-center py-8\">\n            <div\n              className={`inline-block animate-spin rounded-full h-8 w-8 border-b-2 ${\n                darkMode ? \"border-white\" : \"border-black\" }`}\n            ></div>\n          </div>\n        ) : isEmulator ? (\n          <div\n            className={`text-center py-4 px-6 rounded-lg border ${\n              darkMode\n                ? \"bg-orange-900/20 border-orange-800/50\"\n                : \"bg-orange-50 border-orange-200\"\n              }`}\n          >\n            <svg\n              className=\"w-8 h-8 mx-auto mb-2 text-orange-500\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={2}\n                d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n              />\n            </svg>\n            <p\n              className={`text-sm font-medium ${darkMode ? \"text-orange-400\" : \"text-orange-600\"}`}\n            >\n              Emulator Network Detected\n            </p>\n            <p\n              className={`text-xs mt-1 ${darkMode ? \"text-orange-400/70\" : \"text-orange-600/70\"}`}\n            >\n              NFT Card component requires testnet or mainnet\n            </p>\n          </div>\n        ) : !canShowDemo ? (\n          <div\n            className={`text-center py-4 px-6 rounded-lg border ${\n              darkMode\n                ? \"bg-blue-900/20 border-blue-800/50\"\n                : \"bg-blue-50 border-blue-200\"\n              }`}\n          >\n            <svg\n              className=\"w-8 h-8 mx-auto mb-2 text-blue-500\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={2}\n                d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n              />\n            </svg>\n            <p\n              className={`text-sm font-medium ${darkMode ? \"text-blue-400\" : \"text-blue-600\"}`}\n            >\n              Demo Available on Testnet and Mainnet\n            </p>\n            <p\n              className={`text-xs mt-1 ${darkMode ? \"text-blue-400/70\" : \"text-blue-600/70\"}`}\n            >\n              Switch to testnet or mainnet to see the NFT card demo\n            </p>\n          </div>\n        ) : (\n          <div className=\"space-y-6\">\n            <div className=\"space-y-4\">\n              <div>\n                <label\n                  className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  Account Address\n                </label>\n                <input\n                  type=\"text\"\n                  value={accountAddress}\n                  onChange={e => setAccountAddress(e.target.value)}\n                  className={`w-full px-3 py-2 rounded-lg border ${\n                    darkMode\n                      ? \"bg-gray-900/50 border-white/10 text-white\"\n                      : \"bg-white border-black/10 text-black\"\n                    } focus:outline-none focus:ring-2 focus:ring-flow-primary/50`}\n                  placeholder={DEMO_ADDRESS_TESTNET}\n                />\n              </div>\n\n              <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n                <div>\n                  <label\n                    className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                  >\n                    Token ID\n                  </label>\n                  <input\n                    type=\"text\"\n                    value={tokenId}\n                    onChange={e => setTokenId(e.target.value)}\n                    className={`w-full px-3 py-2 rounded-lg border ${\n                      darkMode\n                        ? \"bg-gray-900/50 border-white/10 text-white\"\n                        : \"bg-white border-black/10 text-black\"\n                      } focus:outline-none focus:ring-2 focus:ring-flow-primary/50`}\n                    placeholder=\"8\"\n                  />\n                </div>\n\n                <div>\n                  <label\n                    className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                  >\n                    Public Path Identifier\n                  </label>\n                  <input\n                    type=\"text\"\n                    value={publicPath}\n                    onChange={e => setPublicPath(e.target.value)}\n                    className={`w-full px-3 py-2 rounded-lg border ${\n                      darkMode\n                        ? \"bg-gray-900/50 border-white/10 text-white\"\n                        : \"bg-white border-black/10 text-black\"\n                      } focus:outline-none focus:ring-2 focus:ring-flow-primary/50`}\n                    placeholder=\"exampleNFTCollection\"\n                  />\n                </div>\n              </div>\n            </div>\n\n            <div className=\"grid grid-cols-1 lg:grid-cols-[1fr,auto] gap-6\">\n              <div\n                className={`relative p-8 rounded-lg border ${\n                  darkMode\n                    ? \"bg-gray-900/50 border-white/10\"\n                    : \"bg-gray-50 border-black/5\"\n                  }`}\n              >\n                <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n                <div className=\"flex justify-center items-start\">\n                  <div className=\"w-full max-w-sm\">\n                    <NftCard\n                      accountAddress={displayAddress}\n                      tokenId={displayTokenId}\n                      publicPathIdentifier={displayPublicPath}\n                      showTraits={showTraits}\n                      showExtra={showExtra}\n                      actions={\n                        showActions\n                          ? [\n                              {\n                                title: \"Transfer\",\n                                onClick: async () => {\n                                  alert(\n                                    \"Transfer action clicked! In a real app, this would open a transfer dialog.\"\n                                  )\n                                },\n                              },\n                              {\n                                title: \"List for Sale\",\n                                onClick: () => {\n                                  alert(\n                                    \"List for Sale action clicked! In a real app, this would open a listing dialog.\"\n                                  )\n                                },\n                              },\n                              {\n                                title: \"View on FlowDiver\",\n                                onClick: () => {\n                                  const network =\n                                    chainId === \"mainnet\"\n                                      ? \"mainnet\"\n                                      : \"testnet\"\n                                  window.open(\n                                    `https://www.flowdiver.io/account/${displayAddress}`,\n                                    \"_blank\"\n                                  )\n                                },\n                              },\n                              {\n                                title: \"Copy Token ID\",\n                                onClick: () => {\n                                  navigator.clipboard.writeText(displayTokenId)\n                                  alert(\n                                    `Token ID ${displayTokenId} copied to clipboard!`\n                                  )\n                                },\n                              },\n                            ]\n                          : undefined\n                      }\n                    />\n                  </div>\n                </div>\n              </div>\n\n              <div className=\"space-y-3\">\n                <div\n                  className={`p-5 rounded-lg border ${\n                    darkMode\n                      ? \"bg-gray-900/50 border-white/10\"\n                      : \"bg-white border-gray-200\"\n                    }`}\n                >\n                  <div className=\"flex items-center gap-2 mb-4\">\n                    <svg\n                      className={`w-5 h-5 ${darkMode ? \"text-flow-primary\" : \"text-flow-primary\"}`}\n                      fill=\"none\"\n                      viewBox=\"0 0 24 24\"\n                      stroke=\"currentColor\"\n                    >\n                      <path\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                        strokeWidth={2}\n                        d=\"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4\"\n                      />\n                    </svg>\n                    <h4\n                      className={`text-sm font-semibold ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                    >\n                      Display Options\n                    </h4>\n                  </div>\n                  <div className=\"space-y-4\">\n                    <label\n                      className={`flex items-start gap-3 cursor-pointer p-3 rounded-lg transition-colors ${\n                        darkMode ? \"hover:bg-gray-800/50\" : \"hover:bg-gray-50\" }`}\n                    >\n                      <input\n                        type=\"checkbox\"\n                        checked={showTraits}\n                        onChange={e => setShowTraits(e.target.checked)}\n                        className=\"w-5 h-5 mt-0.5 rounded border-gray-300 text-flow-primary focus:ring-flow-primary\n                          focus:ring-offset-0\"\n                      />\n                      <div className=\"flex-1\">\n                        <div\n                          className={`text-sm font-medium mb-0.5 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                        >\n                          Show Traits\n                        </div>\n                        <div\n                          className={`text-xs leading-relaxed ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                        >\n                          Display NFT attributes and properties\n                        </div>\n                      </div>\n                    </label>\n\n                    <div\n                      className={`h-px ${darkMode ? \"bg-gray-800\" : \"bg-gray-200\"}`}\n                    ></div>\n\n                    <label\n                      className={`flex items-start gap-3 cursor-pointer p-3 rounded-lg transition-colors ${\n                        darkMode ? \"hover:bg-gray-800/50\" : \"hover:bg-gray-50\" }`}\n                    >\n                      <input\n                        type=\"checkbox\"\n                        checked={showExtra}\n                        onChange={e => setShowExtra(e.target.checked)}\n                        className=\"w-5 h-5 mt-0.5 rounded border-gray-300 text-flow-primary focus:ring-flow-primary\n                          focus:ring-offset-0\"\n                      />\n                      <div className=\"flex-1\">\n                        <div\n                          className={`text-sm font-medium mb-0.5 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                        >\n                          Show Extra\n                        </div>\n                        <div\n                          className={`text-xs leading-relaxed ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                        >\n                          Serial number, rarity, and external links\n                        </div>\n                      </div>\n                    </label>\n\n                    <div\n                      className={`h-px ${darkMode ? \"bg-gray-800\" : \"bg-gray-200\"}`}\n                    ></div>\n\n                    <label\n                      className={`flex items-start gap-3 cursor-pointer p-3 rounded-lg transition-colors ${\n                        darkMode ? \"hover:bg-gray-800/50\" : \"hover:bg-gray-50\" }`}\n                    >\n                      <input\n                        type=\"checkbox\"\n                        checked={showActions}\n                        onChange={e => setShowActions(e.target.checked)}\n                        className=\"w-5 h-5 mt-0.5 rounded border-gray-300 text-flow-primary focus:ring-flow-primary\n                          focus:ring-offset-0\"\n                      />\n                      <div className=\"flex-1\">\n                        <div\n                          className={`text-sm font-medium mb-0.5 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                        >\n                          Show Actions\n                        </div>\n                        <div\n                          className={`text-xs leading-relaxed ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                        >\n                          Display custom action menu with 3-dot button\n                        </div>\n                      </div>\n                    </label>\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        )}\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/profile-card.tsx",
    "content": "import {useState} from \"react\"\nimport {Profile, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {CONTRACT_ADDRESSES} from \"../../constants\"\n\nconst IMPLEMENTATION_CODE = `import { Profile } from \"@onflow/react-sdk\"\n\n// Basic usage - standalone profile display\n<Profile />\n\n// With custom configuration\n<Profile\n  balanceType=\"combined\"\n  onDisconnect={() => console.log(\"User disconnected\")}\n  balanceTokens={[\n    {\n      symbol: \"FLOW\",\n      name: \"Flow Token\",\n      vaultIdentifier: \"A.1654653399040a61.FlowToken.Vault\",\n    },\n    {\n      symbol: \"USDF\",\n      name: \"USDF (PYUSD)\",\n      vaultIdentifier: \"A.1e4aa0b87d10b141.EVMVMBridgedToken_2aabea2058b5ac2d339b163c6ab6f2b6d53aabed.Vault\",\n    },\n  ]}\n  profileConfig={{\n    scheduledTransactions: {\n      show: true,\n      filterHandlerTypes: [\"A.123.Contract.Handler\"],\n    }\n  }}\n/>`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"onDisconnect\",\n    type: \"() => void\",\n    required: false,\n    description: \"Callback function called when user disconnects their wallet\",\n  },\n  {\n    name: \"balanceType\",\n    type: '\"cadence\" | \"evm\" | \"combined\"',\n    required: false,\n    description:\n      \"Type of balance to display: cadence (Cadence VM only), evm (EVM only), or combined (sum of both)\",\n    defaultValue: '\"cadence\"',\n  },\n  {\n    name: \"balanceTokens\",\n    type: \"TokenConfig[]\",\n    required: false,\n    description:\n      \"Array of tokens with dropdown selector (first token is default). Each token needs symbol, name, and EXACTLY ONE of: vaultIdentifier OR erc20Address (the bridge derives the other automatically)\",\n  },\n  {\n    name: \"profileConfig\",\n    type: \"ProfileConfig\",\n    required: false,\n    description:\n      \"Configuration for the profile (like show scheduled transactions, filter handler types)\",\n  },\n  {\n    name: \"className\",\n    type: \"string\",\n    required: false,\n    description: \"Additional CSS classes to apply to the profile container\",\n  },\n  {\n    name: \"style\",\n    type: \"React.CSSProperties\",\n    required: false,\n    description: \"Inline styles to apply to the profile container\",\n  },\n]\n\nexport function ProfileCard() {\n  const {darkMode} = useDarkMode()\n  const {data: chainId, isLoading} = useFlowChainId()\n  const isEmulator = chainId === \"emulator\" || chainId === \"local\"\n  const [showMultiToken, setShowMultiToken] = useState(false)\n  const [showScheduledTxs, setShowScheduledTxs] = useState(false)\n  const [balanceType, setBalanceType] = useState<\n    \"cadence\" | \"evm\" | \"combined\"\n  >(\"cadence\")\n\n  const getFlowTokenAddress = () => {\n    if (chainId === \"emulator\" || chainId === \"local\") {\n      return CONTRACT_ADDRESSES.FlowToken.emulator\n    }\n    return chainId === \"testnet\"\n      ? CONTRACT_ADDRESSES.FlowToken.testnet\n      : CONTRACT_ADDRESSES.FlowToken.mainnet\n  }\n\n  const multiTokens = [\n    {\n      symbol: \"FLOW\",\n      name: \"Flow Token\",\n      vaultIdentifier: `A.${getFlowTokenAddress().replace(\"0x\", \"\")}.FlowToken.Vault`,\n    },\n    // Only show USDF (PYUSD) on testnet and mainnet\n    ...(!isEmulator\n      ? [\n          {\n            symbol: \"USDF\",\n            name: \"USDF (PYUSD)\",\n            vaultIdentifier:\n              chainId === \"testnet\"\n                ? \"A.dfc20aee650fcbdf.EVMVMBridgedToken_f2e5a325f7d678da511e66b1c0ad7d5ba4df93d3.Vault\"\n                : \"A.1e4aa0b87d10b141.EVMVMBridgedToken_2aabea2058b5ac2d339b163c6ab6f2b6d53aabed.Vault\",\n          },\n        ]\n      : []),\n  ]\n\n  return (\n    <DemoCard\n      id=\"profile\"\n      title=\"<Profile />\"\n      description=\"A standalone profile component that displays wallet information, balance, and actions. Can be used independently or with the Connect component.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#profile\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-3 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Standalone\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Reusable anywhere\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Auto-detects State\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Shows connected/not connected\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Multi-Token Cross-VM\n            </h4>\n            <p\n              className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n            >\n              Cross-VM balance with token selector\n            </p>\n          </div>\n        </div>\n\n        <div className=\"flex gap-4\">\n          <div\n            className={`relative flex-1 rounded-lg border flex items-center justify-center ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            {isLoading ? (\n              <div className=\"text-center py-12\">\n                <div\n                  className={`inline-block animate-spin rounded-full h-8 w-8 border-b-2 ${\n                    darkMode ? \"border-white\" : \"border-black\" }`}\n                ></div>\n              </div>\n            ) : isEmulator ? (\n              <div\n                className={`text-center py-8 px-6 m-6 rounded-lg border ${\n                  darkMode\n                    ? \"bg-orange-900/20 border-orange-800/50\"\n                    : \"bg-orange-50 border-orange-200\"\n                  }`}\n              >\n                <svg\n                  className=\"w-8 h-8 mx-auto mb-2 text-orange-500\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={2}\n                    d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm font-medium ${darkMode ? \"text-orange-400\" : \"text-orange-600\"}`}\n                >\n                  Emulator Network Detected\n                </p>\n                <p\n                  className={`text-xs mt-1 ${darkMode ? \"text-orange-400/70\" : \"text-orange-600/70\"}`}\n                >\n                  Profile component requires testnet or mainnet\n                </p>\n              </div>\n            ) : (\n              <div className=\"w-full p-6\">\n                <Profile\n                  balanceType={balanceType}\n                  balanceTokens={showMultiToken ? multiTokens : undefined}\n                  profileConfig={\n                    showScheduledTxs\n                      ? {\n                          scheduledTransactions: {\n                            show: true,\n                          },\n                        }\n                      : {}\n                  }\n                  onDisconnect={() => console.log(\"User disconnected\")}\n                />\n              </div>\n            )}\n          </div>\n\n          {!isEmulator && (\n            <div\n              className={`w-56 p-4 rounded-lg border space-y-4 ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Token Mode\n                </label>\n                <button\n                  onClick={() => setShowMultiToken(!showMultiToken)}\n                  className={`w-full text-sm px-3 py-2 rounded-lg transition-colors ${\n                  showMultiToken\n                      ? darkMode\n                        ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                        : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                      : darkMode\n                        ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                        : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                  }`}\n                >\n                  {showMultiToken ? \"Multi-Token\" : \"Basic\"}\n                </button>\n              </div>\n\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Balance Type\n                </label>\n                <div className=\"space-y-1.5\">\n                  {([\"cadence\", \"evm\", \"combined\"] as const).map(type => (\n                    <button\n                      key={type}\n                      onClick={() => setBalanceType(type)}\n                      className={`w-full text-sm px-3 py-2 rounded-lg transition-colors text-left ${\n                      balanceType === type\n                          ? darkMode\n                            ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                            : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                          : darkMode\n                            ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                            : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                      }`}\n                    >\n                      {type.charAt(0).toUpperCase() + type.slice(1)}\n                    </button>\n                  ))}\n                </div>\n              </div>\n\n              <div>\n                <label\n                  className={`text-xs font-medium mb-2 block ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Scheduled Transactions\n                </label>\n                <button\n                  onClick={() => setShowScheduledTxs(!showScheduledTxs)}\n                  className={`w-full text-sm px-3 py-2 rounded-lg transition-colors ${\n                  showScheduledTxs\n                      ? darkMode\n                        ? \"bg-blue-600 hover:bg-blue-700 text-white\"\n                        : \"bg-blue-500 hover:bg-blue-600 text-white\"\n                      : darkMode\n                        ? \"bg-gray-800 hover:bg-gray-700 text-white\"\n                        : \"bg-white hover:bg-gray-100 text-black border border-black/10\"\n                  }`}\n                >\n                  {showScheduledTxs ? \"Enabled\" : \"Disabled\"}\n                </button>\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/scheduled-transaction-list-demo.tsx",
    "content": "import {\n  ScheduledTransactionList,\n  useFlowCurrentUser,\n  useFlowChainId,\n} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {DEMO_ADDRESS_TESTNET} from \"../../constants\"\n\nconst IMPLEMENTATION_CODE = `import { ScheduledTransactionList, useFlowCurrentUser } from \"@onflow/react-sdk\"\n\nfunction MyComponent() {\n  const { user } = useFlowCurrentUser()\n\n  return (\n    <div style={{ height: \"600px\" }}>\n      <ScheduledTransactionList\n        address={user?.addr || \"\"}\n        filterHandlerTypes={[\"A.123.Contract.Handler1\"]}\n        cancelEnabled={true}\n      />\n    </div>\n  )\n}`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"address\",\n    type: \"string\",\n    required: true,\n    description: \"The Flow account address to fetch scheduled transactions for\",\n  },\n  {\n    name: \"filterHandlerTypes\",\n    type: \"string[]\",\n    required: false,\n    description:\n      \"Array of handler type identifiers to filter. Only transactions matching these types will be displayed\",\n  },\n  {\n    name: \"cancelEnabled\",\n    type: \"boolean\",\n    required: false,\n    description:\n      \"Whether to show cancel buttons on transaction cards. Defaults to true\",\n  },\n  {\n    name: \"className\",\n    type: \"string\",\n    required: false,\n    description: \"Additional CSS classes to apply to the list container\",\n  },\n  {\n    name: \"style\",\n    type: \"React.CSSProperties\",\n    required: false,\n    description: \"Inline styles to apply to the list container\",\n  },\n]\n\nexport function ScheduledTransactionListDemo() {\n  const {darkMode} = useDarkMode()\n  const {user} = useFlowCurrentUser()\n  const {data: chainId, isLoading} = useFlowChainId()\n  const isEmulator = chainId === \"emulator\" || chainId === \"local\"\n  const [customAddress, setCustomAddress] = useState(\"\")\n  const [filterInput, setFilterInput] = useState(\"\")\n\n  const normalizeAddress = (address: string): string => {\n    if (!address) return \"\"\n    const trimmed = address.trim()\n    return trimmed.startsWith(\"0x\") ? trimmed : `0x${trimmed}`\n  }\n\n  const displayAddress = customAddress\n    ? normalizeAddress(customAddress)\n    : chainId === \"testnet\"\n      ? DEMO_ADDRESS_TESTNET\n      : user?.addr || \"\"\n\n  const filterHandlerTypes = filterInput\n    ? filterInput\n        .split(\",\")\n        .map(s => s.trim())\n        .filter(s => s.length > 0)\n    : undefined\n\n  return (\n    <DemoCard\n      id=\"scheduledtransactionlist\"\n      title=\"<ScheduledTransactionList />\"\n      description=\"A scrollable list component that displays all scheduled transactions for an account with automatic refresh after cancellation.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#scheduledtransactionlist\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Auto-fetch\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Automatic data fetching\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Scrollable\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Configurable max height\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Auto-refresh\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Refreshes after cancellation\n            </p>\n          </div>\n        </div>\n\n        <div className=\"space-y-4\">\n          <div\n            className={`p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <label\n              className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n            >\n              Account Address\n            </label>\n            <div className=\"flex gap-2\">\n              <input\n                type=\"text\"\n                value={customAddress}\n                onChange={e => setCustomAddress(e.target.value)}\n                placeholder={user?.addr || \"Enter Flow address (e.g., 0x...)\"}\n                className={`flex-1 px-3 py-2 rounded-md border text-sm font-mono ${\n                  darkMode\n                    ? `bg-gray-800 border-gray-700 text-white placeholder-gray-500\n                      focus:border-blue-500`\n                    : `bg-white border-gray-300 text-gray-900 placeholder-gray-400\n                      focus:border-blue-500`\n                  } focus:outline-none focus:ring-1 focus:ring-blue-500`}\n              />\n              {customAddress && (\n                <button\n                  onClick={() => setCustomAddress(\"\")}\n                  className={`px-3 py-2 rounded-md border text-sm ${\n                  darkMode\n                      ? \"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700\"\n                      : \"bg-white border-gray-300 text-gray-700 hover:bg-gray-50\"\n                  }`}\n                >\n                  Clear\n                </button>\n              )}\n            </div>\n            {!customAddress && (\n              <p\n                className={`text-xs mt-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                {chainId === \"testnet\"\n                  ? `Using demo account: ${DEMO_ADDRESS_TESTNET}`\n                  : user?.addr\n                    ? `Using connected wallet address: ${user.addr}`\n                    : \"Connect wallet or enter address to view scheduled transactions\"}\n              </p>\n            )}\n          </div>\n\n          <div\n            className={`p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <label\n              className={`block text-sm font-medium mb-2 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n            >\n              Filter by Handler Types (Optional)\n            </label>\n            <div className=\"flex gap-2\">\n              <input\n                type=\"text\"\n                value={filterInput}\n                onChange={e => setFilterInput(e.target.value)}\n                placeholder=\"e.g., A.123.Contract.Handler1, A.456.Contract.Handler2\"\n                className={`flex-1 px-3 py-2 rounded-md border text-sm font-mono ${\n                  darkMode\n                    ? `bg-gray-800 border-gray-700 text-white placeholder-gray-500\n                      focus:border-blue-500`\n                    : `bg-white border-gray-300 text-gray-900 placeholder-gray-400\n                      focus:border-blue-500`\n                  } focus:outline-none focus:ring-1 focus:ring-blue-500`}\n              />\n              {filterInput && (\n                <button\n                  onClick={() => setFilterInput(\"\")}\n                  className={`px-3 py-2 rounded-md border text-sm ${\n                  darkMode\n                      ? \"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700\"\n                      : \"bg-white border-gray-300 text-gray-700 hover:bg-gray-50\"\n                  }`}\n                >\n                  Clear\n                </button>\n              )}\n            </div>\n            <p\n              className={`text-xs mt-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              {filterInput\n                ? `Filtering by ${filterHandlerTypes?.length || 0} handler type(s)`\n                : \"Enter comma-separated handler type identifiers to filter transactions\"}\n            </p>\n          </div>\n        </div>\n\n        <div\n          className={`relative rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          {isLoading ? (\n            <div className=\"text-center py-8 px-6\">\n              <div\n                className={`inline-block animate-spin rounded-full h-8 w-8 border-b-2 ${\n                  darkMode ? \"border-white\" : \"border-black\" }`}\n              ></div>\n              <p\n                className={`mt-4 text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Loading chain information...\n              </p>\n            </div>\n          ) : isEmulator ? (\n            <div className=\"p-6\">\n              <div\n                className={`text-center py-8 px-6 rounded-lg border ${\n                  darkMode\n                    ? \"bg-orange-900/20 border-orange-800/50\"\n                    : \"bg-orange-50 border-orange-200\"\n                  }`}\n              >\n                <svg\n                  className=\"w-8 h-8 mx-auto mb-2 text-orange-500\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={2}\n                    d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm font-medium ${darkMode ? \"text-orange-400\" : \"text-orange-600\"}`}\n                >\n                  Emulator Network Detected\n                </p>\n                <p\n                  className={`text-xs mt-1 ${darkMode ? \"text-orange-400/70\" : \"text-orange-600/70\"}`}\n                >\n                  Scheduled transactions require testnet or mainnet\n                </p>\n              </div>\n            </div>\n          ) : !displayAddress ? (\n            <div className=\"p-6\">\n              <div\n                className={`text-center py-8 px-6 rounded-lg border ${\n                  darkMode\n                    ? \"bg-blue-900/20 border-blue-800/50\"\n                    : \"bg-blue-50 border-blue-200\"\n                  }`}\n              >\n                <svg\n                  className=\"w-8 h-8 mx-auto mb-2 text-blue-500\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={2}\n                    d=\"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm font-medium ${darkMode ? \"text-blue-400\" : \"text-blue-600\"}`}\n                >\n                  Connect Wallet or Enter Address\n                </p>\n                <p\n                  className={`text-xs mt-1 ${darkMode ? \"text-blue-400/70\" : \"text-blue-600/70\"}`}\n                >\n                  Connect your wallet or enter a Flow address above to view\n                  scheduled transactions\n                </p>\n              </div>\n            </div>\n          ) : (\n            <div\n              className={\"p-3 m-2\"}\n              style={{height: \"500px\", overflowY: \"auto\"}}\n            >\n              <ScheduledTransactionList\n                address={displayAddress}\n                filterHandlerTypes={filterHandlerTypes}\n              />\n            </div>\n          )}\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/transaction-button-card.tsx",
    "content": "import {TransactionButton} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { TransactionButton } from \"@onflow/react-sdk\"\n\n<TransactionButton\n  label=\"Sign Transaction\"\n  transaction={{\n    cadence: GREETING_TRANSACTION,\n    args: (arg, t) => [arg(\"Hello, World!\", t.String)],\n    limit: 999,\n  }}\n  mutation={{\n    onSuccess: (data) => {\n      console.log(\"Transaction ID:\", data)\n    },\n    onError: (error) => {\n      console.error(\"Transaction failed:\", error)\n    }\n  }}\n/>`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"transaction\",\n    type: \"Parameters<typeof mutate>[0]\",\n    required: true,\n    description:\n      \"Transaction configuration object that can be passed to fcl.mutate\",\n  },\n  {\n    name: \"label\",\n    type: \"string\",\n    required: false,\n    description:\n      \"Optional label for the button (defaults to 'Execute Transaction')\",\n  },\n  {\n    name: \"mutation\",\n    type: \"UseMutationOptions<string, Error, Parameters<typeof mutate>[0]>\",\n    required: false,\n    description:\n      \"TanStack React Query mutation options for customizing behavior\",\n  },\n  {\n    name: \"variant\",\n    type: '\"primary\" | \"secondary\" | \"outline\" | \"link\"',\n    required: false,\n    description: \"The visual style variant of the button\",\n    defaultValue: '\"primary\"',\n  },\n  {\n    name: \"disabled\",\n    type: \"boolean\",\n    required: false,\n    description: \"Whether the button is disabled\",\n  },\n]\n\nexport function TransactionButtonCard() {\n  const {darkMode} = useDarkMode()\n  const [transactionResult, setTransactionResult] = useState<any>(null)\n\n  const GREETING_TRANSACTION = `\n    transaction(greeting: String) {\n      prepare(signer: &Account) {\n        log(greeting)\n      }\n    }\n  `\n\n  return (\n    <DemoCard\n      id=\"transactionbutton\"\n      title=\"<TransactionButton />\"\n      description=\"A ready-to-use transaction button component with built-in signing flow and status management.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#transactionbutton\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Transaction Signing\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Built-in wallet integration\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Status Management\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Loading and error states\n            </p>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-8 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n          <div className=\"flex justify-center\">\n            <TransactionButton\n              label=\"Sign Transaction\"\n              transaction={{\n                cadence: GREETING_TRANSACTION,\n                args: (arg, t) => [arg(\"Hello, World!\", t.String)],\n                limit: 999,\n              }}\n              mutation={{\n                onSuccess: data => {\n                  setTransactionResult({\n                    txId: data,\n                    timestamp: new Date().toISOString(),\n                  })\n                },\n                onError: error => {\n                  setTransactionResult({\n                    error: error.message,\n                    timestamp: new Date().toISOString(),\n                  })\n                },\n              }}\n            />\n          </div>\n        </div>\n\n        {transactionResult && (\n          <>\n            <div\n              className={`-mx-6 h-px ${darkMode ? \"bg-white/10\" : \"bg-black/10\"}`}\n            />\n\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center space-x-3\">\n                <div\n                  className={`p-1.5 rounded ${darkMode ? \"bg-gray-700\" : \"bg-gray-100\"}`}\n                >\n                  <svg\n                    width=\"12\"\n                    height=\"12\"\n                    viewBox=\"0 0 24 24\"\n                    fill=\"none\"\n                    stroke=\"currentColor\"\n                    strokeWidth=\"2\"\n                    className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}\n                  >\n                    <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"></path>\n                    <polyline points=\"14,2 14,8 20,8\"></polyline>\n                    <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n                    <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n                    <polyline points=\"10,9 9,9 8,9\"></polyline>\n                  </svg>\n                </div>\n                <h4\n                  className={`text-sm font-semibold uppercase tracking-wider ${\n                  darkMode ? \"text-gray-200\" : \"text-gray-700\" }`}\n                >\n                  Transaction Result\n                </h4>\n              </div>\n\n              {transactionResult.txId ? (\n                <div\n                  className={`relative p-4 rounded-lg border ${\n                    darkMode\n                      ? \"bg-green-900/20 border-green-800/50\"\n                      : \"bg-green-50 border-green-200\"\n                    }`}\n                >\n                  <div>\n                    <p\n                      className={`text-sm font-medium mb-2 ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                    >\n                      Transaction Submitted Successfully\n                    </p>\n                    <div className=\"space-y-2\">\n                      <div>\n                        <p\n                          className={`text-xs mb-1 ${darkMode ? \"text-green-400/70\" : \"text-green-600/70\"}`}\n                        >\n                          Transaction ID:\n                        </p>\n                        <p\n                          className={`text-sm font-mono break-all ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                        >\n                          {transactionResult.txId}\n                        </p>\n                      </div>\n                      <p\n                        className={`text-xs ${darkMode ? \"text-green-400/50\" : \"text-green-600/50\"}`}\n                      >\n                        {new Date(transactionResult.timestamp).toLocaleString()}\n                      </p>\n                    </div>\n                  </div>\n                </div>\n              ) : (\n                <div\n                  className={`relative p-4 rounded-lg border ${\n                    darkMode\n                      ? \"bg-red-900/20 border-red-800/50\"\n                      : \"bg-red-50 border-red-200\"\n                    }`}\n                >\n                  <div>\n                    <p\n                      className={`text-sm font-medium mb-2 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      Transaction Failed\n                    </p>\n                    <p\n                      className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      {transactionResult.error}\n                    </p>\n                    <p\n                      className={`text-xs mt-2 ${darkMode ? \"text-red-400/50\" : \"text-red-600/50\"}`}\n                    >\n                      {new Date(transactionResult.timestamp).toLocaleString()}\n                    </p>\n                  </div>\n                </div>\n              )}\n            </div>\n          </>\n        )}\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/transaction-dialog-card.tsx",
    "content": "import {TransactionButton, TransactionDialog} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { TransactionDialog } from \"@onflow/react-sdk\"\n\n<TransactionDialog open={open} onOpenChange={setOpen} txId={txId} />`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"open\",\n    type: \"boolean\",\n    required: true,\n    description: \"Controls whether the dialog is open or closed\",\n  },\n  {\n    name: \"onOpenChange\",\n    type: \"(open: boolean) => void\",\n    required: true,\n    description: \"Callback function called when the dialog open state changes\",\n  },\n  {\n    name: \"txId\",\n    type: \"string\",\n    required: false,\n    description: \"Transaction ID to display status for\",\n  },\n  {\n    name: \"onSuccess\",\n    type: \"() => void\",\n    required: false,\n    description: \"Callback function called when transaction succeeds\",\n  },\n  {\n    name: \"pendingTitle\",\n    type: \"string\",\n    required: false,\n    description:\n      \"Custom title for pending state (defaults to 'Transaction Pending')\",\n  },\n  {\n    name: \"pendingDescription\",\n    type: \"string\",\n    required: false,\n    description: \"Custom description for pending state\",\n  },\n  {\n    name: \"successTitle\",\n    type: \"string\",\n    required: false,\n    description:\n      \"Custom title for success state (defaults to 'Transaction Successful')\",\n  },\n  {\n    name: \"successDescription\",\n    type: \"string\",\n    required: false,\n    description: \"Custom description for success state\",\n  },\n  {\n    name: \"closeOnSuccess\",\n    type: \"boolean\",\n    required: false,\n    description:\n      \"Whether to automatically close dialog when transaction succeeds\",\n  },\n]\n\nexport function TransactionDialogCard() {\n  const {darkMode} = useDarkMode()\n  const [open, setOpen] = useState(false)\n  const [txId, setTxId] = useState<string | undefined>(undefined)\n  const [transactionResult, setTransactionResult] = useState<any>(null)\n\n  const GREETING_TRANSACTION = `\n    transaction(greeting: String) {\n      prepare(signer: &Account) {\n        log(greeting)\n      }\n    }\n  `\n\n  return (\n    <DemoCard\n      id=\"transactiondialog\"\n      title=\"<TransactionDialog />\"\n      description=\"A modal dialog component that displays transaction status and progress with real-time updates.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#transactiondialog\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Real-time Updates\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Live transaction status\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Modal Interface\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Overlay with progress\n            </p>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-4 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900 border-white/10\"\n              : \"bg-gray-100 border-black/5\"\n            }`}\n        >\n          <h4\n            className={`text-xs font-medium mb-3 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n          >\n            Dialog Flow\n          </h4>\n          <div className=\"flex items-center justify-between text-xs\">\n            <div className=\"flex flex-col items-center space-y-1\">\n              <div\n                className=\"w-8 h-8 rounded-full bg-flow-primary flex items-center justify-center text-black\n                  font-bold\"\n              >\n                1\n              </div>\n              <span className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}>\n                Sign Transaction\n              </span>\n            </div>\n            <div\n              className={`flex-1 h-0.5 mx-2 ${darkMode ? \"bg-gray-700\" : \"bg-gray-300\"}`}\n            ></div>\n            <div className=\"flex flex-col items-center space-y-1\">\n              <div\n                className=\"w-8 h-8 rounded-full bg-flow-primary flex items-center justify-center text-black\n                  font-bold\"\n              >\n                2\n              </div>\n              <span className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}>\n                Dialog Opens\n              </span>\n            </div>\n            <div\n              className={`flex-1 h-0.5 mx-2 ${darkMode ? \"bg-gray-700\" : \"bg-gray-300\"}`}\n            ></div>\n            <div className=\"flex flex-col items-center space-y-1\">\n              <div\n                className=\"w-8 h-8 rounded-full bg-flow-primary flex items-center justify-center text-black\n                  font-bold\"\n              >\n                3\n              </div>\n              <span className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}>\n                Status Updates\n              </span>\n            </div>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-8 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n          <div className=\"text-center space-y-4\">\n            <div className=\"flex justify-center\">\n              <TransactionButton\n                label=\"Trigger Transaction Dialog\"\n                transaction={{\n                  cadence: GREETING_TRANSACTION,\n                  args: (arg, t) => [arg(\"Hello, World!\", t.String)],\n                  limit: 999,\n                }}\n                mutation={{\n                  onSuccess: data => {\n                    setTxId(data)\n                    setOpen(true)\n                    setTransactionResult({\n                      txId: data,\n                      timestamp: new Date().toISOString(),\n                      dialogShown: true,\n                    })\n                  },\n                  onError: error => {\n                    setTransactionResult({\n                      error: error.message,\n                      timestamp: new Date().toISOString(),\n                      dialogShown: false,\n                    })\n                  },\n                }}\n              />\n            </div>\n\n            {txId && !open && (\n              <div\n                className={`relative p-3 rounded-lg border ${\n                darkMode\n                    ? \"bg-green-900/20 border-green-800/50\"\n                    : \"bg-green-50 border-green-200\"\n                }`}\n              >\n                <div className=\"flex items-center justify-center space-x-2\">\n                  <svg\n                    className=\"w-4 h-4 text-green-500\"\n                    fill=\"none\"\n                    viewBox=\"0 0 24 24\"\n                    stroke=\"currentColor\"\n                  >\n                    <path\n                      strokeLinecap=\"round\"\n                      strokeLinejoin=\"round\"\n                      strokeWidth={2}\n                      d=\"M5 13l4 4L19 7\"\n                    />\n                  </svg>\n                  <p\n                    className={`text-sm font-medium ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                  >\n                    Transaction submitted! Dialog was displayed.\n                  </p>\n                </div>\n                <button\n                  onClick={() => setOpen(true)}\n                  className={`mt-2 text-xs underline ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                >\n                  Show dialog again\n                </button>\n              </div>\n            )}\n          </div>\n        </div>\n\n        <TransactionDialog open={open} onOpenChange={setOpen} txId={txId} />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/component-cards/transaction-link-card.tsx",
    "content": "import {TransactionButton, TransactionLink} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard, type PropDefinition} from \"../ui/demo-card\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { TransactionLink } from \"@onflow/react-sdk\"\n\n<TransactionLink txId={txId} />`\n\nconst PROPS: PropDefinition[] = [\n  {\n    name: \"txId\",\n    type: \"string\",\n    required: true,\n    description: \"Transaction ID to create block explorer link for\",\n  },\n  {\n    name: \"variant\",\n    type: '\"primary\" | \"secondary\" | \"outline\" | \"link\"',\n    required: false,\n    description: \"The visual style variant of the link button\",\n    defaultValue: '\"link\"',\n  },\n]\n\nexport function TransactionLinkCard() {\n  const {darkMode} = useDarkMode()\n  const [txId, setTxId] = useState<string | undefined>(undefined)\n  const [transactionResult, setTransactionResult] = useState<any>(null)\n\n  const GREETING_TRANSACTION = `\n    transaction(greeting: String) {\n      prepare(signer: &Account) {\n        log(greeting)\n      }\n    }\n  `\n\n  return (\n    <DemoCard\n      id=\"transactionlink\"\n      title=\"<TransactionLink />\"\n      description=\"A link component that automatically generates URLs to block explorers for viewing transaction details.\"\n      code={IMPLEMENTATION_CODE}\n      props={PROPS}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/components#transactionlink\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Block Explorer\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Direct links to flowscan\n            </p>\n          </div>\n\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <h4\n              className={`text-xs font-medium mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n            >\n              Network Aware\n            </h4>\n            <p className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}>\n              Auto network detection\n            </p>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-8 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n          <div className=\"text-center space-y-6\">\n            <div className=\"flex justify-center\">\n              <TransactionButton\n                label=\"Trigger Transaction\"\n                transaction={{\n                  cadence: GREETING_TRANSACTION,\n                  args: (arg, t) => [arg(\"Hello, World!\", t.String)],\n                  limit: 999,\n                }}\n                mutation={{\n                  onSuccess: data => {\n                    setTxId(data)\n                    setTransactionResult({\n                      txId: data,\n                      timestamp: new Date().toISOString(),\n                      linkGenerated: true,\n                    })\n                  },\n                  onError: error => {\n                    setTransactionResult({\n                      error: error.message,\n                      timestamp: new Date().toISOString(),\n                      linkGenerated: false,\n                    })\n                  },\n                }}\n              />\n            </div>\n\n            {txId && (\n              <div\n                className={`relative p-4 rounded-lg border ${\n                darkMode\n                    ? \"bg-green-900/20 border-green-800/50\"\n                    : \"bg-green-50 border-green-200\"\n                }`}\n              >\n                <div className=\"space-y-3\">\n                  <div className=\"flex items-center justify-center space-x-2\">\n                    <svg\n                      className=\"w-5 h-5 text-green-500\"\n                      fill=\"none\"\n                      viewBox=\"0 0 24 24\"\n                      stroke=\"currentColor\"\n                    >\n                      <path\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                        strokeWidth={2}\n                        d=\"M5 13l4 4L19 7\"\n                      />\n                    </svg>\n                    <p\n                      className={`font-medium ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                    >\n                      Transaction Submitted!\n                    </p>\n                  </div>\n\n                  <div className=\"text-center\">\n                    <TransactionLink txId={txId} />\n                  </div>\n\n                  <div\n                    className={`text-xs font-mono text-center p-2 rounded ${\n                    darkMode\n                        ? \"bg-gray-800 text-gray-400\"\n                        : \"bg-gray-100 text-gray-600\"\n                    }`}\n                  >\n                    Transaction ID: {txId}\n                  </div>\n                </div>\n              </div>\n            )}\n\n            {!txId && (\n              <div className=\"text-center py-6\">\n                <svg\n                  className=\"w-12 h-12 mx-auto mb-3 opacity-30\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={1.5}\n                    d=\"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n                >\n                  Submit a transaction to see the block explorer link\n                </p>\n              </div>\n            )}\n          </div>\n        </div>\n\n        {transactionResult && (\n          <>\n            <div\n              className={`-mx-6 h-px ${darkMode ? \"bg-white/10\" : \"bg-black/10\"}`}\n            />\n\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center space-x-3\">\n                <div\n                  className={`p-1.5 rounded ${darkMode ? \"bg-gray-700\" : \"bg-gray-100\"}`}\n                >\n                  <svg\n                    width=\"12\"\n                    height=\"12\"\n                    viewBox=\"0 0 24 24\"\n                    fill=\"none\"\n                    stroke=\"currentColor\"\n                    strokeWidth=\"2\"\n                    className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}\n                  >\n                    <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"></path>\n                    <polyline points=\"14,2 14,8 20,8\"></polyline>\n                    <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n                    <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n                    <polyline points=\"10,9 9,9 8,9\"></polyline>\n                  </svg>\n                </div>\n                <h4\n                  className={`text-sm font-semibold uppercase tracking-wider ${\n                  darkMode ? \"text-gray-200\" : \"text-gray-700\" }`}\n                >\n                  Transaction Result\n                </h4>\n              </div>\n\n              {transactionResult.txId ? (\n                <div\n                  className={`relative p-4 rounded-lg border ${\n                    darkMode\n                      ? \"bg-green-900/20 border-green-800/50\"\n                      : \"bg-green-50 border-green-200\"\n                    }`}\n                >\n                  <div>\n                    <p\n                      className={`text-sm font-medium mb-2 ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                    >\n                      Transaction Submitted & Link Generated\n                    </p>\n                    <div className=\"space-y-2\">\n                      <div>\n                        <p\n                          className={`text-xs mb-1 ${darkMode ? \"text-green-400/70\" : \"text-green-600/70\"}`}\n                        >\n                          Transaction ID:\n                        </p>\n                        <p\n                          className={`text-sm font-mono break-all ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                        >\n                          {transactionResult.txId}\n                        </p>\n                      </div>\n                      <p\n                        className={`text-xs ${darkMode ? \"text-green-400/50\" : \"text-green-600/50\"}`}\n                      >\n                        {new Date(transactionResult.timestamp).toLocaleString()}\n                      </p>\n                    </div>\n                  </div>\n                </div>\n              ) : (\n                <div\n                  className={`relative p-4 rounded-lg border ${\n                    darkMode\n                      ? \"bg-red-900/20 border-red-800/50\"\n                      : \"bg-red-50 border-red-200\"\n                    }`}\n                >\n                  <div>\n                    <p\n                      className={`text-sm font-medium mb-2 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      Transaction Failed\n                    </p>\n                    <p\n                      className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      {transactionResult.error}\n                    </p>\n                    <p\n                      className={`text-xs mt-2 ${darkMode ? \"text-red-400/50\" : \"text-red-600/50\"}`}\n                    >\n                      {new Date(transactionResult.timestamp).toLocaleString()}\n                    </p>\n                  </div>\n                </div>\n              )}\n            </div>\n          </>\n        )}\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/content-section.tsx",
    "content": "import {PlusGrid, PlusGridRow} from \"./ui/plus-grid\"\nimport {StarterBanner} from \"./starter-banner\"\n\n// Import hook cards\nimport {UseFlowCurrentUserCard} from \"./hook-cards/use-flow-current-user-card\"\nimport {UseFlowAccountCard} from \"./hook-cards/use-flow-account-card\"\nimport {UseFlowBlockCard} from \"./hook-cards/use-flow-block-card\"\nimport {UseFlowChainIdCard} from \"./hook-cards/use-flow-chain-id-card\"\nimport {UseFlowConfigCard} from \"./hook-cards/use-flow-config-card\"\nimport {UseFlowQueryCard} from \"./hook-cards/use-flow-query-card\"\nimport {UseFlowQueryRawCard} from \"./hook-cards/use-flow-query-raw-card\"\nimport {UseFlowMutateCard} from \"./hook-cards/use-flow-mutate-card\"\nimport {UseFlowEventsCard} from \"./hook-cards/use-flow-events-card\"\nimport {UseFlowTransactionStatusCard} from \"./hook-cards/use-flow-transaction-status-card\"\nimport {UseFlowRevertibleRandomCard} from \"./hook-cards/use-flow-revertible-random-card\"\nimport {UseFlowScheduledTransactionCard} from \"./hook-cards/use-flow-scheduled-transaction-card\"\nimport {UseCrossVmBridgeNftFromEvmCard} from \"./hook-cards/use-cross-vm-bridge-nft-from-evm-card\"\nimport {UseCrossVmBridgeNftToEvmCard} from \"./hook-cards/use-cross-vm-bridge-nft-to-evm-card\"\nimport {UseCrossVmBridgeTokenFromEvmCard} from \"./hook-cards/use-cross-vm-bridge-token-from-evm-card\"\nimport {UseCrossVmBridgeTokenToEvmCard} from \"./hook-cards/use-cross-vm-bridge-token-to-evm-card\"\nimport {UseFlowNftMetadataCard} from \"./hook-cards/use-flow-nft-metadata-card\"\n\n// Import setup cards\nimport {InstallationCard} from \"./setup-cards/installation-card\"\n\n// Import advanced cards\nimport {DarkModeCard} from \"./advanced-cards/dark-mode-card\"\nimport {ThemingCard} from \"./advanced-cards/theming-card\"\n\n// Import component cards\nimport {ConnectCard} from \"./component-cards/connect-card\"\nimport {ProfileCard} from \"./component-cards/profile-card\"\nimport {TransactionButtonCard} from \"./component-cards/transaction-button-card\"\nimport {TransactionDialogCard} from \"./component-cards/transaction-dialog-card\"\nimport {TransactionLinkCard} from \"./component-cards/transaction-link-card\"\nimport {DemoNftCard} from \"./component-cards/demo-nft-card\"\nimport {ScheduledTransactionListDemo} from \"./component-cards/scheduled-transaction-list-demo\"\n\nexport function ContentSection() {\n  return (\n    <section id=\"content-section\" className=\"\">\n      <PlusGrid>\n        <PlusGridRow>\n          <div className=\"my-12 md:my-24 mt-8 md:mt-16\">\n            <div className=\"text-left mb-8 md:mb-16\">\n              <h2 className=\"text-3xl md:text-5xl font-bold text-gray-900 dark:text-white mb-3 md:mb-4\">\n                Getting Started\n              </h2>\n              <p className=\"text-base md:text-lg text-gray-600 dark:text-gray-300 max-w-3xl leading-relaxed\">\n                Install and configure the Flow React SDK to start building apps\n                on Flow.\n              </p>\n            </div>\n\n            <StarterBanner />\n\n            <InstallationCard />\n          </div>\n\n          <div className=\"mb-12 md:mb-24\">\n            <div className=\"text-left mb-8 md:mb-16\">\n              <h2 className=\"text-3xl md:text-5xl font-bold text-gray-900 dark:text-white mb-3 md:mb-4\">\n                React Components\n              </h2>\n              <p className=\"text-base md:text-lg text-gray-600 dark:text-gray-300 max-w-3xl leading-relaxed\">\n                Pre-built UI components for common Flow blockchain interactions.\n                Drop them into your app to ship faster.\n              </p>\n            </div>\n\n            <ConnectCard />\n            <ProfileCard />\n            <TransactionButtonCard />\n            <TransactionDialogCard />\n            <TransactionLinkCard />\n            <DemoNftCard />\n            <ScheduledTransactionListDemo />\n          </div>\n\n          <div className=\"mb-12 md:mb-24\">\n            <div className=\"text-left mb-8 md:mb-16\">\n              <h2 className=\"text-3xl md:text-5xl font-bold text-gray-900 dark:text-white mb-3 md:mb-4\">\n                React Hooks\n              </h2>\n              <p className=\"text-base md:text-lg text-gray-600 dark:text-gray-300 max-w-3xl leading-relaxed\">\n                Powerful React hooks for interacting with the Flow blockchain.\n                Each hook provides a simple interface for complex blockchain\n                operations.\n              </p>\n            </div>\n\n            <UseFlowCurrentUserCard />\n            <UseFlowAccountCard />\n            <UseFlowBlockCard />\n            <UseFlowChainIdCard />\n            <UseFlowConfigCard />\n            <UseFlowQueryCard />\n            <UseFlowQueryRawCard />\n            <UseFlowMutateCard />\n            <UseFlowEventsCard />\n            <UseFlowRevertibleRandomCard />\n            <UseFlowTransactionStatusCard />\n            <UseCrossVmBridgeNftFromEvmCard />\n            <UseCrossVmBridgeNftToEvmCard />\n            <UseCrossVmBridgeTokenFromEvmCard />\n            <UseCrossVmBridgeTokenToEvmCard />\n            <UseFlowNftMetadataCard />\n            <UseFlowScheduledTransactionCard />\n          </div>\n\n          <div className=\"mb-12 md:mb-24\">\n            <div className=\"text-left mb-8 md:mb-16\">\n              <h2 className=\"text-3xl md:text-5xl font-bold text-gray-900 dark:text-white mb-3 md:mb-4\">\n                Advanced Features\n              </h2>\n              <p className=\"text-base md:text-lg text-gray-600 dark:text-gray-300 max-w-3xl leading-relaxed\">\n                Customize and extend the Flow React SDK with advanced theming,\n                dark mode controls, and configuration options.\n              </p>\n            </div>\n\n            <DarkModeCard />\n            <ThemingCard />\n          </div>\n        </PlusGridRow>\n      </PlusGrid>\n    </section>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/content-sidebar.tsx",
    "content": "import {useState, useEffect, useRef} from \"react\"\nimport {PlusGridIcon} from \"./ui/plus-grid\"\n\ninterface SidebarItem {\n  id: string\n  label: string\n  category: \"setup\" | \"components\" | \"hooks\" | \"advanced\"\n  description: string\n}\n\nconst sidebarItems: SidebarItem[] = [\n  // Setup section\n  {\n    id: \"installation\",\n    label: \"Installation & Setup\",\n    category: \"setup\",\n    description: \"Install and configure the React SDK\",\n  },\n\n  // Components section\n  {\n    id: \"connect\",\n    label: \"Connect\",\n    category: \"components\",\n    description: \"Wallet connection component\",\n  },\n  {\n    id: \"profile\",\n    label: \"Profile\",\n    category: \"components\",\n    description: \"Standalone profile display\",\n  },\n  {\n    id: \"transactionbutton\",\n    label: \"Transaction Button\",\n    category: \"components\",\n    description: \"Transaction execution button\",\n  },\n  {\n    id: \"transactiondialog\",\n    label: \"Transaction Dialog\",\n    category: \"components\",\n    description: \"Transaction confirmation dialog\",\n  },\n  {\n    id: \"transactionlink\",\n    label: \"Transaction Link\",\n    category: \"components\",\n    description: \"Transaction link component\",\n  },\n  {\n    id: \"nftcard\",\n    label: \"NFT Card\",\n    category: \"components\",\n    description: \"NFT card component\",\n  },\n  {\n    id: \"scheduledtransactionlist\",\n    label: \"Scheduled Transaction List\",\n    category: \"components\",\n    description: \"List of scheduled transactions\",\n  },\n\n  // Hooks section\n  {\n    id: \"useflowcurrentuser\",\n    label: \"Current User\",\n    category: \"hooks\",\n    description: \"Manage user authentication\",\n  },\n  {\n    id: \"useflowaccount\",\n    label: \"Account\",\n    category: \"hooks\",\n    description: \"Fetch account information\",\n  },\n  {\n    id: \"useflowblock\",\n    label: \"Block\",\n    category: \"hooks\",\n    description: \"Get blockchain block data\",\n  },\n  {\n    id: \"useflowchainid\",\n    label: \"Chain ID\",\n    category: \"hooks\",\n    description: \"Get current chain ID\",\n  },\n  {\n    id: \"useflowconfig\",\n    label: \"Config\",\n    category: \"hooks\",\n    description: \"Access Flow configuration\",\n  },\n  {\n    id: \"useflowquery\",\n    label: \"Query\",\n    category: \"hooks\",\n    description: \"Execute Flow scripts\",\n  },\n  {\n    id: \"useflowqueryraw\",\n    label: \"Query Raw\",\n    category: \"hooks\",\n    description: \"Execute raw Flow scripts\",\n  },\n  {\n    id: \"useflowmutate\",\n    label: \"Mutate\",\n    category: \"hooks\",\n    description: \"Send Flow transactions\",\n  },\n  {\n    id: \"useflowevents\",\n    label: \"Events\",\n    category: \"hooks\",\n    description: \"Listen to blockchain events\",\n  },\n  {\n    id: \"useflowrevertiblerandom\",\n    label: \"Revertible Random\",\n    category: \"hooks\",\n    description: \"Generate random numbers\",\n  },\n  {\n    id: \"useflowtransactionstatus\",\n    label: \"Transaction Status\",\n    category: \"hooks\",\n    description: \"Track transaction status\",\n  },\n  {\n    id: \"usecrossvmbridgenftfromevm\",\n    label: \"Bridge NFT from EVM\",\n    category: \"hooks\",\n    description: \"Bridge NFTs from EVM to Cadence\",\n  },\n  {\n    id: \"usecrossvmbridgenfttoevm\",\n    label: \"Bridge NFT to EVM\",\n    category: \"hooks\",\n    description: \"Bridge NFTs from Cadence to EVM\",\n  },\n  {\n    id: \"usecrossvmbridgetokenfromevm\",\n    label: \"Bridge Token from EVM\",\n    category: \"hooks\",\n    description: \"Bridge tokens from EVM to Cadence\",\n  },\n  {\n    id: \"usecrossvmbridgetokentoevm\",\n    label: \"Bridge Token to EVM\",\n    category: \"hooks\",\n    description: \"Bridge tokens from Cadence to EVM\",\n  },\n  {\n    id: \"useflownftmetadata\",\n    label: \"NFT Metadata\",\n    category: \"hooks\",\n    description: \"Fetch NFT metadata and traits\",\n  },\n  {\n    id: \"useflowscheduledtransaction\",\n    label: \"Scheduled Transactions\",\n    category: \"hooks\",\n    description: \"Manage Scheduled Transactions\",\n  },\n\n  // Advanced section\n  {\n    id: \"darkmode\",\n    label: \"Dark Mode Control\",\n    category: \"advanced\",\n    description: \"Dynamic theme switching\",\n  },\n  {\n    id: \"theming\",\n    label: \"Custom Theming\",\n    category: \"advanced\",\n    description: \"Customize component appearance\",\n  },\n]\n\ninterface ContentSidebarProps {\n  darkMode: boolean\n  onItemClick?: () => void\n}\n\nexport function ContentSidebar({darkMode, onItemClick}: ContentSidebarProps) {\n  const [activeSection, setActiveSection] = useState<string>(\"\")\n  const navRef = useRef<HTMLElement>(null)\n  const scrollLockRef = useRef<number | null>(null)\n\n  const setupItems = sidebarItems.filter(item => item.category === \"setup\")\n  const componentsItems = sidebarItems.filter(\n    item => item.category === \"components\"\n  )\n  const hooksItems = sidebarItems.filter(item => item.category === \"hooks\")\n  const advancedItems = sidebarItems.filter(\n    item => item.category === \"advanced\"\n  )\n\n  const scrollToElement = (id: string, isInitialLoad = false) => {\n    const element = document.getElementById(id)\n    if (element) {\n      // Save current sidebar scroll position if nav ref is available (but not on initial load)\n      if (navRef.current && !isInitialLoad) {\n        scrollLockRef.current = navRef.current.scrollTop\n      }\n\n      // Update the URL hash without reloading the page\n      window.history.replaceState(null, \"\", `#${id}`)\n\n      // Calculate position manually to ensure consistent 60px from top\n      const absoluteElementTop = element.offsetTop\n      const scrollMarginTop = 60\n      const targetPosition = absoluteElementTop - scrollMarginTop\n      const maxScroll =\n        document.documentElement.scrollHeight - window.innerHeight\n\n      // Use the minimum of target position and max scroll to handle elements at the bottom\n      const scrollPosition = Math.min(targetPosition, maxScroll)\n\n      window.scrollTo({\n        top: scrollPosition,\n        behavior: \"smooth\",\n      })\n\n      // Call onItemClick callback (for closing mobile sidebar)\n      if (!isInitialLoad && onItemClick) {\n        onItemClick()\n      }\n\n      // Unlock after scroll animation completes (only if we locked it)\n      if (!isInitialLoad) {\n        setTimeout(() => {\n          scrollLockRef.current = null\n        }, 1000)\n      }\n    }\n  }\n\n  // Prevent sidebar from scrolling when clicking buttons\n  useEffect(() => {\n    const nav = navRef.current\n    if (!nav) return\n\n    const handleScroll = () => {\n      if (scrollLockRef.current !== null) {\n        nav.scrollTop = scrollLockRef.current\n      }\n    }\n\n    nav.addEventListener(\"scroll\", handleScroll)\n    return () => nav.removeEventListener(\"scroll\", handleScroll)\n  }, [])\n\n  // Track which section is currently visible\n  useEffect(() => {\n    // Check if there's a hash in the URL on initial load\n    const hash = window.location.hash.slice(1) // Remove the # character\n    if (hash) {\n      setActiveSection(hash)\n\n      // Manually trigger scroll since browser isn't doing it automatically\n      const scrollToHash = () => {\n        const element = document.getElementById(hash)\n        if (element) {\n          // Use scrollIntoView with auto behavior (instant, not smooth) that respects scroll-margin-top\n          element.scrollIntoView({behavior: \"auto\", block: \"start\"})\n        }\n      }\n\n      // Try multiple times to ensure content is loaded\n      requestAnimationFrame(() => {\n        scrollToHash()\n        setTimeout(scrollToHash, 100)\n        setTimeout(scrollToHash, 300)\n        setTimeout(scrollToHash, 500)\n      })\n    }\n\n    const observer = new IntersectionObserver(\n      entries => {\n        // Find the entry with the highest intersection ratio that's actually visible\n        const visibleEntries = entries.filter(entry => entry.isIntersecting)\n        if (visibleEntries.length > 0) {\n          // Sort by intersection ratio and pick the most visible one\n          const mostVisible = visibleEntries.reduce((prev, current) =>\n            current.intersectionRatio > prev.intersectionRatio ? current : prev\n          )\n          setActiveSection(mostVisible.target.id)\n        }\n      },\n      {\n        threshold: [0.1, 0.3, 0.5, 0.7, 0.9],\n        rootMargin: \"-80px 0px -40% 0px\", // Account for header height and give more weight to top sections\n      }\n    )\n\n    sidebarItems.forEach(item => {\n      const element = document.getElementById(item.id)\n      if (element) {\n        observer.observe(element)\n      }\n    })\n\n    return () => observer.disconnect()\n  }, [])\n\n  const SidebarSection = ({\n    title,\n    items,\n    icon,\n  }: {\n    title: string\n    items: SidebarItem[]\n    icon: React.ReactNode\n  }) => (\n    <div className=\"relative\">\n      <div className=\"relative mb-4\">\n        <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n        <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n        <div\n          className={`flex items-center space-x-3 p-3 border rounded-lg ${\n            darkMode\n              ? \"border-white/10 bg-gray-800/30\"\n              : \"border-black/5 bg-gray-50/30\"\n            }`}\n        >\n          <div\n            className={`p-1.5 rounded ${darkMode ? \"bg-gray-700\" : \"bg-white\"}`}\n          >\n            {icon}\n          </div>\n          <h3\n            className={`text-sm font-semibold uppercase tracking-wider ${\n              darkMode ? \"text-gray-200\" : \"text-gray-700\" }`}\n          >\n            {title}\n          </h3>\n        </div>\n      </div>\n\n      <ul className=\"space-y-2\">\n        {items.map(item => {\n          const isActive = activeSection === item.id\n          return (\n            <li key={item.id} className=\"relative\">\n              <button\n                onClick={() => scrollToElement(item.id)}\n                aria-label={`Navigate to ${item.label} section`}\n                className={`w-full text-left px-4 py-3 border text-sm transition-all duration-200 group\n                focus:outline-none focus:ring-2 focus:ring-flow-primary/50 ${\n                isActive\n                    ? darkMode\n                      ? \"bg-flow-primary/10 text-flow-primary border border-flow-primary/20 shadow-sm\"\n                      : \"bg-flow-primary/10 text-flow-600 border border-flow-primary/20 shadow-sm\"\n                    : darkMode\n                      ? `text-gray-300 hover:text-white hover:bg-gray-700/30 border-transparent\n                        hover:border-white/10`\n                      : `text-gray-600 hover:text-gray-900 hover:bg-gray-50 border-transparent\n                        hover:border-black/5`\n                }`}\n              >\n                <div className=\"flex items-center justify-between mb-1\">\n                  <span className=\"font-medium\">{item.label}</span>\n                  {isActive && (\n                    <div className=\"w-2 h-2 bg-flow-primary animate-pulse\"></div>\n                  )}\n                </div>\n                <div\n                  className={`text-xs leading-relaxed ${\n                  isActive\n                      ? darkMode\n                        ? \"text-flow-primary/80\"\n                        : \"text-flow-600/80\"\n                      : darkMode\n                        ? \"text-gray-400\"\n                        : \"text-gray-500\"\n                  }`}\n                >\n                  {item.description}\n                </div>\n              </button>\n            </li>\n          )\n        })}\n      </ul>\n    </div>\n  )\n\n  return (\n    <nav\n      ref={navRef}\n      className={`relative w-full h-full border rounded-xl ${\n        darkMode\n          ? \"bg-gray-800/30 border-white/10\"\n          : \"bg-gray-50/50 border-black/5\"\n        } p-6 space-y-6 overflow-y-auto scrollbar-hide`}\n      role=\"navigation\"\n      aria-label=\"Table of contents\"\n    >\n      <svg\n        viewBox=\"0 0 15 15\"\n        className={`absolute -top-2 -left-2 size-[15px] z-10 ${\n          darkMode ? \"fill-white/20\" : \"fill-black/10\" }`}\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n      <svg\n        viewBox=\"0 0 15 15\"\n        className={`absolute -bottom-2 -left-2 size-[15px] z-10 ${\n          darkMode ? \"fill-white/20\" : \"fill-black/10\" }`}\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n      <SidebarSection\n        title=\"Setup\"\n        items={setupItems}\n        icon={\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n          >\n            <path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\" />\n            <circle cx=\"12\" cy=\"12\" r=\"3\" />\n          </svg>\n        }\n      />\n\n      <SidebarSection\n        title=\"Components\"\n        items={componentsItems}\n        icon={\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n          >\n            <rect x=\"2\" y=\"2\" width=\"8\" height=\"8\" rx=\"1\" />\n            <rect x=\"14\" y=\"2\" width=\"8\" height=\"8\" rx=\"1\" />\n            <rect x=\"2\" y=\"14\" width=\"8\" height=\"8\" rx=\"1\" />\n            <rect x=\"14\" y=\"14\" width=\"8\" height=\"8\" rx=\"1\" />\n          </svg>\n        }\n      />\n\n      <SidebarSection\n        title=\"Hooks\"\n        items={hooksItems}\n        icon={\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n          >\n            <path d=\"M12 2v6\" strokeLinecap=\"round\" />\n            <path\n              d=\"M12 8a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6\"\n              strokeLinecap=\"round\"\n            />\n            <path d=\"M6 14a2 2 0 0 0 2 2 2 2 0 0 0 2-2\" strokeLinecap=\"round\" />\n          </svg>\n        }\n      />\n\n      <SidebarSection\n        title=\"Advanced\"\n        items={advancedItems}\n        icon={\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n          >\n            <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z\" />\n          </svg>\n        }\n      />\n\n      <div className=\"pt-8 border-t border-gray-200/20\">\n        <h4\n          className={`text-xs font-semibold uppercase tracking-wider mb-3 ${\n            darkMode ? \"text-gray-400\" : \"text-gray-500\" }`}\n        >\n          Quick Links\n        </h4>\n        <div className=\"space-y-2\">\n          <a\n            href=\"https://developers.flow.com/tools/fcl-js\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            className={`flex items-center space-x-2 text-sm transition-colors duration-200 ${\n              darkMode\n                ? \"text-gray-400 hover:text-flow-primary\"\n                : \"text-gray-600 hover:text-flow-600\"\n              }`}\n          >\n            <svg\n              width=\"14\"\n              height=\"14\"\n              viewBox=\"0 0 24 24\"\n              fill=\"none\"\n              stroke=\"currentColor\"\n              strokeWidth=\"2\"\n            >\n              <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n            </svg>\n            <span>Documentation</span>\n          </a>\n          <a\n            href=\"https://github.com/onflow/fcl-js/tree/master/packages/react-sdk\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            className={`flex items-center space-x-2 text-sm transition-colors duration-200 ${\n              darkMode\n                ? \"text-gray-400 hover:text-flow-primary\"\n                : \"text-gray-600 hover:text-flow-600\"\n              }`}\n          >\n            <svg\n              width=\"14\"\n              height=\"14\"\n              viewBox=\"0 0 24 24\"\n              fill=\"none\"\n              stroke=\"currentColor\"\n              strokeWidth=\"2\"\n            >\n              <path d=\"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22\" />\n            </svg>\n            <span>GitHub</span>\n          </a>\n        </div>\n      </div>\n    </nav>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/flow-provider-wrapper.tsx",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport {FlowProvider} from \"@onflow/react-sdk\"\nimport React, {createContext, useCallback, useContext, useState} from \"react\"\n\n// Dark mode context\ninterface DarkModeContextType {\n  darkMode: boolean\n  toggleDarkMode: () => void\n}\n\n// Network switching context\ninterface NetworkSwitchContextType {\n  currentNetwork: DemoFlowNetwork\n  switchNetwork: (network: DemoFlowNetwork) => Promise<void>\n  isNetworkSwitching: boolean\n}\n\n// Flow configuration type\ninterface FlowConfig {\n  accessNodeUrl: string\n  discoveryWallet: string\n  discoveryAuthnEndpoint: string\n  flowNetwork: string\n}\n\nconst DarkModeContext = createContext<DarkModeContextType | undefined>(\n  undefined\n)\n\nconst NetworkSwitchContext = createContext<\n  NetworkSwitchContextType | undefined\n>(undefined)\n\nexport const useDarkMode = () => {\n  const context = useContext(DarkModeContext)\n  if (!context) {\n    throw new Error(\"useDarkMode must be used within a DarkModeProvider\")\n  }\n  return context\n}\n\nexport const useNetworkSwitch = () => {\n  const context = useContext(NetworkSwitchContext)\n  if (!context) {\n    throw new Error(\n      \"useNetworkSwitch must be used within a NetworkSwitchProvider\"\n    )\n  }\n  return context\n}\n\n// Standard networks supported by the demo\ntype DemoFlowNetwork = \"emulator\" | \"testnet\" | \"mainnet\"\n\nconst flowNetwork =\n  (import.meta.env.VITE_FLOW_NETWORK as DemoFlowNetwork) || \"emulator\"\nconst flowConfig: Record<DemoFlowNetwork, FlowConfig> = {\n  emulator: {\n    accessNodeUrl: \"http://localhost:8888\",\n    discoveryWallet: \"http://localhost:8701/fcl/authn\",\n    discoveryAuthnEndpoint: \"http://localhost:8701/fcl/authn\",\n    flowNetwork: \"local\" as const,\n  },\n  testnet: {\n    accessNodeUrl: \"https://rest-testnet.onflow.org\",\n    discoveryWallet: \"https://fcl-discovery.onflow.org/testnet/authn\",\n    discoveryAuthnEndpoint:\n      \"https://fcl-discovery.onflow.org/api/testnet/authn\",\n    flowNetwork: \"testnet\" as const,\n  },\n  mainnet: {\n    accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n    discoveryWallet: \"https://fcl-discovery.onflow.org/mainnet/authn\",\n    discoveryAuthnEndpoint:\n      \"https://fcl-discovery.onflow.org/api/mainnet/authn\",\n    flowNetwork: \"mainnet\" as const,\n  },\n}\n\n// Network switching provider component\nfunction NetworkSwitchProvider({children}: {children: React.ReactNode}) {\n  const [currentNetwork, setCurrentNetwork] =\n    useState<DemoFlowNetwork>(flowNetwork)\n  const [isNetworkSwitching, setIsNetworkSwitching] = useState(false)\n\n  const switchNetwork = useCallback(\n    async (network: DemoFlowNetwork) => {\n      setIsNetworkSwitching(true)\n\n      try {\n        // Check if user is currently authenticated\n        const currentUser = await fcl.currentUser.snapshot()\n        const wasAuthenticated = currentUser.loggedIn\n\n        // If user is authenticated, unauthenticate them first\n        if (wasAuthenticated) {\n          fcl.unauthenticate()\n        }\n\n        // Update FCL configuration for new network\n        const config = flowConfig[network]\n        fcl.config({\n          \"accessNode.api\": config.accessNodeUrl,\n          \"discovery.wallet\": config.discoveryWallet,\n          \"flow.network\": config.flowNetwork,\n          \"app.detail.title\": \"Demo App\",\n          \"app.detail.url\": window.location.origin,\n          \"app.detail.icon\":\n            \"https://avatars.githubusercontent.com/u/62387156?v=4\",\n          \"fcl.limit\": 1000,\n          \"fcl.walletconnect.projectId\": \"9b70cfa398b2355a5eb9b1cf99f4a981\",\n        })\n\n        // Update local state\n        setCurrentNetwork(network)\n      } catch (error) {\n        console.error(\"Failed to switch network:\", error)\n      } finally {\n        setIsNetworkSwitching(false)\n      }\n    },\n    [currentNetwork]\n  )\n\n  return (\n    <NetworkSwitchContext.Provider\n      value={{currentNetwork, switchNetwork, isNetworkSwitching}}\n    >\n      {children}\n    </NetworkSwitchContext.Provider>\n  )\n}\n\n// Inner component that can access the network switch context\nfunction FlowProviderInner({\n  children,\n  darkMode,\n}: {\n  children: React.ReactNode\n  darkMode: boolean\n}) {\n  const {currentNetwork} = useNetworkSwitch()\n\n  return (\n    <FlowProvider\n      key={currentNetwork} // Force re-mount when network changes\n      config={{\n        ...flowConfig[currentNetwork],\n        appDetailTitle: \"Demo App\",\n        appDetailUrl: window.location.origin,\n        appDetailIcon: \"https://avatars.githubusercontent.com/u/62387156?v=4\",\n        appDetailDescription: \"Your app description\",\n        computeLimit: 1000,\n        walletconnectProjectId: \"9b70cfa398b2355a5eb9b1cf99f4a981\",\n        flowNetwork: currentNetwork,\n      }}\n      colorMode={darkMode ? \"dark\" : \"light\"}\n    >\n      {children}\n    </FlowProvider>\n  )\n}\n\nexport default function FlowProviderWrapper({\n  children,\n  darkMode,\n  toggleDarkMode,\n}: {\n  children: React.ReactNode\n  darkMode: boolean\n  toggleDarkMode: () => void\n}) {\n  return (\n    <DarkModeContext.Provider value={{darkMode, toggleDarkMode}}>\n      <NetworkSwitchProvider>\n        <FlowProviderInner darkMode={darkMode}>{children}</FlowProviderInner>\n      </NetworkSwitchProvider>\n    </DarkModeContext.Provider>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/footer.tsx",
    "content": "import {PlusGridRow, PlusGridItem} from \"./ui/plus-grid\"\nimport {useDarkMode} from \"./flow-provider-wrapper\"\n\nexport function Footer() {\n  const {darkMode} = useDarkMode()\n\n  const footerLinks = {\n    \"Developer Resources\": [\n      {\n        name: \"FCL Documentation\",\n        href: \"https://developers.flow.com/tools/fcl-js\",\n      },\n      {\n        name: \"React SDK Docs\",\n        href: \"https://developers.flow.com/tools/fcl-js/react-sdk\",\n      },\n      {name: \"Flow CLI\", href: \"https://developers.flow.com/tools/flow-cli\"},\n      {name: \"Cadence Language\", href: \"https://developers.flow.com/cadence\"},\n    ],\n    \"Flow Network\": [\n      {name: \"Flow Blockchain\", href: \"https://flow.com\"},\n      {name: \"Flow Explorer\", href: \"https://flowscan.org\"},\n      {name: \"Flow Port\", href: \"https://port.onflow.org\"},\n      {name: \"Flow Faucet\", href: \"https://testnet-faucet.onflow.org\"},\n    ],\n    Community: [\n      {\n        name: \"GitHub\",\n        href: \"https://github.com/onflow/fcl-js/tree/master/packages/react-sdk\",\n      },\n      {name: \"Discord\", href: \"https://discord.gg/flow\"},\n      {name: \"Forum\", href: \"https://forum.onflow.org\"},\n      {name: \"Twitter\", href: \"https://twitter.com/flow_blockchain\"},\n    ],\n    \"Tools & APIs\": [\n      {\n        name: \"Flow Client Library\",\n        href: \"https://developers.flow.com/tools/fcl-js\",\n      },\n      {name: \"Access API\", href: \"https://developers.flow.com/http-api\"},\n      {name: \"Emulator\", href: \"https://developers.flow.com/tools/emulator\"},\n      {\n        name: \"NFT Standards\",\n        href: \"https://developers.flow.com/cadence/tutorial/non-fungible-tokens\",\n      },\n    ],\n  }\n\n  return (\n    <footer\n      className={`relative ${\n        darkMode\n          ? \"bg-gray-900/30 border-gray-700/50\"\n          : \"bg-gray-50/30 border-gray-200/50\"\n        }`}\n    >\n      <div className=\"max-w-7xl mx-auto pb-16\">\n        <PlusGridRow showTopLines={false}>\n          <PlusGridItem>\n            <div className=\"mb-12\">\n              <div className=\"flex items-center space-x-4 mb-6 mt-8\">\n                <img\n                  src=\"/assets/icon.png\"\n                  alt=\"Flow\"\n                  className=\"w-8 h-8 rounded-lg\"\n                />\n                <div className=\"flex flex-col\">\n                  <span\n                    className={`text-sm font-medium tracking-wide ${\n                      darkMode ? \"text-gray-400\" : \"text-gray-600\" }`}\n                  >\n                    Flow\n                  </span>\n                  <h3\n                    className={`text-lg font-black tracking-tight -mt-1 font-mono ${\n                      darkMode ? \"text-white\" : \"text-black\" }`}\n                  >\n                    React SDK\n                  </h3>\n                </div>\n              </div>\n\n              <p\n                className={`text-lg max-w-2xl ${darkMode ? \"text-gray-300\" : \"text-gray-600\"}`}\n              >\n                The Flow React SDK provides everything you need to build amazing\n                Web3 applications. Start building with ready to use components\n                and hooks and ship faster.\n              </p>\n            </div>\n\n            <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12\">\n              {Object.entries(footerLinks).map(([category, links]) => (\n                <div key={category}>\n                  <h4\n                    className={`font-semibold text-sm uppercase tracking-wider mb-4 ${\n                    darkMode ? \"text-gray-200\" : \"text-gray-900\" }`}\n                  >\n                    {category}\n                  </h4>\n                  <ul className=\"space-y-3\">\n                    {links.map(link => (\n                      <li key={link.name}>\n                        <a\n                          href={link.href}\n                          target=\"_blank\"\n                          rel=\"noopener noreferrer\"\n                          className={`text-sm transition-colors duration-200 hover:text-flow-primary ${\n                          darkMode ? \"text-gray-400\" : \"text-gray-600\" }`}\n                        >\n                          {link.name}\n                        </a>\n                      </li>\n                    ))}\n                  </ul>\n                </div>\n              ))}\n            </div>\n\n            <div\n              className={`p-6 rounded-xl border mb-12 ${\n                darkMode\n                  ? \"bg-gray-800/50 border-gray-700/50\"\n                  : \"bg-white border-gray-200\"\n                }`}\n            >\n              <div\n                className=\"flex flex-col lg:flex-row items-start lg:items-center justify-between space-y-4\n                  lg:space-y-0\"\n              >\n                <div>\n                  <h4\n                    className={`font-semibold text-lg mb-2 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n                  >\n                    Stay Updated\n                  </h4>\n                  <p\n                    className={`text-sm ${darkMode ? \"text-gray-300\" : \"text-gray-600\"}`}\n                  >\n                    Get the latest updates on Flow development tools and\n                    ecosystem news.\n                  </p>\n                </div>\n                <a\n                  href=\"https://flow.com/newsletter\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  className=\"inline-flex items-center px-6 py-3 bg-flow-primary text-gray-900 font-semibold\n                    rounded-lg hover:bg-flow-primary/90 transition-all duration-200 hover:scale-105\"\n                >\n                  Subscribe\n                  <svg\n                    className=\"ml-2 w-4 h-4\"\n                    fill=\"none\"\n                    stroke=\"currentColor\"\n                    viewBox=\"0 0 24 24\"\n                  >\n                    <path\n                      strokeLinecap=\"round\"\n                      strokeLinejoin=\"round\"\n                      strokeWidth={2}\n                      d=\"M17 8l4 4m0 0l-4 4m4-4H3\"\n                    />\n                  </svg>\n                </a>\n              </div>\n            </div>\n\n            <div\n              className={`pt-8 pb-4 border-t flex flex-col sm:flex-row justify-between items-center\n                space-y-4 sm:space-y-0 ${darkMode ? \"border-gray-700/50\" : \"border-gray-200\"}`}\n            >\n              <div\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Built with <span className=\"text-flow-primary\">♥</span> for\n                developers.\n              </div>\n\n              <div className=\"flex items-center space-x-6\">\n                <a\n                  href=\"https://github.com/onflow/fcl-js/tree/master/packages/react-sdk\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  className={`p-2 rounded-lg transition-colors duration-200 ${\n                    darkMode\n                      ? \"text-gray-400 hover:text-white hover:bg-gray-800\"\n                      : \"text-gray-600 hover:text-gray-900 hover:bg-gray-100\"\n                    }`}\n                  title=\"GitHub\"\n                >\n                  <svg\n                    width=\"20\"\n                    height=\"20\"\n                    viewBox=\"0 0 24 24\"\n                    fill=\"currentColor\"\n                  >\n                    <path d=\"M12 0C5.374 0 0 5.373 0 12 0 17.302 3.438 21.8 8.207 23.387c.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z\" />\n                  </svg>\n                </a>\n\n                <a\n                  href=\"https://discord.gg/flow\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  className={`p-2 rounded-lg transition-colors duration-200 ${\n                    darkMode\n                      ? \"text-gray-400 hover:text-white hover:bg-gray-800\"\n                      : \"text-gray-600 hover:text-gray-900 hover:bg-gray-100\"\n                    }`}\n                  title=\"Discord\"\n                >\n                  <svg\n                    width=\"20\"\n                    height=\"20\"\n                    viewBox=\"0 0 24 24\"\n                    fill=\"currentColor\"\n                  >\n                    <path d=\"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z\" />\n                  </svg>\n                </a>\n\n                <a\n                  href=\"https://twitter.com/flow_blockchain\"\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  className={`p-2 rounded-lg transition-colors duration-200 ${\n                    darkMode\n                      ? \"text-gray-400 hover:text-white hover:bg-gray-800\"\n                      : \"text-gray-600 hover:text-gray-900 hover:bg-gray-100\"\n                    }`}\n                  title=\"Twitter\"\n                >\n                  <svg\n                    width=\"20\"\n                    height=\"20\"\n                    viewBox=\"0 0 24 24\"\n                    fill=\"currentColor\"\n                  >\n                    <path d=\"M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z\" />\n                  </svg>\n                </a>\n              </div>\n            </div>\n          </PlusGridItem>\n        </PlusGridRow>\n      </div>\n    </footer>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/header.tsx",
    "content": "import {Connect, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode, useNetworkSwitch} from \"./flow-provider-wrapper\"\nimport {useState, useRef, useEffect} from \"react\"\n\n// Standard networks supported by the demo\ntype DemoFlowNetwork = \"emulator\" | \"testnet\" | \"mainnet\"\n\ninterface HeaderProps {\n  onMobileSidebarToggle?: () => void\n  mobileSidebarOpen?: boolean\n}\n\nexport function Header({\n  onMobileSidebarToggle,\n  mobileSidebarOpen,\n}: HeaderProps = {}) {\n  const {darkMode, toggleDarkMode} = useDarkMode()\n  const {currentNetwork, switchNetwork, isNetworkSwitching} = useNetworkSwitch()\n  const [networkMenuOpen, setNetworkMenuOpen] = useState(false)\n  const networkMenuRef = useRef<HTMLDivElement>(null)\n  const {data: chainId, isLoading: isChainIdLoading} = useFlowChainId()\n\n  const getNetworkInfo = (network?: DemoFlowNetwork) => {\n    const targetNetwork = network || currentNetwork\n    if (isChainIdLoading && !network) return {name: \"...\", color: \"gray\"}\n\n    switch (targetNetwork) {\n      case \"mainnet\":\n        return {name: \"Mainnet\", color: \"green\"}\n      case \"testnet\":\n        return {name: \"Testnet\", color: \"blue\"}\n      case \"emulator\":\n        return {name: \"Emulator\", color: \"orange\"}\n      default:\n        return {name: \"Unknown\", color: \"gray\"}\n    }\n  }\n\n  const networkInfo = getNetworkInfo()\n  // Only allow switching to emulator if app was started with emulator configuration\n  const startedWithEmulator =\n    (import.meta.env.VITE_FLOW_NETWORK as DemoFlowNetwork) === \"emulator\"\n  const networks: DemoFlowNetwork[] = startedWithEmulator\n    ? [\"mainnet\", \"testnet\", \"emulator\"]\n    : [\"mainnet\", \"testnet\"]\n\n  const handleNetworkSwitch = async (network: DemoFlowNetwork) => {\n    if (network !== currentNetwork && !isNetworkSwitching) {\n      setNetworkMenuOpen(false)\n      await switchNetwork(network)\n    }\n  }\n\n  // Close network menu when clicking outside\n  useEffect(() => {\n    const handleClickOutside = (event: MouseEvent) => {\n      if (\n        networkMenuRef.current &&\n        !networkMenuRef.current.contains(event.target as Node)\n      ) {\n        setNetworkMenuOpen(false)\n      }\n    }\n\n    document.addEventListener(\"mousedown\", handleClickOutside)\n    return () => document.removeEventListener(\"mousedown\", handleClickOutside)\n  }, [])\n\n  return (\n    <header\n      className={`relative border-b transition-colors duration-200 ${\n        darkMode ? \"bg-gray-900 border-white/10\" : \"bg-white border-black/5\" }`}\n      role=\"banner\"\n    >\n      <div className=\"flex items-center justify-between h-16 px-6\">\n        <div className=\"flex items-center gap-4\">\n          <button\n            onClick={onMobileSidebarToggle}\n            className={`lg:hidden p-2 border rounded-lg transition-colors duration-200 ${\n              darkMode\n                ? `text-gray-400 hover:text-white border-white/10 hover:border-white/20\n                  bg-gray-800/50`\n                : `text-gray-600 hover:text-gray-900 border-black/5 hover:border-black/10\n                  bg-gray-50/50`\n              }`}\n            aria-label={mobileSidebarOpen ? \"Close menu\" : \"Open menu\"}\n            aria-expanded={mobileSidebarOpen}\n          >\n            {mobileSidebarOpen ? (\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth={2}\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M6 18L18 6M6 6l12 12\"\n                />\n              </svg>\n            ) : (\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth={2}\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M4 6h16M4 12h16M4 18h16\"\n                />\n              </svg>\n            )}\n          </button>\n\n          <a\n            href=\"/\"\n            className=\"flex items-center space-x-4 group transition-opacity hover:opacity-80\"\n          >\n            <img\n              src=\"/assets/icon.png\"\n              alt=\"Flow\"\n              className=\"w-8 h-8 rounded-lg\"\n            />\n\n            <div className=\"flex-col hidden sm:flex\">\n              <span\n                className={`text-sm font-medium tracking-wide ${\n                  darkMode ? \"text-gray-400\" : \"text-gray-600\" }`}\n              >\n                Flow\n              </span>\n              <h1\n                className={`text-lg font-black tracking-tight -mt-1 font-mono ${\n                  darkMode ? \"text-white\" : \"text-black\" }`}\n              >\n                React SDK\n              </h1>\n            </div>\n          </a>\n        </div>\n\n        <div className=\"flex items-center space-x-4\">\n          <div className=\"hidden md:block relative\" ref={networkMenuRef}>\n            <button\n              onClick={() => setNetworkMenuOpen(!networkMenuOpen)}\n              disabled={isNetworkSwitching}\n              className={`flex items-center space-x-2 px-3 py-1.5 rounded-lg border text-sm font-medium\n                transition-colors duration-200 hover:shadow-sm ${\n                networkInfo.color === \"green\"\n                    ? darkMode\n                      ? \"bg-green-900/20 border-green-800/50 text-green-400 hover:bg-green-900/30\"\n                      : \"bg-green-50 border-green-200 text-green-700 hover:bg-green-100\"\n                    : networkInfo.color === \"blue\"\n                      ? darkMode\n                        ? \"bg-blue-900/20 border-blue-800/50 text-blue-400 hover:bg-blue-900/30\"\n                        : \"bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100\"\n                      : networkInfo.color === \"orange\"\n                        ? darkMode\n                          ? \"bg-orange-900/20 border-orange-800/50 text-orange-400 hover:bg-orange-900/30\"\n                          : \"bg-orange-50 border-orange-200 text-orange-700 hover:bg-orange-100\"\n                        : darkMode\n                          ? \"bg-gray-900/50 border-white/10 text-gray-400 hover:bg-gray-900/70\"\n                          : \"bg-gray-50 border-black/5 text-gray-600 hover:bg-gray-100\"\n                } ${isNetworkSwitching ? \"opacity-50 cursor-not-allowed\" : \"cursor-pointer\"}`}\n            >\n              {isNetworkSwitching ? (\n                <div className=\"w-2 h-2 bg-gray-500 rounded-full animate-pulse\" />\n              ) : (\n                <div\n                  className={`w-2 h-2 rounded-full ${\n                    networkInfo.color === \"green\"\n                      ? \"bg-green-500\"\n                      : networkInfo.color === \"blue\"\n                        ? \"bg-blue-500\"\n                        : networkInfo.color === \"orange\"\n                          ? \"bg-orange-500\"\n                          : \"bg-gray-500\"\n                    }`}\n                />\n              )}\n              <span>\n                {isNetworkSwitching ? \"Switching...\" : networkInfo.name}\n              </span>\n              <svg\n                className={`w-3 h-3 transition-transform duration-200 ${ networkMenuOpen ? \"rotate-180\" : \"\"\n                  }`}\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={2}\n                  d=\"M19 9l-7 7-7-7\"\n                />\n              </svg>\n            </button>\n\n            {networkMenuOpen && (\n              <div\n                className={`absolute top-full left-0 mt-2 py-1 rounded-lg border shadow-lg z-50\n                min-w-[140px] ${\n                darkMode\n                    ? \"bg-gray-900 border-white/10\"\n                    : \"bg-white border-black/5\"\n                }`}\n              >\n                {networks.map(network => {\n                  const info = getNetworkInfo(network)\n                  const isActive = network === currentNetwork\n\n                  return (\n                    <button\n                      key={network}\n                      onClick={() => handleNetworkSwitch(network)}\n                      className={`w-full flex items-center space-x-2 px-3 py-2 text-sm transition-colors\n                      duration-200 ${\n                      isActive\n                          ? darkMode\n                            ? \"bg-gray-800 text-white\"\n                            : \"bg-gray-50 text-black\"\n                          : darkMode\n                            ? \"text-gray-300 hover:bg-gray-800 hover:text-white\"\n                            : \"text-gray-700 hover:bg-gray-50 hover:text-black\"\n                      }`}\n                    >\n                      <div\n                        className={`w-2 h-2 rounded-full ${\n                        info.color === \"green\"\n                            ? \"bg-green-500\"\n                            : info.color === \"blue\"\n                              ? \"bg-blue-500\"\n                              : info.color === \"orange\"\n                                ? \"bg-orange-500\"\n                                : \"bg-gray-500\"\n                        }`}\n                      />\n                      <span className=\"font-medium\">{info.name}</span>\n                      {isActive && (\n                        <svg\n                          className=\"w-3 h-3 ml-auto\"\n                          fill=\"none\"\n                          viewBox=\"0 0 24 24\"\n                          stroke=\"currentColor\"\n                        >\n                          <path\n                            strokeLinecap=\"round\"\n                            strokeLinejoin=\"round\"\n                            strokeWidth={2}\n                            d=\"M5 13l4 4L19 7\"\n                          />\n                        </svg>\n                      )}\n                    </button>\n                  )\n                })}\n              </div>\n            )}\n          </div>\n          <a\n            href=\"https://github.com/onflow/fcl-js/tree/master/packages/react-sdk\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            className={`hidden md:block p-2 border rounded-lg transition-colors duration-200 ${\n              darkMode\n                ? `text-gray-400 hover:text-white border-white/10 hover:border-white/20\n                  bg-gray-800/50`\n                : `text-gray-600 hover:text-gray-900 border-black/5 hover:border-black/10\n                  bg-gray-50/50`\n              }`}\n            aria-label=\"View on GitHub\"\n          >\n            <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n              <path d=\"M12 0C5.374 0 0 5.373 0 12 0 17.302 3.438 21.8 8.207 23.387c.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z\" />\n            </svg>\n          </a>\n\n          <button\n            onClick={toggleDarkMode}\n            className={`hidden lg:block p-2 border rounded-lg transition-colors duration-200 ${\n              darkMode\n                ? `text-yellow-400 hover:text-yellow-300 border-white/10 hover:border-white/20\n                  bg-gray-800/50`\n                : `text-gray-600 hover:text-gray-900 border-black/5 hover:border-black/10\n                  bg-gray-50/50`\n              }`}\n            aria-label={\n              darkMode ? \"Switch to light mode\" : \"Switch to dark mode\"\n            }\n          >\n            {darkMode ? (\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"currentColor\"\n              >\n                <path d=\"M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z\" />\n              </svg>\n            ) : (\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"currentColor\"\n              >\n                <path d=\"M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z\" />\n              </svg>\n            )}\n          </button>\n\n          <Connect\n            variant=\"primary\"\n            modalConfig={{\n              scheduledTransactions: {\n                show: true,\n              },\n            }}\n          />\n        </div>\n      </div>\n    </header>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-from-evm-card.tsx",
    "content": "import {useCrossVmBridgeNftFromEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {getContractAddress} from \"../../constants\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { useCrossVmBridgeNftFromEvm } from \"@onflow/react-sdk\"\n\nconst {\n  crossVmBridgeNftFromEvm,\n  isPending,\n  error,\n  data: txId\n} = useCrossVmBridgeNftFromEvm()\n\ncrossVmBridgeNftFromEvm({\n  nftIdentifier: \"A.dfc20aee650fcbdf.ExampleNFT.NFT\",\n  nftId: \"1\"\n})`\n\nexport function UseCrossVmBridgeNftFromEvmCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [nftIdentifier, setNftIdentifier] = useState(\"\")\n  const [nftId, setNftId] = useState(\"1\")\n\n  const {\n    crossVmBridgeNftFromEvm,\n    isPending,\n    data: transactionId,\n    error,\n  } = useCrossVmBridgeNftFromEvm()\n\n  const exampleNftData = useMemo(() => {\n    if (currentNetwork !== \"testnet\") return null\n\n    const exampleNftAddress = getContractAddress(\"ExampleNFT\", currentNetwork)\n    return {\n      name: \"Example NFT\",\n      nftIdentifier: `A.${exampleNftAddress.replace(\"0x\", \"\")}.ExampleNFT.NFT`,\n      nftId: \"1\",\n    }\n  }, [currentNetwork])\n\n  // Set default NFT identifier when network changes to testnet\n  useMemo(() => {\n    if (exampleNftData && !nftIdentifier) {\n      setNftIdentifier(exampleNftData.nftIdentifier)\n    }\n  }, [exampleNftData, nftIdentifier])\n\n  const handleBridgeNft = () => {\n    crossVmBridgeNftFromEvm({\n      nftIdentifier,\n      nftId,\n    })\n  }\n\n  return (\n    <DemoCard\n      id=\"usecrossvmbridgenftfromevm\"\n      title=\"useCrossVmBridgeNftFromEvm\"\n      description=\"Bridge NFTs from Flow EVM to Cadence by withdrawing from the signer's Cadence-Owned Account (COA) in EVM.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#usecrossvmbridgenftfromevm\"\n    >\n      <div className=\"space-y-6\">\n        {exampleNftData && (\n          <div\n            className={`relative p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-blue-500/10 border-blue-500/20\"\n                : \"bg-blue-50 border-blue-200\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <p\n              className={`text-sm ${darkMode ? \"text-blue-300\" : \"text-blue-800\"}`}\n            >\n              <strong>Note:</strong> Example prefilled with ExampleNFT type\n              identifier for testnet\n            </p>\n          </div>\n        )}\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            NFT Identifier\n          </label>\n          <input\n            type=\"text\"\n            value={nftIdentifier}\n            onChange={e => setNftIdentifier(e.target.value)}\n            placeholder={\n              exampleNftData\n                ? exampleNftData.nftIdentifier\n                : \"e.g., A.dfc20aee650fcbdf.ExampleNFT.NFT\"\n            }\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            NFT ID (UInt256)\n          </label>\n          <input\n            type=\"text\"\n            value={nftId}\n            onChange={e => setNftId(e.target.value)}\n            placeholder=\"e.g., 1\"\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={handleBridgeNft}\n            disabled={isPending || !nftIdentifier || !nftId}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isPending || !nftIdentifier || !nftId\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isPending ? \"Bridging...\" : \"Bridge NFT from EVM\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={transactionId || error}\n          darkMode={darkMode}\n          show={!!transactionId || !!error}\n          title={\n            transactionId\n              ? \"NFT bridged successfully!\"\n              : error\n                ? \"Bridge failed\"\n                : undefined\n          }\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-to-evm-card.tsx",
    "content": "import {useCrossVmBridgeNftToEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {getContractAddress} from \"../../constants\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { useCrossVmBridgeNftToEvm } from \"@onflow/react-sdk\"\n\nconst {\n  crossVmBridgeNftToEvm,\n  isPending,\n  error,\n  data: txId\n} = useCrossVmBridgeNftToEvm()\n\ncrossVmBridgeNftToEvm({\n  nftIdentifier: \"A.012e4d204a60ac6f.ExampleNFT.NFT\",\n  nftIds: [\"1\", \"2\", \"3\"],\n  calls: []\n})`\n\nexport function UseCrossVmBridgeNftToEvmCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [nftIdentifier, setNftIdentifier] = useState(\"\")\n  const [nftIds, setNftIds] = useState(\"1\")\n\n  const {\n    crossVmBridgeNftToEvm,\n    isPending,\n    data: transactionId,\n    error,\n  } = useCrossVmBridgeNftToEvm()\n\n  const exampleNftData = useMemo(() => {\n    if (currentNetwork !== \"testnet\") return null\n\n    const exampleNftAddress = getContractAddress(\"ExampleNFT\", currentNetwork)\n    return {\n      name: \"Example NFT\",\n      nftIdentifier: `A.${exampleNftAddress.replace(\"0x\", \"\")}.ExampleNFT.NFT`,\n      nftIds: \"1\",\n    }\n  }, [currentNetwork])\n\n  // Set default NFT identifier when network changes to testnet\n  useMemo(() => {\n    if (exampleNftData && !nftIdentifier) {\n      setNftIdentifier(exampleNftData.nftIdentifier)\n      setNftIds(exampleNftData.nftIds)\n    }\n  }, [exampleNftData, nftIdentifier])\n\n  const handleBridgeNft = () => {\n    const nftIdArray = nftIds.split(\",\").map(id => id.trim())\n\n    crossVmBridgeNftToEvm({\n      nftIdentifier,\n      nftIds: nftIdArray,\n      calls: [], // No EVM calls, just bridging\n    })\n  }\n\n  return (\n    <DemoCard\n      id=\"usecrossvmbridgenfttoevm\"\n      title=\"useCrossVmBridgeNftToEvm\"\n      description=\"Bridge NFTs from Cadence to Flow EVM by depositing them into the signer's Cadence-Owned Account (COA).\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#usecrossvmbridgenfttoevm\"\n    >\n      <div className=\"space-y-6\">\n        {exampleNftData && (\n          <div\n            className={`relative p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-blue-500/10 border-blue-500/20\"\n                : \"bg-blue-50 border-blue-200\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <p\n              className={`text-sm ${darkMode ? \"text-blue-300\" : \"text-blue-800\"}`}\n            >\n              <strong>Note:</strong> Example prefilled with ExampleNFT type\n              identifier for testnet\n            </p>\n          </div>\n        )}\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            NFT Identifier\n          </label>\n          <input\n            type=\"text\"\n            value={nftIdentifier}\n            onChange={e => setNftIdentifier(e.target.value)}\n            placeholder={\n              exampleNftData\n                ? exampleNftData.nftIdentifier\n                : \"e.g., A.012e4d204a60ac6f.ExampleNFT.NFT\"\n            }\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            NFT IDs (UInt64, comma-separated)\n          </label>\n          <input\n            type=\"text\"\n            value={nftIds}\n            onChange={e => setNftIds(e.target.value)}\n            placeholder=\"e.g., 1,2,3\"\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={handleBridgeNft}\n            disabled={isPending || !nftIdentifier || !nftIds}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isPending || !nftIdentifier || !nftIds\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isPending ? \"Bridging...\" : \"Bridge NFT to EVM\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={transactionId || error}\n          darkMode={darkMode}\n          show={!!transactionId || !!error}\n          title={\n            transactionId\n              ? \"NFTs bridged successfully!\"\n              : error\n                ? \"Bridge failed\"\n                : undefined\n          }\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-from-evm-card.tsx",
    "content": "import {useCrossVmBridgeTokenFromEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {getContractAddress} from \"../../constants\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { useCrossVmBridgeTokenFromEvm } from \"@onflow/react-sdk\"\n\nconst {\n  crossVmBridgeTokenFromEvm,\n  isPending,\n  error,\n  data: txId\n} = useCrossVmBridgeTokenFromEvm()\n\ncrossVmBridgeTokenFromEvm({\n  vaultIdentifier: \"A.dfc20aee650fcbdf.EVMVMBridgedToken_xxx.Vault\",\n  amount: \"1000000000000000000\"\n})`\n\nexport function UseCrossVmBridgeTokenFromEvmCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [vaultIdentifier, setVaultIdentifier] = useState(\"\")\n  const [amount, setAmount] = useState(\"1\") // User-friendly amount\n  const [decimals, setDecimals] = useState(\"18\") // ERC20 decimals\n\n  const {\n    crossVmBridgeTokenFromEvm,\n    isPending,\n    data: transactionId,\n    error,\n  } = useCrossVmBridgeTokenFromEvm()\n\n  const clickTokenData = useMemo(() => {\n    if (currentNetwork !== \"testnet\") return null\n\n    const clickTokenAddress = getContractAddress(\"ClickToken\", currentNetwork)\n    return {\n      name: \"ClickToken\",\n      vaultIdentifier: `A.${clickTokenAddress.replace(\"0x\", \"\")}.EVMVMBridgedToken_a7cf2260e501952c71189d04fad17c704dfb36e6.Vault`,\n      amount: \"1\", // 1 ClickToken\n      decimals: \"18\", // ClickToken has 18 decimals\n    }\n  }, [currentNetwork])\n\n  // Set default vault identifier when network changes to testnet\n  useMemo(() => {\n    if (clickTokenData && !vaultIdentifier) {\n      setVaultIdentifier(clickTokenData.vaultIdentifier)\n      setAmount(clickTokenData.amount)\n      setDecimals(clickTokenData.decimals)\n    }\n  }, [clickTokenData, vaultIdentifier])\n\n  // Convert user-friendly amount to Wei (UInt256)\n  const convertToWei = (value: string, tokenDecimals: string): string => {\n    try {\n      // Remove any non-numeric characters except decimal point\n      const cleaned = value.replace(/[^\\d.]/g, \"\")\n      if (!cleaned || cleaned === \".\") return \"0\"\n\n      const decimalPlaces = parseInt(tokenDecimals) || 18\n      const [whole = \"0\", fraction = \"\"] = cleaned.split(\".\")\n\n      // Pad or truncate fraction to match decimals\n      const paddedFraction = fraction\n        .padEnd(decimalPlaces, \"0\")\n        .slice(0, decimalPlaces)\n\n      // Combine whole and fraction parts\n      const weiValue = (whole || \"0\") + paddedFraction\n\n      // Remove leading zeros but keep at least one digit\n      const result = weiValue.replace(/^0+/, \"\") || \"0\"\n\n      return result\n    } catch {\n      return \"0\"\n    }\n  }\n\n  const handleBridgeToken = () => {\n    const weiAmount = convertToWei(amount, decimals)\n    console.log(\"Bridging token:\", {\n      amount,\n      decimals,\n      weiAmount,\n      vaultIdentifier,\n    })\n    crossVmBridgeTokenFromEvm({\n      vaultIdentifier,\n      amount: weiAmount,\n    })\n  }\n\n  return (\n    <DemoCard\n      id=\"usecrossvmbridgetokenfromevm\"\n      title=\"useCrossVmBridgeTokenFromEvm\"\n      description=\"Bridge fungible tokens from Flow EVM to Cadence by withdrawing from the signer's Cadence-Owned Account (COA) in EVM.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#usecrossvmbridgetokenfromevm\"\n    >\n      <div className=\"space-y-6\">\n        {clickTokenData && (\n          <div\n            className={`relative p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-blue-500/10 border-blue-500/20\"\n                : \"bg-blue-50 border-blue-200\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n            <p\n              className={`text-sm ${darkMode ? \"text-blue-300\" : \"text-blue-800\"}`}\n            >\n              <strong>Note:</strong> Example prefilled with ClickToken (ERC20)\n              vault identifier for testnet\n            </p>\n          </div>\n        )}\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Vault Identifier\n          </label>\n          <input\n            type=\"text\"\n            value={vaultIdentifier}\n            onChange={e => setVaultIdentifier(e.target.value)}\n            placeholder={\n              clickTokenData\n                ? clickTokenData.vaultIdentifier\n                : \"e.g., A.dfc20aee650fcbdf.EVMVMBridgedToken_xxx.Vault\"\n            }\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Amount\n          </label>\n          <input\n            type=\"text\"\n            value={amount}\n            onChange={e => setAmount(e.target.value)}\n            placeholder=\"e.g., 1 or 1.5\"\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Token Decimals\n          </label>\n          <input\n            type=\"text\"\n            value={decimals}\n            onChange={e => setDecimals(e.target.value)}\n            placeholder=\"e.g., 18\"\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n          <p\n            className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n          >\n            ERC20 decimals (typically 18). Amount will be converted to Wei\n            automatically.\n          </p>\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={handleBridgeToken}\n            disabled={isPending || !vaultIdentifier || !amount}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isPending || !vaultIdentifier || !amount\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isPending ? \"Bridging...\" : \"Bridge Token from EVM\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={transactionId || error}\n          darkMode={darkMode}\n          show={!!transactionId || !!error}\n          title={\n            transactionId\n              ? \"Tokens bridged successfully!\"\n              : error\n                ? `Bridge failed: ${error instanceof Error ? error.message : String(error)}`\n                : undefined\n          }\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-to-evm-card.tsx",
    "content": "import {useCrossVmBridgeTokenToEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {getContractAddress} from \"../../constants\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\n\nconst IMPLEMENTATION_CODE = `import { useCrossVmBridgeTokenToEvm } from \"@onflow/react-sdk\"\n\nconst {\n  crossVmBridgeTokenToEvm,\n  isPending,\n  error,\n  data: txId\n} = useCrossVmBridgeTokenToEvm()\n\ncrossVmBridgeTokenToEvm({\n  vaultIdentifier: \"A.dfc20aee650fcbdf.EVMVMBridgedToken_xxx.Vault\",\n  amount: \"1.0\",\n  calls: []\n})`\n\nexport function UseCrossVmBridgeTokenToEvmCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [vaultIdentifier, setVaultIdentifier] = useState(\"\")\n  const [amount, setAmount] = useState(\"1\") // UFix64 in Cadence (8 decimals)\n\n  const {\n    crossVmBridgeTokenToEvm,\n    isPending,\n    data: transactionId,\n    error,\n  } = useCrossVmBridgeTokenToEvm()\n\n  const clickTokenData = useMemo(() => {\n    if (currentNetwork !== \"testnet\") return null\n\n    const clickTokenAddress = getContractAddress(\"ClickToken\", currentNetwork)\n    return {\n      name: \"ClickToken\",\n      vaultIdentifier: `A.${clickTokenAddress.replace(\"0x\", \"\")}.EVMVMBridgedToken_a7cf2260e501952c71189d04fad17c704dfb36e6.Vault`,\n      amount: \"1\", // 1 ClickToken (UFix64 with 8 decimals)\n    }\n  }, [currentNetwork])\n\n  // Set default vault identifier when network changes to testnet\n  useMemo(() => {\n    if (clickTokenData && !vaultIdentifier) {\n      setVaultIdentifier(clickTokenData.vaultIdentifier)\n      setAmount(clickTokenData.amount)\n    }\n  }, [clickTokenData, vaultIdentifier])\n\n  // Normalize amount to ensure it has a decimal point for UFix64\n  const normalizeAmount = (value: string): string => {\n    // Remove any non-numeric characters except decimal point\n    const cleaned = value.replace(/[^\\d.]/g, \"\")\n    // If it's just a number without decimal, add .0\n    if (cleaned && !cleaned.includes(\".\")) {\n      return `${cleaned}.0`\n    }\n    return cleaned\n  }\n\n  const handleBridgeToken = () => {\n    const normalizedAmount = normalizeAmount(amount)\n    crossVmBridgeTokenToEvm({\n      vaultIdentifier,\n      amount: normalizedAmount,\n      calls: [], // No EVM calls, just bridging\n    })\n  }\n\n  return (\n    <DemoCard\n      id=\"usecrossvmbridgetokentoevm\"\n      title=\"useCrossVmBridgeTokenToEvm\"\n      description=\"Bridge fungible tokens from Cadence to Flow EVM by depositing them into the signer's Cadence-Owned Account (COA).\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#usecrossvmbridgetokentoevm\"\n    >\n      <div className=\"space-y-6\">\n        {clickTokenData && (\n          <div\n            className={`relative p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-blue-500/10 border-blue-500/20\"\n                : \"bg-blue-50 border-blue-200\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <p\n              className={`text-sm ${darkMode ? \"text-blue-300\" : \"text-blue-800\"}`}\n            >\n              <strong>Note:</strong> Example prefilled with ClickToken (ERC20)\n              vault identifier for testnet\n            </p>\n          </div>\n        )}\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Vault Identifier\n          </label>\n          <input\n            type=\"text\"\n            value={vaultIdentifier}\n            onChange={e => setVaultIdentifier(e.target.value)}\n            placeholder={\n              clickTokenData\n                ? clickTokenData.vaultIdentifier\n                : \"e.g., A.dfc20aee650fcbdf.EVMVMBridgedToken_xxx.Vault\"\n            }\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Amount\n          </label>\n          <input\n            type=\"text\"\n            value={amount}\n            onChange={e => setAmount(e.target.value)}\n            placeholder=\"e.g., 1 or 1.5\"\n            className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n              ${\n              darkMode\n                  ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                    focus:border-flow-primary/50`\n                  : `bg-white border-black/10 text-black placeholder-gray-400\n                    focus:border-flow-primary/50`\n              } outline-none`}\n          />\n          <p\n            className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n          >\n            Enter amount as a number (e.g., \"1\" or \"1.5\"). Will be converted to\n            UFix64 format.\n          </p>\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={handleBridgeToken}\n            disabled={isPending || !vaultIdentifier || !amount}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isPending || !vaultIdentifier || !amount\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isPending ? \"Bridging...\" : \"Bridge Token to EVM\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={transactionId || error}\n          darkMode={darkMode}\n          show={!!transactionId || !!error}\n          title={\n            transactionId\n              ? \"Tokens bridged successfully!\"\n              : error\n                ? \"Bridge failed\"\n                : undefined\n          }\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-account-card.tsx",
    "content": "import {useState} from \"react\"\nimport {useFlowAccount} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowAccount } from \"@onflow/react-sdk\"\n\nconst {\n  data: account,\n  isLoading,\n  error,\n  refetch,\n} = useFlowAccount({\n  address,\n  query: { enabled: true },\n})`\n\nexport function UseFlowAccountCard() {\n  const {darkMode} = useDarkMode()\n  const [address, setAddress] = useState(\"\")\n  const {\n    data: account,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowAccount({\n    address,\n    query: {enabled: !!address},\n  })\n\n  return (\n    <DemoCard\n      id=\"useflowaccount\"\n      title=\"useFlowAccount\"\n      description=\"Fetch Flow account information including balance, keys, and storage capacity.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowaccount\"\n    >\n      <div className=\"space-y-6 overflow-hidden\">\n        <div className=\"space-y-4\">\n          <input\n            type=\"text\"\n            value={address}\n            onChange={e => setAddress(e.target.value)}\n            placeholder=\"Enter Flow address (e.g., 0x55ad22f01ef568a1)\"\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              darkMode\n                  ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                    placeholder-gray-600`\n                  : `bg-white text-black border-black/10 focus:border-flow-primary\n                    placeholder-gray-400`\n              }`}\n          />\n\n          <div className=\"flex justify-start\">\n            <button\n              onClick={() => refetch()}\n              disabled={isLoading || !address}\n              className={`py-3 px-6 rounded-lg font-medium transition-all duration-200 ${\n                isLoading || !address\n                  ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                  : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n                }`}\n            >\n              {isLoading ? \"Fetching Account...\" : \"Fetch Account\"}\n            </button>\n          </div>\n        </div>\n\n        {account && !error && (\n          <div className=\"space-y-4\">\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n              <p\n                className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Balance\n              </p>\n              <p\n                className={`text-2xl font-bold font-mono break-all ${darkMode ? \"text-white\" : \"text-black\"}`}\n              >\n                {(Number(account.balance) / 1e8).toFixed(8)}\n              </p>\n              <p\n                className={`text-xs mt-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                FLOW\n              </p>\n            </div>\n\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <p\n                className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Account Keys\n              </p>\n              <p\n                className={`text-xl font-bold ${darkMode ? \"text-white\" : \"text-black\"}`}\n              >\n                {account.keys.length}\n              </p>\n              <p\n                className={`text-xs mt-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                {account.keys.length === 1 ? \"key\" : \"keys\"}\n              </p>\n            </div>\n          </div>\n        )}\n\n        <ResultsSection\n          data={account || error}\n          darkMode={darkMode}\n          show={!!(account || error) && !!address}\n          title=\"Account Response\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-block-card.tsx",
    "content": "import {useState} from \"react\"\nimport {useFlowBlock} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowBlock } from \"@onflow/react-sdk\"\n\nconst { \n  data: block, \n  isLoading, \n  error, \n  refetch \n} = useFlowBlock({\n  query: { enabled: true }\n})`\n\nexport function UseFlowBlockCard() {\n  const {darkMode} = useDarkMode()\n  const [blockHeight, setBlockHeight] = useState<string>(\"\")\n  const [blockId, setBlockId] = useState<string>(\"\")\n  const [useLatest, setUseLatest] = useState(true)\n\n  const {\n    data: block,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowBlock({\n    height: useLatest\n      ? undefined\n      : blockHeight\n        ? parseInt(blockHeight)\n        : undefined,\n    id: useLatest ? undefined : blockId || undefined,\n    query: {enabled: false, staleTime: 30000},\n  })\n\n  return (\n    <DemoCard\n      id=\"useflowblock\"\n      title=\"useFlowBlock\"\n      description=\"Get blockchain block information including height, timestamp, and block ID.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowblock\"\n    >\n      <div className=\"space-y-6\">\n        {!block && !isLoading && !error && (\n          <div\n            className={`text-center py-12 rounded-lg border ${\n            darkMode\n                ? \"bg-gray-900/50 border-white/10\"\n                : \"bg-gray-50 border-black/5\"\n            }`}\n          >\n            <svg\n              className=\"w-12 h-12 mx-auto mb-3 opacity-30\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={1.5}\n                d=\"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10\"\n              />\n            </svg>\n            <p\n              className={`text-sm ${darkMode ? \"text-gray-500\" : \"text-gray-400\"}`}\n            >\n              {useLatest\n                ? \"Click to fetch latest block\"\n                : \"Configure and fetch block data\"}\n            </p>\n          </div>\n        )}\n\n        <div className=\"space-y-4\">\n          <label\n            className={`flex items-center cursor-pointer select-none ${\n              darkMode ? \"text-white\" : \"text-black\" }`}\n          >\n            <div className=\"relative\">\n              <input\n                type=\"checkbox\"\n                checked={useLatest}\n                onChange={e => setUseLatest(e.target.checked)}\n                className=\"sr-only\"\n              />\n              <div\n                className={`block w-14 h-8 rounded-full transition-colors duration-200 ${\n                  useLatest\n                    ? \"bg-flow-primary\"\n                    : darkMode\n                      ? \"bg-gray-700\"\n                      : \"bg-gray-300\"\n                  }`}\n              ></div>\n              <div\n                className={`absolute left-1 top-1 bg-white w-6 h-6 rounded-full transition-transform\n                  duration-200 ${useLatest ? \"transform translate-x-6\" : \"\"}`}\n              ></div>\n            </div>\n            <span className=\"ml-3 font-medium\">Fetch Latest Block</span>\n          </label>\n\n          {!useLatest && (\n            <div className=\"space-y-3\">\n              <div>\n                <input\n                  type=\"number\"\n                  value={blockHeight}\n                  onChange={e => setBlockHeight(e.target.value)}\n                  placeholder=\"Block height (e.g., 12345)\"\n                  className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n                  duration-200 ${\n                  darkMode\n                      ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                        placeholder-gray-600`\n                      : `bg-white text-black border-black/10 focus:border-flow-primary\n                        placeholder-gray-400`\n                  }`}\n                />\n              </div>\n              <div>\n                <input\n                  type=\"text\"\n                  value={blockId}\n                  onChange={e => setBlockId(e.target.value)}\n                  placeholder=\"Block ID (optional)\"\n                  className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n                  duration-200 ${\n                  darkMode\n                      ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                        placeholder-gray-600`\n                      : `bg-white text-black border-black/10 focus:border-flow-primary\n                        placeholder-gray-400`\n                  }`}\n                />\n              </div>\n            </div>\n          )}\n\n          <div className=\"flex justify-start\">\n            <button\n              onClick={() => refetch()}\n              disabled={isLoading}\n              className={`py-3 px-6 font-medium rounded-lg transition-all duration-200 ${\n                isLoading\n                  ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                  : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n                }`}\n            >\n              {isLoading\n                ? \"Loading...\"\n                : useLatest\n                  ? \"Fetch Latest Block\"\n                  : \"Fetch Block\"}\n            </button>\n          </div>\n        </div>\n\n        {error ? (\n          <div\n            className={`relative p-4 rounded-lg border ${\n              darkMode\n                ? \"bg-red-900/20 border-red-800/50\"\n                : \"bg-red-50 border-red-200\"\n              }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <p\n              className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n            >\n              {error.message}\n            </p>\n          </div>\n        ) : block ? (\n          <div className=\"space-y-4\">\n            <div className=\"grid grid-cols-2 gap-4\">\n              <div\n                className={`relative p-4 rounded-lg border ${\n                  darkMode\n                    ? \"bg-gray-900/50 border-white/10\"\n                    : \"bg-gray-50 border-black/5\"\n                  }`}\n              >\n                <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n                <p\n                  className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Height\n                </p>\n                <p\n                  className={`text-xl font-bold font-mono ${darkMode ? \"text-white\" : \"text-black\"}`}\n                >\n                  {block.height}\n                </p>\n              </div>\n\n              <div\n                className={`relative p-4 rounded-lg border ${\n                  darkMode\n                    ? \"bg-gray-900/50 border-white/10\"\n                    : \"bg-gray-50 border-black/5\"\n                  }`}\n              >\n                <p\n                  className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Timestamp\n                </p>\n                <p\n                  className={`text-sm font-medium ${darkMode ? \"text-white\" : \"text-black\"}`}\n                >\n                  {new Date(block.timestamp).toLocaleDateString()}\n                </p>\n                <p\n                  className={`text-xs ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  {new Date(block.timestamp).toLocaleTimeString()}\n                </p>\n              </div>\n            </div>\n\n            <div\n              className={`p-4 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n                }`}\n            >\n              <p\n                className={`text-xs mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Block ID\n              </p>\n              <p\n                className={`text-xs font-mono break-all ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                {block.id}\n              </p>\n            </div>\n\n            <div\n              className={`p-4 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n                }`}\n            >\n              <p\n                className={`text-xs mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Parent Block ID\n              </p>\n              <p\n                className={`text-xs font-mono break-all ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                {block.parentId}\n              </p>\n            </div>\n          </div>\n        ) : null}\n\n        <ResultsSection\n          data={block || error}\n          darkMode={darkMode}\n          show={!!(block || error)}\n          title=\"Block Response\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-chain-id-card.tsx",
    "content": "import {useFlowChainId} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {\n  getNetworkName,\n  getEVMChainId,\n  normalizeChainId,\n  isProductionNetwork,\n} from \"../../utils/chain-helpers\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowChainId } from \"@onflow/react-sdk\"\n\nconst { \n  data: chainId, \n  isLoading \n} = useFlowChainId()`\n\nexport function UseFlowChainIdCard() {\n  const {darkMode} = useDarkMode()\n  const {\n    data: chainId,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowChainId({\n    query: {enabled: false, staleTime: 300000}, // 5 minutes cache\n  })\n\n  const getChainColor = (id: string) => {\n    const normalized = normalizeChainId(id)\n    switch (normalized) {\n      case \"mainnet\":\n        return \"bg-[#00EF8B]\"\n      case \"testnet\":\n        return \"bg-[#FFB800]\"\n      case \"emulator\":\n        return \"bg-[#9945FF]\"\n      default:\n        // Handle legacy canarynet or other unknown formats\n        if (id === \"flow-canarynet\") return \"bg-[#FF6B6B]\"\n        return \"bg-gray-500\"\n    }\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowchainid\"\n      title=\"useFlowChainId\"\n      description=\"Get the current Flow network chain identifier to determine which network your app is connected to.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowchainid\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-6 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-sm font-medium mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n          >\n            Chain Information\n          </h4>\n\n          {isLoading && (\n            <div className=\"flex items-center space-x-2\">\n              <div\n                className={`animate-spin rounded-full h-4 w-4 border-b-2 ${\n                darkMode ? \"border-white\" : \"border-black\" }`}\n              ></div>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n              >\n                Loading chain ID...\n              </p>\n            </div>\n          )}\n\n          {error && (\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-red-900/20 border-red-800/50\"\n                  : \"bg-red-50 border-red-200\"\n              }`}\n            >\n              <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n              <p\n                className={`text-sm font-medium ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n              >\n                Error: {error.message}\n              </p>\n            </div>\n          )}\n\n          {chainId && !isLoading && !error && (\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center gap-4\">\n                <div className=\"flex items-center gap-2\">\n                  <div\n                    className={`w-3 h-3 rounded-full ${getChainColor(chainId)}`}\n                  />\n                  <span\n                    className={`text-lg font-semibold ${darkMode ? \"text-white\" : \"text-black\"}`}\n                  >\n                    {getNetworkName(chainId)}\n                  </span>\n                  {isProductionNetwork(chainId) && (\n                    <span className=\"px-2 py-1 text-xs bg-green-100 text-green-800 rounded-full font-medium\">\n                      PROD\n                    </span>\n                  )}\n                </div>\n                <div\n                  className={`py-2 px-4 rounded border font-mono text-sm ${\n                  darkMode\n                      ? \"bg-gray-800 border-white/10 text-white\"\n                      : \"bg-white border-flow-primary/20 text-black\"\n                  }`}\n                >\n                  {chainId}\n                </div>\n              </div>\n\n              {getEVMChainId(chainId) && (\n                <div className=\"flex items-center gap-2 text-sm\">\n                  <span\n                    className={`${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                  >\n                    EVM Chain ID:\n                  </span>\n                  <span\n                    className={`font-mono ${darkMode ? \"text-white\" : \"text-black\"}`}\n                  >\n                    {getEVMChainId(chainId)}\n                  </span>\n                </div>\n              )}\n            </div>\n          )}\n\n          {!chainId && !isLoading && !error && (\n            <p\n              className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n            >\n              Click \"Fetch Chain ID\" to load current chain information\n            </p>\n          )}\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={() => refetch()}\n            disabled={isLoading}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isLoading\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isLoading ? \"Loading...\" : \"Fetch Chain ID\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={{chainId, isLoading, error}}\n          darkMode={darkMode}\n          show={!!chainId && !isLoading && !error}\n          title=\"Chain ID Data\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-config-card.tsx",
    "content": "import {useFlowConfig} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowConfig } from \"@onflow/react-sdk\"\n\nconst config = useFlowConfig()`\n\nexport function UseFlowConfigCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n\n  return (\n    <DemoCard\n      id=\"useflowconfig\"\n      title=\"useFlowConfig\"\n      description=\"Access the current Flow configuration including network settings, access node, and wallet discovery.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowconfig\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-6 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-sm font-medium mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n          >\n            Flow Configuration\n          </h4>\n\n          {config ? (\n            <div\n              className={`relative rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-800 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"p-4 max-h-96 overflow-auto\">\n                <pre\n                  className={`text-xs font-mono whitespace-pre-wrap leading-relaxed ${\n                    darkMode ? \"text-gray-300\" : \"text-gray-700\" }`}\n                >\n                  {JSON.stringify(config, null, 2)}\n                </pre>\n              </div>\n            </div>\n          ) : (\n            <div className=\"text-center py-8\">\n              <div\n                className={`inline-block animate-spin rounded-full h-6 w-6 border-b-2 mb-3 ${\n                  darkMode ? \"border-white\" : \"border-black\" }`}\n              ></div>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n              >\n                Loading configuration...\n              </p>\n            </div>\n          )}\n        </div>\n\n        {config && (\n          <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n              <h5\n                className={`text-xs font-medium mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Network\n              </h5>\n              <p\n                className={`text-sm font-mono ${darkMode ? \"text-white\" : \"text-black\"}`}\n              >\n                {config.flowNetwork || \"Not specified\"}\n              </p>\n            </div>\n\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n              <h5\n                className={`text-xs font-medium mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Access Node\n              </h5>\n              <p\n                className={`text-sm font-mono break-all ${darkMode ? \"text-white\" : \"text-black\"}`}\n              >\n                {config[\"accessNode.api\"] || \"Not configured\"}\n              </p>\n            </div>\n          </div>\n        )}\n\n        <ResultsSection\n          data={config}\n          darkMode={darkMode}\n          show={!!config}\n          title=\"Flow Configuration\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-current-user-card.tsx",
    "content": "import {useFlowCurrentUser} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowCurrentUser } from \"@onflow/react-sdk\"\n\nconst { user, authenticate, unauthenticate } = useFlowCurrentUser()`\n\nexport function UseFlowCurrentUserCard() {\n  const {darkMode} = useDarkMode()\n  const {user, authenticate, unauthenticate} = useFlowCurrentUser()\n\n  return (\n    <DemoCard\n      id=\"useflowcurrentuser\"\n      title=\"useFlowCurrentUser\"\n      description=\"Manage user authentication and access current user information including wallet address and authentication status.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowcurrentuser\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-6 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n\n          <div className=\"flex items-start justify-between mb-4\">\n            <h4\n              className={`text-sm font-medium uppercase tracking-wider ${\n                darkMode ? \"text-gray-400\" : \"text-gray-600\" }`}\n            >\n              Authentication Status\n            </h4>\n            <span\n              className={`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${\n                user?.loggedIn\n                  ? \"bg-green-500/10 text-green-500\"\n                  : darkMode\n                    ? \"bg-gray-700 text-gray-400\"\n                    : \"bg-gray-200 text-gray-500\"\n                }`}\n            >\n              {user?.loggedIn ? \"Connected\" : \"Not Connected\"}\n            </span>\n          </div>\n\n          {user?.loggedIn ? (\n            <div>\n              <p\n                className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n              >\n                Wallet Address\n              </p>\n              <p\n                className={`font-mono text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}\n              >\n                {user.addr}\n              </p>\n            </div>\n          ) : (\n            <div\n              className={`text-center py-8 ${darkMode ? \"text-gray-500\" : \"text-gray-400\"}`}\n            >\n              <svg\n                className=\"w-12 h-12 mx-auto mb-3 opacity-50\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={1.5}\n                  d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n                />\n              </svg>\n              <p className=\"text-sm\">No wallet connected</p>\n            </div>\n          )}\n        </div>\n\n        <div className=\"flex justify-start\">\n          {!user?.loggedIn ? (\n            <button\n              onClick={authenticate}\n              className=\"py-3 px-6 bg-flow-primary text-black rounded-lg font-medium transition-all\n                duration-200 hover:bg-flow-primary/80\"\n            >\n              Connect Wallet\n            </button>\n          ) : (\n            <button\n              onClick={unauthenticate}\n              className={`py-3 px-6 rounded-lg font-medium border transition-all duration-200 ${\n                darkMode\n                  ? \"bg-gray-800 text-white border-white/10 hover:bg-gray-700\"\n                  : \"bg-white text-black border-black/10 hover:bg-gray-50\"\n                }`}\n            >\n              Disconnect\n            </button>\n          )}\n        </div>\n\n        <ResultsSection\n          data={user}\n          darkMode={darkMode}\n          show={!!user?.loggedIn}\n          title=\"Current User Data\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-events-card.tsx",
    "content": "import {useFlowEvents, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useCallback} from \"react\"\nimport type {Event} from \"@onflow/typedefs\"\nimport {getEventType} from \"../../constants\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowEvents } from \"@onflow/react-sdk\"\n\nuseFlowEvents({\n  eventType: \"A.1654653399040a61.FlowToken.TokensWithdrawn\",\n  startBlockHeight: 0,\n  onEvent: (event) => {\n    console.log(\"New event:\", event)\n  },\n  onError: (error) => {\n    console.error(\"Event error:\", error)\n  }\n})`\n\nexport function UseFlowEventsCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n\n  const [eventTypes, setEventTypes] = useState([\n    getEventType(\"FlowToken\", \"TokensWithdrawn\", currentNetwork),\n  ])\n  const [fromBlock, setFromBlock] = useState<string>(\"\")\n  const [isListening, setIsListening] = useState(false)\n  const [events, setEvents] = useState<Event[]>([])\n  const [error, setError] = useState<Error | null>(null)\n\n  const onEvent = useCallback(\n    (event: Event) => {\n      if (isListening) {\n        setEvents(prev => [event, ...prev].slice(0, 50)) // Keep last 50 events\n      }\n    },\n    [isListening]\n  )\n\n  const onError = useCallback((err: Error) => {\n    setError(err)\n    setIsListening(false)\n  }, [])\n\n  // Always use the hook, but pass empty eventTypes when not listening\n  useFlowEvents({\n    eventTypes: isListening ? eventTypes : [],\n    startHeight: isListening && fromBlock ? parseInt(fromBlock) : undefined,\n    onEvent,\n    onError,\n  })\n\n  const presetEvents = [\n    {\n      name: \"FlowToken Withdrawn\",\n      type: getEventType(\"FlowToken\", \"TokensWithdrawn\", currentNetwork),\n    },\n    {\n      name: \"FlowToken Deposited\",\n      type: getEventType(\"FlowToken\", \"TokensDeposited\", currentNetwork),\n    },\n  ]\n\n  const handleStartListening = () => {\n    setEvents([])\n    setError(null)\n    setIsListening(true)\n  }\n\n  const handleStopListening = () => {\n    setIsListening(false)\n  }\n\n  const handleAddEventType = (type: string) => {\n    if (!eventTypes.includes(type)) {\n      setEventTypes(prev => [...prev, type])\n    }\n  }\n\n  const handleRemoveEventType = (type: string) => {\n    setEventTypes(prev => prev.filter(t => t !== type))\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowevents\"\n      title=\"useFlowEvents\"\n      description=\"Listen to blockchain events in real time and filter them by event type and block height range.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowevents\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Preset Event Types\n          </label>\n          <div className=\"flex flex-wrap gap-2\">\n            {presetEvents.map(preset => (\n              <button\n                key={preset.type}\n                onClick={() => handleAddEventType(preset.type)}\n                className={`px-4 py-2 text-sm font-medium rounded-lg border transition-all duration-200 ${\n                darkMode\n                    ? \"bg-gray-800 text-gray-300 border-white/10 hover:bg-gray-700\"\n                    : \"bg-white text-gray-700 border-black/10 hover:bg-gray-50\"\n                }`}\n              >\n                {preset.name}\n              </button>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Current Event Types\n          </label>\n          <div className=\"flex flex-wrap gap-2\">\n            {eventTypes.map(type => (\n              <div\n                key={type}\n                className={`inline-flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-mono ${\n                darkMode\n                    ? \"bg-gray-800 text-gray-300 border border-white/10\"\n                    : \"bg-gray-100 text-gray-700 border border-black/5\"\n                }`}\n              >\n                <span className=\"break-all\">{type}</span>\n                <button\n                  onClick={() => handleRemoveEventType(type)}\n                  className=\"text-red-500 hover:text-red-400 font-bold\"\n                >\n                  ×\n                </button>\n              </div>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            From Block (optional)\n          </label>\n          <input\n            type=\"number\"\n            value={fromBlock}\n            onChange={e => setFromBlock(e.target.value)}\n            placeholder=\"Start block height\"\n            disabled={isListening}\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              isListening\n                  ? darkMode\n                    ? \"bg-gray-800 text-gray-500 border-gray-700 cursor-not-allowed\"\n                    : \"bg-gray-100 text-gray-500 border-gray-300 cursor-not-allowed\"\n                  : darkMode\n                    ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                      placeholder-gray-600`\n                    : `bg-white text-black border-black/10 focus:border-flow-primary\n                      placeholder-gray-400`\n              }`}\n          />\n        </div>\n\n        <div className=\"flex gap-4\">\n          <button\n            onClick={handleStartListening}\n            disabled={isListening || eventTypes.length === 0}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isListening || eventTypes.length === 0\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isListening ? \"Listening...\" : \"Start Listening\"}\n          </button>\n\n          <button\n            onClick={handleStopListening}\n            disabled={!isListening}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              !isListening\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-red-500 text-white hover:bg-red-600\"\n              }`}\n          >\n            Stop Listening\n          </button>\n        </div>\n\n        <div\n          className={`relative p-6 rounded-lg border min-h-[200px] ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-sm font-medium mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n          >\n            Events\n          </h4>\n\n          {error && (\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-red-900/20 border-red-800/50\"\n                  : \"bg-red-50 border-red-200\"\n              }`}\n            >\n              <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n              <p\n                className={`text-sm font-medium ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n              >\n                Error: {error.message}\n              </p>\n            </div>\n          )}\n\n          {isListening && !error && (\n            <div className=\"flex items-center gap-3 mb-4\">\n              <div className=\"w-3 h-3 rounded-full bg-green-500 animate-pulse\" />\n              <span\n                className={`text-sm ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n              >\n                Listening for events...\n              </span>\n            </div>\n          )}\n\n          {!isListening && events.length === 0 && !error && (\n            <div className=\"text-center py-12\">\n              <svg\n                className=\"w-12 h-12 mx-auto mb-3 opacity-30\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={1.5}\n                  d=\"M15 17h5l-5 5-5-5h5v-12\"\n                />\n              </svg>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n              >\n                No events received yet. Click \"Start Listening\" to begin.\n              </p>\n            </div>\n          )}\n\n          {events.length > 0 && (\n            <div className=\"space-y-4 max-h-96 overflow-y-auto\">\n              {events.map((event, index) => (\n                <div\n                  key={`${event.transactionId}-${event.eventIndex}-${index}`}\n                  className={`relative p-4 rounded-lg border ${\n                  darkMode\n                      ? \"bg-gray-800 border-white/10\"\n                      : \"bg-white border-black/5\"\n                  }`}\n                >\n                  <div className=\"flex justify-between items-start mb-3\">\n                    <div className=\"flex-1 pr-4\">\n                      <span\n                        className={`text-sm font-mono font-medium block break-all ${\n                        darkMode ? \"text-white\" : \"text-black\" }`}\n                      >\n                        {event.type}\n                      </span>\n                      <div\n                        className={`text-xs mt-1 ${darkMode ? \"text-gray-500\" : \"text-gray-400\"}`}\n                      >\n                        Block: {event.blockHeight} • Event #{event.eventIndex}\n                      </div>\n                    </div>\n                    <span\n                      className={`px-2 py-1 rounded text-xs font-medium ${\n                      darkMode\n                          ? \"bg-gray-700 text-gray-300\"\n                          : \"bg-gray-100 text-gray-600\"\n                      }`}\n                    >\n                      #{index + 1}\n                    </span>\n                  </div>\n                  <details className=\"mt-2\">\n                    <summary\n                      className={`cursor-pointer text-xs font-medium ${\n                      darkMode ? \"text-gray-400\" : \"text-gray-600\" }`}\n                    >\n                      Show Details\n                    </summary>\n                    <div\n                      className={`mt-3 relative rounded-lg border ${\n                      darkMode\n                          ? \"bg-gray-800 border-white/5\"\n                          : \"bg-white border-black/5\"\n                      }`}\n                    >\n                      <div className=\"p-4 max-h-80 overflow-auto\">\n                        <pre\n                          className={`text-xs font-mono whitespace-pre-wrap ${\n                          darkMode ? \"text-gray-300\" : \"text-gray-700\" }`}\n                        >\n                          {JSON.stringify(event, null, 2)}\n                        </pre>\n                      </div>\n                    </div>\n                  </details>\n                </div>\n              ))}\n            </div>\n          )}\n        </div>\n\n        <ResultsSection\n          data={events}\n          darkMode={darkMode}\n          show={events.length > 0}\n          title=\"Events Received\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-mutate-card.tsx",
    "content": "import {useFlowConfig, useFlowMutate} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {CodeEditor} from \"../ui/code-editor\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowMutate } from \"@onflow/react-sdk\"\n\nconst { \n  mutate, \n  isPending, \n  error, \n  data: txId \n} = useFlowMutate({\n  cadence: TRANSACTION_CADENCE,\n  args: (arg, t) => [arg(\"value\", t.String)],\n  limit: 999,\n})`\n\nexport function UseFlowMutateCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [cadenceTransaction, setCadenceTransaction] = useState(\n    `transaction {\n    prepare(signer: &Account) {\n        log(\"Hello from a transaction!\")\n    }\n    \n    execute {\n        log(\"Transaction executed successfully\")\n    }\n}`.trim()\n  )\n\n  const {mutate, isPending, data: transactionId, error} = useFlowMutate()\n\n  const presetTransactions = [\n    {\n      name: \"Simple Log\",\n      transaction: `transaction {\n    prepare(signer: &Account) {\n        log(\"Hello from a transaction!\")\n    }\n    \n    execute {\n        log(\"Transaction executed successfully\")\n    }\n}`,\n    },\n  ]\n\n  const handleSendTransaction = () => {\n    mutate({\n      cadence: cadenceTransaction,\n      args: () => [],\n    })\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowmutate\"\n      title=\"useFlowMutate\"\n      description=\"Send transactions to the Flow blockchain using Cadence scripts with built-in loading states and error handling.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowmutate\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Preset Transactions\n          </label>\n          <div className=\"flex flex-wrap gap-2\">\n            {presetTransactions.map(preset => (\n              <button\n                key={preset.name}\n                onClick={() => setCadenceTransaction(preset.transaction)}\n                className={`px-4 py-2 text-sm font-medium rounded-lg border transition-all duration-200 ${\n                darkMode\n                    ? \"bg-gray-800 text-gray-300 border-white/10 hover:bg-gray-700\"\n                    : \"bg-white text-gray-700 border-black/10 hover:bg-gray-50\"\n                }`}\n              >\n                {preset.name}\n              </button>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Cadence Transaction\n          </label>\n          <CodeEditor\n            value={cadenceTransaction}\n            onChange={setCadenceTransaction}\n            language=\"javascript\"\n            placeholder=\"Enter your Cadence transaction here...\"\n            minHeight=\"150px\"\n          />\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={handleSendTransaction}\n            disabled={isPending}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isPending\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isPending ? \"Sending...\" : \"Send Transaction\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={transactionId || error}\n          darkMode={darkMode}\n          show={!!transactionId || !!error}\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-nft-metadata-card.tsx",
    "content": "import {useState} from \"react\"\nimport {useFlowNftMetadata} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowNftMetadata } from \"@onflow/react-sdk\"\n\nconst {\n  data: nft,\n  isLoading,\n  error,\n  refetch,\n} = useFlowNftMetadata({\n  accountAddress,\n  tokenId,\n  publicPathIdentifier,\n  query: { enabled: false, staleTime: 30000 },\n})`\n\nexport function UseFlowNftMetadataCard() {\n  const {darkMode} = useDarkMode()\n  const [accountAddress, setAccountAddress] = useState(\"\")\n  const [tokenId, setTokenId] = useState(\"\")\n  const [publicPathIdentifier, setPublicPathIdentifier] = useState(\n    \"exampleNFTCollection\"\n  )\n\n  // Normalize address to ensure it has 0x prefix\n  const normalizedAddress = accountAddress\n    ? accountAddress.startsWith(\"0x\")\n      ? accountAddress\n      : `0x${accountAddress}`\n    : undefined\n\n  const {\n    data: nft,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowNftMetadata({\n    accountAddress: normalizedAddress,\n    tokenId: tokenId || undefined,\n    publicPathIdentifier: publicPathIdentifier || undefined,\n    query: {enabled: false, staleTime: 30000},\n  })\n\n  return (\n    <DemoCard\n      id=\"useflownftmetadata\"\n      title=\"useFlowNftMetadata\"\n      description=\"Fetch NFT metadata from Flow blockchain including name, description, image, and traits.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflownftmetadata\"\n    >\n      <div className=\"space-y-6 overflow-hidden\">\n        <div className=\"space-y-4\">\n          <input\n            type=\"text\"\n            value={accountAddress}\n            onChange={e => setAccountAddress(e.target.value)}\n            placeholder=\"Account Address (0x...)\"\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              darkMode\n                  ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                    placeholder-gray-600`\n                  : `bg-white text-black border-black/10 focus:border-flow-primary\n                    placeholder-gray-400`\n              }`}\n          />\n\n          <input\n            type=\"text\"\n            value={tokenId}\n            onChange={e => setTokenId(e.target.value)}\n            placeholder=\"Token ID (e.g., 123)\"\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              darkMode\n                  ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                    placeholder-gray-600`\n                  : `bg-white text-black border-black/10 focus:border-flow-primary\n                    placeholder-gray-400`\n              }`}\n          />\n\n          <input\n            type=\"text\"\n            value={publicPathIdentifier}\n            onChange={e => setPublicPathIdentifier(e.target.value)}\n            placeholder=\"Public Path Identifier\"\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              darkMode\n                  ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                    placeholder-gray-600`\n                  : `bg-white text-black border-black/10 focus:border-flow-primary\n                    placeholder-gray-400`\n              }`}\n          />\n\n          <div className=\"flex justify-start\">\n            <button\n              onClick={() => refetch()}\n              disabled={isLoading || !accountAddress || !tokenId}\n              className={`py-3 px-6 rounded-lg font-medium transition-all duration-200 ${\n                isLoading || !accountAddress || !tokenId\n                  ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                  : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n                }`}\n            >\n              {isLoading ? \"Fetching NFT...\" : \"Fetch NFT\"}\n            </button>\n          </div>\n        </div>\n\n        {nft && !error && typeof nft === \"object\" && (\n          <div className=\"space-y-4\">\n            {nft.thumbnailUrl && (\n              <div\n                className={`relative p-4 rounded-lg border ${\n                darkMode\n                    ? \"bg-gray-900/50 border-white/10\"\n                    : \"bg-gray-50 border-black/5\"\n                }`}\n              >\n                <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n                <p\n                  className={`text-xs mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  NFT Image\n                </p>\n                <img\n                  src={nft.thumbnailUrl}\n                  alt={nft.name}\n                  className=\"max-w-full max-h-64 rounded-lg border border-white/10 mx-auto\"\n                  onError={e => {\n                    const target = e.target as HTMLImageElement\n                    target.style.display = \"none\"\n                  }}\n                />\n              </div>\n            )}\n\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-900/50 border-white/10\"\n                  : \"bg-gray-50 border-black/5\"\n              }`}\n            >\n              {!nft.thumbnailUrl && (\n                <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n              )}\n              <div className=\"space-y-3\">\n                <div>\n                  <p\n                    className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                  >\n                    Name\n                  </p>\n                  <p\n                    className={`text-lg font-bold ${darkMode ? \"text-white\" : \"text-black\"}`}\n                  >\n                    {nft.name}\n                  </p>\n                </div>\n\n                {nft.description && (\n                  <div>\n                    <p\n                      className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                    >\n                      Description\n                    </p>\n                    <p\n                      className={`text-sm ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                    >\n                      {nft.description}\n                    </p>\n                  </div>\n                )}\n\n                <div className=\"grid grid-cols-2 gap-3\">\n                  <div>\n                    <p\n                      className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                    >\n                      Token ID\n                    </p>\n                    <p\n                      className={`text-sm font-mono ${darkMode ? \"text-white\" : \"text-black\"}`}\n                    >\n                      {nft.tokenID}\n                    </p>\n                  </div>\n\n                  {nft.collectionName && (\n                    <div>\n                      <p\n                        className={`text-xs mb-1 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                      >\n                        Collection\n                      </p>\n                      <p\n                        className={`text-sm ${darkMode ? \"text-white\" : \"text-black\"}`}\n                      >\n                        {nft.collectionName}\n                      </p>\n                    </div>\n                  )}\n                </div>\n\n                {nft.traits && Object.keys(nft.traits).length > 0 && (\n                  <div>\n                    <p\n                      className={`text-xs mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                    >\n                      Traits\n                    </p>\n                    <div className=\"grid grid-cols-2 gap-2\">\n                      {Object.entries(nft.traits).map(([key, value]) => (\n                        <div\n                          key={key}\n                          className={`p-2 rounded border ${\n                          darkMode\n                              ? \"bg-gray-800 border-white/5\"\n                              : \"bg-white border-black/5\"\n                          }`}\n                        >\n                          <p\n                            className={`text-xs uppercase ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                          >\n                            {key}\n                          </p>\n                          <p\n                            className={`text-sm font-medium ${darkMode ? \"text-white\" : \"text-black\"}`}\n                          >\n                            {String(value)}\n                          </p>\n                        </div>\n                      ))}\n                    </div>\n                  </div>\n                )}\n              </div>\n            </div>\n          </div>\n        )}\n\n        {!isLoading && !nft && !error && accountAddress && tokenId && (\n          <div\n            className={`p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-yellow-900/20 border-yellow-500/20\"\n                : \"bg-yellow-50 border-yellow-200\"\n            }`}\n          >\n            <p\n              className={`text-sm ${darkMode ? \"text-yellow-300\" : \"text-yellow-800\"}`}\n            >\n              No NFT found. This could mean:\n            </p>\n            <ul\n              className={`list-disc list-inside text-xs mt-2 space-y-1\n              ${darkMode ? \"text-yellow-400\" : \"text-yellow-700\"}`}\n            >\n              <li>The NFT doesn't exist at this address/token ID</li>\n              <li>\n                The public path identifier is incorrect for this NFT collection\n              </li>\n              <li>\n                Try common paths: \"exampleNFTCollection\", \"TopShotCollection\",\n                \"FindMarketSaleCollection\"\n              </li>\n            </ul>\n          </div>\n        )}\n\n        <ResultsSection\n          data={nft || error}\n          darkMode={darkMode}\n          show={!!(nft || error) && !!accountAddress && !!tokenId}\n          title=\"NFT Metadata Response\"\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-query-card.tsx",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport {\n  useFlowConfig,\n  useFlowCurrentUser,\n  useFlowQuery,\n} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {getContractAddress} from \"../../constants\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {CodeEditor} from \"../ui/code-editor\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowQuery } from \"@onflow/react-sdk\"\n\nconst { \n  data, \n  isLoading, \n  error, \n  refetch \n} = useFlowQuery({\n  cadence: \\`\n    access(all) fun main(): String {\n      return \"Hello, Flow!\"\n    }\n  \\`,\n  args: [],\n})`\n\nexport function UseFlowQueryCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const {user: currentUser} = useFlowCurrentUser()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [cadenceScript, setCadenceScript] = useState(\n    `access(all) fun main(): String {\n    return \"Hello, World!\"\n}`.trim()\n  )\n  const [args, setArgs] = useState<\n    (arg: typeof fcl.arg, t: typeof fcl.t) => any[]\n  >(() => () => [])\n\n  const {\n    data: result,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowQuery({\n    cadence: cadenceScript,\n    args,\n    query: {enabled: false, staleTime: 10000},\n  })\n\n  const presetScripts = [\n    {\n      name: \"Hello World\",\n      script: `access(all) fun main(): String {\n    return \"Hello, World!\"\n}`,\n      args: () => () => [],\n    },\n    {\n      name: \"Current Block Height\",\n      script: `access(all) fun main(): UInt64 {\n    return getCurrentBlock().height\n}`,\n      args: () => () => [],\n    },\n    {\n      name: \"Get Account Balance\",\n      script: `import FlowToken from ${getContractAddress(\n        \"FlowToken\",\n        currentNetwork\n      )}\n\naccess(all) fun main(address: Address): UFix64 {\n    let account = getAccount(address)\n    let vaultRef = account.capabilities.borrow<&FlowToken.Vault>(/public/flowTokenBalance)\n    \n    return vaultRef?.balance ?? 0.0\n}`,\n      args: () => {\n        if (!currentUser?.addr) {\n          alert(\"Please connect your wallet to run this script.\")\n          return null\n        }\n        return () => [fcl.arg(currentUser.addr, fcl.t.Address)]\n      },\n    },\n  ]\n\n  const onSelectPreset = (preset: (typeof presetScripts)[number]) => {\n    const newArgs = preset.args()\n    if (newArgs) {\n      setCadenceScript(preset.script)\n      setArgs(() => newArgs)\n    }\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowquery\"\n      title=\"useFlowQuery\"\n      description=\"Execute Cadence scripts on Flow blockchain with automatic result parsing and caching support.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowquery\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Preset Scripts\n          </label>\n          <div className=\"flex flex-wrap gap-2\">\n            {presetScripts.map(preset => (\n              <button\n                key={preset.name}\n                onClick={() => onSelectPreset(preset)}\n                className={`px-4 py-2 text-sm font-medium rounded-lg border transition-all duration-200 ${\n                darkMode\n                    ? \"bg-gray-800 text-gray-300 border-white/10 hover:bg-gray-700\"\n                    : \"bg-white text-gray-700 border-black/10 hover:bg-gray-50\"\n                }`}\n              >\n                {preset.name}\n              </button>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Cadence Script\n          </label>\n          <CodeEditor\n            value={cadenceScript}\n            onChange={setCadenceScript}\n            language=\"javascript\"\n            placeholder=\"Enter your Cadence script here...\"\n            minHeight=\"150px\"\n          />\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={() => refetch()}\n            disabled={isLoading}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isLoading\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isLoading ? \"Executing...\" : \"Execute Script\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={result !== null && result !== undefined ? result : error}\n          darkMode={darkMode}\n          show={(result !== null && result !== undefined) || !!error}\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-query-raw-card.tsx",
    "content": "import {\n  useFlowConfig,\n  useFlowCurrentUser,\n  useFlowQueryRaw,\n} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport * as fcl from \"@onflow/fcl\"\nimport {getContractAddress} from \"../../constants\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\nimport {CodeEditor} from \"../ui/code-editor\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowQueryRaw } from \"@onflow/react-sdk\"\n\nconst { \n  data, \n  isLoading, \n  error, \n  refetch \n} = useFlowQueryRaw({\n  cadence: \\`\n    access(all) fun main(): String {\n      return \"Hello, Flow!\"\n    }\n  \\`,\n  args: [],\n})`\n\nexport function UseFlowQueryRawCard() {\n  const {darkMode} = useDarkMode()\n  const config = useFlowConfig()\n  const {user: currentUser} = useFlowCurrentUser()\n  const currentNetwork = config.flowNetwork || \"emulator\"\n  const [cadenceScript, setCadenceScript] = useState(\n    `access(all) fun main(): String {\n    return \"Hello from Raw Query!\"\n}`.trim()\n  )\n  const [args, setArgs] = useState<\n    (arg: typeof fcl.arg, t: typeof fcl.t) => any[]\n  >(() => () => [])\n\n  const {\n    data: result,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowQueryRaw({\n    cadence: cadenceScript,\n    args,\n    query: {enabled: false, staleTime: 10000},\n  })\n\n  const presetScripts = [\n    {\n      name: \"Hello World\",\n      script: `access(all) fun main(): String {\n    return \"Hello from Raw Query!\"\n}`,\n      args: () => () => [],\n    },\n    {\n      name: \"Current Block Info\",\n      script: `access(all) fun main(): [AnyStruct] {\n    let block = getCurrentBlock()\n    return [block.height, block.id, block.timestamp]\n}`,\n      args: () => () => [],\n    },\n    {\n      name: \"Get Account Balance\",\n      script: `import FlowToken from ${getContractAddress(\n        \"FlowToken\",\n        currentNetwork\n      )}\n\naccess(all) fun main(address: Address): UFix64 {\n    let account = getAccount(address)\n    let vaultRef = account.capabilities.borrow<&FlowToken.Vault>(/public/flowTokenBalance)\n    \n    return vaultRef?.balance ?? 0.0\n}`,\n      args: () => {\n        if (!currentUser?.addr) {\n          alert(\"Please connect your wallet to run this script.\")\n          return null\n        }\n        return () => [fcl.arg(currentUser.addr, fcl.t.Address)]\n      },\n    },\n  ]\n\n  const onSelectPreset = (preset: (typeof presetScripts)[number]) => {\n    const newArgs = preset.args()\n    if (newArgs) {\n      setCadenceScript(preset.script)\n      setArgs(() => newArgs)\n    }\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowqueryraw\"\n      title=\"useFlowQueryRaw\"\n      description=\"Execute Cadence scripts and receive the complete FCL response including status, events, and raw data without automatic parsing.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowqueryraw\"\n    >\n      <div className=\"space-y-6\">\n        <div\n          className={`relative p-4 rounded-lg border ${\n            darkMode\n              ? \"bg-amber-900/20 border-amber-800/50\"\n              : \"bg-amber-50 border-amber-200\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <div className=\"flex items-start space-x-2\">\n            <div className=\"flex-shrink-0 mt-0.5\">\n              <svg\n                className=\"w-4 h-4 text-amber-500\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={2}\n                  d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n                />\n              </svg>\n            </div>\n            <div>\n              <p\n                className={`text-sm font-medium ${darkMode ? \"text-amber-400\" : \"text-amber-700\"}`}\n              >\n                Raw Query Hook\n              </p>\n              <p\n                className={`text-xs mt-1 ${darkMode ? \"text-amber-400/70\" : \"text-amber-600/70\"}`}\n              >\n                Returns the complete FCL response without automatic parsing,\n                giving you access to status, events, and raw data.\n              </p>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Preset Scripts\n          </label>\n          <div className=\"flex flex-wrap gap-2\">\n            {presetScripts.map(preset => (\n              <button\n                key={preset.name}\n                onClick={() => onSelectPreset(preset)}\n                className={`px-4 py-2 text-sm font-medium rounded-lg border transition-all duration-200 ${\n                darkMode\n                    ? \"bg-gray-800 text-gray-300 border-white/10 hover:bg-gray-700\"\n                    : \"bg-white text-gray-700 border-black/10 hover:bg-gray-50\"\n                }`}\n              >\n                {preset.name}\n              </button>\n            ))}\n          </div>\n        </div>\n\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Cadence Script\n          </label>\n          <CodeEditor\n            value={cadenceScript}\n            onChange={setCadenceScript}\n            language=\"javascript\"\n            placeholder=\"Enter your Cadence script here...\"\n            minHeight=\"150px\"\n          />\n        </div>\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={() => refetch()}\n            disabled={isLoading}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isLoading\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isLoading ? \"Executing...\" : \"Execute Script (Raw)\"}\n          </button>\n        </div>\n\n        <ResultsSection\n          data={result || error}\n          darkMode={darkMode}\n          show={!!result || !!error}\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-revertible-random-card.tsx",
    "content": "import {useFlowRevertibleRandom} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowRevertibleRandom } from \"@onflow/react-sdk\"\n\nconst { \n  data: randomNumber, \n  isLoading, \n  error, \n  refetch \n} = useFlowRevertibleRandom({\n  query: { enabled: true }\n})`\n\nexport function UseFlowRevertibleRandomCard() {\n  const {darkMode} = useDarkMode()\n  const {\n    data: randomResults,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowRevertibleRandom({\n    max: \"1000000000\",\n    count: 1,\n  })\n\n  return (\n    <DemoCard\n      id=\"useflowrevertiblerandom\"\n      title=\"useFlowRevertibleRandom\"\n      description={\n        <>\n          Generate pseudorandom numbers for simple use cases like randomized\n          UIs. Values are deterministic within the same block.{\" \"}\n          <a\n            href=\"https://developers.flow.com/build/cadence/advanced-concepts/randomness#commit-reveal-scheme\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            className={`underline transition-colors ${\n            darkMode\n                ? \"text-flow-primary hover:text-flow-primary/80\"\n                : \"text-flow-600 hover:text-flow-700\"\n            }`}\n          >\n            See advanced patterns\n          </a>{\" \"}\n          for onchain randomness.\n        </>\n      }\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowrevertiblerandom\"\n    >\n      <div className=\"space-y-6\">\n        {randomResults && randomResults.length > 0 && !isLoading && !error && (\n          <div\n            className={`relative p-6 rounded-lg border ${\n            darkMode\n                ? \"bg-gray-800 border-white/10\"\n                : \"bg-white border-black/5\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <div className=\"text-center\">\n              <p\n                className={`text-sm font-medium mb-3 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Generated Random Value\n              </p>\n              <div\n                className={`text-4xl font-bold font-mono tracking-wider p-6 rounded mb-4 ${\n                darkMode\n                    ? \"bg-gray-900 text-green-400 border border-white/5\"\n                    : \"bg-gray-100 text-gray-900 border border-black/5\"\n                }`}\n              >\n                {randomResults[0].value}\n              </div>\n              <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n                <div\n                  className={`p-3 rounded border ${\n                  darkMode\n                      ? \"bg-gray-900/50 border-white/5\"\n                      : \"bg-gray-50 border-black/5\"\n                  }`}\n                >\n                  <h6\n                    className={`text-xs font-medium mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                  >\n                    Hexadecimal\n                  </h6>\n                  <div\n                    className={`font-mono text-xs break-all ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                  >\n                    0x\n                    {BigInt(randomResults[0].value).toString(16).toUpperCase()}\n                  </div>\n                </div>\n                <div\n                  className={`p-3 rounded border ${\n                  darkMode\n                      ? \"bg-gray-900/50 border-white/5\"\n                      : \"bg-gray-50 border-black/5\"\n                  }`}\n                >\n                  <h6\n                    className={`text-xs font-medium mb-2 ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                  >\n                    Block Height\n                  </h6>\n                  <div\n                    className={`font-mono text-xs ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                  >\n                    {randomResults[0].blockHeight}\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        )}\n\n        <div className=\"flex justify-start\">\n          <button\n            onClick={() => refetch()}\n            disabled={isLoading}\n            className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isLoading\n                ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n          >\n            {isLoading ? \"Generating...\" : \"Generate Random Value\"}\n          </button>\n        </div>\n\n        {error && (\n          <div\n            className={`relative p-4 rounded-lg border ${\n            darkMode\n                ? \"bg-red-900/20 border-red-800/50\"\n                : \"bg-red-50 border-red-200\"\n            }`}\n          >\n            <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n            <div>\n              <p\n                className={`text-sm font-medium mb-1 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n              >\n                Generation Failed\n              </p>\n              <p\n                className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n              >\n                {error.message}\n              </p>\n            </div>\n          </div>\n        )}\n\n        <ResultsSection\n          data={randomResults}\n          darkMode={darkMode}\n          show={!!randomResults && randomResults.length > 0 && !error}\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-scheduled-transaction-card.tsx",
    "content": "import {\n  useFlowCurrentUser,\n  useFlowScheduledTransactionList,\n  useFlowScheduledTransaction,\n  useFlowScheduledTransactionSetup,\n  useFlowScheduledTransactionCancel,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n  type ScheduledTransaction,\n} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import {\n  useFlowScheduledTransactionList,\n  useFlowScheduledTransaction,\n  useFlowScheduledTransactionSetup,\n  useFlowScheduledTransactionCancel\n} from \"@onflow/react-sdk\"\n\n// Setup the scheduler (one-time initialization)\nconst { setupAsync, isPending: isSettingUp } = useFlowScheduledTransactionSetup()\nawait setupAsync()\n\n// List all scheduled transactions for an account\nconst { data: transactions, isLoading } = useFlowScheduledTransactionList({\n  account: \"0xACCOUNT\",\n  includeHandlerData: true  // Optional: include handler details\n})\n\n// Get a specific scheduled transaction by ID\nconst { data: transaction } = useFlowScheduledTransaction({\n  txId: \"42\",\n  includeHandlerData: true\n})\n\n// Cancel a scheduled transaction\nconst { cancelTransactionAsync } = useFlowScheduledTransactionCancel()\nawait cancelTransactionAsync(\"42\")`\n\nconst PRIORITY_LABELS: Record<ScheduledTransactionPriority, string> = {\n  [ScheduledTransactionPriority.Low]: \"Low\",\n  [ScheduledTransactionPriority.Medium]: \"Medium\",\n  [ScheduledTransactionPriority.High]: \"High\",\n}\n\nconst STATUS_LABELS: Record<ScheduledTransactionStatus, string> = {\n  [ScheduledTransactionStatus.Pending]: \"Pending\",\n  [ScheduledTransactionStatus.Processing]: \"Processing\",\n  [ScheduledTransactionStatus.Completed]: \"Completed\",\n  [ScheduledTransactionStatus.Failed]: \"Failed\",\n  [ScheduledTransactionStatus.Cancelled]: \"Cancelled\",\n}\n\nexport function UseFlowScheduledTransactionCard() {\n  const {darkMode} = useDarkMode()\n  const {user} = useFlowCurrentUser()\n\n  // Individual hooks for each operation\n  const {setupAsync, isPending: isSettingUp} =\n    useFlowScheduledTransactionSetup()\n  const {cancelTransactionAsync, isPending: isCancelling} =\n    useFlowScheduledTransactionCancel()\n\n  const [activeTab, setActiveTab] = useState<\n    \"setup\" | \"list\" | \"get\" | \"cancel\"\n  >(\"setup\")\n  const [txId, setTxId] = useState(\"\")\n  const [accountAddress, setAccountAddress] = useState(\"\")\n  const [includeHandlerData, setIncludeHandlerData] = useState(false)\n  const [result, setResult] = useState<any>(null)\n  const [error, setError] = useState<string | null>(null)\n\n  // Helper function to normalize address (add 0x prefix if missing)\n  const normalizeAddress = (address: string): string => {\n    if (!address) return address\n    const trimmed = address.trim()\n    return trimmed.startsWith(\"0x\") ? trimmed : `0x${trimmed}`\n  }\n\n  // Query hooks - reactive to input changes\n  const normalizedAccountAddress = accountAddress\n    ? normalizeAddress(accountAddress)\n    : user?.addr\n  const listQuery = useFlowScheduledTransactionList({\n    account: normalizedAccountAddress,\n    includeHandlerData,\n    query: {\n      enabled: activeTab === \"list\" && Boolean(normalizedAccountAddress),\n    },\n  })\n\n  const getQuery = useFlowScheduledTransaction({\n    txId: txId,\n    includeHandlerData,\n    query: {\n      enabled: activeTab === \"get\" && Boolean(txId),\n    },\n  })\n\n  const handleSetup = async () => {\n    setError(null)\n    setResult(null)\n    try {\n      const txId = await setupAsync()\n      setResult({txId, message: \"Manager setup successfully\"})\n    } catch (err: any) {\n      setError(err.message || \"Setup failed\")\n    }\n  }\n\n  const handleList = () => {\n    setError(null)\n    setResult(null)\n\n    if (!normalizedAccountAddress) {\n      setError(\"Please connect your wallet or enter an account address\")\n      return\n    }\n\n    // Results will automatically update via listQuery\n    if (listQuery.data) {\n      setResult({\n        account: normalizedAccountAddress,\n        count: listQuery.data.length,\n        transactions: listQuery.data,\n      })\n    }\n  }\n\n  const handleGet = () => {\n    setError(null)\n    setResult(null)\n\n    if (!txId) {\n      setError(\"Please enter a transaction ID\")\n      return\n    }\n\n    // Results will automatically update via getQuery\n    if (getQuery.data !== undefined) {\n      setResult(getQuery.data || {message: \"Transaction not found\"})\n    }\n  }\n\n  const handleCancel = async () => {\n    if (!txId) {\n      setError(\"Please enter a transaction ID\")\n      return\n    }\n\n    setError(null)\n    setResult(null)\n    try {\n      const cancelTxId = await cancelTransactionAsync(txId)\n      setResult({\n        txId: cancelTxId,\n        message: \"Transaction cancelled successfully\",\n      })\n    } catch (err: any) {\n      setError(err.message || \"Failed to cancel transaction\")\n    }\n  }\n\n  const formatTransactionInfo = (tx: ScheduledTransaction) => {\n    if (!tx.id) return tx\n\n    return {\n      ID: tx.id,\n      Priority:\n        PRIORITY_LABELS[tx.priority as ScheduledTransactionPriority] ||\n        tx.priority,\n      Status:\n        STATUS_LABELS[tx.status as ScheduledTransactionStatus] || tx.status,\n      \"Execution Effort\": tx.executionEffort.toString(),\n      \"Fees (FLOW)\": tx.fees.formatted,\n      \"Scheduled At\": new Date(tx.scheduledTimestamp * 1000).toLocaleString(),\n      \"Handler Type\": tx.handlerTypeIdentifier,\n      \"Handler Address\": tx.handlerAddress,\n      ...(tx.handlerUUID && {\"Handler UUID\": tx.handlerUUID}),\n      ...(tx.handlerResolvedViews && {\n        \"Handler Views\": Object.keys(tx.handlerResolvedViews).length,\n      }),\n    }\n  }\n\n  const isLoading =\n    (activeTab === \"list\" && listQuery.isLoading) ||\n    (activeTab === \"get\" && getQuery.isLoading) ||\n    isSettingUp ||\n    isCancelling\n\n  return (\n    <DemoCard\n      id=\"useflowscheduledtransaction\"\n      title=\"Scheduled Transactions\"\n      description=\"Scheduled Transactions enable autonomous execution of blockchain logic at specific future times without external triggers. Perfect for recurring payments, automated arbitrage, time-based contracts, and delayed executions. This demo shows how to setup a scheduler manager, list scheduled transactions, fetch specific transactions, and cancel them before execution.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/cadence/advanced-concepts/scheduled-transactions\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"flex space-x-2 border-b border-gray-200 dark:border-gray-700\">\n          {([\"setup\", \"list\", \"get\", \"cancel\"] as const).map(tab => (\n            <button\n              key={tab}\n              onClick={() => {\n                setActiveTab(tab)\n                setResult(null)\n                setError(null)\n              }}\n              className={`px-4 py-2 font-medium transition-colors ${\n              activeTab === tab\n                  ? darkMode\n                    ? \"border-b-2 border-flow-primary text-white\"\n                    : \"border-b-2 border-flow-primary text-black\"\n                  : darkMode\n                    ? \"text-gray-400 hover:text-gray-300\"\n                    : \"text-gray-600 hover:text-gray-800\"\n              }`}\n            >\n              {tab.charAt(0).toUpperCase() + tab.slice(1)}\n            </button>\n          ))}\n        </div>\n\n        {activeTab === \"setup\" && (\n          <div className=\"space-y-4\">\n            <div\n              className={`p-4 rounded-lg border\n              ${darkMode ? \"bg-gray-800/50 border-white/10\" : \"bg-gray-50 border-black/10\"}`}\n            >\n              <p\n                className={`text-sm font-medium mb-2 ${darkMode ? \"text-gray-200\" : \"text-gray-900\"}`}\n              >\n                Setup Scheduler Manager\n              </p>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Before scheduling transactions, you need to initialize a Manager\n                resource in your account. This is a one-time setup that creates\n                the necessary storage and capabilities for managing scheduled\n                transactions. The manager tracks your scheduled transactions and\n                handles their execution.\n              </p>\n            </div>\n            <button\n              onClick={handleSetup}\n              disabled={isSettingUp || !user?.addr}\n              className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isSettingUp || !user?.addr\n                  ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                  : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n              }`}\n            >\n              {isSettingUp ? \"Setting up...\" : \"Setup Manager\"}\n            </button>\n            {!user?.addr && (\n              <p\n                className={`text-sm ${darkMode ? \"text-yellow-400\" : \"text-yellow-600\"}`}\n              >\n                Please connect your wallet to setup the scheduler\n              </p>\n            )}\n          </div>\n        )}\n\n        {activeTab === \"list\" && (\n          <div className=\"space-y-4\">\n            <div\n              className={`p-4 rounded-lg border\n              ${darkMode ? \"bg-gray-800/50 border-white/10\" : \"bg-gray-50 border-black/10\"}`}\n            >\n              <p\n                className={`text-sm font-medium mb-2 ${darkMode ? \"text-gray-200\" : \"text-gray-900\"}`}\n              >\n                List Scheduled Transactions\n              </p>\n              <p\n                className={`text-sm mb-3 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                View all scheduled transactions for an account. Each transaction\n                shows its ID, priority level (High/Medium/Low), execution\n                status, computational effort, fees, and scheduled execution\n                time. Optionally include handler data to see the transaction's\n                metadata and resolved views.\n              </p>\n              <p\n                className={`text-xs px-3 py-2 rounded\n                ${darkMode ? \"bg-yellow-900/30 text-yellow-400 border border-yellow-700/30\" : \"bg-yellow-50 text-yellow-800 border border-yellow-200\"}`}\n              >\n                <span className=\"font-medium\">Note:</span> Only returns\n                transactions in pending state (not yet executed). Once executed,\n                transactions are removed from the list.\n              </p>\n            </div>\n            <div className=\"space-y-3\">\n              <label\n                className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Account Address (optional)\n              </label>\n              <input\n                type=\"text\"\n                value={accountAddress}\n                onChange={e => setAccountAddress(e.target.value)}\n                placeholder={\n                  user?.addr\n                    ? `Default: ${user.addr}`\n                    : \"e.g., 0x1234567890abcdef\"\n                }\n                className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n                ${\n                darkMode\n                    ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                      focus:border-flow-primary/50`\n                    : `bg-white border-black/10 text-black placeholder-gray-400\n                      focus:border-flow-primary/50`\n                } outline-none`}\n              />\n              <p\n                className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n              >\n                Leave empty to use connected wallet address\n              </p>\n            </div>\n            <div className=\"flex items-center space-x-3\">\n              <input\n                type=\"checkbox\"\n                id=\"includeHandlerList\"\n                checked={includeHandlerData}\n                onChange={e => setIncludeHandlerData(e.target.checked)}\n                className=\"w-4 h-4\"\n              />\n              <label\n                htmlFor=\"includeHandlerList\"\n                className={`text-sm ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Include handler data\n              </label>\n            </div>\n            <div className=\"flex gap-3\">\n              <button\n                onClick={handleList}\n                disabled={listQuery.isLoading || !normalizedAccountAddress}\n                className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n                listQuery.isLoading || !normalizedAccountAddress\n                    ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                    : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n                }`}\n              >\n                {listQuery.isLoading ? \"Loading...\" : \"List Transactions\"}\n              </button>\n              {listQuery.data && (\n                <button\n                  onClick={() => listQuery.refetch()}\n                  disabled={listQuery.isRefetching}\n                  className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n                  listQuery.isRefetching\n                      ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                      : darkMode\n                        ? \"bg-gray-700 text-white hover:bg-gray-600\"\n                        : \"bg-gray-200 text-black hover:bg-gray-300\"\n                  }`}\n                >\n                  {listQuery.isRefetching ? \"Refreshing...\" : \"Refresh\"}\n                </button>\n              )}\n            </div>\n          </div>\n        )}\n\n        {activeTab === \"get\" && (\n          <div className=\"space-y-4\">\n            <div\n              className={`p-4 rounded-lg border\n              ${darkMode ? \"bg-gray-800/50 border-white/10\" : \"bg-gray-50 border-black/10\"}`}\n            >\n              <p\n                className={`text-sm font-medium mb-2 ${darkMode ? \"text-gray-200\" : \"text-gray-900\"}`}\n              >\n                Get Scheduled Transaction\n              </p>\n              <p\n                className={`text-sm mb-3 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Fetch detailed information about a specific scheduled\n                transaction by its ID. This returns the transaction's current\n                status, priority, fees, execution timestamp, and handler\n                information. Useful for monitoring individual transactions and\n                checking their execution state.\n              </p>\n              <p\n                className={`text-xs px-3 py-2 rounded\n                ${darkMode ? \"bg-yellow-900/30 text-yellow-400 border border-yellow-700/30\" : \"bg-yellow-50 text-yellow-800 border border-yellow-200\"}`}\n              >\n                <span className=\"font-medium\">Note:</span> Only returns data for\n                transactions in pending state. Returns null if the transaction\n                has been executed or doesn't exist.\n              </p>\n            </div>\n            <div className=\"space-y-3\">\n              <label\n                className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Transaction ID\n              </label>\n              <input\n                type=\"text\"\n                value={txId}\n                onChange={e => setTxId(e.target.value)}\n                placeholder=\"e.g., 123\"\n                className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n                ${\n                darkMode\n                    ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                      focus:border-flow-primary/50`\n                    : `bg-white border-black/10 text-black placeholder-gray-400\n                      focus:border-flow-primary/50`\n                } outline-none`}\n              />\n            </div>\n            <div className=\"flex items-center space-x-3\">\n              <input\n                type=\"checkbox\"\n                id=\"includeHandlerGet\"\n                checked={includeHandlerData}\n                onChange={e => setIncludeHandlerData(e.target.checked)}\n                className=\"w-4 h-4\"\n              />\n              <label\n                htmlFor=\"includeHandlerGet\"\n                className={`text-sm ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Include handler data\n              </label>\n            </div>\n            <div className=\"flex gap-3\">\n              <button\n                onClick={handleGet}\n                disabled={getQuery.isLoading || !txId}\n                className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n                getQuery.isLoading || !txId\n                    ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                    : \"bg-flow-primary text-black hover:bg-flow-primary/80\"\n                }`}\n              >\n                {getQuery.isLoading ? \"Loading...\" : \"Get Transaction\"}\n              </button>\n              {getQuery.data && (\n                <button\n                  onClick={() => getQuery.refetch()}\n                  disabled={getQuery.isRefetching}\n                  className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n                  getQuery.isRefetching\n                      ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                      : darkMode\n                        ? \"bg-gray-700 text-white hover:bg-gray-600\"\n                        : \"bg-gray-200 text-black hover:bg-gray-300\"\n                  }`}\n                >\n                  {getQuery.isRefetching ? \"Refreshing...\" : \"Refresh\"}\n                </button>\n              )}\n            </div>\n          </div>\n        )}\n\n        {activeTab === \"cancel\" && (\n          <div className=\"space-y-4\">\n            <div\n              className={`p-4 rounded-lg border\n              ${darkMode ? \"bg-gray-800/50 border-white/10\" : \"bg-gray-50 border-black/10\"}`}\n            >\n              <p\n                className={`text-sm font-medium mb-2 ${darkMode ? \"text-gray-200\" : \"text-gray-900\"}`}\n              >\n                Cancel Scheduled Transaction\n              </p>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                Cancel a pending scheduled transaction before it executes. This\n                prevents the transaction from running and refunds any prepaid\n                fees back to your account. Only transactions in \"Pending\" status\n                can be cancelled - once a transaction starts processing or\n                completes, it cannot be cancelled.\n              </p>\n            </div>\n            <div className=\"space-y-3\">\n              <label\n                className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n              >\n                Transaction ID\n              </label>\n              <input\n                type=\"text\"\n                value={txId}\n                onChange={e => setTxId(e.target.value)}\n                placeholder=\"e.g., 123\"\n                className={`w-full px-4 py-3 rounded-lg border font-mono text-sm transition-all duration-200\n                ${\n                darkMode\n                    ? `bg-gray-900/50 border-white/10 text-white placeholder-gray-500\n                      focus:border-flow-primary/50`\n                    : `bg-white border-black/10 text-black placeholder-gray-400\n                      focus:border-flow-primary/50`\n                } outline-none`}\n              />\n            </div>\n            <button\n              onClick={handleCancel}\n              disabled={isCancelling || !txId || !user?.addr}\n              className={`px-6 py-3 rounded-lg font-medium transition-all duration-200 ${\n              isCancelling || !txId || !user?.addr\n                  ? \"bg-gray-300 text-gray-500 cursor-not-allowed\"\n                  : \"bg-red-600 text-white hover:bg-red-700\"\n              }`}\n            >\n              {isCancelling ? \"Cancelling...\" : \"Cancel Transaction\"}\n            </button>\n            {!user?.addr && (\n              <p\n                className={`text-sm ${darkMode ? \"text-yellow-400\" : \"text-yellow-600\"}`}\n              >\n                Please connect your wallet to cancel transactions\n              </p>\n            )}\n          </div>\n        )}\n\n        {activeTab === \"list\" && listQuery.data && !result && (\n          <ResultsSection\n            data={{\n              account: normalizedAccountAddress,\n              count: listQuery.data.length,\n              transactions: listQuery.data.map(formatTransactionInfo),\n            }}\n            darkMode={darkMode}\n            show={true}\n            title=\"Result\"\n          />\n        )}\n\n        {activeTab === \"get\" && getQuery.data && !result && (\n          <ResultsSection\n            data={formatTransactionInfo(getQuery.data)}\n            darkMode={darkMode}\n            show={true}\n            title=\"Result\"\n          />\n        )}\n\n        {(result || error) && (\n          <ResultsSection\n            data={\n              error\n                ? error\n                : result?.transactions\n                  ? {\n                      account: result.account,\n                      count: result.count,\n                      transactions: result.transactions.map(\n                        formatTransactionInfo\n                      ),\n                    }\n                  : formatTransactionInfo(result)\n            }\n            darkMode={darkMode}\n            show={true}\n            title={error ? \"Error\" : \"Result\"}\n          />\n        )}\n\n        {isLoading && !result && !error && (\n          <div\n            className={`text-center py-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n          >\n            Loading...\n          </div>\n        )}\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/hook-cards/use-flow-transaction-status-card.tsx",
    "content": "import {useFlowTransactionStatus} from \"@onflow/react-sdk\"\nimport {useState, useEffect} from \"react\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {ResultsSection} from \"../ui/results-section\"\n\nconst IMPLEMENTATION_CODE = `import { useFlowTransactionStatus } from \"@onflow/react-sdk\"\n\nconst { \n  transactionStatus, \n  error \n} = useFlowTransactionStatus({\n  id: txId\n})`\n\n// Error boundary wrapper for the hook\nfunction useSafeFlowTransactionStatus(id?: string) {\n  const [hookError, setHookError] = useState<string | null>(null)\n  const [transactionStatus, setTransactionStatus] = useState<any>(null)\n  const [isLoading, setIsLoading] = useState(false)\n\n  // Direct hook call with error handling\n  const hookResult = (() => {\n    try {\n      return useFlowTransactionStatus({\n        id,\n      })\n    } catch (error) {\n      return {\n        transactionStatus: null,\n        error:\n          error instanceof Error ? error : new Error(\"Unknown error occurred\"),\n      }\n    }\n  })()\n\n  useEffect(() => {\n    if (!id) {\n      setHookError(null)\n      setTransactionStatus(null)\n      setIsLoading(false)\n      return\n    }\n\n    setIsLoading(true)\n    setHookError(null)\n\n    try {\n      if (hookResult.error) {\n        if (hookResult.error.message.includes(\"Invalid transactionId\")) {\n          setHookError(\"Invalid transaction ID format\")\n        } else {\n          setHookError(hookResult.error.message)\n        }\n      } else {\n        setTransactionStatus(hookResult.transactionStatus)\n      }\n    } catch (error) {\n      setHookError(\n        error instanceof Error\n          ? error.message\n          : \"Failed to fetch transaction status\"\n      )\n    } finally {\n      setIsLoading(false)\n    }\n  }, [id, hookResult.error, hookResult.transactionStatus])\n\n  return {\n    transactionStatus,\n    error: hookResult.error,\n    hookError,\n    isLoading,\n  }\n}\n\nexport function UseFlowTransactionStatusCard() {\n  const {darkMode} = useDarkMode()\n  const [transactionId, setTransactionId] = useState(\"\")\n  const [debugInfo, setDebugInfo] = useState(\"\")\n\n  // Normalize transaction ID - remove 0x prefix if present (Flow IDs don't use 0x)\n  const normalizeTransactionId = (id: string): string => {\n    const trimmedId = id.trim()\n    if (!trimmedId) return \"\"\n\n    // Remove 0x prefix if present\n    if (trimmedId.startsWith(\"0x\")) {\n      return trimmedId.slice(2)\n    }\n    return trimmedId\n  }\n\n  // Flow transaction IDs are exactly 64 hex characters (no 0x prefix)\n  const isValidTransactionId = (id: string): boolean => {\n    const normalized = normalizeTransactionId(id)\n    if (!normalized) return false\n\n    // Must be exactly 64 hex characters\n    if (normalized.length !== 64) {\n      return false\n    }\n\n    // Must contain only valid hex characters\n    return /^[a-fA-F0-9]{64}$/.test(normalized)\n  }\n\n  // Only pass valid transaction IDs to the hook, with error catching\n  const validTransactionId = isValidTransactionId(transactionId)\n    ? normalizeTransactionId(transactionId)\n    : undefined\n\n  // Add debug logging\n  useEffect(() => {\n    if (transactionId.trim()) {\n      setDebugInfo(\n        `Input: \"${transactionId.trim()}\", Length: ${transactionId.trim().length}, Valid: ${isValidTransactionId(transactionId)}`\n      )\n    } else {\n      setDebugInfo(\"\")\n    }\n  }, [transactionId])\n\n  // Use safe wrapper hook\n  const {transactionStatus, error, hookError, isLoading} =\n    useSafeFlowTransactionStatus(validTransactionId)\n\n  const getStatusColor = (statusCode: number) => {\n    switch (statusCode) {\n      case 0: // UNKNOWN\n        return \"bg-gray-500\"\n      case 1: // PENDING\n        return \"bg-yellow-500\"\n      case 2: // FINALIZED\n        return \"bg-purple-500\"\n      case 3: // EXECUTED\n        return \"bg-green-500\"\n      case 4: // SEALED\n        return \"bg-green-500\"\n      case 5: // EXPIRED\n        return \"bg-red-500\"\n      default:\n        return \"bg-gray-500\"\n    }\n  }\n\n  const getStatusText = (statusCode: number) => {\n    switch (statusCode) {\n      case 0:\n        return \"UNKNOWN\"\n      case 1:\n        return \"PENDING\"\n      case 2:\n        return \"FINALIZED\"\n      case 3:\n        return \"EXECUTED\"\n      case 4:\n        return \"SEALED\"\n      case 5:\n        return \"EXPIRED\"\n      default:\n        return `UNKNOWN (${statusCode})`\n    }\n  }\n\n  return (\n    <DemoCard\n      id=\"useflowtransactionstatus\"\n      title=\"useFlowTransactionStatus\"\n      description=\"Monitor Flow transaction statuses in real time with automatic updates from pending to sealed.\"\n      code={IMPLEMENTATION_CODE}\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk/hooks#useflowtransactionstatus\"\n    >\n      <div className=\"space-y-6\">\n        <div className=\"space-y-3\">\n          <label\n            className={`block text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Transaction ID\n          </label>\n          <input\n            type=\"text\"\n            value={transactionId}\n            onChange={e => setTransactionId(e.target.value)}\n            placeholder=\"Enter Flow transaction ID (64 hex chars, 0x prefix optional)\"\n            className={`w-full px-4 py-3 font-mono text-sm rounded-lg border outline-none transition-all\n              duration-200 ${\n              transactionId.trim() === \"\"\n                  ? darkMode\n                    ? `bg-gray-900 text-white border-white/10 focus:border-flow-primary\n                      placeholder-gray-600`\n                    : `bg-white text-black border-black/10 focus:border-flow-primary\n                      placeholder-gray-400`\n                  : isValidTransactionId(transactionId)\n                    ? darkMode\n                      ? \"border-green-500 bg-green-900/20 text-green-400\"\n                      : \"border-green-500 bg-green-50 text-green-900\"\n                    : darkMode\n                      ? \"border-red-500 bg-red-900/20 text-red-400\"\n                      : \"border-red-500 bg-red-50 text-red-900\"\n              }`}\n          />\n\n          {transactionId.trim() !== \"\" &&\n            !isValidTransactionId(transactionId) && (\n              <div\n                className={`relative p-3 rounded-lg border ${\n                darkMode\n                    ? \"bg-red-900/20 border-red-800/50\"\n                    : \"bg-red-50 border-red-200\"\n                }`}\n              >\n                <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n                <div>\n                  <p\n                    className={`text-sm font-medium mb-1 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                  >\n                    Invalid Format\n                  </p>\n                  <p\n                    className={`text-xs ${darkMode ? \"text-red-400/70\" : \"text-red-600/70\"}`}\n                  >\n                    Flow transaction ID must be exactly 64 hex characters (0x\n                    prefix optional)\n                  </p>\n                  {debugInfo && (\n                    <p\n                      className={`text-xs mt-2 font-mono ${darkMode ? \"text-red-400/50\" : \"text-red-600/50\"}`}\n                    >\n                      {debugInfo}\n                    </p>\n                  )}\n                </div>\n              </div>\n            )}\n\n          {transactionId.trim() !== \"\" &&\n            isValidTransactionId(transactionId) && (\n              <div\n                className={`relative p-3 rounded-lg border ${\n                darkMode\n                    ? \"bg-green-900/20 border-green-800/50\"\n                    : \"bg-green-50 border-green-200\"\n                }`}\n              >\n                <div className=\"flex items-center space-x-2\">\n                  <svg\n                    className=\"w-4 h-4 text-green-500\"\n                    fill=\"none\"\n                    viewBox=\"0 0 24 24\"\n                    stroke=\"currentColor\"\n                  >\n                    <path\n                      strokeLinecap=\"round\"\n                      strokeLinejoin=\"round\"\n                      strokeWidth={2}\n                      d=\"M5 13l4 4L19 7\"\n                    />\n                  </svg>\n                  <p\n                    className={`text-sm font-medium ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                  >\n                    Valid transaction ID format - monitoring status...\n                  </p>\n                </div>\n                {debugInfo && (\n                  <p\n                    className={`text-xs mt-2 font-mono ${darkMode ? \"text-green-400/50\" : \"text-green-600/50\"}`}\n                  >\n                    {debugInfo}\n                  </p>\n                )}\n              </div>\n            )}\n\n          {!transactionId.trim() && (\n            <p\n              className={`text-xs ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n            >\n              Enter a transaction ID above to automatically monitor its status\n              updates\n            </p>\n          )}\n        </div>\n\n        <div\n          className={`relative p-4 rounded-lg border ${\n            darkMode\n              ? \"bg-gray-800/30 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"bottom right\" className=\"absolute\" />\n          <h4\n            className={`text-sm font-semibold mb-3 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Status Legend\n          </h4>\n          <div className=\"grid grid-cols-1 md:grid-cols-2 gap-3\">\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  0\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-gray-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  UNKNOWN\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Transaction not found or not yet submitted\n                </p>\n              </div>\n            </div>\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  1\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-yellow-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  PENDING\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Awaiting execution by network\n                </p>\n              </div>\n            </div>\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  2\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-purple-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  FINALIZED\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Included in a block by consensus nodes\n                </p>\n              </div>\n            </div>\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  3\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-green-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  EXECUTED\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Execution completed, results computed\n                </p>\n              </div>\n            </div>\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  4\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-green-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  SEALED\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Permanently committed to blockchain\n                </p>\n              </div>\n            </div>\n            <div\n              className={`flex items-start gap-3 p-3 rounded-lg border ${\n                darkMode\n                  ? \"bg-gray-900/30 border-white/5\"\n                  : \"bg-white border-black/5\"\n                }`}\n            >\n              <div className=\"flex items-center gap-2\">\n                <span\n                  className={`w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold ${\n                    darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-200 text-gray-600\"\n                    }`}\n                >\n                  5\n                </span>\n                <span className=\"w-2 h-2 rounded-full bg-red-500 flex-shrink-0\"></span>\n              </div>\n              <div className=\"flex-1 min-w-0\">\n                <p\n                  className={`text-xs font-semibold mb-1 ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n                >\n                  EXPIRED\n                </p>\n                <p\n                  className={`text-xs leading-relaxed ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                >\n                  Transaction reference block expired\n                </p>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        <div\n          className={`relative p-6 rounded-lg border min-h-[200px] ${\n            darkMode\n              ? \"bg-gray-900/50 border-white/10\"\n              : \"bg-gray-50 border-black/5\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute\" />\n          <h4\n            className={`text-sm font-medium mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n          >\n            Transaction Status\n          </h4>\n\n          {!transactionId.trim() && (\n            <div className=\"text-center py-12\">\n              <svg\n                className=\"w-12 h-12 mx-auto mb-3 opacity-30\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={1.5}\n                  d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n                />\n              </svg>\n              <p\n                className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n              >\n                Enter a transaction ID to check its status\n              </p>\n            </div>\n          )}\n\n          {transactionId.trim() !== \"\" &&\n            !isValidTransactionId(transactionId) && (\n              <div className=\"text-center py-12\">\n                <svg\n                  className=\"w-12 h-12 mx-auto mb-3 opacity-30 text-red-500\"\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={1.5}\n                    d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n                  />\n                </svg>\n                <p\n                  className={`text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-500\"}`}\n                >\n                  Please enter a valid transaction ID format to check status\n                </p>\n              </div>\n            )}\n\n          {(error || hookError) && (\n            <div\n              className={`relative p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-red-900/20 border-red-800/50\"\n                  : \"bg-red-50 border-red-200\"\n              }`}\n            >\n              <PlusGridIcon placement=\"top right\" className=\"absolute\" />\n              <div>\n                <p\n                  className={`text-sm font-medium mb-1 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                >\n                  Status Check Failed\n                </p>\n                <p\n                  className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                >\n                  {hookError || error?.message}\n                </p>\n              </div>\n            </div>\n          )}\n\n          {transactionStatus && !error && !hookError && (\n            <div className=\"space-y-4\">\n              <div className=\"flex items-center gap-4\">\n                <span\n                  className={`px-4 py-2 rounded-full text-white text-sm font-semibold\n                  ${getStatusColor(transactionStatus.status)}`}\n                >\n                  {getStatusText(transactionStatus.status)}\n                </span>\n                <span\n                  className={`text-xs font-mono ${darkMode ? \"text-gray-500\" : \"text-gray-400\"}`}\n                >\n                  Status Code: {transactionStatus.status}\n                </span>\n              </div>\n\n              {transactionStatus.errorMessage && (\n                <div\n                  className={`relative p-4 rounded-lg border ${\n                  darkMode\n                      ? \"bg-red-900/20 border-red-800/50\"\n                      : \"bg-red-50 border-red-200\"\n                  }`}\n                >\n                  <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n                  <div>\n                    <p\n                      className={`text-sm font-medium mb-1 ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      Transaction Error\n                    </p>\n                    <p\n                      className={`text-sm ${darkMode ? \"text-red-400\" : \"text-red-600\"}`}\n                    >\n                      {transactionStatus.errorMessage}\n                    </p>\n                  </div>\n                </div>\n              )}\n            </div>\n          )}\n        </div>\n\n        <ResultsSection\n          data={transactionStatus || error || hookError}\n          darkMode={darkMode}\n          show={!!transactionStatus || !!error || !!hookError}\n        />\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/setup-cards/installation-card.tsx",
    "content": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from \"../ui/plus-grid\"\nimport {InlineCode} from \"../ui/inline-code\"\nimport {CodeViewer} from \"../ui/code-viewer\"\nimport {useState} from \"react\"\n\nexport function InstallationCard() {\n  const {darkMode} = useDarkMode()\n  const [copiedStates, setCopiedStates] = useState<{[key: string]: boolean}>({})\n\n  const copyToClipboard = async (text: string, key: string) => {\n    try {\n      await navigator.clipboard.writeText(text)\n      setCopiedStates(prev => ({...prev, [key]: true}))\n      setTimeout(() => {\n        setCopiedStates(prev => ({...prev, [key]: false}))\n      }, 2000)\n    } catch (err) {\n      console.error(\"Failed to copy text: \", err)\n    }\n  }\n\n  return (\n    <DemoCard\n      id=\"installation\"\n      title=\"Installation & Setup\"\n      description=\"Get started with the Flow React SDK in three simple steps. Install the package, configure the provider, and start building.\"\n      docsUrl=\"https://developers.flow.com/build/tools/react-sdk\"\n    >\n      <div className=\"space-y-8\">\n        <div className=\"flex space-x-4\">\n          <div className=\"flex flex-col items-center\">\n            <div\n              className={`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm\n                font-bold ${\n                darkMode\n                    ? \"bg-flow-primary text-black\"\n                    : \"bg-flow-primary text-black\"\n                }`}\n            >\n              1\n            </div>\n            <div\n              className={`flex-1 w-px mt-2 -mb-6 ${darkMode ? \"bg-gray-700\" : \"bg-gray-200\"}`}\n            />\n          </div>\n\n          <div className=\"flex-1 min-w-0\">\n            <h3\n              className={`text-lg font-semibold mb-3 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n            >\n              Install the package\n            </h3>\n            <InlineCode code=\"npm install @onflow/react-sdk\" language=\"bash\" />\n\n            <div className=\"mt-3 flex flex-wrap gap-2\">\n              <code\n                className={`text-xs px-2 py-1 rounded font-mono ${\n                  darkMode\n                    ? \"bg-gray-800 text-gray-400\"\n                    : \"bg-gray-100 text-gray-600\"\n                  }`}\n              >\n                yarn add @onflow/react-sdk\n              </code>\n              <code\n                className={`text-xs px-2 py-1 rounded font-mono ${\n                  darkMode\n                    ? \"bg-gray-800 text-gray-400\"\n                    : \"bg-gray-100 text-gray-600\"\n                  }`}\n              >\n                pnpm add @onflow/react-sdk\n              </code>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"flex space-x-4\">\n          <div className=\"flex flex-col items-center\">\n            <div\n              className={`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm\n                font-bold ${\n                darkMode\n                    ? \"bg-flow-primary text-black\"\n                    : \"bg-flow-primary text-black\"\n                }`}\n            >\n              2\n            </div>\n            <div\n              className={`flex-1 w-px mt-2 -mb-6 ${darkMode ? \"bg-gray-700\" : \"bg-gray-200\"}`}\n            />\n          </div>\n\n          <div className=\"flex-1 min-w-0\">\n            <h3\n              className={`text-lg font-semibold mb-3 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n            >\n              Configure FlowProvider\n            </h3>\n            <p\n              className={`text-sm mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n            >\n              Wrap your application with FlowProvider to enable all React SDK\n              features.\n            </p>\n\n            <div className=\"relative\">\n              <PlusGridIcon placement=\"top left\" className=\"absolute z-10\" />\n              <CodeViewer\n                code={`import React from \"react\"\nimport { FlowProvider } from \"@onflow/react-sdk\"\nimport App from \"./App\"\n\nfunction Root() {\n  return (\n    <FlowProvider\n      config={{\n        accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n        flowNetwork: \"mainnet\",\n        appDetailTitle: \"My Flow App\",\n        appDetailIcon: \"https://example.com/icon.png\",\n        appDetailDescription: \"A decentralized app on Flow\",\n        appDetailUrl: \"https://myapp.com\",\n      }}\n    >\n      <App />\n    </FlowProvider>\n  )\n}\n\nexport default Root`}\n                language=\"tsx\"\n              />\n            </div>\n\n            <div className=\"mt-4 grid grid-cols-1 md:grid-cols-2 gap-3\">\n              <div\n                className={`p-3 rounded border ${\n                  darkMode\n                    ? \"bg-green-900/20 border-green-800/50\"\n                    : \"bg-green-50 border-green-200\"\n                  }`}\n              >\n                <h5\n                  className={`text-xs font-medium mb-1 ${darkMode ? \"text-green-400\" : \"text-green-600\"}`}\n                >\n                  Mainnet\n                </h5>\n                <div\n                  className={`font-mono text-xs ${darkMode ? \"text-green-300\" : \"text-green-700\"}`}\n                >\n                  https://rest-mainnet.onflow.org\n                </div>\n              </div>\n\n              <div\n                className={`p-3 rounded border ${\n                  darkMode\n                    ? \"bg-blue-900/20 border-blue-800/50\"\n                    : \"bg-blue-50 border-blue-200\"\n                  }`}\n              >\n                <h5\n                  className={`text-xs font-medium mb-1 ${darkMode ? \"text-blue-400\" : \"text-blue-600\"}`}\n                >\n                  Testnet\n                </h5>\n                <div\n                  className={`font-mono text-xs ${darkMode ? \"text-blue-300\" : \"text-blue-700\"}`}\n                >\n                  https://access-testnet.onflow.org\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"flex space-x-4\">\n          <div className=\"flex flex-col items-center\">\n            <div\n              className={`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm\n                font-bold ${\n                darkMode\n                    ? \"bg-flow-primary text-black\"\n                    : \"bg-flow-primary text-black\"\n                }`}\n            >\n              3\n            </div>\n          </div>\n\n          <div className=\"flex-1 min-w-0\">\n            <h3\n              className={`text-lg font-semibold mb-3 ${darkMode ? \"text-white\" : \"text-gray-900\"}`}\n            >\n              Start building\n            </h3>\n            <p\n              className={`text-sm mb-4 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n            >\n              Import and use components and hooks from the React SDK\n            </p>\n\n            <div className=\"relative\">\n              <PlusGridIcon placement=\"top right\" className=\"absolute z-10\" />\n              <CodeViewer\n                code={`import { Connect, useFlowCurrentUser } from \"@onflow/react-sdk\"\n\nfunction MyApp() {\n  const { data: user } = useFlowCurrentUser()\n  \n  return (\n    <div>\n      <Connect />\n      {user && <p>Welcome, {user.addr}!</p>}\n    </div>\n  )\n}`}\n                language=\"tsx\"\n              />\n            </div>\n          </div>\n        </div>\n\n        <div\n          className={`mt-6 p-4 rounded-lg border ${\n            darkMode\n              ? \"bg-orange-900/20 border-orange-800/50\"\n              : \"bg-orange-50 border-orange-200\"\n            }`}\n        >\n          <PlusGridIcon placement=\"bottom left\" className=\"absolute\" />\n          <div className=\"flex items-start space-x-3\">\n            <svg\n              className=\"w-5 h-5 text-orange-500 mt-0.5 flex-shrink-0\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={2}\n                d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n              />\n            </svg>\n            <div>\n              <p\n                className={`text-sm font-medium mb-1 ${darkMode ? \"text-orange-400\" : \"text-orange-600\"}`}\n              >\n                Important Notes\n              </p>\n              <ul\n                className={`text-sm space-y-1 ${darkMode ? \"text-orange-400/80\" : \"text-orange-600/80\"}`}\n              >\n                <li>\n                  • FlowProvider must wrap your entire application at the root\n                  level\n                </li>\n                <li>\n                  • For Next.js, place FlowProvider in layout.tsx with \"use\n                  client\" directive\n                </li>\n                <li>\n                  • React 18+ and TypeScript are recommended for best experience\n                </li>\n              </ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    </DemoCard>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/starter-banner.tsx",
    "content": "export function StarterBanner() {\n  return (\n    <div className=\"relative group/banner mb-8\">\n      <svg\n        viewBox=\"0 0 15 15\"\n        aria-hidden=\"true\"\n        className=\"absolute size-[15px] fill-black/10 dark:fill-white/20 -top-2 -left-2\"\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n      <svg\n        viewBox=\"0 0 15 15\"\n        aria-hidden=\"true\"\n        className=\"absolute size-[15px] fill-black/10 dark:fill-white/20 -top-2 -right-2\"\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n      <svg\n        viewBox=\"0 0 15 15\"\n        aria-hidden=\"true\"\n        className=\"absolute size-[15px] fill-black/10 dark:fill-white/20 -bottom-2 -left-2\"\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n      <svg\n        viewBox=\"0 0 15 15\"\n        aria-hidden=\"true\"\n        className=\"absolute size-[15px] fill-black/10 dark:fill-white/20 -bottom-2 -right-2\"\n      >\n        <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n      </svg>\n\n      <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6\">\n        <div\n          className=\"relative overflow-hidden rounded-xl border border-flow-primary/20\n            bg-gradient-to-r from-flow-50 to-emerald-50 dark:from-flow-900/20\n            dark:to-emerald-900/20 p-6\"\n        >\n          <div className=\"relative flex flex-col gap-4\">\n            <div className=\"flex flex-col gap-1 flex-1\">\n              <h3 className=\"text-base font-semibold text-gray-900 dark:text-white\">\n                Looking for a starter?\n              </h3>\n              <p className=\"text-sm text-gray-600 dark:text-gray-400\">\n                Try our Next.js starter template with Flow React SDK\n                pre-configured and ready to be used.\n              </p>\n            </div>\n\n            <a\n              href=\"https://github.com/onflow/flow-react-sdk-starter\"\n              target=\"_blank\"\n              rel=\"noopener noreferrer\"\n              className=\"self-start inline-flex items-center gap-2 px-4 py-2.5 rounded-lg font-semibold\n                text-sm bg-flow-primary hover:bg-flow-primary/90 text-gray-900 transition-colors\n                duration-200\"\n            >\n              View Starter\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth={2}\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M13 7l5 5m0 0l-5 5m5-5H6\"\n                />\n              </svg>\n            </a>\n          </div>\n        </div>\n\n        <div\n          className=\"relative overflow-hidden rounded-xl border border-gray-200 dark:border-gray-700\n            bg-gradient-to-r from-slate-50 to-gray-100 dark:from-slate-900/20\n            dark:to-gray-800/20 p-6\"\n        >\n          <div className=\"relative flex flex-col gap-4\">\n            <div className=\"flex flex-col gap-1 flex-1\">\n              <h3 className=\"text-base font-semibold text-gray-900 dark:text-white\">\n                Building for mobile?\n              </h3>\n              <p className=\"text-sm text-gray-600 dark:text-gray-400\">\n                Try our Expo starter template with Flow React Native SDK\n                pre-configured and ready to be used.\n              </p>\n            </div>\n\n            <a\n              href=\"https://github.com/onflow/flow-react-native-sdk-starter\"\n              target=\"_blank\"\n              rel=\"noopener noreferrer\"\n              className=\"self-start inline-flex items-center gap-2 px-4 py-2.5 rounded-lg font-semibold\n                text-sm bg-gray-800 hover:bg-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600\n                text-white transition-colors duration-200\"\n            >\n              View Starter\n              <svg\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth={2}\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M13 7l5 5m0 0l-5 5m5-5H6\"\n                />\n              </svg>\n            </a>\n          </div>\n        </div>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/code-editor.tsx",
    "content": "import {useState, useRef, useEffect} from \"react\"\nimport {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nimport {oneDark, oneLight} from \"react-syntax-highlighter/dist/esm/styles/prism\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\n\ninterface CodeEditorProps {\n  value: string\n  onChange: (value: string) => void\n  language?: string\n  placeholder?: string\n  className?: string\n  minHeight?: string\n}\n\nexport function CodeEditor({\n  value,\n  onChange,\n  language = \"javascript\", // Use javascript as fallback for Cadence since it's similar\n  placeholder = \"Enter your code here...\",\n  className = \"\",\n  minHeight = \"150px\",\n}: CodeEditorProps) {\n  const {darkMode} = useDarkMode()\n  const textareaRef = useRef<HTMLTextAreaElement>(null)\n  const [isFocused, setIsFocused] = useState(false)\n\n  // Auto-resize textarea\n  useEffect(() => {\n    const textarea = textareaRef.current\n    if (textarea) {\n      textarea.style.height = \"auto\"\n      textarea.style.height = Math.max(150, textarea.scrollHeight) + \"px\"\n    }\n  }, [value])\n\n  return (\n    <div\n      className={`relative rounded-lg overflow-hidden border ${\n        isFocused\n          ? \"border-flow-primary\"\n          : darkMode\n            ? \"border-white/10\"\n            : \"border-black/10\"\n        } ${className}`}\n    >\n      {/* Syntax highlighted background */}\n      <div className=\"absolute inset-0 pointer-events-none\">\n        <SyntaxHighlighter\n          language={language}\n          style={darkMode ? oneDark : oneLight}\n          customStyle={{\n            margin: 0,\n            padding: \"1rem\",\n            fontSize: \"0.875rem\",\n            lineHeight: \"1.5\",\n            background: \"transparent\",\n            overflow: \"hidden\",\n            minHeight,\n          }}\n          codeTagProps={{\n            style: {\n              fontFamily:\n                'ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, \"Liberation Mono\", Menlo, monospace',\n            },\n          }}\n        >\n          {value || \" \"}\n        </SyntaxHighlighter>\n      </div>\n\n      {/* Editable textarea overlay */}\n      <textarea\n        ref={textareaRef}\n        value={value}\n        onChange={e => onChange(e.target.value)}\n        onFocus={() => setIsFocused(true)}\n        onBlur={() => setIsFocused(false)}\n        placeholder={placeholder}\n        className={`relative z-10 w-full px-4 py-3 font-mono text-sm bg-transparent border-none\n          outline-none resize-none transition-all duration-200 ${\n          darkMode\n              ? \"text-transparent caret-white placeholder-gray-600\"\n              : \"text-transparent caret-black placeholder-gray-400\"\n          }`}\n        style={{\n          minHeight,\n          caretColor: darkMode ? \"white\" : \"black\",\n        }}\n      />\n\n      {/* Background for better contrast */}\n      <div\n        className={`absolute inset-0 -z-10 ${darkMode ? \"bg-gray-900/50\" : \"bg-gray-50\"}`}\n      />\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/code-viewer.tsx",
    "content": "import {useState} from \"react\"\nimport {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nimport {oneDark, oneLight} from \"react-syntax-highlighter/dist/esm/styles/prism\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\n\ninterface CodeViewerProps {\n  code: string\n  language?: string\n  noBorder?: boolean\n}\n\nexport function CodeViewer({\n  code,\n  language = \"tsx\",\n  noBorder = false,\n}: CodeViewerProps) {\n  const {darkMode} = useDarkMode()\n  const [copied, setCopied] = useState(false)\n\n  const handleCopy = async () => {\n    try {\n      await navigator.clipboard.writeText(code)\n      setCopied(true)\n      setTimeout(() => setCopied(false), 2000)\n    } catch (err) {\n      console.error(\"Failed to copy code:\", err)\n    }\n  }\n\n  return (\n    <div\n      className={`relative rounded-lg overflow-x-auto\n        ${!noBorder ? `border ${darkMode ? \"border-white/10\" : \"border-black/5\"}` : \"\"}`}\n    >\n      <div\n        className={`flex items-center justify-between px-6 py-3 border-b\n          ${darkMode ? \"border-white/10\" : \"border-black/5\"}`}\n      >\n        <div className=\"flex items-center space-x-2\">\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n            className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}\n          >\n            <polyline points=\"16,18 22,12 16,6\" />\n            <polyline points=\"8,6 2,12 8,18\" />\n          </svg>\n          <span\n            className={`text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Implementation\n          </span>\n        </div>\n\n        <button\n          onClick={handleCopy}\n          className={`flex items-center space-x-1.5 px-3 py-1.5 text-xs font-medium rounded\n            transition-colors ${\n            copied\n                ? darkMode\n                  ? \"bg-green-900/30 text-green-400\"\n                  : \"bg-green-100 text-green-700\"\n                : darkMode\n                  ? \"bg-gray-700/50 text-gray-400 hover:bg-gray-700 hover:text-gray-300\"\n                  : \"bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-700\"\n            }`}\n        >\n          {copied ? (\n            <>\n              <svg\n                width=\"14\"\n                height=\"14\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth=\"2\"\n              >\n                <polyline points=\"20,6 9,17 4,12\" />\n              </svg>\n              <span>Copied!</span>\n            </>\n          ) : (\n            <>\n              <svg\n                width=\"14\"\n                height=\"14\"\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth=\"2\"\n              >\n                <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n                <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n              </svg>\n              <span>Copy</span>\n            </>\n          )}\n        </button>\n      </div>\n\n      <div className=\"min-w-0\">\n        <SyntaxHighlighter\n          language={language}\n          style={darkMode ? oneDark : oneLight}\n          customStyle={{\n            margin: 0,\n            padding: \"1rem\",\n            fontSize: \"0.75rem\",\n            lineHeight: \"1.5\",\n            background: darkMode\n              ? \"rgba(17, 24, 39, 0.5)\"\n              : \"rgb(249, 250, 251)\",\n          }}\n          codeTagProps={{\n            style: {\n              fontFamily:\n                'ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, \"Liberation Mono\", Menlo, monospace',\n            },\n          }}\n        >\n          {code}\n        </SyntaxHighlighter>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/demo-card.tsx",
    "content": "import {type ReactNode, memo, useState, useRef, useEffect} from \"react\"\nimport {PlusGridItem, PlusGridIcon} from \"./plus-grid\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {CodeViewer} from \"./code-viewer\"\nimport {PropsViewer} from \"./props-viewer\"\n\nexport interface PropDefinition {\n  name: string\n  type: string\n  required?: boolean\n  description?: string\n  defaultValue?: string\n}\n\ninterface DemoCardProps {\n  id: string\n  title: ReactNode\n  description: ReactNode\n  children: ReactNode\n  className?: string\n  code?: string\n  props?: PropDefinition[]\n  docsUrl?: string\n}\n\nexport const DemoCard = memo<DemoCardProps>(function DemoCard({\n  id,\n  title,\n  description,\n  children,\n  className = \"\",\n  code,\n  props,\n  docsUrl,\n}) {\n  const {darkMode} = useDarkMode()\n  const [showCode, setShowCode] = useState(false)\n  const [showProps, setShowProps] = useState(false)\n  const codeRef = useRef<HTMLDivElement>(null)\n  const propsRef = useRef<HTMLDivElement>(null)\n\n  useEffect(() => {\n    if (showCode && codeRef.current) {\n      setTimeout(() => {\n        codeRef.current?.scrollIntoView({behavior: \"smooth\", block: \"nearest\"})\n      }, 100)\n    }\n  }, [showCode])\n\n  useEffect(() => {\n    if (showProps && propsRef.current) {\n      setTimeout(() => {\n        propsRef.current?.scrollIntoView({\n          behavior: \"smooth\",\n          block: \"nearest\",\n        })\n      }, 100)\n    }\n  }, [showProps])\n\n  return (\n    <div id={id} className={`scroll-mt-[60px] ${className}`}>\n      <PlusGridItem className=\"mb-12\">\n        <div\n          className={`relative overflow-hidden border rounded-xl transition-all duration-300\n            hover:shadow-xl max-w-full ${\n            darkMode\n                ? \"bg-gray-800/50 border-white/10 hover:border-white/20\"\n                : \"bg-white border-black/5 hover:border-black/10\"\n            }`}\n        >\n          <PlusGridIcon placement=\"top left\" className=\"absolute z-10\" />\n          <PlusGridIcon placement=\"top right\" className=\"absolute z-10\" />\n          <PlusGridIcon placement=\"bottom left\" className=\"absolute z-10\" />\n          <PlusGridIcon placement=\"bottom right\" className=\"absolute z-10\" />\n\n          {(code || props) && (\n            <div className=\"absolute top-4 right-4 md:top-6 md:right-8 z-20 flex items-center\">\n              <div className=\"flex items-center space-x-1 md:space-x-2\">\n                {props && (\n                  <button\n                    onClick={() => {\n                      setShowProps(!showProps)\n                      setShowCode(false)\n                    }}\n                    className={`flex items-center space-x-1 md:space-x-2 px-2 md:px-3 py-1.5 md:py-2 rounded-md\n                    text-xs md:text-sm font-medium transition-colors ${\n                    showProps\n                        ? darkMode\n                          ? \"bg-flow-primary/20 text-flow-primary border border-flow-primary/30\"\n                          : \"bg-flow-primary/10 text-flow-600 border border-flow-primary/20\"\n                        : darkMode\n                          ? \"bg-gray-700/80 text-gray-400 hover:bg-gray-700 hover:text-gray-300\"\n                          : \"bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-700\"\n                    }`}\n                    aria-label=\"Show props\"\n                  >\n                    <svg\n                      width=\"16\"\n                      height=\"16\"\n                      viewBox=\"0 0 24 24\"\n                      fill=\"none\"\n                      stroke=\"currentColor\"\n                      strokeWidth=\"2\"\n                    >\n                      <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n                      <path d=\"M9 9h6v6h-6z\" />\n                    </svg>\n                    <span className=\"hidden md:inline\">Props</span>\n                  </button>\n                )}\n\n                {code && (\n                  <button\n                    onClick={() => {\n                      setShowCode(!showCode)\n                      setShowProps(false)\n                    }}\n                    className={`flex items-center space-x-1 md:space-x-2 px-2 md:px-3 py-1.5 md:py-2 rounded-md\n                    text-xs md:text-sm font-medium transition-colors ${\n                    showCode\n                        ? darkMode\n                          ? \"bg-flow-primary/20 text-flow-primary border border-flow-primary/30\"\n                          : \"bg-flow-primary/10 text-flow-600 border border-flow-primary/20\"\n                        : darkMode\n                          ? \"bg-gray-700/80 text-gray-400 hover:bg-gray-700 hover:text-gray-300\"\n                          : \"bg-gray-100 text-gray-600 hover:bg-gray-200 hover:text-gray-700\"\n                    }`}\n                    aria-label=\"Show code\"\n                  >\n                    <svg\n                      width=\"16\"\n                      height=\"16\"\n                      viewBox=\"0 0 24 24\"\n                      fill=\"none\"\n                      stroke=\"currentColor\"\n                      strokeWidth=\"2\"\n                    >\n                      <polyline points=\"16,18 22,12 16,6\" />\n                      <polyline points=\"8,6 2,12 8,18\" />\n                    </svg>\n                    <span className=\"hidden md:inline\">Code</span>\n                  </button>\n                )}\n              </div>\n            </div>\n          )}\n\n          <div\n            className={`px-4 md:px-8 py-4 md:py-6 border-b\n              ${darkMode ? \"border-white/10\" : \"border-black/5\"}`}\n          >\n            <div className={`${code || props ? \"pr-20 md:pr-32\" : \"\"}`}>\n              <div className=\"flex items-center gap-2 md:gap-3 flex-wrap\">\n                <h3\n                  className={`group text-lg md:text-2xl font-bold tracking-tight font-mono ${\n                    darkMode ? \"text-white\" : \"text-gray-900\" }`}\n                >\n                  <a\n                    href={`#${id}`}\n                    className=\"inline-flex items-center gap-2 no-underline hover:no-underline\"\n                  >\n                    {title}\n                    <span\n                      className={`opacity-0 group-hover:opacity-100 transition-opacity duration-200 ${\n                        darkMode ? \"text-gray-500\" : \"text-gray-400\" }`}\n                    >\n                      #\n                    </span>\n                  </a>\n                </h3>\n\n                {docsUrl && (\n                  <a\n                    href={docsUrl}\n                    target=\"_blank\"\n                    rel=\"noopener noreferrer\"\n                    className={`inline-flex items-center gap-1 md:gap-1.5 px-2 md:px-3 py-1 rounded-full text-xs\n                    font-medium transition-colors ${\n                    darkMode\n                        ? `text-gray-300 hover:text-white bg-gray-700/50 hover:bg-gray-600/50 border\n                          border-white/10 hover:border-white/20`\n                        : `text-gray-700 hover:text-gray-900 bg-gray-100 hover:bg-gray-200 border\n                          border-black/10 hover:border-black/20`\n                    }`}\n                    aria-label=\"View documentation\"\n                  >\n                    <svg\n                      width=\"12\"\n                      height=\"12\"\n                      viewBox=\"0 0 24 24\"\n                      fill=\"none\"\n                      stroke=\"currentColor\"\n                      strokeWidth=\"2\"\n                    >\n                      <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n                      <polyline points=\"15,3 21,3 21,9\" />\n                      <line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\" />\n                    </svg>\n                    <span className=\"hidden sm:inline\">DOCS</span>\n                  </a>\n                )}\n              </div>\n              <div\n                className={`mt-2 text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n              >\n                {description}\n              </div>\n            </div>\n          </div>\n\n          <div className=\"p-4 md:p-6\">{children}</div>\n\n          {showCode && code && (\n            <div\n              ref={codeRef}\n              className={`border-t ${darkMode ? \"border-white/10\" : \"border-black/5\"}`}\n            >\n              <CodeViewer code={code} noBorder />\n            </div>\n          )}\n\n          {showProps && props && (\n            <div\n              ref={propsRef}\n              className={`border-t ${darkMode ? \"border-white/10\" : \"border-black/5\"}`}\n            >\n              <PropsViewer props={props} />\n            </div>\n          )}\n        </div>\n      </PlusGridItem>\n    </div>\n  )\n})\n"
  },
  {
    "path": "packages/demo/src/components/ui/error-boundary.tsx",
    "content": "import {Component, type ReactNode, type ErrorInfo} from \"react\"\n\ninterface Props {\n  children: ReactNode\n  fallback?: ReactNode\n}\n\ninterface State {\n  hasError: boolean\n  error?: Error\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n  constructor(props: Props) {\n    super(props)\n    this.state = {hasError: false}\n  }\n\n  static getDerivedStateFromError(error: Error): State {\n    return {hasError: true, error}\n  }\n\n  componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n    console.error(\"ErrorBoundary caught an error:\", error, errorInfo)\n  }\n\n  render() {\n    if (this.state.hasError) {\n      return (\n        this.props.fallback || (\n          <div\n            className=\"flex flex-col items-center justify-center p-8 border border-red-200\n              dark:border-red-800 rounded-lg bg-red-50 dark:bg-red-900/20\"\n          >\n            <svg\n              className=\"w-12 h-12 text-red-500 mb-4\"\n              fill=\"none\"\n              viewBox=\"0 0 24 24\"\n              stroke=\"currentColor\"\n            >\n              <path\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                strokeWidth={2}\n                d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n              />\n            </svg>\n            <h3 className=\"text-lg font-semibold text-red-700 dark:text-red-300 mb-2\">\n              Something went wrong\n            </h3>\n            <p className=\"text-sm text-red-600 dark:text-red-400 text-center max-w-md\">\n              {this.state.error?.message ||\n                \"An unexpected error occurred. Please refresh the page to try again.\"}\n            </p>\n            <button\n              onClick={() => this.setState({hasError: false})}\n              className=\"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700\n                transition-colors\"\n            >\n              Try Again\n            </button>\n          </div>\n        )\n      )\n    }\n\n    return this.props.children\n  }\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/inline-code.tsx",
    "content": "import {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nimport {oneDark, oneLight} from \"react-syntax-highlighter/dist/esm/styles/prism\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\n\ninterface InlineCodeProps {\n  code: string\n  language?: string\n  className?: string\n}\n\nexport function InlineCode({\n  code,\n  language = \"bash\",\n  className = \"\",\n}: InlineCodeProps) {\n  const {darkMode} = useDarkMode()\n\n  return (\n    <div className={`rounded-lg ${className}`}>\n      <SyntaxHighlighter\n        language={language}\n        style={darkMode ? oneDark : oneLight}\n        customStyle={{\n          margin: 0,\n          padding: \"1rem\",\n          fontSize: \"0.875rem\",\n          lineHeight: \"1.5\",\n          background: darkMode ? \"rgba(17, 24, 39, 0.5)\" : \"rgb(249, 250, 251)\",\n          border: darkMode\n            ? \"1px solid rgba(255, 255, 255, 0.1)\"\n            : \"1px solid rgba(0, 0, 0, 0.05)\",\n        }}\n        codeTagProps={{\n          style: {\n            fontFamily:\n              'ui-monospace, SFMono-Regular, \"SF Mono\", Consolas, \"Liberation Mono\", Menlo, monospace',\n          },\n        }}\n      >\n        {code}\n      </SyntaxHighlighter>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/json-viewer.tsx",
    "content": "import {useState} from \"react\"\n\ninterface JsonViewerProps {\n  data: any\n  darkMode: boolean\n  height?: string\n  title?: string\n}\n\nexport function JsonViewer({\n  data,\n  darkMode,\n  height = \"h-64\",\n  title = \"JSON Data\",\n}: JsonViewerProps) {\n  const [copied, setCopied] = useState(false)\n\n  const handleCopy = async () => {\n    try {\n      await navigator.clipboard.writeText(JSON.stringify(data, null, 2))\n      setCopied(true)\n      setTimeout(() => setCopied(false), 2000)\n    } catch (err) {\n      console.error(\"Failed to copy:\", err)\n    }\n  }\n\n  return (\n    <div\n      className={`relative rounded-lg border ${\n        darkMode\n          ? \"bg-gray-900/50 border-white/10\"\n          : \"bg-gray-50 border-black/5\"\n        }`}\n    >\n      <div\n        className={`flex items-center justify-between px-4 py-3 border-b ${\n          darkMode ? \"border-white/10\" : \"border-black/5\" }`}\n      >\n        <h4\n          className={`text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n        >\n          {title}\n        </h4>\n        <button\n          onClick={handleCopy}\n          className={`px-3 py-1 text-xs font-medium rounded transition-all duration-200 ${\n            copied\n              ? darkMode\n                ? \"bg-green-900/50 text-green-400\"\n                : \"bg-green-100 text-green-600\"\n              : darkMode\n                ? \"bg-gray-800 text-gray-400 hover:bg-gray-700 hover:text-gray-300\"\n                : \"bg-white text-gray-600 hover:bg-gray-100 hover:text-gray-700\"\n            }`}\n        >\n          {copied ? \"Copied!\" : \"Copy\"}\n        </button>\n      </div>\n      <div className={`${height} overflow-auto`}>\n        <pre\n          className={`p-4 text-xs font-mono leading-relaxed whitespace-pre-wrap break-all ${\n            darkMode ? \"text-gray-300\" : \"text-gray-700\" }`}\n        >\n          {JSON.stringify(data, null, 2)}\n        </pre>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/loading-spinner.tsx",
    "content": "import {memo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\n\ninterface LoadingSpinnerProps {\n  size?: \"sm\" | \"md\" | \"lg\"\n  className?: string\n}\n\nexport const LoadingSpinner = memo<LoadingSpinnerProps>(\n  function LoadingSpinner({size = \"md\", className = \"\"}) {\n    const {darkMode} = useDarkMode()\n\n    const sizeClasses = {\n      sm: \"w-4 h-4\",\n      md: \"w-8 h-8\",\n      lg: \"w-12 h-12\",\n    }\n\n    return (\n      <div\n        className={`inline-block animate-spin rounded-full border-2 border-solid border-current\n          border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]\n          ${sizeClasses[size]} ${darkMode ? \"text-white\" : \"text-gray-900\"} ${className}`}\n        role=\"status\"\n      >\n        <span className=\"sr-only\">Loading...</span>\n      </div>\n    )\n  }\n)\n\ninterface LoadingStateProps {\n  message?: string\n  size?: \"sm\" | \"md\" | \"lg\"\n  className?: string\n}\n\nexport const LoadingState = memo<LoadingStateProps>(function LoadingState({\n  message = \"Loading...\",\n  size = \"md\",\n  className = \"\",\n}) {\n  const {darkMode} = useDarkMode()\n\n  return (\n    <div\n      className={`flex flex-col items-center justify-center p-8 ${className}`}\n    >\n      <LoadingSpinner size={size} />\n      <p\n        className={`mt-4 text-sm ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n      >\n        {message}\n      </p>\n    </div>\n  )\n})\n"
  },
  {
    "path": "packages/demo/src/components/ui/plus-grid.tsx",
    "content": "import {type ReactNode} from \"react\"\n\ninterface PlusGridProps {\n  className?: string\n  children: ReactNode\n}\n\ninterface PlusGridRowProps {\n  className?: string\n  children: ReactNode\n  showTopLines?: boolean\n  showBottomLines?: boolean\n}\n\ninterface PlusGridIconProps {\n  className?: string\n  placement: `${\"top\" | \"bottom\"} ${\"right\" | \"left\"}`\n}\n\nexport function PlusGrid({className = \"\", children}: PlusGridProps) {\n  return <div className={className}>{children}</div>\n}\n\nexport function PlusGridRow({\n  className = \"\",\n  children,\n  showTopLines = true,\n  showBottomLines = true,\n}: PlusGridRowProps) {\n  return (\n    <div\n      className={`group/row relative isolate pt-[calc(0.5rem+1px)] last:pb-[calc(0.5rem+1px)]\n        ${className}`}\n    >\n      <div\n        aria-hidden=\"true\"\n        className=\"absolute inset-y-0 left-0 right-0 -z-10\"\n      >\n        {showTopLines && (\n          <>\n            <div className=\"absolute inset-x-0 top-0 border-t border-black/5 dark:border-white/10\"></div>\n            <div className=\"absolute inset-x-0 top-2 border-t border-black/5 dark:border-white/10\"></div>\n          </>\n        )}\n        {showBottomLines && (\n          <>\n            <div\n              className=\"absolute inset-x-0 bottom-0 hidden border-b border-black/5 dark:border-white/10\n                group-last/row:block\"\n            ></div>\n            <div\n              className=\"absolute inset-x-0 bottom-2 hidden border-b border-black/5 dark:border-white/10\n                group-last/row:block\"\n            ></div>\n          </>\n        )}\n      </div>\n      {children}\n    </div>\n  )\n}\n\nexport function PlusGridItem({className = \"\", children}: PlusGridProps) {\n  return (\n    <div className={`group/item relative ${className}`}>\n      <PlusGridIcon\n        placement=\"top left\"\n        className=\"hidden group-first/item:block\"\n      />\n      <PlusGridIcon placement=\"top right\" />\n      <PlusGridIcon\n        placement=\"bottom left\"\n        className=\"hidden group-first/item:group-last/row:block\"\n      />\n      <PlusGridIcon\n        placement=\"bottom right\"\n        className=\"hidden group-last/row:block\"\n      />\n      {children}\n    </div>\n  )\n}\n\nexport function PlusGridIcon({className = \"\", placement}: PlusGridIconProps) {\n  const [yAxis, xAxis] = placement.split(\" \")\n\n  const yClass = yAxis === \"top\" ? \"-top-2\" : \"-bottom-2\"\n  const xClass = xAxis === \"left\" ? \"-left-2\" : \"-right-2\"\n\n  return (\n    <svg\n      viewBox=\"0 0 15 15\"\n      aria-hidden=\"true\"\n      className={`absolute size-[15px] fill-black/10 dark:fill-white/20 ${yClass} ${xClass}\n        ${className}`}\n    >\n      <path d=\"M8 0H7V7H0V8H7V15H8V8H15V7H8V0Z\" />\n    </svg>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/props-viewer.tsx",
    "content": "import {useDarkMode} from \"../flow-provider-wrapper\"\nimport type {PropDefinition} from \"./demo-card\"\n\ninterface PropsViewerProps {\n  props: PropDefinition[]\n}\n\nexport function PropsViewer({props}: PropsViewerProps) {\n  const {darkMode} = useDarkMode()\n\n  return (\n    <div className=\"relative\">\n      <div\n        className={`flex items-center px-6 py-3 border-b\n          ${darkMode ? \"border-white/10\" : \"border-black/5\"}`}\n      >\n        <div className=\"flex items-center space-x-2\">\n          <svg\n            width=\"16\"\n            height=\"16\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n            className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}\n          >\n            <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n            <path d=\"M9 9h6v6h-6z\" />\n          </svg>\n          <span\n            className={`text-sm font-medium ${darkMode ? \"text-gray-300\" : \"text-gray-700\"}`}\n          >\n            Props\n          </span>\n        </div>\n      </div>\n\n      <div className={`p-6 ${darkMode ? \"bg-gray-900/50\" : \"bg-gray-50\"}`}>\n        <div className=\"space-y-4\">\n          {props.map((prop, index) => (\n            <div\n              key={prop.name}\n              className={`p-4 rounded-lg border ${\n              darkMode\n                  ? \"bg-gray-800/50 border-white/10\"\n                  : \"bg-white border-black/5\"\n              }`}\n            >\n              <div className=\"flex items-start justify-between mb-2\">\n                <div className=\"flex items-center space-x-2\">\n                  <code\n                    className={`text-sm font-semibold px-2 py-1 rounded ${\n                    darkMode\n                        ? \"bg-gray-700 text-flow-primary\"\n                        : \"bg-gray-100 text-flow-600\"\n                    }`}\n                  >\n                    {prop.name}\n                  </code>\n                  {prop.required && (\n                    <span\n                      className={`text-xs px-2 py-0.5 rounded-full font-medium ${\n                      darkMode\n                          ? \"bg-red-900/30 text-red-400\"\n                          : \"bg-red-100 text-red-600\"\n                      }`}\n                    >\n                      required\n                    </span>\n                  )}\n                </div>\n\n                <code\n                  className={`text-sm px-2 py-1 rounded ${\n                  darkMode\n                      ? \"bg-gray-700 text-gray-300\"\n                      : \"bg-gray-100 text-gray-700\"\n                  }`}\n                >\n                  {prop.type}\n                </code>\n              </div>\n\n              {prop.description && (\n                <p\n                  className={`text-sm mb-2 ${darkMode ? \"text-gray-400\" : \"text-gray-600\"}`}\n                >\n                  {prop.description}\n                </p>\n              )}\n\n              {prop.defaultValue && (\n                <div className=\"flex items-center space-x-2\">\n                  <span\n                    className={`text-xs ${darkMode ? \"text-gray-500\" : \"text-gray-500\"}`}\n                  >\n                    Default:\n                  </span>\n                  <code\n                    className={`text-xs px-1.5 py-0.5 rounded ${\n                    darkMode\n                        ? \"bg-gray-700 text-gray-300\"\n                        : \"bg-gray-100 text-gray-700\"\n                    }`}\n                  >\n                    {prop.defaultValue}\n                  </code>\n                </div>\n              )}\n            </div>\n          ))}\n        </div>\n      </div>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/components/ui/results-section.tsx",
    "content": "import {JsonViewer} from \"./json-viewer\"\n\ninterface ResultsSectionProps {\n  data: any\n  darkMode: boolean\n  show: boolean\n  title?: string\n}\n\nexport function ResultsSection({\n  data,\n  darkMode,\n  show,\n  title = \"Hook Data\",\n}: ResultsSectionProps) {\n  if (!show) return null\n\n  return (\n    <>\n      <div\n        className={`-mx-6 h-px ${darkMode ? \"bg-white/10\" : \"bg-black/10\"}`}\n      />\n\n      <div className=\"space-y-4\">\n        <div className=\"flex items-center space-x-3\">\n          <div\n            className={`p-1.5 rounded ${darkMode ? \"bg-gray-700\" : \"bg-gray-100\"}`}\n          >\n            <svg\n              width=\"12\"\n              height=\"12\"\n              viewBox=\"0 0 24 24\"\n              fill=\"none\"\n              stroke=\"currentColor\"\n              strokeWidth=\"2\"\n              className={darkMode ? \"text-gray-400\" : \"text-gray-600\"}\n            >\n              <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"></path>\n              <polyline points=\"14,2 14,8 20,8\"></polyline>\n              <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n              <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n              <polyline points=\"10,9 9,9 8,9\"></polyline>\n            </svg>\n          </div>\n          <h4\n            className={`text-sm font-semibold uppercase tracking-wider ${\n              darkMode ? \"text-gray-200\" : \"text-gray-700\" }`}\n          >\n            Hook Response\n          </h4>\n        </div>\n\n        <JsonViewer\n          data={data}\n          darkMode={darkMode}\n          title={title}\n          height=\"h-80\"\n        />\n      </div>\n    </>\n  )\n}\n"
  },
  {
    "path": "packages/demo/src/constants.ts",
    "content": "import {type FlowNetwork} from \"@onflow/react-sdk\"\n\nexport const ACCESS_NODE_URLS: Record<any, string> = {\n  local: \"http://localhost:8888\",\n  emulator: \"http://localhost:8888\",\n  testnet: \"https://rest-testnet.onflow.org\",\n  mainnet: \"https://rest-mainnet.onflow.org\",\n}\n\nexport const BLOCK_EXPLORER_URLS: Record<any, string> = {\n  local: \"https://testnet.flowscan.org\",\n  emulator: \"https://testnet.flowscan.org\",\n  testnet: \"https://testnet.flowscan.org\",\n  mainnet: \"https://flowscan.org\",\n}\n\nexport const CONTRACT_ADDRESSES: Record<string, Record<any, string>> = {\n  FlowToken: {\n    local: \"0x0ae53cb6e3f42a79\",\n    emulator: \"0x0ae53cb6e3f42a79\",\n    testnet: \"0x7e60df042a9c0868\",\n    mainnet: \"0x1654653399040a61\",\n  },\n  ExampleNFT: {\n    testnet: \"0x012e4d204a60ac6f\",\n  },\n  ClickToken: {\n    testnet: \"0xdfc20aee650fcbdf\",\n  },\n  FungibleToken: {\n    local: \"0xee82856bf20e2aa6\",\n    emulator: \"0xee82856bf20e2aa6\",\n    testnet: \"0x9a0766d93b6608b7\",\n    mainnet: \"0xf233dcee88fe0abe\",\n  },\n  NonFungibleToken: {\n    local: \"0xf8d6e0586b0a20c7\",\n    emulator: \"0xf8d6e0586b0a20c7\",\n    testnet: \"0x631e88ae7f1d7c20\",\n    mainnet: \"0x1d7e57aa55817448\",\n  },\n  MetadataViews: {\n    local: \"0xf8d6e0586b0a20c7\",\n    emulator: \"0xf8d6e0586b0a20c7\",\n    testnet: \"0x631e88ae7f1d7c20\",\n    mainnet: \"0x1d7e57aa55817448\",\n  },\n  ViewResolver: {\n    local: \"0xf8d6e0586b0a20c7\",\n    emulator: \"0xf8d6e0586b0a20c7\",\n    testnet: \"0x631e88ae7f1d7c20\",\n    mainnet: \"0x1d7e57aa55817448\",\n  },\n}\n\n// Helper function to get contract address for current network\nexport const getContractAddress = (\n  contractName: keyof typeof CONTRACT_ADDRESSES,\n  network: FlowNetwork\n): string => {\n  return CONTRACT_ADDRESSES[contractName][network]\n}\n\n// Helper function to generate event type for current network\nexport const getEventType = (\n  contractName: keyof typeof CONTRACT_ADDRESSES,\n  eventName: string,\n  network: FlowNetwork\n): string => {\n  const address = getContractAddress(contractName, network)\n  return `A.${address.replace(\"0x\", \"\")}.${contractName}.${eventName}`\n}\n\n// Demo account used to showcase features (testnet only)\nexport const DEMO_ADDRESS_TESTNET = \"0x012e4d204a60ac6f\"\n"
  },
  {
    "path": "packages/demo/src/main.tsx",
    "content": "import {StrictMode} from \"react\"\nimport {createRoot} from \"react-dom/client\"\nimport {App} from \"./app.tsx\"\n\ncreateRoot(document.getElementById(\"root\")!).render(\n  <StrictMode>\n    <App />\n  </StrictMode>\n)\n"
  },
  {
    "path": "packages/demo/src/utils/chain-helpers.ts",
    "content": "export type FlowChainId = \"mainnet\" | \"testnet\" | \"emulator\" | \"local\"\nexport type FlowNetworkParametersChainId =\n  | \"flow-mainnet\"\n  | \"flow-testnet\"\n  | \"flow-emulator\"\n  | \"flow-canarynet\"\nexport type FlowEVMChainId = 747 | 545\n\nexport function normalizeChainId(chainId: string): FlowChainId | \"unknown\" {\n  switch (chainId.toLowerCase()) {\n    case \"mainnet\":\n    case \"flow-mainnet\":\n      return \"mainnet\"\n    case \"testnet\":\n    case \"flow-testnet\":\n      return \"testnet\"\n    case \"emulator\":\n    case \"local\":\n    case \"flow-emulator\":\n      return \"emulator\"\n    default:\n      return \"unknown\"\n  }\n}\n\nexport function getNetworkName(chainId: string): string {\n  const normalized = normalizeChainId(chainId)\n  switch (normalized) {\n    case \"mainnet\":\n      return \"Flow Mainnet\"\n    case \"testnet\":\n      return \"Flow Testnet\"\n    case \"emulator\":\n      return \"Flow Emulator\"\n    default:\n      return \"Unknown Network\"\n  }\n}\n\nexport function getEVMChainId(chainId: string): FlowEVMChainId | null {\n  const normalized = normalizeChainId(chainId)\n  switch (normalized) {\n    case \"mainnet\":\n      return 747\n    case \"testnet\":\n      return 545\n    case \"emulator\":\n      return null\n    default:\n      return null\n  }\n}\n\nexport function isProductionNetwork(chainId: string): boolean {\n  return normalizeChainId(chainId) === \"mainnet\"\n}\n\nexport function isDevelopmentNetwork(chainId: string): boolean {\n  const normalized = normalizeChainId(chainId)\n  return normalized === \"testnet\" || normalized === \"emulator\"\n}\n"
  },
  {
    "path": "packages/demo/src/utils.ts",
    "content": "import {type FlowNetwork} from \"@onflow/react-sdk\"\nimport {BLOCK_EXPLORER_URLS} from \"./constants\"\n\nexport const createExplorerTransactionLink = ({\n  flowNetwork,\n  transactionId,\n}: {\n  flowNetwork: FlowNetwork\n  transactionId: string\n}) => `${BLOCK_EXPLORER_URLS[flowNetwork]}/transaction/${transactionId}`\n"
  },
  {
    "path": "packages/demo/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "packages/demo/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\"./src/**/*.{js,ts,jsx,tsx}\", \"./index.html\"],\n  container: {\n    center: true,\n    padding: \"1rem\",\n    screens: {\n      sm: \"640px\",\n      md: \"768px\",\n      lg: \"1024px\",\n      xl: \"1280px\",\n      \"2xl\": \"1400px\",\n    },\n  },\n  theme: {\n    extend: {\n      colors: {\n        flow: {\n          50: \"#f0fdf4\",\n          100: \"#dcfce7\",\n          200: \"#bbf7d0\",\n          300: \"#86efac\",\n          400: \"#4ade80\",\n          500: \"#22c55e\",\n          600: \"#16a34a\",\n          700: \"#15803d\",\n          800: \"#166534\",\n          900: \"#14532d\",\n          primary: \"#00EF8B\",\n          secondary: \"#FFB800\",\n          accent: \"#9945FF\",\n          dark: \"#1a1a1a\",\n        },\n        purple: {\n          primary: \"#9945FF\",\n          secondary: \"#b060ff\",\n        },\n      },\n      backgroundImage: {\n        \"linear-115\": \"linear-gradient(115deg, var(--tw-gradient-stops))\",\n        \"linear-145\": \"linear-gradient(145deg, var(--tw-gradient-stops))\",\n        \"flow-gradient\":\n          \"linear-gradient(135deg, #00EF8B 0%, #22c55e 50%, #16a34a 100%)\",\n        \"hero-pattern\":\n          'url(\"data:image/svg+xml,%3Csvg width=\"60\" height=\"60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cg fill=\"none\" fill-rule=\"evenodd\"%3E%3Cg fill=\"%23000000\" fill-opacity=\"0.05\"%3E%3Ccircle cx=\"30\" cy=\"30\" r=\"2\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")',\n      },\n      fontFamily: {\n        flow: [\"Inter\", \"system-ui\", \"sans-serif\"],\n      },\n      spacing: {\n        18: \"4.5rem\",\n        72: \"18rem\",\n        84: \"21rem\",\n        96: \"24rem\",\n      },\n      animation: {\n        \"fade-in\": \"fadeIn 0.5s ease-in-out\",\n        \"slide-up\": \"slideUp 0.5s ease-out\",\n        float: \"float 6s ease-in-out infinite\",\n      },\n      keyframes: {\n        fadeIn: {\n          \"0%\": {opacity: \"0\"},\n          \"100%\": {opacity: \"1\"},\n        },\n        slideUp: {\n          \"0%\": {transform: \"translateY(20px)\", opacity: \"0\"},\n          \"100%\": {transform: \"translateY(0)\", opacity: \"1\"},\n        },\n        float: {\n          \"0%, 100%\": {transform: \"translateY(0px)\"},\n          \"50%\": {transform: \"translateY(-20px)\"},\n        },\n      },\n    },\n  },\n  darkMode: \"class\",\n  plugins: [],\n}\n"
  },
  {
    "path": "packages/demo/tsconfig.app.json",
    "content": "{\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"verbatimModuleSyntax\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n\n    /* Linting */\n    \"strict\": false,\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/demo/tsconfig.json",
    "content": "{\n  \"files\": [],\n  \"references\": [\n    {\"path\": \"./tsconfig.app.json\"},\n    {\"path\": \"./tsconfig.node.json\"}\n  ]\n}\n"
  },
  {
    "path": "packages/demo/tsconfig.node.json",
    "content": "{\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n    \"target\": \"ES2022\",\n    \"lib\": [\"ES2023\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n\n    /* Bundler mode */\n    \"moduleResolution\": \"bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"verbatimModuleSyntax\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n\n    /* Linting */\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "packages/demo/vite.config.ts",
    "content": "import {defineConfig} from \"vite\"\nimport react from \"@vitejs/plugin-react\"\n\n// https://vite.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n  server: {\n    allowedHosts: true,\n  },\n  build: {\n    chunkSizeWarningLimit: 1000,\n    rollupOptions: {\n      output: {\n        manualChunks: {\n          vendor: [\"react\", \"react-dom\"],\n          fcl: [\"@onflow/fcl\", \"@onflow/react-sdk\", \"@onflow/typedefs\"],\n        },\n      },\n    },\n  },\n})\n"
  },
  {
    "path": "packages/fcl/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"useBuiltIns\": false\n      }\n    ],\n    \"@babel/preset-typescript\"\n  ]\n}\n"
  },
  {
    "path": "packages/fcl/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"globals\": {\n    \"JSX\": \"readonly\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/tag-lines\": 0,\n    \"jsdoc/require-param-description\": 0,\n    \"jsdoc/valid-types\": 0,\n    \"jsdoc/require-returns-description\": 0,\n    \"no-undef\": 1\n  }\n}\n"
  },
  {
    "path": "packages/fcl/.npmignore",
    "content": "src/"
  },
  {
    "path": "packages/fcl/CHANGELOG.md",
    "content": "# @onflow/fcl\n\n## 1.21.10\n\n### Patch Changes\n\n- Updated dependencies [[`b438549005eba70ab18089abe117ed6816cc1b7f`](https://github.com/onflow/fcl-js/commit/b438549005eba70ab18089abe117ed6816cc1b7f)]:\n  - @onflow/fcl-core@1.30.2\n  - @onflow/fcl-wc@6.0.22\n\n## 1.21.9\n\n### Patch Changes\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/config@1.11.1\n  - @onflow/fcl-core@1.30.1\n  - @onflow/fcl-wc@6.0.21\n  - @onflow/sdk@1.13.7\n\n## 1.21.8\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/config@1.11.0\n  - @onflow/fcl-core@1.30.0\n  - @onflow/fcl-wc@6.0.20\n  - @onflow/sdk@1.13.6\n\n## 1.21.7\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/config@1.10.0\n  - @onflow/fcl-core@1.29.0\n  - @onflow/fcl-wc@6.0.19\n  - @onflow/sdk@1.13.5\n\n## 1.21.6\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/config@1.9.0\n  - @onflow/fcl-core@1.28.0\n  - @onflow/fcl-wc@6.0.18\n  - @onflow/sdk@1.13.4\n\n## 1.21.5\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/config@1.8.0\n  - @onflow/fcl-core@1.27.0\n  - @onflow/fcl-wc@6.0.17\n  - @onflow/sdk@1.13.3\n\n## 1.21.4\n\n### Patch Changes\n\n- Updated dependencies [[`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6)]:\n  - @onflow/fcl-core@1.26.0\n  - @onflow/fcl-wc@6.0.16\n\n## 1.21.3\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/config@1.7.0\n  - @onflow/fcl-core@1.25.0\n  - @onflow/fcl-wc@6.0.15\n  - @onflow/sdk@1.13.2\n\n## 1.21.2\n\n### Patch Changes\n\n- Updated dependencies [[`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd)]:\n  - @onflow/fcl-core@1.24.0\n  - @onflow/fcl-wc@6.0.14\n\n## 1.21.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.23.1\n  - @onflow/sdk@1.13.1\n  - @onflow/fcl-wc@6.0.13\n\n## 1.21.0\n\n### Minor Changes\n\n- [#2704](https://github.com/onflow/fcl-js/pull/2704) [`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d) Thanks [@mfbz](https://github.com/mfbz)! - Improved fcl-react-native WalletConnect implementation with full fcl specs support, automatic redirect URI detection, session validation and full feature parity with fcl.\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl-core@1.23.0\n  - @onflow/sdk@1.13.0\n  - @onflow/fcl-wc@6.0.12\n\n## 1.20.6\n\n### Patch Changes\n\n- Updated dependencies [[`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212)]:\n  - @onflow/sdk@1.12.0\n  - @onflow/fcl-core@1.22.3\n  - @onflow/fcl-wc@6.0.11\n\n## 1.20.5\n\n### Patch Changes\n\n- [#2696](https://github.com/onflow/fcl-js/pull/2696) [`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810) Thanks [@jribbink](https://github.com/jribbink)! - Add support for `discoveryAuthnExclude` configuration option in React SDK. This allows users to exclude specific wallet providers from the discovery service, complementing the existing `discoveryAuthnInclude` option.\n\n- [#2694](https://github.com/onflow/fcl-js/pull/2694) [`a5e84666b0482547fe9411064f4821e8067e5238`](https://github.com/onflow/fcl-js/commit/a5e84666b0482547fe9411064f4821e8067e5238) Thanks [@chasefleming](https://github.com/chasefleming)! - Improve JSDoc for `createFlowClient` method\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e)]:\n  - @onflow/fcl-core@1.22.2\n  - @onflow/config@1.6.3\n  - @onflow/sdk@1.11.2\n  - @onflow/fcl-wc@6.0.10\n\n## 1.20.4\n\n### Patch Changes\n\n- Updated dependencies [[`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73), [`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557)]:\n  - @onflow/types@1.5.0\n  - @onflow/sdk@1.11.1\n  - @onflow/config@1.6.2\n  - @onflow/fcl-core@1.22.1\n  - @onflow/fcl-wc@6.0.9\n\n## 1.20.3\n\n### Patch Changes\n\n- Updated dependencies [[`ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23`](https://github.com/onflow/fcl-js/commit/ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23), [`81d21f98ab2838885ad32217de42b85481f5595c`](https://github.com/onflow/fcl-js/commit/81d21f98ab2838885ad32217de42b85481f5595c), [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960)]:\n  - @onflow/sdk@1.11.0\n  - @onflow/fcl-core@1.22.0\n  - @onflow/fcl-wc@6.0.8\n\n## 1.20.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.21.2\n  - @onflow/sdk@1.10.2\n  - @onflow/fcl-wc@6.0.7\n\n## 1.20.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/config@1.6.1\n  - @onflow/fcl-core@1.21.1\n  - @onflow/fcl-wc@6.0.6\n  - @onflow/rlp@1.2.4\n  - @onflow/sdk@1.10.1\n  - @onflow/types@1.4.2\n  - @onflow/util-actor@1.3.5\n  - @onflow/util-address@1.2.4\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n  - @onflow/util-rpc@0.0.3\n  - @onflow/util-semver@1.0.4\n  - @onflow/util-template@1.2.4\n  - @onflow/util-uid@1.2.4\n\n## 1.20.0\n\n### Minor Changes\n\n- [#2594](https://github.com/onflow/fcl-js/pull/2594) [`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled FCL functions from the global state and created a `createFlowClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application.\n\n  All FCL functions will continue to work as before, but now you can create a custom FCL instance with its own context.\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Load FCL-WC in `createFlowClient`\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/fcl-core@1.21.0\n  - @onflow/sdk@1.10.0\n  - @onflow/fcl-wc@6.0.5\n  - @onflow/config@1.6.0\n\n## 1.20.0-alpha.2\n\n### Minor Changes\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Load FCL-WC in `createFlowClient`\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl-wc@6.0.5-alpha.2\n  - @onflow/fcl-core@1.21.0-alpha.2\n\n## 1.20.0-alpha.1\n\n### Minor Changes\n\n- [#2594](https://github.com/onflow/fcl-js/pull/2594) [`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled FCL functions from the global state and created a `createFlowClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application.\n\n  All FCL functions will continue to work as before, but now you can create a custom FCL instance with its own context.\n\n### Patch Changes\n\n- Updated dependencies [[`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/config@1.6.0-alpha.0\n  - @onflow/fcl-core@1.21.0-alpha.1\n  - @onflow/sdk@1.10.0-alpha.1\n  - @onflow/fcl-wc@6.0.5-alpha.1\n\n## 1.20.0-alpha.0\n\n### Minor Changes\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76)]:\n  - @onflow/fcl-core@1.21.0-alpha.0\n  - @onflow/sdk@1.10.0-alpha.0\n  - @onflow/fcl-wc@6.0.5-alpha.0\n\n## 1.19.0\n\n### Minor Changes\n\n- [#2523](https://github.com/onflow/fcl-js/pull/2523) [`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d) Thanks [@mfbz](https://github.com/mfbz)! - Added `queryRaw` method to execute a query and get non-decoded data as result.\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl-core@1.20.0\n  - @onflow/fcl-wc@6.0.4\n\n## 1.18.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89), [`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/sdk@1.9.0\n  - @onflow/fcl-core@1.19.0\n  - @onflow/fcl-wc@6.0.3\n\n## 1.18.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12)]:\n  - @onflow/fcl-core@1.19.0-alpha.2\n  - @onflow/fcl-wc@6.0.3-alpha.2\n\n## 1.18.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89)]:\n  - @onflow/sdk@1.9.0-alpha.1\n  - @onflow/fcl-core@1.19.0-alpha.1\n  - @onflow/fcl-wc@6.0.3-alpha.1\n\n## 1.18.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/fcl-core@1.19.0-alpha.0\n  - @onflow/sdk@1.9.0-alpha.0\n  - @onflow/fcl-wc@6.0.3-alpha.0\n\n## 1.17.0\n\n### Minor Changes\n\n- [#2384](https://github.com/onflow/fcl-js/pull/2384) [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29) Thanks [@jribbink](https://github.com/jribbink)! - Include origin information in `onMessageFromFcl` function\n\n### Patch Changes\n\n- Updated dependencies [[`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29), [`094ed6dd38cae9ae39183f5ead8d59f9276f8f5d`](https://github.com/onflow/fcl-js/commit/094ed6dd38cae9ae39183f5ead8d59f9276f8f5d)]:\n  - @onflow/fcl-wc@6.0.2\n  - @onflow/fcl-core@1.18.0\n  - @onflow/sdk@1.8.1\n\n## 1.16.1\n\n### Patch Changes\n\n- Updated dependencies [[`f4d8bc53c9902f74c1751206ddbece497017683d`](https://github.com/onflow/fcl-js/commit/f4d8bc53c9902f74c1751206ddbece497017683d)]:\n  - @onflow/fcl-wc@6.0.1\n\n## 1.16.0\n\n### Minor Changes\n\n- [#2270](https://github.com/onflow/fcl-js/pull/2270) [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d) Thanks [@mfbz](https://github.com/mfbz)! - Added default Flow network config exports: `flowMainnet`, `flowTestnet`, and `flowEmulator`. These can be used with `fcl.config()` to simplify setup.\n\n### Patch Changes\n\n- Updated dependencies [[`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d), [`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01), [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`837fdf7f019c3f154ff007c50959b90b9b603297`](https://github.com/onflow/fcl-js/commit/837fdf7f019c3f154ff007c50959b90b9b603297)]:\n  - @onflow/fcl-core@1.17.0\n  - @onflow/fcl-wc@6.0.0\n  - @onflow/sdk@1.8.0\n  - @onflow/config@1.5.2\n\n## 1.15.0\n\n### Minor Changes\n\n- [#2252](https://github.com/onflow/fcl-js/pull/2252) [`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714) Thanks [@jribbink](https://github.com/jribbink)! - Default to soft-finality for all queries (get account, get block, get block header, execute script). Developers can manually override this setting on a per-query basis if required.\n\n  Because developers can now query against un-sealed blocks, it is now recommended to switch to waiting for soft-finality (\"executed\" status) when awaiting for transaction results whenever possible for significant latency improvements (~2.5x faster).\n\n  This can be done by switching from `fcl.tx(...).onceSealed()` to `fcl.tx(...).onceExecuted()` or updating listeners passed to `fcl.tx(...).subscribe()`.\n\n### Patch Changes\n\n- Updated dependencies [[`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714)]:\n  - @onflow/fcl-core@1.16.0\n  - @onflow/sdk@1.7.0\n  - @onflow/fcl-wc@5.6.4\n\n## 1.14.1\n\n### Patch Changes\n\n- [#2245](https://github.com/onflow/fcl-js/pull/2245) [`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac) Thanks [@jribbink](https://github.com/jribbink)! - Fix regression in `account` query at latest block\n\n- Updated dependencies [[`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac)]:\n  - @onflow/fcl-core@1.15.1\n  - @onflow/sdk@1.6.1\n  - @onflow/fcl-wc@5.6.3\n\n## 1.14.0\n\n### Minor Changes\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Add `fcl.experimental.softFinality` config option to run all state queries (e.g. execute script, get account) against the latest soft-finality state by default\n\n### Patch Changes\n\n- Updated dependencies [[`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8)]:\n  - @onflow/fcl-core@1.15.0\n  - @onflow/sdk@1.6.0\n  - @onflow/fcl-wc@5.6.2\n\n## 1.13.7\n\n### Patch Changes\n\n- Updated dependencies [[`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec)]:\n  - @onflow/sdk@1.5.7\n  - @onflow/fcl-core@1.14.1\n  - @onflow/fcl-wc@5.6.1\n\n## 1.13.6\n\n### Patch Changes\n\n- Updated dependencies [[`68cf725a4d618cc963f31a758998ad14a7a43716`](https://github.com/onflow/fcl-js/commit/68cf725a4d618cc963f31a758998ad14a7a43716)]:\n  - @onflow/fcl-core@1.14.0\n  - @onflow/fcl-wc@5.6.0\n\n## 1.13.5\n\n### Patch Changes\n\n- [#2162](https://github.com/onflow/fcl-js/pull/2162) [`98c1015532d5ad9e066bf8107a2da8a39a54fb3d`](https://github.com/onflow/fcl-js/commit/98c1015532d5ad9e066bf8107a2da8a39a54fb3d) Thanks [@chasefleming](https://github.com/chasefleming)! - Updated FCL README and contributing guide\n\n- Updated dependencies [[`3fccbef7bbf985f19d9a9bae2638e538f126f754`](https://github.com/onflow/fcl-js/commit/3fccbef7bbf985f19d9a9bae2638e538f126f754)]:\n  - @onflow/fcl-core@1.13.5\n  - @onflow/fcl-wc@5.5.5\n\n## 1.13.4\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.13.4\n  - @onflow/sdk@1.5.6\n  - @onflow/fcl-wc@5.5.4\n\n## 1.13.3\n\n### Patch Changes\n\n- Updated dependencies [[`c88f170ab2342f5382dead9a2270e72ce9c6d68a`](https://github.com/onflow/fcl-js/commit/c88f170ab2342f5382dead9a2270e72ce9c6d68a)]:\n  - @onflow/fcl-core@1.13.3\n  - @onflow/fcl-wc@5.5.3\n\n## 1.13.2\n\n### Patch Changes\n\n- [#2043](https://github.com/onflow/fcl-js/pull/2043) [`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f) Thanks [@jribbink](https://github.com/jribbink)! - Export `TransactionError`\n\n- Updated dependencies [[`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f)]:\n  - @onflow/fcl-core@1.13.2\n  - @onflow/fcl-wc@5.5.2\n\n## 1.13.1\n\n### Patch Changes\n\n- [#2039](https://github.com/onflow/fcl-js/pull/2039) [`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d) Thanks [@jribbink](https://github.com/jribbink)! - Update cross-fetch to v4\n\n- Updated dependencies [[`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d)]:\n  - @onflow/fcl-core@1.13.1\n  - @onflow/sdk@1.5.5\n  - @onflow/fcl-wc@5.5.1\n\n## 1.13.0\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add `walletconnect.disableNotifications` config option to disable WC notification UI\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Use localStorage as default & export LOCAL_STORAGE/SESSION_STORAGE as helpers for fcl.storage.default configuration key\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`a7df42ff4609aa8a1f381fd447d3f94606f71a17`](https://github.com/onflow/fcl-js/commit/a7df42ff4609aa8a1f381fd447d3f94606f71a17), [`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35), [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1), [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7), [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21)]:\n  - @onflow/fcl-core@1.13.0\n  - @onflow/fcl-wc@5.5.0\n  - @onflow/sdk@1.5.4\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-template@1.2.3\n  - @onflow/util-address@1.2.3\n  - @onflow/util-logger@1.3.3\n  - @onflow/util-semver@1.0.3\n  - @onflow/util-actor@1.3.4\n  - @onflow/util-rpc@0.0.2\n  - @onflow/util-uid@1.2.3\n  - @onflow/config@1.5.1\n  - @onflow/types@1.4.1\n  - @onflow/rlp@1.2.3\n\n## 1.13.0-alpha.8\n\n### Patch Changes\n\n- Updated dependencies [[`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35)]:\n  - @onflow/sdk@1.5.4-alpha.3\n  - @onflow/fcl-core@1.13.0-alpha.6\n  - @onflow/fcl-wc@5.5.0-alpha.6\n\n## 1.13.0-alpha.7\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add `walletconnect.disableNotifications` config option to disable WC notification UI\n\n### Patch Changes\n\n- Updated dependencies [[`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26)]:\n  - @onflow/fcl-wc@5.5.0-alpha.5\n  - @onflow/fcl-core@1.13.0-alpha.5\n  - @onflow/sdk@1.5.4-alpha.2\n\n## 1.13.0-alpha.6\n\n### Minor Changes\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Use localStorage as default & export LOCAL_STORAGE/SESSION_STORAGE as helpers for fcl.storage.default configuration key\n\n### Patch Changes\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7)]:\n  - @onflow/fcl-core@1.13.0-alpha.4\n  - @onflow/fcl-wc@5.4.1-alpha.4\n\n## 1.12.4-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1)]:\n  - @onflow/fcl-core@1.13.0-alpha.3\n  - @onflow/fcl-wc@5.4.1-alpha.3\n\n## 1.12.4-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`a7df42ff4609aa8a1f381fd447d3f94606f71a17`](https://github.com/onflow/fcl-js/commit/a7df42ff4609aa8a1f381fd447d3f94606f71a17)]:\n  - @onflow/fcl-wc@5.4.1-alpha.2\n\n## 1.12.4-alpha.3\n\n### Patch Changes\n\n- Updated dependencies:\n  - @onflow/fcl-core@1.13.0-alpha.2\n  - @onflow/fcl-wc@5.4.1-alpha.1\n\n## 1.12.4-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/util-semver@1.0.3-alpha.0\n  - @onflow/util-actor@1.3.4-alpha.0\n  - @onflow/fcl-core@1.12.1-alpha.0\n  - @onflow/util-rpc@0.0.2-alpha.0\n  - @onflow/util-uid@1.2.3-alpha.0\n  - @onflow/config@1.5.1-alpha.0\n  - @onflow/fcl-wc@5.4.1-alpha.0\n  - @onflow/types@1.4.1-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n  - @onflow/sdk@1.5.4-alpha.0\n\n## 1.12.3\n\n### Patch Changes\n\n- Updated dependencies [[`f2831107`](https://github.com/onflow/fcl-js/commit/f283110707d5edc166bbe05e5482d38fa29de29e)]:\n  - @onflow/fcl-core@1.12.0\n  - @onflow/fcl-wc@5.4.0\n\n## 1.12.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.5.3\n  - @onflow/fcl-core@1.11.1\n  - @onflow/fcl-wc@5.3.1\n\n## 1.12.1\n\n### Patch Changes\n\n- Updated dependencies [[`77f66e94`](https://github.com/onflow/fcl-js/commit/77f66e94ecce98c681449eeaf74e1b29c4ddc4cb)]:\n  - @onflow/fcl-wc@5.3.0\n\n## 1.12.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Improvements to FCL Discovery:\n  - `execStrategy` is overriden and allows for parallel execution of multiple strategies\n  - Can now be resolved by WalletConnect or a custom service during an in-flight Discovery request\n\n### Patch Changes\n\n- [#1947](https://github.com/onflow/fcl-js/pull/1947) [`8f0c710e`](https://github.com/onflow/fcl-js/commit/8f0c710eb4fa7b027d40d3bc15a1cf69a31e6633) Thanks [@jribbink](https://github.com/jribbink)! - Add `clipboard-write` access to FCL IFRAME\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`e97e8d2f`](https://github.com/onflow/fcl-js/commit/e97e8d2f5197aecf793f26ba82771fd4f7ebc757), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7), [`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24), [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/fcl-core@1.11.0\n  - @onflow/sdk@1.5.2\n  - @onflow/fcl-wc@5.2.0\n  - @onflow/config@1.5.0\n\n## 1.12.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/config@1.5.0-alpha.0\n  - @onflow/fcl-core@1.11.0-alpha.4\n  - @onflow/fcl-wc@5.2.0-alpha.4\n  - @onflow/sdk@1.5.2-alpha.3\n\n## 1.12.0-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c)]:\n  - @onflow/fcl-core@1.11.0-alpha.3\n  - @onflow/fcl-wc@5.2.0-alpha.3\n\n## 1.12.0-alpha.2\n\n### Patch Changes\n\n- [#1947](https://github.com/onflow/fcl-js/pull/1947) [`8f0c710e`](https://github.com/onflow/fcl-js/commit/8f0c710eb4fa7b027d40d3bc15a1cf69a31e6633) Thanks [@jribbink](https://github.com/jribbink)! - Add `clipboard-write` access to FCL IFRAME\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7), [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/fcl-core@1.11.0-alpha.2\n  - @onflow/sdk@1.5.2-alpha.2\n  - @onflow/fcl-wc@5.2.0-alpha.2\n\n## 1.12.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24)]:\n  - @onflow/sdk@1.5.2-alpha.1\n  - @onflow/fcl-core@1.11.0-alpha.1\n  - @onflow/fcl-wc@5.2.0-alpha.1\n\n## 1.12.0-alpha.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Improvements to FCL Discovery:\n  - `execStrategy` is overriden and allows for parallel execution of multiple strategies\n  - Can now be resolved by WalletConnect or a custom service during an in-flight Discovery request\n\n### Patch Changes\n\n- Updated dependencies [[`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807)]:\n  - @onflow/sdk@1.5.2-alpha.0\n  - @onflow/fcl-wc@5.2.0-alpha.0\n  - @onflow/fcl-core@1.11.0-alpha.0\n\n## 1.11.0\n\n### Minor Changes\n\n- [#1888](https://github.com/onflow/fcl-js/pull/1888) [`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b) Thanks [@jribbink](https://github.com/jribbink)! - Inject FCL WalletConnect Plugin by default. All developers are expected to configure a WalletConnect project ID in their FCL configuration. The relate configuration values are as follows:\n\n  ```typescript\n  {\n      // Required\n      \"walletconnect.projectId\": \"YOUR_PROJECT_ID\",\n\n      // Optional\n      \"app.detail.icon\": \"https://example.com/icon.png\",\n      \"app.detail.name\": \"Example App\",\n      \"app.detail.description\": \"Example App Description\",\n      \"app.detail.url\": \"https://example.com\",\n  }\n  ```\n\n  These values are used to configure the WalletConnect client. To obtain a project ID, please go to [WalletConnect's official website](https://walletconnect.com/). Metadata is optional, but recommended (FCL will use default values if not provided).\n\n### Patch Changes\n\n- Updated dependencies [[`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b)]:\n  - @onflow/fcl-core@1.10.0\n  - @onflow/fcl-wc@5.2.0\n\n## 1.10.2\n\n### Patch Changes\n\n- Updated dependencies [[`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175), [`38607662`](https://github.com/onflow/fcl-js/commit/38607662dbfc54f268c40488e7a6a89bedd169d8)]:\n  - @onflow/util-actor@1.3.3\n  - @onflow/fcl-core@1.9.2\n  - @onflow/config@1.4.1\n  - @onflow/sdk@1.5.1\n\n## 1.10.1\n\n### Patch Changes\n\n- Updated dependencies [[`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074), [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`8fb453b5`](https://github.com/onflow/fcl-js/commit/8fb453b5ff3a00285d91a5432972afbe9e779706), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]:\n  - @onflow/sdk@1.5.0\n  - @onflow/types@1.4.0\n  - @onflow/util-invariant@1.2.3\n  - @onflow/config@1.4.0\n  - @onflow/fcl-core@1.9.1\n\n## 1.10.0\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - Typescript improvements\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new event streaming API. Syntax remains unchanged & can be accessed via `fcl.events()`. See FLIP for more information: https://github.com/onflow/flips/blob/4152912f8ec39515eb1c4dddbc6605c6ebe70966/protocol/20230309-accessnode-event-streaming-api.md.\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a), [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/fcl-core@1.9.0\n  - @onflow/types@1.3.0\n  - @onflow/sdk@1.4.0\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/util-address@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/util-actor@1.3.2\n  - @onflow/util-uid@1.2.2\n  - @onflow/config@1.3.0\n  - @onflow/rlp@1.2.2\n  - @onflow/util-semver@1.0.2\n\n## 1.10.0-alpha.11\n\n### Patch Changes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n  - @onflow/sdk@1.4.0-alpha.9\n  - @onflow/fcl-core@1.9.0-alpha.8\n\n## 1.10.0-alpha.10\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- Updated dependencies [[`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88)]:\n  - @onflow/fcl-core@1.9.0-alpha.7\n  - @onflow/sdk@1.4.0-alpha.8\n\n## 1.10.0-alpha.9\n\n### Patch Changes\n\n- Updated dependencies [[`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0)]:\n  - @onflow/sdk@1.4.0-alpha.7\n  - @onflow/fcl-core@1.9.0-alpha.6\n\n## 1.10.0-alpha.8\n\n### Patch Changes\n\n- Updated dependencies [[`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/config@1.3.0-alpha.3\n  - @onflow/fcl-core@1.9.0-alpha.5\n  - @onflow/sdk@1.4.0-alpha.6\n\n## 1.10.0-alpha.7\n\n### Patch Changes\n\n- Updated dependencies [[`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a)]:\n  - @onflow/fcl-core@1.9.0-alpha.4\n\n## 1.10.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d)]:\n  - @onflow/sdk@1.4.0-alpha.5\n  - @onflow/fcl-core@1.8.2-alpha.3\n\n## 1.10.0-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f)]:\n  - @onflow/types@1.3.0-alpha.3\n  - @onflow/fcl-core@1.8.2-alpha.2\n\n## 1.10.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f)]:\n  - @onflow/fcl-core@1.8.2-alpha.1\n  - @onflow/sdk@1.4.0-alpha.4\n\n## 1.10.0-alpha.3\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/util-semver@1.0.2-alpha.0\n  - @onflow/util-actor@1.3.2-alpha.2\n  - @onflow/fcl-core@1.8.2-alpha.0\n  - @onflow/util-uid@1.2.2-alpha.2\n  - @onflow/config@1.2.2-alpha.2\n  - @onflow/types@1.3.0-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n  - @onflow/sdk@1.4.0-alpha.3\n\n## 1.10.0-alpha.2\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - TS conversion\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new event streaming API https://github.com/onflow/flips/blob/4152912f8ec39515eb1c4dddbc6605c6ebe70966/protocol/20230309-accessnode-event-streaming-api.md. Syntax remains unchanged & can be accessed via fcl.events().\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/types@1.3.0-alpha.1\n  - @onflow/sdk@1.4.0-alpha.2\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-template@1.2.2-alpha.1\n  - @onflow/util-address@1.2.2-alpha.1\n  - @onflow/util-logger@1.3.2-alpha.1\n  - @onflow/util-actor@1.3.2-alpha.1\n  - @onflow/util-uid@1.2.2-alpha.1\n  - @onflow/config@1.2.2-alpha.1\n  - @onflow/rlp@1.2.2-alpha.1\n"
  },
  {
    "path": "packages/fcl/README.md",
    "content": "[![FLOW-JS-SDK Continuous Integration](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml/badge.svg)](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n<br />\n<br />\n<p align=\"center\">\n  <h1 align=\"center\"> FCL JS</h1>\n  <p align=\"center\">\n    <i>Connect your dapp to users, their wallets and Flow.</i>\n    <br />\n    <br />\n    <a href=\"https://developers.flow.com/tutorials/flow-app-quickstart\">Quickstart</a>\n    ·\n    <a href=\"https://github.com/onflow/fcl-js/issues\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/onflow/fcl-js/blob/master/CONTRIBUTING.md\">Contribute</a>\n\n  </p>\n</p>\n\n## 🌟 What is FCL?\n\nThe **Flow Client Library (FCL) JS** is a package designed to facilitate interactions between dapps, wallets, and the Flow blockchain. It provides a standardized way for applications to connect with users and their wallets, **eliminating the need for custom integrations**.\n\n### 🔑 Key Features:\n- 🔌 **Universal Wallet Support** – Works seamlessly with all FCL-compatible wallets, making authentication simple.\n- 🔐 **Secure Authentication** – Standardized authentication flow ensures a smooth user experience.\n- ⚡ **Blockchain Interactions** – Enables querying, mutating, and interacting with smart contracts on Flow.\n- 🛠️ **Full-Featured Utilities** – Offers built-in functions to streamline blockchain development.\n- 🌍 **Flexible Environment** – Can run in both browser and server environments, though wallet interactions are browser-only.\n\nFCL was created to make building Flow-connected applications **easy, secure, and scalable** by defining **standardized communication patterns** between wallets, applications, and users.\n\nFor iOS, we also offer [FCL Swift](https://github.com/Outblock/fcl-swift).\n\n---\n## Getting Started\n\n### Requirements\n-  Node version `v12.0.0 or higher`.\n\n### Installation\n\nTo use the FCL JS in your application, install using **yarn** or **npm**\n\n```shell\nnpm i -S @onflow/fcl\n```\n\n```shell\nyarn add @onflow/fcl\n```\n#### Importing\n\n**ES6**\n```js\nimport * as fcl from \"@onflow/fcl\";\n```\n**Node.js**\n```js\nconst fcl = require(\"@onflow/fcl\");\n```\n---\n## FCL for Dapps\n#### Wallet Interactions\n\n- *Wallet Discovery* and *Sign-up/Login*: Onboard users with ease. Never worry about supporting multiple wallets.\n  Authenticate users with any [FCL compatible wallet](#current-wallet-providers).\n```js\n// in the browser\nimport * as fcl from \"@onflow/fcl\"\n\nfcl.config({\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\", // Endpoint set to Testnet\n})\n\nfcl.authenticate()\n```\n![FCL Default Discovery UI](../../docs/images/discovery.png)\n\n> **Note**: A [Dapper Wallet](https://meetdapper.com/developers) developer account is required. To enable Dapper Wallet inside FCL, you need to [follow this guide](https://docs.meetdapper.com/get-started).\n\n- *Interact with smart contracts*: Authorize transactions via the user's chosen wallet\n- *Prove ownership of a wallet address*: Signing and verifying user signed data\n\n[Learn more about wallet interactions >](https://developers.flow.com/tooling/fcl-js/api#wallet-interactions)\n\n#### Blockchain Interactions\n- *Query the chain*: Send arbitrary Cadence scripts to the chain and receive back decoded values\n```js\nimport * as fcl from \"@onflow/fcl\";\n\nconst result = await fcl.query({\n  cadence: `\n    access(all) fun main(a: Int, b: Int, addr: Address): Int {\n      log(addr)\n      return a + b\n    }\n  `,\n  args: (arg, t) => [\n    arg(7, t.Int), // a: Int\n    arg(6, t.Int), // b: Int\n    arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n  ],\n});\nconsole.log(result); // 13\n```\n- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.\n```js\nimport * as fcl from \"@onflow/fcl\";\n// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) => [arg(\"myName\", t.String)],\n});\n```\n\n[Learn more about on-chain interactions >](https://developers.flow.com/tooling/fcl-js/api#on-chain-interactions)\n\n#### Utilities\n- Get account details from any Flow address\n- Get the latest block\n- Transaction status polling\n- Event polling\n- Custom authorization functions\n\n[Learn more about utilities >](https://developers.flow.com/tooling/fcl-js/api#pre-built-interactions)\n\n## Typescript Support\n\nFCL JS comes with TypeScript support. If you need to use specific types, you can import them directly from the @onflow/fcl package.\n\n```typescript\nimport {CurrentUser} from \"@onflow/fcl\"\n\nconst newUser: CurrentUser = { \n  addr: null,\n  cid: null,\n  expiresAt: null,\n  f_type: 'User',\n  f_vsn: '1.0.0',\n  loggedIn: null,\n  services: []\n}\n```\n\nFor all type definitions available, see [this file](../typedefs/src/index.ts)\n\n## Next Steps\n\n- See the [Flow App Quick Start](https://developers.flow.com/build/getting-started/fcl-quickstart).\n- See the full [API Reference](https://developers.flow.com/tools/clients/fcl-js/api) for all FCL functionality.\n- Learn Flow's smart contract language to build any script or transactions: [Cadence](https://cadence-lang.org).\n- Explore all of Flow [docs and tools](https://developers.flow.com).\n\n---\n## FCL for Wallet Providers\nWallet providers on Flow have the flexibility to build their user interactions and UI through a variety of ways:\n- Front channel communication via Iframe, pop-up, tab, or extension\n- Back channel communication via HTTP\n\nFCL is agnostic to the communication channel and be configured to create both custodial and non-custodial wallets. This enables users to interact with wallet providers without needing to download an app or extension.\n\nThe communication channels involve responding to a set of pre-defined FCL messages to deliver the requested information to the dapp.  Implementing a FCL compatible wallet on Flow is as simple as filling in the responses with the appropriate data when FCL requests them. If using any of the front-channel communication methods, FCL also provides a set of [wallet utilities](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-utils/index.js) to simplify this process.\n\n### Current Wallet Providers\n- [Flow Wallet](https://wallet.flow.com/)\n- [NuFi Wallet](https://nu.fi/)\n- [Blocto](https://blocto.portto.io/en/)\n- [Ledger](https://ledger.com) (limited transaction support)\n- [Dapper Wallet](https://www.meetdapper.com/) (beta access - general availability coming soon)\n\n### Wallet Discovery\nIt can be difficult to get users to discover new wallets on a chain. To solve this, we created a [wallet discovery service](https://github.com/onflow/fcl-discovery) that can be configured and accessed through FCL to display all available Flow wallet providers to the user. This means:\n- Dapps can display and support all FCL compatible wallets that launch on Flow without needing to change any code\n- Users don't need to sign up for new wallets - they can carry over their existing one to any dapp that uses FCL for authentication and authorization.\n\nThe discovery feature can be used via API allowing you to customize your own UI or you can use the default UI without any additional configuration.\n\n> Note: To get your wallet added to the discovery service, make a PR in [fcl-discovery](https://github.com/onflow/fcl-discovery).\n\n### Building a FCL compatible wallet\n\n- Read the [wallet guide](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-provider-spec/draft-v4.md) to understand the implementation details.\n- Review the architecture of the [FCL dev wallet](https://github.com/onflow/fcl-dev-wallet) for an overview.\n- If building a non-custodial wallet, see the [Account API](https://github.com/onflow/flow-account-api) and the [FLIP](https://github.com/onflow/flow/pull/727) on derivation paths and key generation.\n\n---\n\n## 🛠 Want to Use the Flow SDK Directly?\n\nIf you prefer to interact with Flow at a **lower level** without using FCL, you can use the [Flow JavaScript SDK](../sdk/readme.md) directly. The SDK provides raw access to Flow's API for sending transactions, executing scripts, and managing accounts.\n\nFCL is built **on top of the Flow SDK**, making it easier to handle authentication, wallet interactions, and dapp connectivity. Choose the approach that best fits your use case.\n\n## Support\n\n- Notice a problem or want to request a feature? [Add an issue](https://github.com/onflow/fcl-js/issues).\n- Join the Flow community on [Discord](https://discord.gg/flow) to keep up to date and to talk to the team.\n- Read the [Contributing Guide](./CONTRIBUTING.md) to learn how to contribute to the project.\n"
  },
  {
    "path": "packages/fcl/TRANSITIONS.md",
    "content": "# Transitions\n\n## 0001 Deprecate `env` config key\n- **Date:** May 26th 2022\n- **Type:** Deprecation of `env` in config\n\nWhen specifying which flow network for FCL to use, use the `flow.network` config key instead of `env` (e.g. `fcl.config.put(\"flow.network\", \"testnet\")`).  Permitted values are currently `local`, `canarynet`, `testnet`, `mainnet`.\n\nFCL currently falls back to `env` for the `flow.network` field but this will be removed in a future update.\n\n## 0002 Deprecate `flow.network` config key\n- **Date:** September 26th 2022\n- **Type:** Deprecation of `flow.network` in config\n\nFCL now has a built-in utility to get which flow network to use. Manual specification in config is no longer required\n\nFCL currently falls back to `flow.network` in case of failure but this will be removed in a future update."
  },
  {
    "path": "packages/fcl/docs/extra.md",
    "content": "## Configuration\n\nFCL has a mechanism that lets you configure various aspects of FCL. When you move from one instance of the Flow Blockchain to another (Local Emulator to Testnet to Mainnet) the only thing you should need to change for your FCL implementation is your configuration.\n\n### Setting Configuration Values\n\nValues only need to be set once. We recommend doing this once and as early in the life cycle as possible. To set a configuration value, the `put` method on the `config` instance needs to be called, the `put` method returns the `config` instance so they can be chained.\n\nAlternatively, you can set the config by passing a JSON object directly.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config() // returns the config instance\n  .put('foo', 'bar') // configures \"foo\" to be \"bar\"\n  .put('baz', 'buz'); // configures \"baz\" to be \"buz\"\n\n// OR\n\nfcl.config({\n  foo: 'bar',\n  baz: 'buz',\n});\n```\n\n### Getting Configuration Values\n\nThe `config` instance has an **asynchronous** `get` method. You can also pass it a fallback value.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('foo', 'bar').put('woot', 5).put('rawr', 7);\n\nconst FALLBACK = 1;\n\nasync function addStuff() {\n  var woot = await fcl.config().get('woot', FALLBACK); // will be 5 -- set in the config before\n  var rawr = await fcl.config().get('rawr', FALLBACK); // will be 7 -- set in the config before\n  var hmmm = await fcl.config().get('hmmm', FALLBACK); // will be 1 -- uses fallback because this isnt in the config\n\n  return woot + rawr + hmmm;\n}\n\naddStuff().then((d) => console.log(d)); // 13 (5 + 7 + 1)\n```\n\n### Common Configuration Keys\n\n| Name                                 | Example                                                       | Description                                                                                                                                                             |\n| ------------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `accessNode.api` **(required)**      | `https://rest-testnet.onflow.org`                             | API URL for the Flow Blockchain Access Node you want to be communicating with. See all available access node endpoints [here](https://developers.onflow.org/http-api/). |\n| `app.detail.title`                   | `Cryptokitties`                                               | Your applications title, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                       |\n| `app.detail.icon`                    | `https://fcl-discovery.onflow.org/images/blocto.png`          | Url for your applications icon, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                |\n| `app.detail.description`             | `Cryptokitties is a blockchain game`                          | Your applications description, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                 |\n| `app.detail.url`                     | `https://cryptokitties.co`                                    | Your applications url, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                         |\n| `challenge.handshake`                | **DEPRECATED**                                                | Use `discovery.wallet` instead.                                                                                                                                         |\n| `discovery.authn.endpoint`           | `https://fcl-discovery.onflow.org/api/testnet/authn`          | Endpoint for alternative configurable Wallet Discovery mechanism.                                                                  |\n| `discovery.wallet` **(required)**    | `https://fcl-discovery.onflow.org/testnet/authn`              | Points FCL at the Wallet or Wallet Discovery mechanism.                                                                                                                 |\n| `discovery.wallet.method`            | `IFRAME/RPC`, `POP/RPC`, `TAB/RPC`, `HTTP/POST`, or `EXT/RPC` | Describes which service strategy a wallet should use.                                                                                                                   |\n| `fcl.limit`                          | `100`                                                         | Specifies fallback compute limit if not provided in transaction. Provided as integer.                                                                                   |\n| `flow.network` **(recommended)**     | `testnet`                                                     | Used in conjunction with stored interactions and provides FCLCryptoContract address for `testnet` and `mainnet`. Possible values: `local`, `testnet`, `mainnet`.        |\n| `walletconnect.projectId`            | `YOUR_PROJECT_ID`                                             | Your app's WalletConnect project ID. See [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) to obtain a project ID for your application.                    |\n| `walletconnect.disableNotifications` | `false`                                                       | Optional flag to disable pending WalletConnect request notifications within the application's UI.                                                                       |\n\n## Using Contracts in Scripts and Transactions\n\n### Address Replacement\n\nConfiguration keys that start with `0x` will be replaced in FCL scripts and transactions, this allows you to write your script or transaction Cadence code once and not have to change it when you point your application at a difference instance of the Flow Blockchain.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('0xFungibleToken', '0xf233dcee88fe0abe');\n\nasync function myScript() {\n  return fcl\n    .send([\n      fcl.script`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      access(all) fun main() { /* Rest of the script goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n\nasync function myTransaction() {\n  return fcl\n    .send([\n      fcl.transaction`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      transaction { /* Rest of the transaction goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n```\n\n#### Example\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config()\n  .put('flow.network', 'testnet')\n  .put('walletconnect.projectId', 'YOUR_PROJECT_ID')\n  .put('accessNode.api', 'https://rest-testnet.onflow.org')\n  .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn')\n  .put('app.detail.title', 'Test Harness')\n  .put('app.detail.icon', 'https://i.imgur.com/r23Zhvu.png')\n  .put('app.detail.description', 'A test harness for FCL')\n  .put('app.detail.url', 'https://myapp.com')\n  .put('service.OpenID.scopes', 'email email_verified name zoneinfo')\n  .put('0xFlowToken', '0x7e60df042a9c0868');\n```\n\n### Using `flow.json` for Contract Imports\n\nA simpler and more flexible way to manage contract imports in scripts and transactions is by using the `config.load` method in FCL. This lets you load contract configurations from a `flow.json` file, keeping your import syntax clean and allowing FCL to pick the correct contract addresses based on the network you're using.\n\n#### 1. Define Your Contracts in `flow.json`\n\nHere’s an example of a `flow.json` file with aliases for multiple networks:\n\n```json\n{\n  \"contracts\": {\n    \"HelloWorld\": {\n      \"source\": \"./cadence/contracts/HelloWorld.cdc\",\n      \"aliases\": {\n        \"testnet\": \"0x1cf0e2f2f715450\",\n        \"mainnet\": \"0xf8d6e0586b0a20c7\"\n      }\n    }\n  }\n}\n```\n\n- **`source`**: Points to the contract file in your project.\n- **`aliases`**: Maps each network to the correct contract address.\n\n#### 2. Configure FCL\n\nLoad the `flow.json` file and set up FCL to use it:\n\n```javascript\nimport { config } from '@onflow/fcl';\nimport flowJSON from '../flow.json';\n\nconfig({\n  'flow.network': 'testnet', // Choose your network, e.g., testnet or mainnet\n  'accessNode.api': 'https://rest-testnet.onflow.org', // Access node for the network\n  'discovery.wallet': `https://fcl-discovery.onflow.org/testnet/authn`, // Wallet discovery\n}).load({ flowJSON });\n```\n\nWith this setup, FCL will automatically use the correct contract address based on the selected network (e.g., `testnet` or `mainnet`).\n\n#### 3. Use Contract Names in Scripts and Transactions\n\nAfter setting up `flow.json`, you can import contracts by name in your Cadence scripts or transactions:\n\n```cadence\nimport \"HelloWorld\"\n\naccess(all) fun main(): String {\n    return HelloWorld.sayHello()\n}\n```\n\nFCL replaces `\"HelloWorld\"` with the correct address from the `flow.json` configuration.\n\n> **Note**: Don’t store private keys in your `flow.json`. Instead, keep sensitive keys in a separate, `.gitignore`-protected file."
  },
  {
    "path": "packages/fcl/docs-generator.config.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nmodule.exports = {\n  customData: {\n    extra: fs\n      .readFileSync(path.join(__dirname, \"docs\", \"extra.md\"), \"utf8\")\n      .trim(),\n  },\n}\n"
  },
  {
    "path": "packages/fcl/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl\",\n  \"version\": \"1.21.10\",\n  \"description\": \"High-level JavaScript/TypeScript library for building web applications on the Flow blockchain.\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"jest\": {\n    \"testEnvironment\": \"jsdom\",\n    \"globals\": {\n      \"PACKAGE_CURRENT_VERSION\": \"TESTVERSION\"\n    }\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"1.8.0\",\n    \"@types/estree\": \"^1.0.6\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/node\": \"^18.19.57\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/fcl.ts\",\n  \"main\": \"dist/fcl.js\",\n  \"module\": \"dist/fcl.module.js\",\n  \"unpkg\": \"dist/fcl.umd.min.js\",\n  \"types\": \"types/fcl.d.ts\",\n  \"scripts\": {\n    \"pain\": \"npm publish --tag pain\",\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"build:types\": \"tsc\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\",\n    \"generate-docs\": \"node ../../docs-generator/generate-docs.js\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/config\": \"1.11.1\",\n    \"@onflow/fcl-core\": \"1.30.2\",\n    \"@onflow/fcl-wc\": \"6.0.22\",\n    \"@onflow/interaction\": \"0.0.11\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/sdk\": \"1.13.7\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@onflow/util-actor\": \"1.3.5\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@onflow/util-rpc\": \"0.0.3\",\n    \"@onflow/util-semver\": \"1.0.4\",\n    \"@onflow/util-template\": \"1.2.4\",\n    \"@onflow/util-uid\": \"1.2.4\",\n    \"@walletconnect/types\": \"^2.13.2\",\n    \"abort-controller\": \"^3.0.0\",\n    \"cross-fetch\": \"^4.0.0\",\n    \"events\": \"^3.3.0\",\n    \"sha3\": \"^2.1.4\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/VERSION.ts",
    "content": "declare const PACKAGE_CURRENT_VERSION: string | undefined\n\nexport const VERSION: string = PACKAGE_CURRENT_VERSION || \"TESTVERSION\"\n"
  },
  {
    "path": "packages/fcl/src/client.ts",
    "content": "import {\n  createFlowClientCore,\n  type FlowClientCoreConfig,\n  type StorageProvider,\n} from \"@onflow/fcl-core\"\nimport {LOCAL_STORAGE} from \"./fcl\"\nimport {execStrategyHook} from \"./discovery/exec-hook\"\nimport {loadFclWc} from \"./utils/walletconnect/loader\"\n\nconst PLATFORM = \"web\"\n\nexport const discoveryOpts = {\n  execStrategy: execStrategyHook,\n}\n\n/**\n * Configuration for creating a Flow client on the web platform.\n * Extends core configuration with web-specific features like WalletConnect.\n */\nexport interface FlowClientConfig\n  extends Omit<\n    FlowClientCoreConfig,\n    \"platform\" | \"discovery\" | \"computeLimit\" | \"storage\"\n  > {\n  // Override to make optional (defaults provided by implementation)\n  computeLimit?: number\n  storage?: StorageProvider\n\n  // WalletConnect configuration (web-specific)\n  walletconnectProjectId?: string\n  walletconnectDisableNotifications?: boolean\n}\n\n/**\n * Creates a Flow client instance with scoped configuration.\n *\n * This function decouples FCL functions from the global state and constructs a new SDK client\n * instance bound to a custom context. This allows for better modularity and supports multiple\n * FCL instances in the same application, each with their own isolated configuration and state.\n *\n * Benefits of scoped configuration:\n * - **Isolation**: Each client has its own configuration, storage, and state\n * - **Multi-tenancy**: Connect to different Flow networks simultaneously\n * - **Type Safety**: Configuration is validated at compile time via TypeScript\n * - **Testing**: Easy to create isolated client instances for testing\n *\n * @param params Configuration object for the Flow client\n * @returns A Flow client object with methods for interacting with the Flow blockchain\n *\n * @example\n * // Basic client setup\n * import { createFlowClient } from \"@onflow/fcl\"\n *\n * const flowClient = createFlowClient({\n *   accessNodeUrl: \"https://rest-testnet.onflow.org\",\n *   flowNetwork: \"testnet\",\n *   discoveryWallet: \"https://fcl-discovery.onflow.org/testnet/authn\",\n *   appDetailTitle: \"My Flow App\",\n * })\n *\n * // Authenticate user\n * await flowClient.authenticate()\n *\n * // Query the blockchain\n * const result = await flowClient.query({\n *   cadence: `access(all) fun main(): UFix64 { return getCurrentBlock().timestamp }`,\n * })\n *\n * // Send a transaction\n * const txId = await flowClient.mutate({\n *   cadence: `\n *     transaction {\n *       execute {\n *         log(\"Hello, Flow!\")\n *       }\n *     }\n *   `,\n * })\n *\n * @example\n * // Multiple isolated clients for different networks\n * import { createFlowClient } from \"@onflow/fcl\"\n *\n * const mainnetClient = createFlowClient({\n *   accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n *   flowNetwork: \"mainnet\",\n *   appDetailTitle: \"My App (Mainnet)\",\n * })\n *\n * const testnetClient = createFlowClient({\n *   accessNodeUrl: \"https://rest-testnet.onflow.org\",\n *   flowNetwork: \"testnet\",\n *   appDetailTitle: \"My App (Testnet)\",\n * })\n *\n * // Query both networks simultaneously\n * const [mainnetBlock, testnetBlock] = await Promise.all([\n *   mainnetClient.query({\n *     cadence: `access(all) fun main(): UInt64 { return getCurrentBlock().height }`,\n *   }),\n *   testnetClient.query({\n *     cadence: `access(all) fun main(): UInt64 { return getCurrentBlock().height }`,\n *   }),\n * ])\n */\nexport function createFlowClient(params: FlowClientConfig) {\n  // TODO: Load into the global plugin registry for now.  This should be\n  // refactored to use a plugin registry bound to the client instance\n  // in the future.\n  loadFclWc({\n    walletConnectProjectId: params.walletconnectProjectId,\n    walletConnectDisableNotifications: params.walletconnectDisableNotifications,\n    appDetailTitle: params.appDetailTitle,\n    appDetailIcon: params.appDetailIcon,\n    appDetailDescription: params.appDetailDescription,\n    appDetailUrl: params.appDetailUrl,\n  })\n\n  const fclCore = createFlowClientCore({\n    flowNetwork: params.flowNetwork,\n    flowJson: params.flowJson,\n    accessNodeUrl: params.accessNodeUrl,\n    computeLimit: params.computeLimit || 9999,\n    transport: params.transport,\n    platform: PLATFORM,\n    storage: params.storage || LOCAL_STORAGE,\n    discovery: discoveryOpts,\n    discoveryWalletMethod: params.discoveryWalletMethod || \"IFRAME/RPC\",\n    discoveryAuthnEndpoint: params.discoveryAuthnEndpoint,\n    discoveryAuthnInclude: params.discoveryAuthnInclude,\n    discoveryAuthnExclude: params.discoveryAuthnExclude,\n    customResolver: params.customResolver,\n    customDecoders: params.customDecoders,\n    discoveryWallet: params.discoveryWallet,\n    appDetailTitle: params.appDetailTitle,\n    appDetailIcon: params.appDetailIcon,\n    appDetailDescription: params.appDetailDescription,\n    appDetailUrl: params.appDetailUrl,\n    serviceOpenIdScopes: params.serviceOpenIdScopes,\n  })\n\n  return {\n    ...fclCore,\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/discovery/exec-discovery.ts",
    "content": "import {execStrategy} from \"@onflow/fcl-core\"\n\nexport async function execDiscovery({\n  customRpc,\n  opts,\n  args,\n  abortSignal,\n}: {\n  customRpc: any\n  opts: any\n  args: any\n  abortSignal: any\n}) {\n  // Update the discovery config to enable RPC support\n  const discoveryConfig = {\n    ...opts.config,\n    client: {\n      ...opts.config.client,\n      discoveryRpcEnabled: true,\n    },\n  }\n\n  // Execute base discovery request\n  return execStrategy(\n    {\n      ...opts,\n      config: discoveryConfig,\n      customRpc,\n      abortSignal,\n    },\n    // @ts-ignore - Pass the rest of the arguments (protect against future changes)\n    ...args.slice(1)\n  )\n}\n"
  },
  {
    "path": "packages/fcl/src/discovery/exec-hook.ts",
    "content": "import {execStrategy} from \"@onflow/fcl-core\"\nimport {wrapAbortSignal} from \"../utils/async\"\nimport {createDiscoveryRpcClient} from \"./rpc/client\"\nimport {execDiscovery} from \"./exec-discovery\"\n\nconst AUTHN_SERVICE_TYPE = \"authn\"\n\n// Defines the execStrategy hook for Discovery Service\n// Used to define custom service execution rules for the Discovery Service\nexport async function execStrategyHook(...args: any) {\n  const [opts] = args\n  const {body, abortSignal: baseAbortSignal, service} = opts\n\n  // Ensure the service type is \"auth\" for the execStrategyHook\n  if (service?.type !== AUTHN_SERVICE_TYPE) {\n    console.error(\n      `ERROR: Invalid service type for FCL Discovery execStrategyHook, expected \"${AUTHN_SERVICE_TYPE}\" but got \"${service?.type}\"`\n    )\n    return (execStrategy as any)(...args)\n  }\n\n  // Create an abort controller for this context\n  // Either used to terminate WC bypass proposal loop or the base discovery request\n  const abortController = wrapAbortSignal(baseAbortSignal)\n\n  let discoveryPromise: Promise<any> | undefined\n  const resultPromise = new Promise(async (resolve, reject) => {\n    // Initialize the discovery RPC client\n    const rpc = createDiscoveryRpcClient({\n      onExecResult: resolve,\n      body,\n      opts,\n      args,\n      abortSignal: abortController.signal,\n    })\n\n    // Execute the base discovery request\n    discoveryPromise = execDiscovery({\n      customRpc: rpc,\n      opts,\n      args,\n      abortSignal: abortController.signal,\n    }).then(resolve, reject)\n  })\n\n  // Wait for the result promise to resolve or reject\n  await resultPromise.catch(() => {})\n\n  // Give Discovery time to cleanup\n  await Promise.race([\n    new Promise(resolve => setTimeout(resolve, 1000)),\n    discoveryPromise,\n  ]).catch(() => {})\n\n  // Ensure the abort signal is propagated to all candidates on completion\n  abortController.abort()\n\n  // Return the result\n  return resultPromise\n}\n"
  },
  {
    "path": "packages/fcl/src/discovery/rpc/client.ts",
    "content": "import {RpcClient} from \"@onflow/util-rpc\"\nimport {DiscoveryRpc, FclRequest} from \"./requests\"\nimport {execServiceHandlerFactory} from \"./handlers/exec-service\"\nimport {wcRequestHandlerFactory} from \"./handlers/request-wc-qr\"\n\n// Initialize the discovery RPC client\nexport function createDiscoveryRpcClient({\n  onExecResult,\n  body,\n  opts,\n  args,\n  abortSignal,\n}: {\n  onExecResult: (result: any) => void\n  body: any\n  opts: any\n  args: any\n  abortSignal: AbortSignal\n}) {\n  const rpc: DiscoveryRpc = new RpcClient({\n    notifications: [],\n  })\n\n  rpc.on(\n    FclRequest.REQUEST_WALLETCONNECT_QRCODE,\n    wcRequestHandlerFactory({\n      network: opts.config.client.network,\n      rpc,\n      onExecResult,\n      authnBody: body,\n      abortSignal,\n    })\n  )\n  rpc.on(\n    FclRequest.EXEC_SERVICE,\n    execServiceHandlerFactory({\n      onExecResult,\n      execStrategyOpts: opts,\n      execStrategyArgs: args,\n      abortSignal,\n    })\n  )\n\n  return {\n    connect: rpc.connect.bind(rpc),\n    receive: rpc.receive.bind(rpc),\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/discovery/rpc/handlers/exec-service.ts",
    "content": "import {execStrategy, normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {Service} from \"@onflow/typedefs\"\n\nconst APPROVED = \"APPROVED\"\n\n// RPC handler for handling service execution requests (e.g extension service)\nexport const execServiceHandlerFactory =\n  ({\n    onExecResult,\n    execStrategyOpts,\n    execStrategyArgs,\n    abortSignal,\n  }: {\n    onExecResult: (result: any) => void\n    execStrategyOpts: any\n    execStrategyArgs: any\n    abortSignal: AbortSignal\n  }) =>\n  async ({service}: {service: Service}) => {\n    try {\n      const result = await (execStrategy as any)(\n        {\n          ...execStrategyOpts,\n          service,\n          config: execStrategyOpts.config,\n          abortSignal,\n        },\n        // Pass the rest of the arguments (protect against future changes)\n        ...execStrategyArgs.slice(1)\n      )\n\n      const status = normalizePollingResponse(result)?.status || APPROVED\n      if (status === APPROVED) {\n        // Propogrates the result to the execStrategy hook\n        onExecResult(result)\n\n        // Notify Discovery that the service was approved\n        return null\n      } else {\n        // Notify Discovery that the service was rejected\n        throw new Error(result?.reason || \"Service was declined\")\n      }\n    } catch (e: any) {\n      throw new Error(e?.message || \"Service execution failed\")\n    }\n  }\n"
  },
  {
    "path": "packages/fcl/src/discovery/rpc/handlers/request-wc-qr.ts",
    "content": "import {\n  createSessionProposal,\n  FLOW_METHODS,\n  getProvider,\n  request as wcRequest,\n} from \"@onflow/fcl-wc\"\nimport {DiscoveryNotification, DiscoveryRpc} from \"../requests\"\n\n// RPC handler for handling WalletConnect QR code requests\nexport const wcRequestHandlerFactory = ({\n  rpc,\n  network,\n  onExecResult,\n  authnBody,\n  abortSignal,\n}: {\n  rpc: DiscoveryRpc\n  network: string\n  onExecResult: (result: any) => void\n  authnBody: any\n  abortSignal: AbortSignal\n}) => {\n  const watchQr = watchQrFactory({\n    rpc,\n    authnBody,\n  })\n\n  return async ({}) => {\n    if (abortSignal.aborted) {\n      throw new Error(\"Handler has been terminated\")\n    }\n\n    const provider = await getProvider()\n\n    // Execute WC bypass if session is approved\n    const {uri, approval} = await createSessionProposal({\n      provider,\n      network,\n    })\n\n    // Watch for QR code connection asynchronously\n    watchQr({\n      uri,\n      approval,\n      onExecResult,\n    })\n\n    return {uri}\n  }\n}\n\nexport function watchQrFactory({\n  rpc,\n  authnBody,\n}: {\n  rpc: DiscoveryRpc\n  authnBody: any\n}) {\n  return ({\n    uri,\n    approval,\n    onExecResult,\n  }: {\n    uri: string\n    onExecResult: (result: any) => void\n    approval: any\n  }) => {\n    // Watch for QR code connection & resolve callback if connected\n    setTimeout(async () => {\n      try {\n        const provider = await getProvider()\n        const session = await approval()\n        rpc.notify(DiscoveryNotification.NOTIFY_QRCODE_CONNECTING, {\n          uri,\n        })\n\n        const result = await wcRequest({\n          method: FLOW_METHODS.FLOW_AUTHN,\n          body: authnBody,\n          session,\n          provider,\n        })\n\n        rpc.notify(DiscoveryNotification.NOTIFY_QRCODE_CONNECTED, {\n          uri,\n        })\n        onExecResult(result)\n      } catch (e: any) {\n        rpc.notify(DiscoveryNotification.NOTIFY_QRCODE_ERROR, {\n          uri,\n          error: e?.message,\n        })\n      }\n    }, 0)\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/discovery/rpc/requests.ts",
    "content": "import {RpcClient, RpcNotification} from \"@onflow/util-rpc\"\n\nexport type DiscoveryRpc = RpcClient<{}, DiscoveryNotifications>\n\nexport enum DiscoveryNotification {\n  NOTIFY_QRCODE_CONNECTING = \"notifyQrCodeConnecting\",\n  NOTIFY_QRCODE_CONNECTED = \"notifyQrCodeConnected\",\n  NOTIFY_QRCODE_ERROR = \"notifyQrCodeError\",\n}\n\nexport enum FclRequest {\n  REQUEST_WALLETCONNECT_QRCODE = \"requestWalletConnectQrCode\",\n  EXEC_SERVICE = \"execService\",\n}\n\nexport type DiscoveryNotifications = {\n  [DiscoveryNotification.NOTIFY_QRCODE_CONNECTING]: RpcNotification<{\n    uri: string\n  }>\n  [DiscoveryNotification.NOTIFY_QRCODE_CONNECTED]: RpcNotification<{\n    uri: string\n  }>\n  [DiscoveryNotification.NOTIFY_QRCODE_ERROR]: RpcNotification<{\n    uri: string\n    error: string\n  }>\n}\n"
  },
  {
    "path": "packages/fcl/src/fcl.ts",
    "content": "export {\n  VERSION,\n  query,\n  queryRaw,\n  verifyUserSignatures,\n  serialize,\n  tx,\n  events,\n  pluginRegistry,\n  discovery,\n  t,\n  WalletUtils,\n  AppUtils,\n  InteractionTemplateUtils,\n  getChainId,\n  TestUtils,\n  config,\n  flowMainnet,\n  flowTestnet,\n  flowEmulator,\n  send,\n  decode,\n  account,\n  block,\n  isOk,\n  isBad,\n  why,\n  pipe,\n  build,\n  withPrefix,\n  sansPrefix,\n  display,\n  cadence,\n  cdc,\n  createSignableVoucher,\n  voucherIntercept,\n  voucherToTxId,\n  transaction,\n  script,\n  ping,\n  atBlockHeight,\n  atBlockId,\n  getAccount,\n  getEvents,\n  getEventsAtBlockHeightRange,\n  getEventsAtBlockIds,\n  getBlock,\n  getBlockHeader,\n  getCollection,\n  getTransactionStatus,\n  getTransaction,\n  getNetworkParameters,\n  getNodeVersionInfo,\n  authorizations,\n  authorization,\n  args,\n  arg,\n  proposer,\n  payer,\n  limit,\n  ref,\n  params,\n  param,\n  validator,\n  invariant,\n  subscribeEvents,\n  nodeVersionInfo,\n  TransactionError,\n} from \"@onflow/fcl-core\"\n\nimport {\n  getMutate,\n  getCurrentUser,\n  initServiceRegistry,\n  StorageProvider,\n} from \"@onflow/fcl-core\"\nimport {discoveryOpts} from \"./client\"\n\n/**\n * @description The main current user service for managing user authentication and authorization in Flow applications.\n * This service provides a complete interface for wallet connections, user sessions, transaction signing, and user data management.\n * It handles the complexity of connecting to various FCL-compatible wallets, managing authentication state, and providing\n * authorization functions for transaction signing.\n *\n * The currentUser service is configured for web platforms and uses the browser's localStorage by default for session persistence.\n * It integrates with Flow's discovery service to enable wallet selection and supports both authentication and re-authentication flows.\n *\n * This service is reactive and provides subscription capabilities to monitor authentication state changes in real-time.\n * All wallet interactions are handled through FCL's standardized protocols, ensuring compatibility with the Flow ecosystem.\n *\n * Returns an object with the following methods:\n * ```typescript\n * {\n *   authenticate,        // Authenticates the user via FCL-compatible wallets\n *   unauthenticate,      // Logs out the current user and clears session data\n *   authorization,       // Produces authorization details for transaction signing\n *   signUserMessage,     // Signs arbitrary messages with the user's wallet\n *   subscribe,           // Subscribes to authentication state changes\n *   snapshot,            // Returns the current user object snapshot\n *   resolveArgument      // Resolves the current user as a transaction argument\n * }\n * ```\n *\n * @returns A CurrentUserService object\n *\n * @example\n * // Basic authentication flow\n * import * as fcl from \"@onflow/fcl\"\n *\n * // Configure FCL\n * fcl.config({\n *   \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n *   \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n *   \"flow.network\": \"testnet\"\n * })\n *\n * // Authenticate user\n * const user = await fcl.currentUser.authenticate()\n * console.log(\"User authenticated:\", user.addr)\n *\n * // Check authentication status\n * const currentUser = await fcl.currentUser.snapshot()\n * if (currentUser.loggedIn) {\n *   console.log(\"User is logged in:\", currentUser.addr)\n * }\n *\n * // Subscribe to authentication state changes\n * import * as fcl from \"@onflow/fcl\"\n *\n * const unsubscribe = fcl.currentUser.subscribe((user) => {\n *   if (user.loggedIn) {\n *     console.log(\"User logged in:\", user.addr)\n *     document.getElementById(\"login-btn\").style.display = \"none\"\n *     document.getElementById(\"logout-btn\").style.display = \"block\"\n *   } else {\n *     console.log(\"User logged out\")\n *     document.getElementById(\"login-btn\").style.display = \"block\"\n *     document.getElementById(\"logout-btn\").style.display = \"none\"\n *   }\n * })\n * // Clean up subscription when component unmounts\n * window.addEventListener(\"beforeunload\", () => unsubscribe())\n */\nexport const currentUser = getCurrentUser({\n  platform: \"web\",\n  discovery: discoveryOpts,\n  getStorageProvider: async () => {\n    return (\n      (await config.get<StorageProvider | null>(\"fcl.storage\")) || LOCAL_STORAGE\n    )\n  },\n})\n\n/**\n * @description A transaction execution function that allows you to submit Cadence transactions to the Flow blockchain\n * to mutate on-chain state. This function handles the complete transaction lifecycle including building, signing, and\n * sending transactions to Flow. It provides a high-level interface that abstracts the complexity of transaction\n * construction while offering flexibility for advanced use cases.\n *\n * The mutate function automatically handles authorization using the current authenticated user by default, but allows\n * for custom authorization functions to be specified for different transaction roles (proposer, payer, authorizer).\n * It supports both simple single-party transactions and complex multi-party transactions with different signatories.\n *\n * This function integrates with FCL's address replacement system, allowing you to use placeholder addresses in your\n * Cadence code that are replaced with actual addresses at execution time. It also supports Interaction Templates\n * for standardized transaction execution patterns.\n *\n * The mutate function accepts a configuration object with the following structure:\n * ```typescript\n * {\n *   cadence?: string,                    // The Cadence transaction code to execute (required if template not provided)\n *   args?: Function,                     // Function that returns an array of arguments for the transaction\n *   template?: any,                      // Interaction Template object or URL for standardized transactions\n *   limit?: number,                      // Compute (gas) limit for the transaction execution\n *   authz?: AccountAuthorization,        // Authorization function for all signatory roles (proposer, payer, authorizer)\n *   proposer?: AccountAuthorization,     // Specific authorization function for the proposer role\n *   payer?: AccountAuthorization,        // Specific authorization function for the payer role\n *   authorizations?: AccountAuthorization[]  // Array of authorization functions for authorizer roles\n * }\n * ```\n *\n * @param opts Transaction configuration options\n *\n * @returns Promise that resolves to the transaction ID (txId) when the transaction is submitted\n *\n * @throws Throws an error if transaction validation fails, required configuration is missing,\n * or transaction execution encounters an error\n *\n * @example\n * // Basic transaction submission\n * import * as fcl from \"@onflow/fcl\"\n *\n * // Configure FCL first\n * fcl.config({\n *   \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n *   \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n *   \"flow.network\": \"testnet\"\n * })\n *\n * // Authenticate user\n * await fcl.authenticate()\n *\n * // Submit a basic transaction\n * const txId = await fcl.mutate({\n *   cadence: `\n *     transaction(message: String) {\n *       prepare(account: AuthAccount) {\n *         log(\"Transaction executed by: \".concat(account.address.toString()))\n *         log(\"Message: \".concat(message))\n *       }\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(\"Hello Flow!\", t.String)\n *   ],\n *   limit: 50\n * })\n *\n * console.log(\"Transaction submitted:\", txId)\n */\nexport const mutate = getMutate(currentUser)\n\n/**\n * @description Calling this method will authenticate the current user via any wallet that supports FCL. Once called, FCL will initiate communication with the configured `discovery.wallet` endpoint which lets the user select a wallet to authenticate with. Once the wallet provider has authenticated the user, FCL will set the values on the current user object for future use and authorization.\n *\n * This method can only be used in web browsers.\n *\n * `discovery.wallet` value must be set in the configuration before calling this method. See FCL Configuration.\n *\n * The default discovery endpoint will open an iframe overlay to let the user choose a supported wallet.\n *\n * `authenticate` can also take a service returned from discovery with `fcl.authenticate({ service })`.\n *\n * @param opts Authentication options\n * @param opts.service Optional service to use for authentication. A service returned from discovery can be passed here.\n * @param opts.redir Optional redirect flag. Defaults to false.\n * @param opts.forceReauth Optional force re-authentication flag. Defaults to false.\n * @returns Promise that resolves to the authenticated CurrentUser object or undefined\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * fcl\n *   .config()\n *   .put('accessNode.api', 'https://rest-testnet.onflow.org')\n *   .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn');\n * // anywhere on the page\n * fcl.authenticate();\n */\nexport const authenticate = (opts = {}) => currentUser().authenticate(opts)\n\n/**\n * @description Logs out the current user and sets the values on the current user object to null.\n *\n * This method can only be used in web browsers.\n *\n * The current user must be authenticated first.\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * fcl.config().put('accessNode.api', 'https://rest-testnet.onflow.org');\n * // first authenticate to set current user\n * fcl.authenticate();\n * // ... somewhere else & sometime later\n * fcl.unauthenticate();\n * // fcl.currentUser.loggedIn === null\n */\nexport const unauthenticate = () => currentUser().unauthenticate()\n\n/**\n * @description A convenience method that calls `fcl.unauthenticate()` and then `fcl.authenticate()` for the current user.\n *\n * This method can only be used in web browsers.\n *\n * The current user must be authenticated first.\n *\n * @param opts Authentication options passed to authenticate method\n * @param opts.service Optional service to use for authentication\n * @param opts.redir Optional redirect flag. Defaults to false.\n * @param opts.forceReauth Optional force re-authentication flag. Defaults to false.\n * @returns Promise that resolves to the authenticated CurrentUser object or undefined\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * // first authenticate to set current user\n * fcl.authenticate();\n * // ... somewhere else & sometime later\n * fcl.reauthenticate();\n * // logs out user and opens up login/sign-up flow\n */\nexport const reauthenticate = (opts = {}) => {\n  currentUser().unauthenticate()\n  return currentUser().authenticate(opts)\n}\n\n/**\n * @description A convenience method that calls and is equivalent to `fcl.authenticate()`.\n *\n * This method can only be used in web browsers.\n *\n * @param opts Authentication options passed to authenticate method\n * @param opts.service Optional service to use for authentication\n * @param opts.redir Optional redirect flag. Defaults to false.\n * @param opts.forceReauth Optional force re-authentication flag. Defaults to false.\n * @returns Promise that resolves to the authenticated CurrentUser object or undefined\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * fcl.config()\n *   .put('accessNode.api', 'https://rest-testnet.onflow.org')\n *   .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn');\n *\n * // User clicks sign up button\n * fcl.signUp();\n */\nexport const signUp = (opts = {}) => currentUser().authenticate(opts)\n\n/**\n * @description A convenience method that calls and is equivalent to `fcl.authenticate()`.\n *\n * This method can only be used in web browsers.\n *\n * @param opts Authentication options passed to authenticate method\n * @param opts.service Optional service to use for authentication\n * @param opts.redir Optional redirect flag. Defaults to false.\n * @param opts.forceReauth Optional force re-authentication flag. Defaults to false.\n * @returns Promise that resolves to the authenticated CurrentUser object or undefined\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * fcl.config()\n *   .put('accessNode.api', 'https://rest-testnet.onflow.org')\n *   .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn');\n *\n * // User clicks log in button\n * fcl.logIn();\n */\nexport const logIn = (opts = {}) => currentUser().authenticate(opts)\n\n/**\n * @description A convenience method that produces the needed authorization details for the current user to submit transactions to Flow. It defines a signing function that connects to a user's wallet provider to produce signatures to submit transactions.\n *\n * You can replace this function with your own authorization function if needed.\n *\n * @returns An object containing the necessary details from the current user to authorize a transaction in any role.\n *\n * @example\n * import * as fcl from '@onflow/fcl';\n * // login somewhere before\n * fcl.authenticate();\n * // once logged in authz will produce values\n * console.log(fcl.authz);\n * // prints {addr, signingFunction, keyId, sequenceNum} from the current authenticated user.\n *\n * const txId = await fcl.mutate({\n *   cadence: `\n *     import Profile from 0xba1132bc08f82fe2\n *\n *     transaction(name: String) {\n *       prepare(account: auth(BorrowValue) &Account) {\n *         account.storage.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n *       }\n *     }\n *   `,\n *   args: (arg, t) => [arg('myName', t.String)],\n *   proposer: fcl.authz, // optional - default is fcl.authz\n *   payer: fcl.authz, // optional - default is fcl.authz\n *   authorizations: [fcl.authz], // optional - default is [fcl.authz]\n * });\n *\n * @note The default values for `proposer`, `payer`, and `authorizations` are already `fcl.authz` so there is no need to include these parameters, it is shown only for example purposes.\n */\nexport const authz = currentUser().authorization\n\nimport {config} from \"@onflow/config\"\nimport {getDefaultConfig, coreStrategies, LOCAL_STORAGE} from \"./utils/web\"\nimport {initFclWcLoader} from \"./utils/walletconnect/loader\"\n\nconfig(getDefaultConfig())\n\ninitServiceRegistry({coreStrategies})\n\n// Automatically load fcl-wc plugin\n// Based on the user's config\ninitFclWcLoader()\n\nexport {LOCAL_STORAGE, SESSION_STORAGE} from \"./utils/web\"\n\n// Subscriptions\nexport {subscribe, subscribeRaw} from \"@onflow/fcl-core\"\n\nexport * from \"@onflow/typedefs\"\n\nexport {createFlowClient, type FlowClientConfig} from \"./client\"\n"
  },
  {
    "path": "packages/fcl/src/utils/async.ts",
    "content": "const AbortController =\n  globalThis.AbortController || require(\"abort-controller\")\n\nexport function wrapAbortSignal(signal?: AbortSignal) {\n  const controller = new AbortController()\n  if (signal?.aborted) controller.abort()\n  signal?.addEventListener(\"abort\", () => controller.abort())\n  return controller\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/walletconnect/loader.ts",
    "content": "import {config, type config as _config} from \"@onflow/config\"\nimport {pluginRegistry} from \"@onflow/fcl-core\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport * as fclWc from \"@onflow/fcl-wc\"\nimport {CoreTypes} from \"@walletconnect/types\"\n\nexport const isServer = typeof window === \"undefined\"\n\nconst getMetadata = (config: {\n  appDetailTitle?: string | null\n  appDetailIcon?: string | null\n  appDetailDescription?: string | null\n  appDetailUrl?: string | null\n}): CoreTypes.Metadata => {\n  const appTitle = config.appDetailTitle\n  const appIcon = config.appDetailIcon\n  const appDescription = config.appDetailDescription\n  const appUrl = config.appDetailUrl\n\n  return {\n    name: appTitle ?? document.title,\n    description: appDescription ?? \"\",\n    url: appUrl ?? window.location.origin,\n    icons: appIcon ? [appIcon] : [],\n  }\n}\n\n// Use previous configuration to check for changes & notify the user that this is not possible\nlet lastConfig: string | null = null\n\n// Only the first configuration will be used\nlet hasLoaded = false\n\nexport function initFclWcLoader() {\n  config.subscribe(async (fullConfig: any) => {\n    const wcConfig = {\n      walletConnectProjectId: fullConfig[\"walletconnect.projectId\"],\n      walletConnectDisableNotifications:\n        fullConfig[\"walletconnect.disableNotifications\"],\n      appDetailTitle: fullConfig[\"app.detail.title\"],\n      appDetailIcon: fullConfig[\"app.detail.icon\"],\n      appDetailDescription: fullConfig[\"app.detail.description\"],\n      appDetailUrl: fullConfig[\"app.detail.url\"],\n    }\n    loadFclWc(wcConfig)\n  })\n}\n\nexport function loadFclWc(wcConfig: {\n  walletConnectProjectId?: string | null\n  walletConnectDisableNotifications?: boolean | null\n  appDetailTitle?: string | null\n  appDetailIcon?: string | null\n  appDetailDescription?: string | null\n  appDetailUrl?: string | null\n}) {\n  // We cannot load WalletConnect plugin on server side\n  if (isServer) {\n    return\n  }\n\n  const projectId: string | undefined | null = wcConfig.walletConnectProjectId\n  const disableNotifications: boolean | undefined | null =\n    wcConfig.walletConnectDisableNotifications\n\n  // Check if the plugin is already loaded by this loader, but with different configuration\n  // The plugin can only be loaded once\n  const previousConfig = lastConfig\n  lastConfig = JSON.stringify(wcConfig, null, 2)\n  if (hasLoaded) {\n    if (previousConfig !== lastConfig) {\n      console.warn(\n        `FCL WalletConnect Plugin has been already loaded with different configuration. It is not possible to change the configuration after the plugin has been loaded.\n\nPrevious configuration:\n${previousConfig}\n\nCurrent configuration:\n${lastConfig}`\n      )\n    }\n    return\n  }\n\n  // If the configuration is not set, we do not load the plugin\n  const isConfigured = !!projectId\n  if (!isConfigured) {\n    return\n  }\n\n  invariant(\n    !!projectId,\n    \"FCL Configuration value for 'walletconnect.projectId' is required\"\n  )\n\n  // Check if the plugin is already loaded manually\n  // Usually this won't happen as it is more likely that the plugin will be loaded by this loader\n  // before the developer has a chance to load it manually, but it's good to check\n  if (pluginRegistry.getPlugins().has(fclWc.SERVICE_PLUGIN_NAME)) {\n    if (!hasLoaded) {\n      console.warn(\n        \"It seems like the FCL WalletConnect plugins has been already loaded manually. This is no longer necessary, please see the documentation for more information.\"\n      )\n    }\n    hasLoaded = true\n    return\n  }\n  hasLoaded = true\n\n  // Load the plugin if not already loaded\n  // We must lazy load the plugin to avoid race conditions\n  // where the developer attempts to use the plugin before\n  // our loader applies the configuration\n  const {providerPromise: _clientPromise, FclWcServicePlugin} = fclWc.initLazy({\n    projectId,\n    metadata: getMetadata(wcConfig),\n    disableNotifications: disableNotifications ?? undefined,\n  })\n  pluginRegistry.add([FclWcServicePlugin])\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/__tests__/default-config.test.js",
    "content": "import {getDefaultConfig} from \"../default-config\"\n\ndescribe(\"getDefaultConfig tests\", () => {\n  it(\"should return default config\", () => {\n    const defaultConfig = getDefaultConfig()\n    expect(defaultConfig[\"discovery.wallet.method.default\"]).toBe(\"IFRAME/RPC\")\n  })\n})\n"
  },
  {
    "path": "packages/fcl/src/utils/web/coreStrategies.js",
    "content": "import {CORE_STRATEGIES, getExecHttpPost} from \"@onflow/fcl-core\"\nimport {execIframeRPC} from \"./strategies/iframe-rpc\"\nimport {execPopRPC} from \"./strategies/pop-rpc\"\nimport {execTabRPC} from \"./strategies/tab-rpc\"\nimport {execExtRPC} from \"./strategies/ext-rpc\"\nimport {execLocal} from \"./exec-local\"\n\nexport const coreStrategies = {\n  [CORE_STRATEGIES[\"HTTP/RPC\"]]: getExecHttpPost(execLocal),\n  [CORE_STRATEGIES[\"HTTP/POST\"]]: getExecHttpPost(execLocal),\n  [CORE_STRATEGIES[\"IFRAME/RPC\"]]: execIframeRPC,\n  [CORE_STRATEGIES[\"POP/RPC\"]]: execPopRPC,\n  [CORE_STRATEGIES[\"TAB/RPC\"]]: execTabRPC,\n  [CORE_STRATEGIES[\"EXT/RPC\"]]: execExtRPC,\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/default-config.js",
    "content": "export const getDefaultConfig = () => {\n  return {\n    \"discovery.wallet.method.default\": \"IFRAME/RPC\",\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/exec-local.js",
    "content": "import {renderFrame} from \"./render-frame\"\nimport {renderPop} from \"./render-pop\"\nimport {renderTab} from \"./render-tab\"\n\nconst NOT_IMPLEMENTED = () => {\n  throw new Error(\"Strategy util has not been implemented on this platform\")\n}\n\nconst VIEWS = {\n  \"VIEW/IFRAME\": renderFrame,\n  \"VIEW/POP\": renderPop,\n  \"VIEW/TAB\": renderTab,\n  \"VIEW/MOBILE_BROWSER\": NOT_IMPLEMENTED,\n  \"VIEW/DEEPLINK\": NOT_IMPLEMENTED,\n}\n\nexport async function execLocal(service, opts = {serviceEndpoint: () => {}}) {\n  const {serviceEndpoint} = opts\n  try {\n    return VIEWS[service.method](serviceEndpoint(service), opts)\n  } catch (error) {\n    console.error(\"execLocal({service, opts = {}})\", error, {service, opts})\n    throw error\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/index.js",
    "content": "export {renderFrame} from \"./render-frame\"\nexport {renderPop} from \"./render-pop\"\nexport {renderTab} from \"./render-tab\"\nexport {getDefaultConfig} from \"./default-config\"\nexport {coreStrategies} from \"./coreStrategies\"\nexport {LOCAL_STORAGE, SESSION_STORAGE} from \"./storage\"\n"
  },
  {
    "path": "packages/fcl/src/utils/web/render-frame.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\n\nconst FRAME = \"FCL_IFRAME\"\n\nconst FRAME_STYLES = `\n  position:fixed;\n  top: 0px;\n  right: 0px;\n  bottom: 0px;\n  left: 0px;\n  height: 100%;\n  width: 100vw;\n  display:block;\n  background:rgba(0,0,0,0.25);\n  z-index: 2147483647;\n  box-sizing: border-box;\n  color-scheme: light;\n`\n\nexport function renderFrame(src) {\n  invariant(\n    !document.getElementById(FRAME),\n    \"Attempt at triggering multiple Frames\",\n    {src}\n  )\n\n  const $frame = document.createElement(\"iframe\")\n  $frame.src = src\n  $frame.id = FRAME\n  $frame.allow = \"usb *; hid *; clipboard-write\"\n  $frame.frameBorder = \"0\"\n  $frame.style.cssText = FRAME_STYLES\n  document.body.append($frame)\n\n  const unmount = () => {\n    if (document.getElementById(FRAME)) {\n      document.getElementById(FRAME).remove()\n    }\n  }\n\n  return [$frame.contentWindow, unmount]\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/render-pop.js",
    "content": "const POP = \"FCL_POP\"\n\nlet popup = null\nlet previousUrl = null\n\nfunction popupWindow(url, windowName, win, w, h) {\n  const y = win.top.outerHeight / 2 + win.top.screenY - h / 2\n  const x = win.top.outerWidth / 2 + win.top.screenX - w / 2\n  const popup = win.open(\n    url,\n    windowName,\n    `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${w}, height=${h}, top=${y}, left=${x}`\n  )\n  if (!popup)\n    throw new Error(\"Popup failed to open (was it blocked by a popup blocker?)\")\n  return popup\n}\n\nexport function renderPop(src) {\n  if (popup == null || popup?.closed) {\n    popup = popupWindow(src, POP, window, 640, 770)\n  } else if (previousUrl !== src) {\n    popup.location.replace(src)\n    popup.focus()\n  } else {\n    popup.focus()\n  }\n\n  previousUrl = src\n\n  const unmount = () => {\n    if (popup && !popup.closed) {\n      popup.close()\n    }\n    popup = null\n  }\n\n  return [popup, unmount]\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/render-tab.js",
    "content": "const TAB = \"FCL_TAB\"\n\nlet tab = null\nlet previousUrl = null\n\nexport function renderTab(src) {\n  if (tab == null || tab?.closed) {\n    tab = window.open(src, \"_blank\")\n    if (!tab)\n      throw new Error(\"Tab failed to open (was it blocked by the browser?)\")\n  } else if (previousUrl !== src) {\n    tab.location.replace(src)\n    tab.focus()\n  } else {\n    tab.focus()\n  }\n\n  previousUrl = src\n\n  const unmount = () => {\n    if (tab && !tab.closed) {\n      tab.close()\n    }\n    tab = null\n  }\n\n  return [tab, unmount]\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/storage.ts",
    "content": "import {StorageProvider} from \"@onflow/fcl-core\"\n\nconst isServerSide = () => typeof window === \"undefined\"\nconst safeParseJSON = (str?: string | null) => {\n  if (str == null) return null\n  try {\n    return JSON.parse(str)\n  } catch (error) {\n    return null\n  }\n}\n\nexport const SESSION_STORAGE = {\n  can: !isServerSide() && !!window.sessionStorage,\n  get: async (key: string) => safeParseJSON(sessionStorage.getItem(key)),\n  put: async (key: string, value: any) =>\n    sessionStorage.setItem(key, JSON.stringify(value)),\n} as StorageProvider\n\nexport const LOCAL_STORAGE = {\n  can: !isServerSide() && !!window.localStorage,\n  get: async (key: string) => safeParseJSON(localStorage.getItem(key)),\n  put: async (key: string, value: any) =>\n    localStorage.setItem(key, JSON.stringify(value)),\n} as StorageProvider\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/ext-rpc.js",
    "content": "import {extension} from \"./utils/extension\"\nimport {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {VERSION} from \"../../../VERSION\"\n\nexport function execExtRPC({\n  service,\n  body,\n  config,\n  abortSignal,\n  customRpc,\n  opts,\n}) {\n  return new Promise((resolve, reject) => {\n    const {close} = extension(service, {\n      async onReady(_, {send}) {\n        try {\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:VIEW:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n          })\n\n          customRpc?.connect({\n            send: msg => {\n              send({\n                type: \"FCL:VIEW:CUSTOM_RPC\",\n                body: msg,\n              })\n            },\n          })\n        } catch (error) {\n          throw error\n        }\n      },\n\n      onResponse(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          const resp = normalizePollingResponse(e.data)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execExtRPC onResponse error\", error)\n          throw error\n        }\n      },\n\n      onClose() {\n        reject(`Declined: Externally Halted`)\n      },\n\n      onCustomRpc(msg) {\n        customRpc?.receive(msg)\n      },\n    })\n\n    if (abortSignal) {\n      if (abortSignal.aborted) {\n        close()\n        reject(`Declined: Aborted`)\n      }\n      abortSignal.addEventListener(\"abort\", () => {\n        close()\n        reject(`Declined: Aborted`)\n      })\n    }\n  })\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/iframe-rpc.js",
    "content": "import {uid} from \"@onflow/util-uid\"\nimport {frame} from \"./utils/frame\"\nimport {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {VERSION} from \"../../../VERSION\"\n\nexport function execIframeRPC({\n  service,\n  body,\n  config,\n  customRpc,\n  abortSignal,\n  opts,\n}) {\n  return new Promise((resolve, reject) => {\n    const id = uid()\n    const includeOlderJsonRpcCall = opts.includeOlderJsonRpcCall\n\n    const {close} = frame(service, {\n      async onReady(_, {send}) {\n        try {\n          send({\n            type: \"FCL:VIEW:READY:RESPONSE\",\n            fclVersion: VERSION,\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n          })\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:FRAME:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n            deprecated: {\n              message:\n                \"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE\",\n            },\n          })\n          if (includeOlderJsonRpcCall) {\n            send({\n              jsonrpc: \"2.0\",\n              id: id,\n              method: \"fcl:sign\",\n              params: [body, service.params],\n              deprecated: {\n                message:\n                  \"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE\",\n              },\n            })\n          }\n\n          customRpc?.connect({\n            send: msg => {\n              send({\n                type: \"FCL:VIEW:CUSTOM_RPC\",\n                payload: msg,\n              })\n            },\n          })\n        } catch (error) {\n          throw error\n        }\n      },\n\n      onResponse(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          const resp = normalizePollingResponse(e.data)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execIframeRPC onResponse error\", error)\n          throw error\n        }\n      },\n\n      onMessage(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          if (e.data.jsonrpc !== \"2.0\") return\n          if (e.data.id !== id) return\n          const resp = normalizePollingResponse(e.data.result)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execIframeRPC onMessage error\", error)\n          throw error\n        }\n      },\n\n      onClose() {\n        reject(`Declined: Externally Halted`)\n      },\n\n      onCustomRpc(msg) {\n        customRpc?.receive(msg)\n      },\n    })\n\n    if (abortSignal) {\n      if (abortSignal.aborted) {\n        reject(`Declined: Aborted`)\n        close()\n      }\n      abortSignal.addEventListener(\"abort\", () => {\n        reject(`Declined: Aborted`)\n        close()\n      })\n    }\n  })\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/pop-rpc.js",
    "content": "import {uid} from \"@onflow/util-uid\"\nimport {pop} from \"./utils/pop\"\nimport {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {VERSION} from \"../../../VERSION\"\n\nexport function execPopRPC({\n  service,\n  body,\n  config,\n  abortSignal,\n  customRpc,\n  opts,\n}) {\n  return new Promise((resolve, reject) => {\n    const id = uid()\n    const {redir, includeOlderJsonRpcCall} = opts\n\n    const {close} = pop(service, {\n      customRpc,\n      async onReady(_, {send}) {\n        try {\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:VIEW:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n          })\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:FRAME:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n            deprecated: {\n              message:\n                \"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE\",\n            },\n          })\n          if (includeOlderJsonRpcCall) {\n            send({\n              jsonrpc: \"2.0\",\n              id: id,\n              method: \"fcl:sign\",\n              params: [body, service.params],\n            })\n          }\n\n          customRpc?.connect({\n            send: msg => {\n              send({\n                type: \"FCL:VIEW:CUSTOM_RPC\",\n                payload: msg,\n              })\n            },\n          })\n        } catch (error) {\n          throw error\n        }\n      },\n\n      onResponse(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          const resp = normalizePollingResponse(e.data)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              !redir && close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execPopRPC onResponse error\", error)\n          throw error\n        }\n      },\n\n      onMessage(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          if (e.data.jsonrpc !== \"2.0\") return\n          if (e.data.id !== id) return\n          const resp = normalizePollingResponse(e.data.result)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              !redir && close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execPopRPC onMessage error\", error)\n          throw error\n        }\n      },\n\n      onClose() {\n        reject(`Declined: Externally Halted`)\n      },\n\n      onCustomRpc(msg) {\n        customRpc?.receive(msg)\n      },\n    })\n\n    if (abortSignal) {\n      if (abortSignal.aborted) {\n        reject(`Declined: Aborted`)\n        close()\n      }\n      abortSignal.addEventListener(\"abort\", () => {\n        reject(`Declined: Aborted`)\n        close()\n      })\n    }\n  })\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/tab-rpc.js",
    "content": "import {uid} from \"@onflow/util-uid\"\nimport {tab} from \"./utils/tab\"\nimport {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {VERSION} from \"../../../VERSION\"\n\nexport function execTabRPC({\n  service,\n  body,\n  config,\n  abortSignal,\n  customRpc,\n  opts,\n}) {\n  return new Promise((resolve, reject) => {\n    const id = uid()\n    const {redir, includeOlderJsonRpcCall} = opts\n\n    const {close} = tab(service, {\n      customRpc,\n      async onReady(_, {send}) {\n        try {\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:VIEW:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n          })\n          send({\n            fclVersion: VERSION,\n            type: \"FCL:FRAME:READY:RESPONSE\",\n            body,\n            service: {\n              params: service.params,\n              data: service.data,\n              type: service.type,\n            },\n            config,\n            deprecated: {\n              message:\n                \"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE\",\n            },\n          })\n          if (includeOlderJsonRpcCall) {\n            send({\n              jsonrpc: \"2.0\",\n              id: id,\n              method: \"fcl:sign\",\n              params: [body, service.params],\n            })\n          }\n\n          customRpc?.connect({\n            send: msg => {\n              send({\n                type: \"FCL:VIEW:CUSTOM_RPC\",\n                payload: msg,\n              })\n            },\n          })\n        } catch (error) {\n          throw error\n        }\n      },\n\n      onResponse(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          const resp = normalizePollingResponse(e.data)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              !redir && close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execPopRPC onResponse error\", error)\n          throw error\n        }\n      },\n\n      onMessage(e, {close}) {\n        try {\n          if (typeof e.data !== \"object\") return\n          if (e.data.jsonrpc !== \"2.0\") return\n          if (e.data.id !== id) return\n          const resp = normalizePollingResponse(e.data.result)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              !redir && close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          console.error(\"execPopRPC onMessage error\", error)\n          throw error\n        }\n      },\n\n      onClose() {\n        reject(`Declined: Externally Halted`)\n      },\n\n      onCustomRpc(msg) {\n        customRpc?.receive(msg)\n      },\n    })\n\n    if (abortSignal) {\n      if (abortSignal.aborted) {\n        close()\n        reject(`Declined: Aborted`)\n      }\n      abortSignal.addEventListener(\"abort\", () => {\n        close()\n        reject(`Declined: Aborted`)\n      })\n    }\n  })\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/utils/extension.js",
    "content": "import {buildMessageHandler} from \"@onflow/fcl-core\"\n\nconst noop = () => {}\n\nexport function extension(service, opts = {}) {\n  if (service == null) return {send: noop, close: noop}\n\n  const onClose = opts.onClose || noop\n  const onMessage = opts.onMessage || noop\n  const onReady = opts.onReady || noop\n  const onResponse = opts.onResponse || noop\n  const onCustomRpc = opts.onCustomRpc || noop\n\n  const handler = buildMessageHandler({\n    close,\n    send,\n    onReady,\n    onResponse,\n    onMessage,\n    onCustomRpc,\n  })\n  window.addEventListener(\"message\", handler)\n\n  send({service})\n\n  return {send, close}\n\n  function close() {\n    try {\n      window.removeEventListener(\"message\", handler)\n      onClose()\n    } catch (error) {\n      console.error(\"Ext Close Error\", error)\n    }\n  }\n\n  function send(msg) {\n    try {\n      window && window.postMessage(JSON.parse(JSON.stringify(msg || {})), \"*\")\n    } catch (error) {\n      console.error(\"Ext Send Error\", msg, error)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/utils/frame.js",
    "content": "import {renderFrame} from \"../../render-frame\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nconst noop = () => {}\n\nexport function frame(service, opts = {}) {\n  if (service == null) return {send: noop, close: noop}\n\n  const onClose = opts.onClose || noop\n  const onMessage = opts.onMessage || noop\n  const onReady = opts.onReady || noop\n  const onResponse = opts.onResponse || noop\n  const onCustomRpc = opts.onCustomRpc || noop\n\n  let $frame, unmount\n  const handler = buildMessageHandler({\n    close,\n    send,\n    onReady,\n    onResponse,\n    onMessage,\n    onCustomRpc,\n    getSource: () => $frame,\n  })\n  window.addEventListener(\"message\", handler)\n  ;[$frame, unmount] = renderFrame(serviceEndpoint(service))\n  return {send, close}\n\n  function close() {\n    try {\n      window.removeEventListener(\"message\", handler)\n      unmount()\n      onClose()\n    } catch (error) {\n      console.error(\"Frame Close Error\", error)\n    }\n  }\n\n  function send(msg) {\n    try {\n      $frame.postMessage(JSON.parse(JSON.stringify(msg || {})), \"*\")\n    } catch (error) {\n      console.error(\"Frame Send Error\", msg, error)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/utils/pop.js",
    "content": "import {renderPop} from \"../../render-pop\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nconst noop = () => {}\n\nexport function pop(service, opts = {}) {\n  if (service == null) return {send: noop, close: noop}\n\n  const onClose = opts.onClose || noop\n  const onMessage = opts.onMessage || noop\n  const onReady = opts.onReady || noop\n  const onResponse = opts.onResponse || noop\n  const onCustomRpc = opts.onCustomRpc || noop\n\n  let $pop, unmount\n  const handler = buildMessageHandler({\n    close,\n    send,\n    onReady,\n    onResponse,\n    onMessage,\n    onCustomRpc,\n    getSource: () => $pop,\n  })\n  window.addEventListener(\"message\", handler)\n  ;[$pop, unmount] = renderPop(serviceEndpoint(service))\n\n  const timer = setInterval(function () {\n    if ($pop && $pop.closed) {\n      close()\n    }\n  }, 500)\n\n  return {send, close}\n\n  function close() {\n    try {\n      window.removeEventListener(\"message\", handler)\n      clearInterval(timer)\n      unmount()\n      onClose()\n    } catch (error) {\n      console.error(\"Popup Close Error\", error)\n    }\n  }\n\n  function send(msg) {\n    try {\n      $pop.postMessage(JSON.parse(JSON.stringify(msg || {})), \"*\")\n    } catch (error) {\n      console.error(\"Popup Send Error\", msg, error)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl/src/utils/web/strategies/utils/tab.js",
    "content": "import {renderTab} from \"../../render-tab\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nconst noop = () => {}\n\nexport function tab(service, opts = {}) {\n  if (service == null) return {send: noop, close: noop}\n\n  const onClose = opts.onClose || noop\n  const onMessage = opts.onMessage || noop\n  const onReady = opts.onReady || noop\n  const onResponse = opts.onResponse || noop\n  const onCustomRpc = opts.onCustomRpc || noop\n\n  let $tab, unmount\n  const handler = buildMessageHandler({\n    close,\n    send,\n    onReady,\n    onResponse,\n    onMessage,\n    onCustomRpc,\n    getSource: () => $tab,\n  })\n  window.addEventListener(\"message\", handler)\n  ;[$tab, unmount] = renderTab(serviceEndpoint(service))\n  const timer = setInterval(function () {\n    if ($tab && $tab.closed) {\n      close()\n    }\n  }, 500)\n\n  return {send, close}\n\n  function close() {\n    try {\n      window.removeEventListener(\"message\", handler)\n      clearInterval(timer)\n      unmount()\n      onClose()\n    } catch (error) {\n      console.error(\"Tab Close Error\", error)\n    }\n  }\n\n  function send(msg) {\n    try {\n      $tab.postMessage(JSON.parse(JSON.stringify(msg || {})), \"*\")\n    } catch (error) {\n      console.error(\"Tab Send Error\", msg, error)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-bundle/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/fcl-bundle/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-bundle/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/fcl-bundle/CHANGELOG.md",
    "content": "# @onflow/fcl-bundle\n\n## 1.7.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.7.0\n\n### Minor Changes\n\n- [#2076](https://github.com/onflow/fcl-js/pull/2076) [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b) Thanks [@jribbink](https://github.com/jribbink)! - Allow usage of subpath imports\n\n- [#2347](https://github.com/onflow/fcl-js/pull/2347) [`eb2bbcb97fb0b92008780422fc7199b0af68fc90`](https://github.com/onflow/fcl-js/commit/eb2bbcb97fb0b92008780422fc7199b0af68fc90) Thanks [@jribbink](https://github.com/jribbink)! - Add rollup-preserve-directive plugin\n\n## 1.6.0\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add `rollup-plugin-postcss` & `@rollup/plugin-image`\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.6.0-alpha.1\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add `rollup-plugin-postcss` & `@rollup/plugin-image`\n\n## 1.5.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.5.0\n\n### Minor Changes\n\n- [#1888](https://github.com/onflow/fcl-js/pull/1888) [`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b) Thanks [@jribbink](https://github.com/jribbink)! - Preserve dynamic import statements in CJS modules\n\n## 1.4.2\n\n### Patch Changes\n\n- [#1848](https://github.com/onflow/fcl-js/pull/1848) [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c) Thanks [@jribbink](https://github.com/jribbink)! - Patch babel vulnerability\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.4.2-alpha.2\n\n### Patch Changes\n\n- [#1848](https://github.com/onflow/fcl-js/pull/1848) [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c) Thanks [@jribbink](https://github.com/jribbink)! - Patch babel vulnerability\n\n## 1.4.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.4.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Switched to rollup-plugin-typescript2\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1707](https://github.com/onflow/fcl-js/pull/1707) [`f7986d9b`](https://github.com/onflow/fcl-js/commit/f7986d9b4e7bba3abc4acbfb036072336d0651cf) Thanks [@nialexsan](https://github.com/nialexsan)! - Deeplink RPC\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n## 1.3.1-alpha.1\n\n### Patch Changes\n\n- [#1707](https://github.com/onflow/fcl-js/pull/1707) [`f7986d9b`](https://github.com/onflow/fcl-js/commit/f7986d9b4e7bba3abc4acbfb036072336d0651cf) Thanks [@nialexsan](https://github.com/nialexsan)! - Deeplink RPC\n\n## 1.3.1-alpha.0\n\n### Patch Changes\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.3.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1359](https://github.com/onflow/fcl-js/pull/1359) [`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6) Thanks [@jribbink](https://github.com/jribbink)! - Automatically compress bundle if entry file ends in .min.js\n\n### Patch Changes\n\n- [#1366](https://github.com/onflow/fcl-js/pull/1366) [`ec6f6a65`](https://github.com/onflow/fcl-js/commit/ec6f6a659eae2157cae3def76fab0eeefccd1c28) Thanks [@jribbink](https://github.com/jribbink)! - Set inlineDynamicImports to true as dynamic imports would cause build to fail\n\n## 1.2.0-alpha.0\n\n### Minor Changes\n\n- [#1359](https://github.com/onflow/fcl-js/pull/1359) [`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6) Thanks [@jribbink](https://github.com/jribbink)! - Automatically compress bundle if entry file ends in .min.js\n\n### Patch Changes\n\n- [#1366](https://github.com/onflow/fcl-js/pull/1366) [`ec6f6a65`](https://github.com/onflow/fcl-js/commit/ec6f6a659eae2157cae3def76fab0eeefccd1c28) Thanks [@jribbink](https://github.com/jribbink)! - Set inlineDynamicImports to true as dynamic imports would cause build to fail\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1328](https://github.com/onflow/fcl-js/pull/1328) [`cc9cf95e`](https://github.com/onflow/fcl-js/commit/cc9cf95ec40b5a97de8b76bbb00e6c3b35ec7b51) Thanks [@jribbink](https://github.com/jribbink)! - Add banner configuration option (see [README.md](/packages/fcl-bundle/README.md) for usage)\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - @onflow/fcl-bundle tool has been created\n\n## 1.0.1-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - @onflow/fcl-bundle tool has been created\n"
  },
  {
    "path": "packages/fcl-bundle/README.md",
    "content": "# FCL-Bundle Overview\nFCL-Bundle is a module bundler used internally by FCL which aims to be low configuration and consistent across the monorepo.  FCL-Bundle uses [rollup](https://rollupjs.org/) and generates cjs, esm, and umd formats of the bundled modules.\n\n## CLI Usage\n\nUsage: `fcl-bundle [options]` \n\nOptions:  \n  -V, --version  output the version number  \n  -w, --watch    Run the build in watch mode  \n  -h, --help     display help for command  \n\n## Configuration\nAll of the configuration for FCL-Bundle currently takes place within the `package.json` of the modules which you wish to bundle.  The following configuration options are available:\n\n| Key    | Required | Value Type | Description                                                                                                                                                                                                                                                                                                                                                                                 |\n|----------|----------|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `source` | Yes      | string     | Specify a source file entry point or an dictionary of [Output Configuration](#output-configuration) objects keyed by respective source files (for multiple builds) - see [Source Configuration](#source-configuration) for more details |\n| `main`   | No       | string     | Specify cjs bundle output path if not manually specified by [Output Configuration](#output-configuration) (as well as cjs entry point if not overridden by `package.exports`)                                                                                                                                     |\n| `module` | No       | string     | Specify esm bundle output path if not manually specified by [Output Configuration](#output-configuration) (as well as esm entry point if not overriden by `package.exports`)                                                                                                                                      |\n| `unpkg`  | No       | string     | Specify umd bundle output path if not manually specified by [Output Configuration](#output-configuration) (as well as umd entry point if not overriden by `package.exports`)                                                                                                                                      |\n\n> **Note:** If output paths end in \".min.js\", the resulting bundle will be minified\n\n\n### Output Configuration\n\nAn Output Configuration object exists with the following properties:\n| Key    | Required | Value Type | Description                                                                                                                |\n|----------|----------|------------|----------------------------------------------------------------------------------------------------------------------------|\n| `cjs`    | No       | string     | Path of the cjs output bundle                                                                                              |\n| `esm`    | No       | string     | Path of the esm output bundle                                                                                              |\n| `umd`    | No       | string     | Path of the umd output bundle                                                                                              |\n| `banner` | No       | string     | Either a string representing a banner to be prepended to all output bundles for this build or a [Banner Configuration](#banner-configuration) object |\n\nAn empty Output Configuration will fallback to the [default outputs](#default-outputs) if none are provided.  However, if at least one output format is provided, the missing outputs will be excluded from the final build.\n\nIn practice, these Output Configuration objects will be consumed as shown in the [Source Configuration](#source-configuration) below.\n\n> **Note:** If output paths end in \".min.js\", the resulting bundle will be minified\n\n### Source Configuration\n\nA source configuration can be provided in one of three ways:\n1. A `string` identifying the path to the entry source file.  Build outputs will be inferred from either the root level `main`, `module`, and `unpkg` fields or from the [default outputs](#default-outputs) if none are provided.\n    ```json\n    {\n      ...\n      \"source\": \"./src/index.js\",\n    }\n    ```\n2. An array of entry source files.  Build outputs will be inferred from the [default outputs](#default-outputs).\n    ```json\n    {\n      ...\n      \"source\": [\n        \"./src/indexA.js\",\n        \"./src/indexB.js\"\n      ]\n    }\n    ```\n\n3. A dictionary of [Output Configuration](#output-configuration) objects keyed by respective source files.\n    ```json\n    {\n      ...\n      \"source\": {\n        \"./src/indexA.js\": {\n          \"cjs\": \"./dist/indexA.js\"\n        },\n        \"./src/indexB.js\": {\n          \"cjs\": \"./dist/indexB.js\",\n          \"esm\": \"./dist/indexB.module.js\"\n        },\n        \"./src/indexC.js\": {\n          \"cjs\": \"./dist/indexC.js\",\n          \"esm\": \"./dist/indexC.module.js\",\n          \"umd\": \"./dist/indexC.umd.js\"\n        }\n      }\n    }\n    ```\n    \n### Default Outputs\n***Note:*** if no output bundles (cjs,esm,umd) are specifified in either the root of package.json (`main`, `module`, `unpkg`) or an Output Configuration object, the bundler will produce the following defaults:\n - `cjs` -> `dist/${basename(entry)}.js`\n - `esm` -> `dist/${basename(entry)}.module.js`\n - `umd` -> `dist/${basename(entry)}.umd.js`\n\n### Banner Configuration\n\n| Key    | Required | Value Type | Description                                                                                                    |\n|----------|----------|------------|----------------------------------------------------------------------------------------------------------------|\n| `banner` | Yes      | string     | Text to be displayed in banner                                                                                 |\n| `raw`    | No       | boolean    | If false, wraps the banner in JS comment, if true no extra formatting is applied to banner **(default false)** |\n\n## Features\n - Replace `PACKAGE_CURRENT_VERSION` in bundled code with the current `version` of the package being bundled from `package.json`\n - Bundles dependencies with UMD builds for use in browser\n - Transpiles output bundles using `@babel/preset-env` and [babel rollup plugin](https://www.npmjs.com/package/@rollup/plugin-babel)\n - PostCSS support for CSS bundling, must include a `postcss.config.js` in the root of the package\n - Images are bundled with the `@rollup/plugin-image` plugin as base64 strings\n - Minification of bundles with `terser` if output paths end in \".min.js\"\n - TypeScript support if entry point is a `.ts` file"
  },
  {
    "path": "packages/fcl-bundle/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-bundle\",\n  \"version\": \"1.7.1\",\n  \"description\": \"FCL Bundler Tool\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"dependencies\": {\n    \"@babel/plugin-transform-runtime\": \"^7.25.7\",\n    \"@babel/preset-env\": \"^7.25.8\",\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@rollup/plugin-babel\": \"^6.0.4\",\n    \"@rollup/plugin-commonjs\": \"^28.0.1\",\n    \"@rollup/plugin-image\": \"^3.0.3\",\n    \"@rollup/plugin-node-resolve\": \"^15.3.0\",\n    \"@rollup/plugin-replace\": \"^6.0.1\",\n    \"@rollup/plugin-terser\": \"^0.4.4\",\n    \"commander\": \"^12.1.0\",\n    \"lodash\": \"^4.17.21\",\n    \"rollup\": \"^4.24.0\",\n    \"rollup-plugin-postcss\": \"^4.0.2\",\n    \"rollup-plugin-typescript2\": \"^0.36.0\",\n    \"rollup-preserve-directives\": \"^1.1.3\"\n  },\n  \"bin\": {\n    \"fcl-bundle\": \"src/cli.js\"\n  },\n  \"optionalDependencies\": {\n    \"@rollup/rollup-linux-x64-gnu\": \"^4.26.0\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/build/build-watch.js",
    "content": "const WatcherPool = require(\"./watcher-pool\")\nconst {watch} = require(\"rollup\")\n\nconst getInputOptions = require(\"./get-input-options\")\nconst getOutputOptions = require(\"./get-output-options\")\n\nmodule.exports = async function buildModulesWatch(builds, package) {\n  const watcherOptionsList = builds.map(build =>\n    getWatcherOptions(build, package)\n  )\n  const watcherPool = new WatcherPool(watcherOptionsList)\n  watcherPool.on(\"event\", handleWatcherEvent)\n\n  function handleWatcherEvent(event) {\n    switch (event.code) {\n      case \"START\":\n        console.log(`Building ${package.name}...`)\n        break\n      case \"BUNDLE_START\":\n        break\n      case \"BUNDLE_END\":\n        break\n      case \"END\":\n        console.log(\"Done!\")\n        break\n    }\n  }\n}\n\nfunction getWatcherOptions(build, package) {\n  const inputOptions = getInputOptions(package, build)\n  const outputOptions = getOutputOptions(package, build)\n  const watcherOptions = {\n    ...inputOptions,\n    output: [outputOptions],\n  }\n\n  return watcherOptions\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/build/build.js",
    "content": "const {rollup} = require(\"rollup\")\n\nconst getInputOptions = require(\"./get-input-options\")\nconst getOutputOptions = require(\"./get-output-options\")\n\nmodule.exports = async function buildModules(builds, package) {\n  console.log(`Building ${package.name}...`)\n  await Promise.all(builds.map(build => buildModule(build, package)))\n  console.log(\"Build Success!\")\n}\n\nasync function buildModule(build, package) {\n  const inputOptions = getInputOptions(package, build)\n  const outputOptions = getOutputOptions(package, build)\n\n  let bundle, buildError\n  try {\n    bundle = await rollup(inputOptions)\n    await generateOutput(bundle, outputOptions)\n  } catch (error) {\n    buildError = error\n  }\n  if (bundle) await bundle.close()\n\n  if (buildError) {\n    throw new Error(buildError)\n  }\n}\n\nasync function generateOutput(bundle, outputOptions) {\n  const {output} = await bundle.write(outputOptions)\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/build/get-input-options.js",
    "content": "const _ = require(\"lodash\")\n\nconst path = require(\"path\")\nconst fs = require(\"fs\")\nconst builtinModules = require(\"node:module\").builtinModules\n\nconst commonjs = require(\"@rollup/plugin-commonjs\")\nconst replace = require(\"@rollup/plugin-replace\")\nconst {nodeResolve} = require(\"@rollup/plugin-node-resolve\")\nconst {babel} = require(\"@rollup/plugin-babel\")\nconst terser = require(\"@rollup/plugin-terser\")\nconst typescript = require(\"rollup-plugin-typescript2\")\nconst postcss = require(\"rollup-plugin-postcss\")\nconst imagePlugin = require(\"@rollup/plugin-image\")\nconst {DEFAULT_EXTENSIONS} = require(\"@babel/core\")\nconst {getPackageRoot} = require(\"../util\")\nconst {preserveDirective} = require(\"rollup-preserve-directives\")\n\nconst SUPPRESSED_WARNING_CODES = [\n  \"MISSING_GLOBAL_NAME\",\n  \"MISSING_NODE_BUILTINS\",\n  \"EVAL\",\n]\n\nmodule.exports = function getInputOptions(package, build) {\n  // ensure that package has the required dependencies\n  if (!package.dependencies[\"@babel/runtime\"]) {\n    throw new Error(\n      `${package.name} is missing required @babel/runtime dependency.  Please add this to the package.json and try again.`\n    )\n  }\n\n  // determine if we are building typescript\n  const source = build.source\n  const isTypeScript = source.endsWith(\".ts\")\n\n  const babelRuntimeVersion = package.dependencies[\"@babel/runtime\"].replace(\n    /^[^0-9]*/,\n    \"\"\n  )\n\n  let external = [/node:.*/]\n    .concat(builtinModules)\n    .concat(Object.keys(package.peerDependencies || {}))\n    .concat(Object.keys(package.dependencies || {}))\n\n  let testExternal = id => {\n    if (build.type !== \"umd\" && /@babel\\/runtime/g.test(id)) return true\n\n    for (let ext of external) {\n      if (ext instanceof RegExp && ext.test(id)) return true\n      if (typeof ext === \"string\" && id.startsWith(ext)) return true\n    }\n\n    return false\n  }\n\n  // exclude peer dependencies\n  const resolveOnly = [\n    new RegExp(\n      `^(?!${Object.keys(package.peerDependencies || {}).join(\"|\")}).*`\n    ),\n  ]\n\n  const extensions = DEFAULT_EXTENSIONS.concat([\n    \".ts\",\n    \".tsx\",\n    \".mts\",\n    \".cts\",\n    \".svg\",\n  ])\n\n  const postcssConfigPath = path.resolve(getPackageRoot(), \"postcss.config.js\")\n\n  let options = {\n    input: build.source,\n    external: testExternal,\n    onwarn: function (message) {\n      if (SUPPRESSED_WARNING_CODES.includes(message.code)) return\n      console.warn(message.toString())\n    },\n    plugins: [\n      preserveDirective(),\n      imagePlugin(),\n      nodeResolve({\n        browser: true,\n        preferBuiltins: build.type !== \"umd\",\n        resolveOnly,\n        extensions,\n      }),\n      fs.existsSync(postcssConfigPath)\n        ? postcss({\n            inject: false,\n            extensions: [\".css\"],\n            minimize: true,\n            config: {\n              path: postcssConfigPath,\n            },\n          })\n        : null,\n      commonjs(),\n      build.type !== \"umd\" &&\n        isTypeScript &&\n        typescript({\n          clean: true,\n          include: [\n            \"*.ts+(|x)\",\n            \"**/*.ts+(|x)\",\n            \"**/*.cts\",\n            \"**/*.mts\",\n            \"*.js+(|x)\",\n            \"**/*.js+(|x)\",\n            \"**/*.cjs\",\n            \"**/*.mjs\",\n          ],\n          useTsconfigDeclarationDir: true,\n        }),\n      replace({\n        preventAssignment: true,\n        PACKAGE_CURRENT_VERSION: JSON.stringify(package.version),\n      }),\n      babel({\n        babelHelpers: \"runtime\",\n        presets: [\"@babel/preset-env\", \"@babel/preset-typescript\"],\n        plugins: [\n          [\n            \"@babel/plugin-transform-runtime\",\n            {\n              version: babelRuntimeVersion,\n            },\n          ],\n        ],\n        sourceMaps: true,\n        extensions,\n      }),\n      /\\.min\\.js$/.test(build.entry) &&\n        terser({\n          ecma: 5,\n          toplevel: build.type == \"cjs\" || build.type == \"esm\",\n        }),\n    ],\n  }\n\n  switch (build.type) {\n    case \"cjs\":\n      return _.merge(options, {})\n    case \"esm\":\n      return _.merge(options, {})\n    case \"umd\":\n      return _.merge(options, {})\n  }\n\n  throw new Error(\"Build type was not recognized (accepted values cjs,esm,umd)\")\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/build/get-output-options.js",
    "content": "const _ = require(\"lodash\")\nconst {resolve} = require(\"path\")\nconst {isObject} = require(\"../util\")\nconst banner = require(\"../plugins/banner\")\nconst preserveDynamicImports = require(\"../plugins/preserve-dynamic-imports\")\n\nconst generateModuleName = pkgName =>\n  pkgName\n    .replace(\"@\", \"\")\n    .replace(\"/\", \"-\")\n    .replace(/-([A-Za-z0-9])/, s => s.toUpperCase().substr(1))\n\nmodule.exports = function getOutputOptions(package, build) {\n  let options = {\n    name: generateModuleName(package.name),\n    file: resolve(build.dir, build.entry),\n    format: build.type,\n    preserveModules: false,\n    inlineDynamicImports: true,\n    sourcemap: true,\n    plugins: [\n      build.banner &&\n        banner(\n          isObject(build.banner)\n            ? build.banner\n            : {\n                banner: build.banner,\n                raw: true,\n              }\n        ),\n      preserveDynamicImports(),\n    ],\n  }\n\n  switch (build.type) {\n    case \"cjs\":\n      return _.merge(options, {\n        plugins: [...options.plugins],\n      })\n    case \"esm\":\n      return _.merge(options, {\n        plugins: [...options.plugins],\n      })\n    case \"umd\":\n      return _.merge(options, {\n        plugins: [...options.plugins],\n      })\n  }\n\n  console.warn(\"Build type was not recognized (accepted values cjs,esm,umd)\")\n  return options\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/build/watcher-pool.js",
    "content": "const {watch} = require(\"rollup\")\nconst {EventEmitter} = require(\"events\")\n\nclass WatcherPool extends EventEmitter {\n  constructor(watcherOptionsList) {\n    super()\n    this.numWatchers = watcherOptionsList.length\n    this.watchers = []\n    this.eventBuffers = {}\n\n    watcherOptionsList.forEach(watcherOptions =>\n      this.addWatcher(watcherOptions)\n    )\n  }\n\n  addWatcher(watcherOptions) {\n    const watcher = watch(watcherOptions)\n    this.watchers.push(watcher)\n\n    watcher.on(\"event\", event => {\n      const {code} = event\n\n      switch (code) {\n        case \"ERROR\":\n          console.error(\"Build failed!\", event.error)\n          break\n      }\n\n      if (!this.eventBuffers[code]) this.eventBuffers[code] = new EventBuffer()\n      this.eventBuffers[code].put(watcher, event)\n\n      if (this.eventBuffers[code].size >= this.numWatchers) {\n        this.emit(\"event\", {\n          code,\n          events: this.eventBuffers[code],\n        })\n        this.eventBuffers[code].clear()\n      }\n    })\n\n    return watcher\n  }\n}\n\nclass EventBuffer {\n  events = []\n\n  get(watcher) {\n    return this.events.find(evt => evt.watcher === watcher)?.event\n  }\n\n  put(watcher, event) {\n    return this.events.push({\n      watcher,\n      event,\n    })\n  }\n\n  clear() {\n    this.events = []\n  }\n\n  get size() {\n    return this.events.length\n  }\n}\n\nmodule.exports = WatcherPool\n"
  },
  {
    "path": "packages/fcl-bundle/src/cli.js",
    "content": "#!/usr/bin/env node\nconst program = require(\"./program\")\nconst getPackageJSON = require(\"./get-package-json\")\nconst parsePackageJSON = require(\"./package-config\")\n\nconst package = getPackageJSON()\nconst config = parsePackageJSON(package)\n\nprogram(config)(package)\n"
  },
  {
    "path": "packages/fcl-bundle/src/get-package-json.js",
    "content": "const {existsSync, readFileSync} = require(\"fs\")\nconst {resolve} = require(\"path\")\nconst {getPackageRoot} = require(\"./util\")\n\nmodule.exports = function getPackageJSON() {\n  const pathPackageJSON = resolve(getPackageRoot(), \"package.json\")\n  if (existsSync(pathPackageJSON)) {\n    return JSON.parse(readFileSync(pathPackageJSON))\n  } else {\n    throw new Error(\"Package.json was not found!  Aborting!\")\n  }\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/package-config.js",
    "content": "const assert = require(\"assert\")\nconst {resolve, dirname, basename, join} = require(\"path\")\nconst {isArray, isObject, isString, getPackageRoot} = require(\"./util\")\nconst {existsSync, mkdirSync} = require(\"fs\")\n\nfunction determineBuildPaths(package, outputs, entryName) {\n  const buildTypeMap = {\n    main: \"cjs\",\n    module: \"esm\",\n    unpkg: \"umd\",\n  }\n\n  const packageOutputs = Object.keys(package).reduce((outputs, key) => {\n    if (Object.keys(buildTypeMap).includes(key)) {\n      outputs[buildTypeMap[key]] = package[key]\n    }\n    return outputs\n  }, {})\n\n  const unsupportedOutput = Object.keys(outputs).find(\n    type => !Object.values(buildTypeMap).includes(type)\n  )\n  if (unsupportedOutput) {\n    throw new Error(\n      `An unsupported output format \"${unsupportedOutput}\" was provided - supported types are ${Object.values(\n        buildTypeMap\n      ).join(\", \")}`\n    )\n  }\n\n  outputs = {\n    ...packageOutputs,\n    ...outputs,\n  }\n\n  if (!outputs) {\n    console.warn(\n      `No outputs were specified in building ${entryName} from ${package.name}, using defaults for cjs,esm,umd ...`\n    )\n    outputs = {\n      cjs: `/dist/${entryName}.js`,\n      esm: `/dist/${entryName}.module.js`,\n      umd: `/dist/${entryName}.umd.js`,\n    }\n  }\n\n  assert(\n    !Object.keys(outputs).find(x =>\n      Object.keys(outputs).find(y => outputs[x] == outputs[y] && x != y)\n    ),\n    \"Cannot have duplicate output paths!\"\n  )\n\n  return Object.keys(outputs).map(type => ({\n    type,\n    dir: resolve(join(getPackageRoot(), dirname(outputs[type]))),\n    entry: basename(outputs[type]),\n  }))\n}\n\nmodule.exports = package => {\n  let builds = package.source\n\n  assert(\n    builds,\n    'The \"source\" root level configuration property must be specified'\n  )\n\n  if (isObject(builds)) {\n    builds = Object.keys(builds).map(key => ({\n      source: key,\n      ...builds[key],\n    }))\n  } else if (isArray(builds)) {\n    assert(\n      !builds.find(x => !isString(x)),\n      \"Source files must be provided as strings\"\n    )\n  } else {\n    builds = [builds]\n  }\n\n  const cfg = {\n    builds: builds.reduce((buildConfigs, build) => {\n      let source, banner\n      let outputs = {}\n\n      if (isObject(build)) {\n        source = build.source\n        banner = build.banner\n        outputs = {\n          cjs: build.cjs,\n          esm: build.esm,\n          umd: build.umd,\n        }\n\n        // Filter out missing outputs\n        outputs = Object.keys(outputs).reduce((acc, key) => {\n          if (outputs[key]) acc[key] = outputs[key]\n          return acc\n        }, {})\n      } else {\n        source = build\n      }\n      let entryName = basename(source)\n\n      buildConfigs.push(\n        ...determineBuildPaths(package, outputs, entryName).map(build => ({\n          ...build,\n          source,\n          banner,\n        }))\n      )\n      return buildConfigs\n    }, []),\n  }\n\n  cfg.builds.forEach(build =>\n    !existsSync(build.dir) ? mkdirSync(build.dir) : null\n  )\n\n  return cfg\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/plugins/banner.js",
    "content": "module.exports = function banner({banner, raw}) {\n  return {\n    name: \"banner\",\n    outputOptions(options) {\n      if (!raw) {\n        banner = [\n          \"/**\",\n          ...banner.split(/\\r?\\n/).map(l => ` * ${l}`),\n          \"*/\",\n        ].reduce((acc, l) => (acc += `${l}\\n`), \"\")\n      }\n      return {\n        ...options,\n        banner,\n      }\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/plugins/preserve-dynamic-imports.js",
    "content": "module.exports = function preserveDynamicImports() {\n  return {\n    name: \"preserve-dynamic-imports\",\n    renderDynamicImport() {\n      return {\n        left: \"import(\",\n        right: \")\",\n      }\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/program.js",
    "content": "const {program} = require(\"commander\")\nconst buildModule = require(\"./build/build\")\nconst watchModule = require(\"./build/build-watch\")\nconst assert = require(\"assert\")\nconst getPackageJson = require(\"./get-package-json\")\nconst {resolve} = require(\"path\")\n\nmodule.exports = packageConfig => package => {\n  let bundlerPackageJson = getPackageJson(resolve(__dirname, \"..\"))\n\n  program\n    .name(\"FCL Build Tool\")\n    .description(\"Zero-configuration CLI to build FCL packages\")\n    .version(bundlerPackageJson.version)\n    .option(\"-w, --watch\", \"Run the build in watch mode\")\n    .parse()\n\n  program.action(async () => {\n    assert(\n      packageConfig.builds,\n      \"Module entry point(s) (package.build) must be defined\"\n    )\n\n    const buildAction = program.getOptionValue(\"watch\")\n      ? watchModule\n      : buildModule\n\n    await buildAction(packageConfig.builds, package)\n  })\n\n  program.parse()\n}\n"
  },
  {
    "path": "packages/fcl-bundle/src/util.js",
    "content": "function isArray(obj) {\n  return Object.prototype.toString.call(obj) === \"[object Array]\"\n}\n\nfunction isObject(obj) {\n  return Object.prototype.toString.call(obj) === \"[object Object]\"\n}\n\nfunction isString(obj) {\n  return typeof obj === \"string\" || obj instanceof String\n}\n\n// Get the root path of the package that the bundle is being built for\nfunction getPackageRoot() {\n  return process.cwd()\n}\n\nmodule.exports = {\n  isArray,\n  isObject,\n  isString,\n  getPackageRoot,\n}\n"
  },
  {
    "path": "packages/fcl-core/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"useBuiltIns\": false\n      }\n    ],\n    \"@babel/preset-typescript\"\n  ]\n}\n"
  },
  {
    "path": "packages/fcl-core/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-core/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"globals\": {\n    \"JSX\": \"readonly\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/tag-lines\": 0,\n    \"jsdoc/require-param-description\": 0,\n    \"jsdoc/valid-types\": 0,\n    \"jsdoc/require-returns-description\": 0,\n    \"no-undef\": 1\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/.gitignore",
    "content": "types/"
  },
  {
    "path": "packages/fcl-core/.npmignore",
    "content": "src/\nassets/"
  },
  {
    "path": "packages/fcl-core/CHANGELOG.md",
    "content": "# @onflow/fcl\n\n## 1.30.2\n\n### Patch Changes\n\n- [#2793](https://github.com/onflow/fcl-js/pull/2793) [`b438549005eba70ab18089abe117ed6816cc1b7f`](https://github.com/onflow/fcl-js/commit/b438549005eba70ab18089abe117ed6816cc1b7f) Thanks [@lmcmz](https://github.com/lmcmz)! - Fix `fcl.tx().onceSealed()` hanging when using legacy `sdk.transport` polling fallback\n\n## 1.30.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/config@1.11.1\n  - @onflow/transport-http@1.15.6\n  - @onflow/sdk@1.13.7\n\n## 1.30.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/config@1.11.0\n  - @onflow/transport-http@1.15.5\n  - @onflow/sdk@1.13.6\n\n## 1.29.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/config@1.10.0\n  - @onflow/transport-http@1.15.4\n  - @onflow/sdk@1.13.5\n\n## 1.28.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/config@1.9.0\n  - @onflow/transport-http@1.15.3\n  - @onflow/sdk@1.13.4\n\n## 1.27.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/config@1.8.0\n  - @onflow/transport-http@1.15.2\n  - @onflow/sdk@1.13.3\n\n## 1.26.0\n\n### Minor Changes\n\n- [#2756](https://github.com/onflow/fcl-js/pull/2756) [`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6) Thanks [@mfbz](https://github.com/mfbz)! - Packages re-released after lerna update.\n\n## 1.25.0\n\n### Minor Changes\n\n- [#2747](https://github.com/onflow/fcl-js/pull/2747) [`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65) Thanks [@jribbink](https://github.com/jribbink)! - Add support for fork networks (mainnet-fork, testnet-fork) to enable testing against forked emulator with automatic contract alias inheritance from parent networks. Fork networks allow developers to run their dapps and E2E tests against a local emulator that mirrors mainnet or testnet state, while supporting contract-specific overrides.\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/config@1.7.0\n  - @onflow/sdk@1.13.2\n\n## 1.24.0\n\n### Minor Changes\n\n- [#2733](https://github.com/onflow/fcl-js/pull/2733) [`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd) Thanks [@mfbz](https://github.com/mfbz)! - Add react-core package with platform-agnostic hooks with common utils and types extracted from react-sdk. Refactored react-sdk to use react-core package.\n\n## 1.23.1\n\n### Patch Changes\n\n- Updated dependencies [[`d6e0a02145cd599fa22823ca83087ca096fb251d`](https://github.com/onflow/fcl-js/commit/d6e0a02145cd599fa22823ca83087ca096fb251d)]:\n  - @onflow/transport-http@1.15.1\n  - @onflow/sdk@1.13.1\n\n## 1.23.0\n\n### Minor Changes\n\n- [#2704](https://github.com/onflow/fcl-js/pull/2704) [`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d) Thanks [@mfbz](https://github.com/mfbz)! - Improved fcl-react-native WalletConnect implementation with full fcl specs support, automatic redirect URI detection, session validation and full feature parity with fcl.\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/sdk@1.13.0\n\n## 1.22.3\n\n### Patch Changes\n\n- Updated dependencies [[`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212)]:\n  - @onflow/transport-http@1.15.0\n  - @onflow/sdk@1.12.0\n\n## 1.22.2\n\n### Patch Changes\n\n- [#2696](https://github.com/onflow/fcl-js/pull/2696) [`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810) Thanks [@jribbink](https://github.com/jribbink)! - Add support for `discoveryAuthnExclude` configuration option in React SDK. This allows users to exclude specific wallet providers from the discovery service, complementing the existing `discoveryAuthnInclude` option.\n\n- Updated dependencies [[`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e)]:\n  - @onflow/config@1.6.3\n  - @onflow/sdk@1.11.2\n\n## 1.22.1\n\n### Patch Changes\n\n- Updated dependencies [[`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73), [`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557)]:\n  - @onflow/types@1.5.0\n  - @onflow/sdk@1.11.1\n  - @onflow/config@1.6.2\n\n## 1.22.0\n\n### Minor Changes\n\n- [#2638](https://github.com/onflow/fcl-js/pull/2638) [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960) Thanks [@jribbink](https://github.com/jribbink)! - Adds support for signature extension data introduced by [FLIP 264](https://github.com/onflow/flips/blob/main/protocol/20250203-webauthn-credential-support.md).\n\n  Users can now include signature extension data in their transactions by returning an additional `extensionData` property in their signing functions.\n\n  ```typescript\n  const authz = (ix: Interaction) => {\n    return {\n      addr: \"0x1234567890abcdef\",\n      keyId: 0,\n      signingFunction: (signable: Signable) => ({\n        signature: \"1234\",\n        extensionData: \"1234\",\n      }),\n    }\n  }\n  ```\n\n### Patch Changes\n\n- [#2655](https://github.com/onflow/fcl-js/pull/2655) [`81d21f98ab2838885ad32217de42b85481f5595c`](https://github.com/onflow/fcl-js/commit/81d21f98ab2838885ad32217de42b85481f5595c) Thanks [@chasefleming](https://github.com/chasefleming)! - Bugfix: add `discoveryAuthnInclude` in FCL core configStore\n\n- Updated dependencies [[`ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23`](https://github.com/onflow/fcl-js/commit/ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23), [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960)]:\n  - @onflow/sdk@1.11.0\n  - @onflow/transport-http@1.14.0\n\n## 1.21.2\n\n### Patch Changes\n\n- Updated dependencies [[`430bb0813bab6c2de59e152184256238bda20d99`](https://github.com/onflow/fcl-js/commit/430bb0813bab6c2de59e152184256238bda20d99)]:\n  - @onflow/transport-http@1.13.2\n  - @onflow/sdk@1.10.2\n\n## 1.21.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/config@1.6.1\n  - @onflow/rlp@1.2.4\n  - @onflow/sdk@1.10.1\n  - @onflow/transport-http@1.13.1\n  - @onflow/types@1.4.2\n  - @onflow/util-actor@1.3.5\n  - @onflow/util-address@1.2.4\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n  - @onflow/util-semver@1.0.4\n  - @onflow/util-template@1.2.4\n  - @onflow/util-uid@1.2.4\n\n## 1.21.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Remove unused WalletConnect configuration options from `createFlowClient`\n\n- [#2539](https://github.com/onflow/fcl-js/pull/2539) [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled FCL Core functions from the global state and created a `createFlowCoreClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application.\n\n  All FCL functions will continue to work as before, but now you can create a custom FCL instance with its own context.\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76), [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/sdk@1.10.0\n  - @onflow/config@1.6.0\n\n## 1.21.0-alpha.2\n\n### Minor Changes\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Remove unused WalletConnect configuration options from `createFlowClient`\n\n## 1.21.0-alpha.1\n\n### Minor Changes\n\n- [#2539](https://github.com/onflow/fcl-js/pull/2539) [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled FCL Core functions from the global state and created a `createFlowCoreClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application.\n\n  All FCL functions will continue to work as before, but now you can create a custom FCL instance with its own context.\n\n### Patch Changes\n\n- Updated dependencies [[`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/config@1.6.0-alpha.0\n  - @onflow/sdk@1.10.0-alpha.1\n\n## 1.21.0-alpha.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76)]:\n  - @onflow/sdk@1.10.0-alpha.0\n\n## 1.20.0\n\n### Minor Changes\n\n- [#2523](https://github.com/onflow/fcl-js/pull/2523) [`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d) Thanks [@mfbz](https://github.com/mfbz)! - Added `queryRaw` method to execute a query and get non-decoded data as result.\n\n## 1.19.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- [#2461](https://github.com/onflow/fcl-js/pull/2461) [`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12) Thanks [@jribbink](https://github.com/jribbink)! - Unsubscribe from transaction statuses when sealed\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89), [`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/sdk@1.9.0\n  - @onflow/transport-http@1.13.0\n\n## 1.19.0-alpha.2\n\n### Patch Changes\n\n- [#2461](https://github.com/onflow/fcl-js/pull/2461) [`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12) Thanks [@jribbink](https://github.com/jribbink)! - Unsubscribe from transaction statuses when sealed\n\n## 1.19.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89)]:\n  - @onflow/sdk@1.9.0-alpha.1\n\n## 1.19.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/transport-http@1.13.0-alpha.0\n  - @onflow/sdk@1.9.0-alpha.0\n\n## 1.18.0\n\n### Minor Changes\n\n- [#2384](https://github.com/onflow/fcl-js/pull/2384) [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29) Thanks [@jribbink](https://github.com/jribbink)! - Include origin information in `onMessageFromFcl` function\n\n- [#2378](https://github.com/onflow/fcl-js/pull/2378) [`094ed6dd38cae9ae39183f5ead8d59f9276f8f5d`](https://github.com/onflow/fcl-js/commit/094ed6dd38cae9ae39183f5ead8d59f9276f8f5d) Thanks [@jribbink](https://github.com/jribbink)! - Deprecate manual appIdentifier in favour of window origin\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.8.1\n\n## 1.17.0\n\n### Minor Changes\n\n- [#2270](https://github.com/onflow/fcl-js/pull/2270) [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d) Thanks [@mfbz](https://github.com/mfbz)! - Added default Flow network config exports: `flowMainnet`, `flowTestnet`, and `flowEmulator`. These can be used with `fcl.config()` to simplify setup.\n\n### Patch Changes\n\n- [#2076](https://github.com/onflow/fcl-js/pull/2076) [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b) Thanks [@jribbink](https://github.com/jribbink)! - Do not check that discovery service is provider in `fcl.authenticate` if user is already logged in\n\n- Updated dependencies [[`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d), [`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01)]:\n  - @onflow/sdk@1.8.0\n  - @onflow/config@1.5.2\n\n## 1.16.0\n\n### Minor Changes\n\n- [#2252](https://github.com/onflow/fcl-js/pull/2252) [`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714) Thanks [@jribbink](https://github.com/jribbink)! - Default to soft-finality for all queries (get account, get block, get block header, execute script). Developers can manually override this setting on a per-query basis if required.\n\n  Because developers can now query against un-sealed blocks, it is now recommended to switch to waiting for soft-finality (\"executed\" status) when awaiting for transaction results whenever possible for significant latency improvements (~2.5x faster).\n\n  This can be done by switching from `fcl.tx(...).onceSealed()` to `fcl.tx(...).onceExecuted()` or updating listeners passed to `fcl.tx(...).subscribe()`.\n\n### Patch Changes\n\n- Updated dependencies [[`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714)]:\n  - @onflow/sdk@1.7.0\n  - @onflow/transport-http@1.12.0\n\n## 1.15.1\n\n### Patch Changes\n\n- [#2245](https://github.com/onflow/fcl-js/pull/2245) [`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac) Thanks [@jribbink](https://github.com/jribbink)! - Fix regression in `account` query at latest block\n\n- Updated dependencies [[`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac)]:\n  - @onflow/sdk@1.6.1\n\n## 1.15.0\n\n### Minor Changes\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Add `fcl.experimental.softFinality` config option to run all state queries (e.g. execute script, get account) against the latest soft-finality state by default\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Add `isSealed` flag to `account` function to configure block finality state\n\n### Patch Changes\n\n- Updated dependencies [[`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8)]:\n  - @onflow/sdk@1.6.0\n  - @onflow/transport-http@1.11.0\n\n## 1.14.1\n\n### Patch Changes\n\n- Updated dependencies [[`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec)]:\n  - @onflow/sdk@1.5.7\n\n## 1.14.0\n\n### Minor Changes\n\n- [#1937](https://github.com/onflow/fcl-js/pull/1937) [`68cf725a4d618cc963f31a758998ad14a7a43716`](https://github.com/onflow/fcl-js/commit/68cf725a4d618cc963f31a758998ad14a7a43716) Thanks [@jribbink](https://github.com/jribbink)! - Allow apps to exclude certain wallets from FCL Discovery.\n\n  ```javascript\n  import {config} from \"@onflow/fcl\"\n  \n  config({\n    \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n    \"discovery.authn.endpoint\":\n      \"https://fcl-discovery.onflow.org/api/testnet/authn\",\n    \"discovery.authn.exclude\": [\"0x123\"],\n  })\n  ```\n\n## 1.13.5\n\n### Patch Changes\n\n- [#2065](https://github.com/onflow/fcl-js/pull/2065) [`3fccbef7bbf985f19d9a9bae2638e538f126f754`](https://github.com/onflow/fcl-js/commit/3fccbef7bbf985f19d9a9bae2638e538f126f754) Thanks [@jribbink](https://github.com/jribbink)! - Fix args type for `fcl.query` & `fcl.mutate`\n\n## 1.13.4\n\n### Patch Changes\n\n- Updated dependencies [[`4e907764cbbe688ea8fd1508968c2b095f00d79e`](https://github.com/onflow/fcl-js/commit/4e907764cbbe688ea8fd1508968c2b095f00d79e)]:\n  - @onflow/transport-http@1.10.5\n  - @onflow/sdk@1.5.6\n\n## 1.13.3\n\n### Patch Changes\n\n- [#2046](https://github.com/onflow/fcl-js/pull/2046) [`c88f170ab2342f5382dead9a2270e72ce9c6d68a`](https://github.com/onflow/fcl-js/commit/c88f170ab2342f5382dead9a2270e72ce9c6d68a) Thanks [@jribbink](https://github.com/jribbink)! - Fix bug affecting `fcl.tx(...).onceSealed()`\n\n## 1.13.2\n\n### Patch Changes\n\n- [#2043](https://github.com/onflow/fcl-js/pull/2043) [`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f) Thanks [@jribbink](https://github.com/jribbink)! - Export `TransactionError`\n\n## 1.13.1\n\n### Patch Changes\n\n- [#2039](https://github.com/onflow/fcl-js/pull/2039) [`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d) Thanks [@jribbink](https://github.com/jribbink)! - Update cross-fetch to v4\n\n- Updated dependencies [[`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d)]:\n  - @onflow/transport-http@1.10.4\n  - @onflow/sdk@1.5.5\n\n## 1.13.0\n\n### Minor Changes\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Add getStorageProvider to currentUser configuration\n\n- [#1989](https://github.com/onflow/fcl-js/pull/1989) [`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3) Thanks [@jribbink](https://github.com/jribbink)! - Reduce transaction status polling delay to 1000ms\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add custom error `TransactionError` type for failing transaction results\n\n### Patch Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Pass missing fields to service redirects in execService\n\n- [#1999](https://github.com/onflow/fcl-js/pull/1999) [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1) Thanks [@jribbink](https://github.com/jribbink)! - Improve deeplinking for WC/RPC wallets using non-WC/RPC pre-authz services\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35), [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/sdk@1.5.4\n  - @onflow/transport-http@1.10.3\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-template@1.2.3\n  - @onflow/util-address@1.2.3\n  - @onflow/util-logger@1.3.3\n  - @onflow/util-semver@1.0.3\n  - @onflow/util-actor@1.3.4\n  - @onflow/util-uid@1.2.3\n  - @onflow/config@1.5.1\n  - @onflow/types@1.4.1\n  - @onflow/rlp@1.2.3\n\n## 1.13.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35)]:\n  - @onflow/sdk@1.5.4-alpha.3\n\n## 1.13.0-alpha.5\n\n### Patch Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Pass missing fields to service redirects in execService\n\n- Updated dependencies []:\n  - @onflow/sdk@1.5.4-alpha.2\n\n## 1.13.0-alpha.4\n\n### Minor Changes\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Add getStorageProvider to currentUser configuration\n\n## 1.13.0-alpha.3\n\n### Patch Changes\n\n- [#1999](https://github.com/onflow/fcl-js/pull/1999) [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1) Thanks [@jribbink](https://github.com/jribbink)! - Improve deeplinking for WC/RPC wallets using non-WC/RPC pre-authz services\n\n## 1.13.0-alpha.2\n\n### Minor Changes\n\n- [#1989](https://github.com/onflow/fcl-js/pull/1989) [`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3) Thanks [@jribbink](https://github.com/jribbink)! - Reduce transaction status polling delay to 1000ms\n\n## 1.13.0-alpha.1\n\n### Minor Changes\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add custom error `TransactionError` type for failing transaction results\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.5.4-alpha.1\n\n## 1.12.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/transport-http@1.10.3-alpha.0\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/util-semver@1.0.3-alpha.0\n  - @onflow/util-actor@1.3.4-alpha.0\n  - @onflow/util-uid@1.2.3-alpha.0\n  - @onflow/config@1.5.1-alpha.0\n  - @onflow/types@1.4.1-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n  - @onflow/sdk@1.5.4-alpha.0\n\n## 1.12.0\n\n### Minor Changes\n\n- [#1966](https://github.com/onflow/fcl-js/pull/1966) [`f2831107`](https://github.com/onflow/fcl-js/commit/f283110707d5edc166bbe05e5482d38fa29de29e) Thanks [@jribbink](https://github.com/jribbink)! - Fix deep linking issues with mobile wallets\n\n## 1.11.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.5.3\n\n## 1.11.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Changes to `execStrategy`:\n  - `execStrategy` now exported from `@onflow/fcl-core`\n  - Allow overriding `execStrategy` for FCL Discovery when initializing `currentUser`.\n  - `execStrategy` now takes additional arguments\n    - `customRpc` - a custom RPC client to communicate with the VIEW, if supported\n    - `abortSignal` - an AbortSignal to cancel the request (and close any open views)\n\n### Patch Changes\n\n- [#1942](https://github.com/onflow/fcl-js/pull/1942) [`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05) Thanks [@jribbink](https://github.com/jribbink)! - Fix `fcl.authenticate` type\n\n- [#1958](https://github.com/onflow/fcl-js/pull/1958) [`e97e8d2f`](https://github.com/onflow/fcl-js/commit/e97e8d2f5197aecf793f26ba82771fd4f7ebc757) Thanks [@jribbink](https://github.com/jribbink)! - Fix window.onload for discovery API\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - `postMessage` now strictly communicates with the view which it opened to prevent collisions when FCL opens multiple views in parallel\n\n- [#1949](https://github.com/onflow/fcl-js/pull/1949) [`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c) Thanks [@jribbink](https://github.com/jribbink)! - Defer `discovery.authn.update` calls to after the window has loaded\n\n- [#1911](https://github.com/onflow/fcl-js/pull/1911) [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807) Thanks [@jribbink](https://github.com/jribbink)! - Remove unnecessary config.overload call in query/mutate functions (causes unnecessary WalletConnect errors to show in console)\n\n- [#1944](https://github.com/onflow/fcl-js/pull/1944) [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7) Thanks [@jribbink](https://github.com/jribbink)! - Fix `verifyUserSignatures` return type\n\n- Updated dependencies [[`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f), [`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24), [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/sdk@1.5.2\n  - @onflow/config@1.5.0\n\n## 1.11.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/config@1.5.0-alpha.0\n  - @onflow/sdk@1.5.2-alpha.3\n\n## 1.11.0-alpha.3\n\n### Patch Changes\n\n- [#1949](https://github.com/onflow/fcl-js/pull/1949) [`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c) Thanks [@jribbink](https://github.com/jribbink)! - Defer `discovery.authn.update` calls to after the window has loaded\n\n## 1.11.0-alpha.2\n\n### Patch Changes\n\n- [#1942](https://github.com/onflow/fcl-js/pull/1942) [`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05) Thanks [@jribbink](https://github.com/jribbink)! - Fix `fcl.authenticate` type\n\n- [#1944](https://github.com/onflow/fcl-js/pull/1944) [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7) Thanks [@jribbink](https://github.com/jribbink)! - Fix `verifyUserSignatures` return type\n\n- Updated dependencies [[`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/sdk@1.5.2-alpha.2\n\n## 1.11.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24)]:\n  - @onflow/sdk@1.5.2-alpha.1\n\n## 1.11.0-alpha.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Changes to `execStrategy`:\n  - `execStrategy` now exported from `@onflow/fcl-core`\n  - Allow overriding `execStrategy` for FCL Discovery when initializing `currentUser`.\n  - `execStrategy` now takes additional arguments\n    - `customRpc` - a custom RPC client to communicate with the VIEW, if supported\n    - `abortSignal` - an AbortSignal to cancel the request (and close any open views)\n\n### Patch Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - `postMessage` now strictly communicates with the view which it opened to prevent collisions when FCL opens multiple views in parallel\n\n- [#1911](https://github.com/onflow/fcl-js/pull/1911) [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807) Thanks [@jribbink](https://github.com/jribbink)! - Remove unnecessary config.overload call in query/mutate functions (causes unnecessary WalletConnect errors to show in console)\n\n- Updated dependencies [[`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5)]:\n  - @onflow/sdk@1.5.2-alpha.0\n\n## 1.10.0\n\n### Minor Changes\n\n- [#1888](https://github.com/onflow/fcl-js/pull/1888) [`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b) Thanks [@jribbink](https://github.com/jribbink)! - Warn users to configure FCL-WC Plugin if not already configured. FCL libraries are expected to manage this plugin (i.e. `@onflow/fcl`).\n\n## 1.9.2\n\n### Patch Changes\n\n- [#1894](https://github.com/onflow/fcl-js/pull/1894) [`38607662`](https://github.com/onflow/fcl-js/commit/38607662dbfc54f268c40488e7a6a89bedd169d8) Thanks [@nichita-rusin](https://github.com/nichita-rusin)! - Fix error when calling `fcl.query` with a template object\n\n- Updated dependencies [[`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175)]:\n  - @onflow/util-actor@1.3.3\n  - @onflow/config@1.4.1\n  - @onflow/sdk@1.5.1\n\n## 1.9.1\n\n### Patch Changes\n\n- Updated dependencies [[`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074), [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`8fb453b5`](https://github.com/onflow/fcl-js/commit/8fb453b5ff3a00285d91a5432972afbe9e779706), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]:\n  - @onflow/sdk@1.5.0\n  - @onflow/types@1.4.0\n  - @onflow/util-invariant@1.2.3\n  - @onflow/config@1.4.0\n\n## 1.9.0\n\n### Minor Changes\n\n- [#1614](https://github.com/onflow/fcl-js/pull/1614) [`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Support v1.1.0 of InteractionTemplate and InteractionTemplateInterface\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n- [#1852](https://github.com/onflow/fcl-js/pull/1852) [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0) Thanks [@jribbink](https://github.com/jribbink)! - Add Previewnet FCLCrypto address\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3), [`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/types@1.3.0\n  - @onflow/sdk@1.4.0\n  - @onflow/util-address@1.2.2\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/util-actor@1.3.2\n  - @onflow/util-uid@1.2.2\n  - @onflow/config@1.3.0\n  - @onflow/rlp@1.2.2\n  - @onflow/util-semver@1.0.2\n\n## 1.9.0-alpha.8\n\n### Patch Changes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n  - @onflow/sdk@1.4.0-alpha.9\n\n## 1.9.0-alpha.7\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- Updated dependencies [[`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88)]:\n  - @onflow/sdk@1.4.0-alpha.8\n\n## 1.9.0-alpha.6\n\n### Minor Changes\n\n- [#1852](https://github.com/onflow/fcl-js/pull/1852) [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0) Thanks [@jribbink](https://github.com/jribbink)! - Add Previewnet FCLCrypto address\n\n### Patch Changes\n\n- Updated dependencies [[`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0)]:\n  - @onflow/sdk@1.4.0-alpha.7\n\n## 1.9.0-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/config@1.3.0-alpha.3\n  - @onflow/sdk@1.4.0-alpha.6\n\n## 1.9.0-alpha.4\n\n### Minor Changes\n\n- [#1614](https://github.com/onflow/fcl-js/pull/1614) [`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Support v1.1.0 of InteractionTemplate and InteractionTemplateInterface\n\n## 1.8.2-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d)]:\n  - @onflow/sdk@1.4.0-alpha.5\n\n## 1.8.2-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f)]:\n  - @onflow/types@1.3.0-alpha.3\n\n## 1.8.2-alpha.1\n\n### Patch Changes\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- Updated dependencies [[`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f)]:\n  - @onflow/sdk@1.4.0-alpha.4\n\n## 1.8.2-alpha.0\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/util-semver@1.0.2-alpha.0\n  - @onflow/util-actor@1.3.2-alpha.2\n  - @onflow/util-uid@1.2.2-alpha.2\n  - @onflow/config@1.2.2-alpha.2\n  - @onflow/types@1.3.0-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n  - @onflow/sdk@1.4.0-alpha.3\n\n## 1.9.0\n\n### Minor Changes\n\n- [#1811](https://github.com/onflow/fcl-js/pull/1811) [`4554254a`](https://github.com/onflow/fcl-js/commit/4554254a52e6062c04e5842f4ca7701e8b74bc64) Thanks [@bthaile](https://github.com/bthaile)! - Add support for running FLIX v1.1.0 (verified interactions)\n\n### Patch Changes\n\n- [#1792](https://github.com/onflow/fcl-js/pull/1792) [`cb5d38c8`](https://github.com/onflow/fcl-js/commit/cb5d38c8f1a2de47a1932ea8e89e43171b179712) Thanks [@jribbink](https://github.com/jribbink)! - Ignore Not Found errors when polling transaction status (workaround for access node load balancers)\n\n## 1.8.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-actor@1.3.1\n  - @onflow/config@1.2.1\n  - @onflow/rlp@1.2.1\n  - @onflow/sdk@1.3.1\n  - @onflow/types@1.2.1\n  - @onflow/util-address@1.2.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-logger@1.3.1\n  - @onflow/util-semver@1.0.1\n  - @onflow/util-template@1.2.1\n  - @onflow/util-uid@1.2.1\n\n## 1.8.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/types@1.2.0\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-template@1.2.0\n  - @onflow/util-address@1.2.0\n  - @onflow/util-logger@1.3.0\n  - @onflow/util-uid@1.2.0\n  - @onflow/rlp@1.2.0\n  - @onflow/util-actor@1.3.0\n  - @onflow/config@1.2.0\n  - @onflow/sdk@1.3.0\n\n## 1.7.0\n\n### Minor Changes\n\n- [#1775](https://github.com/onflow/fcl-js/pull/1775) [`e0d0d144`](https://github.com/onflow/fcl-js/commit/e0d0d1449524f4c65e3f7a263b5c0a3ab5ac4a89) Thanks [@chasefleming](https://github.com/chasefleming)! - Send suggested features to discovery\n\n### Patch Changes\n\n- [#1785](https://github.com/onflow/fcl-js/pull/1785) [`a3143a80`](https://github.com/onflow/fcl-js/commit/a3143a80d1e5df66c58c837022038d92dd836811) Thanks [@jribbink](https://github.com/jribbink)! - Fix version normalization of services in FCL\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Refactor Resolve Accounts to user role based async decomposition for resolving internal accounts\n\n- [#1793](https://github.com/onflow/fcl-js/pull/1793) [`08f4dd6b`](https://github.com/onflow/fcl-js/commit/08f4dd6b0efc2204feb8fae8a480980688a49141) Thanks [@nialexsan](https://github.com/nialexsan)! - Move is-helpers to utils\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fixed duplicate signatures when sending transaction\n\n- Updated dependencies [[`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5), [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5)]:\n  - @onflow/sdk@1.2.3\n\n## 1.6.0\n\n### Minor Changes\n\n- [#1763](https://github.com/onflow/fcl-js/pull/1763) [`3c99c856`](https://github.com/onflow/fcl-js/commit/3c99c8560f61b5b38238cbd0e93814936aee282e) Thanks [@jribbink](https://github.com/jribbink)! - Add VIEW/DEEPLINK\n\n### Patch Changes\n\n- Updated dependencies [[`5edbd823`](https://github.com/onflow/fcl-js/commit/5edbd823b1a6d25eb7bb52dc55338f95beae73b1)]:\n  - @onflow/util-logger@1.2.2\n  - @onflow/config@1.1.2\n\n## 1.5.2\n\n### Patch Changes\n\n- [#1767](https://github.com/onflow/fcl-js/pull/1767) [`f6681cfe`](https://github.com/onflow/fcl-js/commit/f6681cfebc5aab78cbf74f34b5655faa4f06a8c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix responseBody not being included in errors\n\n- Updated dependencies [[`f6681cfe`](https://github.com/onflow/fcl-js/commit/f6681cfebc5aab78cbf74f34b5655faa4f06a8c4)]:\n  - @onflow/sdk@1.2.2\n\n## 1.5.1\n\n### Patch Changes\n\n- [#1754](https://github.com/onflow/fcl-js/pull/1754) [`c0ba4d26`](https://github.com/onflow/fcl-js/commit/c0ba4d268ce307ddbd83b812db5136f0f29afdc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix `fcl.mutate` typedef\n\n- [#1755](https://github.com/onflow/fcl-js/pull/1755) [`28d16a13`](https://github.com/onflow/fcl-js/commit/28d16a134f9afea265400b49df81f77ac02a520d) Thanks [@jribbink](https://github.com/jribbink)! - Fix react-native platform for `fcl.mutate`\n\n## 1.5.0\n\n### Minor Changes\n\n- [#1666](https://github.com/onflow/fcl-js/pull/1666) [`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd) Thanks [@nialexsan](https://github.com/nialexsan)! - React Native support\n\n### Patch Changes\n\n- [#1723](https://github.com/onflow/fcl-js/pull/1723) [`1308f522`](https://github.com/onflow/fcl-js/commit/1308f522e56cef517a60be465789815281bab6d8) Thanks [@jribbink](https://github.com/jribbink)! - Fixed types for sdk builder functions (fixes fcl.send/fcl.build type errors)\n\n- [#1707](https://github.com/onflow/fcl-js/pull/1707) [`f7986d9b`](https://github.com/onflow/fcl-js/commit/f7986d9b4e7bba3abc4acbfb036072336d0651cf) Thanks [@nialexsan](https://github.com/nialexsan)! - Deeplink RPC\n\n- [#1690](https://github.com/onflow/fcl-js/pull/1690) [`53d1f607`](https://github.com/onflow/fcl-js/commit/53d1f607fd15535a29cbbb1c809f0fc4d7a6be7b) Thanks [@jribbink](https://github.com/jribbink)! - Stop polling in React Native when browser has been closed\n\n- [#1712](https://github.com/onflow/fcl-js/pull/1712) [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285) Thanks [@jribbink](https://github.com/jribbink)! - Fix getChainId bug with nextjs & no longer set flow.network.default in configuration internally\n\n- [#1699](https://github.com/onflow/fcl-js/pull/1699) [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6) Thanks [@chasefleming](https://github.com/chasefleming)! - Throw error in config if keys detected\n\n- [#1693](https://github.com/onflow/fcl-js/pull/1693) [`51436ccd`](https://github.com/onflow/fcl-js/commit/51436ccd5ceb774b4846c44474914cad2208fe37) Thanks [@jribbink](https://github.com/jribbink)! - Patch URL trailing slash bug in React Native\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6), [`62fd9baf`](https://github.com/onflow/fcl-js/commit/62fd9baf28afbb2742f9e8c5ef6674adc9d030b7), [`1553967a`](https://github.com/onflow/fcl-js/commit/1553967aff61c242990b2de509e5dc5b8842ab2d)]:\n  - @onflow/config@1.1.1\n  - @onflow/sdk@1.2.1\n  - @onflow/util-logger@1.2.1\n\n## 1.5.0-alpha.5\n\n### Patch Changes\n\n- [#1723](https://github.com/onflow/fcl-js/pull/1723) [`1308f522`](https://github.com/onflow/fcl-js/commit/1308f522e56cef517a60be465789815281bab6d8) Thanks [@jribbink](https://github.com/jribbink)! - Fixed types for sdk builder functions (fixes fcl.send/fcl.build type errors)\n\n- Updated dependencies [[`1553967a`](https://github.com/onflow/fcl-js/commit/1553967aff61c242990b2de509e5dc5b8842ab2d)]:\n  - @onflow/sdk@1.2.1-alpha.2\n\n## 1.5.0-alpha.4\n\n### Patch Changes\n\n- [#1707](https://github.com/onflow/fcl-js/pull/1707) [`f7986d9b`](https://github.com/onflow/fcl-js/commit/f7986d9b4e7bba3abc4acbfb036072336d0651cf) Thanks [@nialexsan](https://github.com/nialexsan)! - Deeplink RPC\n\n## 1.5.0-alpha.3\n\n### Patch Changes\n\n- [#1712](https://github.com/onflow/fcl-js/pull/1712) [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285) Thanks [@jribbink](https://github.com/jribbink)! - Fix getChainId bug with nextjs & no longer set flow.network.default in configuration internally\n\n- [#1699](https://github.com/onflow/fcl-js/pull/1699) [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6) Thanks [@chasefleming](https://github.com/chasefleming)! - Throw error in config if keys detected\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6)]:\n  - @onflow/config@1.1.1-alpha.0\n  - @onflow/sdk@1.2.1-alpha.0\n  - @onflow/util-logger@1.2.1-alpha.0\n\n## 1.5.0-alpha.2\n\n### Patch Changes\n\n- [#1690](https://github.com/onflow/fcl-js/pull/1690) [`53d1f607`](https://github.com/onflow/fcl-js/commit/53d1f607fd15535a29cbbb1c809f0fc4d7a6be7b) Thanks [@jribbink](https://github.com/jribbink)! - Stop polling in React Native when browser has been closed\n\n## 1.5.0-alpha.1\n\n### Patch Changes\n\n- [#1693](https://github.com/onflow/fcl-js/pull/1693) [`51436ccd`](https://github.com/onflow/fcl-js/commit/51436ccd5ceb774b4846c44474914cad2208fe37) Thanks [@jribbink](https://github.com/jribbink)! - Patch URL trailing slash bug in React Native\n\n## 1.5.0-alpha.0\n\n### Minor Changes\n\n- [#1666](https://github.com/onflow/fcl-js/pull/1666) [`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd) Thanks [@nialexsan](https://github.com/nialexsan)! - React Native support\n\n## 1.4.1\n\n### Patch Changes\n\n- [#1684](https://github.com/onflow/fcl-js/pull/1684) [`86173c99`](https://github.com/onflow/fcl-js/commit/86173c990ffbb34ef6ee25a9a1aae09866cc3f84) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types to t object in query/mutate args fn\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n- [#1639](https://github.com/onflow/fcl-js/pull/1639) [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for fcl.tx\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n- [#1574](https://github.com/onflow/fcl-js/pull/1574) [`be73c297`](https://github.com/onflow/fcl-js/commit/be73c2975330b3a8a33e8fa3edfdc25a7dc1a2b0) Thanks [@chasefleming](https://github.com/chasefleming)! - Generate types for FCL\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1475](https://github.com/onflow/fcl-js/pull/1475) [`6051030f`](https://github.com/onflow/fcl-js/commit/6051030f81fb102447bec40c758657ec20f43129) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates to only call account proof resolver if not logged in. Adds warning if not async resolver function.\n\n- [#1595](https://github.com/onflow/fcl-js/pull/1595) [`a46a6650`](https://github.com/onflow/fcl-js/commit/a46a6650b643e8545a7d58f96a1fe55a3ab0d414) Thanks [@justinbarry](https://github.com/justinbarry)! - Restore missing import statement\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n- [#1648](https://github.com/onflow/fcl-js/pull/1648) [`06655aee`](https://github.com/onflow/fcl-js/commit/06655aee2039f3e88741a5ee3b041ecfabb813c9) Thanks [@jribbink](https://github.com/jribbink)! - Fixed `setChainIdDefault()` race condition, instead run function on accessNode.api value changes\n\n- [#1640](https://github.com/onflow/fcl-js/pull/1640) [`b9b957c0`](https://github.com/onflow/fcl-js/commit/b9b957c0fa8829ae0f40d31225a524ddf0d56340) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Skip network requests when polling on service if document is not visible\n\n- [#1647](https://github.com/onflow/fcl-js/pull/1647) [`2f10082e`](https://github.com/onflow/fcl-js/commit/2f10082e7bd2d174c1b88c782756097c415289b3) Thanks [@jribbink](https://github.com/jribbink)! - Fix return type for fcl.mutate\n\n- [#1490](https://github.com/onflow/fcl-js/pull/1490) [`b2881f74`](https://github.com/onflow/fcl-js/commit/b2881f74f024aeca52d534d2ca6081fb57efd06d) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fix invariant type checks in FCL Interaction Template getter utils\n\n- [#1660](https://github.com/onflow/fcl-js/pull/1660) [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645) Thanks [@nialexsan](https://github.com/nialexsan)! - Switch to cross-fetch\n\n- [#1623](https://github.com/onflow/fcl-js/pull/1623) [`31140ef0`](https://github.com/onflow/fcl-js/commit/31140ef07b9c830759deb5545875dcc89e6f2e81) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Retry on network error is page is not visible during backchannel polling\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9), [`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1), [`74c75d51`](https://github.com/onflow/fcl-js/commit/74c75d5167560eb07da6e21f9f7835b5639ee7d5), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`66fe102a`](https://github.com/onflow/fcl-js/commit/66fe102a269aca71bd82c6ac55bb23527d04db01), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355), [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242), [`bd6ebb8e`](https://github.com/onflow/fcl-js/commit/bd6ebb8eea5b0de26c0de9b2e0e7561006783040), [`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22), [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4), [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72), [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020), [`687f45ec`](https://github.com/onflow/fcl-js/commit/687f45ec25e613399f031497634c4102935d114d), [`8c921ba2`](https://github.com/onflow/fcl-js/commit/8c921ba2098d2449846bb4a3fdf44a633f4cb11e), [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b)]:\n  - @onflow/config@1.1.0\n  - @onflow/util-address@1.1.0\n  - @onflow/sdk@1.2.0\n  - @onflow/rlp@1.1.0\n  - @onflow/types@1.1.0\n  - @onflow/util-actor@1.2.0\n  - @onflow/util-invariant@1.1.0\n  - @onflow/util-logger@1.2.0\n  - @onflow/util-template@1.1.0\n  - @onflow/util-uid@1.1.0\n\n## 1.4.0-alpha.12\n\n### Patch Changes\n\n- [#1660](https://github.com/onflow/fcl-js/pull/1660) [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645) Thanks [@nialexsan](https://github.com/nialexsan)! - Switch to cross-fetch\n\n## 1.4.0-alpha.11\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/sdk@1.2.0-alpha.10\n  - @onflow/config@1.1.0-alpha.8\n  - @onflow/rlp@1.1.0-alpha.2\n  - @onflow/types@1.1.0-alpha.2\n  - @onflow/util-actor@1.2.0-alpha.3\n  - @onflow/util-address@1.1.0-alpha.5\n  - @onflow/util-invariant@1.1.0-alpha.2\n  - @onflow/util-logger@1.2.0-alpha.3\n  - @onflow/util-template@1.1.0-alpha.2\n  - @onflow/util-uid@1.1.0-alpha.3\n\n## 1.4.0-alpha.10\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.4\n  - @onflow/util-logger@1.2.0-alpha.2\n  - @onflow/util-actor@1.2.0-alpha.2\n  - @onflow/util-uid@1.1.0-alpha.2\n  - @onflow/config@1.1.0-alpha.7\n  - @onflow/types@1.1.0-alpha.1\n  - @onflow/rlp@1.1.0-alpha.1\n  - @onflow/sdk@1.2.0-alpha.9\n\n## 1.4.0-alpha.9\n\n### Minor Changes\n\n- [#1639](https://github.com/onflow/fcl-js/pull/1639) [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for fcl.tx\n\n### Patch Changes\n\n- [#1648](https://github.com/onflow/fcl-js/pull/1648) [`06655aee`](https://github.com/onflow/fcl-js/commit/06655aee2039f3e88741a5ee3b041ecfabb813c9) Thanks [@jribbink](https://github.com/jribbink)! - Fixed `setChainIdDefault()` race condition, instead run function on accessNode.api value changes\n\n- [#1640](https://github.com/onflow/fcl-js/pull/1640) [`b9b957c0`](https://github.com/onflow/fcl-js/commit/b9b957c0fa8829ae0f40d31225a524ddf0d56340) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Skip network requests when polling on service if document is not visible\n\n- [#1647](https://github.com/onflow/fcl-js/pull/1647) [`2f10082e`](https://github.com/onflow/fcl-js/commit/2f10082e7bd2d174c1b88c782756097c415289b3) Thanks [@jribbink](https://github.com/jribbink)! - Fix return type for fcl.mutate\n\n## 1.4.0-alpha.8\n\n### Patch Changes\n\n- [#1623](https://github.com/onflow/fcl-js/pull/1623) [`31140ef0`](https://github.com/onflow/fcl-js/commit/31140ef07b9c830759deb5545875dcc89e6f2e81) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Retry on network error is page is not visible during backchannel polling\n\n## 1.4.0-alpha.7\n\n### Patch Changes\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n## 1.4.0-alpha.6\n\n### Patch Changes\n\n- [#1595](https://github.com/onflow/fcl-js/pull/1595) [`a46a6650`](https://github.com/onflow/fcl-js/commit/a46a6650b643e8545a7d58f96a1fe55a3ab0d414) Thanks [@justinbarry](https://github.com/justinbarry)! - Restore missing import statement\n\n## 1.4.0-alpha.5\n\n### Minor Changes\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n### Patch Changes\n\n- Updated dependencies [[`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72)]:\n  - @onflow/sdk@1.2.0-alpha.7\n\n## 1.4.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/config@1.1.0-alpha.4\n  - @onflow/rlp@1.1.0-alpha.0\n  - @onflow/sdk@1.2.0-alpha.6\n  - @onflow/types@1.1.0-alpha.0\n  - @onflow/util-actor@1.2.0-alpha.0\n  - @onflow/util-address@1.1.0-alpha.3\n  - @onflow/util-invariant@1.1.0-alpha.0\n  - @onflow/util-logger@1.2.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.0\n  - @onflow/util-uid@1.1.0-alpha.1\n\n## 1.4.0-alpha.3\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n### Patch Changes\n\n- Updated dependencies [[`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb)]:\n  - @onflow/config@1.1.0-alpha.3\n  - @onflow/sdk@1.2.0-alpha.5\n  - @onflow/util-address@1.1.0-alpha.2\n\n## 1.4.0-alpha.2\n\n### Minor Changes\n\n- [#1574](https://github.com/onflow/fcl-js/pull/1574) [`be73c297`](https://github.com/onflow/fcl-js/commit/be73c2975330b3a8a33e8fa3edfdc25a7dc1a2b0) Thanks [@chasefleming](https://github.com/chasefleming)! - Generate types for FCL\n\n### Patch Changes\n\n- Updated dependencies [[`74c75d51`](https://github.com/onflow/fcl-js/commit/74c75d5167560eb07da6e21f9f7835b5639ee7d5), [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020)]:\n  - @onflow/sdk@1.2.0-alpha.4\n  - @onflow/config@1.1.0-alpha.2\n\n## 1.4.0-alpha.1\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n### Patch Changes\n\n- Updated dependencies [[`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22), [`687f45ec`](https://github.com/onflow/fcl-js/commit/687f45ec25e613399f031497634c4102935d114d)]:\n  - @onflow/sdk@1.2.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.0\n  - @onflow/util-uid@1.1.0-alpha.0\n\n## 1.3.3-alpha.0\n\n### Patch Changes\n\n- [#1475](https://github.com/onflow/fcl-js/pull/1475) [`6051030f`](https://github.com/onflow/fcl-js/commit/6051030f81fb102447bec40c758657ec20f43129) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates to only call account proof resolver if not logged in. Adds warning if not async resolver function.\n\n- [#1490](https://github.com/onflow/fcl-js/pull/1490) [`b2881f74`](https://github.com/onflow/fcl-js/commit/b2881f74f024aeca52d534d2ca6081fb57efd06d) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fix invariant type checks in FCL Interaction Template getter utils\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9)]:\n  - @onflow/config@1.1.0-alpha.0\n  - @onflow/sdk@1.1.3-alpha.0\n  - @onflow/util-logger@1.1.3-alpha.0\n\n## 1.3.2\n\n### Patch Changes\n\n- [#1368](https://github.com/onflow/fcl-js/pull/1368) [`4bf01436`](https://github.com/onflow/fcl-js/commit/4bf014362fdd043e04a16d7305e8ed78ffd89d6b) Thanks [@sanyu1225](https://github.com/sanyu1225)! - make sure iframe background is translucent\n\n- Updated dependencies [[`f14cfb61`](https://github.com/onflow/fcl-js/commit/f14cfb61abcb877b3c8924508df593c6621413b4), [`7bdfa016`](https://github.com/onflow/fcl-js/commit/7bdfa016823d1caac23143351940b42f65d4d1c4)]:\n  - @onflow/types@1.0.5\n  - @onflow/config@1.0.5\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1439](https://github.com/onflow/fcl-js/pull/1439) [`a9347ffe`](https://github.com/onflow/fcl-js/commit/a9347ffe4dc1ebafb81999348956a95f56448632) Thanks [@gregsantos](https://github.com/gregsantos)! - Discovery include now sent as part of authn client config\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1352](https://github.com/onflow/fcl-js/pull/1352) [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d) Thanks [@gregsantos](https://github.com/gregsantos)! - Add plugin registry and allow for service and strategy injection\n\n* [#1323](https://github.com/onflow/fcl-js/pull/1323) [`1982c00b`](https://github.com/onflow/fcl-js/commit/1982c00bc334403bb603762a7f921bbe1887ee2b) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Adds FLIP-934 Interaction Template support to FCL.\n\n  Interaction Template is a concept established in FLIP-934. Read more about the FLIP here: https://github.com/onflow/flips/blob/main/flips/20220503-interaction-templates.md\n\n### Patch Changes\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - ### fcl\n\n  - Added sending `supportedStrategies` to Discovery (UI/API) on client.config\n\n  ***\n\n  ### fcl-wc\n\n  - updated `initFclWC` export/name to `init`\n  - Added `sessionRequestHook` and `injectedWallets` opts, updated pairing match to use service.uid.\n\n* [#1375](https://github.com/onflow/fcl-js/pull/1375) [`2a5fa910`](https://github.com/onflow/fcl-js/commit/2a5fa910009501c7c789efc9b1c1731668578361) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix issue where authenticating a Discovery API service would not respect service method.\n\n- [#1359](https://github.com/onflow/fcl-js/pull/1359) [`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6) Thanks [@jribbink](https://github.com/jribbink)! - Minify UMD build\n\n* [#1386](https://github.com/onflow/fcl-js/pull/1386) [`3fdcc3be`](https://github.com/onflow/fcl-js/commit/3fdcc3be2d206c0df3f3b250012db5c18cac3bed) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Remove support for InteractionTemplateUtils.getInteractionTemplateAudits on mainnet until support is added\n\n- [#1372](https://github.com/onflow/fcl-js/pull/1372) [`6708494d`](https://github.com/onflow/fcl-js/commit/6708494df236dc8c7375a2f91dc04fbcc03235c8) Thanks [@gregsantos](https://github.com/gregsantos)! - Add missing logger package to execService\n\n* [#1409](https://github.com/onflow/fcl-js/pull/1409) [`15d77220`](https://github.com/onflow/fcl-js/commit/15d77220a90be66b440129b73ffe889fe20335ab) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Hotfix to generate template interface id util\n\n- [#1397](https://github.com/onflow/fcl-js/pull/1397) [`f14b730c`](https://github.com/onflow/fcl-js/commit/f14b730c52bec664bda7bf222e3f0c0ab9c70f40) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Adds interaction template message getter utils\n\n* [#1403](https://github.com/onflow/fcl-js/pull/1403) [`0a9c9677`](https://github.com/onflow/fcl-js/commit/0a9c96770933df4e0ed685b0ee4575533e345ecb) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Hotfix to FCL query mutate prep ops\n\n- [#1417](https://github.com/onflow/fcl-js/pull/1417) [`17a7f1e4`](https://github.com/onflow/fcl-js/commit/17a7f1e413340f72f45350075e8ea79ce1c2b711) Thanks [@gregsantos](https://github.com/gregsantos)! - Moves some client configuration to execService as it may be useful for services other than `authn`\n\n* [#1413](https://github.com/onflow/fcl-js/pull/1413) [`5e6d114a`](https://github.com/onflow/fcl-js/commit/5e6d114a8fb0489c6bc70df8ec02d7ec4bb9ea1d) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Adds mainnet Interaction Template Audit contract to Interaction Template Utils\n\n- [#1357](https://github.com/onflow/fcl-js/pull/1357) [`ecbd77b2`](https://github.com/onflow/fcl-js/commit/ecbd77b2acfbe4a28793baca3db47c1d5347247d) Thanks [@gregsantos](https://github.com/gregsantos)! - Improve building discovery service on authn\n\n* [#1407](https://github.com/onflow/fcl-js/pull/1407) [`75d06938`](https://github.com/onflow/fcl-js/commit/75d069380c2dbb2040af57ce39a9847fb33a7db4) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fix circular dep in FCL prep-template-opts\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates Service Plugin validation to match spec, adds required serviceStrategy: {method: string, exec: () => {})\n\n* [#1404](https://github.com/onflow/fcl-js/pull/1404) [`f9f1dab7`](https://github.com/onflow/fcl-js/commit/f9f1dab70a6014b68ce5197544fae396340b6670) Thanks [@chasefleming](https://github.com/chasefleming)! - Fixes issue where Discovery API was not loading for server side rendered applications on Safari or Chrome Incognito.\n\n* Updated dependencies [[`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f)]:\n  - @onflow/sdk@1.1.2\n\n## 1.3.0-alpha.10\n\n### Patch Changes\n\n- [#1413](https://github.com/onflow/fcl-js/pull/1413) [`5e6d114a`](https://github.com/onflow/fcl-js/commit/5e6d114a8fb0489c6bc70df8ec02d7ec4bb9ea1d) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG -- [fcl] Adds mainnet Interaction Template Audit contract to Interaction Template Utils\n\n## 1.3.0-alpha.9\n\n### Patch Changes\n\n- [#1409](https://github.com/onflow/fcl-js/pull/1409) [`15d77220`](https://github.com/onflow/fcl-js/commit/15d77220a90be66b440129b73ffe889fe20335ab) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Hotfix to generate template interface id util\n\n* [#1407](https://github.com/onflow/fcl-js/pull/1407) [`75d06938`](https://github.com/onflow/fcl-js/commit/75d069380c2dbb2040af57ce39a9847fb33a7db4) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fix circular dep in FCL prep-template-opts\n\n## 1.3.0-alpha.8\n\n### Patch Changes\n\n- [#1404](https://github.com/onflow/fcl-js/pull/1404) [`f9f1dab7`](https://github.com/onflow/fcl-js/commit/f9f1dab70a6014b68ce5197544fae396340b6670) Thanks [@chasefleming](https://github.com/chasefleming)! - Fixes issue where Discovery API was not loading for server side rendered applications on Safari or Chrome Incognito.\n\n## 1.3.0-alpha.7\n\n### Patch Changes\n\n- [#1397](https://github.com/onflow/fcl-js/pull/1397) [`f14b730c`](https://github.com/onflow/fcl-js/commit/f14b730c52bec664bda7bf222e3f0c0ab9c70f40) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Adds interaction template message getter utils\n\n* [#1403](https://github.com/onflow/fcl-js/pull/1403) [`0a9c9677`](https://github.com/onflow/fcl-js/commit/0a9c96770933df4e0ed685b0ee4575533e345ecb) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Hotfix to FCL query mutate prep ops\n\n## 1.3.0-alpha.6\n\n### Patch Changes\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - ### fcl\n\n  - Added sending `supportedStrategies` to Discovery (UI/API) on client.config\n\n  ***\n\n  ### fcl-wc\n\n  - updated `initFclWC` export/name to `init`\n  - Added `sessionRequestHook` and `injectedWallets` opts, updated pairing match to use service.uid.\n\n* [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates Service Plugin validation to match spec, adds required serviceStrategy: {method: string, exec: () => {})\n\n## 1.3.0-alpha.5\n\n### Patch Changes\n\n- [#1386](https://github.com/onflow/fcl-js/pull/1386) [`3fdcc3be`](https://github.com/onflow/fcl-js/commit/3fdcc3be2d206c0df3f3b250012db5c18cac3bed) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Remove support for InteractionTemplateUtils.getInteractionTemplateAudits on mainnet until support is added\n\n## 1.3.0-alpha.4\n\n### Minor Changes\n\n- [#1323](https://github.com/onflow/fcl-js/pull/1323) [`1982c00b`](https://github.com/onflow/fcl-js/commit/1982c00bc334403bb603762a7f921bbe1887ee2b) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Adds FLIP-934 Interaction Template support to FCL.\n\n  Interaction Template is a concept established in FLIP-934. Read more about the FLIP here: https://github.com/onflow/flips/blob/main/flips/20220503-interaction-templates.md\n\n### Patch Changes\n\n- [#1375](https://github.com/onflow/fcl-js/pull/1375) [`2a5fa910`](https://github.com/onflow/fcl-js/commit/2a5fa910009501c7c789efc9b1c1731668578361) Thanks [@chasefleming](https://github.com/chasefleming)! - Fix issue where authenticating a Discovery API service would not respect service method.\n\n## 1.3.0-alpha.3\n\n### Patch Changes\n\n- [#1372](https://github.com/onflow/fcl-js/pull/1372) [`6708494d`](https://github.com/onflow/fcl-js/commit/6708494df236dc8c7375a2f91dc04fbcc03235c8) Thanks [@gregsantos](https://github.com/gregsantos)! - Add missing logger package to execService\n\n## 1.3.0-alpha.2\n\n### Minor Changes\n\n- [#1352](https://github.com/onflow/fcl-js/pull/1352) [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d) Thanks [@gregsantos](https://github.com/gregsantos)! - Add plugin registry and allow for service and strategy injection\n\n### Patch Changes\n\n- [#1359](https://github.com/onflow/fcl-js/pull/1359) [`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6) Thanks [@jribbink](https://github.com/jribbink)! - Minify UMD build\n\n## 1.2.1-alpha.1\n\n### Patch Changes\n\n- [#1357](https://github.com/onflow/fcl-js/pull/1357) [`ecbd77b2`](https://github.com/onflow/fcl-js/commit/ecbd77b2acfbe4a28793baca3db47c1d5347247d) Thanks [@gregsantos](https://github.com/gregsantos)! - Improve building discovery service on authn\n\n- Updated dependencies []:\n  - @onflow/sdk@1.1.2-alpha.1\n\n## 1.2.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f)]:\n  - @onflow/sdk@1.1.2-alpha.0\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1202](https://github.com/onflow/fcl-js/pull/1202) [`13c1192e`](https://github.com/onflow/fcl-js/commit/13c1192e972c182bbad8fd7f6c68ec08a6920d7a) Thanks [@chasefleming](https://github.com/chasefleming)! - Show uninstalled extensions in Discovery API\n\n### Patch Changes\n\n- [#1337](https://github.com/onflow/fcl-js/pull/1337) [`0c05ae39`](https://github.com/onflow/fcl-js/commit/0c05ae39b2925398029c5b74370fe158b6707d00) Thanks [@gregsantos](https://github.com/gregsantos)! - Adds withPrefix to addresses in verifyAccountProof and verifyUserSignature\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1326](https://github.com/onflow/fcl-js/pull/1326) [`053ff10d`](https://github.com/onflow/fcl-js/commit/053ff10dbc1d6ec64b1cafec9dad6b58ad154552) Thanks [@jribbink](https://github.com/jribbink)! - Fix getAccount executing at latest finalized block instead of sealed block (version bump `@onflow/transport-http`)\n\n* [#1283](https://github.com/onflow/fcl-js/pull/1283) [`b0f7a234`](https://github.com/onflow/fcl-js/commit/b0f7a234a6e71c28e4a02d8edf4927f73e76fa72) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates keyIndices args passed in as Numbers in fcl.verify functions\n\n- [#1274](https://github.com/onflow/fcl-js/pull/1274) [`865e412c`](https://github.com/onflow/fcl-js/commit/865e412c5c975e68f30e9c8b4b225030560a5187) Thanks [@jribbink](https://github.com/jribbink)! - Throw error if FCL popup/tab is blocked from opening or if sendMsgToFCL cannot access parent window reference for postMessage.\n\n* [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n* Updated dependencies [[`053ff10d`](https://github.com/onflow/fcl-js/commit/053ff10dbc1d6ec64b1cafec9dad6b58ad154552), [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/sdk@1.1.1\n  - @onflow/config@1.0.3\n  - @onflow/rlp@1.0.2\n  - @onflow/types@1.0.3\n  - @onflow/util-actor@1.1.1\n  - @onflow/util-address@1.0.2\n  - @onflow/util-invariant@1.0.2\n  - @onflow/util-logger@1.1.1\n  - @onflow/util-template@1.0.3\n  - @onflow/util-uid@1.0.2\n\n## 1.1.1-alpha.2\n\n### Patch Changes\n\n- Fix getAccount executing at latest finalized block instead of sealed block (version bump `@onflow/transport-http`)\n\n## 1.1.1-alpha.1\n\n### Patch Changes\n\n- [#1283](https://github.com/onflow/fcl-js/pull/1283) [`b0f7a234`](https://github.com/onflow/fcl-js/commit/b0f7a234a6e71c28e4a02d8edf4927f73e76fa72) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates keyIndices args passed in as Numbers in fcl.verify functions\n\n* [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n* Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/config@1.0.3-alpha.0\n  - @onflow/rlp@1.0.2-alpha.0\n  - @onflow/sdk@1.1.1-alpha.1\n  - @onflow/types@1.0.3-alpha.0\n  - @onflow/util-actor@1.1.1-alpha.0\n  - @onflow/util-address@1.0.2-alpha.0\n  - @onflow/util-invariant@1.0.2-alpha.0\n  - @onflow/util-logger@1.1.1-alpha.1\n  - @onflow/util-template@1.0.3-alpha.0\n  - @onflow/util-uid@1.0.2-alpha.0\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- [#1274](https://github.com/onflow/fcl-js/pull/1274) [`865e412c`](https://github.com/onflow/fcl-js/commit/865e412c5c975e68f30e9c8b4b225030560a5187) Thanks [@jribbink](https://github.com/jribbink)! - Throw error if FCL popup/tab is blocked from opening or if sendMsgToFCL cannot access parent window reference for postMessage.\n\n- Updated dependencies []:\n  - @onflow/sdk@1.1.1-alpha.0\n  - @onflow/util-logger@1.1.1-alpha.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1243](https://github.com/onflow/fcl-js/pull/1243) [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d) Thanks [@jribbink](https://github.com/jribbink)! - Make errors accessible to subscribers from fcl.tx polling (second argument of callback) and throw error for onceSealed, onceExecuted, onceFinalized promises. Also removed retried polling requests as they are a redundancy already implemented by @onflow/transport-http\n\n### Patch Changes\n\n- [#1177](https://github.com/onflow/fcl-js/pull/1177) [`e38f9fe4`](https://github.com/onflow/fcl-js/commit/e38f9fe4ba030693984ab74bffd5bca387ac9a09) Thanks [@hotrungnhan](https://github.com/hotrungnhan)! - Fix events subcribe block height issue and add polling rate guide to docs.\n\n* [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n- [#1211](https://github.com/onflow/fcl-js/pull/1211) [`f4c6fb9a`](https://github.com/onflow/fcl-js/commit/f4c6fb9a05e8cf717afcd6a3b3b4c8b102f253e3) Thanks [@gregsantos](https://github.com/gregsantos)! - Update event listeners in strategies\n  Fixes a bug where event listener was not being removed on close\n\n* [#1210](https://github.com/onflow/fcl-js/pull/1210) [`457f4996`](https://github.com/onflow/fcl-js/commit/457f49964dd2a0e849ae18a8dd0864bcb52082e8) Thanks [@jribbink](https://github.com/jribbink)! - Add deprecation warning when \"env\" is used instead of \"flow.network\" in config\n\n* Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`90d5163a`](https://github.com/onflow/fcl-js/commit/90d5163a7723dd529324a271ea8accaa43a3d7be), [`45951f1a`](https://github.com/onflow/fcl-js/commit/45951f1af310d302ee708e43d1a939265f404d2c), [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4), [`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5), [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb), [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/sdk@1.1.0\n  - @onflow/types@1.0.2\n  - @onflow/util-logger@1.1.0\n  - @onflow/util-template@1.0.2\n  - @onflow/util-actor@1.1.0\n  - @onflow/config@1.0.2\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1243](https://github.com/onflow/fcl-js/pull/1243) [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d) Thanks [@jribbink](https://github.com/jribbink)! - Make errors accessible to subscribers from fcl.tx polling (second argument of callback) and throw error for onceSealed, onceExecuted, onceFinalized promises. Also removed retried polling requests as they are a redundancy already implemented by @onflow/transport-http\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/sdk@1.1.0-alpha.3\n  - @onflow/types@1.0.2-alpha.0\n  - @onflow/util-logger@1.1.0-alpha.2\n  - @onflow/util-template@1.0.2-alpha.0\n  - @onflow/util-actor@1.1.0-alpha.0\n  - @onflow/config@1.0.2-alpha.0\n\n## 1.0.3-alpha.1\n\n### Patch Changes\n\n- [#1210](https://github.com/onflow/fcl-js/pull/1210) [`457f4996`](https://github.com/onflow/fcl-js/commit/457f49964dd2a0e849ae18a8dd0864bcb52082e8) Thanks [@jribbink](https://github.com/jribbink)! - Add deprecation warning when \"env\" is used instead of \"flow.network\" in config\n\n- Updated dependencies [[`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5)]:\n  - @onflow/sdk@1.1.0-alpha.2\n\n## 1.0.3-alpha.0\n\n### Patch Changes\n\n- [#1177](https://github.com/onflow/fcl-js/pull/1177) [`e38f9fe4`](https://github.com/onflow/fcl-js/commit/e38f9fe4ba030693984ab74bffd5bca387ac9a09) Thanks [@hotrungnhan](https://github.com/hotrungnhan)! - Fix events subcribe block height issue and add polling rate guide to docs.\n\n* [#1211](https://github.com/onflow/fcl-js/pull/1211) [`f4c6fb9a`](https://github.com/onflow/fcl-js/commit/f4c6fb9a05e8cf717afcd6a3b3b4c8b102f253e3) Thanks [@gregsantos](https://github.com/gregsantos)! - Update event listeners in strategies\n  Fixes a bug where event listener was not being removed on close\n* Updated dependencies [[`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314), [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb)]:\n  - @onflow/sdk@1.0.2-alpha.0\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1190](https://github.com/onflow/fcl-js/pull/1190) [`3355cb14`](https://github.com/onflow/fcl-js/commit/3355cb148f2e6a447d8076b3ae62c40747c338ce) Thanks [@jribbink](https://github.com/jribbink)! - Updated wallet provider spec for sansPrefix/withPrefix address requirements for acct.address/compSig.address\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1181](https://github.com/onflow/fcl-js/pull/1181) [`25e87101`](https://github.com/onflow/fcl-js/commit/25e8710162a105771d1629eced6270ce37718a1b) Thanks [@jribbink](https://github.com/jribbink)! - Added exception handling in transaction subscriber polling to handle network disconnect/server error events\n\n* [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n* Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/config@1.0.1\n  - @onflow/rlp@1.0.1\n  - @onflow/sdk@1.0.1\n  - @onflow/types@1.0.1\n  - @onflow/util-actor@1.0.1\n  - @onflow/util-address@1.0.1\n  - @onflow/util-invariant@1.0.1\n  - @onflow/util-template@1.0.1\n  - @onflow/util-uid@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1159](https://github.com/onflow/fcl-js/pull/1159) [`28b482fa`](https://github.com/onflow/fcl-js/commit/28b482fa45131faa9d3fad4195a6790b0d301210) Thanks [@gregsantos](https://github.com/gregsantos)! - Updated Account Proof Domain Tag in WalletUtils encode to \"FCL-ACCOUNT-PROOF-V0.0\", Update encodeAccountProof padStart\n\n* [#1158](https://github.com/onflow/fcl-js/pull/1158) [`f4ae08bb`](https://github.com/onflow/fcl-js/commit/f4ae08bb7e2bdfd1a0364ad1e37b90a489cd104c) Thanks [@gregsantos](https://github.com/gregsantos)! - # Removed default contract address for verifyAccountProof, verifyUserSignatures\n\n  AppUtils.verifyAccountProof and AppUtils.verifyUserSignatures now requires\n  setting `fcl.config.flow.network` (testnet or mainnet) or override contract address via\n  `opts.fclCryptoContract`\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Minor Changes\n\n- [#1118](https://github.com/onflow/fcl-js/pull/1118) [`21a2dda7`](https://github.com/onflow/fcl-js/commit/21a2dda728aeccee5f3a6c89f8a0c0a9b332e997) Thanks [@gregsantos](https://github.com/gregsantos)! - Import Buffer from rlp in encode-account-proof\n\n### Patch Changes\n\n- [#1143](https://github.com/onflow/fcl-js/pull/1143) [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60) Thanks [@gregsantos](https://github.com/gregsantos)! - Internal update to util-actor\n\n* [#1165](https://github.com/onflow/fcl-js/pull/1165) [`f4ce7b6e`](https://github.com/onflow/fcl-js/commit/f4ce7b6eef551dba1ba6fd94ee18a99176f4a041) Thanks [@gregsantos](https://github.com/gregsantos)! - Remove window.extensions from service msg\n\n- [#1141](https://github.com/onflow/fcl-js/pull/1141) [`ac108e20`](https://github.com/onflow/fcl-js/commit/ac108e2082659cd9f763c42638d2664e593f514c) Thanks [@gregsantos](https://github.com/gregsantos)! - Add support for local FCLCrypto contract account-proof/user-signature verification. fcl.config.network or opts.fclCryptoContract override is now required to use this api.\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n- Updated dependencies [[`700433d5`](https://github.com/onflow/fcl-js/commit/700433d50d4156183b09b13781f7f74f23882586), [`6ff970df`](https://github.com/onflow/fcl-js/commit/6ff970dfc04281c86043e1cf8f5bceb633dc4186), [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7), [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a), [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60), [`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/sdk@1.0.0\n  - @onflow/config@1.0.0\n  - @onflow/util-actor@1.0.0\n  - @onflow/util-address@1.0.0\n  - @onflow/util-invariant@1.0.0\n  - @onflow/rlp@1.0.0\n  - @onflow/types@1.0.0\n  - @onflow/util-template@1.0.0\n  - @onflow/util-uid@1.0.0\n\n## 1.0.0-alpha.3\n\n### Major Changes\n\n- [#1159](https://github.com/onflow/fcl-js/pull/1159) [`28b482fa`](https://github.com/onflow/fcl-js/commit/28b482fa45131faa9d3fad4195a6790b0d301210) Thanks [@gregsantos](https://github.com/gregsantos)! - Updated Account Proof Domain Tag in WalletUtils encode to \"FCL-ACCOUNT-PROOF-V0.0\", Update encodeAccountProof padStart\n\n### Patch Changes\n\n- [#1165](https://github.com/onflow/fcl-js/pull/1165) [`f4ce7b6e`](https://github.com/onflow/fcl-js/commit/f4ce7b6eef551dba1ba6fd94ee18a99176f4a041) Thanks [@gregsantos](https://github.com/gregsantos)! - Remove window.extensions from service msg\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n* Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/config@1.0.0-alpha.2\n  - @onflow/rlp@1.0.0-alpha.1\n  - @onflow/sdk@1.0.0-alpha.2\n  - @onflow/types@1.0.0-alpha.1\n  - @onflow/util-actor@1.0.0-alpha.2\n  - @onflow/util-address@1.0.0-alpha.1\n  - @onflow/util-invariant@1.0.0-alpha.1\n  - @onflow/util-template@1.0.0-alpha.1\n  - @onflow/util-uid@1.0.0-alpha.1\n\n## 1.0.0-alpha.2\n\n### Major Changes\n\n- [#1158](https://github.com/onflow/fcl-js/pull/1158) [`f4ae08bb`](https://github.com/onflow/fcl-js/commit/f4ae08bb7e2bdfd1a0364ad1e37b90a489cd104c) Thanks [@gregsantos](https://github.com/gregsantos)! - # Removed default contract address for verifyAccountProof, verifyUserSignatures\n\n  AppUtils.verifyAccountProof and AppUtils.verifyUserSignatures now requires\n  setting `fcl.config.flow.network` (testnet or mainnet) or override contract address via\n  `opts.fclCryptoContract`\n\n### Patch Changes\n\n- [#1143](https://github.com/onflow/fcl-js/pull/1143) [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60) Thanks [@gregsantos](https://github.com/gregsantos)! - Internal update to util-actor\n\n* [#1141](https://github.com/onflow/fcl-js/pull/1141) [`ac108e20`](https://github.com/onflow/fcl-js/commit/ac108e2082659cd9f763c42638d2664e593f514c) Thanks [@gregsantos](https://github.com/gregsantos)! - Add support for local FCLCrypto contract account-proof/user-signature verification. fcl.config.network or opts.fclCryptoContract override is now required to use this api.\n\n- [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n- Updated dependencies [[`700433d5`](https://github.com/onflow/fcl-js/commit/700433d50d4156183b09b13781f7f74f23882586), [`6ff970df`](https://github.com/onflow/fcl-js/commit/6ff970dfc04281c86043e1cf8f5bceb633dc4186), [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7), [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a), [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60), [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe)]:\n  - @onflow/sdk@1.0.0-alpha.1\n  - @onflow/config@1.0.0-alpha.1\n  - @onflow/util-actor@1.0.0-alpha.1\n\n## 1.0.0-alpha.1\n\n### Minor Changes\n\n- 21a2dda: Import Buffer from rlp in encode-account-proof\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- Updated dependencies [7469c5c3]\n- Updated dependencies\n\n  - @onflow/util-address@1.0.0-alpha.0\n  - @onflow/util-invariant@1.0.0-alpha.0\n  - @onflow/rlp@1.0.0-alpha.0\n  - @onflow/sdk@1.0.0-alpha.0\n  - @onflow/types@1.0.0-alpha.0\n  - @onflow/util-actor@1.0.0-alpha.0\n  - @onflow/util-template@1.0.0-alpha.0\n  - @onflow/util-uid@1.0.0-alpha.0\n\n- 2022-03-28 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle) Use latest SDK methods in fcl events subscriber.\n- 2022-02-11 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle) Uses Buffer from @onflow/rlp.\n- 2022-02-25 -- [gregsantos](https://github.com/gregsantos): Remove `\"FCL:LAUNCH:EXTENSION\"` type from extension util send\n- 2022-02-14 -- [gregsantos](https://github.com/gregsantos): Update `WalletUtils` encoding for authn-signing and auth-verifying.\n  Encoding should leave all field that can exist as Buffers before RLP encoding as Buffers. This strategy will help maintain greater consistency with how these fields are treated when encoded in other areas of Flow.\n\n```js\nMESSAGE = HEX(\n  USER_DOMAIN_TAG, // Buffer, right padded to 32 bytes long\n  RLP(\n    APP_DOMAIN_TAG, // [Optional] Buffer, right padded to 32 bytes long\n    ADDRESS, // Buffer, left padded to 8 bytes long\n    TIMESTAMP // Number\n  )\n)\n```\n\n- 2022-02-14 -- [chasefleming](https://github.com/chasefleming): Remove experimental redir warning from previous alpha build.\n- 2022-02-08 -- [gregsantos](https://github.com/gregsantos): Update extension strategy to add support for `EXT/RPC` service method\n\n## 0.0.79-alpha.3 - 2022-02-03\n\n- 2022-02-03 -- [gregsantos](https://github.com/gregsantos): VSN `@onflow/sdk` 0.0.57-alpha.2 -> 0.0.57-alpha.3\n- 2022-02-03 -- [gregsantos](https://github.com/gregsantos): Export `voucherIntercept` and `voucherToTxId` from `sdk`\n- 2022-02-02 -- [gregsantos](https://github.com/gregsantos): Update start script to set current `VERSION`\n\n## 0.0.79-alpha.2 - 2022-01-21\n\n- 2022-01-21 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): VSN `@onflow/sdk` 0.0.57-alpha.1 -> 0.0.57-alpha.2\n\n## 0.0.79-alpha.1 - 2022-01-21\n\n- 2022-01-21 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): VSN `@onflow/sdk` 0.0.56 -> 0.0.57-alpha.1\n\n## 0.0.78-alpha.11 - 2022-01-19\n\n- 2022-01-19 -- Expose new `block` method from `@onflow/sdk`.\n- 2022-01-19 -- VSN `@onflow/sdk` 0.0.56-alpha.2 -> 0.0.56-alpha.3\n- 2022-01-18 -- Support `discovery.wallet.method` options when set in config for authentication with Discovery API services.\n- 2022-01-18 -- Add missing `service` and `app` to config for exec service redirect.\n\n## 0.0.78-alpha.10 - 2022-01-05\n\n- 2021-12-17 -- Fix bug where `currentUser` passed as an argument is failing.\n- 2021-12-02 -- Adds optional Authentication Refresh Service to `fcl.authenticate`\n\nWallet Providers can now provide an optional **Authentication Refresh Service** to FCL upon initial configuration.\nIf provided, FCL will attempt to refresh the user's session by executing this service before a transaction.\n\nFCL will use the service endpoint and method provided to request updated authentication data from the Wallet Provider.\nThe service is expected to reauthenticate the user or prompt for approval if required. Updated authentication information\n(user data and services) should be sent back to FCL as part of an APPROVED `PollingResponse`. (see example below using `WalletUtils.approve`)\n\nIf FCL receives back an APPROVED `PollingResponse`, it rebuilds `fcl.currentUser` with updated session data and services\nand the Authentication Refresh process is complete.\nThe initial transaction can then be executed with confidence the user session is valid.\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.approve({\n  f_type: \"AuthnResponse\",\n  f_vsn: \"1.0.0\"\n  services: [                              // All the stuff that configures FCL\n  // Authentication Service - REQUIRED\n    {\n      f_type: \"Service\",                   // Its a service!\n      f_vsn: \"1.0.0\",                      // Follows the v1.0.0 spec for the service\n      type: \"authn\",                       // the type of service it is\n      ...\n    },\n  // Authentication Refresh Service\n  {\n    f_type: \"Service\",                      // Its a service!\n    f_vsn: \"1.0.0\",                         // Follows the v1.0.0 spec for the service\n    type: \"authn-refresh\",                  // The type of service it is\n    method: \"HTTP/POST\",                    // Back Channel\n    endpoint: \"authentication-refresh-url\", // The authentication refresh endpoint\n    uid: \"awesome-wallet#authn-refresh\",    // A unique identifier for the service\n    id: \"0xUSER\",                           // the wallets internal id for the user or flow address\n    data: {\n      f_type: \"authn-refresh\",\n      f_vsn: \"1.0.0\",\n      address: \"0xUSER\",                    // The user's address with prefix\n    },                                      // will be included in the requests body\n    params: { }                             // will be included in the requests url\n  },\n  /// Additional Services\n  ...\n  ]\n})\n\n```\n\n- 2021-12-07 -- Internal: Updates `fcl.verifyUserSignatures` adding additional validation. Extends Cadence query script to add key weight threshold and enforces signatures need to be from a single account address.\n\n## 0.0.78-alpha.9 - 2021-12-03\n\n- 2021-12-01 -- Internal: Wrap authz in resolve to dedupe accounts. Remove user `notExpired` check.\n- 2021-11-30 -- Allow apps to add opt-in wallets in Discovery with config.\n\n```javascript\nimport {config} from \"@onflow/fcl\"\n\n// Include supports discovery.wallet or discovery.authn.endpoint\nconfig({\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n  \"discovery.authn.endpoint\":\n    \"https://fcl-discovery.onflow.org/api/testnet/authn\",\n  \"discovery.authn.include\": [\"0x123\"], // Service account address\n})\n```\n\n- 2021-11-22 -- Updates to use account key `HashAlgorithm` in `verifyUSerSignatures` instead of default `SHA3_256`\n- 2021-11-19 -- Update `buildUser` with with correct data prop for `expiresAt`\n\n## 0.0.78-alpha.8 - 2021-11-17\n\n- 2021-11-17 -- VSN `@onflow/types` 0.0.5 -> 0.0.6\n\n## 0.0.78-alpha.7 - 2021-11-12\n\n- 2021-11-10 -- Allow configurable Discovery in FCL via `fcl.discovery` with current support for authn services.\n\nAn app developer will now be able to list services for authentication (\"authn\") in their application and authenticate without having to point directly at a single wallet or `\"discovery.wallet\"` which is a pre-constructed UI for Flow services.\n\nTo use this, first set in the config the API endpoint for fetching Flow services.\n\n```javascript\nimport {config} from \"@onflow/fcl\"\n\nconfig({\n  \"discovery.authn.endpoint\":\n    \"https://fcl-discovery.onflow.org/api/testnet/authn\",\n})\n\n// On mainnet, you can use https://fcl-discovery.onflow.org/api/authn\n```\n\nThen in an application you can get services with the following:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nfcl.discovery.authn.subscribe(callback)\n\n// OR\n\nfcl.discovery.authn.snapshot()\n```\n\nThis will return a list a services which you can then authenticate with the following:\n\n```javascript\nfcl.authenticate({service})\n```\n\nAn example React component could then wind up looking like this:\n\n```javascript\nimport \"./config\"\nimport {useState, useEffect} from \"react\"\nimport * as fcl from \"@onflow/fcl\"\n\nfunction Component() {\n  const [services, setServices] = useState([])\n  useEffect(\n    () => fcl.discovery.authn.subscribe(res => setServices(res.results)),\n    []\n  )\n\n  return (\n    <div>\n      {services.map(service => (\n        <button\n          key={service.provider.address}\n          onClick={() => fcl.authenticate({service})}\n        >\n          Login with {service.provider.name}\n        </button>\n      ))}\n    </div>\n  )\n}\n```\n\n- 2021-11-10 -- Updates pop/tab to reject on force window close\n- 2021-10-29 -- Removes default `config.fcl.appDomainTag` and updates docs.\n\n## 0.0.78-alpha.6 - 2021-10-25\n\n- 2021-10-25 -- Corrects import error in `fcl.events`\n\n## 0.0.78-alpha.5 - 2021-10-21\n\n- 2021-10-21 -- SDK VSN 0.0.55 -> 0.0.56-alpha.1\n\n## 0.0.78-alpha.4 - 2021-10-19\n\n- 2021-10-12 -- Adds `execExtRPC` strategy for use with browser extension communication. Adds new `WalletUtils.ready`, `WalletUtils.redirect` and `WalletUtils.injectExtService` utils. `WalletUtils.ready` takes a callback and optional message data. It tells FCL that the frame/window/tab is ready to receive messages and calls your callback with `FCL:VIEW:READY:RESPONSE` data.\n\nInternal: Extracts message event listener callbacks into `buildMessageHandler` on `extension`, `pop`, `frame`, and `tab`\n\nAn extension can be made available in FCL Discovery and displayed as a wallet choice by pushing a `Service` of type `authn` to an array of `fcl_extensions` on the window object or using the `injectExtService` wallet utility.\n\n```javascript\nlet AuthnService = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authn\",\n  uid: \"awesome-wallet-extension#authn\",\n  endpoint: \"awesome-wallet-extension\",\n  method: \"EXT/RPC\",\n  id: \"0x5678\",\n  identity: {\n    address: \"0x1234\",\n  },\n  provider: {\n    address: null,\n    name: \"Awesome Wallet Extension\",\n    icon: null,\n    description: \"Awesome Wallet Extension for Chrome\",\n  },\n}\n\nif (!Array.isArray(window.fcl_extensions)) {\n  window.fcl_extensions = []\n}\nwindow.fcl_extensions.push(AuthnService)\n```\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.injectExtService(AuthnService)\n```\n\n- 2021-10-01 -- Simplify passing `currentUser` data into args with the ability to pass `currentUser` as param instead of a creating a user snapshot before.\n\nExamples of `currentUser` as a param.\n\n```javascript\nimport {query, currentUser} from \"@onflow/fcl\"\n\nawait query({\n  cadence: `\n    pub fun main(currentUser: Address): Address {\n      return currentUser\n    }\n  `,\n  args: (arg, t) => [currentUser],\n})\n```\n\n## 0.0.78-alpha.3 - 2021-10-01\n\n- 2021-10-01 -- SDK VSN 0.0.55\n- 2021-09-29 -- Update `pop` height\n- 2021-09-27 -- Add warning for using currentUser server side and turn off local and session storage if server side\n\n## 0.0.78-alpha.2 - 2021-09-23\n\n- 2021-09-22 -- Adds `service` and `config` to `http-post` data\n- 2021-09-21 -- Updates `fcl.authenticate` to include msg data `timestamp`, and optional `appDomainTag` for signing (**Proveable Authn**)\n- 2021-09-20 -- Adds wallet utilities for encoding provable authentication messages\n\n## 0.0.78-alpha.1 - 2021-09-17\n\n- 2021-09-16 -- Adds redirect option for `POP/RPC` and `TAB/RPC`\n\n## 0.0.77 - 2021-09-17\n\n- 2021-09-16 -- Simplifies current user syntax from `currentUser()` to `currentUser`\n\nExamples of `currentUser` functionality.\n\n```javascript\nimport {currentUser} from \"@onflow/fcl\"\n\ncurrentUser.snapshot()\ncurrentUser.subscribe(callback)\n```\n\n- 2021-09-14 -- Adds `WalletUtils.CompositeSignature` constructor.\n- 2021-08-27 -- Adds `config.fcl.storage` allowing for injection of desired storage option. Defaults to `SESSION_STORAGE`.\n\n```javascript\nexport const SESSION_STORAGE = {\n  can: true,\n  get: async key => JSON.parse(sessionStorage.getItem(key)),\n  put: async (key, value) => sessionStorage.setItem(key, JSON.stringify(value)),\n}\n```\n\n## 0.0.77-alpha.4 - 2021-08-27\n\n- 2021-08-27 -- Add `WalletUtils.encodeMessageFromSignable`.\n- 2021-08-25 -- Move `verifyUserSignatures` to separate module, removing from `currentUser`\n- 2021-08-20 -- Remove default `config`, fix message check in `onMessageFromFCL`\n- 2021-08-19 -- Add `WalletUtils.approve`, `WalletUtils.decline`, and `WalletUtils.close`\n- 2021-08-12 -- Update `pop`, `tab` onReady response to include deprecated `FCL:FRAME:READY:RESPONSE`.\n- 2021-08-10 -- Update `frame` onReady response to include deprecated `FCL:FRAME:READY:RESPONSE`.\n\n## 0.0.77-alpha.3 - 2021-08-04\n\n- 2021-08-04 -- Adds `execTabRPC` strategy.\n- 2021-08-02 -- Adds `WalletUtils.onMessageFromFCL`. Update response types to use `VIEW` and add deprecation warnings for `FRAME`.\n\n## 0.0.77-alpha.2 - 2021-07-30\n\n- 2021-07-29 -- Adds `execLocal` to handle rendering of `http-post` service `local-view`.\n- 2021-07-26 -- Updates `currentUser.authenticate()` to use execService with parameter destructuring.\n\n## 0.0.77-alpha.1 - 2021-07-23\n\n- 2021-07-23 -- VSN `@onflow/sdk` 0.0.53 -> 0.0.54\n- 2021-07-23 -- Reverts to iFrame as default wallet method/view.\n\n## 0.0.77-pain.1\n\n> **PAIN** builds are experimental builds that change a fundamental feature in a not yet backwards compatible way.\n> They exist to test and vet ideas and concepts that may make their way into a non-pain build.\n> They are called a **PAIN** build because if you are not the intended consumer of the build you will have a really bad time.\n> Please use non-pain builds to avoid pain.\n\n- 2021-07-21 -- **EXPERIMENTAL** **Replaces iFrame with pop-up window for authn and authz**. Add `WalletUtils` and use POP/RPC as default.\n\n## 0.0.[75-76] - 2021-07-201\n\n- 2021-07-21 -- SDK VSN 0.0.52\n- 2021-07-21 -- Updates `verifyUserSignatures` to use `account` util from `@onflow/sdk`\n\n## 0.0.74 - 2021-07-20\n\n- 2021-07-20 -- SDK VSN 0.0.51\n\n## 0.0.74-alpha.2 - 2021-07-19\n\n- 2021-07-15 -- Update `verifyUserSignature` to pass publicKey signingAlgos into Cadence script. Allows for successfull verification of supported algorithms ECDSA_P256 and ECDSA_secp256k1\n- 2021-07-14 -- Updates `fcl.serialize` to use new `config.first`\n\n## 0.0.74-alpha.1 - 2021-07-13\n\n- 2021-07-13 -- VSN `@onflow/sdk` 0.0.50 -> 0.0.51-alpha.1\n  - Includes a fix for an issue in what `fcl.serialize` returned.\n  - Exposed new `TestUtils` Top Level\n  - Includes some new `config` functionality.\n    - `config().put(\"foo\", \"bar\")` -> `config.put(\"foo\", \"bar\")` config no longer needs to be invoked to access actor methods.\n    - `config.overload` allows for injecting configuration data during the execution of the callback.\n    - `config.first([\"foo\", \"bar\"], \"fallback\")` will return the first non null config or the fallback.\n    - `config.all()` will return the current configuration information.\n- 2021-07-08 -- Adds `verifyUserSignatures` util to `currentUser()` and refines use of `composite-signature` normalization\n- 2021-06-30 -- Updates `fcl.serialize` to fix setting `resolveFunction`\n\nExamples of `config` functionality.\n\n```javascript\nimport {config} from \"@onflow/fcl\"\n\nexpect(await config.all()).toEqual({})\n\nconfig({\n  \"foo.bar\": \"baz\",\n})\nconfig.put(\"bob\", \"pat\")\n\nexpect(await config.all()).toEqual({\n  \"foo.bar\": \"baz\",\n  bob: \"pat\",\n})\n\nvar ret = await config.overload({bob: \"bill\"}, async () => {\n  expect(await config.all()).toEqual({\n    \"foo.bar\": \"baz\",\n    bob: \"bill\",\n  })\n  return \"woot\"\n})\n\nexpect(ret).toBe(\"woot\")\n\nexpect(await config.all()).toEqual({\n  \"foo.bar\": \"baz\",\n  bob: \"pat\",\n})\n\nexpect(await config.first([\"bax\", \"foo.bar\"], \"FALLBACK\")).toBe(\"baz\")\nexpect(await config.first([\"nope\", \"oh-no\"], \"FALLBACK\")).toBe(\"FALLBACK\")\n```\n\n## 0.0.73 - 2021-06-21\n\n- 2021-06-21 -- Full VSN release of FCL.\n\n## 0.0.73-alpha.3 - 2021-06-18\n\n- 2021-06-18 -- Removed `temp.js`\n\n## 0.0.73-alpha.2 - 2021-06-17\n\n- 2021-06-17 -- VSN `@onflow/sdk` 0.0.48 -> 0.0.50\n- 2021-06-17 -- Used `config` from `@onflow/sdk` instead of `@onflow/config`\n\n## 0.0.73-alpha.1 - 2021-06-17\n\n- 2021-06-17 -- **EXPERIMENTAL** Exposes new top level `fcl.mutate` function (@orodio)\n\nNew **EXPERIMENTAL** `fcl.mutate` functionality (mirors `fcl.query` but for transactions) can be used like this.\n\n```javascript\n// profile contract on testnet\nimport * as fcl from \"@onflow/fcl\"\n\n// address overloading works for fcl.mutate too\nfcl.config().put(\"0xProfile\", \"0xba1132bc08f82fe2\")\n\n// defaults to current user for all signatory roles\nawait fcl.mutate({\n  cadence: `\n    import Profile from 0xProfile\n\n    transaction(name: String) {\n      prepare(acct: AuthAccount) {\n        acct\n          .borrow<&{Profile.Owner}>(from: Profile.privatePath)\n          .setName(name)\n      }\n    }\n  `,\n\n  args: (arg, t) => [arg(\"qvvg\", t.String)],\n\n  limit: 65,\n})\n\n// you can use a custom authorization function for all three signatory roles\nimport {myAuthzFn} from \"./my-authz-fn\"\n\nconst INIT_PROFILE_CONTRACT = `\n  import Profile from 0xProfile\n\n  transaction {\n    prepare(acct: AuthAccount) {\n      if !Profile.check(acct.address) {\n        acct.save(<- Profile.new(), to: Profile.privatePath)\n        acct.link<&Profile.Base{Profile.Public}>(Profile.publicPath, target: Profile.privatePath)\n      }\n    }\n  }\n`\n\nawait fcl.mutate({\n  cadence: INIT_PROFILE_CONTRACT,\n  authz: myAuthzFn,\n})\n\n// individual roles can be overloaded\n// mutate will prefer specific roles over authz over current user\n// the following is the same as passing myAuthzFn in as authz\n\nawait fcl.mutate({\n  cadence: INIT_PROFILE_CONTRACT,\n  proposer: myAuthzFn,\n  payer: myAuthzFn,\n  authorizations: [myAuthzFn],\n})\n\n// the following would use myAuthzFn to pay for the transaction but the current user for everything else\n\nawait fcl.mutate({\n  cadence: INIT_PROFILE_CONTRACT,\n  payer: myAuthzFn,\n})\n\n// the following would use myAuthzFn for the payer and the second authorization but current user for everything else\n\nawait fcl.mutate({\n  cadence: `\n    transaction {\n      prepare(currentUser: AuthAccount, myAuthzFn: AuthAccount) {\n        // some transaction that requires two authorization accounts\n      }\n    }\n  `,\n  payer: myAuthzFn,\n  authorizations: [fcl.authz, myAuthzFn],\n})\n\n// the following would use myAuthzFn for everything, but the current user will be the authorizer\n\nawait fcl.mutate({\n  cadence: INIT_PROFILE_CONTRACT,\n  authz: myAuthzFn,\n  authorizations: [fcl.authz],\n})\n```\n\n## 0.0.72 - 2021-06-16\n\n- 2021-06-16 -- Full VSN Release `@onflow/fcl` 0.0.71 -> 0.0.72\n- 2021-06-16 -- VSN `@onflow/sdk` 0.0.47 -> 0.0.48\n- 2021-06-16 -- Exports `encodeMessageFromSignable` from `@onflow/sdk`\n\n## 0.0.71 - 2021-06-04\n\n- 2021-06-04 -- Full VSN Release `@onflow/fcl` 0.0.71-alpha.1 -> 0.0.71\n\n## 0.0.71-alpha.1 - 2021-06-03\n\n- 2021-06-03 -- Adds `hid *` permission policy to iframe rendered in render-frame strategy.\n- 2021-05-28 -- Adds `fcl.currentUser().signUserMessage` and `user-signature` service normalizer. `fcl.currentUser().signUserMessage` allows for sending of unencrypted message data to a connected wallet provider or service to be signed with user's private key.\n- 2021-05-27 -- Updates `fcl.serialize` to return serialized voucher\n- 2021-05-27 -- VSN `@onflow/sdk` 0.0.46-alpha.1 -> 0.0.47-alpha.1\n\n## 0.0.70 - 2021-05-10\n\n- 2021-04-27 -- Full VSN Release `@onflow/fcl` 0.0.70-alpha.1 -> 0.0.70\n\n## 0.0.70-alpha.1 - 2021-05-05\n\n- 2021-05-05 **BREAKING** -- VSN `@onflow/sdk` 0.0.45 -> 0.0.46-alpha.1 -- Prepends a transaction domain tag to encoded payload and envelope messages. Transaction domain tags allow signers to identify which messages are intended to represent encoded transactions, and which are not. The Flow protocol has been updated (as of May 5th 2021) to both accept signatures produced from messages prepended with a transaction domain tag, and from messages that are not. The next spork (time and date of next spork are TBD) will strictly require all signatures for transnactions to have been produced from messages prepended with a transaction domain tag. This breaking change requires all users of Flow Client Library and the Flow JavaScript SDK to update their versions to a version greater than or equal to the verison that this change was included in.\n\n## 0.0.69 - 2021-04-28\n\n- 2021-04-28 -- Exposes `invariant` and `validator` builders from FCL\n\n## 0.0.68 - 2021-04-27\n\n- 2021-04-27 -- Full VSN Release `@onflow/fcl` 0.0.68-alpha.22 -> 0.0.68\n\n## 0.0.68-alpha.22 - 2021-04-26\n\n- 2021-04-26 -- Fixed an issue where `config()` was being called as `fcl.config()`, but `fcl` wasn't available.\n\n## 0.0.68-alpha.21 - 2021-04-21\n\n- 2021-04-21 -- **BREAKING** The experimental feature `fcl.meta` which allowed for a transaction to send along meta data to an authorization function has been removed because of the unprovable nature of its data and our strict trustless requirements. We believe this removal is in the best interest for js-sdk/fcl end users and will be looking into alternative approaches that provide the same functionality but in a more provable/trustless way. We have no ETA on this features replacement.\n\n## 0.0.68-alpha.20 - 2021-04-16\n\n- 2021-04-16 - VSN `@onflow/sdk` 0.0.45-alpha.18 -> 0.0.45-alpha.19\n\n## 0.0.68-alpha.19 - 2021-04-14\n\n- 2021-04-14 - FCL now imports and exports `@onflow/types` as `t` (@orodio)\n- 2021-04-14 - **EXPERIMENTAL** Exposes new top level `fcl.query` function. (@orodio)\n\nNew **EXPERIMENTAL** `fcl.query` functionality can be used like this.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nawait fcl.query({\n  cadence: `\n    pub fun main(a: Int, b: Int, addr: Address): Int {\n      log(addr)\n      return a + b\n    }\n  `,\n  args: (arg, t) => [\n    arg(7, t.Int), // a: Int\n    arg(6, t.Int), // b: Int\n    arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n  ],\n})\n```\n\n## 0.0.68-alpha.18 - 2021-04-09\n\n- 2021-04-09 -- Exposes `meta` and `getCollection` builders from SDK\n\n## 0.0.68-alpha.10 - 2021-03-05\n\n- 2021-03-05 -- Additional Configuration\n  - `app.detail.title` -- the title of the application\n  - `app.detail.icon` -- url for an icon image for the application\n  - `service.OpenID.scopes` -- register interest for scopes to be returned by the wallet\n\nNew configuration works like older configuration:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nfcl\n  .config()\n  .put(\"app.detail.title\", \"My Great Application\")\n  .put(\"app.detail.icon\", \"https://avatars.onflow.org/avatar/dapp\")\n  .put(\"service.OpenID.scopes\", \"email email_verified name\")\n```\n\nAll OpenID data returned should be considered optional. For the time being it will be visable as a service in the current user, but in the future we will provide additional ways to subscribe and access this data.\n\nInfo on what could be there is specified in [OpenID Connect Spec](https://openid.net/specs/openid-connect-basic-1_0.html) in particular under [2.4 Scope Values](https://openid.net/specs/openid-connect-basic-1_0.html#Scopes) and [2.5 Standard Claims](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims).\n\nWallets are not expected to implement the open-id service, and if they do we suggest best practice is for wallets to allow the account owner to decide what information is shared (all, none, somewhere in between), for stable applications we also highly recommend you do not depend on a wallet returning this info for a given user.\n\nAs always with services, an example of the data they are supposed to return can be found in their normalization file: [normalize/open-id.js](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/open-id.js)\n\n## 0.0.68-alpha.9 - 2021-03-02\n\n- 2020-03-02 -- VSN `@onflow/sdk` 0.0.45-alpha.9 -> 0.0.45-alpha.10\n\n## 0.0.68-alpha.[7..8] - 2021-03-02\n\n- 2021-03-02 -- Authn now uses frame mechanism from Authz flow.\n  - This is in prep for sending config details to wallet during handshake.\n  - Enables standardized `FCL:FRAME:CLOSE` message for closing frame\n  - Introduces a new standardized response `FCL:FRAME:RESPONSE` for wallets to pass the final response back.\n  - (EXPERIMENTAL) Introduces a new standardized open response `FCL:FRAME:OPEN` for wallets that need to escape the iframe in web browser\n  - This is backwards compatible with older versions of the FCL wallet spec, but will not be included in V1 release.\n- 2021-03-02 -- Introduced new config `discovery.wallet`. This will eventually replace `challenge.handshake`.\n  - Current implementation will look for `discovery.wallet` first and then fallback onto `challenge.handshake`.\n  - This is backwards compatible with older version of FCL, but will not be included in V1 release.\n\nNew Wallet AUTHN Flow will now look like this:\n\n```\nFCL                         Wallet\n |                            |\n |-------[Render Frame]------>|\n |                            |\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[OPTIONAL READY FLOW]\n |<----[FCL:FRAME:READY]------|  // Enables wallet to receive\n |----[APP DETAILS/NEEDS]---->|  // Application specific details/needs\n |     [handles details]------*\n |                            |\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[OPTIONAL TAB FLOW] (EXPERIMENTAL)\n |<----[FCL:FRAME:OPEN]-------|  // Some authentication flows cant\n |------[Open Tab]----------->|  // Be handled in an iframe\n |                            |\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[GOLDEN AUTH PATH]\n |<----[FCL:FRAME:RESPONSE]---|\n *-------[handles auth]       |\n |-------[Close Frame]---X    |\n |--------[Close Tab]----X    |\n |                            |\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[CANCEL AUTH PATH]\n |<----[FCL:FRAME:CLOSE]------|\n |-------[Close Frame]---X    |\n |--------[Close Tab]----X    |\n |                            |\n```\n\n`FCL:FRAME:OPEN` payload needs to look like this:\n\n```json\n{\n  \"type\": \"FCL:FRAME:OPEN\",\n  \"endpoint\": \"https://google.com\"\n}\n```\n\n> The opened tab (web view in something like Unity/iOS?) will not be responsible for sending the Final `FCL:FRAME:RESPONSE` or `FCL:FRAME:CLOSE` messages (this will need to be the frame), but FCL will attempt to close the tab one authn is complete.\n\n## 0.0.68-alpha.[1..6] - 2021-02-02\n\n- 2021-02-02 -- Adds support for new `GetEvents`, `GetBlockHeader`, `GetBlock`, `GetTransaction` interactions.\n\n## 0.0.67 - 2021-01-14\n\n- 2021-01-14 -- General Cleanup\n\n## 0.0.67-alpha.43 - 2020-12-11\n\n- 2020-12-11 -- Disables setting keyId in fetch signatures\n\n## 0.0.67-alpha.42 - 2020-12-11\n\n- 2020-12-11 -- VSN `@onflow/sdk-send` 0.0.9 -> 0.0.10\n- 2020-12-11 -- VSN `@onflow/sdk-resolve` 0.0.9 -> 0.0.10\n- 2020-12-11 -- VSN `@onflow/sdk-account` 0.0.7 -> 0.0.8\n\n## 0.0.67-alpha.41 - 2020-12-08\n\n- 2020-12-08 -- FIX: issue with multi-sig from same account (@boczeraturl)\n\n## 0.0.67-alpha.[36..40] - 2020-12-03\n\n- 2020-12-03 -- Updates `@onflow/send` -- This includes some fixes involving how signatures are added to transaction rpc calls\n- 2020-12-03 -- FIX: `fcl.serialize` respects injected resolver propoerly.\n- 2020-12-03 -- Prep for Resolver extraction.\n\n## 0.0.67-alpha.[19..35] - 2020-11-26\n\n- 2020-11-26 -- `pre-authz` golden path tested on testnet with dapper\n- 2020-11-26 -- Early exit `HTTP/POST` so that it can work like an `HTTP/RPC`\n- 2020-11-26 -- added an alias from `HTTP/RPC` to `HTTP/POST`\n- 2020-11-26 -- additional `pre-authz` debuging in current user\n- 2020-11-26 -- service-endpoint includes `l6n` as `window.location.origin`\n\n## 0.0.67-alpha.18 - 2020-11-26\n\n- 2020-11-26 -- `pre-authz` flatmaps exec-services response\n\n## 0.0.67-alpha.17 - 2020-11-23\n\n- 2020-11-23 -- `pre-authz` flow executed\n- 2020-11-23 -- `fcl.serialize` now accepts custom resolver\n\n## 0.0.67-alpha.16 - 2020-11-20\n\n- 2020-11-20 -- Rough in pre-authz flow\n\n## 0.0.67-alpha.[7..15] - 2020-11-19\n\n- 2020-11-19 -- Experimental IFRAME/RPC strategy\n\n## 0.0.67-alpha.6 - 2020-11-19\n\n- 2020-11-19 -- IFRAMES can be closed with an `{type: \"FCL:FRAME:CLOSE\"}` postMessage\n\n## 0.0.67-alpha.5 - 2020-11-19\n\n- 2020-11-19 -- Auto replace known cadence addresses\n- 2020-11-17 -- Auto resolve sequence number for proposer if its not there\n\n> Example references this contract: [Testnet Profile Contract](https://flow-view-source.com/testnet/account/0x1d007d755706c469)\n\n```javascript\n// Config fcl with contract addresses\n// Their config key must start with `0x`\nfcl.config()\n  .put(\"flow.network\", \"testnet\")\n  .put(\"0xProfile\", \"0x1d007d755506c469\")\n\n// Your transactions can now look like this\nawait fcl.send([\n  fcl.proposer(fcl.authz),\n  fcl.authorizations([fcl.authz])\n  fcl.payer(fcl.authz),\n  fcl.limit(35),\n  fcl.args([\n    fcl.arg(\"Bob\", t.String),\n  ]),\n  fcl.transaction`\n    import Profile from 0xProfile\n\n    transaction(displayName: String) {\n      prepare(account: AuthAccount) {\n        account\n          .borrow<&{Profile.Owner}>(from: Profile.privatePath)!\n          .setDisplayName(displayName)\n      }\n    }\n  `\n])\n\n// Your scripts can now look like this\nawait fcl.send([\n  fcl.args([\n    fcl.arg(\"0xba1132bc08f82fe2\", t.Address),\n  ]),\n  fcl.script`\n    import Profile from 0xProfile\n\n    pub fun main(address: Address): Profile.ReadOnly? {\n      return Profile.fetchProfile(address)\n    }\n  `,\n]).then(fcl.decode)\n```\n\n## 0.0.67-alpha.4 - 2020-11-17\n\n- 2020-11-17 -- Fix small issues involving NPM\n\n## 0.0.67-alpha.3 - 2020-11-17\n\n- 2020-11-17 -- Fix issue where validation for composite signature for keyId of zero was counted as false\n\n## 0.0.67-alpha.2 - 2020-11-17\n\n- 2020-11-17 -- Injected in a custom resolver in prep for pre-authz service\n\n## 0.0.67-alpha.1 - 2020-11-17\n\n- 2020-11-17 -- Added `fcl.account`\n- 2020-11-17 -- Added `fcl.reauthenticate`\n- 2020-11-17 -- Added `fcl.authz`\n- 2020-11-17 -- Added `fcl.signUp`\n- 2020-11-17 -- Added `fcl.logIn`\n\n```javascript\n// fcl.account - A convenience function for fetching an account\n/* old */ await fcl.send([fcl.getAccount(\"0x1d007d755706c469\")])\n/* new */ await fcl.account(\"0x1d007d755706c469\")\n\n// fcl.reauthenticate - Logs the current user out before attempting to authenticate again\nawait fcl.reauthenticate()\n\n// fcl.authz - alias for fcl.currentUser().authorization\nawait fcl.send([\n  fcl.transaction(txCode),\n  fcl.proposer(fcl.authz),\n  fcl.payer(fcl.authz),\n  fcl.authorizations([fcl.authz]),\n])\n\n// fcl.signUp and fcl.logIn - Currently these alias fcl.authenticate, eventually they will pass additional context to the wallets\nawait fcl.signUp()\nawait fcl.logIn()\n```\n\n## 0.0.67-alpha.0 - 2020-11-17\n\n- 2020-11-17 -- VSN @onflow/sdk-latest-block 0.0.2 -> 0.0.3\n- 2020-11-17 -- VSN @onflow/sdk-account 0.0.2 -> 0.0.3\n- 2020-11-17 -- VSN @onflow/sdk-send 0.0.3 -> 0.0.5\n\n## 0.0.66 - 2020-11-09\n\n- 2020-11-09 -- Adds a handshake mechanism to exec-authz-service to allow clients to request signable message when ready\n\n## 0.0.65 - 2020-11-04\n\n- 2020-11-05 -- sansPrefix required addresses\n\n## 0.0.64 - 2020-11-04\n\n- 2020-11-04 -- VSN `@onflow/sdk-send` 0.0.2 -> 0.0.3\n\n## 0.0.63 - 2020-11-04\n\n- 2020-11-04 -- VSN `@onflow/sdk-resolve` 0.0.3 -> 0.0.4\n\n## 0.0.62 - 2020-10-29\n\n- 2020-10-29 -- Fixed an issue regarding fetching transaction statuses\n\n## 0.0.61 - 2020-10-28\n\n- 2020-10-28 -- VSN `@onflow/sdk-decode` 0.0.0 -> 0.0.1\n- 2020-10-28 -- VSN `@onflow/sdk-build-authorizations` 0.0.0 -> 0.0.1\n- 2020-10-28 -- VSN `@onflow/sdk-latest-block` 0.0.0 -> 0.0.2\n- 2020-10-28 -- VSN `@onflow/sdk-account` 0.0.0 -> 0.0.2\n- 2020-10-28 -- VSN `@onflow/sdk-send` 0.0.0 -> 0.0.2\n- 2020-10-28 -- VSN `@onflow/sdk-resolve` 0.0.0 -> 0.0.3\n- 2020-10-28 -- Added in `persistSession` config flag (defaults to true)\n\n## 0.0.61-alpha.5 - 2020-10-08\n\n- 2020-10-08 -- ADD PROXY `latestBlock` exports directly to `@onflow/sdk-latest-block`\n- 2020-10-08 -- ADD PROXY `account` exports directly to `@onflow/sdk-account`\n- 2020-10-08 -- PROXY `send` export directly to `@onflow/sdk-send`\n- 2020-10-08 -- PROXY `decode` export directly to `@onflow/sdk-decode`\n- 2020-10-08 -- VSN `@onflow/decode` 0.0.7 -> 0.0.8\n- 2020-10-08 -- VSN `@onflow/sdk-build-get-account` 0.0.0 -> 0.0.1\n\n## 0.0.61-alpha.4 - 2020-10-07\n\n- 2020-10-07 -- remove resolvers and replace with @onflow/sdk-resolve\n\n## 0.0.61-alpha.3 - 2020-10-07\n\n- 2020-10-07 -- remove use of sdk\n- 2020-10-07 -- use `@onflow/sdk-resolve-ref-block-id` package directly\n\n## 0.0.61-alpha.2 - 2020-10-07\n\n- 2020-10-07 -- VSN `@onflow/sdk-resolve-signatures` 0.0.0 -> 0.0.1\n- 2020-10-07 -- VSN `@onflow/sdk` 0.0.35 -> 0.0.37\n\n## 0.0.61-alpha.1 - 2020-10-07\n\n- 2020-10-07 -- proxy to packages directly instead of via sdk\n- 2020-10-07 -- allow for authn iframe to be closed by content\n\n## 0.0.60 -- 2020-10-05\n\n- 2020-10-05 -- iframe feature policy allows usb on all contexts\n\n## 0.0.59 -- 2020-09-29\n\n- 2020-09-29 -- VSN `@onflow/sdk` 0.0.31 -> 0.0.35\n- 2020-09-29 -- use `@onflow/sdk-resolve-validators` package directly\n- 2020-09-29 -- use `@onflow/sdk-resolve-signatures` package directly\n- 2020-09-29 -- use `@onflow/sdk-resolve-accounts` package directly\n\n## 0.0.58 -- 2020-09-29\n\n- 2020-09-29 -- use `@onflow/sdk-resolve-arguments` package directly\n\n## 0.0.57 -- 2020-09-29\n\n- 2020-09-29 -- add a z-index value to service frame\n- 2020-09-29 -- resolveParams -> resolveCadence\n\n## 0.0.56 -- 2020-09-04\n\n- 2020-09-04 -- Fixed some issues involving FCL talking to iframes\n\n## 0.0.55 -- 2020-09-04\n\n- 2020-09-04 -- Wallet Provider Services\n\n## 0.0.54 -- 2020-09-03\n\n- 2020-09-03 -- Authn and Authz iframes allow usb feature policy.\n\n## 0.0.53 -- 2020-08-26\n\n- 2020-08-26 -- `@onflow/sdk` VSN `0.0.30` -> `0.0.31`\n- 2020-08-20 -- Adds Authorization Function Documentation\n\n## 0.0.52 -- 2020-08-18\n\n- 2020-08-18 -- Authorization persists using local storage (this isnt the final solution, but creates the experience we want for now)\n- 2020-08-18 -- authn and authz iframes are now full width and height\n- 2020-08-18 -- Fixed an issue where unauthenticating the currentUser wasnt clearning the address on the user\n- 2020-08-18 -- Added two new util functions `fcl.withPrefix` and `fcl.sansPrefix`\n\n## 0.0.51 -- 2020-08-14\n\n- 2020-08-14 -- `fcl.tx(resp).once*` throw errors when statusCode is non-zero, errors can be suppressed (previous behaviour) py passing `{suppress: true}` to the `.once*` function.\n- 2020-08-14 -- `fcl.tx(resp).subscribe(callback)` callback will only be called when the status is different to what it was before.\n\n## 0.0.50 -- 2020-08-14\n\n- 2020-08-14 -- Fixeds some small bugs due to typos\n\n## 0.0.49 -- 2020-08-13\n\n- 2020-08-13 -- Adds export of `fcl.events(eventKey).subscribe(callback)`\n\n## 0.0.48 -- 2020-08-13\n\n- 2020-08-13 -- Removed `resolveSequenceNumber` from default resolver\n\n## 0.0.47 -- 2020-08-13\n\n- 2020-08-13 -- `@onflow/config` VSN `0.0.1` -> `0.0.2`\n- 2020-08-13 -- `@onflow/util-actor` VSN `0.0.1` -> `0.0.2`\n- 2020-08-07 -- Adds resolvers `resolveRefBlockId` and `resolveProposerSequenceNumber` to fcl resolve.\n\n## 0.0.46 -- 2020-07-27\n\n- 2020-07-27 -- VSN `@onflow/sdk` 0.0.28 -> 0.0.30\n\n## 0.0.45 -- 2020-07-22\n\n- 2020-07-22 -- deprecate fields on CurrentUser data structure\n\n## 0.0.44 -- 2020-07-22\n\n- 2020-07-22 -- added `tx(r).onceFinalized()` and `tx(r).onceExecuted`.\n- 2020-07-22 -- added `tx.isFinalized(txStatus)` and `tx.isExecuted(txStatus)`.\n\n## 0.0.43 -- 2020-07-21\n\n- 2020-07-21 -- VSN `@onflow/sdk` 0.0.27 -> 0.0.28\n\n## 0.0.42 -- 2020-07-20\n\n- 2020-07-20 -- Convert config and actor to use external `@onflow/confg` and `@onflow/util-actor`\n\n## 0.0.41 -- 2020-07-13\n\n- 2020-07-13 -- VSN `@onflow/sdk` 0.0.26 -> 0.0.27\n\n## 0.0.40 -- 2020-07-09\n\n- 2020-07-09 -- Bring in resolveSignatures fix from SDK that passes arguments to the encoder function\n\n## 0.0.39 -- 2020-07-09\n\n- 2020-07-09 -- Expose `fcl.args` and `fcl.arg`\n- 2020-07-09 -- Bring in resolveSignatures fix from SDK that deals with signatures better\n- 2020-07-08 -- Updates FCL's resolve implementation according to the new resolvers available in the SDK.\n- 2020-07-08 -- VSN `@onflow/sdk` 0.0.23 -> 0.0.24\n\n## 0.0.38\n\n- 2020-06-23 -- Added `fcl.serialize`\n\n## 0.0.37 -- 2020-06-04\n\n- 2020-06-04 -- VSN `@onflow/sdk` 0.0.22 -> 0.0.23\n\n## 0.0.36 -- 2020-06-03\n\n- 2020-06-03 -- VSN `@onflow/sdk` 0.0.21 -> 0.0.22\n\n## 0.0.35 -- 2020-05-15\n\n- Rerelease because funky build\n\n## 0.0.34 -- 2020-05-15\n\n- 2020-05-15 -- VSN `@onflow/sdk` 0.0.20 -> 0.0.21\n\n## 0.0.33 -- 2020-05-07\n\n- 2020-05-07 -- VSN `@onflow/sdk` 0.0.19 -> 0.0.20\n\n## 0.0.32 -- 2020-05-07\n\n- 2020-05-07 -- add .npmignore with src/\n\n## 0.0.31 -- 2020-05-07\n\n- 2020-05-07 -- VSN `@onflow/sdk` 0.0.17 -> 0.0.19\n\n## 0.0.30 -- 2020-05-07\n\n- 2020-05-07 -- Created and exposed a top level `tx` function\n- 2020-05-07 -- actor spawn now excepts an object of handlers\n- 2020-05-07 -- Moved common actor logic into actor (where, all)\n- 2020-05-07 -- Exposed fcls actor registry to window\n\n## 0.0.29 -- 2020-05-06\n\n- 2020-05-06 -- Fixed an issue with custom decoders\n- 2020-05-06 -- Leverage named imports to enable better tree shaking\n- 2020-05-06 -- Proxy `@onflow/sdk` through fcl to enable single import\n- 2020-05-06 -- VSN `@onflow/sdk` 0.0.16 -> 0.0.17\n- 2020-05-05 -- VSN `@onflow/sdk` 0.0.15 -> 0.0.16\n- 2020-05-05 -- Update resolvers based on sdk update\n- 2020-05-05 -- VSN `@onflow/sdk` 0.0.14 -> 0.0.15 Breaking Change\n- 2020-04-29 -- authn challenge response no longer locks to handshake origin\n- 2020-04-28 -- `fcl.user(addr).info()` does a `send([getAccount(addr)])` returning the `account`\n- 2020-04-23 -- `fcl.authenticate()` renders iframe for config: `challenge.handshake`\n\n## 0.0.28 -- 2020-04-20\n\n- 2020-04-20 -- VSN `@onflow/sdk` 0.0.12 -> 0.0.14\n- 2020-04-20 -- Remove `@onflow/send` in favour of `@onflow/sdk`\n\n## 0.0.27 -- 2020-04-18\n\n- 2020-04-18 -- VSN sdk 0.0.4 -> 0.0.5\n- 2020-04-18 -- VSN sdk 0.0.11 -> 0.0.12\n- 2020-04-18 -- VSN jest 25.1.0 -> 25.3.0\n- 2020-04-18 -- VSN microbundle 0.11.0 -> 0.12.0-next.8\n\n## 0.0.26 -- 2020-04-17\n\n- Pre Changelog\n"
  },
  {
    "path": "packages/fcl-core/README.md",
    "content": "# FCL: Flow Client Library\n### Making secure web applications powered by the Flow Blockchain\n\nFlow Client Library (FCL) enables applications to easily integrate with all FCL-compatible wallets and\nother services (e.g. (Coming Soon) profiles, private information, notifications). This offers developers a strong\nfoundation to compose their apps with existing building blocks. It’s currently supported for browser\napplications, and will be extended to other platforms.\n\nWith FCL, you can:\n\n- Integrate all compatible wallets without any custom code or code injection\n- Authenticate users\n- Query the Flow Blockchain\n- Send transactions (e.g. initializing resources, sending assets, purchasing, etc.)\n- Sign transactions through wallet integration avoiding key management\n\nWith FCL, you will eventually be able to:\n\n- Personally sign data via FCL Compatible Wallets\n- Request Additional User info like Emails\n\n## Status\n\n- **Last Updated:** Mar 2nd 2021\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n\nThe things that exists probably won't be changing much externally, we will be adding new functionality in the near future.\n\n## Install\n\n```bash\nnpm install --save @onflow/fcl\n```\n\n## Getting Started\n\nFor a detailed guide explaining how to use `@onflow/fcl` to interact with Flow please see the [Flow App Quick Start](https://developers.flow.com/tutorials/flow-app-quickstart)\n\nHaving trouble with something? Reach out to us on [Discord](https://discord.gg/k6cZ7QC), we are more than happy to help.\n"
  },
  {
    "path": "packages/fcl-core/TRANSITIONS.md",
    "content": "# Transitions\n\n## 0001 Deprecate `env` config key\n- **Date:** May 26th 2022\n- **Type:** Deprecation of `env` in config\n\nWhen specifying which flow network for FCL to use, use the `flow.network` config key instead of `env` (e.g. `fcl.config.put(\"flow.network\", \"testnet\")`).  Permitted values are currently `local`, `canarynet`, `testnet`, `mainnet`.\n\nFCL currently falls back to `env` for the `flow.network` field but this will be removed in a future update.\n\n## 0002 Deprecate `flow.network` config key\n- **Date:** September 26th 2022\n- **Type:** Deprecation of `flow.network` in config\n\nFCL now has a built-in utility to get which flow network to use. Manual specification in config is no longer required\n\nFCL currently falls back to `flow.network` in case of failure but this will be removed in a future update.\n\n## 0003 Deprecate `appIdentifier` field in account proof resolver\n\n- **Date:** May 7th 2025\n- **Type:** Deprecation of `appIdentifier` in account proof resolver\n\nThe `appIdentifier` field in the account proof resolver is deprecated. The `appIdentifier` field is no longer required to be passed in the account proof resolver. The `appIdentifier` field will be removed in a future update.\n\nFCL will manually set the `appIdentifier` field to the origin of the current page.  This is done to prevent phishing attacks and allow wallets to verify the origin of the request to restrict the domain of account proof requests to only those associated with the application's trusted [RFC 6454](https://www.rfc-editor.org/rfc/rfc6454.html) origin.\n\nApplication developers migrating to this new configuration should update their backend systems accordingly to validate against trusted origins instead of the arbitrary `appIdentifier` field.\n\nThe previous configuration will remain backward-compatible, however, it is strongly recommended that all application and wallet developers migrate to this new scheme as soon as possible to offer the best security to users."
  },
  {
    "path": "packages/fcl-core/WARNINGS.md",
    "content": "# Warnings\n\n## 0001 Current User Data\n\n- **Date:** July 22nd 2020\n- **Issue:** [#180](https://github.com/onflow/fcl-js/issues/180)\n- **Type:** Deprecation of Certain Fields on Object\n\nIn the case of `userData` in the following:`fcl.currentUser().subscribe(userData)` and `var userData = await fcl.currentUser().snapshot()`, most fields will cease to exist.\n\nPlease limit your use of the data within `userData` to `cid` and `loggedIn`.\n"
  },
  {
    "path": "packages/fcl-core/assets/service-method-diagrams/http-post.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 2,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"type\": \"rectangle\",\n      \"version\": 373,\n      \"versionNonce\": 338338514,\n      \"isDeleted\": false,\n      \"id\": \"doLY96tTtBiyMShHWADlx\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 412.064453125,\n      \"y\": 450.865234375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 378.9140625,\n      \"height\": 177.87890625000003,\n      \"seed\": 765761355,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 329,\n      \"versionNonce\": 325266254,\n      \"isDeleted\": false,\n      \"id\": \"wWCcNk0jRU7XNPNnWQxwy\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 294.76953125,\n      \"y\": 211.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 66,\n      \"height\": 19,\n      \"seed\": 617816645,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"App/FCL\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 594,\n      \"versionNonce\": 674396306,\n      \"isDeleted\": false,\n      \"id\": \"TuphyvaGoKgYofvL5F9sk\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 991.8102678571429,\n      \"y\": 214.26729910714286,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 94,\n      \"height\": 38,\n      \"seed\": 980425131,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Wallet/API\\n\",\n      \"baseline\": 34,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 721,\n      \"versionNonce\": 505874382,\n      \"isDeleted\": false,\n      \"id\": \"GZPY6lLBay4dNxJKh6t9-\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 327.64564732142856,\n      \"y\": 234.0078125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 2418.227889550592,\n      \"seed\": 223989419,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          2418.227889550592\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 770,\n      \"versionNonce\": 1131652882,\n      \"isDeleted\": false,\n      \"id\": \"gy2-EirFFN9Rs1yv33dxn\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.14453125,\n      \"y\": 236.53125000000006,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 2427.8363767384853,\n      \"seed\": 1657493451,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          2427.8363767384853\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 320,\n      \"versionNonce\": 1250897870,\n      \"isDeleted\": false,\n      \"id\": \"g3OfxKqhShO_gW8ihuy2k\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 832.734375,\n      \"y\": 159.96875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 234,\n      \"height\": 19,\n      \"seed\": 2033659723,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Service Method: HTTP/POST\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 1319,\n      \"versionNonce\": 1293351954,\n      \"isDeleted\": false,\n      \"id\": \"cRCXXezMu6O93NnsmMtlw\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 423.83705357142867,\n      \"y\": 454.5625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 366,\n      \"height\": 171,\n      \"seed\": 264667211,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"Service\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": ServiceType, \\n  \\\"method\\\": \\\"HTTP/POST\\\",\\n  \\\"endpoint\\\": \\\"https://wallet.com/_A_\\\",\\n  \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" },\\n  \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n}\",\n      \"baseline\": 167,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 313,\n      \"versionNonce\": 417600590,\n      \"isDeleted\": false,\n      \"id\": \"S8hRM8CDbjBy1msJQBXUT\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 336.296875,\n      \"y\": 234.8359375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 516,\n      \"height\": 133,\n      \"seed\": 1169787467,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {config} from \\\"@onflow/fcl\\\"\\n\\nconfig({\\n  \\\"app.detail.title\\\": \\\"My Awesome App\\\",\\n  \\\"app.detail.icon\\\": \\\"https://app.com/assets/icon.jpg\\\",\\n  \\\"service.OpenID.scopes\\\": \\\"email!\\\",\\n})\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 443,\n      \"versionNonce\": 1355910926,\n      \"isDeleted\": false,\n      \"id\": \"tOR3r8-ktC1NTHzDZox-Z\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1123.6640625,\n      \"y\": 221.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 500.21874999999994,\n      \"height\": 171.82812500000003,\n      \"seed\": 1547570789,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 807,\n      \"versionNonce\": 169685202,\n      \"isDeleted\": false,\n      \"id\": \"RENTSbmLHkw8L4P6Er97V\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1133.3828125,\n      \"y\": 229.09375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 478,\n      \"height\": 152,\n      \"seed\": 2115574885,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"ServiceTypes, BodyTypes and expected ReturnValues\\n\\n   ServiceType | BodyType    | ReturnValue\\n---------------+-------------+---------------------\\n         authn | ---         | AuthnResponse\\n         authz | Signable    | CompositeSignature\\n     pre-authz | PreSignable | PreAuthzResponse\\nuser-signature | Signable    | [CompositeSignature]\",\n      \"baseline\": 148,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 973,\n      \"versionNonce\": 356106770,\n      \"isDeleted\": false,\n      \"id\": \"ccmKZf8ImiNbmVmoUdu89\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1679.5541294642849,\n      \"y\": 211.96755203363227,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 38,\n      \"height\": 19,\n      \"seed\": 1992256210,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"View\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 1271,\n      \"versionNonce\": 1070864338,\n      \"isDeleted\": false,\n      \"id\": \"pgNGyMHiId3ZIrPXhHaAR\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1700.3989955357133,\n      \"y\": 234.66677078363227,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 2416.3547968355406,\n      \"seed\": 1734271822,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          2416.3547968355406\n        ]\n      ]\n    },\n    {\n      \"id\": \"pvU9mNYKpnlmvgt8RQjVu\",\n      \"type\": \"arrow\",\n      \"x\": 335.89356569608776,\n      \"y\": 703.064174107143,\n      \"width\": 696.4829903954293,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"BJEixf1iYgvauBNe_-YX2\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 227842002,\n      \"version\": 616,\n      \"versionNonce\": 1159895054,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          696.4829903954293,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"meRKKpVnYEjnay7ATEHed\",\n        \"focus\": -1.2005991541353331,\n        \"gap\": 3.811383928571331\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"meRKKpVnYEjnay7ATEHed\",\n      \"type\": \"text\",\n      \"x\": 333.0061383928566,\n      \"y\": 706.8755580357143,\n      \"width\": 384,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"BJEixf1iYgvauBNe_-YX2\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 369660242,\n      \"version\": 376,\n      \"versionNonce\": 100480978,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"pvU9mNYKpnlmvgt8RQjVu\"\n      ],\n      \"text\": \"http POST https://wallet.com/_A_?omg=rawr\\n     BODY {...BodyType}\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"goiBksgB2pTwoXPsezR5-\",\n      \"type\": \"arrow\",\n      \"x\": 1043.6843165147914,\n      \"y\": 881.8922991071431,\n      \"width\": 708.317687050506,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"HetzAfHUD7tDp1J6UK6m_\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 414757646,\n      \"version\": 475,\n      \"versionNonce\": 1299211854,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -708.317687050506,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"6gbdp_X3azm8N_Bx9PzoM\",\n        \"focus\": 1.0408374877410902,\n        \"gap\": 8.922991071428214\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"6gbdp_X3azm8N_Bx9PzoM\",\n      \"type\": \"text\",\n      \"x\": 374.2896205357139,\n      \"y\": 890.8152901785713,\n      \"width\": 656,\n      \"height\": 437,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"HetzAfHUD7tDp1J6UK6m_\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1490619154,\n      \"version\": 1332,\n      \"versionNonce\": 972197266,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"goiBksgB2pTwoXPsezR5-\"\n      ],\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"PENDING\\\",\\n  \\\"updates\\\": {\\n    \\\"f_type\\\": \\\"Service\\\",\\n    \\\"f_vsn\\\": \\\"1.0.0\\\",\\n    \\\"type\\\": \\\"back-channel-rpc\\\",\\n    \\\"endpoint\\\": \\\"https://app.com/tx/updates/endpoint\\\",\\n    \\\"method\\\": \\\"HTTP/GET\\\", // \\\"HTTP/POST\\\" | \\\"HTTP/GET\\\",\\n    \\\"data\\\": { \\\"woot\\\": \\\"boot\\\" }, // body of HTTP/POST\\n    \\\"params\\\": { \\\"zomg\\\": \\\"pew\\\" },\\n  },\\n  \\\"local\\\": { // optional\\n    \\\"f_type\\\": \\\"Service\\\",\\n    \\\"f_vsn\\\": \\\"1.0.0\\\",\\n    \\\"type\\\": \\\"local-view\\\",\\n    \\\"method\\\": \\\"VIEW/IFRAME\\\", // \\\"VIEW/POP\\\" | \\\"VIEW/TAB\\\" | \\\"VIEW/IFRAME\\\"\\n    \\\"endpoint\\\" \\\"https://app.com/tx/approval/endpoint\\\",\\n    \\\"data\\\": { \\\"woot\\\": \\\"boot\\\" },\\n    \\\"params\\\": { \\\"zomg\\\": \\\"pew\\\" },\\n  },\\n}\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 433\n    },\n    {\n      \"id\": \"nXcjEQV_1zIljBACiCBbQ\",\n      \"type\": \"arrow\",\n      \"x\": 333.1183228581119,\n      \"y\": 1365.32421875,\n      \"width\": 1364.067503034744,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 687806418,\n      \"version\": 253,\n      \"versionNonce\": 1708379794,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          1364.067503034744,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"0217_iMIVmw5Td5Jr_IN6\",\n        \"focus\": -1.4053101503759535,\n        \"gap\": 3.8504464285715585\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"0217_iMIVmw5Td5Jr_IN6\",\n      \"type\": \"text\",\n      \"x\": 334.2170758928564,\n      \"y\": 1369.1746651785716,\n      \"width\": 703,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1566002194,\n      \"version\": 167,\n      \"versionNonce\": 1828952974,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"nXcjEQV_1zIljBACiCBbQ\"\n      ],\n      \"text\": \"Render VIEW https://app.com/tx/approval/endpoint?zomg=pew as method(iframe)\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"kp_hrClqZKnQIp0t6Fnrb\",\n      \"type\": \"arrow\",\n      \"x\": 332.80524553571416,\n      \"y\": 1444.436941964286,\n      \"width\": 698.8727678571428,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 636766798,\n      \"version\": 117,\n      \"versionNonce\": 684305102,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          698.8727678571428,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"HFLt7Pr186-t2UXAq0TV4\",\n        \"focus\": -1.6050281954887253,\n        \"gap\": 5.74776785714289\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"HFLt7Pr186-t2UXAq0TV4\",\n      \"type\": \"text\",\n      \"x\": 336.125558035714,\n      \"y\": 1450.184709821429,\n      \"width\": 497,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1762610382,\n      \"version\": 105,\n      \"versionNonce\": 1645588754,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"kp_hrClqZKnQIp0t6Fnrb\"\n      ],\n      \"text\": \"http GET https://app.com/tx/updates/endpoint?zomg=pew\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"TugzorT6e20PkkSBr9P3h\",\n      \"type\": \"arrow\",\n      \"x\": 1031.8374193590034,\n      \"y\": 1512.1489955357147,\n      \"width\": 688.2860807884815,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 947212882,\n      \"version\": 511,\n      \"versionNonce\": 1550547150,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -688.2860807884815,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"EbXoOC1rg5YiPck-Cg0Hq\",\n        \"focus\": 1.0613000134264263,\n        \"gap\": 13.283289894717996\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"EbXoOC1rg5YiPck-Cg0Hq\",\n      \"type\": \"text\",\n      \"x\": 512.5541294642854,\n      \"y\": 1520.3018973214294,\n      \"width\": 506,\n      \"height\": 266,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1939255886,\n      \"version\": 290,\n      \"versionNonce\": 213893906,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"TugzorT6e20PkkSBr9P3h\"\n      ],\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"PENDING\\\",\\n  \\\"updates\\\": {\\n    \\\"f_type\\\": \\\"Service\\\",\\n    \\\"f_vsn\\\": \\\"1.0.0\\\",\\n    \\\"type\\\": \\\"back-channel-rpc\\\",\\n    \\\"endpoint\\\": \\\"https://app.com/tx/updates/endpoint\\\",\\n    \\\"method\\\": \\\"HTTP/GET\\\", // \\\"HTTP/POST\\\" | \\\"HTTP/GET\\\",\\n    \\\"data\\\": { \\\"woot\\\": \\\"boot\\\" }, // body of HTTP/POST\\n    \\\"params\\\": { \\\"zomg\\\": \\\"pew\\\" },\\n  },\\n}\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 262\n    },\n    {\n      \"id\": \"uSClf3BZErW3vAw7qBEkM\",\n      \"type\": \"arrow\",\n      \"x\": 1571.5222052550273,\n      \"y\": 1858.2354027726096,\n      \"width\": 121.00960278068669,\n      \"height\": 0.4258695488185822,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 79856402,\n      \"version\": 238,\n      \"versionNonce\": 754574738,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          121.00960278068669,\n          0.4258695488185822\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": {\n        \"elementId\": \"px4AOTe4JsFHw9MHW63Wr\",\n        \"focus\": 0.04382048872187289,\n        \"gap\": 5.219191862170419\n      },\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"q13cnvjmUM3cjbfkI8jzA\",\n      \"type\": \"text\",\n      \"x\": 229.88671874999963,\n      \"y\": 1596.0106026785706,\n      \"width\": 38,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"IxDaDMcSo_GQi-HDfbVG4\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1371875022,\n      \"version\": 124,\n      \"versionNonce\": 590490706,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"text\": \"LOOP\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"0ftGanngPJe3yf4XCxuJU\",\n      \"type\": \"line\",\n      \"x\": 287.7885044642853,\n      \"y\": 1442.7293526785706,\n      \"width\": 0,\n      \"height\": 360.4854910714289,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"IxDaDMcSo_GQi-HDfbVG4\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 749051986,\n      \"version\": 36,\n      \"versionNonce\": 26409422,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          360.4854910714289\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"VkDSg1H9RmE4p7RfcC_Dn\",\n      \"type\": \"line\",\n      \"x\": 287.23046874999966,\n      \"y\": 1443.6110491071422,\n      \"width\": 18.922991071428555,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"IxDaDMcSo_GQi-HDfbVG4\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 624131918,\n      \"version\": 18,\n      \"versionNonce\": 1351406098,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          18.922991071428555,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"l2r2X4jf9sO1DNxVhrhMg\",\n      \"type\": \"line\",\n      \"x\": 287.65457589285677,\n      \"y\": 1804.397879464285,\n      \"width\": 28.705357142857224,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"IxDaDMcSo_GQi-HDfbVG4\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 520499858,\n      \"version\": 15,\n      \"versionNonce\": 1760464910,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          28.705357142857224,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"ZPOVTwce_dOkbMSKAZlOc\",\n      \"type\": \"line\",\n      \"x\": 274.26171874999966,\n      \"y\": 1604.1077008928564,\n      \"width\": 14.196428571428555,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"IxDaDMcSo_GQi-HDfbVG4\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 558246610,\n      \"version\": 15,\n      \"versionNonce\": 1326235602,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          14.196428571428555,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"px4AOTe4JsFHw9MHW63Wr\",\n      \"type\": \"text\",\n      \"x\": 1182.3030133928569,\n      \"y\": 1847.5954241071418,\n      \"width\": 384,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1523119506,\n      \"version\": 464,\n      \"versionNonce\": 607024270,\n      \"isDeleted\": false,\n      \"boundElementIds\": [\n        \"uSClf3BZErW3vAw7qBEkM\"\n      ],\n      \"text\": \"USER INTERACTION APPROVES SERVICE REQUEST\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 393,\n      \"versionNonce\": 1948720466,\n      \"isDeleted\": false,\n      \"id\": \"EWPCysYpkOsNA7VR_51Ou\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 332.49274553571405,\n      \"y\": 1987.286272321427,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 698.8727678571428,\n      \"height\": 0,\n      \"seed\": 1551611214,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"jnw9NcDG4qfKgwJeYBNeZ\",\n        \"focus\": -1.605028195488749,\n        \"gap\": 5.747767857143117\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          698.8727678571428,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 256,\n      \"versionNonce\": 459380942,\n      \"isDeleted\": false,\n      \"id\": \"jnw9NcDG4qfKgwJeYBNeZ\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 335.44475446428527,\n      \"y\": 1993.0340401785702,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 497,\n      \"height\": 19,\n      \"seed\": 37719698,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"EWPCysYpkOsNA7VR_51Ou\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"http GET https://app.com/tx/updates/endpoint?zomg=pew\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 868,\n      \"versionNonce\": 2008785682,\n      \"isDeleted\": false,\n      \"id\": \"mqh21vSnuumpPwVUt0p_9\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1029.418875631516,\n      \"y\": 2050.954241071428,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 694.9810008471857,\n      \"height\": 0,\n      \"seed\": 1236898002,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"_EhFX6jLqQlumRQq0dlzg\",\n        \"focus\": 1.0957471804511347,\n        \"gap\": 8.890040310568224\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -694.9810008471857,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 533,\n      \"versionNonce\": 764497678,\n      \"isDeleted\": false,\n      \"id\": \"_EhFX6jLqQlumRQq0dlzg\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 739.5288353209477,\n      \"y\": 2056.4118303571427,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 281,\n      \"height\": 114,\n      \"seed\": 1963072846,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mqh21vSnuumpPwVUt0p_9\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n}\",\n      \"baseline\": 110,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 359,\n      \"versionNonce\": 1401643858,\n      \"isDeleted\": false,\n      \"id\": \"TiKzIfkRF5lkFQK31JND2\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1587.456915076456,\n      \"y\": 2187.2416294642853,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 102.44933492354403,\n      \"height\": 0,\n      \"seed\": 1225038286,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"NSKk16J0dklbZp723xFAc\",\n        \"focus\": 0.0438204887218729,\n        \"gap\": 5.219191862170192\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          102.44933492354403,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 506,\n      \"versionNonce\": 130855630,\n      \"isDeleted\": false,\n      \"id\": \"NSKk16J0dklbZp723xFAc\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1188.2377232142858,\n      \"y\": 2177.3253348214275,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 394,\n      \"height\": 19,\n      \"seed\": 713372178,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"TiKzIfkRF5lkFQK31JND2\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"EXTERNAL INTERACTION DECLINES SERVICE CALL\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 556,\n      \"versionNonce\": 596512338,\n      \"isDeleted\": false,\n      \"id\": \"dsgLgRv7-hGW6LGq_WyIy\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 337.03515625000017,\n      \"y\": 2355.2458147321418,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 698.8727678571428,\n      \"height\": 0,\n      \"seed\": 1559268302,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"eozBaDjhl7bl9Wb_52yX2\",\n        \"focus\": -1.6050281954887489,\n        \"gap\": 5.747767857143117\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          698.8727678571428,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 338,\n      \"versionNonce\": 786315214,\n      \"isDeleted\": false,\n      \"id\": \"eozBaDjhl7bl9Wb_52yX2\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 339.9871651785713,\n      \"y\": 2360.993582589285,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 497,\n      \"height\": 19,\n      \"seed\": 285827090,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"dsgLgRv7-hGW6LGq_WyIy\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"http GET https://app.com/tx/updates/endpoint?zomg=pew\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 951,\n      \"versionNonce\": 1595700242,\n      \"isDeleted\": false,\n      \"id\": \"0KYT_pccrbXHsmDvRc7C6\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1033.9612863458024,\n      \"y\": 2418.539899553571,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 694.9810008471857,\n      \"height\": 0,\n      \"seed\": 1724506638,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"ame2VZzxjweqrMDB40km4\",\n        \"focus\": 1.1037750626566554,\n        \"gap\": 10.307451024854345\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -694.9810008471857,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 697,\n      \"versionNonce\": 102895118,\n      \"isDeleted\": false,\n      \"id\": \"ame2VZzxjweqrMDB40km4\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 592.653835320948,\n      \"y\": 2424.4550781250005,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 431,\n      \"height\": 114,\n      \"seed\": 751275474,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"0KYT_pccrbXHsmDvRc7C6\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"DECLINED\\\",\\n  \\\"reason\\\": \\\"The user didn't want to do it...\\\"\\n}\",\n      \"baseline\": 110,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"id\": \"Rq2VYrSlBVIt9YtHmuNTf\",\n      \"type\": \"arrow\",\n      \"x\": 1698.7148437500002,\n      \"y\": 1898.1422991071422,\n      \"width\": 654.1294642857144,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 178499278,\n      \"version\": 75,\n      \"versionNonce\": 782706962,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -654.1294642857144,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\"\n    },\n    {\n      \"id\": \"aJZkW8PwKFNElq2a4B-eG\",\n      \"type\": \"text\",\n      \"x\": 1284.6356026785713,\n      \"y\": 1904.6434151785709,\n      \"width\": 225,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 281210002,\n      \"version\": 138,\n      \"versionNonce\": 1367943438,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"text\": \"APPROVES SERVICE REQUEST\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 161,\n      \"versionNonce\": 1170486994,\n      \"isDeleted\": false,\n      \"id\": \"tqGejRrekqGmHpxVORAGr\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1693.2963169642865,\n      \"y\": 2221.9235491071418,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 654.1294642857144,\n      \"height\": 0,\n      \"seed\": 1173598546,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -654.1294642857144,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 233,\n      \"versionNonce\": 282908494,\n      \"isDeleted\": false,\n      \"id\": \"vsAUKDrl-yoJZK45NlzNA\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1279.217075892857,\n      \"y\": 2228.050781249999,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 225,\n      \"height\": 19,\n      \"seed\": 156779726,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"DECLINES SERVICE REQUEST\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"id\": \"2l8s1WXfRoNJvn8pV-qAT\",\n      \"type\": \"text\",\n      \"x\": 1131.337611607143,\n      \"y\": 401.8141741071414,\n      \"width\": 338,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 427396242,\n      \"version\": 213,\n      \"versionNonce\": 1823437778,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"text\": \"** THINGS IN THIS COLOR ARE OPTIONAL\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 326,\n      \"versionNonce\": 47482066,\n      \"isDeleted\": false,\n      \"id\": \"vrhKm_s9FT000zAwzPpE_\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 337.279401841186,\n      \"y\": 2608.0535714285697,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 1358.9689240516714,\n      \"height\": 0,\n      \"seed\": 142485330,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"I7NvNbuLGTAyrU1J2b0Nj\",\n        \"focus\": -1.444666353383438,\n        \"gap\": 4.224330357142662\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          1358.9689240516714,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 218,\n      \"versionNonce\": 641755470,\n      \"isDeleted\": false,\n      \"id\": \"I7NvNbuLGTAyrU1J2b0Nj\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 333.27957589285774,\n      \"y\": 2612.2779017857124,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 525,\n      \"height\": 19,\n      \"seed\": 1666723534,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"vrhKm_s9FT000zAwzPpE_\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Close VIEW https://app.com/tx/approval/endpoint?zomg=pew\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"id\": \"QGPWF6lQ3Lqq6D-MM5tRS\",\n      \"type\": \"line\",\n      \"x\": 300.3136160714284,\n      \"y\": 1968.0273437499995,\n      \"width\": 0,\n      \"height\": 235.359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"bcC7Yy1WL2LxGqQmgco5W\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1815031246,\n      \"version\": 176,\n      \"versionNonce\": 1972738130,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          235.359375\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"fUn5BO819itbACQI93865\",\n      \"type\": \"line\",\n      \"x\": 301.4464285714284,\n      \"y\": 1968.4374999999995,\n      \"width\": 17.390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"bcC7Yy1WL2LxGqQmgco5W\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1267356242,\n      \"version\": 14,\n      \"versionNonce\": 174869966,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          17.390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"QZJcoMNHUzIwRPakO3Vsp\",\n      \"type\": \"line\",\n      \"x\": 300.2901785714284,\n      \"y\": 2202.5742187499995,\n      \"width\": 20.26171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"bcC7Yy1WL2LxGqQmgco5W\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1220444494,\n      \"version\": 38,\n      \"versionNonce\": 1537392146,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          20.26171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"xZsaBFYQfBcyiRJwk5q3y\",\n      \"type\": \"line\",\n      \"x\": 299.9972098214284,\n      \"y\": 2084.0078124999995,\n      \"width\": 18.41015625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [\n        \"bcC7Yy1WL2LxGqQmgco5W\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1949442578,\n      \"version\": 27,\n      \"versionNonce\": 863855630,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -18.41015625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 267,\n      \"versionNonce\": 1336617934,\n      \"isDeleted\": false,\n      \"id\": \"QbBwRYiSlmLl_H5F1dE7X\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 301.4835379464284,\n      \"y\": 2339.1562499999995,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 0,\n      \"height\": 235.359375,\n      \"seed\": 1485122514,\n      \"groupIds\": [\n        \"LufmXpA_fNqsMwGoG1a29\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          235.359375\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 105,\n      \"versionNonce\": 885571602,\n      \"isDeleted\": false,\n      \"id\": \"teXwzjfksaQOi9rlbmVnr\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 302.6163504464284,\n      \"y\": 2339.5664062499995,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 17.390625,\n      \"height\": 0,\n      \"seed\": 1049735758,\n      \"groupIds\": [\n        \"LufmXpA_fNqsMwGoG1a29\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          17.390625,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 129,\n      \"versionNonce\": 1764786702,\n      \"isDeleted\": false,\n      \"id\": \"RqIxRQuNE7ROfIU4xU_qD\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 301.4601004464284,\n      \"y\": 2573.7031249999995,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 20.26171875,\n      \"height\": 0,\n      \"seed\": 1918099858,\n      \"groupIds\": [\n        \"LufmXpA_fNqsMwGoG1a29\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          20.26171875,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 118,\n      \"versionNonce\": 1637543378,\n      \"isDeleted\": false,\n      \"id\": \"LzmrQIkmkDOYt4DUxggnq\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 301.1671316964284,\n      \"y\": 2455.1367187499995,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 18.41015625,\n      \"height\": 0,\n      \"seed\": 1988245646,\n      \"groupIds\": [\n        \"LufmXpA_fNqsMwGoG1a29\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -18.41015625,\n          0\n        ]\n      ]\n    },\n    {\n      \"id\": \"TQyIkMTQlMtpOkAG1NvA1\",\n      \"type\": \"line\",\n      \"x\": 185.13392857142838,\n      \"y\": 1602.2070312499995,\n      \"width\": 0,\n      \"height\": 859.796875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 392258450,\n      \"version\": 72,\n      \"versionNonce\": 1976090958,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          859.796875\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"9qzClc4VVSNxN-Ligd-5V\",\n      \"type\": \"line\",\n      \"x\": 186.07924107142838,\n      \"y\": 1601.6445312499995,\n      \"width\": 25.65625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 957956754,\n      \"version\": 10,\n      \"versionNonce\": 1583362190,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          25.65625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"JIokfUK5ck4mBtzDpo-Lz\",\n      \"type\": \"line\",\n      \"x\": 186.28236607142838,\n      \"y\": 2090.6679687499995,\n      \"width\": 18.15234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1533241170,\n      \"version\": 42,\n      \"versionNonce\": 35240910,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          18.15234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"xa9mzzxBh4iEAqzZ7K07I\",\n      \"type\": \"line\",\n      \"x\": 185.73158482142838,\n      \"y\": 2461.8828124999995,\n      \"width\": 33.33984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 306917394,\n      \"version\": 31,\n      \"versionNonce\": 786196050,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          33.33984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"DqPOKqZKb17DNJrltyqEh\",\n      \"type\": \"text\",\n      \"x\": 86.50892857142843,\n      \"y\": 2080.3671874999995,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 138502094,\n      \"version\": 126,\n      \"versionNonce\": 1283556814,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"text\": \"Mutually Exclusive\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"yk-Qphl_g4lGpQEahRYfm\",\n      \"type\": \"line\",\n      \"x\": 1762.041852678572,\n      \"y\": 1342.693638392856,\n      \"width\": 0,\n      \"height\": 1296.3727678571427,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 652480914,\n      \"version\": 166,\n      \"versionNonce\": 1366388434,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1296.3727678571427\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"gfwjyHqAMTj32UXHQFJCR\",\n      \"type\": \"line\",\n      \"x\": 1744.7594866071433,\n      \"y\": 1342.386718749999,\n      \"width\": 20.17857142857133,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 1270816590,\n      \"version\": 10,\n      \"versionNonce\": 30927762,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          20.17857142857133,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"WRATW6ooNJal8ubXcilJj\",\n      \"type\": \"line\",\n      \"x\": 1746.0652901785718,\n      \"y\": 2639.6300223214275,\n      \"width\": 16.11049107142867,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"seed\": 412864142,\n      \"version\": 26,\n      \"versionNonce\": 1678081618,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          16.11049107142867,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null,\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null\n    },\n    {\n      \"id\": \"LBzxbhpT6EeU-V7dTG9AT\",\n      \"type\": \"text\",\n      \"x\": 1730.3844866071431,\n      \"y\": 1932.0630580357133,\n      \"width\": 94,\n      \"height\": 19,\n      \"angle\": 1.5707963267948957,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"seed\": 1742063566,\n      \"version\": 74,\n      \"versionNonce\": 1723557522,\n      \"isDeleted\": false,\n      \"boundElementIds\": null,\n      \"text\": \"Local View\",\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\",\n      \"baseline\": 15\n    }\n  ],\n  \"appState\": {\n    \"gridSize\": null,\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/assets/service-method-diagrams/iframe-rpc.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 2,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"type\": \"rectangle\",\n      \"version\": 602,\n      \"versionNonce\": 1991830094,\n      \"isDeleted\": false,\n      \"id\": \"pUp_l9lxr69Ot0vF74iBp\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1053.70703125,\n      \"y\": 702.982421875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 583.8359375000001,\n      \"height\": 88.94531249999997,\n      \"seed\": 1472544389,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ]\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 374,\n      \"versionNonce\": 492579218,\n      \"isDeleted\": false,\n      \"id\": \"doLY96tTtBiyMShHWADlx\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 537.064453125,\n      \"y\": 450.865234375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 378.9140625,\n      \"height\": 177.87890625000003,\n      \"seed\": 765761355,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 330,\n      \"versionNonce\": 352481422,\n      \"isDeleted\": false,\n      \"id\": \"wWCcNk0jRU7XNPNnWQxwy\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 419.76953125,\n      \"y\": 211.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 66,\n      \"height\": 19,\n      \"seed\": 617816645,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"App/FCL\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 595,\n      \"versionNonce\": 117778258,\n      \"isDeleted\": false,\n      \"id\": \"TuphyvaGoKgYofvL5F9sk\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1017.9375,\n      \"y\": 211.37109375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 38,\n      \"height\": 19,\n      \"seed\": 980425131,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"View\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 722,\n      \"versionNonce\": 885075662,\n      \"isDeleted\": false,\n      \"id\": \"GZPY6lLBay4dNxJKh6t9-\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 452.27734375,\n      \"y\": 234.0078125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1545.8109896827361,\n      \"seed\": 223989419,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1545.8109896827361\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 771,\n      \"versionNonce\": 1447587090,\n      \"isDeleted\": false,\n      \"id\": \"gy2-EirFFN9Rs1yv33dxn\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.14453125,\n      \"y\": 236.53125000000006,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1549.9726593764249,\n      \"seed\": 1657493451,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1549.9726593764249\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 333,\n      \"versionNonce\": 86197074,\n      \"isDeleted\": false,\n      \"id\": \"g3OfxKqhShO_gW8ihuy2k\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 832.734375,\n      \"y\": 159.96875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 244,\n      \"height\": 19,\n      \"seed\": 2033659723,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Service Method: IFRAME/RPC\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 1332,\n      \"versionNonce\": 1184994194,\n      \"isDeleted\": false,\n      \"id\": \"cRCXXezMu6O93NnsmMtlw\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 548.46875,\n      \"y\": 454.5625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 366,\n      \"height\": 171,\n      \"seed\": 264667211,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"Service\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": ServiceType, \\n  \\\"method\\\": \\\"IFRAME/RPC\\\",\\n  \\\"endpoint\\\": \\\"https://wallet.com/_A_\\\",\\n  \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" },\\n  \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n}\",\n      \"baseline\": 167,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 1938,\n      \"versionNonce\": 803361614,\n      \"isDeleted\": false,\n      \"id\": \"mFodo7CVvji9CuMTQFkGQ\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 457.7276854480098,\n      \"y\": 708.6711316997614,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 577.5402535920616,\n      \"height\": 0,\n      \"seed\": 207407941,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"pVy0_Vt7wLNHak-3XpKct\",\n        \"focus\": -2.0823150842356406,\n        \"gap\": 10.281993300238582\n      },\n      \"endBinding\": {\n        \"elementId\": \"pUp_l9lxr69Ot0vF74iBp\",\n        \"focus\": 0.8720852248450665,\n        \"gap\": 18.439092209928504\n      },\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          577.5402535920616,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 554,\n      \"versionNonce\": 1956237458,\n      \"isDeleted\": false,\n      \"id\": \"pVy0_Vt7wLNHak-3XpKct\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 457.765625,\n      \"y\": 718.953125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 469,\n      \"height\": 19,\n      \"seed\": 974936005,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Render `https://wallet.com/_A_?omg=rawr` as iframe\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 314,\n      \"versionNonce\": 387365262,\n      \"isDeleted\": false,\n      \"id\": \"S8hRM8CDbjBy1msJQBXUT\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 461.296875,\n      \"y\": 234.8359375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 516,\n      \"height\": 133,\n      \"seed\": 1169787467,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {config} from \\\"@onflow/fcl\\\"\\n\\nconfig({\\n  \\\"app.detail.title\\\": \\\"My Awesome App\\\",\\n  \\\"app.detail.icon\\\": \\\"https://app.com/assets/icon.jpg\\\",\\n  \\\"service.OpenID.scopes\\\": \\\"email!\\\",\\n})\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 578,\n      \"versionNonce\": 368438866,\n      \"isDeleted\": false,\n      \"id\": \"qD9xJl1tdtaGnKb076C85\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1057.98828125,\n      \"y\": 705.76953125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 572,\n      \"height\": 76,\n      \"seed\": 1407251013,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtils} from \\\"@onflow/fcl\\\"\\n\\nWalletUtils.onMsgFromFCL(\\\"FCL:VIEW:READY:RESPONSE\\\", callback)\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:READY\\\")\",\n      \"baseline\": 72,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 523,\n      \"versionNonce\": 1600411598,\n      \"isDeleted\": false,\n      \"id\": \"XHwC7Fsg0ku28pJIQeHXX\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.4156656271816,\n      \"y\": 877.13671875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 583.5457218851187,\n      \"height\": 0,\n      \"seed\": 2055359205,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"iJSRIo1_cDlQLtOn1fYl6\",\n        \"focus\": 1.1167763157894735,\n        \"gap\": 6.439103127181625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -583.5457218851187,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 487,\n      \"versionNonce\": 2038977554,\n      \"isDeleted\": false,\n      \"id\": \"iJSRIo1_cDlQLtOn1fYl6\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 788.9765625,\n      \"y\": 880.46484375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 244,\n      \"height\": 57,\n      \"seed\": 1852876837,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"XHwC7Fsg0ku28pJIQeHXX\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY\\\"\\n}\",\n      \"baseline\": 53,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 574,\n      \"versionNonce\": 14953998,\n      \"isDeleted\": false,\n      \"id\": \"o3NY2Deu9m4VQwicKDgPc\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 455.60388297963584,\n      \"y\": 1013.7656250000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 582.8264913860365,\n      \"height\": 0,\n      \"seed\": 2101489195,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"MtdfkG87ukUkNfzon_9Op\",\n        \"focus\": -1.0214057662538694,\n        \"gap\": 4.989867020364159\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          582.8264913860365,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 745,\n      \"versionNonce\": 289931730,\n      \"isDeleted\": false,\n      \"id\": \"MtdfkG87ukUkNfzon_9Op\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 460.59375,\n      \"y\": 1017.22265625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 459,\n      \"height\": 323,\n      \"seed\": 569460709,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"o3NY2Deu9m4VQwicKDgPc\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY:RESPONSE\\\",\\n  \\\"body\\\": BodyType,\\n  \\\"service\\\": {\\n    \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n    \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" }\\n  },\\n  \\\"config\\\": {\\n    \\\"service\\\": {\\n      \\\"OpenID.scopes\\\": \\\"email!\\\",\\n    },\\n    \\\"app\\\": {\\n      \\\"title\\\": \\\"My Awesome App\\\",\\n      \\\"icon\\\": \\\"https://app.com/assets/icon.jpeg\\\",\\n    }\\n  }\\n}\",\n      \"baseline\": 319,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 444,\n      \"versionNonce\": 143604814,\n      \"isDeleted\": false,\n      \"id\": \"tOR3r8-ktC1NTHzDZox-Z\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1123.6640625,\n      \"y\": 221.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 500.21874999999994,\n      \"height\": 171.82812500000003,\n      \"seed\": 1547570789,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 808,\n      \"versionNonce\": 2018244498,\n      \"isDeleted\": false,\n      \"id\": \"RENTSbmLHkw8L4P6Er97V\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1133.3828125,\n      \"y\": 229.09375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 478,\n      \"height\": 152,\n      \"seed\": 2115574885,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"ServiceTypes, BodyTypes and expected ReturnValues\\n\\n   ServiceType | BodyTypes   | ReturnValue\\n---------------+-------------+---------------------\\n         authn | ---         | AuthnResponse\\n         authz | Signable    | CompositeSignature\\n     pre-authz | PreSignable | PreAuthzResponse\\nuser-signature | Signable    | [CompositeSignature]\",\n      \"baseline\": 148,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 576,\n      \"versionNonce\": 2084471438,\n      \"isDeleted\": false,\n      \"id\": \"sBtMUDtXKIfllfl-9WUfC\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1082.9218749999995,\n      \"y\": 1401.093750000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 460.531977867585,\n      \"height\": 391.37109374999994,\n      \"seed\": 1727540043,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 544,\n      \"versionNonce\": 1321940306,\n      \"isDeleted\": false,\n      \"id\": \"PsEZcFM0IZw13zeSuy3Uc\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1095.0624999999995,\n      \"y\": 1404.109375000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 441,\n      \"height\": 380,\n      \"seed\": 1976198821,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtiles} from \\\"@onflow/fcl\\\"\\n\\n// Cancel\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:CLOSE\\\")\\n\\n// Approved\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n})\\n\\n// Declined\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"DECLINED\\\",\\n  \\\"reason\\\": \\\"The user didn't want to do it...\\\"\\n})\",\n      \"baseline\": 376,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 145,\n      \"versionNonce\": 1051394254,\n      \"isDeleted\": false,\n      \"id\": \"qqMnX6ggiFPgEfmLjWxL1\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1032.483774543553,\n      \"y\": 1456.839843750001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 572.9056495435534,\n      \"height\": 0,\n      \"seed\": 341230117,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"2P_cD3a0Hs2ZHWSEOm817\",\n        \"focus\": 1.227091165413534,\n        \"gap\": 15.1015625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -572.9056495435534,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 332,\n      \"versionNonce\": 370981650,\n      \"isDeleted\": false,\n      \"id\": \"2P_cD3a0Hs2ZHWSEOm817\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 742.3945312499995,\n      \"y\": 1471.941406250001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 281,\n      \"height\": 133,\n      \"seed\": 816216837,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"qqMnX6ggiFPgEfmLjWxL1\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": \\\"FCL:VIEW:RESPONSE\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n}\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    }\n  ],\n  \"appState\": {\n    \"gridSize\": null,\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/assets/service-method-diagrams/pop-rpc.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 2,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"type\": \"rectangle\",\n      \"version\": 603,\n      \"versionNonce\": 2014138706,\n      \"isDeleted\": false,\n      \"id\": \"pUp_l9lxr69Ot0vF74iBp\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1053.70703125,\n      \"y\": 702.982421875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 583.8359375000001,\n      \"height\": 88.94531249999997,\n      \"seed\": 1472544389,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ]\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 375,\n      \"versionNonce\": 1462281422,\n      \"isDeleted\": false,\n      \"id\": \"doLY96tTtBiyMShHWADlx\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 537.064453125,\n      \"y\": 450.865234375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 378.9140625,\n      \"height\": 177.87890625000003,\n      \"seed\": 765761355,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 331,\n      \"versionNonce\": 146495250,\n      \"isDeleted\": false,\n      \"id\": \"wWCcNk0jRU7XNPNnWQxwy\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 419.76953125,\n      \"y\": 211.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 66,\n      \"height\": 19,\n      \"seed\": 617816645,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"App/FCL\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 596,\n      \"versionNonce\": 1956043534,\n      \"isDeleted\": false,\n      \"id\": \"TuphyvaGoKgYofvL5F9sk\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1017.9375,\n      \"y\": 211.37109375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 38,\n      \"height\": 19,\n      \"seed\": 980425131,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"View\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 723,\n      \"versionNonce\": 1763878098,\n      \"isDeleted\": false,\n      \"id\": \"GZPY6lLBay4dNxJKh6t9-\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 452.27734375,\n      \"y\": 234.0078125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1545.8109896827361,\n      \"seed\": 223989419,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1545.8109896827361\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 772,\n      \"versionNonce\": 727992654,\n      \"isDeleted\": false,\n      \"id\": \"gy2-EirFFN9Rs1yv33dxn\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.14453125,\n      \"y\": 236.53125000000006,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1549.9726593764249,\n      \"seed\": 1657493451,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1549.9726593764249\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 344,\n      \"versionNonce\": 1843284174,\n      \"isDeleted\": false,\n      \"id\": \"g3OfxKqhShO_gW8ihuy2k\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 832.734375,\n      \"y\": 159.6416015625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 216,\n      \"height\": 19,\n      \"seed\": 2033659723,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Service Method: POP/RPC\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 1342,\n      \"versionNonce\": 1357760466,\n      \"isDeleted\": false,\n      \"id\": \"cRCXXezMu6O93NnsmMtlw\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 548.46875,\n      \"y\": 454.5625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 366,\n      \"height\": 171,\n      \"seed\": 264667211,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"Service\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": ServiceType, \\n  \\\"method\\\": \\\"POP/RPC\\\",\\n  \\\"endpoint\\\": \\\"https://wallet.com/_A_\\\",\\n  \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" },\\n  \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n}\",\n      \"baseline\": 167,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 1939,\n      \"versionNonce\": 1956190290,\n      \"isDeleted\": false,\n      \"id\": \"mFodo7CVvji9CuMTQFkGQ\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 459.27442534082866,\n      \"y\": 708.6711316997614,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 575.9935136992426,\n      \"height\": 0,\n      \"seed\": 207407941,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"pVy0_Vt7wLNHak-3XpKct\",\n        \"focus\": -2.08231508423564,\n        \"gap\": 10.281993300238582\n      },\n      \"endBinding\": {\n        \"elementId\": \"pUp_l9lxr69Ot0vF74iBp\",\n        \"focus\": 0.8720852248450665,\n        \"gap\": 18.43909220992873\n      },\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          575.9935136992426,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 555,\n      \"versionNonce\": 258002382,\n      \"isDeleted\": false,\n      \"id\": \"pVy0_Vt7wLNHak-3XpKct\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 457.765625,\n      \"y\": 718.953125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 459,\n      \"height\": 19,\n      \"seed\": 974936005,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Render `https://wallet.com/_A_?omg=rawr` as popup\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 315,\n      \"versionNonce\": 775306770,\n      \"isDeleted\": false,\n      \"id\": \"S8hRM8CDbjBy1msJQBXUT\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 461.296875,\n      \"y\": 234.8359375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 516,\n      \"height\": 133,\n      \"seed\": 1169787467,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {config} from \\\"@onflow/fcl\\\"\\n\\nconfig({\\n  \\\"app.detail.title\\\": \\\"My Awesome App\\\",\\n  \\\"app.detail.icon\\\": \\\"https://app.com/assets/icon.jpg\\\",\\n  \\\"service.OpenID.scopes\\\": \\\"email!\\\",\\n})\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 579,\n      \"versionNonce\": 635560974,\n      \"isDeleted\": false,\n      \"id\": \"qD9xJl1tdtaGnKb076C85\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1057.98828125,\n      \"y\": 705.76953125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 572,\n      \"height\": 76,\n      \"seed\": 1407251013,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtils} from \\\"@onflow/fcl\\\"\\n\\nWalletUtils.onMsgFromFCL(\\\"FCL:VIEW:READY:RESPONSE\\\", callback)\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:READY\\\")\",\n      \"baseline\": 72,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 524,\n      \"versionNonce\": 212380626,\n      \"isDeleted\": false,\n      \"id\": \"XHwC7Fsg0ku28pJIQeHXX\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.4156656271816,\n      \"y\": 877.13671875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 583.5457218851187,\n      \"height\": 0,\n      \"seed\": 2055359205,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"iJSRIo1_cDlQLtOn1fYl6\",\n        \"focus\": 1.1167763157894735,\n        \"gap\": 6.439103127181625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -583.5457218851187,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 488,\n      \"versionNonce\": 1885745742,\n      \"isDeleted\": false,\n      \"id\": \"iJSRIo1_cDlQLtOn1fYl6\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 788.9765625,\n      \"y\": 880.46484375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 244,\n      \"height\": 57,\n      \"seed\": 1852876837,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"XHwC7Fsg0ku28pJIQeHXX\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY\\\"\\n}\",\n      \"baseline\": 53,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 575,\n      \"versionNonce\": 1443324306,\n      \"isDeleted\": false,\n      \"id\": \"o3NY2Deu9m4VQwicKDgPc\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 455.60388297963584,\n      \"y\": 1013.7656250000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 582.8264913860365,\n      \"height\": 0,\n      \"seed\": 2101489195,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"MtdfkG87ukUkNfzon_9Op\",\n        \"focus\": -1.0214057662538694,\n        \"gap\": 4.989867020364159\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          582.8264913860365,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 746,\n      \"versionNonce\": 2043066510,\n      \"isDeleted\": false,\n      \"id\": \"MtdfkG87ukUkNfzon_9Op\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 460.59375,\n      \"y\": 1017.22265625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 459,\n      \"height\": 323,\n      \"seed\": 569460709,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"o3NY2Deu9m4VQwicKDgPc\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY:RESPONSE\\\",\\n  \\\"body\\\": BodyType,\\n  \\\"service\\\": {\\n    \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n    \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" }\\n  },\\n  \\\"config\\\": {\\n    \\\"service\\\": {\\n      \\\"OpenID.scopes\\\": \\\"email!\\\",\\n    },\\n    \\\"app\\\": {\\n      \\\"title\\\": \\\"My Awesome App\\\",\\n      \\\"icon\\\": \\\"https://app.com/assets/icon.jpeg\\\",\\n    }\\n  }\\n}\",\n      \"baseline\": 319,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 445,\n      \"versionNonce\": 1971937106,\n      \"isDeleted\": false,\n      \"id\": \"tOR3r8-ktC1NTHzDZox-Z\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1123.6640625,\n      \"y\": 221.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 500.21874999999994,\n      \"height\": 171.82812500000003,\n      \"seed\": 1547570789,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 809,\n      \"versionNonce\": 163346126,\n      \"isDeleted\": false,\n      \"id\": \"RENTSbmLHkw8L4P6Er97V\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1133.3828125,\n      \"y\": 229.09375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 478,\n      \"height\": 152,\n      \"seed\": 2115574885,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"ServiceTypes, BodyTypes and expected ReturnValues\\n\\n   ServiceType | BodyTypes   | ReturnValue\\n---------------+-------------+---------------------\\n         authn | ---         | AuthnResponse\\n         authz | Signable    | CompositeSignature\\n     pre-authz | PreSignable | PreAuthzResponse\\nuser-signature | Signable    | [CompositeSignature]\",\n      \"baseline\": 148,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 577,\n      \"versionNonce\": 1468376338,\n      \"isDeleted\": false,\n      \"id\": \"sBtMUDtXKIfllfl-9WUfC\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1082.9218749999995,\n      \"y\": 1401.093750000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 460.531977867585,\n      \"height\": 391.37109374999994,\n      \"seed\": 1727540043,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 545,\n      \"versionNonce\": 148925710,\n      \"isDeleted\": false,\n      \"id\": \"PsEZcFM0IZw13zeSuy3Uc\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1095.0624999999995,\n      \"y\": 1404.109375000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 441,\n      \"height\": 380,\n      \"seed\": 1976198821,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtiles} from \\\"@onflow/fcl\\\"\\n\\n// Cancel\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:CLOSE\\\")\\n\\n// Approved\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n})\\n\\n// Declined\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"DECLINED\\\",\\n  \\\"reason\\\": \\\"The user didn't want to do it...\\\"\\n})\",\n      \"baseline\": 376,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 146,\n      \"versionNonce\": 1165177554,\n      \"isDeleted\": false,\n      \"id\": \"qqMnX6ggiFPgEfmLjWxL1\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1032.483774543553,\n      \"y\": 1456.839843750001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 572.9056495435534,\n      \"height\": 0,\n      \"seed\": 341230117,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"2P_cD3a0Hs2ZHWSEOm817\",\n        \"focus\": 1.227091165413534,\n        \"gap\": 15.1015625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -572.9056495435534,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 333,\n      \"versionNonce\": 1688968014,\n      \"isDeleted\": false,\n      \"id\": \"2P_cD3a0Hs2ZHWSEOm817\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 742.3945312499995,\n      \"y\": 1471.941406250001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 281,\n      \"height\": 133,\n      \"seed\": 816216837,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"qqMnX6ggiFPgEfmLjWxL1\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": \\\"FCL:VIEW:RESPONSE\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n}\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    }\n  ],\n  \"appState\": {\n    \"gridSize\": null,\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/assets/service-method-diagrams/tab-rpc.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 2,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"type\": \"rectangle\",\n      \"version\": 604,\n      \"versionNonce\": 189332882,\n      \"isDeleted\": false,\n      \"id\": \"pUp_l9lxr69Ot0vF74iBp\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1053.70703125,\n      \"y\": 702.982421875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 583.8359375000001,\n      \"height\": 88.94531249999997,\n      \"seed\": 1472544389,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ]\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 376,\n      \"versionNonce\": 1744624782,\n      \"isDeleted\": false,\n      \"id\": \"doLY96tTtBiyMShHWADlx\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 537.064453125,\n      \"y\": 450.865234375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 378.9140625,\n      \"height\": 177.87890625000003,\n      \"seed\": 765761355,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 332,\n      \"versionNonce\": 1211595602,\n      \"isDeleted\": false,\n      \"id\": \"wWCcNk0jRU7XNPNnWQxwy\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 419.76953125,\n      \"y\": 211.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 66,\n      \"height\": 19,\n      \"seed\": 617816645,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"App/FCL\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 597,\n      \"versionNonce\": 361634510,\n      \"isDeleted\": false,\n      \"id\": \"TuphyvaGoKgYofvL5F9sk\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1017.9375,\n      \"y\": 211.37109375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 38,\n      \"height\": 19,\n      \"seed\": 980425131,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"View\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 724,\n      \"versionNonce\": 1712341266,\n      \"isDeleted\": false,\n      \"id\": \"GZPY6lLBay4dNxJKh6t9-\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 452.27734375,\n      \"y\": 234.0078125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1545.8109896827361,\n      \"seed\": 223989419,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1545.8109896827361\n        ]\n      ]\n    },\n    {\n      \"type\": \"line\",\n      \"version\": 773,\n      \"versionNonce\": 1927123214,\n      \"isDeleted\": false,\n      \"id\": \"gy2-EirFFN9Rs1yv33dxn\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.14453125,\n      \"y\": 236.53125000000006,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 0,\n      \"height\": 1549.9726593764249,\n      \"seed\": 1657493451,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": null,\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": null,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1549.9726593764249\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 361,\n      \"versionNonce\": 2052383566,\n      \"isDeleted\": false,\n      \"id\": \"g3OfxKqhShO_gW8ihuy2k\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 832.734375,\n      \"y\": 159.96875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 216,\n      \"height\": 19,\n      \"seed\": 2033659723,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Service Method: TAB/RPC\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 1354,\n      \"versionNonce\": 1749494546,\n      \"isDeleted\": false,\n      \"id\": \"cRCXXezMu6O93NnsmMtlw\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 548.46875,\n      \"y\": 454.18861607142856,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 366,\n      \"height\": 171,\n      \"seed\": 264667211,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"Service\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": ServiceType, \\n  \\\"method\\\": \\\"TAB/RPC\\\",\\n  \\\"endpoint\\\": \\\"https://wallet.com/_A_\\\",\\n  \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" },\\n  \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n}\",\n      \"baseline\": 167,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 1940,\n      \"versionNonce\": 729588882,\n      \"isDeleted\": false,\n      \"id\": \"mFodo7CVvji9CuMTQFkGQ\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 458.26191288466373,\n      \"y\": 708.3198360146755,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 577.0060261554075,\n      \"height\": 0,\n      \"seed\": 207407941,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"pVy0_Vt7wLNHak-3XpKct\",\n        \"focus\": -2.1187061713875495,\n        \"gap\": 10.627708628181722\n      },\n      \"endBinding\": {\n        \"elementId\": \"pUp_l9lxr69Ot0vF74iBp\",\n        \"focus\": 0.879984363657714,\n        \"gap\": 18.43909220992873\n      },\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          577.0060261554075,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 556,\n      \"versionNonce\": 1400579470,\n      \"isDeleted\": false,\n      \"id\": \"pVy0_Vt7wLNHak-3XpKct\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 457.765625,\n      \"y\": 718.9475446428572,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 441,\n      \"height\": 19,\n      \"seed\": 974936005,\n      \"groupIds\": [\n        \"mI9O7RDP-tPOgCFotC0Sz\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"Render `https://wallet.com/_A_?omg=rawr` as tab\",\n      \"baseline\": 15,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 316,\n      \"versionNonce\": 291390034,\n      \"isDeleted\": false,\n      \"id\": \"S8hRM8CDbjBy1msJQBXUT\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 461.296875,\n      \"y\": 234.8359375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 516,\n      \"height\": 133,\n      \"seed\": 1169787467,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {config} from \\\"@onflow/fcl\\\"\\n\\nconfig({\\n  \\\"app.detail.title\\\": \\\"My Awesome App\\\",\\n  \\\"app.detail.icon\\\": \\\"https://app.com/assets/icon.jpg\\\",\\n  \\\"service.OpenID.scopes\\\": \\\"email!\\\",\\n})\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 580,\n      \"versionNonce\": 1817920462,\n      \"isDeleted\": false,\n      \"id\": \"qD9xJl1tdtaGnKb076C85\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1057.98828125,\n      \"y\": 705.76953125,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 572,\n      \"height\": 76,\n      \"seed\": 1407251013,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"mFodo7CVvji9CuMTQFkGQ\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtils} from \\\"@onflow/fcl\\\"\\n\\nWalletUtils.onMsgFromFCL(\\\"FCL:VIEW:READY:RESPONSE\\\", callback)\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:READY\\\")\",\n      \"baseline\": 72,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 525,\n      \"versionNonce\": 214312978,\n      \"isDeleted\": false,\n      \"id\": \"XHwC7Fsg0ku28pJIQeHXX\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1039.4156656271816,\n      \"y\": 877.13671875,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 583.5457218851187,\n      \"height\": 0,\n      \"seed\": 2055359205,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"iJSRIo1_cDlQLtOn1fYl6\",\n        \"focus\": 1.1167763157894735,\n        \"gap\": 6.439103127181625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -583.5457218851187,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 489,\n      \"versionNonce\": 673028622,\n      \"isDeleted\": false,\n      \"id\": \"iJSRIo1_cDlQLtOn1fYl6\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 788.9765625,\n      \"y\": 880.46484375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 244,\n      \"height\": 57,\n      \"seed\": 1852876837,\n      \"groupIds\": [\n        \"hkRFVCY3u_l0jWCjI8A06\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"XHwC7Fsg0ku28pJIQeHXX\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY\\\"\\n}\",\n      \"baseline\": 53,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 576,\n      \"versionNonce\": 631985618,\n      \"isDeleted\": false,\n      \"id\": \"o3NY2Deu9m4VQwicKDgPc\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 455.60388297963584,\n      \"y\": 1013.7656250000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 582.8264913860365,\n      \"height\": 0,\n      \"seed\": 2101489195,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"MtdfkG87ukUkNfzon_9Op\",\n        \"focus\": -1.0214057662538694,\n        \"gap\": 4.989867020364159\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          582.8264913860365,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 747,\n      \"versionNonce\": 1572546638,\n      \"isDeleted\": false,\n      \"id\": \"MtdfkG87ukUkNfzon_9Op\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 460.59375,\n      \"y\": 1017.22265625,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 459,\n      \"height\": 323,\n      \"seed\": 569460709,\n      \"groupIds\": [\n        \"Ik0L6Z4_VlST0N-2z6VQV\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"o3NY2Deu9m4VQwicKDgPc\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"type\\\": \\\"FCL:VIEW:READY:RESPONSE\\\",\\n  \\\"body\\\": BodyType,\\n  \\\"service\\\": {\\n    \\\"params\\\": { \\\"omg\\\": \\\"rawr\\\" },\\n    \\\"data\\\": { \\\"foo\\\": \\\"bar\\\" }\\n  },\\n  \\\"config\\\": {\\n    \\\"service\\\": {\\n      \\\"OpenID.scopes\\\": \\\"email!\\\",\\n    },\\n    \\\"app\\\": {\\n      \\\"title\\\": \\\"My Awesome App\\\",\\n      \\\"icon\\\": \\\"https://app.com/assets/icon.jpeg\\\",\\n    }\\n  }\\n}\",\n      \"baseline\": 319,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 446,\n      \"versionNonce\": 1294257042,\n      \"isDeleted\": false,\n      \"id\": \"tOR3r8-ktC1NTHzDZox-Z\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1123.6640625,\n      \"y\": 221.30859375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 500.21874999999994,\n      \"height\": 171.82812500000003,\n      \"seed\": 1547570789,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 810,\n      \"versionNonce\": 487386766,\n      \"isDeleted\": false,\n      \"id\": \"RENTSbmLHkw8L4P6Er97V\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1133.3828125,\n      \"y\": 229.09375,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"width\": 478,\n      \"height\": 152,\n      \"seed\": 2115574885,\n      \"groupIds\": [\n        \"TpzbWBW_qlEU-Hi5j9Dw7\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"ServiceTypes, BodyTypes and expected ReturnValues\\n\\n   ServiceType | BodyTypes   | ReturnValue\\n---------------+-------------+---------------------\\n         authn | ---         | AuthnResponse\\n         authz | Signable    | CompositeSignature\\n     pre-authz | PreSignable | PreAuthzResponse\\nuser-signature | Signable    | [CompositeSignature]\",\n      \"baseline\": 148,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"rectangle\",\n      \"version\": 578,\n      \"versionNonce\": 963217746,\n      \"isDeleted\": false,\n      \"id\": \"sBtMUDtXKIfllfl-9WUfC\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1082.9218749999995,\n      \"y\": 1401.093750000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 460.531977867585,\n      \"height\": 391.37109374999994,\n      \"seed\": 1727540043,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": []\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 546,\n      \"versionNonce\": 315354318,\n      \"isDeleted\": false,\n      \"id\": \"PsEZcFM0IZw13zeSuy3Uc\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1095.0624999999995,\n      \"y\": 1404.109375000001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 441,\n      \"height\": 380,\n      \"seed\": 1976198821,\n      \"groupIds\": [\n        \"s38pqtF6zdwbpuo0GwZ4q\"\n      ],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"import {WalletUtiles} from \\\"@onflow/fcl\\\"\\n\\n// Cancel\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:CLOSE\\\")\\n\\n// Approved\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n})\\n\\n// Declined\\nWalletUtils.sendMsgToFCL(\\\"FCL:VIEW:RESPONSE\\\", {\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"status\\\": \\\"DECLINED\\\",\\n  \\\"reason\\\": \\\"The user didn't want to do it...\\\"\\n})\",\n      \"baseline\": 376,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    },\n    {\n      \"type\": \"arrow\",\n      \"version\": 147,\n      \"versionNonce\": 1104187154,\n      \"isDeleted\": false,\n      \"id\": \"qqMnX6ggiFPgEfmLjWxL1\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 1032.483774543553,\n      \"y\": 1456.839843750001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 572.9056495435534,\n      \"height\": 0,\n      \"seed\": 341230117,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"round\",\n      \"boundElementIds\": [],\n      \"startBinding\": {\n        \"elementId\": \"2P_cD3a0Hs2ZHWSEOm817\",\n        \"focus\": 1.227091165413534,\n        \"gap\": 15.1015625\n      },\n      \"endBinding\": null,\n      \"lastCommittedPoint\": null,\n      \"startArrowhead\": null,\n      \"endArrowhead\": \"arrow\",\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -572.9056495435534,\n          0\n        ]\n      ]\n    },\n    {\n      \"type\": \"text\",\n      \"version\": 334,\n      \"versionNonce\": 1821451022,\n      \"isDeleted\": false,\n      \"id\": \"2P_cD3a0Hs2ZHWSEOm817\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"strokeStyle\": \"solid\",\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"angle\": 0,\n      \"x\": 742.3945312499995,\n      \"y\": 1471.941406250001,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"width\": 281,\n      \"height\": 133,\n      \"seed\": 816216837,\n      \"groupIds\": [],\n      \"strokeSharpness\": \"sharp\",\n      \"boundElementIds\": [\n        \"qqMnX6ggiFPgEfmLjWxL1\"\n      ],\n      \"fontSize\": 16,\n      \"fontFamily\": 3,\n      \"text\": \"{\\n  \\\"f_type\\\": \\\"PollingResponse\\\",\\n  \\\"f_vsn\\\": \\\"1.0.0\\\",\\n  \\\"type\\\": \\\"FCL:VIEW:RESPONSE\\\",\\n  \\\"status\\\": \\\"APPROVED\\\",\\n  \\\"data\\\": ReturnValue\\n}\",\n      \"baseline\": 129,\n      \"textAlign\": \"left\",\n      \"verticalAlign\": \"top\"\n    }\n  ],\n  \"appState\": {\n    \"gridSize\": null,\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/docs/extra.md",
    "content": "## Configuration\n\nFCL has a mechanism that lets you configure various aspects of FCL. When you move from one instance of the Flow Blockchain to another (Local Emulator to Testnet to Mainnet) the only thing you should need to change for your FCL implementation is your configuration.\n\n### Setting Configuration Values\n\nValues only need to be set once. We recommend doing this once and as early in the life cycle as possible. To set a configuration value, the `put` method on the `config` instance needs to be called, the `put` method returns the `config` instance so they can be chained.\n\nAlternatively, you can set the config by passing a JSON object directly.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config() // returns the config instance\n  .put('foo', 'bar') // configures \"foo\" to be \"bar\"\n  .put('baz', 'buz'); // configures \"baz\" to be \"buz\"\n\n// OR\n\nfcl.config({\n  foo: 'bar',\n  baz: 'buz',\n});\n```\n\n### Getting Configuration Values\n\nThe `config` instance has an **asynchronous** `get` method. You can also pass it a fallback value.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('foo', 'bar').put('woot', 5).put('rawr', 7);\n\nconst FALLBACK = 1;\n\nasync function addStuff() {\n  var woot = await fcl.config().get('woot', FALLBACK); // will be 5 -- set in the config before\n  var rawr = await fcl.config().get('rawr', FALLBACK); // will be 7 -- set in the config before\n  var hmmm = await fcl.config().get('hmmm', FALLBACK); // will be 1 -- uses fallback because this isnt in the config\n\n  return woot + rawr + hmmm;\n}\n\naddStuff().then((d) => console.log(d)); // 13 (5 + 7 + 1)\n```\n\n### Common Configuration Keys\n\n| Name                                 | Example                                                       | Description                                                                                                                                                             |\n| ------------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `accessNode.api` **(required)**      | `https://rest-testnet.onflow.org`                             | API URL for the Flow Blockchain Access Node you want to be communicating with. See all available access node endpoints [here](https://developers.onflow.org/http-api/). |\n| `app.detail.title`                   | `Cryptokitties`                                               | Your applications title, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                       |\n| `app.detail.icon`                    | `https://fcl-discovery.onflow.org/images/blocto.png`          | Url for your applications icon, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                |\n| `app.detail.description`             | `Cryptokitties is a blockchain game`                          | Your applications description, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                 |\n| `app.detail.url`                     | `https://cryptokitties.co`                                    | Your applications url, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                         |\n| `challenge.handshake`                | **DEPRECATED**                                                | Use `discovery.wallet` instead.                                                                                                                                         |\n| `discovery.authn.endpoint`           | `https://fcl-discovery.onflow.org/api/testnet/authn`          | Endpoint for alternative configurable Wallet Discovery mechanism.                                                                  |\n| `discovery.wallet` **(required)**    | `https://fcl-discovery.onflow.org/testnet/authn`              | Points FCL at the Wallet or Wallet Discovery mechanism.                                                                                                                 |\n| `discovery.wallet.method`            | `IFRAME/RPC`, `POP/RPC`, `TAB/RPC`, `HTTP/POST`, or `EXT/RPC` | Describes which service strategy a wallet should use.                                                                                                                   |\n| `fcl.limit`                          | `100`                                                         | Specifies fallback compute limit if not provided in transaction. Provided as integer.                                                                                   |\n| `flow.network` **(recommended)**     | `testnet`                                                     | Used in conjunction with stored interactions and provides FCLCryptoContract address for `testnet` and `mainnet`. Possible values: `local`, `testnet`, `mainnet`.        |\n| `walletconnect.projectId`            | `YOUR_PROJECT_ID`                                             | Your app's WalletConnect project ID. See [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) to obtain a project ID for your application.                    |\n| `walletconnect.disableNotifications` | `false`                                                       | Optional flag to disable pending WalletConnect request notifications within the application's UI.                                                                       |\n\n## Using Contracts in Scripts and Transactions\n\n### Address Replacement\n\nConfiguration keys that start with `0x` will be replaced in FCL scripts and transactions, this allows you to write your script or transaction Cadence code once and not have to change it when you point your application at a difference instance of the Flow Blockchain.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('0xFungibleToken', '0xf233dcee88fe0abe');\n\nasync function myScript() {\n  return fcl\n    .send([\n      fcl.script`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      access(all) fun main() { /* Rest of the script goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n\nasync function myTransaction() {\n  return fcl\n    .send([\n      fcl.transaction`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      transaction { /* Rest of the transaction goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n```\n\n#### Example\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config()\n  .put('flow.network', 'testnet')\n  .put('walletconnect.projectId', 'YOUR_PROJECT_ID')\n  .put('accessNode.api', 'https://rest-testnet.onflow.org')\n  .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn')\n  .put('app.detail.title', 'Test Harness')\n  .put('app.detail.icon', 'https://i.imgur.com/r23Zhvu.png')\n  .put('app.detail.description', 'A test harness for FCL')\n  .put('app.detail.url', 'https://myapp.com')\n  .put('service.OpenID.scopes', 'email email_verified name zoneinfo')\n  .put('0xFlowToken', '0x7e60df042a9c0868');\n```\n\n### Using `flow.json` for Contract Imports\n\nA simpler and more flexible way to manage contract imports in scripts and transactions is by using the `config.load` method in FCL. This lets you load contract configurations from a `flow.json` file, keeping your import syntax clean and allowing FCL to pick the correct contract addresses based on the network you're using.\n\n#### 1. Define Your Contracts in `flow.json`\n\nHere’s an example of a `flow.json` file with aliases for multiple networks:\n\n```json\n{\n  \"contracts\": {\n    \"HelloWorld\": {\n      \"source\": \"./cadence/contracts/HelloWorld.cdc\",\n      \"aliases\": {\n        \"testnet\": \"0x1cf0e2f2f715450\",\n        \"mainnet\": \"0xf8d6e0586b0a20c7\"\n      }\n    }\n  }\n}\n```\n\n- **`source`**: Points to the contract file in your project.\n- **`aliases`**: Maps each network to the correct contract address.\n\n#### 2. Configure FCL\n\nLoad the `flow.json` file and set up FCL to use it:\n\n```javascript\nimport { config } from '@onflow/fcl';\nimport flowJSON from '../flow.json';\n\nconfig({\n  'flow.network': 'testnet', // Choose your network, e.g., testnet or mainnet\n  'accessNode.api': 'https://rest-testnet.onflow.org', // Access node for the network\n  'discovery.wallet': `https://fcl-discovery.onflow.org/testnet/authn`, // Wallet discovery\n}).load({ flowJSON });\n```\n\nWith this setup, FCL will automatically use the correct contract address based on the selected network (e.g., `testnet` or `mainnet`).\n\n#### 3. Use Contract Names in Scripts and Transactions\n\nAfter setting up `flow.json`, you can import contracts by name in your Cadence scripts or transactions:\n\n```cadence\nimport \"HelloWorld\"\n\naccess(all) fun main(): String {\n    return HelloWorld.sayHello()\n}\n```\n\nFCL replaces `\"HelloWorld\"` with the correct address from the `flow.json` configuration.\n\n> **Note**: Don’t store private keys in your `flow.json`. Instead, keep sensitive keys in a separate, `.gitignore`-protected file."
  },
  {
    "path": "packages/fcl-core/docs-generator.config.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nmodule.exports = {\n  customData: {\n    extra: fs\n      .readFileSync(path.join(__dirname, \"docs\", \"extra.md\"), \"utf8\")\n      .trim(),\n  },\n}\n"
  },
  {
    "path": "packages/fcl-core/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-core\",\n  \"version\": \"1.30.2\",\n  \"description\": \"Core JavaScript/TypeScript library providing shared functionality for Flow blockchain interactions.\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"jest\": {\n    \"testEnvironment\": \"jsdom\",\n    \"globals\": {\n      \"PACKAGE_CURRENT_VERSION\": \"TESTVERSION\"\n    }\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"1.8.0\",\n    \"@types/estree\": \"^1.0.6\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/node\": \"^18.19.57\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/fcl-core.ts\",\n  \"main\": \"dist/fcl-core.js\",\n  \"module\": \"dist/fcl-core.module.js\",\n  \"unpkg\": \"dist/fcl-core.umd.min.js\",\n  \"types\": \"types/fcl-core.d.ts\",\n  \"scripts\": {\n    \"pain\": \"npm publish --tag pain\",\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"build:types\": \"tsc --project ./tsconfig-web.json && tsc --noResolve --project ./tsconfig-react-native.json\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@improbable-eng/grpc-web\": \"^0.15.0\",\n    \"@onflow/config\": \"1.11.1\",\n    \"@onflow/interaction\": \"0.0.11\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/sdk\": \"1.13.7\",\n    \"@onflow/transport-http\": \"1.15.6\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@onflow/util-actor\": \"1.3.5\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@onflow/util-semver\": \"1.0.4\",\n    \"@onflow/util-template\": \"1.2.4\",\n    \"@onflow/util-uid\": \"1.2.4\",\n    \"abort-controller\": \"^3.0.0\",\n    \"cross-fetch\": \"^4.0.0\",\n    \"uuid\": \"^11.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/VERSION.ts",
    "content": "declare const PACKAGE_CURRENT_VERSION: string | undefined\n\n// Use PACKAGE_CURRENT_VERSION if available (from build), otherwise use a default for development\nexport const VERSION: string =\n  typeof PACKAGE_CURRENT_VERSION !== \"undefined\"\n    ? PACKAGE_CURRENT_VERSION\n    : \"TESTVERSION\"\n"
  },
  {
    "path": "packages/fcl-core/src/app-utils/__tests__/verify-user-sig.test.ts",
    "content": "import {verifyUserSignatures, validateArgs} from \"../verify-signatures\"\n\nconst message = Buffer.from(\"FOO\").toString(\"hex\")\n\nconst compSigOne = {\n  f_type: \"CompositeSignature\",\n  f_vsn: \"1.0.0\",\n  addr: \"0x123\",\n  keyId: 0,\n  signature: \"abc123\",\n}\n\nconst compSigTwo = {\n  f_type: \"CompositeSignature\",\n  f_vsn: \"1.0.0\",\n  addr: \"0x123\",\n  keyId: 0,\n  signature: \"abc123\",\n}\n\nconst compSigThree = {\n  f_type: \"CompositeSignature\",\n  f_vsn: \"1.0.0\",\n  addr: \"0x456\",\n  keyId: 0,\n  signature: \"abc123\",\n}\n\ndescribe(\"verifyUserSignatures\", () => {\n  it(\"should return true if valid args\", async () => {\n    const compSigs = [compSigOne, compSigTwo]\n    const address = \"0x6a32b81933f0ee64\"\n    const res = await validateArgs({message, address, compSigs})\n    expect.assertions(1)\n    expect(res).toEqual(true)\n  })\n\n  it(\"should reject if message is not hex string\", async () => {\n    const compSigs = [compSigOne, compSigTwo]\n    expect.assertions(1)\n    await expect(verifyUserSignatures(\"FOO\", compSigs)).rejects.toThrow(Error)\n  })\n\n  it(\"should reject if missing array of composite signatures\", async () => {\n    expect.assertions(1)\n    await expect(verifyUserSignatures(message, [])).rejects.toThrow(Error)\n  })\n\n  it(\"should reject if compSigs are from different account addresses\", async () => {\n    const compSigs = [compSigOne, compSigTwo, compSigThree]\n    expect.assertions(1)\n    await expect(verifyUserSignatures(message, compSigs)).rejects.toThrow(Error)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/app-utils/index.ts",
    "content": "export {verifyAccountProof, verifyUserSignatures} from \"./verify-signatures\"\n"
  },
  {
    "path": "packages/fcl-core/src/app-utils/verify-signatures.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {withPrefix, sansPrefix} from \"@onflow/util-address\"\nimport {createQuery} from \"../exec/query\"\nimport {encodeAccountProof} from \"../wallet-utils\"\nimport {isString} from \"../utils/is\"\nimport {CompositeSignature} from \"@onflow/typedefs\"\nimport {createGetChainId} from \"../utils\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nexport interface AccountProofData {\n  address: string\n  nonce: string\n  signatures: CompositeSignature[]\n}\n\nexport interface VerifySignaturesScriptOptions {\n  fclCryptoContract?: string\n}\n\nexport interface ValidateArgsInput {\n  appIdentifier?: string\n  address?: string\n  nonce?: string\n  signatures?: CompositeSignature[]\n  message?: string\n  compSigs?: CompositeSignature[]\n}\n\nconst ACCOUNT_PROOF = \"ACCOUNT_PROOF\"\nconst USER_SIGNATURE = \"USER_SIGNATURE\"\n\n/**\n * @description Validates input arguments for signature verification functions (both account proof and user signature verification).\n * This function performs comprehensive validation of parameters to ensure they meet the requirements for cryptographic\n * signature verification on the Flow blockchain. It handles two different validation scenarios: account proof validation\n * (when appIdentifier is provided) and user signature validation (when message is provided).\n *\n * @param args Object containing the arguments to validate. The validation behavior depends on which properties are present:\n * - For account proof validation: appIdentifier, address, nonce, and signatures are required\n * - For user signature validation: message, address, and compSigs are required\n * @param args.appIdentifier Optional unique identifier for the application (triggers account proof validation mode)\n * @param args.address Flow account address that should be exactly 16 characters (without 0x prefix)\n * @param args.nonce Hexadecimal string representing a cryptographic nonce (for account proof validation)\n * @param args.signatures Array of CompositeSignature objects for account proof validation\n * @param args.message Hexadecimal string representing the signed message (for user signature validation)\n * @param args.compSigs Array of CompositeSignature objects for user signature validation\n *\n * @returns Always returns true if validation passes, otherwise throws an error\n *\n * @throws Throws an invariant error if any validation check fails, with specific error messages for each validation failure\n *\n * @example\n * // Validate account proof arguments\n * const accountProofArgs = {\n *   appIdentifier: \"MyApp\",\n *   address: \"1234567890abcdef\",\n *   nonce: \"75f8587e5bd982ec9289c5be1f9426bd\",\n *   signatures: [{\n *     f_type: \"CompositeSignature\",\n *     f_vsn: \"1.0.0\",\n *     addr: \"0x1234567890abcdef\",\n *     keyId: 0,\n *     signature: \"abc123def456...\"\n *   }]\n * }\n *\n * const isValid = validateArgs(accountProofArgs) // Returns true or throws\n *\n * // Validate user signature arguments\n * const userSigArgs = {\n *   message: \"48656c6c6f20576f726c64\", // \"Hello World\" in hex\n *   address: \"1234567890abcdef\",\n *   compSigs: [{\n *     f_type: \"CompositeSignature\",\n *     f_vsn: \"1.0.0\",\n *     addr: \"0x1234567890abcdef\",\n *     keyId: 0,\n *     signature: \"def456abc123...\"\n *   }]\n * }\n *\n * const isValid = validateArgs(userSigArgs) // Returns true or throws\n */\nexport const validateArgs = (args: ValidateArgsInput): boolean => {\n  if (args.appIdentifier) {\n    const {appIdentifier, address, nonce, signatures} = args\n    invariant(\n      isString(appIdentifier),\n      \"verifyAccountProof({ appIdentifier }) -- appIdentifier must be a string\"\n    )\n    invariant(\n      isString(address) && sansPrefix(address!).length === 16,\n      \"verifyAccountProof({ address }) -- address must be a valid address\"\n    )\n    invariant(/^[0-9a-f]+$/i.test(nonce!), \"nonce must be a hex string\")\n    invariant(\n      Array.isArray(signatures) &&\n        signatures.every((sig, i, arr) => sig.f_type === \"CompositeSignature\"),\n      \"Must include an Array of CompositeSignatures to verify\"\n    )\n    invariant(\n      signatures.map(cs => cs.addr).every((addr, i, arr) => addr === arr[0]),\n      \"User signatures to be verified must be from a single account address\"\n    )\n    return true\n  } else {\n    const {message, address, compSigs} = args\n    invariant(\n      /^[0-9a-f]+$/i.test(message!),\n      \"Signed message must be a hex string\"\n    )\n    invariant(\n      isString(address) && sansPrefix(address!).length === 16,\n      \"verifyUserSignatures({ address }) -- address must be a valid address\"\n    )\n    invariant(\n      Array.isArray(compSigs) &&\n        compSigs.every((sig, i, arr) => sig.f_type === \"CompositeSignature\"),\n      \"Must include an Array of CompositeSignatures to verify\"\n    )\n    invariant(\n      compSigs.map(cs => cs.addr).every((addr, i, arr) => addr === arr[0]),\n      \"User signatures to be verified must be from a single account address\"\n    )\n    return true\n  }\n}\n\n// TODO: pass in option for contract but we're connected to testnet\n// log address + network -> in sync?\nconst getVerifySignaturesScript = async (\n  context: Pick<FCLContext, \"config\" | \"sdk\">,\n  sig: string,\n  opts: VerifySignaturesScriptOptions\n): Promise<string> => {\n  const verifyFunction =\n    sig === \"ACCOUNT_PROOF\"\n      ? \"verifyAccountProofSignatures\"\n      : \"verifyUserSignatures\"\n\n  const network = await createGetChainId(context)(opts)\n\n  const contractAddresses: any = {\n    testnet: \"0x74daa6f9c7ef24b1\",\n    mainnet: \"0xb4b82a1c9d21d284\",\n    previewnet: \"0x40b5b8b2ce81ea4a\",\n  }\n  const fclCryptoContract = opts.fclCryptoContract || contractAddresses[network]\n\n  invariant(\n    fclCryptoContract as any,\n    `${verifyFunction}({ fclCryptoContract }) -- FCLCrypto contract address is unknown for network: ${network}. Please manually specify the FCLCrypto contract address.`\n  )\n\n  return `\n      import FCLCrypto from ${fclCryptoContract}\n\n      access(all) fun main(\n          address: Address, \n          message: String, \n          keyIndices: [Int], \n          signatures: [String]\n      ): Bool {\n        return FCLCrypto.${verifyFunction}(address: address, message: message, keyIndices: keyIndices, signatures: signatures)\n      }\n    `\n}\n\nexport function createVerifyAccountProof(\n  context: Pick<FCLContext, \"config\" | \"sdk\">\n) {\n  /**\n   * @description Verifies the authenticity of an account proof signature on the Flow blockchain.\n   * Account proofs are cryptographic signatures used to prove ownership of a Flow account without\n   * revealing private keys. This function validates that the provided signatures were indeed created\n   * by the private keys associated with the specified Flow account address.\n   *\n   * @param appIdentifier A unique identifier for your application. This is typically\n   * your app's name or domain and is included in the signed message to prevent replay attacks\n   * across different applications.\n   * @param accountProofData Object containing the account proof data to verify\n   * @param accountProofData.address The Flow account address that allegedly signed the proof\n   * @param accountProofData.nonce A random hexadecimal string (minimum 32 bytes, 64 hex chars)\n   * used to prevent replay attacks. Should be unique for each proof request.\n   * @param accountProofData.signatures Array of composite signatures to verify\n   * against the account's public keys\n   * @param opts Optional configuration parameters\n   * @param opts.fclCryptoContract Override address for the FCLCrypto contract if not using\n   * the default for the current network\n   *\n   * @returns Promise that resolves to true if all signatures are valid, false otherwise.\n   *\n   * @returns `true` if verified or `false`\n   *\n   * @example\n   * import * as fcl from \"@onflow/fcl\"\n   *\n   * const accountProofData = {\n   *   address: \"0x123\",\n   *   nonce: \"F0123\"\n   *   signatures: [{f_type: \"CompositeSignature\", f_vsn: \"1.0.0\", addr: \"0x123\", keyId: 0, signature: \"abc123\"}],\n   * }\n   *\n   * const isValid = await fcl.AppUtils.verifyAccountProof(\n   *   \"AwesomeAppId\",\n   *   accountProofData,\n   *   {fclCryptoContract}\n   * )\n   */\n  async function verifyAccountProof(\n    appIdentifier: string,\n    {address, nonce, signatures}: AccountProofData,\n    opts: VerifySignaturesScriptOptions = {}\n  ): Promise<boolean> {\n    validateArgs({appIdentifier, address, nonce, signatures})\n    const message = encodeAccountProof({address, nonce, appIdentifier}, false)\n\n    const signaturesArr: string[] = []\n    const keyIndices: string[] = []\n\n    for (const el of signatures) {\n      signaturesArr.push(el.signature)\n      keyIndices.push(el.keyId.toString())\n    }\n\n    return createQuery(context)({\n      cadence: await getVerifySignaturesScript(context, ACCOUNT_PROOF, opts),\n      args: (arg: any, t: any) => [\n        arg(withPrefix(address), t.Address),\n        arg(message, t.String),\n        arg(keyIndices, t.Array(t.Int)),\n        arg(signaturesArr, t.Array(t.String)),\n      ],\n    })\n  }\n\n  return verifyAccountProof\n}\n\nexport function createVerifyUserSignatures(\n  context: Pick<FCLContext, \"config\" | \"sdk\">\n) {\n  /**\n   * @description Verifies user signatures for arbitrary messages on the Flow blockchain. This function\n   * validates that the provided signatures were created by the private keys associated with the specified\n   * Flow account when signing the given message. This is useful for authenticating users or validating\n   * signed data outside of transaction contexts.\n   *\n   * @param message The message that was signed, encoded as a hexadecimal string. The original\n   * message should be converted to hex before passing to this function.\n   * @param compSigs Array of composite signatures to verify. All signatures\n   * must be from the same account address.\n   * @param compSigs[].f_type Must be \"CompositeSignature\"\n   * @param compSigs[].f_vsn Must be \"1.0.0\"\n   * @param compSigs[].addr The Flow account address that created the signature\n   * @param compSigs[].keyId The key ID used to create the signature\n   * @param compSigs[].signature The actual signature data\n   * @param opts Optional configuration parameters\n   * @param opts.fclCryptoContract Override address for the FCLCrypto contract\n   *\n   * @returns Promise that resolves to true if all signatures are valid, false otherwise\n   *\n   * @throws If parameters are invalid, signatures are from different accounts, or network issues occur\n   *\n   * @example\n   * // Basic message signature verification\n   * import * as fcl from \"@onflow/fcl\"\n   *\n   * const originalMessage = \"Hello, Flow blockchain!\"\n   * const hexMessage = Buffer.from(originalMessage).toString(\"hex\")\n   *\n   * const signatures = [{\n   *   f_type: \"CompositeSignature\",\n   *   f_vsn: \"1.0.0\",\n   *   addr: \"0x1234567890abcdef\",\n   *   keyId: 0,\n   *   signature: \"abc123def456...\" // signature from user's wallet\n   * }]\n   *\n   * const isValid = await fcl.AppUtils.verifyUserSignatures(\n   *   hexMessage,\n   *   signatures\n   * )\n   */\n  async function verifyUserSignatures(\n    message: string,\n    compSigs: CompositeSignature[],\n    opts: VerifySignaturesScriptOptions = {}\n  ): Promise<boolean> {\n    const address = withPrefix(compSigs[0].addr)\n    validateArgs({message, address, compSigs})\n\n    const signaturesArr: string[] = []\n    const keyIndices: string[] = []\n\n    for (const el of compSigs) {\n      signaturesArr.push(el.signature)\n      keyIndices.push(el.keyId.toString())\n    }\n\n    return createQuery(context)({\n      cadence: await getVerifySignaturesScript(context, USER_SIGNATURE, opts),\n      args: (arg, t) => [\n        arg(address, t.Address),\n        arg(message, t.String),\n        arg(keyIndices, t.Array(t.Int)),\n        arg(signaturesArr, t.Array(t.String)),\n      ],\n    })\n  }\n\n  return verifyUserSignatures\n}\n\nexport const verifyAccountProof = /* @__PURE__ */ createVerifyAccountProof(\n  createPartialGlobalFCLContext()\n)\nexport const verifyUserSignatures = /* @__PURE__ */ createVerifyUserSignatures(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/client.ts",
    "content": "import {httpTransport} from \"@onflow/transport-http\"\nimport {createVerifyUserSignatures} from \"./app-utils/verify-signatures\"\nimport {createFCLContext} from \"./context/index\"\nimport {createMutate} from \"./exec/mutate\"\nimport {createQuery} from \"./exec/query\"\nimport {createQueryRaw} from \"./exec/query-raw\"\nimport {createTransaction} from \"./transaction\"\nimport {createEvents} from \"./events\"\nimport {createGetChainId} from \"./utils\"\nimport {createSerialize} from \"./serialize\"\nimport {SdkTransport} from \"@onflow/typedefs\"\nimport {StorageProvider} from \"./fcl-core\"\n\nexport interface FlowClientCoreConfig {\n  // Core network configuration (most commonly used)\n  accessNodeUrl: string\n  flowNetwork?: string\n  flowJson?: Record<string, any>\n\n  // Wallet/Discovery configuration\n  discoveryWallet?: string\n  discoveryWalletMethod?: string\n  discoveryAuthnEndpoint?: string\n  discoveryAuthnInclude?: string[]\n  discoveryAuthnExclude?: string[]\n\n  // Compute limit for transactions\n  computeLimit: number\n\n  // Storage configuration\n  storage: StorageProvider\n\n  // Platform configuration\n  platform: string\n\n  // Discovery configuration\n  discovery?: {\n    execStrategy?: (opts: any) => Promise<any>\n  }\n\n  // App detail properties\n  appDetailTitle?: string\n  appDetailIcon?: string\n  appDetailDescription?: string\n  appDetailUrl?: string\n\n  // Service configuration\n  serviceOpenIdScopes?: string[]\n\n  // Advanced/SDK configuration (least commonly used)\n  transport?: SdkTransport\n  customResolver?: any\n  customDecoders?: any\n}\n\nexport function createFlowClientCore(params: FlowClientCoreConfig) {\n  const context = createFCLContext({\n    ...params,\n    transport: params.transport || httpTransport,\n  })\n\n  return {\n    // Global services\n    currentUser: context.currentUser,\n\n    // Execution methods\n    mutate: createMutate(context),\n    query: createQuery(context),\n    queryRaw: createQueryRaw(context),\n    verifyUserSignatures: createVerifyUserSignatures(context),\n    getChainId: createGetChainId(context),\n\n    // Streaming helpers\n    tx: createTransaction(context),\n    events: createEvents(context),\n\n    // Authentication methods\n    authenticate: context.currentUser.authenticate,\n    unauthenticate: context.currentUser.unauthenticate,\n    signUserMessage: context.currentUser.signUserMessage,\n\n    // Utility methods\n    serialize: createSerialize(context),\n\n    // Re-export the SDK methods\n    ...context.sdk,\n  }\n}\n\nexport type FlowClientCore = ReturnType<typeof createFlowClientCore>\n"
  },
  {
    "path": "packages/fcl-core/src/context/global.ts",
    "content": "import {FCLContext} from \"./index\"\nimport {config as _config} from \"@onflow/config\"\nimport {\n  send,\n  decode,\n  subscribe,\n  subscribeRaw,\n  account,\n  block,\n  resolve,\n} from \"@onflow/sdk\"\n\n/**\n * Note to self:\n * Create the partial context\n * Then you need to make functions take only the necessary parts of the context\n * This way you can avoid the issue where the subtype does not satisfy the args\n */\n\n/**\n * Create a global FCL Context based on the current global config.\n *\n * Some configuration values are still curried to the context as a backward compatibility measure.\n */\nexport function createPartialGlobalFCLContext(): Pick<\n  FCLContext,\n  \"config\" | \"sdk\"\n> {\n  return {\n    config: _config(),\n    sdk: {\n      send,\n      decode,\n      subscribe,\n      subscribeRaw,\n      account,\n      block,\n      resolve,\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/context/index.ts",
    "content": "import {createUser, type CurrentUserServiceApi} from \"../current-user\"\nimport {StorageProvider} from \"../fcl-core\"\nimport {createSdkClient, SdkClientOptions} from \"@onflow/sdk\"\nimport {getContracts} from \"@onflow/config\"\nimport {invariant} from \"@onflow/util-invariant\"\ninterface FCLConfig {\n  accessNodeUrl: string\n  transport: SdkClientOptions[\"transport\"]\n  customResolver?: SdkClientOptions[\"customResolver\"]\n  customDecoders?: SdkClientOptions[\"customDecoders\"]\n  flowJson?: any\n  computeLimit: number\n  platform: string\n  discoveryWallet?: string\n  discoveryWalletMethod?: string\n  discoveryAuthnEndpoint?: string\n  discoveryAuthnInclude?: string[]\n  discoveryAuthnExclude?: string[]\n  flowNetwork?: string\n  storage: StorageProvider\n  discovery?: {\n    execStrategy?: (...args: any[]) => any\n  }\n  // App detail properties\n  appDetailTitle?: string\n  appDetailIcon?: string\n  appDetailDescription?: string\n  appDetailUrl?: string\n  // Service configuration\n  serviceOpenIdScopes?: string[]\n}\n\n// Define a compatibility config interface for backward compatibility\nexport interface ConfigService {\n  get: (key: string, defaultValue?: any) => Promise<any>\n  put: (key: string, value: any) => Promise<ConfigService> | ConfigService\n  update: (\n    key: string,\n    updateFn: (oldValue: any) => any\n  ) => Promise<ConfigService> | ConfigService\n  delete: (key: string) => Promise<ConfigService> | ConfigService\n  where: (pattern: RegExp) => Promise<Record<string, any>>\n  first: (keys: string[], defaultValue?: any) => Promise<any> | any\n  subscribe: (\n    callback: (config: Record<string, any> | null) => void\n  ) => () => void\n  all: () => Promise<Record<string, any>>\n}\n\n/**\n * FCL Context contains the core infrastructure dependencies\n */\nexport interface FCLContext {\n  /** Configuration service for network settings, endpoints, etc. */\n  currentUser: CurrentUserServiceApi\n  sdk: ReturnType<typeof createSdkClient>\n  storage: StorageProvider\n  /** Legacy config compatibility layer */\n  config: ConfigService\n  platform: string\n}\n\n/**\n * Factory function to create an FCL context\n */\nexport function createFCLContext(config: FCLConfig): FCLContext {\n  let contracts: Record<string, string> | undefined\n\n  if (config.flowJson) {\n    invariant(\n      !!config.flowNetwork,\n      \"If flowJson is provided, flowNetwork must also be specified.\"\n    )\n\n    // Clean the network name (converts \"local\" to \"emulator\")\n    const cleanedNetwork = config.flowNetwork\n      .toLowerCase()\n      .replace(/^local$/, \"emulator\")\n\n    // getContracts now handles fork network resolution internally\n    // It will automatically inherit aliases from the parent network if this is a fork\n    contracts = getContracts(config.flowJson, cleanedNetwork)\n  }\n\n  const sdk = createSdkClient({\n    accessNodeUrl: config.accessNodeUrl,\n    transport: config.transport,\n    computeLimit: config.computeLimit,\n    customResolver: config.customResolver,\n    customDecoders: config.customDecoders,\n    contracts: contracts,\n  })\n\n  const configService = createConfigService(config)\n\n  const currentUser = createUser({\n    platform: config.platform,\n    storage: config.storage,\n    config: configService,\n    discovery: {\n      execStrategy: config.discovery?.execStrategy,\n    },\n    sdk,\n  })\n\n  return {\n    storage: config.storage,\n    currentUser: currentUser,\n    sdk: sdk,\n    config: configService,\n    platform: config.platform,\n  }\n}\n\nexport function createConfigService(config: FCLConfig): ConfigService {\n  // Create internal config store based on provided typed config\n  const configStore = new Map<string, any>([\n    [\"platform\", config.platform],\n    [\"discovery.wallet\", config.discoveryWallet],\n    [\"discovery.wallet.method\", config.discoveryWalletMethod],\n    [\"discovery.authn.endpoint\", config.discoveryAuthnEndpoint],\n    [\"discovery.authn.include\", config.discoveryAuthnInclude],\n    [\"discovery.authn.exclude\", config.discoveryAuthnExclude],\n    [\"flow.network\", config.flowNetwork],\n    [\"accessNode.api\", config.accessNodeUrl],\n    [\"fcl.limit\", config.computeLimit],\n    [\"app.detail.title\", config.appDetailTitle],\n    [\"app.detail.icon\", config.appDetailIcon],\n    [\"app.detail.description\", config.appDetailDescription],\n    [\"app.detail.url\", config.appDetailUrl],\n    [\"service.OpenID.scopes\", config.serviceOpenIdScopes],\n  ])\n\n  // Filter out undefined values\n  for (const [key, value] of configStore.entries()) {\n    if (value === undefined) {\n      configStore.delete(key)\n    }\n  }\n\n  // Create subscribers registry\n  const subscribers = new Set<(config: Record<string, any>) => void>()\n\n  // Create compatibility config layer\n  const configService: ConfigService = {\n    get: async (key: string, fallback?: any) => {\n      return configStore.has(key) ? configStore.get(key) : fallback\n    },\n    put: async (key: string, value: any) => {\n      configStore.set(key, value)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    update: async (key: string, updateFn: (oldValue: any) => any) => {\n      const oldValue = configStore.get(key)\n      const newValue = updateFn(oldValue)\n      configStore.set(key, newValue)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    delete: async (key: string) => {\n      configStore.delete(key)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    where: async (pattern: RegExp) => {\n      const result: Record<string, any> = {}\n      for (const [key, value] of configStore.entries()) {\n        if (pattern.test(key)) {\n          result[key] = value\n        }\n      }\n      return result\n    },\n    first: async (keys: string[], defaultValue?: any) => {\n      if (typeof keys === \"string\") keys = [keys]\n      for (const key of keys) {\n        if (configStore.has(key)) {\n          return configStore.get(key)\n        }\n      }\n      return defaultValue\n    },\n    subscribe: (callback: (config: Record<string, any>) => void) => {\n      subscribers.add(callback)\n      return () => {\n        subscribers.delete(callback)\n      }\n    },\n    all: async () => {\n      return Object.fromEntries(configStore.entries())\n    },\n  }\n\n  return configService\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/build-user.ts",
    "content": "import * as rlp from \"@onflow/rlp\"\nimport {CurrentUser, Service} from \"@onflow/typedefs\"\nimport {withPrefix} from \"@onflow/util-address\"\nimport {USER_PRAGMA} from \"../normalizers/service/__vsn\"\nimport {normalizeServices} from \"../normalizers/service/service\"\nimport {fetchServices} from \"./fetch-services\"\nimport {mergeServices} from \"./merge-services\"\nimport {serviceOfType} from \"./service-of-type\"\n\nexport interface UserData {\n  addr: string | null\n  paddr?: string | null\n  services?: Service[]\n  hks?: string\n  code?: string\n  expires?: number\n  [key: string]: any\n}\n\nfunction deriveCompositeId(authn: Service): string {\n  return rlp\n    .encode([\n      authn.provider?.address || authn.provider?.name || \"UNSPECIFIED\",\n      (authn as any).id,\n    ])\n    .toString(\"hex\")\n}\n\nfunction normalizeData(data: UserData): UserData {\n  data.addr = data.addr ? withPrefix(data.addr) : null\n  data.paddr = data.paddr ? withPrefix(data.paddr) : null\n  return data\n}\n\n/**\n * @description Builds a complete CurrentUser object from user data by normalizing addresses,\n * fetching additional services, and creating a composite ID. This function handles the\n * construction of the user object that represents the authenticated state in FCL.\n *\n * @param data The user data containing address, services, and authentication information\n * @returns Promise resolving to a CurrentUser object with normalized data and services\n *\n * @example\n * // Build a user object from authentication data\n * const userData = {\n *   addr: \"0x1234567890abcdef\",\n *   services: [...],\n *   hks: \"https://wallet.example.com/hooks\",\n *   code: \"auth_code_123\"\n * }\n * const user = await buildUser(userData)\n * console.log(user.addr) // \"0x1234567890abcdef\"\n */\nexport async function buildUser(data: UserData): Promise<CurrentUser> {\n  data = normalizeData(data)\n\n  var services = normalizeServices(\n    mergeServices(\n      data.services || [],\n      await fetchServices(data.hks!, data.code!)\n    )\n  )\n\n  const authn = serviceOfType(services, \"authn\") as Service\n\n  return {\n    ...USER_PRAGMA,\n    addr: withPrefix(data.addr!),\n    cid: deriveCompositeId(authn),\n    loggedIn: true,\n    services: services,\n    expiresAt: data.expires,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/index.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {log, LEVELS} from \"@onflow/util-logger\"\nimport {getServiceRegistry} from \"./plugins\"\nimport {createGetChainId} from \"../../utils\"\nimport {VERSION} from \"../../VERSION\"\nimport {configLens} from \"../../default-config\"\nimport {checkWalletConnectEnabled} from \"./wc-check\"\nimport {Service, CurrentUser} from \"@onflow/typedefs\"\nimport {FCLContext} from \"../../context\"\n\nconst AbortController =\n  globalThis.AbortController || require(\"abort-controller\")\n\nexport interface ExecStrategyParams {\n  service: Service\n  body: Record<string, any>\n  config: ExecConfig\n  abortSignal: AbortSignal\n  customRpc?: string\n  user?: CurrentUser\n  opts?: Record<string, any>\n}\n\nexport interface ExecServiceParams {\n  service: Service\n  msg?: Record<string, any>\n  config?: Record<string, any>\n  opts?: Record<string, any>\n  platform?: string\n  abortSignal?: AbortSignal\n  execStrategy?: (params: ExecStrategyParams) => Promise<StrategyResponse>\n  user?: CurrentUser\n}\n\nexport interface StrategyResponse {\n  status: string\n  data?: any\n  updates?: Record<string, any>\n  local?: boolean\n  authorizationUpdates?: Record<string, any>\n}\n\nexport interface ExecConfig {\n  services: Record<string, any>\n  app: Record<string, any>\n  client: {\n    platform?: string\n    fclVersion: string\n    fclLibrary: string\n    hostname: string | null\n    network: string\n    [key: string]: any\n  }\n}\n\nexport type StrategyFunction = (\n  params: ExecStrategyParams\n) => Promise<StrategyResponse>\n\n/**\n * @description Executes a service strategy based on the service method. This function looks up the\n * appropriate strategy from the service registry and executes it with the provided parameters.\n * It's used internally by FCL to handle different communication methods with wallet services.\n *\n * @param params The parameters object containing service details and execution context\n * @returns Promise resolving to the strategy response\n *\n * @example\n * // Execute a service strategy (internal usage)\n * const response = await execStrategy({\n *   service: { method: \"HTTP/POST\", endpoint: \"https://wallet.example.com/authz\" },\n *   body: { transaction: \"...\" },\n *   config: execConfig,\n *   abortSignal: controller.signal\n * })\n */\nexport const execStrategy = async ({\n  service,\n  body,\n  config,\n  abortSignal,\n  customRpc,\n  user,\n  opts,\n}: ExecStrategyParams): Promise<StrategyResponse> => {\n  const strategy = getServiceRegistry().getStrategy(\n    service.method\n  ) as StrategyFunction\n  return strategy({service, body, config, abortSignal, customRpc, opts, user})\n}\n\n/**\n * @description Executes a service with the provided parameters, handling configuration setup,\n * error handling, and recursive service redirects. This is the main entry point for executing\n * wallet service interactions in FCL.\n *\n * @param params The service execution parameters including service, message, and configuration\n * @returns Promise resolving to a StrategyResponse containing the execution result\n *\n * @example\n * // Execute a service (internal usage)\n * const response = await execService({\n *   service: { type: \"authz\", method: \"HTTP/POST\", endpoint: \"...\" },\n *   msg: { transaction: \"...\" },\n *   config: { client: { platform: \"web\" } }\n * })\n */\nexport async function execService(\n  context: Pick<FCLContext, \"config\" | \"sdk\">,\n  {\n    service,\n    msg = {},\n    config = {},\n    opts = {},\n    platform,\n    abortSignal = new AbortController().signal,\n    execStrategy: _execStrategy,\n    user,\n  }: ExecServiceParams\n): Promise<StrategyResponse> {\n  // Notify the developer if WalletConnect is not enabled\n  checkWalletConnectEnabled()\n\n  msg.data = service.data\n  const execConfig: ExecConfig = {\n    services: await configLens(context, /^service\\./),\n    app: await configLens(context, /^app\\.detail\\./),\n    client: {\n      ...config.client,\n      platform,\n      fclVersion: VERSION,\n      fclLibrary: \"https://github.com/onflow/fcl-js\",\n      hostname: window?.location?.hostname ?? null,\n      network: await createGetChainId(context)(opts),\n    },\n  }\n\n  try {\n    const res = await (_execStrategy || execStrategy)({\n      service,\n      body: msg,\n      config: execConfig,\n      opts,\n      user,\n      abortSignal,\n    })\n\n    if (res.status === \"REDIRECT\") {\n      invariant(\n        service.type === res.data.type,\n        \"Cannot shift recursive service type in execService\"\n      )\n      return await execService(context, {\n        service: res.data,\n        msg,\n        config: execConfig,\n        opts,\n        abortSignal,\n        platform,\n        user,\n      })\n    } else {\n      return res\n    }\n  } catch (error: any) {\n    log({\n      title: `Error on execService ${service?.type}`,\n      message: error,\n      level: LEVELS.error,\n    })\n    throw error\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/plugins.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {LEVELS, log} from \"@onflow/util-logger\"\nimport {isRequired, isString, isObject, isFunc} from \"../../utils/is\"\nimport {CORE_STRATEGIES} from \"../../utils/constants\"\n\nconst stub = () => {\n  throw new Error(`Platform specific Core Strategies are not initialized`)\n}\n\nconst stubCoreStrategies = {\n  [CORE_STRATEGIES[\"EXT/RPC\"]]: stub,\n  [CORE_STRATEGIES[\"HTTP/POST\"]]: stub,\n  [CORE_STRATEGIES[\"IFRAME/RPC\"]]: stub,\n  [CORE_STRATEGIES[\"POP/RPC\"]]: stub,\n  [CORE_STRATEGIES[\"TAB/RPC\"]]: stub,\n  [CORE_STRATEGIES[\"EXT/RPC\"]]: stub,\n}\n\nconst supportedPlugins = [\"ServicePlugin\"]\nconst supportedServicePlugins = [\"discovery-service\"]\n\nconst validateDiscoveryPlugin = (servicePlugin: any) => {\n  const {services = [], serviceStrategy} = servicePlugin\n  invariant(Array.isArray(services), \"Services must be an array\")\n\n  for (const ds of services) {\n    invariant(\n      isRequired(ds.f_type) && ds.f_type === \"Service\",\n      \"Service is required\"\n    )\n    invariant(\n      isRequired(ds.type) && ds.type === \"authn\",\n      `Service must be type authn. Received ${ds.type}`\n    )\n    invariant(\n      ds.method in CORE_STRATEGIES || serviceStrategy.method === ds.method,\n      `Service method ${ds.method} is not supported`\n    )\n  }\n\n  invariant(isRequired(serviceStrategy), \"Service strategy is required\")\n  invariant(\n    isRequired(serviceStrategy.method) && isString(serviceStrategy.method),\n    \"Service strategy method is required\"\n  )\n  invariant(\n    isRequired(serviceStrategy.exec) && isFunc(serviceStrategy.exec),\n    \"Service strategy exec function is required\"\n  )\n\n  return {discoveryServices: services, serviceStrategy}\n}\n\nconst ServiceRegistry = ({coreStrategies}: {coreStrategies: any}) => {\n  let services = new Set()\n  let strategies = new Map(Object.entries(coreStrategies))\n\n  const add = (servicePlugin: any) => {\n    invariant(\n      supportedServicePlugins.includes(servicePlugin.type),\n      `Service Plugin type ${servicePlugin.type} is not supported`\n    )\n    if (servicePlugin.type === \"discovery-service\") {\n      const {discoveryServices, serviceStrategy} =\n        validateDiscoveryPlugin(servicePlugin)\n      setServices(discoveryServices)\n      if (!strategies.has(serviceStrategy.method)) {\n        strategies.set(serviceStrategy.method, serviceStrategy.exec)\n      } else {\n        log({\n          title: `Add Service Plugin`,\n          message: `Service strategy for ${serviceStrategy.method} already exists`,\n          level: LEVELS.warn,\n        })\n      }\n    }\n  }\n\n  const setServices = (discoveryServices: any) =>\n    (services = new Set([...discoveryServices]))\n\n  const getServices = () => [...services]\n\n  const getStrategy = (method: any) => strategies.get(method)\n\n  const getStrategies = () => [...strategies.keys()]\n\n  return Object.freeze({\n    add,\n    getServices,\n    getStrategy,\n    getStrategies,\n  })\n}\n\nconst validatePlugins = (plugins: any[]) => {\n  let pluginsArray\n  invariant(!!plugins, \"No plugins supplied\")\n\n  if (!Array.isArray(plugins)) {\n    pluginsArray = [plugins]\n  } else {\n    pluginsArray = [...plugins]\n  }\n  for (const p of pluginsArray) {\n    invariant(isRequired(p.name), \"Plugin name is required\")\n    invariant(isRequired(p.f_type), \"Plugin f_type is required\")\n    invariant(\n      supportedPlugins.includes(p.f_type),\n      `Plugin type ${p.f_type} is not supported`\n    )\n  }\n\n  return pluginsArray\n}\n\nconst PluginRegistry = () => {\n  const pluginsMap = new Map()\n\n  const getPlugins = () => pluginsMap\n\n  const add = (plugins: any) => {\n    const pluginsArray = validatePlugins(plugins)\n    for (const p of pluginsArray) {\n      pluginsMap.set(p.name, p)\n      if (p.f_type === \"ServicePlugin\") {\n        serviceRegistry.add(p)\n      }\n    }\n  }\n\n  return Object.freeze({\n    add,\n    getPlugins,\n  })\n}\n\nlet serviceRegistry: ReturnType<typeof ServiceRegistry>\nconst getIsServiceRegistryInitialized = () =>\n  typeof serviceRegistry !== \"undefined\"\n\n/**\n * @description Initializes the service registry with core strategies for different communication methods.\n * This function sets up the registry that manages wallet service strategies and should be called once\n * during FCL initialization with platform-specific core strategies.\n *\n * @param params Configuration object containing core strategies\n * @param params.coreStrategies Object mapping strategy names to their implementation functions\n * @returns The initialized service registry instance\n *\n * @example\n * // Initialize service registry with core strategies\n * const registry = initServiceRegistry({\n *   coreStrategies: {\n *     \"HTTP/POST\": httpPostStrategy,\n *     \"IFRAME/RPC\": iframeRpcStrategy,\n *     \"POP/RPC\": popupRpcStrategy\n *   }\n * })\n */\nexport const initServiceRegistry = ({\n  coreStrategies,\n}: {\n  coreStrategies: any\n}) => {\n  if (getIsServiceRegistryInitialized()) {\n    return serviceRegistry\n  }\n  const _serviceRegistry = ServiceRegistry({coreStrategies})\n  serviceRegistry = _serviceRegistry\n\n  return _serviceRegistry\n}\n\n/**\n * @description Gets the singleton service registry instance. If the registry hasn't been initialized,\n * it will be initialized with stub core strategies and a warning will be logged. This function\n * provides access to the registry for service and strategy management.\n *\n * @returns The service registry instance\n *\n * @example\n * // Get the service registry\n * const registry = getServiceRegistry()\n * const services = registry.getServices()\n * const strategy = registry.getStrategy(\"HTTP/POST\")\n */\nexport const getServiceRegistry = () => {\n  if (!getIsServiceRegistryInitialized()) {\n    console.warn(\n      \"Registry is not initialized, it will be initialized with stub core strategies\"\n    )\n\n    return initServiceRegistry({coreStrategies: stubCoreStrategies})\n  }\n\n  return serviceRegistry\n}\n\n/**\n * @description Global plugin registry instance for managing FCL plugins. This registry handles\n * the registration and management of various FCL plugins including service plugins that add\n * new wallet services and strategies.\n *\n * @example\n * // Add a plugin to the registry\n * pluginRegistry.add({\n *   name: \"MyWalletPlugin\",\n *   f_type: \"ServicePlugin\",\n *   type: \"discovery-service\",\n *   services: [...],\n *   serviceStrategy: { method: \"CUSTOM/RPC\", exec: customExecFunction }\n * })\n */\nexport const pluginRegistry = PluginRegistry()\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/strategies/http-post.ts",
    "content": "import {fetchService} from \"./utils/fetch-service\"\nimport {normalizePollingResponse} from \"../../../normalizers/service/polling-response\"\nimport {normalizeLocalView} from \"../../../normalizers/service/local-view\"\nimport {poll} from \"./utils/poll\"\nimport {VERSION} from \"../../../VERSION\"\nimport {serviceEndpoint} from \"../strategies/utils/service-endpoint\"\nimport {Service} from \"@onflow/typedefs\"\n\nexport interface ExecHttpPostParams {\n  service: Service & {\n    data?: Record<string, any>\n    type: string\n  }\n  body: Record<string, any>\n  config: Record<string, any>\n  opts: Record<string, any>\n}\n\nexport type ExecLocalFunction = (\n  view: any,\n  options: {\n    serviceEndpoint: typeof serviceEndpoint\n    onClose: () => void\n  }\n) => Promise<[any, () => void]>\n\n/**\n * @description Creates an HTTP POST strategy executor that handles wallet service communication\n * via HTTP POST requests. This function manages the full lifecycle including polling for\n * responses, handling local views, and managing user interactions.\n *\n * @param execLocal Function to execute local view rendering and user interaction\n * @returns HTTP POST strategy function that can be used to execute services\n *\n * @example\n * // Create an HTTP POST executor\n * const httpPostExec = getExecHttpPost(async (view, { serviceEndpoint, onClose }) => {\n *   // Render local view and return cleanup function\n *   return [viewData, () => cleanup()]\n * })\n */\nexport const getExecHttpPost =\n  (execLocal: ExecLocalFunction) =>\n  async ({service, body, config, opts}: ExecHttpPostParams): Promise<any> => {\n    const resp = await fetchService(service, {\n      data: {\n        fclVersion: VERSION,\n        service: {\n          params: service.params,\n          data: service.data,\n          type: service.type,\n        },\n        config,\n        ...body,\n      },\n    }).then(normalizePollingResponse)\n\n    if (resp?.status === \"APPROVED\") {\n      return resp.data\n    } else if (resp?.status === \"DECLINED\") {\n      throw new Error(`Declined: ${resp.reason || \"No reason supplied.\"}`)\n    } else if (resp?.status === \"REDIRECT\") {\n      return resp\n    } else if (resp?.status === \"PENDING\") {\n      // these two flags are required to run polling one more time before it stops\n      let canContinue = true\n      let shouldContinue = true\n\n      const [_, unmount] = await execLocal(normalizeLocalView(resp.local), {\n        serviceEndpoint,\n        onClose: () => (shouldContinue = false),\n      })\n\n      const close = () => {\n        try {\n          unmount()\n          shouldContinue = false\n        } catch (error) {\n          console.error(\"Frame Close Error\", error)\n        }\n      }\n\n      /**\n       * this function is run once per poll call.\n       * Offsetting canContinue flag to make sure that\n       * the polling is performed one extra time after canContinue flag is set to false\n       * to prevent halting on Android when a browser calls window.close\n       * before FCL receives a successful result from polling\n       *\n       * @returns {boolean}\n       */\n      const checkCanContinue = () => {\n        const offsetCanContinue = canContinue\n        canContinue = shouldContinue\n        return offsetCanContinue\n      }\n\n      return poll(resp.updates, checkCanContinue)\n        .then(serviceResponse => {\n          close()\n          return serviceResponse\n        })\n        .catch(error => {\n          console.error(error)\n          close()\n          throw error\n        })\n    } else {\n      console.error(`Auto Decline: Invalid Response`, {service, resp})\n      throw new Error(`Auto Decline: Invalid Response`)\n    }\n  }\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/strategies/utils/buildMessageHandler.ts",
    "content": "export interface BuildMessageHandlerParams {\n  close: () => void\n  send: (msg: any) => void\n  onReady: (\n    e: MessageEvent,\n    utils: {send: (msg: any) => void; close: () => void}\n  ) => void\n  onResponse: (\n    e: MessageEvent,\n    utils: {send: (msg: any) => void; close: () => void}\n  ) => void\n  onMessage: (\n    e: MessageEvent,\n    utils: {send: (msg: any) => void; close: () => void}\n  ) => void\n  onCustomRpc: (\n    payload: any,\n    utils: {send: (msg: any) => void; close: () => void}\n  ) => void\n  getSource?: () => Window | null\n}\n\nconst CLOSE_EVENT = \"FCL:VIEW:CLOSE\"\nconst READY_EVENT = \"FCL:VIEW:READY\"\nconst RESPONSE_EVENT = \"FCL:VIEW:RESPONSE\"\nconst CUSTOM_RPC = \"FCL:VIEW:CUSTOM_RPC\"\n\nconst _ = (e: any) => typeof e === \"string\" && e.toLowerCase()\n\nconst IGNORE = new Set([\n  \"monetizationstart\",\n  \"monetizationpending\",\n  \"monetizationprogress\",\n  \"monetizationstop\",\n])\n\nconst deprecate = (was: string, want: string): void =>\n  console.warn(\n    \"DEPRECATION NOTICE\",\n    `Received ${was}, please use ${want} for this and future versions of FCL`\n  )\n\n/**\n * @description Creates a message handler for processing window messages from wallet service\n * frames or popups. This handler manages the communication protocol between FCL and wallet\n * services, including ready states, responses, and cleanup operations.\n *\n * @param params Configuration object containing callback functions and utilities\n * @returns Message event handler function that can be attached to window message listeners\n *\n * @example\n * // Create a message handler for wallet communication\n * const handler = buildMessageHandler({\n *   close: () => cleanup(),\n *   send: (msg) => postMessage(msg),\n *   onReady: (e, utils) => initializeWallet(utils),\n *   onResponse: (e, utils) => handleResponse(e.data),\n *   onMessage: (e, utils) => processMessage(e),\n *   onCustomRpc: (payload, utils) => handleRpc(payload)\n * })\n * window.addEventListener(\"message\", handler)\n */\nexport const buildMessageHandler = ({\n  close,\n  send,\n  onReady,\n  onResponse,\n  onMessage,\n  onCustomRpc,\n  getSource,\n}: BuildMessageHandlerParams): ((e: MessageEvent) => void) => {\n  let source: any\n  return (e: MessageEvent): void => {\n    try {\n      source = getSource?.() || source\n    } catch (_) {\n      // If getSource isn't working correctly, we should reset source\n      // to prevent desync between the source and the actual source\n      source = null\n    }\n\n    try {\n      if (typeof e.data !== \"object\") return\n      if (IGNORE.has(e.data.type)) return\n      if (source != null && e.source !== source) return\n      if (_(e.data.type) === _(CLOSE_EVENT)) close()\n      if (_(e.data.type) === _(READY_EVENT)) {\n        onReady(e, {send, close})\n        source ||= e.source as Window\n      }\n      if (_(e.data.type) === _(RESPONSE_EVENT)) onResponse(e, {send, close})\n      if (_(e.data.type) === _(CUSTOM_RPC))\n        onCustomRpc(e.data.payload, {send, close})\n      onMessage(e, {send, close})\n\n      // Backwards Compatible\n      if (_(e.data.type) === _(\"FCL:FRAME:READY\")) {\n        deprecate(e.data.type, READY_EVENT)\n        onReady(e, {send, close})\n        source ||= e.source as Window\n      }\n      if (_(e.data.type) === _(\"FCL:FRAME:RESPONSE\")) {\n        deprecate(e.data.type, RESPONSE_EVENT)\n        onResponse(e, {send, close})\n      }\n      if (_(e.data.type) === _(\"FCL:FRAME:CLOSE\")) {\n        deprecate(e.data.type, CLOSE_EVENT)\n        close()\n      }\n      //\n      if (_(e.data.type) === _(\"FCL::CHALLENGE::RESPONSE\")) {\n        deprecate(e.data.type, RESPONSE_EVENT)\n        onResponse(e, {send, close})\n      }\n      if (_(e.data.type) === _(\"FCL::AUTHZ_READY\")) {\n        deprecate(e.data.type, READY_EVENT)\n        onReady(e, {send, close})\n        source ||= e.source as Window\n      }\n      if (_(e.data.type) === _(\"FCL::CHALLENGE::CANCEL\")) {\n        deprecate(e.data.type, CLOSE_EVENT)\n        close()\n      }\n      if (_(e.data.type) === _(\"FCL::CANCEL\")) {\n        deprecate(e.data.type, CLOSE_EVENT)\n        close()\n      }\n    } catch (error) {\n      console.error(\"Frame Callback Error\", error)\n      close()\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/strategies/utils/fetch-service.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\nimport {serviceEndpoint} from \"./service-endpoint\"\n\nexport interface FetchServiceOptions {\n  method?: \"GET\" | \"POST\"\n  data?: Record<string, any>\n  headers?: Record<string, string>\n}\n\n/**\n * @description Makes an HTTP request to a service endpoint with the specified options.\n * This utility function handles the common patterns for communicating with wallet services\n * including proper headers, body serialization, and JSON response parsing.\n *\n * @param service The service configuration containing endpoint and headers\n * @param opts Optional request configuration including method, data, and headers\n * @returns Promise resolving to the parsed JSON response\n *\n * @example\n * // Fetch from a service endpoint\n * const response = await fetchService(service, {\n *   method: \"POST\",\n *   data: { transaction: \"...\" },\n *   headers: { \"Authorization\": \"Bearer token\" }\n * })\n */\nexport function fetchService(\n  service: Service,\n  opts: FetchServiceOptions = {}\n): Promise<any> {\n  const method = opts.method || \"POST\"\n  const body =\n    method === \"GET\"\n      ? undefined\n      : JSON.stringify(opts.data || service.data || {})\n\n  return fetch(serviceEndpoint(service), {\n    method: method,\n    headers: {\n      ...(service.headers || {}),\n      ...(opts.headers || {}),\n      \"Content-Type\": \"application/json\",\n    },\n    body: body,\n  }).then(d => d.json())\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/strategies/utils/poll.ts",
    "content": "import {normalizePollingResponse} from \"../../../../normalizers/service/polling-response\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {fetchService} from \"./fetch-service\"\nimport {Service} from \"@onflow/typedefs\"\n\nexport interface ServiceMethodOptions {\n  \"HTTP/GET\": \"GET\"\n  \"HTTP/POST\": \"POST\"\n}\n\nconst OPTIONS: ServiceMethodOptions = {\n  \"HTTP/GET\": \"GET\",\n  \"HTTP/POST\": \"POST\",\n}\n\nconst serviceMethod = (service: Service): \"GET\" | \"POST\" => {\n  invariant(\n    OPTIONS[service.method as keyof ServiceMethodOptions] as any,\n    \"Invalid Service Method for type back-channel-rpc\",\n    {service}\n  )\n  return OPTIONS[service.method as keyof ServiceMethodOptions]\n}\n\nconst serviceBody = (service: Service): string | undefined => {\n  if (service.method === \"HTTP/GET\") return undefined\n  if (service.method === \"HTTP/POST\" && (service as any).data != null)\n    return JSON.stringify((service as any).data)\n  return undefined\n}\n\n/**\n * @description Continuously polls a service endpoint until it receives an APPROVED or DECLINED\n * response. This function handles the asynchronous nature of wallet interactions by repeatedly\n * checking for status updates with appropriate delays.\n *\n * @param service The service configuration containing the polling endpoint\n * @param checkCanContinue Optional function to control whether polling should continue\n * @returns Promise resolving to the final response data when approved or rejected\n *\n * @example\n * // Poll a service for completion\n * const result = await poll(pollingService, () => !userCancelled)\n * console.log(result) // Final response data\n */\nexport async function poll(\n  service: Service,\n  checkCanContinue: () => boolean = () => true\n): Promise<any> {\n  invariant(service as any, \"Missing Polling Service\", {service})\n  const canContinue = checkCanContinue()\n  if (!canContinue) throw new Error(\"Externally Halted\")\n\n  let resp\n  try {\n    if (\n      typeof document !== \"undefined\" &&\n      document.visibilityState === \"hidden\"\n    ) {\n      await new Promise(r => setTimeout(r, 500))\n      return poll(service, checkCanContinue)\n    }\n\n    resp = await fetchService(service, {\n      method: serviceMethod(service),\n    }).then(normalizePollingResponse)\n  } catch (error) {\n    throw error\n  }\n\n  switch (resp?.status) {\n    case \"APPROVED\":\n      return resp.data\n    case \"DECLINED\":\n      throw new Error(`Declined: ${resp.reason || \"No reason supplied.\"}`)\n    default:\n      await new Promise(r => setTimeout(r, 500))\n      return poll(resp?.updates, checkCanContinue)\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/strategies/utils/service-endpoint.ts",
    "content": "import {URL} from \"../../../../utils/url\"\nimport {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Creates a URL object from a service endpoint with additional parameters including\n * the application origin and service-specific parameters. This function is used internally by\n * FCL strategies to construct the complete URL for service communication.\n *\n * @param service The service object containing endpoint and optional parameters\n * @returns URL object with all parameters appended as query string parameters\n *\n * @example\n * // Create URL from service\n * const service = {\n *   endpoint: \"https://wallet.example.com/authn\",\n *   params: {\n *     appName: \"MyApp\",\n *     nonce: \"abc123\"\n *   }\n * }\n * const url = serviceEndpoint(service)\n * console.log(url.toString())\n * // https://wallet.example.com/authn?l6n=https://myapp.com&appName=MyApp&nonce=abc123\n */\nexport function serviceEndpoint(service: Service): URL {\n  const url = new URL(service.endpoint)\n  if (window?.location?.origin) {\n    url.searchParams.append(\"l6n\", window.location.origin)\n  }\n  if (service.params != null) {\n    for (let [key, value] of Object.entries(service.params || {})) {\n      url.searchParams.append(key, value)\n    }\n  }\n  return url\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/exec-service/wc-check.ts",
    "content": "import * as logger from \"@onflow/util-logger\"\nimport {getServiceRegistry} from \"./plugins\"\n\nconst FCL_WC_SERVICE_METHOD = \"WC/RPC\"\n\nconst isServerSide = typeof window === \"undefined\"\n\n/**\n * @description Checks if WalletConnect service plugin is enabled and logs a warning if it's not.\n * This function verifies that the WalletConnect strategy is registered in the service registry.\n * It's called internally by FCL to notify developers about missing WalletConnect configuration,\n * which is required for users to connect with certain wallets.\n *\n * @example\n * // This function is called automatically by FCL, but can be used manually:\n * checkWalletConnectEnabled()\n * // If WalletConnect is not configured, an error will be logged to the console\n *\n * // To properly configure WalletConnect to avoid the warning:\n * import * as fcl from \"@onflow/fcl\"\n *\n * fcl.config({\n *   \"app.detail.title\": \"My App\",\n *   \"walletconnect.projectId\": \"your-walletconnect-project-id\"\n * })\n */\n// Utility to notify the user if the Walletconnect service plugin has not been loaded\nexport function checkWalletConnectEnabled() {\n  if (isServerSide) return\n\n  const serviceRegistry = getServiceRegistry()\n  const strategies = serviceRegistry.getStrategies()\n\n  if (!strategies.includes(FCL_WC_SERVICE_METHOD)) {\n    logger.log({\n      title: \"FCL WalletConnect Service Plugin\",\n      level: logger.LEVELS.error,\n      message:\n        \"All dApps are expected to register for a WalletConnect projectId & add this to their FCL configuration.  If you do not do so, users will be unable to use certain wallets to interact with your dApp.  See https://developers.flow.com/tools/clients/fcl-js/configure-fcl for more information.\",\n    })\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/fetch-services.ts",
    "content": "import {URL} from \"../utils/url\"\nimport {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Fetches additional services from a remote endpoint using an authorization code.\n * This function handles both modern service arrays and legacy wallet provider formats for\n * backward compatibility.\n *\n * @param servicesURL The URL endpoint to fetch services from\n * @param code The authorization code to include in the request\n * @returns Promise resolving to an array of Service objects\n *\n * @example\n * // Fetch services from a wallet provider\n * const services = await fetchServices(\n *   \"https://wallet.example.com/services\",\n *   \"auth_code_123\"\n * )\n */\nexport async function fetchServices(\n  servicesURL: string | null,\n  code: string | null\n): Promise<Service[]> {\n  if (servicesURL == null || code == null) return []\n\n  const url = new URL(servicesURL)\n  url.searchParams.append(\"code\", code)\n\n  const resp: any = await fetch(url, {\n    method: \"GET\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n  }).then(d => d.json())\n\n  if (Array.isArray(resp)) return resp\n\n  // Backwards compatibility for First-Gen Wallet Providers\n  const services: Service[] = []\n\n  // Convert authorizations into authz services\n  if (Array.isArray(resp.authorizations)) {\n    for (let service of resp.authorizations) {\n      services.push({\n        type: \"authz\",\n        keyId: resp.keyId,\n        ...service,\n      })\n    }\n  }\n\n  // Convert Provider info into an authn service\n  if (resp.provider != null) {\n    services.push({\n      type: \"authn\",\n      id: \"wallet-provider#authn\",\n      ...resp.provider,\n    })\n  }\n\n  return services\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/index.ts",
    "content": "import {config} from \"@onflow/config\"\nimport {arg, Signable, t} from \"@onflow/sdk\"\nimport {\n  Account,\n  CompositeSignature,\n  CurrentUser,\n  Service,\n} from \"@onflow/typedefs\"\nimport {\n  ActorContext,\n  INIT,\n  Letter,\n  send,\n  spawn,\n  SUBSCRIBE,\n  UNSUBSCRIBE,\n} from \"@onflow/util-actor\"\nimport {sansPrefix, withPrefix} from \"@onflow/util-address\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {LEVELS, log} from \"@onflow/util-logger\"\nimport \"../default-config\"\nimport {getDiscoveryService, makeDiscoveryServices} from \"../discovery\"\nimport {normalizeCompositeSignature} from \"../normalizers/service/composite-signature\"\nimport {StorageProvider} from \"../utils/storage\"\nimport {buildUser} from \"./build-user\"\nimport {execService} from \"./exec-service\"\nimport {getServiceRegistry} from \"./exec-service/plugins\"\nimport {serviceOfType} from \"./service-of-type\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\nimport {FCLContext} from \"../context\"\nimport {v4 as uuidv4} from \"uuid\"\n\nexport interface CurrentUserConfig {\n  platform: string\n  discovery?: {\n    execStrategy?: (...args: any[]) => any\n  }\n  getStorageProvider: () => Promise<StorageProvider>\n}\n\nexport interface CurrentUserContext extends Pick<FCLContext, \"config\" | \"sdk\"> {\n  platform: string\n  getStorageProvider: () => Promise<StorageProvider>\n  discovery?: {\n    execStrategy?: (...args: any[]) => any\n  }\n  actorName: string\n}\n\nexport interface CurrentUserServiceApi {\n  authenticate: (opts?: AuthenticationOptions) => Promise<CurrentUser>\n  unauthenticate: () => void\n  authorization: (account: Account) => Promise<Account>\n  signUserMessage: (msg: string) => Promise<CompositeSignature[]>\n  subscribe: (callback: (user: CurrentUser) => void) => () => void\n  snapshot: () => Promise<CurrentUser>\n  resolveArgument: () => Promise<string>\n}\n\nexport interface CurrentUserService extends CurrentUserServiceApi {\n  (): CurrentUserServiceApi\n}\n\nexport interface AccountProofData {\n  appIdentifier: string\n  nonce: string\n  [key: string]: any\n}\n\nexport interface AuthenticationOptions {\n  service?: Service\n  redir?: boolean\n  forceReauth?: boolean\n}\n\nexport interface MakeConfigOptions {\n  discoveryAuthnInclude?: string[]\n  discoveryAuthnExclude?: string[]\n  discoveryFeaturesSuggested?: string[]\n}\n\n/**\n * @description Type guard function that checks if a value is a function. This is a simple utility\n * used internally by FCL for type checking and validation.\n *\n * @param d The value to check\n * @returns True if the value is a function, false otherwise\n *\n * @example\n * // Check if a value is a function\n * const callback = () => console.log(\"Hello\")\n * const notCallback = \"string\"\n *\n * console.log(isFn(callback)) // true\n * console.log(isFn(notCallback)) // false\n */\nexport const isFn = (d: any): boolean => typeof d === \"function\"\n\nconst NAME = \"CURRENT_USER\"\nconst UPDATED = \"CURRENT_USER/UPDATED\"\nconst SNAPSHOT = \"SNAPSHOT\"\nconst SET_CURRENT_USER = \"SET_CURRENT_USER\"\nconst DEL_CURRENT_USER = \"DEL_CURRENT_USER\"\n\nconst DATA = `{\n  \"f_type\": \"User\",\n  \"f_vsn\": \"1.0.0\",\n  \"addr\":null,\n  \"cid\":null,\n  \"loggedIn\":null,\n  \"expiresAt\":null,\n  \"services\":[]\n}`\n\nconst getStoredUser = async (storage: StorageProvider): Promise<any> => {\n  const fallback = JSON.parse(DATA)\n  const stored = await storage.get(NAME)\n  if (stored != null && fallback[\"f_vsn\"] !== stored[\"f_vsn\"]) {\n    storage.removeItem(NAME)\n    return fallback\n  }\n  return stored || fallback\n}\n\nconst makeHandlers = (context: CurrentUserContext) => {\n  // Wrapper for backwards compatibility\n  const getStorageProvider = async (): Promise<StorageProvider> => {\n    if (context.getStorageProvider) return await context.getStorageProvider()\n    return (await context.config.first(\n      [\"fcl.storage\", \"fcl.storage.default\"],\n      undefined\n    )) as any\n  }\n\n  return {\n    [INIT]: async (ctx: ActorContext) => {\n      if (typeof window === \"undefined\") {\n        console.warn(\n          `\n        %cFCL Warning\n        ============================\n        \"currentUser\" is only available in the browser.\n        For more info, please see the docs: https://docs.onflow.org/fcl/\n        ============================\n        `,\n          \"font-weight:bold;font-family:monospace;\"\n        )\n      }\n\n      ctx.merge(JSON.parse(DATA))\n      const storage = await getStorageProvider()\n      if (storage.can) {\n        const user = await getStoredUser(storage)\n        if (notExpired(user)) ctx.merge(user)\n      }\n    },\n    [SUBSCRIBE]: (ctx: ActorContext, letter: Letter) => {\n      ctx.subscribe(letter.from)\n      ctx.send(letter.from, UPDATED, {...ctx.all()})\n    },\n    [UNSUBSCRIBE]: (ctx: ActorContext, letter: Letter) => {\n      ctx.unsubscribe(letter.from)\n    },\n    [SNAPSHOT]: async (ctx: ActorContext, letter: Letter) => {\n      letter.reply({...ctx.all()})\n    },\n    [SET_CURRENT_USER]: async (\n      ctx: ActorContext,\n      letter: Letter,\n      data: any\n    ) => {\n      ctx.merge(data)\n      const storage = await getStorageProvider()\n      if (storage.can) storage.put(NAME, ctx.all())\n      ctx.broadcast(UPDATED, {...ctx.all()})\n    },\n    [DEL_CURRENT_USER]: async (ctx: ActorContext, letter: Letter) => {\n      ctx.merge(JSON.parse(DATA))\n      const storage = await getStorageProvider()\n      if (storage.can) storage.put(NAME, ctx.all())\n      ctx.broadcast(UPDATED, {...ctx.all()})\n    },\n  }\n}\n\nconst spawnCurrentUser = (context: CurrentUserContext) => {\n  spawn(makeHandlers(context), context.actorName)\n}\n\nfunction notExpired(user: any): boolean {\n  return (\n    user.expiresAt == null ||\n    user.expiresAt === 0 ||\n    user.expiresAt > Date.now()\n  )\n}\n\nasync function getAccountProofData(\n  context: Pick<FCLContext, \"config\">\n): Promise<AccountProofData | undefined> {\n  let accountProofDataResolver: any = await context.config.get(\n    \"fcl.accountProof.resolver\"\n  )\n  if (accountProofDataResolver == null) return\n  if (!isFn(accountProofDataResolver)) {\n    log({\n      title: \"Account Proof Data Resolver must be a function\",\n      message: `Check fcl.accountProof.resolver configuration.\n                Expected: fcl.accountProof.resolver: async () => { ... }\n                Received: fcl.accountProof.resolver: ${typeof accountProofDataResolver}\n                `,\n      level: LEVELS.warn,\n    })\n    return\n  }\n\n  const accountProofData = {...(await accountProofDataResolver())}\n\n  const origin: any = window?.location?.origin\n\n  if (accountProofData.appIdentifier) {\n    if (origin) {\n      log.deprecate({\n        pkg: \"FCL\",\n        subject: \"appIdentifier in fcl.accountProof.resolver\",\n        message:\n          \"Manually set app identifiers in the account proof resolver function are now deprecated.  These are now automatically set to the application origin URL by FCL\",\n        transition:\n          \"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0002-deprecate-appIdentifier-field-in-account-proof-resolver\",\n      })\n\n      invariant(\n        typeof accountProofData.appIdentifier === \"string\",\n        \"appIdentifier must be a string\"\n      )\n    }\n  } else {\n    invariant(\n      origin,\n      \"The appIdentifier (origin) could not be inferred from the window.location.origin.  Please set the appIdentifier manually in the fcl.accountProof.resolver function.\"\n    )\n\n    accountProofData.appIdentifier = origin\n  }\n\n  invariant(\n    /^[0-9a-f]+$/i.test(accountProofData.nonce),\n    \"Nonce must be a hex string\"\n  )\n\n  return accountProofData\n}\n\nconst makeConfig = async ({\n  discoveryAuthnInclude,\n  discoveryAuthnExclude,\n  discoveryFeaturesSuggested,\n}: MakeConfigOptions): Promise<Record<string, any>> => {\n  return {\n    client: {\n      discoveryAuthnInclude,\n      discoveryAuthnExclude,\n      discoveryFeaturesSuggested,\n      clientServices: await makeDiscoveryServices(),\n      supportedStrategies: getServiceRegistry().getStrategies(),\n    },\n  }\n}\n\n/**\n * @description Factory function to create the authenticate method\n * @param config Current User Configuration\n */\nconst createAuthenticate =\n  (context: CurrentUserContext) =>\n  /**\n   * @description Calling this method will authenticate the current user via any wallet that supports FCL. Once called, FCL will initiate communication with the configured `discovery.wallet` endpoint which lets the user select a wallet to authenticate with. Once the wallet provider has authenticated the user, FCL will set the values on the current user object for future use and authorization.\n   *\n   * This method can only be used in web browsers.\n   *\n   * `discovery.wallet` value must be set in the configuration before calling this method. See FCL Configuration.\n   *\n   * The default discovery endpoint will open an iframe overlay to let the user choose a supported wallet.\n   *\n   * `authenticate` can also take a service returned from discovery with `fcl.authenticate(\\{ service \\})`.\n   *\n   * @param opts Authentication options\n   * @param opts.service Optional service to use for authentication. A service returned from discovery can be passed here.\n   * @param opts.redir Optional redirect flag. Defaults to false.\n   * @param opts.forceReauth Optional force re-authentication flag. Defaults to false.\n   * @returns Promise that resolves to the authenticated CurrentUser object or undefined\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   * fcl\n   *   .config()\n   *   .put('accessNode.api', 'https://rest-testnet.onflow.org')\n   *   .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn');\n   * // anywhere on the page\n   * fcl.authenticate();\n   */\n  async ({\n    service,\n    redir = false,\n    forceReauth = false,\n  }: AuthenticationOptions = {}): Promise<CurrentUser | undefined> => {\n    if (\n      service &&\n      !service?.provider?.is_installed &&\n      service?.provider?.requires_install\n    ) {\n      window.location.href = service?.provider?.install_link!\n      return\n    }\n\n    return new Promise(async (resolve, reject) => {\n      spawnCurrentUser(context)\n      const opts = {redir}\n      const user = await createSnapshot(context)()\n      const refreshService = serviceOfType(user.services, \"authn-refresh\")\n      let accountProofData\n\n      if (user.loggedIn && !forceReauth) {\n        if (refreshService) {\n          try {\n            const response: any = await execService(context, {\n              service: refreshService,\n              msg: accountProofData,\n              opts,\n              platform: context.platform,\n              user,\n            })\n            send(context.actorName, SET_CURRENT_USER, await buildUser(response))\n          } catch (error: any) {\n            log({\n              title: `${error.name} Could not refresh wallet authentication.`,\n              message: error.message,\n              level: LEVELS.error,\n            })\n          } finally {\n            return resolve(await createSnapshot(context)())\n          }\n        } else {\n          return resolve(user)\n        }\n      }\n\n      try {\n        accountProofData = await getAccountProofData(context)\n      } catch (error: any) {\n        log({\n          title: `${error.name} On Authentication: Could not resolve account proof data.`,\n          message: error.message,\n          level: LEVELS.error,\n        })\n        return reject(error)\n      }\n\n      try {\n        const discoveryService = await getDiscoveryService(context, service)\n        const response: any = await execService(context, {\n          service: discoveryService,\n          msg: accountProofData,\n          config: await makeConfig(discoveryService),\n          opts,\n          platform: context.platform,\n          execStrategy: context.discovery?.execStrategy,\n          user,\n        })\n\n        send(context.actorName, SET_CURRENT_USER, await buildUser(response))\n      } catch (error: any) {\n        log({\n          title: `${error} On Authentication`,\n          message: error,\n          level: LEVELS.error,\n        })\n      } finally {\n        resolve(await createSnapshot(context)())\n      }\n    })\n  }\n\n/**\n * @description Factory function to create the unauthenticate method\n * @param config Current User Configuration\n */\nfunction createUnauthenticate(context: CurrentUserContext) {\n  /**\n   * @description Logs out the current user and sets the values on the current user object to null.\n   *\n   * This method can only be used in web browsers.\n   *\n   * The current user must be authenticated first.\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   * fcl.config().put('accessNode.api', 'https://rest-testnet.onflow.org');\n   * // first authenticate to set current user\n   * fcl.authenticate();\n   * // ... somewhere else & sometime later\n   * fcl.unauthenticate();\n   * // fcl.currentUser.loggedIn === null\n   */\n  return function unauthenticate() {\n    spawnCurrentUser(context)\n    send(context.actorName, DEL_CURRENT_USER)\n  }\n}\n\nconst normalizePreAuthzResponse = (authz: any) => ({\n  f_type: \"PreAuthzResponse\",\n  f_vsn: \"1.0.0\",\n  proposer: (authz || {}).proposer,\n  payer: (authz || {}).payer || [],\n  authorization: (authz || {}).authorization || [],\n})\n\n/**\n * @description Factory function to create the resolvePreAuthz method\n * @param config Current User Configuration\n */\nconst createResolvePreAuthz =\n  (context: CurrentUserContext) =>\n  (authz: any, {user}: {user: CurrentUser}) => {\n    const resp = normalizePreAuthzResponse(authz)\n    const axs = []\n\n    if (resp.proposer != null) axs.push([\"PROPOSER\", resp.proposer])\n    for (let az of resp.payer || []) axs.push([\"PAYER\", az])\n    for (let az of resp.authorization || []) axs.push([\"AUTHORIZER\", az])\n\n    var result = axs.map(([role, az]) => ({\n      tempId: [az.identity.address, az.identity.keyId].join(\"|\"),\n      addr: az.identity.address,\n      keyId: az.identity.keyId,\n      signingFunction(signable: Signable) {\n        return execService(context, {\n          service: az,\n          msg: signable,\n          platform: context.platform,\n          user,\n        })\n      },\n      role: {\n        proposer: role === \"PROPOSER\",\n        payer: role === \"PAYER\",\n        authorizer: role === \"AUTHORIZER\",\n      },\n    }))\n    return result\n  }\n\n/**\n * @description Factory function to create the authorization method\n * @param config Current User Configuration\n */\nconst createAuthorization =\n  (context: CurrentUserContext) =>\n  /**\n   * @description Produces the needed authorization details for the current user to submit transactions to Flow\n   * It defines a signing function that connects to a user's wallet provider to produce signatures to submit transactions.\n   *\n   * @param account Account object\n   * @returns Account object with signing function\n   * */\n  async (account: Account) => {\n    spawnCurrentUser(context)\n\n    return {\n      ...account,\n      tempId: \"CURRENT_USER\",\n      async resolve(account: Account, preSignable: Signable) {\n        const user = await createAuthenticate(context)({redir: true})\n        const authz = serviceOfType(user!.services, \"authz\")\n        const preAuthz = serviceOfType(user!.services, \"pre-authz\")\n\n        if (preAuthz)\n          return createResolvePreAuthz(context)(\n            await execService(context, {\n              service: preAuthz,\n              msg: preSignable,\n              platform: context.platform,\n              user,\n            }),\n            {\n              user: user!,\n            }\n          )\n        if (authz) {\n          return {\n            ...account,\n            tempId: \"CURRENT_USER\",\n            resolve: null,\n            addr: sansPrefix((authz as any).identity.address),\n            keyId: (authz as any).identity.keyId,\n            sequenceNum: null,\n            signature: null,\n            async signingFunction(signable: Signable) {\n              return normalizeCompositeSignature(\n                await execService(context, {\n                  service: authz,\n                  msg: signable,\n                  opts: {\n                    includeOlderJsonRpcCall: true,\n                  },\n                  platform: context.platform,\n                  user,\n                })\n              )\n            },\n          }\n        }\n        throw new Error(\n          \"No Authz or PreAuthz Service configured for CURRENT_USER\"\n        )\n      },\n    }\n  }\n\n/**\n * @description Factory function to create the subscribe method\n * @param context Current User Context\n */\nfunction createSubscribe(context: CurrentUserContext) {\n  /**\n   * @description The callback passed to subscribe will be called when the user authenticates and un-authenticates, making it easy to update the UI accordingly.\n   *\n   * @param callback The callback will be called with the current user as the first argument when the current user is set or removed.\n   * @returns Function to unsubscribe from user state changes\n   *\n   * @example\n   * import React, { useState, useEffect } from 'react';\n   * import * as fcl from '@onflow/fcl';\n   *\n   * export function AuthCluster() {\n   *   const [user, setUser] = useState({ loggedIn: null });\n   *   useEffect(() => fcl.currentUser.subscribe(setUser), []); // sets the callback for FCL to use\n   *\n   *   if (user.loggedIn) {\n   *     return (\n   *       <div>\n   *         <span>{user?.addr ?? 'No Address'}</span>\n   *         <button onClick={fcl.unauthenticate}>Log Out</button>\n   *       </div>\n   *     );\n   *   } else {\n   *     return (\n   *       <div>\n   *         <button onClick={fcl.logIn}>Log In</button>{' '}\n   *         <button onClick={fcl.signUp}>Sign Up</button>\n   *       </div>\n   *     );\n   *   }\n   * }\n   */\n  return function subscribe(callback: (user: CurrentUser) => void) {\n    spawnCurrentUser(context)\n    const EXIT = \"@EXIT\"\n    const self = spawn(async ctx => {\n      ctx.send(context.actorName, SUBSCRIBE)\n      while (1) {\n        const letter = await ctx.receive()\n        if (letter.tag === EXIT) {\n          ctx.send(context.actorName, UNSUBSCRIBE)\n          return\n        }\n        callback(letter.data)\n      }\n    })\n    return () => send(self, EXIT)\n  }\n}\n\n/**\n * @description Factory function to create the snapshot method\n * @param context Current User Context\n */\nfunction createSnapshot(\n  context: CurrentUserContext\n): () => Promise<CurrentUser> {\n  /**\n   * @description Returns the current user object. This is the same object that is set and available on `fcl.currentUser.subscribe(callback)`.\n   *\n   * @returns Promise that resolves to the current user object\n   *\n   * @example\n   * // returns the current user object\n   * const user = fcl.currentUser.snapshot();\n   *\n   * // subscribes to the current user object and logs to console on changes\n   * fcl.currentUser.subscribe(console.log);\n   */\n  return function snapshot() {\n    spawnCurrentUser(context)\n    return send(context.actorName, SNAPSHOT, null, {\n      expectReply: true,\n      timeout: 0,\n    })\n  }\n}\n\n/**\n * @description Resolves the current user as an argument\n * @param config Current User Configuration\n */\nconst createResolveArgument = (config: CurrentUserContext) => async () => {\n  const {addr} = (await createAuthenticate(config)()) as any\n  return arg(withPrefix(addr) as any, t.Address)\n}\n\nconst makeSignable = (msg: string) => {\n  invariant(/^[0-9a-f]+$/i.test(msg), \"Message must be a hex string\")\n\n  return {\n    message: msg,\n  }\n}\n\n/**\n * @description Factory function to create the signUserMessage method\n * @param config Current User Configuration\n */\nconst createSignUserMessage =\n  (context: CurrentUserContext) =>\n  /**\n   * @description A method to use allowing the user to personally sign data via FCL Compatible Wallets/Services.\n   *\n   * This method requires the current user's wallet to support a signing service endpoint. Currently, only Blocto is compatible with this feature by default.\n   *\n   * @param msg A hexadecimal string to be signed\n   * @returns An Array of CompositeSignatures: \\{`addr`, `keyId`, `signature`\\}\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   *\n   * export const signMessage = async () => {\n   *   const MSG = Buffer.from('FOO').toString('hex');\n   *   try {\n   *     return await currentUser.signUserMessage(MSG);\n   *   } catch (error) {\n   *     console.log(error);\n   *   }\n   * };\n   */\n  async (msg: string) => {\n    spawnCurrentUser(context)\n    const user: any = await createAuthenticate(context)({\n      redir: true,\n    })\n\n    const signingService = serviceOfType(user.services, \"user-signature\")\n\n    invariant(\n      signingService as any,\n      \"Current user must have authorized a signing service.\"\n    )\n\n    try {\n      const response = await execService(context, {\n        service: signingService as any,\n        msg: makeSignable(msg),\n        platform: context.platform,\n        user,\n      })\n      if (Array.isArray(response)) {\n        return response.map(compSigs => normalizeCompositeSignature(compSigs))\n      } else {\n        return [normalizeCompositeSignature(response)]\n      }\n    } catch (error) {\n      return error\n    }\n  }\n\nconst _createUser = (context: CurrentUserContext): CurrentUserService => {\n  const currentUser = {\n    authenticate: createAuthenticate(context),\n    unauthenticate: createUnauthenticate(context),\n    authorization: createAuthorization(context),\n    signUserMessage: createSignUserMessage(context),\n    subscribe: createSubscribe(context),\n    snapshot: createSnapshot(context),\n    resolveArgument: createResolveArgument(context),\n  }\n\n  return Object.assign(\n    () => {\n      return {...currentUser}\n    },\n    {...currentUser}\n  ) as any\n}\n\nconst createUser = (\n  context: Pick<FCLContext, \"config\" | \"sdk\" | \"storage\"> & {\n    platform: string\n    discovery?: {\n      execStrategy?: (...args: any[]) => any\n    }\n  }\n) => {\n  return _createUser({\n    ...context,\n    getStorageProvider: async () => context.storage,\n    discovery: context.discovery,\n    actorName: `${NAME}_${uuidv4()}`,\n  })\n}\n\n/**\n * @description Creates and configures the Current User service for managing user authentication and\n * authorization in Flow applications. This is the core service for handling user sessions, wallet\n * connections, transaction signing, and user data management. The service provides both callable\n * function interface and object methods for maximum flexibility.\n *\n * @param config Configuration object for the current user service\n * @param config.platform Platform identifier (e.g., \"web\", \"mobile\", \"extension\")\n * @param config.discovery Optional discovery configuration for wallet services\n * @param config.getStorageProvider Optional function to provide custom storage implementation\n *\n * @returns Current user service object with authentication and authorization methods\n *\n * @example\n * // Basic setup and authentication\n * import * as fcl from \"@onflow/fcl\"\n *\n * // Configure FCL\n * fcl.config({\n *   \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n *   \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\"\n * })\n *\n * // Create current user service\n * const currentUser = fcl.getCurrentUser({\n *   platform: \"web\"\n * })\n *\n * // Authenticate user\n * const user = await currentUser.authenticate()\n * console.log(\"Authenticated user:\", user.addr)\n *\n * // Subscribe to authentication state changes\n * const currentUser = fcl.getCurrentUser({ platform: \"web\" })\n *\n * const unsubscribe = currentUser.subscribe((user) => {\n *   if (user.loggedIn) {\n *     console.log(\"User logged in:\", user.addr)\n *     document.getElementById(\"login-btn\").style.display = \"none\"\n *     document.getElementById(\"logout-btn\").style.display = \"block\"\n *   } else {\n *     console.log(\"User logged out\")\n *     document.getElementById(\"login-btn\").style.display = \"block\"\n *     document.getElementById(\"logout-btn\").style.display = \"none\"\n *   }\n * })\n *\n * // Clean up subscription\n * window.addEventListener(\"beforeunload\", () => unsubscribe())\n *\n * // Sign transactions with user authorization\n * const currentUser = fcl.getCurrentUser({ platform: \"web\" })\n *\n * const txId = await fcl.mutate({\n *   cadence: `\n *     transaction(amount: UFix64, to: Address) {\n *       prepare(signer: AuthAccount) {\n *         // Transfer tokens logic here\n *       }\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(\"10.0\", t.UFix64),\n *     arg(\"0x01\", t.Address)\n *   ],\n *   authz: currentUser.authorization\n * })\n *\n * // Sign custom messages\n * const currentUser = fcl.getCurrentUser({ platform: \"web\" })\n *\n * const message = Buffer.from(\"Hello, Flow!\").toString(\"hex\")\n * const signatures = await currentUser.signUserMessage(message)\n *\n * console.log(\"Message signatures:\", signatures)\n */\nconst getCurrentUser = (cfg: CurrentUserConfig): CurrentUserService => {\n  const partialContext = createPartialGlobalFCLContext()\n\n  // Wrapper for backwards compatibility\n  const getStorageProvider = async (): Promise<StorageProvider> => {\n    if (cfg.getStorageProvider) return await cfg.getStorageProvider()\n    return (await config.first(\n      [\"fcl.storage\", \"fcl.storage.default\"],\n      undefined\n    )) as any\n  }\n\n  return _createUser({\n    ...partialContext,\n    getStorageProvider,\n    platform: cfg.platform,\n    actorName: NAME,\n    discovery: cfg.discovery,\n  })\n}\n\nexport {createUser, getCurrentUser}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/merge-services.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Merges two arrays of services into a single array. This is a simple concatenation\n * operation used internally by FCL to combine service arrays from different sources.\n * The function handles undefined/null inputs gracefully by treating them as empty arrays.\n *\n * @param sx1 First array of services to merge\n * @param sx2 Second array of services to merge\n * @returns Combined array containing all services from both input arrays\n *\n * @example\n * // Merge wallet services with discovery services\n * const walletServices = [\n *   { type: \"authn\", endpoint: \"wallet1.com\" },\n *   { type: \"authz\", endpoint: \"wallet1.com\" }\n * ]\n * const discoveryServices = [\n *   { type: \"authn\", endpoint: \"wallet2.com\" }\n * ]\n * const allServices = mergeServices(walletServices, discoveryServices)\n */\nexport function mergeServices(\n  sx1: Service[] = [],\n  sx2: Service[] = []\n): Service[] {\n  // TODO: Make this smarter\n  return [...sx1, ...sx2]\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/service-of-type.test.ts",
    "content": "import {serviceOfType} from \"./service-of-type\"\n\ndescribe(\"service-of-type\", () => {\n  it(\"should choose the most recent version of a service\", () => {\n    const services = [\n      {\n        type: \"authn\",\n        f_vsn: \"1.0.0\",\n      },\n      {\n        type: \"authn\",\n        f_vsn: \"2.0.0\",\n      },\n    ]\n\n    const service = serviceOfType(services as any, \"authn\")\n\n    expect(service).toEqual({\n      type: \"authn\",\n      f_vsn: \"2.0.0\",\n    })\n  })\n\n  it(\"should return null if no service of type exists\", () => {\n    const services = [\n      {\n        type: \"authn\",\n        f_vsn: \"1.0.0\",\n      },\n      {\n        type: \"authn\",\n        f_vsn: \"2.0.0\",\n      },\n    ]\n\n    const service = serviceOfType(services as any, \"non-existent\")\n\n    expect(service).toBe(null)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/service-of-type.ts",
    "content": "import * as semver from \"@onflow/util-semver\"\nimport {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Finds a service of a specific type from an array of services, returning the one with\n * the highest version number. This is used internally by FCL to select the most recent version\n * of a service when multiple services of the same type are available.\n *\n * @param services Array of services to search through\n * @param type The type of service to find (e.g., \"authn\", \"authz\", \"user-signature\")\n * @returns The service with the highest version number of the specified type, or null if none found\n *\n * @example\n * // Find the latest authentication service\n * const services = [\n *   { type: \"authn\", f_vsn: \"1.0.0\", endpoint: \"...\" },\n *   { type: \"authn\", f_vsn: \"1.1.0\", endpoint: \"...\" },\n *   { type: \"authz\", f_vsn: \"1.0.0\", endpoint: \"...\" }\n * ]\n * const latestAuthn = serviceOfType(services, \"authn\")\n */\nexport function serviceOfType(\n  services: Service[] = [],\n  type: string\n): Service | null {\n  // Find the greatest version of the service type\n  return services.reduce(\n    (mostRecent, service) =>\n      service.type === type\n        ? !mostRecent || semver.compare(service.f_vsn, mostRecent.f_vsn) > 0\n          ? service\n          : mostRecent\n        : mostRecent,\n    null as Service | null\n  )\n}\n"
  },
  {
    "path": "packages/fcl-core/src/current-user/url-from-service.ts",
    "content": "import {URL} from \"../utils/url\"\nimport {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Creates a URL object from a service endpoint, optionally including service parameters\n * as query string parameters. This is used internally by FCL to construct URLs for service endpoints\n * with their associated parameters.\n *\n * @param service The service object containing endpoint and optional parameters\n * @param includeParams Whether to include service parameters as URL query parameters\n * @returns URL object constructed from the service endpoint and parameters\n *\n * @example\n * // Create URL with parameters\n * const service = {\n *   endpoint: \"https://wallet.example.com/authn\",\n *   params: {\n *     appIdentifier: \"MyApp\",\n *     nonce: \"abc123\"\n *   }\n * }\n * const url = urlFromService(service, true)\n * console.log(url.toString())\n * // \"https://wallet.example.com/authn?appIdentifier=MyApp&nonce=abc123\"\n */\nexport function urlFromService(\n  service: Service,\n  includeParams: boolean = true\n): URL {\n  const url = new URL(service.endpoint)\n  if (includeParams) {\n    for (let [key, value] of Object.entries(service.params || {})) {\n      url.searchParams.append(key, value)\n    }\n  }\n  return url\n}\n"
  },
  {
    "path": "packages/fcl-core/src/default-config.ts",
    "content": "import {FCLContext} from \"./context\"\n\n/**\n * @description Extracts configuration values that match a given regular expression pattern from the Flow configuration.\n * This utility function filters the configuration entries using the provided regex pattern and returns a simplified\n * object with the matching keys (with the regex pattern removed) and their corresponding values.\n *\n * @param regex Regular expression pattern to filter configuration keys. The matched portion will be removed from the resulting keys\n * @returns Promise that resolves to an object containing the filtered configuration entries with simplified keys\n *\n * @example\n * // Extract all configuration keys starting with \"accessNode\"\n * const accessNodeConfig = await configLens(/^accessNode\\./)\n * // If config has \"accessNode.api\" = \"https://rest-mainnet.onflow.org\"\n * // Result: { \"api\": \"https://rest-mainnet.onflow.org\" }\n *\n * // Extract wallet-related configuration\n * const walletConfig = await configLens(/^wallet\\./)\n * // Filters keys like \"wallet.discovery.api\" and returns simplified object\n */\nexport async function configLens(\n  context: Pick<FCLContext, \"config\">,\n  regex: RegExp\n): Promise<Record<string, any>> {\n  return Object.fromEntries(\n    Object.entries(await context.config.where(regex)).map(([key, value]) => [\n      key.replace(regex, \"\"),\n      value,\n    ])\n  )\n}\n"
  },
  {
    "path": "packages/fcl-core/src/discovery/index.ts",
    "content": "import authn from \"./services/authn\"\nexport {getDiscoveryService, makeDiscoveryServices} from \"./utils\"\n\nconst discovery = {\n  authn,\n}\n\nexport {discovery}\n"
  },
  {
    "path": "packages/fcl-core/src/discovery/services/authn.ts",
    "content": "import {\n  spawn,\n  subscriber,\n  snapshoter,\n  INIT,\n  SUBSCRIBE,\n  UNSUBSCRIBE,\n  send,\n  Letter as ActorLetter,\n  ActorContext,\n} from \"@onflow/util-actor\"\nimport {getServices} from \"../services\"\nimport {LEVELS, log} from \"@onflow/util-logger\"\nimport {Service} from \"@onflow/typedefs\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\nexport const SERVICE_ACTOR_KEYS = {\n  AUTHN: \"authn\",\n  RESULTS: \"results\",\n  SNAPSHOT: \"SNAPSHOT\",\n  UPDATED: \"UPDATED\",\n  UPDATE_RESULTS: \"UPDATE_RESULTS\",\n} as const\n\nexport interface ServiceData {\n  results: Service[]\n}\n\nexport type SubscriptionCallback = (\n  data: Service[] | null,\n  error: Error | null\n) => void\n\nexport interface Authn {\n  subscribe: (cb: SubscriptionCallback) => () => void\n  snapshot: () => Promise<ServiceData>\n  update: () => void\n}\n\nconst warn = (fact: boolean, msg: string): void => {\n  if (fact) {\n    console.warn(\n      `\n      %cFCL Warning\n      ============================\n      ${msg}\n      For more info, please see the docs: https://docs.onflow.org/fcl/\n      ============================\n      `,\n      \"font-weight:bold;font-family:monospace;\"\n    )\n  }\n}\n\nconst fetchServicesFromDiscovery = async (\n  context: Pick<FCLContext, \"config\">\n): Promise<void> => {\n  try {\n    const services = await getServices({\n      context,\n      types: [SERVICE_ACTOR_KEYS.AUTHN],\n    })\n    send(SERVICE_ACTOR_KEYS.AUTHN, SERVICE_ACTOR_KEYS.UPDATE_RESULTS, {\n      results: services,\n    })\n  } catch (error: any) {\n    log({\n      title: `${error.name} Error fetching Discovery API services.`,\n      message: error.message,\n      level: LEVELS.error,\n    })\n  }\n}\n\nfunction createHandlers(context: Pick<FCLContext, \"config\">) {\n  return {\n    [INIT]: async (ctx: ActorContext) => {\n      warn(\n        typeof window === \"undefined\",\n        '\"fcl.discovery\" is only available in the browser.'\n      )\n      // If you call this before the window is loaded extensions will not be set yet\n      if (document.readyState === \"complete\") {\n        fetchServicesFromDiscovery(context)\n      } else {\n        window.addEventListener(\"load\", () => {\n          fetchServicesFromDiscovery(context)\n        })\n      }\n    },\n    [SERVICE_ACTOR_KEYS.UPDATE_RESULTS]: (\n      ctx: ActorContext,\n      _letter: ActorLetter,\n      data: ServiceData\n    ) => {\n      ctx.merge(data)\n      ctx.broadcast(SERVICE_ACTOR_KEYS.UPDATED, {...ctx.all()})\n    },\n    [SUBSCRIBE]: (ctx: ActorContext, letter: ActorLetter) => {\n      ctx.subscribe(letter.from!)\n      ctx.send(letter.from!, SERVICE_ACTOR_KEYS.UPDATED, {...ctx.all()})\n    },\n    [UNSUBSCRIBE]: (ctx: ActorContext, letter: ActorLetter) =>\n      ctx.unsubscribe(letter.from!),\n    [SERVICE_ACTOR_KEYS.SNAPSHOT]: async (\n      ctx: ActorContext,\n      letter: ActorLetter\n    ) => letter.reply({...ctx.all()}),\n  }\n}\n\nconst spawnProviders = (context: Pick<FCLContext, \"config\">) =>\n  spawn(createHandlers(context) as any, SERVICE_ACTOR_KEYS.AUTHN)\n\n/**\n * Discovery authn service for interacting with Flow compatible wallets.\n *\n * Discovery abstracts away code so that developers don't have to deal with the discovery\n * of Flow compatible wallets, integration, or authentication. Using discovery from FCL\n * allows dapps to list and authenticate with wallets while having full control over the UI.\n * Common use cases for this are login or registration pages.\n *\n * NOTE: The following methods can only be used in web browsers.\n *\n * WARNING: discovery.authn.endpoint value MUST be set in the configuration before calling this method.\n *\n * @example\n * // Basic usage with React\n * import './config';\n * import { useState, useEffect } from 'react';\n * import * as fcl from '@onflow/fcl';\n *\n * function Component() {\n *   const [wallets, setWallets] = useState([]);\n *   useEffect(\n *     () => fcl.discovery.authn.subscribe((res) => setWallets(res.results)),\n *     [],\n *   );\n *\n *   return (\n *     <div>\n *       {wallets.map((wallet) => (\n *         <button\n *           key={wallet.provider.address}\n *           onClick={() => fcl.authenticate({ service: wallet })}\n *         >\n *           Login with {wallet.provider.name}\n *         </button>\n *       ))}\n *     </div>\n *   );\n * }\n *\n * // Configuration for opt-in services\n * import { config } from '@onflow/fcl';\n *\n * config({\n *   'discovery.authn.endpoint':\n *     'https://fcl-discovery.onflow.org/api/testnet/authn', // Endpoint set to Testnet\n *   'discovery.authn.include': ['0x9d2e44203cb13051'], // Ledger wallet address on Testnet set to be included\n *   'discovery.authn.exclude': ['0x123456789abcdef01'], // Example of excluding a wallet by address\n * });\n */\nfunction createAuthn(context: Pick<FCLContext, \"config\">): Authn {\n  /**\n   * @description Discovery methods for interacting with Authn.\n   */\n  const authn: Authn = {\n    /**\n     * Subscribe to Discovery authn services and receive real-time updates.\n     *\n     * This method allows you to subscribe to changes in the available authentication services.\n     * When new services are discovered or existing ones are updated, the callback function will be invoked.\n     *\n     * @param cb Callback function that receives the list of available services and any error\n     * @returns A function to unsubscribe from the service updates\n     *\n     * @example\n     * import * as fcl from '@onflow/fcl';\n     *\n     * const unsubscribe = fcl.discovery.authn.subscribe((services, error) => {\n     *   if (error) {\n     *     console.error('Discovery error:', error);\n     *     return;\n     *   }\n     *   console.log('Available services:', services);\n     * });\n     *\n     * // Later, to stop receiving updates\n     * unsubscribe();\n     */\n    subscribe: cb =>\n      subscriber(SERVICE_ACTOR_KEYS.AUTHN, () => spawnProviders(context), cb),\n\n    /**\n     * Get the current snapshot of Discovery authn services.\n     *\n     * This method returns a promise that resolves to the current state of available authentication services\n     * without setting up a subscription. Useful for one-time checks or initial state loading.\n     *\n     * @returns A promise that resolves to the current service data\n     *\n     * @example\n     * import * as fcl from '@onflow/fcl';\n     *\n     * async function getServices() {\n     *   try {\n     *     const serviceData = await fcl.discovery.authn.snapshot();\n     *     console.log('Current services:', serviceData.results);\n     *   } catch (error) {\n     *     console.error('Failed to get services:', error);\n     *   }\n     * }\n     */\n    snapshot: () =>\n      snapshoter(SERVICE_ACTOR_KEYS.AUTHN, () => spawnProviders(context)),\n\n    /**\n     * Trigger an update of authn services from the discovery endpoint.\n     *\n     * This method manually triggers a refresh of the available authentication services\n     * from the configured discovery endpoint. Useful when you want to force a refresh\n     * of the service list.\n     *\n     * @example\n     * import * as fcl from '@onflow/fcl';\n     *\n     * // Force refresh of available services\n     * fcl.discovery.authn.update();\n     */\n    update: () => {\n      // Only fetch services if the window is loaded\n      // Otherwise, this will be called by the INIT handler\n      if (document.readyState === \"complete\") {\n        fetchServicesFromDiscovery(context)\n      }\n    },\n  }\n\n  return authn\n}\n\nconst authn = /* @__PURE__ */ createAuthn(createPartialGlobalFCLContext())\n\nexport default authn\n"
  },
  {
    "path": "packages/fcl-core/src/discovery/services.test.ts",
    "content": "import {getServices} from \"./services\"\nimport {config} from \"@onflow/config\"\nimport * as chainIdModule from \"../utils/chain-id/get-chain-id\"\nimport {createMockContext} from \"../test-utils/mock-context\"\n\nconst serviceOne = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authn\",\n  method: \"IFRAME/RPC\",\n  uid: \"walletone#authn\",\n  endpoint: \"https://test.test\",\n  provider: {\n    address: \"0x1\",\n    name: \"Wallet One\",\n  },\n}\n\nconst serviceTwo = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authz\",\n  method: \"IFRAME/RPC\",\n  uid: \"wallettwo#authn\",\n  endpoint: \"https://test.test\",\n  provider: {\n    address: \"0x2\",\n    name: \"Wallet Two\",\n  },\n}\n\nconst serviceThree = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authn\",\n  method: \"IFRAME/RPC\",\n  uid: \"walletthree#authn\",\n  endpoint: \"https://test.test\",\n  provider: {\n    address: \"0x3\",\n    name: \"Wallet Three\",\n  },\n}\n\nconst serviceFour = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authn\",\n  method: \"IFRAME/RPC\",\n  uid: \"walletfour#authn\",\n  endpoint: \"https://test.test\",\n  optIn: true,\n  provider: {\n    address: \"0x4\",\n    name: \"Wallet Four\",\n  },\n}\n\nconst endpoint = \"https://fcl-discovery.onflow.org/api/testnet/authn\"\n\ndescribe(\"getServices\", () => {\n  let windowSpy\n  let chainIdSpy\n  let configRef\n  let mockContext: ReturnType<typeof createMockContext>\n\n  beforeEach(() => {\n    windowSpy = jest.spyOn(window, \"window\", \"get\")\n    chainIdSpy = jest.spyOn(chainIdModule, \"getChainId\")\n    chainIdSpy.mockImplementation(async () => \"testnet\")\n    mockContext = createMockContext({\n      configValues: {\n        \"discovery.authn.endpoint\": endpoint,\n        \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n      },\n    })\n  })\n\n  afterEach(() => {\n    windowSpy.mockRestore()\n    chainIdSpy.mockRestore()\n  })\n\n  it(\"it should get only services of type authn\", async () => {\n    const mockData = [serviceOne, serviceTwo]\n\n    windowSpy.mockImplementation(() => ({\n      fcl_extensions: [serviceThree],\n    }))\n\n    global.fetch = jest.fn(() =>\n      Promise.resolve({\n        json: () => Promise.resolve(mockData),\n      })\n    ) as jest.Mock\n\n    const response = await getServices({types: [\"authn\"], context: mockContext})\n    expect(global.fetch).toHaveBeenCalledTimes(1)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/discovery/services.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {getServiceRegistry} from \"../current-user/exec-service/plugins\"\nimport {getChainId} from \"../utils\"\nimport {VERSION} from \"../VERSION\"\nimport {makeDiscoveryServices} from \"./utils\"\nimport {URL} from \"../utils/url\"\nimport {Service} from \"@onflow/typedefs\"\nimport {FCLContext} from \"../context\"\n\nexport interface GetServicesParams {\n  types: string[]\n  context: Pick<FCLContext, \"config\">\n}\n\nexport interface DiscoveryRequestBody {\n  type: string[]\n  fclVersion: string\n  include: string[]\n  exclude: string[]\n  features: {\n    suggested: string[]\n  }\n  clientServices: Service[]\n  supportedStrategies: string[]\n  userAgent?: string\n  network: string\n}\n\n/**\n * @description Fetches available wallet services from the discovery endpoint based on the\n * requested service types. This function queries the FCL discovery service to find compatible\n * wallet providers that support the specified service types.\n *\n * @param params Object containing the types of services to discover\n * @returns Promise resolving to an array of Service objects from the discovery endpoint\n *\n * @example\n * // Discover authentication services\n * const services = await getServices({ types: [\"authn\"] })\n * console.log(services) // Array of available wallet authentication services\n */\nexport async function getServices({\n  context,\n  types,\n}: GetServicesParams): Promise<Service[]> {\n  const endpoint = await context.config.get(\"discovery.authn.endpoint\")\n  invariant(\n    Boolean(endpoint),\n    `\"discovery.authn.endpoint\" in config must be defined.`\n  )\n\n  const include = await context.config.get(\"discovery.authn.include\", [])\n  const exclude = await context.config.get(\"discovery.authn.exclude\", [])\n  const url = new URL(endpoint as string)\n\n  return fetch(url, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n      type: types,\n      fclVersion: VERSION,\n      include,\n      exclude,\n      features: {\n        suggested: await context.config.get(\"discovery.features.suggested\", []),\n      },\n      clientServices: await makeDiscoveryServices(),\n      supportedStrategies: getServiceRegistry().getStrategies(),\n      userAgent: window?.navigator?.userAgent,\n      network: await getChainId(),\n    } as DiscoveryRequestBody),\n  }).then(d => d.json())\n}\n"
  },
  {
    "path": "packages/fcl-core/src/discovery/utils.ts",
    "content": "import {config} from \"@onflow/config\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {getServiceRegistry} from \"../current-user/exec-service/plugins\"\nimport {Service} from \"@onflow/typedefs\"\nimport {FCLContext} from \"../context\"\n\nexport interface DiscoveryService extends Service {\n  discoveryAuthnInclude: string[]\n  discoveryAuthnExclude: string[]\n  discoveryFeaturesSuggested: string[]\n}\n\n/**\n * @description Creates an array of discovery services by combining extension services from the\n * window object with registered services from the service registry. This is used internally\n * by FCL to gather all available wallet and authentication services.\n *\n * @returns Promise that resolves to an array of available services\n *\n * @example\n * // Get all available discovery services\n * const services = await makeDiscoveryServices()\n * console.log(services.length) // Number of available services\n * services.forEach(service => {\n *   console.log(`Service: ${service.provider?.name}, Type: ${service.type}`)\n * })\n */\nexport const makeDiscoveryServices = async (): Promise<Service[]> => {\n  const extensionServices = ((window as any)?.fcl_extensions || []) as Service[]\n  return [\n    ...extensionServices,\n    ...(getServiceRegistry().getServices() as Service[]),\n  ]\n}\n\n/**\n * @description Creates and configures a discovery service object used for wallet authentication.\n * This function combines the provided service configuration with discovery-related settings from\n * the FCL configuration to create a complete service definition for wallet authentication flows.\n *\n * @param context FCL context containing configuration and SDK\n * @param service Optional partial service configuration to override defaults\n * @param service.method Optional communication method for the service\n * @param service.endpoint Optional endpoint URL for the service\n * @returns Promise that resolves to a complete discovery service configuration\n * @throws Error if required configuration values are missing\n *\n * @example\n * // Get discovery service with default configuration\n * const discoveryService = await getDiscoveryService(context)\n * console.log(discoveryService.endpoint) // Configured discovery endpoint\n *\n * // Override discovery service endpoint\n * const customService = await getDiscoveryService(context, {\n *   endpoint: \"https://wallet.example.com/authn\",\n *   method: \"HTTP/POST\"\n * })\n *\n * // Use with custom wallet service\n * const walletService = await getDiscoveryService(context, {\n *   endpoint: \"https://my-wallet.com/fcl\",\n *   provider: {\n *     name: \"My Wallet\",\n *     icon: \"https://my-wallet.com/icon.png\"\n *   }\n * })\n */\nexport async function getDiscoveryService(\n  context: Pick<FCLContext, \"config\">,\n  service?: Partial<Service>\n): Promise<DiscoveryService> {\n  const discoveryAuthnInclude = (await context.config.get(\n    \"discovery.authn.include\",\n    []\n  )) as string[]\n  const discoveryAuthnExclude = (await context.config.get(\n    \"discovery.authn.exclude\",\n    []\n  )) as string[]\n  const discoveryFeaturesSuggested = (await context.config.get(\n    \"discovery.features.suggested\",\n    []\n  )) as string[]\n  const discoveryWalletMethod = await context.config.first(\n    [\"discovery.wallet.method\", \"discovery.wallet.method.default\"],\n    undefined\n  )\n  const method = service?.method ? service.method : discoveryWalletMethod\n  const endpoint =\n    service?.endpoint ??\n    (await context.config.first(\n      [\"discovery.wallet\", \"challenge.handshake\"],\n      undefined\n    ))\n\n  invariant(\n    endpoint as any,\n    `\n    If no service is passed to \"authenticate,\" then \"discovery.wallet\" must be defined in fcl config.\n    See: \"https://docs.onflow.org/fcl/reference/api/#setting-configuration-values\"\n    `\n  )\n\n  return {\n    ...service,\n    type: \"authn\",\n    endpoint,\n    method,\n    discoveryAuthnInclude,\n    discoveryAuthnExclude,\n    discoveryFeaturesSuggested,\n  } as DiscoveryService\n}\n"
  },
  {
    "path": "packages/fcl-core/src/document/document.test.ts",
    "content": "import {retrieve} from \"./document\"\nimport {\n  createMockConfigService,\n  createMockContext,\n} from \"../test-utils/mock-context\"\n\ndescribe(\"resolveArguments\", () => {\n  test(\"Should invoke resolver\", async () => {\n    const templateResolver = jest.fn()\n    const config = createMockConfigService({\n      \"document.resolver.testprotocol\": templateResolver,\n    })\n\n    const ret = await retrieve({config}, {url: \"testprotocol://example.test\"})\n\n    expect(templateResolver.mock.calls.length).toEqual(1)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/document/document.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport fetchTransport from \"cross-fetch\"\nimport {ConfigService, FCLContext} from \"../context\"\n\ninterface DocumentResolverParams {\n  url: string\n}\n\nexport interface RetrieveParams {\n  url: string\n}\n\nasync function httpDocumentResolver({\n  url,\n}: DocumentResolverParams): Promise<any> {\n  invariant(\n    typeof url !== \"undefined\",\n    \"retrieve({ url }) -- url must be defined\"\n  )\n\n  let res: Response\n  try {\n    res = await fetchTransport(url)\n  } catch (e) {\n    throw new Error(\"httpDocumentResolver Error: Failed to retrieve document.\")\n  }\n\n  let document = res.ok ? await res.json() : null\n\n  return document\n}\n\nconst DOCUMENT_RESOLVERS: Map<string, typeof httpDocumentResolver> = new Map([\n  [\"http\", httpDocumentResolver],\n  [\"https\", httpDocumentResolver],\n])\n\n/**\n * @description Retrieves a document from a URL using protocol-specific resolvers. This function\n * supports HTTP/HTTPS by default and can be extended with custom resolvers through FCL configuration.\n * It's used internally by FCL to fetch interaction templates and other external documents.\n *\n * @param params The retrieval parameters\n * @param params.url The URL of the document to retrieve\n * @returns Promise that resolves to the retrieved document (typically a JSON object)\n * @throws {Error} If URL is invalid, protocol is unsupported, or retrieval fails\n *\n * @example\n * // Retrieve an interaction template\n * const template = await retrieve({\n *   url: \"https://flix.flow.com/v1.0/templates/transfer-flow-tokens\"\n * })\n * console.log(\"Template:\", template)\n */\nexport async function retrieve(\n  context: Pick<FCLContext, \"config\">,\n  {url}: RetrieveParams\n): Promise<any> {\n  invariant(\n    typeof url !== \"undefined\",\n    \"retrieve({ url }) -- url must be defined\"\n  )\n  invariant(\n    typeof url === \"string\",\n    \"retrieve({ url }) -- url must be a string\"\n  )\n\n  const documentResolversFromConfig = await context.config.where(\n    /^document\\.resolver\\./\n  )\n  Object.keys(documentResolversFromConfig).map(key => {\n    const resolverFromConfig = documentResolversFromConfig[key]\n    const resolverProtocol = key.replace(/^document\\.resolver\\./, \"\")\n    DOCUMENT_RESOLVERS.set(\n      resolverProtocol,\n      resolverFromConfig as typeof httpDocumentResolver\n    )\n  })\n\n  const urlParts: any = /^(.*):\\/\\/([A-Za-z0-9\\-\\.]+)(:[0-9]+)?(.*)$/.exec(url)\n  invariant(urlParts, \"Failed to parse URL\")\n  const protocol = urlParts[1]\n  invariant(urlParts, \"Failed to parse URL protocol\")\n\n  const resolver: any = DOCUMENT_RESOLVERS.get(protocol)\n  invariant(resolver, `No resolver found for protcol=${protocol}`)\n\n  let document = await resolver({url})\n\n  return document\n}\n"
  },
  {
    "path": "packages/fcl-core/src/events/index.test.ts",
    "content": "import {Event, Subscription} from \"@onflow/typedefs\"\nimport {events} from \".\"\nimport {subscribe, SubscriptionsNotSupportedError} from \"@onflow/sdk\"\nimport {createLegacyEvents} from \"./legacy-events\"\nimport {createGetChainId} from \"../utils\"\n\njest.mock(\"@onflow/sdk\")\njest.mock(\"./legacy-events\")\njest.mock(\"../utils\")\n\ndescribe(\"events\", () => {\n  let mockSubscription: jest.Mocked<Subscription>\n  let mockLegacySubscribeObject: jest.Mocked<{\n    subscribe: (\n      callback: (data: Event | null, error: Error | null) => void\n    ) => () => void\n  }>\n  let mockLegacyUnsubscribe: jest.MockedFunction<() => void>\n  let legacyEvents: jest.MockedFunction<ReturnType<typeof createLegacyEvents>>\n  let mockGetChainId: jest.MockedFunction<() => Promise<string>>\n\n  beforeEach(() => {\n    mockSubscription = {\n      unsubscribe: jest.fn(),\n    }\n    mockLegacyUnsubscribe = jest.fn()\n    mockLegacySubscribeObject = {\n      subscribe: jest.fn().mockReturnValue(mockLegacyUnsubscribe),\n    }\n    legacyEvents = jest.fn((_: string) => mockLegacySubscribeObject)\n\n    jest.mocked(subscribe).mockReturnValue(mockSubscription)\n    jest.mocked(createLegacyEvents).mockReturnValue(legacyEvents)\n\n    // Mock the getChainId function to return \"mainnet\" by default\n    mockGetChainId = jest.fn().mockResolvedValue(\"mainnet\")\n    jest.mocked(createGetChainId).mockReturnValue(mockGetChainId)\n  })\n\n  afterEach(() => {\n    jest.clearAllMocks()\n  })\n\n  test(\"subscribe should call subscribe with the correct arguments\", async () => {\n    const filter = {eventTypes: [\"A\"]}\n\n    events(filter).subscribe(() => {})\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(subscribe).toHaveBeenCalledWith({\n      topic: \"events\",\n      args: filter,\n      onData: expect.any(Function),\n      onError: expect.any(Function),\n    })\n  })\n\n  test(\"should work with a string\", async () => {\n    events(\"A\").subscribe(() => {})\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(subscribe).toHaveBeenCalledWith({\n      topic: \"events\",\n      args: {eventTypes: [\"A\"]},\n      onData: expect.any(Function),\n      onError: expect.any(Function),\n    })\n  })\n\n  test(\"should work with empty args\", async () => {\n    events().subscribe(() => {})\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(subscribe).toHaveBeenCalledWith({\n      topic: \"events\",\n      args: {},\n      onData: expect.any(Function),\n      onError: expect.any(Function),\n    })\n  })\n\n  test(\"subscribe should pipe the events to the callback\", async () => {\n    const filter = {eventTypes: [\"A\"]}\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const mockEvents = [{type: \"A\"}, {type: \"B\"}] as any[]\n\n    jest.mocked(subscribe).mockImplementation(({onData}) => {\n      mockEvents.forEach(event => onData(event))\n      return mockSubscription\n    })\n\n    events(filter).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(onData.mock.calls).toEqual([[{type: \"A\"}], [{type: \"B\"}]])\n    expect(onError).not.toHaveBeenCalled()\n  })\n\n  test(\"subscribe should pipe the errors to the callback\", async () => {\n    const filter = {eventTypes: [\"A\"]}\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const mockError = new Error(\"mock error\")\n\n    jest.mocked(subscribe).mockImplementation(({onError: _onError}) => {\n      _onError(mockError)\n      return mockSubscription\n    })\n\n    events(filter).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(onData).not.toHaveBeenCalled()\n    expect(onError).toHaveBeenCalledTimes(1)\n    expect(onError).toHaveBeenCalledWith(mockError)\n  })\n\n  test(\"fallback to legacy polling if subscriptions are not supported\", async () => {\n    const filter = \"A\"\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const mockNotSupportedError = new SubscriptionsNotSupportedError()\n\n    jest.mocked(subscribe).mockImplementation(({onError: _onError}) => {\n      _onError(mockNotSupportedError)\n      return mockSubscription\n    })\n\n    const unsubscribe = events(filter).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Check that the error did not propagate to the onError callback\n    expect(onData).not.toHaveBeenCalled()\n    expect(onError).not.toHaveBeenCalled()\n\n    // Check that the legacy subscribe was called\n    expect(mockLegacySubscribeObject.subscribe).toHaveBeenCalledTimes(1)\n    expect(mockLegacyUnsubscribe).not.toHaveBeenCalled()\n\n    // Check that the legacy events were called with the correct filter\n    expect(legacyEvents).toHaveBeenCalledWith(filter)\n    expect(mockLegacySubscribeObject.subscribe).toHaveBeenCalledWith(\n      expect.any(Function)\n    )\n\n    // Mock the legacy subscribe to call the onData callback\n    const legacyOnData = (\n      mockLegacySubscribeObject.subscribe.mock.calls as any\n    )[0][0] as jest.Mock\n    const mockLegacyEvents = [{type: \"A\"}, {type: \"B\"}] as any[]\n    mockLegacyEvents.forEach(event => legacyOnData(event))\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Check that the onData callback was called with the legacy events\n    expect(onData.mock.calls).toEqual([[{type: \"A\"}], [{type: \"B\"}]])\n    expect(onError).not.toHaveBeenCalled()\n    expect(mockLegacyUnsubscribe).not.toHaveBeenCalled()\n\n    // Unsubscribe\n    unsubscribe()\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(mockSubscription.unsubscribe).toHaveBeenCalledTimes(1)\n    expect(mockLegacyUnsubscribe).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"emulator should fallback to legacy polling\", async () => {\n    const filter = \"A\"\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    // Mock the getChainId to return \"local\" to simulate the Flow emulator\n    mockGetChainId.mockResolvedValue(\"local\")\n\n    events(filter).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 10))\n\n    expect(legacyEvents).toHaveBeenCalledWith(filter)\n    expect(mockLegacySubscribeObject.subscribe).toHaveBeenCalledWith(\n      expect.any(Function)\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/events/index.ts",
    "content": "import {Event, EventFilter, SubscriptionTopic} from \"@onflow/typedefs\"\nimport {createLegacyEvents} from \"./legacy-events\"\nimport {SubscriptionsNotSupportedError} from \"@onflow/sdk\"\nimport {createGetChainId} from \"../utils\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nconst FLOW_EMULATOR = \"local\"\n\nexport function createEvents(context: Pick<FCLContext, \"config\" | \"sdk\">) {\n  /**\n   * @description Subscribes to Flow blockchain events in real-time. This function provides a way to listen\n   * for specific events emitted by smart contracts on the Flow blockchain. It automatically handles\n   * fallback to legacy polling for environments that don't support WebSocket subscriptions.\n   *\n   * @param filterOrType Event filter object or event type string.\n   * If a string is provided, it will be treated as a single event type to subscribe to.\n   * If an EventFilter object is provided, it can contain multiple event types and other filter criteria.\n   * @param filterOrType.eventTypes Array of event type strings to subscribe to\n   * @param filterOrType.startBlockId Block ID to start streaming from\n   * @param filterOrType.startBlockHeight Block height to start streaming from\n   *\n   * @returns An object containing a subscribe method\n   * @returns returns.subscribe Function to start the subscription\n   * @returns returns.subscribe.onData Callback function called when an event is received\n   * @returns returns.subscribe.onError Optional callback function called when an error occurs\n   * @returns returns.subscribe.unsubscribe Function returned by subscribe() to stop the subscription\n   *\n   * @example\n   * // Subscribe to a specific event type\n   * import * as fcl from \"@onflow/fcl\"\n   *\n   * const unsubscribe = fcl.events(\"A.0x1654653399040a61.FlowToken.TokensWithdrawn\")\n   *   .subscribe((event) => {\n   *     console.log(\"Event received:\", event)\n   *     console.log(\"Event data:\", event.data)\n   *     console.log(\"Transaction ID:\", event.transactionId)\n   *   })\n   *\n   * // Stop listening after 30 seconds\n   * setTimeout(() => {\n   *   unsubscribe()\n   * }, 30000)\n   *\n   * // Subscribe to multiple event types with error handling\n   * const unsubscribe = fcl.events({\n   *   eventTypes: [\n   *     \"A.0x1654653399040a61.FlowToken.TokensWithdrawn\",\n   *     \"A.0x1654653399040a61.FlowToken.TokensDeposited\"\n   *   ]\n   * }).subscribe(\n   *   (event) => {\n   *     console.log(\"Token event:\", event.type, event.data)\n   *   },\n   *   (error) => {\n   *     console.error(\"Event subscription error:\", error)\n   *   }\n   * )\n   *\n   * // Subscribe to events starting from a specific block height\n   * const unsubscribe = fcl.events({\n   *   eventTypes: [\"A.CONTRACT.EVENT\"],\n   *   startBlockHeight: 12345678\n   * }).subscribe((event) => {\n   *   console.log(\"Historical and new events:\", event)\n   * })\n   */\n  function events(filterOrType?: EventFilter | string) {\n    let filter: EventFilter\n    if (typeof filterOrType === \"string\") {\n      filter = {eventTypes: [filterOrType]}\n    } else {\n      filter = filterOrType || {}\n    }\n\n    return {\n      subscribe: (\n        onData: (event: Event) => void,\n        onError: (error: Error) => void = (error: Error) => {\n          console.error(\"Unhandled error in event subscription:\", error)\n        }\n      ): (() => void) => {\n        let unsubscribeFn = () => {}\n        let unsubscribeFnLegacy = () => {}\n\n        // Subscribe to the event stream\n        function subscribeEventStream() {\n          const {unsubscribe} = context.sdk.subscribe({\n            topic: SubscriptionTopic.EVENTS,\n            args: filter,\n            onData: event => {\n              // Emit the event\n              onData(event)\n            },\n            onError: (error: Error) => {\n              // If subscriptions are not supported, fallback to legacy polling, otherwise return the error\n              if (error instanceof SubscriptionsNotSupportedError) {\n                console.warn(\n                  \"Failed to subscribe to events using real-time streaming (are you using the deprecated GRPC transport?), falling back to legacy polling.\"\n                )\n                fallbackLegacyPolling()\n              } else {\n                onError(error)\n              }\n            },\n          })\n          unsubscribeFn = unsubscribe\n        }\n\n        // Fallback to legacy polling if real-time streaming is not supported\n        function fallbackLegacyPolling() {\n          if (typeof filterOrType !== \"string\") {\n            throw new Error(\n              \"Legacy fcl.events fallback only supports string filters (single event type)\"\n            )\n          }\n          unsubscribeFnLegacy = createLegacyEvents(context)(\n            filterOrType\n          ).subscribe((event: Event | null, error: Error | null) => {\n            if (error) {\n              onError(error)\n            } else {\n              if (event) {\n                onData(event)\n              }\n            }\n          })\n        }\n\n        async function subscribeToEvents() {\n          const network = await createGetChainId(context)()\n\n          // As of Flow CLI v2.2.8, WebSocket subscriptions are not supported on the Flow emulator\n          // This conditional will be removed when WebSocket subscriptions are supported in this environment\n          if (network === FLOW_EMULATOR) {\n            console.warn(\n              \"Events are not supported on the Flow emulator, falling back to legacy polling.\"\n            )\n            fallbackLegacyPolling()\n          } else {\n            subscribeEventStream()\n          }\n        }\n\n        // Subscribe to events\n        const initPromise = subscribeToEvents().catch(error => {\n          onError(error)\n        })\n\n        // Return an unsubscribe function\n        return () => {\n          initPromise.finally(() => {\n            unsubscribeFn()\n            unsubscribeFnLegacy()\n          })\n        }\n      },\n    }\n  }\n\n  return events\n}\n\nexport const events = /*@__PURE__*/ createEvents(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/events/legacy-events.ts",
    "content": "import {getEventsAtBlockHeightRange} from \"@onflow/sdk\"\nimport type {Block, Event} from \"@onflow/typedefs\"\nimport {\n  ActorContext,\n  ActorHandlers,\n  Letter,\n  spawn,\n  SUBSCRIBE,\n  subscriber,\n  UNSUBSCRIBE,\n} from \"@onflow/util-actor\"\nimport {FCLContext} from \"../context\"\n\nexport interface SubscribeObject {\n  /**\n   * @description Subscribe to events\n   * @param callback The callback function\n   * @returns A function to unsubscribe\n   */\n  subscribe: (\n    callback: (data: Event | null, error: Error | null) => void\n  ) => () => void\n}\n\nconst RATE: number = 10000\nconst UPDATED: string = \"UPDATED\"\nconst TICK: string = \"TICK\"\nconst HIGH_WATER_MARK: string = \"hwm\"\n\nconst scheduleTick = async (\n  fclContext: Pick<FCLContext, \"sdk\" | \"config\">,\n  ctx: ActorContext\n): Promise<NodeJS.Timeout> => {\n  return setTimeout(\n    () => ctx.sendSelf(TICK),\n    await fclContext.config.get(\"fcl.eventPollRate\", RATE)\n  )\n}\n\nfunction createHandlers(\n  fclContext: Pick<FCLContext, \"sdk\" | \"config\">\n): ActorHandlers {\n  const HANDLERS: ActorHandlers = {\n    [TICK]: async (ctx: ActorContext): Promise<void> => {\n      if (!ctx.hasSubs()) return\n      let hwm: Block | null = ctx.get(HIGH_WATER_MARK)\n      if (hwm == null) {\n        ctx.put(HIGH_WATER_MARK, await fclContext.sdk.block())\n        ctx.put(TICK, await scheduleTick(fclContext, ctx))\n      } else {\n        let next: Block = await fclContext.sdk.block()\n        ctx.put(HIGH_WATER_MARK, next)\n        if (hwm.height < next.height) {\n          const data: Event[] = await fclContext.sdk\n            .send([\n              getEventsAtBlockHeightRange(\n                ctx.self(),\n                hwm.height + 1,\n                next.height\n              ),\n            ])\n            .then(fclContext.sdk.decode)\n          for (let d of data) ctx.broadcast(UPDATED, d)\n        }\n        ctx.put(TICK, await scheduleTick(fclContext, ctx))\n      }\n    },\n    [SUBSCRIBE]: async (ctx: ActorContext, letter: Letter): Promise<void> => {\n      if (!ctx.hasSubs()) {\n        ctx.put(TICK, await scheduleTick(fclContext, ctx))\n      }\n      ctx.subscribe(letter.from)\n    },\n    [UNSUBSCRIBE]: (ctx: ActorContext, letter: Letter): void => {\n      ctx.unsubscribe(letter.from)\n      if (!ctx.hasSubs()) {\n        clearTimeout(ctx.get(TICK))\n        ctx.delete(TICK)\n        ctx.delete(HIGH_WATER_MARK)\n      }\n    },\n  }\n\n  return HANDLERS\n}\n\nconst spawnEvents = (\n  fclContext: Pick<FCLContext, \"sdk\" | \"config\">,\n  key?: string\n) => spawn(createHandlers(fclContext), key)\n\nexport function createLegacyEvents(\n  context: Pick<FCLContext, \"sdk\" | \"config\">\n) {\n  /**\n   * @description Subscribe to events\n   * @param key A valid event name\n   * @returns An object with a subscribe method\n   *\n   * @example\n   * import * as fcl from \"@onflow/fcl\"\n   * fcl.events(eventName).subscribe((event) => console.log(event))\n   */\n  function legacyEvents(key: string): SubscribeObject {\n    return {\n      /**\n       * @description Subscribe to events\n       * @param {Function} callback The callback function\n       * @returns {SubscriptionCallback}\n       */\n      subscribe: callback =>\n        subscriber(key, address => spawnEvents(context, address), callback),\n    }\n  }\n\n  return legacyEvents\n}\n"
  },
  {
    "path": "packages/fcl-core/src/exec/args.ts",
    "content": "import {arg} from \"@onflow/sdk\"\nimport * as t from \"@onflow/types\"\n\ntype ArgFn = typeof arg\ntype Types = typeof t\n\n/**\n * @description Type definition for argument functions used to define transaction and script arguments\n *\n * @param arg Argument function to define a single argument\n * @param t Cadence Types object used to define the type\n * @returns Array of arguments\n */\nexport type ArgsFn = (arg: ArgFn, t: Types) => any[]\n"
  },
  {
    "path": "packages/fcl-core/src/exec/mutate.md",
    "content": "# Mutate\n\nProgrammatically mutate state on Flow. A light, stable and approachable higher level wrapper around the transaction variant of the FCL/JS-SDK interaction.\n\n> The primary idea here is to make mutating the state on the Flow Blockchain more approachable by providing an interface that hides most of the complexity. Eventually this way of mutating the chain will be able to pull stored transaction interactions from on chain repositories of scripts/transaction, this interface provides some initial steps/foundation in that direction.\n\n## Status\n\n- **Last Updated:** Aug 17th 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n- **Introduced:** `0.0.73`\n\n## Configuration\n\n`mutate` requires the usage of FCL configuration in order to operate properly.\nYou can learn more about configuring FCL here: [Configure FCL](https://github.com/onflow/flow-js-sdk/blob/master/docs/configure-fcl.mdx)\nConfiguration only needs to happen once, but it must happen before mutate is called. We always recommend configuring FCL as early in your application as possible/reasonable.\n\n`mutate` requires a few pieces of configuration.\n\n- `accessNode.api` - How to talk to Flow.\n- `discovery.wallet` - How to connect to wallets.\n- `flow.network` - which network are you on (\"mainnet\", \"testnet\", etc).\n\nBelow is an example of configuring FCL to talk to Flow (testnet)\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\n// prettier-ignore\nfcl.config()\n  .put(\"accessNode.api\", \"https://rest-testnet.onflow.org\")\n  .put(\"discovery.wallet\", \"https://fcl-discovery.onflow.org/testnet/authn\")\n  .put(\"flow.network\", \"testnet\")\n```\n\n`mutate` also respects [Address Replacement](https://github.com/onflow/flow-js-sdk/blob/master/docs/configure-fcl.mdx#address-replacement-in-scripts-and-transactions) configuration.\nThis allows you to write your cadence with placeholder addresses like `0xProfile` and then configure FCL to replace it with an actual address before it executes the mutation.\n\nIf your cadence includes the following import statement:\n\n```javascript\nimport Profile from 0xProfile\n```\n\nAnd your config includes:\n\n```javascript\nfcl.config().put(\"0xProfile\", \"0xba1132bc08f82fe2\")\n```\n\nThe import at the time of execution will look like this:\n\n```javascript\nimport Profile from 0xba1132bc08f82fe2\n```\n\n## Basic Usage\n\nWe mutate the state on the Flow blockchain by sending a cadence transaction to Flow.\nA transaction has a couple pieces.\n\n- The transaction code (written in Cadence).\n- Arguments to the transaction code.\n- Signatures for three types of signatory roles (Proposer, Payer, Authorizer).\n\nBy default `mutate` is going to default to the current user being responsible for all three signatory roles.\nThis means the current user will act as the proposer, payer and authorizer. You are able to overload this default.\n\nLet's take a look at the following transaction code which transfers FUSD on Flow testnet:\n\n```swift\n  import FungibleToken from 0x9a0766d93b6608b7\n  import FUSD from 0xe223d8a629e49c68\n\n  // A - Transaction Block & Arguments\n  transaction(amount: UFix64, to: Address) {\n    let sentVault: @FungibleToken.Vault\n\n    // B - Prepare statement and AuthAccounts\n    prepare(signer: AuthAccount) {\n      let vaultRef = signer.borrow<&FUSD.Vault>(from: /storage/fusdVault) ?? panic(\"Could not borrow reference to the owner's Vault!\")\n      self.sentVault <- vaultRef.withdraw(amount: amount)\n    }\n\n    execute {\n      let recipient = getAccount(to)\n\n      let receiverRef = recipient\n        .getCapability(/public/fusdReceiver)\n        .borrow<&{FungibleToken.Receiver}>() ?? panic(\"Could not borrow receiver reference to the recipient's Vault\")\n\n      receiverRef.deposit(from: <-self.sentVault)\n    }\n  }\n```\n\nThere is a lot going on in the above transaction code. For the purposes of this document we care about two major pieces as they are the things we will need to deal with when we write our mutation code.\n\n- `A - Transaction Block & Arguments` - This block is what makes it a transaction. We can also see that we will need to pass in two arguments a `UFix64` followed by an `Address`\n- `B - Prepare Statement` - AuthAccounts are what give us access to the valuable things in an accounts storage. We need an AuthAccount to put resources into an accounts storage, interact with resources directly in storage, or remove a resource from storage. We gain access to an AuthAccount by supplying an authorizer. In the above example there is a single AuthAccount, so our transaction will need a single Authorizer, which `mutate` will default to the current user.\n\nWe can then take the above transaction code and bring it into javascript like this:\n\n> Let's transfer `10.0 FUSD` from the current users Flow account to `0xba1132bc08f82fe2`.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nconst transactionId = await fcl.mutate({\n  cadence: `\n    import FungibleToken from 0x9a0766d93b6608b7\n    import FUSD from 0xe223d8a629e49c68\n\n    // A - Transaction Block & Arguments\n    transaction(amount: UFix64, to: Address) {\n      let sentVault: @FungibleToken.Vault\n\n      // B - Prepare statement and AuthAccounts\n      prepare(signer: AuthAccount) {\n        let vaultRef = signer.borrow<&FUSD.Vault>(from: /storage/fusdVault) ?? panic(\"Could not borrow reference to the owner's Vault!\")\n        self.sentVault <- vaultRef.withdraw(amount: amount)\n      }\n\n      execute {\n        let recipient = getAccount(to)\n\n        let receiverRef = recipient\n          .getCapability(/public/fusdReceiver)\n          .borrow<&{FungibleToken.Receiver}>() ?? panic(\"Could not borrow receiver reference to the recipient's Vault\")\n\n        receiverRef.deposit(from: <-self.sentVault)\n      }\n    }\n  `,\n  args: (arg, t) => [\n    arg(\"10.0\", t.UFix64), // Will be the first argument `amount: Ufix64`\n    arg(\"0xba1132bc08f82fe2\", t.Address), // Will be the second argument `to: Address`\n  ],\n})\n```\n\nThe [`query`](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#passing-in-arguments) documentation has some a bunch of information on passing in arguments that is worth a read. It goes into quite a bit more detail.\n\n## Signtures that aren't for the current user. (Node)\n\n`mutate` will default to using the current user for all three signatory roles, but that isn't desired all of the time, for example current user doesn't work with Node at all, so we need a way to enable other entities to fulfill those signatory roles required by the transaction.\nFor something to be able to act as a signatory for a transaction role it requires something called an Authorization Function. Documentation on creating a custom authorization function can be found [here](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/wallet-provider-spec/authorization-function.md).\nOnce you have your custom authorization function you need to configure `mutate` to use it instead.\n\n```javascript\n// Replacing the current user as the default signatory for all three roles\n\nimport * as fcl from \"@onflow/fcl\"\nimport {myCustomAuthzFn} from \"./my-custom-authz-fn\"\n\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) => [arg(\"qvvg\", t.String)],\n  authz: myCustomAuthzFn, // the authz option allows you to overload all three signatory roles at once\n})\n```\n\nAnother option is for you to replace only a single signatory role (ie pay the transaction fees for your users):\n\n```javascript\n// Current user will be proposing and authorizing, but you are paying for the transaction\n\nimport * as fcl from \"@onflow/fcl\"\nimport {myCustomAuthzFn} from \"./my-custom-authz-fn\"\n\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) => [arg(\"qvvg\", t.String)],\n  payer: myCustomAuthzFn, // the payer option allows for you to add your custom authorization logic as the payer only.\n})\n```\n\nProposer works in the same way as payer, the option is `proposer` though, you might want to use a custom proposer if you are wanting to do a lot transactions in parallel as a single account, which can be achieved by making your custom authorizion function cycle through a number of keys on its Flow account.\n\nYou can also overload the authorizations. Like `proposer` and `payer` you will need an authorization function, unlike proposer and payer and similar to arguments there can be more than one, so you need to pass your authorizers in as an array of authorization functions.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport {myCustomAuthzFn} from \"./my-custom-authz-fn\"\n\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) => [arg(\"qvvg\", t.String)],\n  proposer: myCustomAuthzFn,\n  payer: myCustomAuthzFn,\n  authorizations: [myCustomAuthzFn], // its an array.\n})\n```\n\nMore specific options overload less specific options. So `payer` will be used over `authz` which will be used over the default of current user.\n\n## Interaction Templates\n\nIf you have an Interaction Template, you can use it with `mutate`:\n\n### Using Template JSON \n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport myTransactionTemplate from \"transaction-template.json\"\n\nconst txId = await fcl.mutate({\n  template: myTransactionTemplate,\n})\n```\n\n### Using Template URL \n\nIn place of a JSON template, you can specify a URL that points to one, and FCL will retrieve it from the remote location:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nconst txId = await fcl.mutate({\n  template: \"https://interactions.my-project.com/buy-nft\",\n})\n```\n\n`muatate` will use the Interaction Template to carry out it's underlying transaction. Read more on Interaction Templates with FCL [here](https://github.com/onflow/fcl-js/blob/master/docs/reference/interaction-templates.mdx)\n"
  },
  {
    "path": "packages/fcl-core/src/exec/mutate.ts",
    "content": "import type {AccountAuthorization} from \"@onflow/sdk\"\nimport * as sdk from \"@onflow/sdk\"\nimport {CurrentUserService} from \"../current-user\"\nimport {isNumber} from \"../utils/is\"\nimport type {ArgsFn} from \"./args\"\nimport {normalizeArgs} from \"./utils/normalize-args\"\nimport {preMutate} from \"./utils/pre\"\nimport {prepTemplateOpts} from \"./utils/prep-template-opts\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nexport interface MutateOptions {\n  cadence?: string\n  args?: ArgsFn\n  template?: any\n  limit?: number\n  authz?: AccountAuthorization\n  proposer?: AccountAuthorization\n  payer?: AccountAuthorization\n  authorizations?: AccountAuthorization[]\n}\n\n/**\n * @description Factory function that returns a mutate function for a given currentUser.\n *\n * @param currentUserOrConfig CurrentUser actor or configuration\n */\nexport const createMutate = (\n  context: Pick<FCLContext, \"config\" | \"sdk\" | \"currentUser\">\n) => {\n  /**\n   * @description Allows you to submit transactions to the blockchain to potentially mutate the state.\n   *\n   * When being used in the browser, `fcl.mutate` uses the built-in `fcl.authz` function to produce the authorization (signatures) for the current user. When calling this method from Node.js, you will need to supply your own custom authorization function.\n   *\n   * @param opts Mutation options configuration\n   * @param opts.cadence A valid cadence transaction (required)\n   * @param opts.args Any arguments to the script if needed should be supplied via a function that returns an array of arguments\n   * @param opts.limit Compute (Gas) limit for query.\n   * @param opts.proposer The authorization function that returns a valid AuthorizationObject for the proposer role\n   * @param opts.template Interaction Template for a transaction\n   * @param opts.authz Authorization function for transaction\n   * @param opts.payer Payer Authorization function for transaction\n   * @param opts.authorizations Authorizations function for transaction\n   * @returns The transaction ID\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   * // login somewhere before\n   * fcl.authenticate();\n   *\n   * const txId = await fcl.mutate({\n   *   cadence: `\n   *     import Profile from 0xba1132bc08f82fe2\n   *\n   *     transaction(name: String) {\n   *       prepare(account: auth(BorrowValue) &Account) {\n   *         account.storage.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)\n   *       }\n   *     }\n   *   `,\n   *   args: (arg, t) => [arg('myName', t.String)],\n   * });\n   */\n  const mutate = async (opts: MutateOptions = {}): Promise<string> => {\n    var txid\n    try {\n      await preMutate(context, opts)\n      opts = await prepTemplateOpts(context, opts)\n      // Allow for a config to overwrite the authorization function.\n      // prettier-ignore\n      const authz: any = await context\n        .config\n        .get(\"fcl.authz\", context.currentUser.authorization)\n\n      txid = context.sdk\n        .send([\n          sdk.transaction(opts.cadence!),\n\n          sdk.args(normalizeArgs(opts.args || [])),\n\n          opts.limit && isNumber(opts.limit) && (sdk.limit(opts.limit!) as any),\n\n          // opts.proposer > opts.authz > authz\n          sdk.proposer(opts.proposer || opts.authz || authz),\n\n          // opts.payer > opts.authz > authz\n          sdk.payer(opts.payer || opts.authz || authz),\n\n          // opts.authorizations > [opts.authz > authz]\n          sdk.authorizations(opts.authorizations || [opts.authz || authz]),\n        ])\n        .then(context.sdk.decode)\n\n      return txid\n    } catch (error) {\n      throw error\n    }\n  }\n\n  return mutate\n}\n\n/**\n * @description Legacy factory function that creates a mutate function using global FCL context.\n * This function provides backward compatibility for code that was written before the\n * introduction of dependency injection patterns in FCL. It creates a mutate function\n * by combining a partial global context with a provided current user service.\n *\n * This function is considered legacy and should be used primarily for backward compatibility.\n * New code should prefer using the `createMutate` function with a complete FCL context\n * for better testability and dependency management.\n *\n * The function creates a partial context using global configuration and SDK methods,\n * then combines it with the provided current user service to create a fully functional\n * mutate function.\n *\n * @param currentUserOrConfig The current user service instance that provides authentication\n * and authorization capabilities. This service must implement the CurrentUserService interface\n * and provide methods for user authentication, authorization, and session management.\n *\n * @returns A mutate function that can submit transactions to the Flow blockchain.\n * The returned function accepts the same options as the standard mutate function:\n * - cadence: The Cadence transaction code to execute\n * - args: Function that returns transaction arguments\n * - template: Interaction template for standardized transactions\n * - limit: Compute limit for the transaction\n * - authz: Authorization function for all roles\n * - proposer: Specific authorization for proposer role\n * - payer: Specific authorization for payer role\n * - authorizations: Array of authorization functions for authorizer roles\n *\n * @example\n * // Legacy usage with global context\n * import { getMutate } from \"@onflow/fcl-core\"\n * import { getCurrentUser } from \"@onflow/fcl-core\"\n *\n * // Get the current user service\n * const currentUser = getCurrentUser({ platform: \"web\" })\n *\n * // Create mutate function using legacy pattern\n * const mutate = getMutate(currentUser)\n *\n * // Use the mutate function\n * const txId = await mutate({\n *   cadence: `\n *     transaction {\n *       execute { log(\"Hello, Flow!\") }\n *     }\n *   `\n * })\n */\nexport const getMutate = (currentUserOrConfig: CurrentUserService) => {\n  const partialContext = createPartialGlobalFCLContext()\n  const context: Pick<FCLContext, \"config\" | \"sdk\" | \"currentUser\"> = {\n    ...partialContext,\n    currentUser: currentUserOrConfig,\n  }\n  return createMutate(context)\n}\n"
  },
  {
    "path": "packages/fcl-core/src/exec/query-raw.ts",
    "content": "import * as sdk from \"@onflow/sdk\"\nimport type {ArgsFn} from \"./args\"\nimport {normalizeArgs} from \"./utils/normalize-args\"\nimport {preQuery} from \"./utils/pre\"\nimport {prepTemplateOpts} from \"./utils/prep-template-opts\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nexport interface QueryOptions {\n  cadence?: string\n  args?: ArgsFn\n  template?: any\n  isSealed?: boolean\n  limit?: number\n}\n\nexport function createQueryRaw(context: Pick<FCLContext, \"sdk\" | \"config\">) {\n  /**\n   * @description Allows you to submit scripts to query the blockchain and get raw response data.\n   *\n   * @param opts Query Options and configuration\n   * @param opts.cadence Cadence Script used to query Flow\n   * @param opts.args Arguments passed to cadence script\n   * @param opts.template Interaction Template for a script\n   * @param opts.isSealed Block Finality\n   * @param opts.limit Compute Limit for Query\n   * @returns A promise that resolves to the raw query result\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   *\n   * const result = await fcl.queryRaw({\n   *   cadence: `\n   *     access(all) fun main(a: Int, b: Int, addr: Address): Int {\n   *       log(addr)\n   *       return a + b\n   *     }\n   *   `,\n   *   args: (arg, t) => [\n   *     arg(7, t.Int), // a: Int\n   *     arg(6, t.Int), // b: Int\n   *     arg('0xba1132bc08f82fe2', t.Address), // addr: Address\n   *   ],\n   * });\n   */\n  async function queryRaw(opts: QueryOptions = {}): Promise<any> {\n    await preQuery(context, opts)\n    opts = await prepTemplateOpts(context, opts)\n\n    return context.sdk.send([\n      sdk.script(opts.cadence!),\n      sdk.args(normalizeArgs(opts.args || [])),\n      sdk.atLatestBlock(opts.isSealed ?? false),\n      opts.limit &&\n        typeof opts.limit === \"number\" &&\n        (sdk.limit(opts.limit!) as any),\n    ])\n  }\n\n  return queryRaw\n}\n\nexport const queryRaw = /* @__PURE__ */ createQueryRaw(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/exec/query.md",
    "content": "# Query\n\nProgrammatically Query Flow. A light, stable and approachable higher level wrapper around the script variant of the FCL/JS-SDK interaction.\n\n> The primary idea here is to make querying the Flow Blockchain more approachable by providing an interface that hides most of the complexity. Eventually this way of querying the chain will be able to pull stored script interactions from on chain repositories of scripts/transactions, this interface provides some initial steps/foundation in that direction.\n\n## Status\n\n- **Last Updated:** Aug 17th 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n- **Introduced:** `0.0.68`\n\n## Configuration\n\n`query` requires the usage of FCL configuration in order to operate properly.\nYou can learn more about configuring FCL here: [Configure FCL](https://github.com/onflow/flow-js-sdk/blob/master/docs/configure-fcl.mdx)\nConfiguration only needs to happen once, but it must happen before query is called. We always recommend configuring FCL as early in your application as possible/reasonable.\n\nThe main things you will need to configure is are:\n- `accessNode.api` - How to talk to Flow.\n- `flow.network` - which network are you on (\"mainnet\", \"testnet\", etc).\n\nBelow is an example of configuring FCL to talk to Flow (testnet)\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nfcl.config()\n  .put(\"accessNode.api\", \"https://rest-testnet.onflow.org\")\n  .put(\"flow.network\", \"testnet\")\n```\n\n`query` also respects [Address Replacement](https://github.com/onflow/flow-js-sdk/blob/master/docs/configure-fcl.mdx#address-replacement-in-scripts-and-transactions) configuration.\nThis allows you to write your cadence with placeholder addresses like `0xProfile` and then configure FCL to replace it with an actual address before it executes the query.\n\nIf your cadence includes the following import statement:\n\n```javascript\nimport Profile from 0xProfile\n```\n\nAnd your config includes:\n\n```javascript\nfcl.config().put(\"0xProfile\", \"0xba1132bc08f82fe2\")\n```\n\nThe import at the time of execution will look like this:\n\n```javascript\nimport Profile from 0xba1132bc08f82fe2\n```\n\n## Basic Usage\n\nWe query Flow blockchain by sending cadence scripts to them.\nAll queries execute (and must include) a public `main` function.\nWe need to supply this public `main` function to `query` as cadence.\n\nLet's take the following cadence as an example:\n\n> It declares a `main` function that returns a boolean.\n\n```swift\npub fun main(): Bool {\n  return true\n}\n```\n\nWe can query Flow using this cadence like so:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nawait fcl.query({\n  cadence: `\n    pub fun main(): Bool {\n      return true\n    }\n  `,\n})\n```\n\n## Passing in Arguments\n\nOften when querying Flow you will want to change values in the query based on your code.\nWhen you want to do this Arguments are your friend.\n\nArguments are ordered and passed into the public `main` function in your cadence.\nEach argument, to be valid, needs to include two critical pieces of information: its value and its corresponding cadence type (as specified by the public `main` functions).\n\n> `arguments` is a reserved word in javascript so we use `args`\n\nFor the following example we need to pass two numbers and a Flow Address into our query in a way we can use them.\nThe cadence for our query is going to accept these two numbers and address, log out the address and then return back to us the sum of the two numbers, which would look something like this:\n\n```swift\npub fun main(a: Int, b: Int, addr: Address): Int {\n  log(addr)\n  return a + b\n}\n```\n\nJust like before we would pass this to our query function as the `cadence` value, but this time we are also going to include an `args` value, which needs to be a function that returns our arguments in an array ordered by how they are passed into the public `main` function, in this case `[a, b, addr]`.\nThe function will be passed two values (`arg` and `t`) for us to construct our return value in a way that FCL understands.\nThe first value is a function called `arg`, it is going to take our value and our type and build out the underlying argument.\nThe second value is an object that includes a corresponding type constructor for every valid cadence type we can pass in as an argument.\nWriting it out in text makes it so much more complicated than it is, just remember we need to tell the query the order of the arguments (the array) and the type of each argument (`t`), that requires a special data structure that you shouldn't need to care about so that is hidden in a function (`arg`).\n\nAs an example lets look at our first argument passed into the public `main` function (`a: Int`), and say we want its value to be `7`.\nBecause it is the first argument, it should be the first argument returned in the array.\nAlso it has a type of `Int`, so we will need to use `t.Int` to say what type is should be.\n\nWe could then construct the argument like so: `arg(7, t.Int)`.\n\nOur second argument, (say we want it to be `6`) is going to be very similar, the primary exceptions being its value and the fact it should be the second argument in the returned array.\nSo something like this: `arg(6, t.Int)`.\n\nOur third argument, an address this time (we want it to have a value of: `0xba1132bc08f82fe2`), should be the third element in the array and use the `t.Address`, so: `arg(\"0xba1132bc08f82fe2\", t.Address)`\n\nWhen we put them all together our args function needs to return:\n\n```javascript\n;[\n  arg(7, t.Int), // a: Int\n  arg(6, t.Int), // b: Int\n  arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n]\n```\n\nTo bring all this together our query will look like this:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nawait fcl.query({\n  cadence: `\n    pub fun main(a: Int, b: Int, addr: Address): Int {\n      log(addr)\n      return a + b\n    }\n  `,\n  args: (arg, t) => [\n    arg(7, t.Int), // a: Int\n    arg(6, t.Int), // b: Int\n    arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n  ],\n})\n```\n\n## A more real world example\n\nThe above examples are a bit contrived. We tried to distill things down to convey the concepts, but in practice those examples are a bit useless because you could just do them in javascript.\nThe following example should hopefully highlight a bit better what is possible. In this example we are going to point FCL at testnet, and use a profile contract that is deployed there to query a couple Flow accounts that may or may not have Profile resources.\n\nThe first thing we need to do is to configure FCL, as mentioned above this only needs to happen once before we make our first query. In this case we are wanting two configurations values, the access node api and the profile contract address.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\n// prettier-ignore\nfcl.config()\n  .put(\"accessNode.api\", \"https://rest-testnet.onflow.org\")\n  .put(\"0xProfile\", \"0xba1132bc08f82fe2\")\n```\n\nNow that things are configured we can query Flow.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\n// prettier-ignore\nawait fcl.query({\n  cadence: `\n    import Profile from 0xProfile\n\n    pub fun main(addresses: [Address]): {Address: Profile.ReadOnly} {\n      return Profile.readMultiple(addresses)\n    }\n  `,\n\n  args: (arg, t) => [\n    arg([\"0xba1132bc08f82fe2\", \"0xf76a4c54f0f75ce4\", \"0xf117a8efa34ffd58\"], t.Array(t.Address))\n  ]\n})\n```\n\nWhich should return something like this:\n\n> Please note that `0xf117a8efa34ffd58` isn't included because it doesn't have a profile resource.\n\n```javascript\n{\n  0xba1132bc08f82fe2: {\n    address: \"0xba1132bc08f82fe2\",\n    name: \"qvvg\",\n    avatar: \"https://i.imgur.com/r23Zhvu.png\",\n    color: \"tomato\",\n    info: \"Flow Core Team. Creator and Maintainer of FCL and the flow-js-sdk.\",\n    verified: true\n  },\n  0xf76a4c54f0f75ce4: {\n    address: \"0xf76a4c54f0f75ce4\",\n    name: \"Jeff Doyle\",\n    avatar: \"https://avatars.onflow.org/avatar/jeffdoyle\",\n    color: \"#00d9ff\",\n    info: \"Hi, I am Jeff. You know it's me, because I am the only verified Jeff. Jeff!\",\n    verified: true\n  }\n}\n```\n\n## Interaction Templates\n\nIf you have an Interaction Template, you can use it with `query`:\n\n### Using Template JSON \n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport myScriptTemplate from \"script-template.json\"\n\nconst scriptResult = await fcl.query({\n  template: myScriptTemplate,\n})\n```\n\n### Using Template URL \n\nIn place of a JSON template, you can specify a URL that points to one, and FCL will retrieve it from the remote location:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nconst scriptResult = await fcl.mutate({\n  template: \"https://interactions.my-project.com/read-nft\",\n})\n```\n\n`query` will use the Interaction Template to carry out it's underlying script. Read more on Interaction Templates with FCL [here](https://github.com/onflow/fcl-js/blob/master/docs/reference/interaction-templates.mdx)\n\n"
  },
  {
    "path": "packages/fcl-core/src/exec/query.ts",
    "content": "import {createQueryRaw, QueryOptions} from \"./query-raw\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nexport function createQuery(context: Pick<FCLContext, \"sdk\" | \"config\">) {\n  /**\n   * @description Allows you to submit scripts to query the blockchain.\n   *\n   * @param opts Query options configuration\n   * @param opts.cadence A valid cadence script (required)\n   * @param opts.args Any arguments to the script if needed should be supplied via a function that returns an array of arguments\n   * @param opts.limit Compute (Gas) limit for query.\n   * @param opts.template Interaction Template for a script\n   * @param opts.isSealed Block Finality\n   * @returns A JSON representation of the response\n   *\n   * @example\n   * import * as fcl from '@onflow/fcl';\n   *\n   * const result = await fcl.query({\n   *   cadence: `\n   *     access(all) fun main(a: Int, b: Int, addr: Address): Int {\n   *       log(addr)\n   *       return a + b\n   *     }\n   *   `,\n   *   args: (arg, t) => [\n   *     arg(7, t.Int), // a: Int\n   *     arg(6, t.Int), // b: Int\n   *     arg('0xba1132bc08f82fe2', t.Address), // addr: Address\n   *   ],\n   * });\n   * console.log(result); // 13\n   */\n  async function query(opts: QueryOptions = {}): Promise<any> {\n    return createQueryRaw(context)(opts).then(context.sdk.decode)\n  }\n\n  return query\n}\n\nexport const query = /* @__PURE__ */ createQuery(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/exec/utils/normalize-args.ts",
    "content": "import {isFunc} from \"../../utils/is\"\nimport * as sdk from \"@onflow/sdk\"\nimport * as t from \"@onflow/types\"\nimport type {ArgsFn} from \"../args\"\n\n/**\n * @description Normalizes function or array arguments into a standard array format for use with\n * Flow transactions and scripts. If the input is a function, it executes the function with\n * sdk.arg and types as parameters. Otherwise, returns an empty array.\n *\n * @param ax Arguments function, array, or undefined value to normalize\n * @returns Normalized array of arguments ready for use with Flow transactions/scripts\n *\n * @example\n * // Using with function-style arguments\n * const argsFn = (arg, t) => [\n *   arg(\"Hello\", t.String),\n *   arg(42, t.Int)\n * ]\n * const normalized = normalizeArgs(argsFn)\n * // Returns: [{value: \"Hello\", xform: ...}, {value: 42, xform: ...}]\n */\nexport function normalizeArgs(ax: ArgsFn | any[] | undefined): any[] {\n  if (isFunc(ax)) return (ax as ArgsFn)(sdk.arg, t)\n  return []\n}\n"
  },
  {
    "path": "packages/fcl-core/src/exec/utils/pre.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {isRequired, isObject, isString} from \"../../utils/is\"\nimport {FCLContext} from \"../../context\"\n\nexport interface PreOptions {\n  cadence?: string\n  template?: any\n}\n\nasync function pre(\n  context: Pick<FCLContext, \"config\">,\n  type: string,\n  opts: PreOptions\n): Promise<void> {\n  // prettier-ignore\n  invariant(isRequired(opts), `${type}(opts) -- opts is required`)\n  // prettier-ignore\n  invariant(isObject(opts), `${type}(opts) -- opts must be an object`)\n  // prettier-ignore\n  invariant(!(opts.cadence && opts.template), `${type}({ template, cadence }) -- cannot pass both cadence and template`)\n  // prettier-ignore\n  invariant(isRequired(opts.cadence || opts?.template), `${type}({ cadence }) -- cadence is required`)\n  // // prettier-ignore\n  invariant(\n    isString(opts.cadence) || opts?.template,\n    `${type}({ cadence }) -- cadence must be a string`\n  )\n  // prettier-ignore\n  invariant(\n    await context.config.get(\"accessNode.api\"),\n    `${type}(opts) -- Required value for \"accessNode.api\" not defined in config. See: ${\"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration\"}`\n  )\n}\n\n/**\n * @description Validates and prepares options for Flow transaction execution (mutations). This function\n * performs comprehensive validation of the provided options to ensure they meet the requirements for\n * executing transactions on the Flow blockchain, including checking for required configuration values.\n *\n * @param opts Options object containing either Cadence code or template references for the transaction\n * @param opts.cadence Optional Cadence transaction code string\n * @param opts.template Optional interaction template object or reference\n * @returns Promise that resolves when validation passes\n * @throws Error if validation fails or required configuration is missing\n *\n * @example\n * // Validate transaction options with Cadence code\n * await preMutate({\n *   cadence: \"transaction { execute { log(\\\"Hello Flow!\\\") } }\"\n * })\n *\n * // Validate transaction options with template\n * await preMutate({\n *   template: transferFlowTemplate\n * })\n */\nexport async function preMutate(\n  context: {\n    config: FCLContext[\"config\"]\n  },\n  opts: PreOptions\n): Promise<void> {\n  return pre(context, \"mutate\", opts)\n}\n\n/**\n * @description Validates and prepares options for Flow script execution (queries). This function\n * performs comprehensive validation of the provided options to ensure they meet the requirements for\n * executing scripts on the Flow blockchain, including checking for required configuration values.\n *\n * @param opts Options object containing either Cadence code or template references for the script\n * @param opts.cadence Optional Cadence script code string\n * @param opts.template Optional interaction template object or reference\n * @returns Promise that resolves when validation passes\n * @throws Error if validation fails or required configuration is missing\n *\n * @example\n * // Validate script options with Cadence code\n * await preQuery({\n *   cadence: \"access(all) fun main(): String { return \\\"Hello Flow!\\\" }\"\n * })\n *\n * // Validate script options with template\n * await preQuery({\n *   template: getAccountTemplate\n * })\n */\nexport async function preQuery(\n  context: Pick<FCLContext, \"config\">,\n  opts: PreOptions\n): Promise<void> {\n  return pre(context, \"query\", opts)\n}\n"
  },
  {
    "path": "packages/fcl-core/src/exec/utils/prep-template-opts.test.ts",
    "content": "import {prepTemplateOpts} from \"./prep-template-opts\"\nimport {createMockContext} from \"../../test-utils/mock-context\"\n\ndescribe(\"Prepare template options for template version 1.0.0\", () => {\n  // NOTE: template10 and template11 copied from packages\\fcl-core\\src\\interaction-template-utils\\derive-cadence-by-network\\derive-cadence-by-network.test.js\n  const template10 = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.0.0\",\n    id: \"abc123\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: {},\n      cadence: \"import FungibleToken from 0xFUNGIBLETOKENADDRESS\\n\",\n      dependencies: {\n        \"0xFUNGIBLETOKENADDRESS\": {\n          FungibleToken: {\n            mainnet: {\n              address: \"0xf233dcee88fe0abe\",\n              fq_address: \"A.0xf233dcee88fe0abe.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 34166296,\n            },\n            testnet: {\n              address: \"0x9a0766d93b6608b7\",\n              fq_address: \"A.0x9a0766d93b6608b7.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 74776482,\n            },\n          },\n        },\n      },\n      arguments: {},\n    },\n  }\n\n  test(\"It prepares cadence and dependencies from template version 1.0.0 for mainnet\", async () => {\n    // prepTemplateOpts can take chain ID from multiple sources, but config has precedence\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"mainnet\",\n      },\n    })\n\n    const resultMainnet = await prepTemplateOpts(context, {\n      template: template10,\n    })\n\n    expect(resultMainnet.cadence).toEqual(\n      \"import FungibleToken from 0xf233dcee88fe0abe\\n\"\n    )\n  })\n\n  test(\"It prepares cadence and dependencies from template version 1.0.0 for testnet\", async () => {\n    // prepTemplateOpts can take chain ID from multiple sources, but config has precedence\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"testnet\",\n      },\n    })\n\n    const resultTestnet = await prepTemplateOpts(context, {\n      template: template10,\n    })\n\n    expect(resultTestnet.cadence).toEqual(\n      \"import FungibleToken from 0x9a0766d93b6608b7\\n\"\n    )\n  })\n\n  test(\"It fails to prepare cadence and dependencies from template version 1.0.0 for unknown network\", async () => {\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"randomnet\",\n      },\n    })\n\n    const test = async () =>\n      await prepTemplateOpts(context, {\n        template: template10,\n      })\n\n    await expect(test()).rejects.toThrow(Error)\n  })\n})\n\ndescribe(\"Prepare template options for template version 1.1.0\", () => {\n  const template11 = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.1.0\",\n    id: \"3a99af243b85f3f6af28304af2ed53a37fb913782b3efc483e6f0162a47720a0\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: [],\n      cadence: {\n        body: 'import \"FungibleToken\"\\n',\n        network_pins: [\n          {\n            network: \"mainnet\",\n            pin_self:\n              \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n          },\n          {\n            network: \"testnet\",\n            pin_self:\n              \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n          },\n        ],\n      },\n      dependencies: [\n        {\n          contracts: [\n            {\n              contract: \"FungibleToken\",\n              networks: [\n                {\n                  network: \"mainnet\",\n                  address: \"0xf233dcee88fe0abe\",\n                  dependency_pin_block_height: 70493190,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0xf233dcee88fe0abe\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"testnet\",\n                  address: \"0x9a0766d93b6608b7\",\n                  dependency_pin_block_height: 149595558,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0x9a0766d93b6608b7\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"emulator\",\n                  address: \"0xee82856bf20e2aa6\",\n                  dependency_pin_block_height: 0,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      parameters: [],\n    },\n  }\n\n  test(\"It prepares cadence and dependencies from template version 1.1.0 for mainnet\", async () => {\n    // prepTemplateOpts can take chain ID from multiple sources, but config has precedence\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"mainnet\",\n      },\n    })\n\n    const resultMainnet = await prepTemplateOpts(context, {\n      template: template11,\n    })\n\n    expect(resultMainnet.cadence).toEqual(\n      \"import FungibleToken from 0xf233dcee88fe0abe\\n\"\n    )\n  })\n\n  test(\"It prepares cadence and dependencies from template version 1.1.0 for testnet\", async () => {\n    // prepTemplateOpts can take chain ID from multiple sources, but config has precedence\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"testnet\",\n      },\n    })\n\n    const resultTestnet = await prepTemplateOpts(context, {\n      template: template11,\n    })\n\n    expect(resultTestnet.cadence).toEqual(\n      \"import FungibleToken from 0x9a0766d93b6608b7\\n\"\n    )\n  })\n\n  test(\"It fails to prepare cadence and dependencies from template version 1.1.0 for unknown network\", async () => {\n    const context = createMockContext({\n      configValues: {\n        \"flow.network\": \"randomnet\",\n      },\n    })\n\n    const test = async () =>\n      await prepTemplateOpts(context, {\n        template: template11,\n      })\n\n    await expect(test()).rejects.toThrow(Error)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/exec/utils/prep-template-opts.ts",
    "content": "import {retrieve} from \"../../document/document\"\nimport {deriveCadenceByNetwork} from \"../../interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network\"\nimport {isString} from \"../../utils/is\"\nimport {FCLContext} from \"../../context\"\nimport {createGetChainId} from \"../../utils\"\n\nexport interface TemplateOptions {\n  cadence?: string\n  template?: any\n}\n\n/**\n * @description Prepares and processes template options for Flow transactions and scripts. This function handles\n * the resolution of interaction templates by either fetching them from a URL or using provided template data,\n * and derives the appropriate Cadence code based on the current network configuration.\n *\n * @param opts Template options object that can contain either direct Cadence code or template references\n * @param opts.cadence Optional Cadence code string to use directly\n * @param opts.template Optional template object or URL string. If a URL string is provided, the template will be fetched\n * @returns Promise that resolves to the processed template options with resolved Cadence code\n *\n * @example\n * // Prepare template with direct Cadence code\n * const opts = await prepTemplateOpts({\n *   cadence: \"transaction { execute { log(\\\"Hello Flow!\\\") } }\"\n * })\n *\n * // Prepare template from URL\n * const opts = await prepTemplateOpts({\n *   template: \"https://flix.flow.com/v1/templates/transfer-flow\"\n * })\n *\n * // Prepare template with template object\n * const opts = await prepTemplateOpts({\n *   template: {\n *     f_type: \"InteractionTemplate\",\n *     f_version: \"1.1.0\",\n *     id: \"transfer-flow\",\n *     data: { cadence: { \"flow-mainnet\": \"transaction { ... }\" } }\n *   }\n * })\n */\nexport async function prepTemplateOpts(\n  context: Pick<FCLContext, \"config\" | \"sdk\">,\n  opts: TemplateOptions\n): Promise<TemplateOptions> {\n  if (isString(opts?.template)) {\n    opts.template = await retrieve(context, {url: opts?.template})\n  }\n\n  const cadence =\n    opts.cadence ||\n    (await deriveCadenceByNetwork({\n      template: opts.template,\n      network: await createGetChainId(context)(opts),\n    }))\n\n  opts.cadence = cadence\n\n  return opts\n}\n"
  },
  {
    "path": "packages/fcl-core/src/exec/verify.ts",
    "content": "import {log} from \"@onflow/util-logger\"\nimport {verifyUserSignatures as verify} from \"../app-utils\"\n\n/**\n * @description Verify a valid signature/s for an account on Flow.\n * @deprecated since version '1.0.0-alpha.0', use AppUtils.verifyUserSignatures instead\n */\nexport const verifyUserSignatures = log.deprecate({\n  pkg: \"FCL\",\n  subject: \"fcl.verifyUserSignatures()\",\n  message: \"Please use fcl.AppUtils.verifyUserSignatures()\",\n  callback: function verifyUserSignatures(message: any, compSigs: any) {\n    return verify(message, compSigs)\n  },\n})\n"
  },
  {
    "path": "packages/fcl-core/src/fcl-core.ts",
    "content": "export {VERSION} from \"./VERSION\"\nexport {query} from \"./exec/query\"\nexport {queryRaw} from \"./exec/query-raw\"\nexport {verifyUserSignatures} from \"./exec/verify\"\nexport {serialize} from \"./serialize\"\nexport {transaction as tx, TransactionError} from \"./transaction\"\nexport {events} from \"./events\"\nexport {\n  pluginRegistry,\n  getServiceRegistry,\n} from \"./current-user/exec-service/plugins\"\n\nimport {discovery} from \"./discovery\"\nexport {discovery}\n\nimport * as types from \"@onflow/types\"\nexport {types as t}\nexport * from \"@onflow/typedefs\"\n\nimport * as WalletUtils from \"./wallet-utils\"\nexport {WalletUtils}\n\nimport * as AppUtils from \"./app-utils\"\nexport {AppUtils}\n\nimport * as InteractionTemplateUtils from \"./interaction-template-utils\"\nexport {InteractionTemplateUtils}\n\nexport {getChainId} from \"./utils\"\n\nexport {TestUtils} from \"@onflow/sdk\"\n\nimport {config} from \"@onflow/config\"\nexport {config}\n\nexport {send} from \"@onflow/sdk\"\nexport {decode} from \"@onflow/sdk\"\nexport {account} from \"@onflow/sdk\"\nexport {block} from \"@onflow/sdk\"\nexport {nodeVersionInfo} from \"@onflow/sdk\"\nexport {isOk, isBad, why, pipe, build} from \"@onflow/sdk\"\nexport {withPrefix, sansPrefix, display} from \"@onflow/util-address\"\nexport {template as cadence} from \"@onflow/util-template\"\nexport {template as cdc} from \"@onflow/util-template\"\nexport {createSignableVoucher} from \"@onflow/sdk\"\nexport {voucherIntercept} from \"@onflow/sdk\"\nexport {voucherToTxId} from \"@onflow/sdk\"\nexport {flowMainnet, flowTestnet, flowEmulator} from \"@onflow/sdk\"\n\n// builders\nexport {transaction} from \"@onflow/sdk\"\nexport {script} from \"@onflow/sdk\"\nexport {ping} from \"@onflow/sdk\"\nexport {atBlockHeight} from \"@onflow/sdk\"\nexport {atBlockId} from \"@onflow/sdk\"\nexport {getAccount} from \"@onflow/sdk\"\nexport {getEvents} from \"@onflow/sdk\"\nexport {getEventsAtBlockHeightRange} from \"@onflow/sdk\"\nexport {getEventsAtBlockIds} from \"@onflow/sdk\"\nexport {getBlock} from \"@onflow/sdk\"\nexport {getBlockHeader} from \"@onflow/sdk\"\nexport {getCollection} from \"@onflow/sdk\"\nexport {getTransactionStatus} from \"@onflow/sdk\"\nexport {getTransaction} from \"@onflow/sdk\"\nexport {getNetworkParameters} from \"@onflow/sdk\"\nexport {getNodeVersionInfo} from \"@onflow/sdk\"\nexport {authorizations, authorization} from \"@onflow/sdk\"\nexport {subscribeEvents} from \"@onflow/sdk\"\nexport {args, arg} from \"@onflow/sdk\"\nexport {proposer} from \"@onflow/sdk\"\nexport {payer} from \"@onflow/sdk\"\nexport {limit} from \"@onflow/sdk\"\nexport {ref} from \"@onflow/sdk\"\nexport {params, param} from \"@onflow/sdk\"\nexport {validator} from \"@onflow/sdk\"\nexport {invariant} from \"@onflow/sdk\"\n\n// Subscriptions\nexport {subscribe} from \"@onflow/sdk\"\nexport {subscribeRaw} from \"@onflow/sdk\"\n\nimport {watchForChainIdChanges} from \"./utils\"\n\n// Set chain id default on access node change\nwatchForChainIdChanges()\n\nexport {getMutate} from \"./exec/mutate\"\n\nexport {getCurrentUser} from \"./current-user\"\nimport type {CurrentUserConfig, CurrentUserService} from \"./current-user\"\nexport type {CurrentUserConfig, CurrentUserService}\n\nexport {initServiceRegistry} from \"./current-user/exec-service/plugins\"\n\nexport {isReactNative, setIsReactNative} from \"./utils/is-react-native\"\n\nexport {getExecHttpPost} from \"./current-user/exec-service/strategies/http-post\"\n\nexport {normalizePollingResponse} from \"./normalizers/service/polling-response\"\nexport {buildMessageHandler} from \"./current-user/exec-service/strategies/utils/buildMessageHandler\"\nexport {serviceEndpoint} from \"./current-user/exec-service/strategies/utils/service-endpoint\"\nexport {URL} from \"./utils/url\"\nexport {\n  CORE_STRATEGIES,\n  FCL_REDIRECT_URL_PARAM_NAME,\n  FCL_RESPONSE_PARAM_NAME,\n} from \"./utils/constants\"\n\nexport {execStrategy} from \"./current-user/exec-service\"\n\nexport type {StorageProvider} from \"./utils/storage\"\n\nexport type {\n  AccountProofData,\n  VerifySignaturesScriptOptions,\n} from \"./app-utils/verify-signatures\"\n\nexport {\n  createFlowClientCore,\n  type FlowClientCoreConfig,\n  type FlowClientCore,\n} from \"./client\"\n"
  },
  {
    "path": "packages/fcl-core/src/fcl.test.ts",
    "content": "import {serialize} from \"./serialize\"\nimport {\n  authorizations,\n  build,\n  createSignableVoucher,\n  limit,\n  payer,\n  proposer,\n  ref,\n  resolve,\n  transaction,\n} from \"@onflow/sdk\"\n\ntest(\"serialize returns voucher\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 0,\n    sequenceNum: 123,\n  }\n\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(authz),\n      authorizations([authz]),\n      payer(authz as any),\n      ref(\"123\"),\n    ])\n  )\n\n  const voucher = createSignableVoucher(ix)\n\n  const serializedVoucher = await serialize(\n    [\n      transaction``,\n      limit(156),\n      proposer(authz),\n      authorizations([authz]),\n      payer(authz as any),\n      ref(\"123\"),\n    ],\n    {resolve}\n  )\n\n  expect(JSON.parse(serializedVoucher)).toEqual(voucher)\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network-1.0.0.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport type {InteractionTemplate100} from \"../interaction-template\"\n\nexport interface DeriveCadenceByNetwork100Params {\n  network: string\n  template: InteractionTemplate100\n}\n\n/**\n * @description Fills import addresses in Cadence for network\n *\n * @param params\n * @param params.network Network to derive Cadence for\n * @param params.template Interaction Template to derive Cadence from\n * @returns Promise that resolves with the derived Cadence code\n */\nexport async function deriveCadenceByNetwork100({\n  network,\n  template,\n}: DeriveCadenceByNetwork100Params): Promise<string> {\n  invariant(\n    template.f_version === \"1.0.0\",\n    \"deriveCadenceByNetwork100({ template }) -- template must be version 1.0.0\"\n  )\n\n  const networkDependencies: [string, string][] = Object.keys(\n    template?.data?.dependencies\n  ).map((dependencyPlaceholder: string): [string, string] => {\n    const dependencyNetworkContracts = Object.values(\n      template?.data?.dependencies?.[dependencyPlaceholder]\n    )\n\n    invariant(\n      dependencyNetworkContracts !== undefined,\n      `deriveCadenceByNetwork100 -- Could not find contracts for dependency placeholder: ${dependencyPlaceholder}`\n    )\n\n    invariant(\n      dependencyNetworkContracts.length > 0,\n      `deriveCadenceByNetwork100 -- Could not find contracts for dependency placeholder: ${dependencyPlaceholder}`\n    )\n\n    const dependencyContract = dependencyNetworkContracts[0]\n    const dependencyContractForNetwork = dependencyContract?.[network]\n\n    invariant(\n      dependencyContractForNetwork as any,\n      `deriveCadenceByNetwork100 -- Could not find ${network} network information for dependency: ${dependencyPlaceholder}`\n    )\n\n    return [dependencyPlaceholder, dependencyContractForNetwork?.address]\n  })\n\n  return networkDependencies.reduce(\n    (cadence: string, [placeholder, address]: [string, string]) => {\n      const regex = new RegExp(\"(\\\\b\" + placeholder + \"\\\\b)\", \"g\")\n      return cadence.replace(regex, address)\n    },\n    template.data.cadence\n  )\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network-1.1.0.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {replaceStringImports} from \"../utils/replace-string-imports\"\nimport type {InteractionTemplate110} from \"../interaction-template\"\n\nexport interface DeriveCadenceByNetwork110Params {\n  network: string\n  template: InteractionTemplate110\n}\n\n/**\n * @description Fills import addresses in Cadence for network\n *\n * @param params\n * @param params.network Network to derive Cadence for\n * @param params.template Interaction Template to derive Cadence from\n * @returns Promise that resolves with the derived Cadence code\n */\nexport async function deriveCadenceByNetwork110({\n  network,\n  template,\n}: DeriveCadenceByNetwork110Params): Promise<string> {\n  invariant(\n    template.f_version === \"1.1.0\",\n    \"deriveCadenceByNetwork110({ template }) -- template must be version 1.1.0\"\n  )\n\n  // get network dependencies from template dependencies, use new string import format\n  const networkDependencies: Record<string, string> = {}\n\n  template?.data?.dependencies.forEach(dependency => {\n    dependency.contracts.forEach(contract => {\n      const contractName = contract.contract\n      contract.networks.forEach(net => {\n        if (net.network === network) {\n          networkDependencies[contractName] = net.address\n        }\n      })\n\n      invariant(\n        networkDependencies[contractName] !== undefined,\n        `deriveCadenceByNetwork110 -- Could not find contracts Network Address: ${network} ${contractName}`\n      )\n    })\n  })\n\n  invariant(\n    Object.keys(networkDependencies).length ===\n      template?.data?.dependencies.length,\n    `deriveCadenceByNetwork110 -- Could not find contracts for import dependencies: ${networkDependencies}`\n  )\n\n  invariant(\n    Object.keys(networkDependencies).length ===\n      Object.values(networkDependencies).length,\n    `deriveCadenceByNetwork110 -- Could not find all addresses for network ${network} dependencies:  ${networkDependencies}`\n  )\n\n  invariant(\n    !!template?.data?.cadence?.body,\n    `no cadence found -- Could not replace import dependencies: ${networkDependencies}`\n  )\n\n  return replaceStringImports({\n    cadence: template?.data?.cadence?.body,\n    networkDependencies,\n  })\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network.test.ts",
    "content": "import {deriveCadenceByNetwork} from \"./derive-cadence-by-network\"\n\ndescribe(\"Derive cadence by network 1.0.0\", () => {\n  const template: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.0.0\",\n    id: \"abc123\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: {},\n      cadence: \"import FungibleToken from 0xFUNGIBLETOKENADDRESS\\n\",\n      dependencies: {\n        \"0xFUNGIBLETOKENADDRESS\": {\n          FungibleToken: {\n            mainnet: {\n              address: \"0xf233dcee88fe0abe\",\n              fq_address: \"A.0xf233dcee88fe0abe.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 34166296,\n            },\n            testnet: {\n              address: \"0x9a0766d93b6608b7\",\n              fq_address: \"A.0x9a0766d93b6608b7.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 74776482,\n            },\n          },\n        },\n      },\n      arguments: {},\n    },\n  }\n\n  test(\"It derives cadence correctly for a given network\", async () => {\n    const cadence = await deriveCadenceByNetwork({\n      network: \"mainnet\",\n      template,\n    })\n\n    expect(cadence).toEqual(\"import FungibleToken from 0xf233dcee88fe0abe\\n\")\n  })\n\n  test(\"It fails to derive cadence for unknown network\", async () => {\n    await expect(() =>\n      deriveCadenceByNetwork({\n        network: \"randomnet\",\n        template,\n      })\n    ).rejects.toThrow(Error)\n  })\n})\n\ndescribe(\"Derive cadence by network 1.1.0\", () => {\n  const template11: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.1.0\",\n    id: \"3a99af243b85f3f6af28304af2ed53a37fb913782b3efc483e6f0162a47720a0\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: [\n        {\n          key: \"title\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Tokens\",\n            },\n          ],\n        },\n        {\n          key: \"description\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Flow to account\",\n            },\n          ],\n        },\n      ],\n      cadence: {\n        body: 'import \"FungibleToken\"\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}',\n        network_pins: [\n          {\n            network: \"mainnet\",\n            pin_self:\n              \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n          },\n          {\n            network: \"testnet\",\n            pin_self:\n              \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n          },\n        ],\n      },\n      dependencies: [\n        {\n          contracts: [\n            {\n              contract: \"FungibleToken\",\n              networks: [\n                {\n                  network: \"mainnet\",\n                  address: \"0xf233dcee88fe0abe\",\n                  dependency_pin_block_height: 70493190,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0xf233dcee88fe0abe\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"testnet\",\n                  address: \"0x9a0766d93b6608b7\",\n                  dependency_pin_block_height: 149595558,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0x9a0766d93b6608b7\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"emulator\",\n                  address: \"0xee82856bf20e2aa6\",\n                  dependency_pin_block_height: 0,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      parameters: [\n        {\n          label: \"amount\",\n          index: 0,\n          type: \"UFix64\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"Amount\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The amount of FLOW tokens to send\",\n                },\n              ],\n            },\n          ],\n        },\n        {\n          label: \"to\",\n          index: 1,\n          type: \"Address\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"To\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The Flow account the tokens will go to\",\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n  }\n\n  test(\"v1.1.0, It derives cadence correctly for a given network\", async () => {\n    const cadence = await deriveCadenceByNetwork({\n      network: \"mainnet\",\n      template: template11,\n    })\n\n    const expectedCadence = `import FungibleToken from 0xf233dcee88fe0abe\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}`\n    expect(cadence).toEqual(expectedCadence)\n  })\n\n  test(\"v1.1.0, Incorrect template version\", async () => {\n    await expect(() =>\n      deriveCadenceByNetwork({\n        network: \"mainnet\",\n        template: {f_type: \"InteractionTemplate\", f_version: \"0.0.0\"} as any,\n      })\n    ).rejects.toThrow(Error)\n  })\n\n  test(\"v1.1.0, It fails to derive cadence for unknown network\", async () => {\n    await expect(() =>\n      deriveCadenceByNetwork({\n        network: \"randomnet\",\n        template: template11,\n      })\n    ).rejects.toThrow(Error)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {deriveCadenceByNetwork100} from \"./derive-cadence-by-network-1.0.0\"\nimport {deriveCadenceByNetwork110} from \"./derive-cadence-by-network-1.1.0\"\nimport type {InteractionTemplate} from \"../interaction-template\"\n\nexport interface DeriveCadenceByNetworkParams {\n  network: string\n  template: InteractionTemplate\n}\n\n/**\n * @description Fills import addresses in Cadence for network\n *\n * @param params\n * @param params.network Network to derive Cadence for\n * @param params.template Interaction Template to derive Cadence from\n * @returns Promise that resolves with the derived Cadence code\n */\nexport async function deriveCadenceByNetwork({\n  network,\n  template,\n}: DeriveCadenceByNetworkParams): Promise<string> {\n  invariant(\n    network != undefined,\n    \"deriveCadenceByNetwork({ network }) -- network must be defined\"\n  )\n  invariant(\n    typeof network === \"string\",\n    \"deriveCadenceByNetwork({ network }) -- network must be a string\"\n  )\n\n  invariant(\n    template != undefined,\n    \"deriveCadenceByNetwork({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"deriveCadenceByNetwork({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"deriveCadenceByNetwork({ template }) -- template must be an InteractionTemplate\"\n  )\n\n  switch (template.f_version) {\n    case \"1.1.0\":\n      return await deriveCadenceByNetwork110({network, template})\n    case \"1.0.0\":\n      return await deriveCadenceByNetwork100({network, template})\n    default:\n      throw new Error(\n        \"deriveCadenceByNetwork Error: Unsupported template version\"\n      )\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin-1.0.0.ts",
    "content": "import {invariant, getAccount} from \"@onflow/sdk\"\nimport {genHash} from \"../utils/hash\"\nimport {findImports} from \"../utils/find-imports\"\nimport {generateImport} from \"../utils/generate-import\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\nexport interface GenerateDependencyPin100Params {\n  address: string\n  contractName: string\n}\n\nexport function creategenerateDependencyPin100(\n  context: Pick<FCLContext, \"config\" | \"sdk\">\n) {\n  /**\n   * @description Produces a dependency pin for a contract at current state of chain\n   * @param params\n   * @param params.address The address of the account containing the contract\n   * @param params.contractName The name of the contract\n   * @param opts Options to pass to the interaction\n   * @returns The dependency pin\n   */\n  async function generateDependencyPin100(\n    {address, contractName}: GenerateDependencyPin100Params,\n    opts: any = {}\n  ): Promise<string> {\n    invariant(\n      address != undefined,\n      \"generateDependencyPin({ address }) -- address must be defined\"\n    )\n    invariant(\n      contractName != undefined,\n      \"generateDependencyPin({ contractName }) -- contractName must be defined\"\n    )\n    invariant(\n      typeof address === \"string\",\n      \"generateDependencyPin({ address }) -- address must be a string\"\n    )\n    invariant(\n      typeof contractName === \"string\",\n      \"generateDependencyPin({ contractName }) -- contractName must be a string\"\n    )\n\n    const horizon: any = [generateImport({contractName, address})]\n\n    for (const horizonImport of horizon) {\n      const account = await context.sdk\n        .send(\n          [\n            getAccount(\n              await context.config.get(\n                horizonImport.address,\n                horizonImport.address\n              )\n            ),\n          ],\n          opts\n        )\n        .then(context.sdk.decode)\n\n      horizonImport.contract = account.contracts?.[horizonImport.contractName]\n\n      if (!horizonImport.contract) {\n        console.error(\"Did not find expected contract\", horizonImport, account)\n        throw new Error(\"Did not find expected contract\")\n      }\n\n      const contractImports = findImports(horizonImport.contract)\n\n      horizon.push(...contractImports)\n    }\n\n    const contractHashes = horizon.map((iport: any) => genHash(iport.contract))\n\n    const contractHashesJoined = contractHashes.join(\"\")\n\n    return genHash(contractHashesJoined)\n  }\n\n  return generateDependencyPin100\n}\n\nexport const generateDependencyPin100 =\n  /* @__PURE__ */ creategenerateDependencyPin100(\n    createPartialGlobalFCLContext()\n  )\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin-1.1.0.ts",
    "content": "import {invariant, getAccount} from \"@onflow/sdk\"\nimport {genHash} from \"../utils/hash\"\nimport {findImports} from \"../utils/find-imports\"\nimport {generateImport} from \"../utils/generate-import\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\nexport interface GenerateDependencyPin110Params {\n  address: string\n  contractName: string\n  blockHeight?: number\n}\n\nexport function createGenerateDependencyPin110(\n  context: Pick<FCLContext, \"config\" | \"sdk\">\n) {\n  /**\n   * @description Produces a dependency pin for a contract at current state of chain\n   * @param params\n   * @param params.address The address of the account containing the contract\n   * @param params.contractName The name of the contract\n   * @param params.blockHeight The block height to generate the dependency pin at\n   * @param opts Options to pass to the interaction\n   * @returns The dependency pin\n   */\n  async function generateDependencyPin110(\n    {address, contractName}: GenerateDependencyPin110Params,\n    opts: any = {}\n  ): Promise<string> {\n    invariant(\n      address != undefined,\n      \"generateDependencyPin({ address }) -- address must be defined\"\n    )\n    invariant(\n      contractName != undefined,\n      \"generateDependencyPin({ contractName }) -- contractName must be defined\"\n    )\n    invariant(\n      typeof address === \"string\",\n      \"generateDependencyPin({ address }) -- address must be a string\"\n    )\n    invariant(\n      typeof contractName === \"string\",\n      \"generateDependencyPin({ contractName }) -- contractName must be a string\"\n    )\n\n    const horizon: any = [generateImport({contractName, address})]\n\n    for (const horizonImport of horizon) {\n      const account = await context.sdk\n        .send(\n          [\n            getAccount(\n              await context.config.get(\n                horizonImport.address,\n                horizonImport.address\n              )\n            ),\n          ],\n          opts\n        )\n        .then(context.sdk.decode)\n\n      horizonImport.contract = account.contracts?.[horizonImport.contractName]\n\n      if (!horizonImport.contract) {\n        console.error(\"Did not find expected contract\", horizonImport, account)\n        throw new Error(\"Did not find expected contract\")\n      }\n\n      const contractImports = findImports(horizonImport.contract)\n\n      horizon.push(...contractImports)\n    }\n\n    const contractPinSelfHashesPromises = horizon.map((iport: any) =>\n      genHash(iport.contract)\n    )\n    // genHash returns a promise, so we need to await the results of all the promises\n    const contractPinSelfHashes = await Promise.all(\n      contractPinSelfHashesPromises\n    )\n    const contractPinHashes = contractPinSelfHashes.join(\"\")\n\n    return genHash(contractPinHashes)\n  }\n\n  return generateDependencyPin110\n}\n\nexport const generateDependencyPin110 =\n  /* @__PURE__ */ createGenerateDependencyPin110(\n    createPartialGlobalFCLContext()\n  )\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin.test.ts",
    "content": "import {config} from \"@onflow/config\"\nimport {generateDependencyPin110} from \"./generate-dependency-pin-1.1.0\"\n\nconst returnedAccount = {\n  address: \"0xf233dcee88fe0abe\",\n  keys: [],\n  balance: \"10\",\n  contracts: {\n    FungibleToken: `/**\n\n# The Flow Fungible Token standard\n\n## \\`FungibleToken\\` contract interface\n\nThe interface that all Fungible Token contracts would have to conform to.\nIf a users wants to deploy a new token contract, their contract\nwould need to implement the FungibleToken interface.\n\nTheir contract would have to follow all the rules and naming\nthat the interface specifies.\n\n## \\`Vault\\` resource\n\nEach account that owns tokens would need to have an instance\nof the Vault resource stored in their account storage.\n\nThe Vault resource has methods that the owner and other users can call.\n\n## \\`Provider\\`, \\`Receiver\\`, and \\`Balance\\` resource interfaces\n\nThese interfaces declare pre-conditions and post-conditions that restrict\nthe execution of the functions in the Vault.\n\nThey are separate because it gives the user the ability to share\na reference to their Vault that only exposes the fields functions\nin one or more of the interfaces.\n\nIt also gives users the ability to make custom resources that implement\nthese interfaces to do various things with the tokens.\nFor example, a faucet can be implemented by conforming\nto the Provider interface.\n\nBy using resources and interfaces, users of Fungible Token contracts\ncan send and receive tokens peer-to-peer, without having to interact\nwith a central ledger smart contract. To send tokens to another user,\na user would simply withdraw the tokens from their Vault, then call\nthe deposit function on another user's Vault to complete the transfer.\n\n*/\n\n/// The interface that Fungible Token contracts implement.\n///\npub contract interface FungibleToken {\n\n    /// The total number of tokens in existence.\n    /// It is up to the implementer to ensure that the total supply\n    /// stays accurate and up to date\n    pub var totalSupply: UFix64\n\n    /// The event that is emitted when the contract is created\n    pub event TokensInitialized(initialSupply: UFix64)\n\n    /// The event that is emitted when tokens are withdrawn from a Vault\n    pub event TokensWithdrawn(amount: UFix64, from: Address?)\n\n    /// The event that is emitted when tokens are deposited into a Vault\n    pub event TokensDeposited(amount: UFix64, to: Address?)\n\n    /// The interface that enforces the requirements for withdrawing\n    /// tokens from the implementing type.\n    ///\n    /// It does not enforce requirements on \\`balance\\` here,\n    /// because it leaves open the possibility of creating custom providers\n    /// that do not necessarily need their own balance.\n    ///\n    pub resource interface Provider {\n\n        /// Subtracts tokens from the owner's Vault\n        /// and returns a Vault with the removed tokens.\n        ///\n        /// The function's access level is public, but this is not a problem\n        /// because only the owner storing the resource in their account\n        /// can initially call this function.\n        ///\n        /// The owner may grant other accounts access by creating a private\n        /// capability that allows specific other users to access\n        /// the provider resource through a reference.\n        ///\n        /// The owner may also grant all accounts access by creating a public\n        /// capability that allows all users to access the provider\n        /// resource through a reference.\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        /// \n        pub fun withdraw(amount: UFix64): @Vault {\n            post {\n                // \\`result\\` refers to the return value\n                result.balance == amount:\n                    \"Withdrawal amount must be the same as the balance of the withdrawn Vault\"\n            }\n        }\n    }\n\n    /// The interface that enforces the requirements for depositing\n    /// tokens into the implementing type.\n    ///\n    /// We do not include a condition that checks the balance because\n    /// we want to give users the ability to make custom receivers that\n    /// can do custom things with the tokens, like split them up and\n    /// send them to different places.\n    ///\n    pub resource interface Receiver {\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault)\n\n        /// Below is referenced from the FLIP #69 https://github.com/onflow/flips/blob/main/flips/20230206-fungible-token-vault-type-discovery.md\n        /// \n        /// Returns the dictionary of Vault types that the the receiver is able to accept in its \\`deposit\\` method\n        /// this then it would return \\`{Type<@FlowToken.Vault>(): true}\\` and if any custom receiver\n        /// uses the default implementation then it would return empty dictionary as its parent\n        /// resource doesn't conform with the \\`FungibleToken.Vault\\` resource.\n        ///\n        /// Custom receiver implementations are expected to upgrade their contracts to add an implementation\n        /// that supports this method because it is very valuable for various applications to have.\n        ///\n        /// @return dictionary of supported deposit vault types by the implementing resource.\n        /// \n        pub fun getSupportedVaultTypes(): {Type: Bool} {\n            // Below check is implemented to make sure that run-time type would\n            // only get returned when the parent resource conforms with \\`FungibleToken.Vault\\`. \n            if self.getType().isSubtype(of: Type<@FungibleToken.Vault>()) {\n                return {self.getType(): true}\n            } else {\n                // Return an empty dictionary as the default value for resource who don't\n                // implement \\`FungibleToken.Vault\\`, such as \\`FungibleTokenSwitchboard\\`, \\`TokenForwarder\\` etc.\n                return {}\n            }\n        }\n    }\n\n    /// The interface that contains the \\`balance\\` field of the Vault\n    /// and enforces that when new Vaults are created, the balance\n    /// is initialized correctly.\n    ///\n    pub resource interface Balance {\n\n        /// The total balance of a vault\n        ///\n        pub var balance: UFix64\n\n        init(balance: UFix64) {\n            post {\n                self.balance == balance:\n                    \"Balance must be initialized to the initial balance\"\n            }\n        }\n\n        /// Function that returns all the Metadata Views implemented by a Fungible Token\n        ///\n        /// @return An array of Types defining the implemented views. This value will be used by\n        ///         developers to know which parameter to pass to the resolveView() method.\n        ///\n        pub fun getViews(): [Type] {\n            return []\n        }\n\n        /// Function that resolves a metadata view for this fungible token by type.\n        ///\n        /// @param view: The Type of the desired view.\n        /// @return A structure representing the requested view.\n        ///\n        pub fun resolveView(_ view: Type): AnyStruct? {\n            return nil\n        }\n    }\n\n    /// The resource that contains the functions to send and receive tokens.\n    /// The declaration of a concrete type in a contract interface means that\n    /// every Fungible Token contract that implements the FungibleToken interface\n    /// must define a concrete \\`Vault\\` resource that conforms to the \\`Provider\\`, \\`Receiver\\`,\n    /// and \\`Balance\\` interfaces, and declares their required fields and functions\n    ///\n    pub resource Vault: Provider, Receiver, Balance {\n\n        /// The total balance of the vault\n        pub var balance: UFix64\n\n        // The conforming type must declare an initializer\n        // that allows providing the initial balance of the Vault\n        //\n        init(balance: UFix64)\n\n        /// Subtracts \\`amount\\` from the Vault's balance\n        /// and returns a new Vault with the subtracted balance\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        ///\n        pub fun withdraw(amount: UFix64): @Vault {\n            pre {\n                self.balance >= amount:\n                    \"Amount withdrawn must be less than or equal than the balance of the Vault\"\n            }\n            post {\n                // use the special function \\`before\\` to get the value of the \\`balance\\` field\n                // at the beginning of the function execution\n                //\n                self.balance == before(self.balance) - amount:\n                    \"New Vault balance must be the difference of the previous balance and the withdrawn Vault\"\n            }\n        }\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault) {\n            // Assert that the concrete type of the deposited vault is the same\n            // as the vault that is accepting the deposit\n            pre {\n                from.isInstance(self.getType()): \n                    \"Cannot deposit an incompatible token type\"\n            }\n            post {\n                self.balance == before(self.balance) + before(from.balance):\n                    \"New Vault balance must be the sum of the previous balance and the deposited Vault\"\n            }\n        }\n    }\n\n    /// Allows any user to create a new Vault that has a zero balance\n    ///\n    /// @return The new Vault resource\n    ///\n    pub fun createEmptyVault(): @Vault {\n        post {\n            result.balance == 0.0: \"The newly created Vault must have zero balance\"\n        }\n    }\n}\n`,\n  },\n  code: null,\n}\n\njest.mock(\"@onflow/sdk\", () => ({\n  send: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    const sanitized = returnedAccount.contracts.FungibleToken.replace(/\\\\/g, \"\")\n    returnedAccount.contracts.FungibleToken = sanitized\n    return Promise.resolve(returnedAccount)\n  }),\n  getAccount: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return Promise.resolve({data: returnedAccount})\n  }),\n  invariant: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return\n  }),\n  config: jest.fn().mockImplementation(() => {\n    // Adjusted mock implementation\n    return {\n      get: jest.fn().mockImplementation(() => {\n        // Adjusted mock implementation\n        return Promise.resolve(\"0xf233dcee88fe0abe\")\n      }),\n    }\n  }),\n}))\n\ndescribe(\"1.1.0, generate dependency pin\", () => {\n  let warnSpy: jest.SpyInstance\n\n  beforeAll(() => {\n    warnSpy = jest.spyOn(console, \"warn\").mockImplementation(() => {})\n  })\n\n  afterAll(() => {\n    warnSpy.mockRestore()\n  })\n\n  test(\"v1.1.0, get dependency pin\", async () => {\n    const pin =\n      \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\"\n\n    config.put(\"flow.network\", \"mainnet\")\n    config.put(\"accessNode.api\", \"https://rest-mainnet.onflow.org\")\n\n    const depPin = await generateDependencyPin110({\n      address: \"0xf233dcee88fe0abe\",\n      contractName: \"FungibleToken\",\n    })\n\n    expect(depPin).toEqual(pin)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin.ts",
    "content": "import {block, invariant} from \"@onflow/sdk\"\nimport {generateDependencyPin110} from \"./generate-dependency-pin-1.1.0\"\nimport {generateDependencyPin100} from \"./generate-dependency-pin-1.0.0\"\n\nexport interface GenerateDependencyPinParams {\n  version?: string\n  address: string\n  contractName: string\n  blockHeight?: number\n}\n\n/**\n * @description Generates a dependency pin for a smart contract on the Flow blockchain. A dependency\n * pin is a cryptographic hash that uniquely identifies a specific version of a contract at a particular\n * state. This is used in Interaction Templates to ensure consistent behavior by pinning to specific\n * contract versions and preventing issues from contract updates.\n *\n * @param params\n * @param params.version The version of the interaction template (e.g., \"1.0.0\", \"1.1.0\")\n * @param params.address The Flow account address containing the contract (with or without 0x prefix)\n * @param params.contractName The name of the contract to generate a pin for\n * @param params.blockHeight Optional specific block height to pin to\n * @param opts Additional options to pass to the underlying interaction\n *\n * @returns Promise that resolves to the dependency pin as a string\n *\n * @throws If required parameters are missing or invalid, or if the template version is unsupported\n *\n * @example\n * // Generate dependency pin for a contract at current state\n * import * as fcl from \"@onflow/fcl\"\n *\n * const dependencyPin = await fcl.InteractionTemplateUtils.generateDependencyPin({\n *   version: \"1.1.0\",\n *   address: \"0x1654653399040a61\",\n *   contractName: \"FlowToken\"\n * })\n */\nexport async function generateDependencyPin(\n  {version, address, contractName}: GenerateDependencyPinParams,\n  opts: any = {}\n): Promise<string> {\n  invariant(\n    address != undefined,\n    \"generateDependencyPin({ address }) -- address must be defined\"\n  )\n  invariant(\n    contractName != undefined,\n    \"generateDependencyPin({ contractName }) -- contractName must be defined\"\n  )\n  invariant(\n    typeof address === \"string\",\n    \"generateDependencyPin({ address }) -- address must be a string\"\n  )\n  invariant(\n    typeof contractName === \"string\",\n    \"generateDependencyPin({ contractName }) -- contractName must be a string\"\n  )\n\n  switch (version) {\n    case \"1.1.0\":\n      return await generateDependencyPin110({address, contractName})\n    case \"1.0.0\":\n      return await generateDependencyPin100({address, contractName})\n    default:\n      throw new Error(\n        \"deriveCadenceByNetwork Error: Unsupported template version\"\n      )\n  }\n}\n\n/**\n * @description Generates a dependency pin for a smart contract at the latest sealed block on the Flow\n * blockchain. This variant ensures the pin is generated against the most recent finalized state of the\n * network, providing consistency and avoiding issues with pending transactions affecting the pin generation.\n *\n * @param params\n * @param params.version The version of the interaction template (e.g., \"1.0.0\", \"1.1.0\")\n * @param params.address The Flow account address containing the contract (with or without 0x prefix)\n * @param params.contractName The name of the contract to generate a pin for\n * @param params.blockHeight This parameter is ignored as the function always uses latest sealed block\n * @param opts Additional options to pass to the underlying interaction\n *\n * @returns Promise that resolves to the dependency pin as a string\n *\n * @throws If required parameters are missing or invalid, template version is unsupported,\n * or if unable to fetch the latest sealed block\n *\n * @example\n * // Generate dependency pin at latest sealed block\n * import * as fcl from \"@onflow/fcl\"\n *\n * const dependencyPin = await fcl.InteractionTemplateUtils.generateDependencyPinAtLatestSealedBlock({\n *   version: \"1.1.0\",\n *   address: \"0x1654653399040a61\",\n *   contractName: \"FlowToken\"\n * })\n */\nexport async function generateDependencyPinAtLatestSealedBlock(\n  {version, address, contractName}: GenerateDependencyPinParams,\n  opts: any = {}\n): Promise<string> {\n  const latestSealedBlock = await block({sealed: true}, opts)\n  const latestSealedBlockHeight = latestSealedBlock?.height\n\n  return generateDependencyPin(\n    {version, address, contractName, blockHeight: latestSealedBlockHeight},\n    opts\n  )\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id-1.0.0.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {encode as rlpEncode} from \"@onflow/rlp\"\nimport {genHash} from \"../utils/hash\"\nimport type {InteractionTemplate100} from \"../interaction-template\"\n\nexport interface GenerateTemplateId100Params {\n  template: InteractionTemplate100\n}\n\n/**\n * @description Generates Interaction Template ID for a given Interaction Template\n *\n * @param params\n * @param params.template Interaction Template\n * @returns Interaction Template ID\n */\nexport async function generateTemplateId({\n  template,\n}: GenerateTemplateId100Params): Promise<string> {\n  invariant(\n    !!template,\n    \"generateTemplateId({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"generateTemplateId({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"generateTemplateId({ template }) -- template object must be an InteractionTemplate\"\n  )\n  invariant(\n    template.f_version === \"1.0.0\",\n    \"generateTemplateId({ template }) -- template object must be an version 1.0.0\"\n  )\n\n  const templateData = template.data\n\n  const messages = await Promise.all(\n    Object.keys(templateData.messages).map(async messageKey => [\n      genHash(messageKey),\n      await Promise.all(\n        Object.keys(templateData.messages?.[messageKey]?.i18n).map(\n          async i18nkeylanguage => [\n            genHash(i18nkeylanguage),\n            genHash(\n              templateData.messages?.[messageKey]?.i18n?.[i18nkeylanguage]\n            ),\n          ]\n        )\n      ),\n    ])\n  )\n\n  const dependencies = await Promise.all(\n    Object.keys(templateData?.dependencies).map(\n      async dependencyAddressPlaceholder => [\n        genHash(dependencyAddressPlaceholder),\n        await Promise.all(\n          Object.keys(\n            templateData?.dependencies?.[dependencyAddressPlaceholder]\n          ).map(async dependencyContract => [\n            genHash(dependencyContract),\n            await Promise.all(\n              Object.keys(\n                templateData?.dependencies?.[dependencyAddressPlaceholder]?.[\n                  dependencyContract\n                ]\n              ).map(async dependencyContractNetwork => [\n                genHash(dependencyContractNetwork),\n                [\n                  genHash(\n                    templateData?.dependencies?.[\n                      dependencyAddressPlaceholder\n                    ]?.[dependencyContract]?.[dependencyContractNetwork].address\n                  ),\n                  genHash(\n                    templateData?.dependencies?.[\n                      dependencyAddressPlaceholder\n                    ]?.[dependencyContract]?.[dependencyContractNetwork]\n                      .contract\n                  ),\n                  genHash(\n                    templateData?.dependencies?.[\n                      dependencyAddressPlaceholder\n                    ]?.[dependencyContract]?.[dependencyContractNetwork]\n                      .fq_address\n                  ),\n                  genHash(\n                    templateData?.dependencies?.[\n                      dependencyAddressPlaceholder\n                    ]?.[dependencyContract]?.[dependencyContractNetwork].pin\n                  ),\n                  genHash(\n                    String(\n                      templateData?.dependencies?.[\n                        dependencyAddressPlaceholder\n                      ]?.[dependencyContract]?.[dependencyContractNetwork]\n                        .pin_block_height\n                    )\n                  ),\n                ],\n              ])\n            ),\n          ])\n        ),\n      ]\n    )\n  )\n\n  const _arguments = await Promise.all(\n    Object.keys(templateData?.[\"arguments\"]).map(async argumentLabel => [\n      genHash(argumentLabel),\n      [\n        genHash(String(templateData?.[\"arguments\"]?.[argumentLabel].index)),\n        genHash(templateData?.[\"arguments\"]?.[argumentLabel].type),\n        genHash(templateData?.[\"arguments\"]?.[argumentLabel].balance || \"\"),\n        await Promise.all(\n          Object.keys(\n            templateData?.[\"arguments\"]?.[argumentLabel].messages\n          ).map(async argumentMessageKey => [\n            genHash(argumentMessageKey),\n            await Promise.all(\n              Object.keys(\n                templateData?.[\"arguments\"]?.[argumentLabel].messages?.[\n                  argumentMessageKey\n                ].i18n\n              ).map(async i18nkeylanguage => [\n                genHash(i18nkeylanguage),\n                genHash(\n                  templateData?.[\"arguments\"]?.[argumentLabel].messages?.[\n                    argumentMessageKey\n                  ].i18n?.[i18nkeylanguage]\n                ),\n              ])\n            ),\n          ])\n        ),\n      ],\n    ])\n  )\n\n  const encodedHex = rlpEncode([\n    genHash(\"InteractionTemplate\"),\n    genHash(\"1.0.0\"),\n    genHash(templateData?.type),\n    genHash(templateData?.interface),\n    messages,\n    genHash(templateData?.cadence),\n    dependencies,\n    _arguments,\n  ]).toString(\"hex\")\n\n  return genHash(encodedHex)\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id-1.1.0.test.ts",
    "content": "import {generateTemplateId} from \"./generate-template-id\"\nimport {replaceStringImports} from \"../utils/replace-string-imports\"\nimport {genHash} from \"../utils/hash\"\n\nconst returnedAccount = {\n  address: \"0xf233dcee88fe0abe\",\n  keys: [],\n  balance: \"10\",\n  contracts: {\n    FungibleToken: `/**\n\n# The Flow Fungible Token standard\n\n## \\`FungibleToken\\` contract interface\n\nThe interface that all Fungible Token contracts would have to conform to.\nIf a users wants to deploy a new token contract, their contract\nwould need to implement the FungibleToken interface.\n\nTheir contract would have to follow all the rules and naming\nthat the interface specifies.\n\n## \\`Vault\\` resource\n\nEach account that owns tokens would need to have an instance\nof the Vault resource stored in their account storage.\n\nThe Vault resource has methods that the owner and other users can call.\n\n## \\`Provider\\`, \\`Receiver\\`, and \\`Balance\\` resource interfaces\n\nThese interfaces declare pre-conditions and post-conditions that restrict\nthe execution of the functions in the Vault.\n\nThey are separate because it gives the user the ability to share\na reference to their Vault that only exposes the fields functions\nin one or more of the interfaces.\n\nIt also gives users the ability to make custom resources that implement\nthese interfaces to do various things with the tokens.\nFor example, a faucet can be implemented by conforming\nto the Provider interface.\n\nBy using resources and interfaces, users of Fungible Token contracts\ncan send and receive tokens peer-to-peer, without having to interact\nwith a central ledger smart contract. To send tokens to another user,\na user would simply withdraw the tokens from their Vault, then call\nthe deposit function on another user's Vault to complete the transfer.\n\n*/\n\n/// The interface that Fungible Token contracts implement.\n///\npub contract interface FungibleToken {\n\n    /// The total number of tokens in existence.\n    /// It is up to the implementer to ensure that the total supply\n    /// stays accurate and up to date\n    pub var totalSupply: UFix64\n\n    /// The event that is emitted when the contract is created\n    pub event TokensInitialized(initialSupply: UFix64)\n\n    /// The event that is emitted when tokens are withdrawn from a Vault\n    pub event TokensWithdrawn(amount: UFix64, from: Address?)\n\n    /// The event that is emitted when tokens are deposited into a Vault\n    pub event TokensDeposited(amount: UFix64, to: Address?)\n\n    /// The interface that enforces the requirements for withdrawing\n    /// tokens from the implementing type.\n    ///\n    /// It does not enforce requirements on \\`balance\\` here,\n    /// because it leaves open the possibility of creating custom providers\n    /// that do not necessarily need their own balance.\n    ///\n    pub resource interface Provider {\n\n        /// Subtracts tokens from the owner's Vault\n        /// and returns a Vault with the removed tokens.\n        ///\n        /// The function's access level is public, but this is not a problem\n        /// because only the owner storing the resource in their account\n        /// can initially call this function.\n        ///\n        /// The owner may grant other accounts access by creating a private\n        /// capability that allows specific other users to access\n        /// the provider resource through a reference.\n        ///\n        /// The owner may also grant all accounts access by creating a public\n        /// capability that allows all users to access the provider\n        /// resource through a reference.\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        /// \n        pub fun withdraw(amount: UFix64): @Vault {\n            post {\n                // \\`result\\` refers to the return value\n                result.balance == amount:\n                    \"Withdrawal amount must be the same as the balance of the withdrawn Vault\"\n            }\n        }\n    }\n\n    /// The interface that enforces the requirements for depositing\n    /// tokens into the implementing type.\n    ///\n    /// We do not include a condition that checks the balance because\n    /// we want to give users the ability to make custom receivers that\n    /// can do custom things with the tokens, like split them up and\n    /// send them to different places.\n    ///\n    pub resource interface Receiver {\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault)\n\n        /// Below is referenced from the FLIP #69 https://github.com/onflow/flips/blob/main/flips/20230206-fungible-token-vault-type-discovery.md\n        /// \n        /// Returns the dictionary of Vault types that the the receiver is able to accept in its \\`deposit\\` method\n        /// this then it would return \\`{Type<@FlowToken.Vault>(): true}\\` and if any custom receiver\n        /// uses the default implementation then it would return empty dictionary as its parent\n        /// resource doesn't conform with the \\`FungibleToken.Vault\\` resource.\n        ///\n        /// Custom receiver implementations are expected to upgrade their contracts to add an implementation\n        /// that supports this method because it is very valuable for various applications to have.\n        ///\n        /// @return dictionary of supported deposit vault types by the implementing resource.\n        /// \n        pub fun getSupportedVaultTypes(): {Type: Bool} {\n            // Below check is implemented to make sure that run-time type would\n            // only get returned when the parent resource conforms with \\`FungibleToken.Vault\\`. \n            if self.getType().isSubtype(of: Type<@FungibleToken.Vault>()) {\n                return {self.getType(): true}\n            } else {\n                // Return an empty dictionary as the default value for resource who don't\n                // implement \\`FungibleToken.Vault\\`, such as \\`FungibleTokenSwitchboard\\`, \\`TokenForwarder\\` etc.\n                return {}\n            }\n        }\n    }\n\n    /// The interface that contains the \\`balance\\` field of the Vault\n    /// and enforces that when new Vaults are created, the balance\n    /// is initialized correctly.\n    ///\n    pub resource interface Balance {\n\n        /// The total balance of a vault\n        ///\n        pub var balance: UFix64\n\n        init(balance: UFix64) {\n            post {\n                self.balance == balance:\n                    \"Balance must be initialized to the initial balance\"\n            }\n        }\n\n        /// Function that returns all the Metadata Views implemented by a Fungible Token\n        ///\n        /// @return An array of Types defining the implemented views. This value will be used by\n        ///         developers to know which parameter to pass to the resolveView() method.\n        ///\n        pub fun getViews(): [Type] {\n            return []\n        }\n\n        /// Function that resolves a metadata view for this fungible token by type.\n        ///\n        /// @param view: The Type of the desired view.\n        /// @return A structure representing the requested view.\n        ///\n        pub fun resolveView(_ view: Type): AnyStruct? {\n            return nil\n        }\n    }\n\n    /// The resource that contains the functions to send and receive tokens.\n    /// The declaration of a concrete type in a contract interface means that\n    /// every Fungible Token contract that implements the FungibleToken interface\n    /// must define a concrete \\`Vault\\` resource that conforms to the \\`Provider\\`, \\`Receiver\\`,\n    /// and \\`Balance\\` interfaces, and declares their required fields and functions\n    ///\n    pub resource Vault: Provider, Receiver, Balance {\n\n        /// The total balance of the vault\n        pub var balance: UFix64\n\n        // The conforming type must declare an initializer\n        // that allows providing the initial balance of the Vault\n        //\n        init(balance: UFix64)\n\n        /// Subtracts \\`amount\\` from the Vault's balance\n        /// and returns a new Vault with the subtracted balance\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        ///\n        pub fun withdraw(amount: UFix64): @Vault {\n            pre {\n                self.balance >= amount:\n                    \"Amount withdrawn must be less than or equal than the balance of the Vault\"\n            }\n            post {\n                // use the special function \\`before\\` to get the value of the \\`balance\\` field\n                // at the beginning of the function execution\n                //\n                self.balance == before(self.balance) - amount:\n                    \"New Vault balance must be the difference of the previous balance and the withdrawn Vault\"\n            }\n        }\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault) {\n            // Assert that the concrete type of the deposited vault is the same\n            // as the vault that is accepting the deposit\n            pre {\n                from.isInstance(self.getType()): \n                    \"Cannot deposit an incompatible token type\"\n            }\n            post {\n                self.balance == before(self.balance) + before(from.balance):\n                    \"New Vault balance must be the sum of the previous balance and the deposited Vault\"\n            }\n        }\n    }\n\n    /// Allows any user to create a new Vault that has a zero balance\n    ///\n    /// @return The new Vault resource\n    ///\n    pub fun createEmptyVault(): @Vault {\n        post {\n            result.balance == 0.0: \"The newly created Vault must have zero balance\"\n        }\n    }\n}\n`,\n  },\n  code: null,\n}\n\njest.mock(\"@onflow/sdk\", () => ({\n  send: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    const sanitized = returnedAccount.contracts.FungibleToken.replace(/\\\\/g, \"\")\n    returnedAccount.contracts.FungibleToken = sanitized\n    return Promise.resolve(returnedAccount)\n  }),\n  getAccount: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return Promise.resolve({data: returnedAccount})\n  }),\n  invariant: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return\n  }),\n  config: jest.fn().mockImplementation(() => {\n    // Adjusted mock implementation\n    return {\n      get: jest.fn().mockImplementation(() => {\n        // Adjusted mock implementation\n        return Promise.resolve(\"0xf233dcee88fe0abe\")\n      }),\n    }\n  }),\n  atBlockHeight: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return Promise.resolve({})\n  }),\n}))\n\ndescribe(\"Gen template id interaction template messages 1.1.0\", () => {\n  const template = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.1.0\",\n    id: \"3accd8c0bf4c7b543a80287d6c158043b4c2e737c2205dba6e009abbbf1328a4\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: [\n        {\n          key: \"title\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Tokens\",\n            },\n          ],\n        },\n        {\n          key: \"description\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Flow to account\",\n            },\n          ],\n        },\n      ],\n      cadence: {\n        body: 'import \"FungibleToken\"\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}',\n        network_pins: [\n          {\n            network: \"mainnet\",\n            pin_self:\n              \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n          },\n          {\n            network: \"testnet\",\n            pin_self:\n              \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n          },\n        ],\n      },\n      dependencies: [\n        {\n          contracts: [\n            {\n              contract: \"FungibleToken\",\n              networks: [\n                {\n                  network: \"mainnet\",\n                  address: \"0xf233dcee88fe0abe\",\n                  dependency_pin_block_height: 70493190,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0xf233dcee88fe0abe\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"testnet\",\n                  address: \"0x9a0766d93b6608b7\",\n                  dependency_pin_block_height: 149595558,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0x9a0766d93b6608b7\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"emulator\",\n                  address: \"0xee82856bf20e2aa6\",\n                  dependency_pin_block_height: 0,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      parameters: [\n        {\n          label: \"amount\",\n          index: 0,\n          type: \"UFix64\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"Amount\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The amount of FLOW tokens to send\",\n                },\n              ],\n            },\n          ],\n        },\n        {\n          label: \"to\",\n          index: 1,\n          type: \"Address\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"To\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The Flow account the tokens will go to\",\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n  }\n\n  test(\"v1.1.0, mainnet network hash is derived correctly\", async () => {\n    const networkDependencies = {FungibleToken: \"0xf233dcee88fe0abe\"}\n\n    const popCadence = replaceStringImports({\n      cadence: template.data.cadence.body,\n      networkDependencies,\n    })\n\n    const hash = genHash(popCadence)\n\n    expect(hash).toEqual(template.data.cadence.network_pins[0].pin_self)\n  })\n\n  test(\"Test id generation and compare\", async () => {\n    const testId = template.id\n    const id = await generateTemplateId({\n      template: template as any,\n    })\n\n    expect(id).toEqual(testId)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id-1.1.0.ts",
    "content": "import {encode as rlpEncode} from \"@onflow/rlp\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport type {\n  InteractionTemplate110,\n  InteractionTemplateDependency,\n  InteractionTemplateI18n,\n  InteractionTemplateMessage,\n  InteractionTemplateNetwork,\n  InteractionTemplateParameter,\n} from \"../interaction-template\"\nimport {createGenerateDependencyPin110} from \"../generate-dependency-pin/generate-dependency-pin-1.1.0\"\nimport {genHash} from \"../utils/hash\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\nasync function generateContractNetworks(\n  context: Pick<FCLContext, \"config\" | \"sdk\">,\n  contractName: string,\n  networks: InteractionTemplateNetwork[]\n): Promise<string[][]> {\n  const values: string[][] = []\n  for (const net of networks) {\n    const networkHashes = [genHash(net.network)]\n    const {address, dependency_pin_block_height} = net\n    if (net.dependency_pin) {\n      const hash = await createGenerateDependencyPin110(context)({\n        address,\n        contractName,\n        blockHeight: dependency_pin_block_height,\n      })\n      networkHashes.push(genHash(hash))\n    }\n    values.push(networkHashes)\n  }\n  return values\n}\n\nasync function generateContractDependencies(\n  context: Pick<FCLContext, \"config\" | \"sdk\">,\n  dependencies: InteractionTemplateDependency[]\n): Promise<any[]> {\n  const values: any[] = []\n  for (let i = 0; i < dependencies.length; i++) {\n    const dependency = dependencies[i]\n    const contracts = []\n    for (let j = 0; j < dependency?.contracts.length; j++) {\n      const c = dependency?.contracts[j]\n      const contractName = c?.contract\n      contracts.push(genHash(contractName))\n      const contractHashes = await generateContractNetworks(\n        context,\n        contractName,\n        c?.networks\n      )\n      contracts.push(contractHashes)\n    }\n    values.push(contracts)\n  }\n  return values\n}\n\nexport function createGenerateTemplateId(\n  context: Pick<FCLContext, \"config\" | \"sdk\">\n) {\n  /**\n   * @description Generates Interaction Template ID for a given Interaction Template\n   *\n   * @param params\n   * @param params.template Interaction Template\n   * @returns Interaction Template ID\n   */\n  async function generateTemplateId({\n    template,\n  }: {\n    template: InteractionTemplate110\n  }): Promise<string> {\n    invariant(\n      !!template,\n      \"generateTemplateId({ template }) -- template must be defined\"\n    )\n    invariant(\n      typeof template === \"object\",\n      \"generateTemplateId({ template }) -- template must be an object\"\n    )\n    invariant(\n      template.f_type === \"InteractionTemplate\",\n      \"generateTemplateId({ template }) -- template object must be an InteractionTemplate\"\n    )\n    invariant(\n      template.f_version === \"1.1.0\",\n      \"generateTemplateId({ template }) -- template object must be an version 1.1.0\"\n    )\n\n    const templateData = template.data\n\n    const messages = await Promise.all(\n      templateData.messages.map(\n        async (templateMessage: InteractionTemplateMessage) => [\n          genHash(templateMessage.key),\n          await Promise.all(\n            templateMessage.i18n.map(\n              async (templateMessagei18n: InteractionTemplateI18n) => [\n                genHash(templateMessagei18n.tag),\n                genHash(templateMessagei18n.translation),\n              ]\n            )\n          ),\n        ]\n      )\n    )\n\n    const params = await Promise.all(\n      templateData?.[\"parameters\"]\n        .sort(\n          (a: InteractionTemplateParameter, b: InteractionTemplateParameter) =>\n            a.index - b.index\n        )\n        .map(async (arg: InteractionTemplateParameter) => [\n          genHash(arg.label),\n          [\n            genHash(String(arg.index)),\n            genHash(arg.type),\n            await Promise.all(\n              arg.messages.map(\n                async (argumentMessage: InteractionTemplateMessage) => [\n                  genHash(argumentMessage.key),\n                  await Promise.all(\n                    argumentMessage.i18n.map(\n                      async (argumentMessagei18n: InteractionTemplateI18n) => [\n                        genHash(argumentMessagei18n.tag),\n                        genHash(argumentMessagei18n.translation),\n                      ]\n                    )\n                  ),\n                ]\n              )\n            ),\n          ],\n        ])\n    )\n\n    const dependencies = [\n      await generateContractDependencies(context, templateData?.dependencies),\n    ]\n\n    const encodedHex = rlpEncode([\n      genHash(template?.f_type),\n      genHash(template?.f_version),\n      genHash(templateData?.type),\n      genHash(templateData?.interface),\n      messages,\n      genHash(templateData?.cadence?.body),\n      [dependencies],\n      params,\n    ]).toString(\"hex\")\n\n    return genHash(encodedHex)\n  }\n\n  return generateTemplateId\n}\n\nexport const generateTemplateId = /* @__PURE__ */ createGenerateTemplateId(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {generateTemplateId as generateTemplateId100} from \"./generate-template-id-1.0.0\"\nimport {generateTemplateId as generateTemplateId110} from \"./generate-template-id-1.1.0\"\nimport type {InteractionTemplate} from \"../interaction-template\"\n\n/**\n * @description Generates Interaction Template ID for a given Interaction Template\n *\n * @param params\n * @param params.template Interaction Template\n * @returns Interaction Template ID\n */\nexport async function generateTemplateId({\n  template,\n}: {\n  template: InteractionTemplate\n}): Promise<string> {\n  invariant(\n    !!template,\n    \"generateTemplateId({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"generateTemplateId({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"generateTemplateId({ template }) -- template object must be an InteractionTemplate\"\n  )\n\n  switch (template.f_version) {\n    case \"1.1.0\":\n      return await generateTemplateId110({template})\n    case \"1.0.0\":\n      return await generateTemplateId100({template})\n    default:\n      throw new Error(\"generateTemplateId Error: Unsupported template version\")\n  }\n}\n\n/**\n * @description Verifies the given Interaction Template Id has been correctly generated\n *\n * @param params\n * @param params.template Interaction Template\n * @returns true or false, Interaction Template ID\n */\nexport async function verifyGeneratedTemplateId({\n  template,\n}: {\n  template: InteractionTemplate\n}): Promise<boolean> {\n  return template.id === (await generateTemplateId({template}))\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/get-interaction-template-audits.ts",
    "content": "import {config, invariant} from \"@onflow/sdk\"\nimport {log, LEVELS} from \"@onflow/util-logger\"\nimport {createQuery} from \"../exec/query\"\nimport {generateTemplateId} from \"./generate-template-id/generate-template-id\"\nimport {createGetChainId} from \"../utils\"\nimport type {InteractionTemplate} from \"./interaction-template\"\nimport {FCLContext} from \"../context\"\n\nexport interface GetInteractionTemplateAuditsParams {\n  template: InteractionTemplate\n  auditors?: string[]\n}\n\nexport interface GetInteractionTemplateAuditsOpts {\n  flowInteractionAuditContract?: string\n}\n\n/**\n * @description Checks whether a set of auditors have audited a given Interaction Template on the Flow\n * blockchain. This function validates that the provided interaction template has been properly audited\n * for security by trusted auditors before execution. It queries the Flow blockchain's audit contract\n * to verify audit status.\n *\n * @param params\n * @param params.template The Interaction Template to check audits for. Must be\n * a valid InteractionTemplate object with f_type \"InteractionTemplate\"\n * @param params.auditors Array of auditor addresses to check. If not provided, will use\n * auditors from configuration 'flow.auditors'\n * @param opts Optional configuration parameters\n * @param opts.flowInteractionAuditContract Override address for the FlowInteractionAudit\n * contract if not using network defaults\n *\n * @returns Promise that resolves to an object mapping auditor\n * addresses to boolean values indicating whether they have audited the template\n *\n * @throws If template is invalid, template ID cannot be recomputed, network is unsupported,\n * or required configuration is missing\n *\n * @example\n * // Check if template has been audited by specific auditors\n * import * as fcl from \"@onflow/fcl\"\n *\n * const template = {\n *   f_type: \"InteractionTemplate\",\n *   f_version: \"1.1.0\",\n *   id: \"template-id-123\",\n *   data: {\n *     type: \"transaction\",\n *     interface: \"...\",\n *     cadence: \"transaction { ... }\"\n *   }\n * }\n *\n * const auditorAddresses = [\n *   \"0x1234567890abcdef\",\n *   \"0xabcdef1234567890\"\n * ]\n *\n * const auditResults = await fcl.InteractionTemplateUtils.getInteractionTemplateAudits({\n *   template,\n *   auditors: auditorAddresses\n * })\n *\n * console.log(auditResults)\n * // { \"0x1234567890abcdef\": true, \"0xabcdef1234567890\": false }\n */\nexport async function getInteractionTemplateAudits(\n  context: FCLContext,\n  {template, auditors}: GetInteractionTemplateAuditsParams,\n  opts: GetInteractionTemplateAuditsOpts = {}\n): Promise<Record<string, boolean>> {\n  invariant(\n    template != undefined,\n    \"getInteractionTemplateAudits({ template }) -- template must be defined\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"getInteractionTemplateAudits({ template }) -- template must be an InteractionTemplate\"\n  )\n\n  // Recompute ID to be sure it matches\n  let recomputedTemplateID = await generateTemplateId({template})\n\n  if (recomputedTemplateID !== template.id) {\n    log({\n      title: \"getInteractionTemplateAudits Debug Error\",\n      message: `Could not recompute and match template ID\n                computed: ${recomputedTemplateID}\n                template: ${template.id}\n            `,\n      level: LEVELS.debug,\n    })\n    throw new Error(\n      \"getInteractionTemplateAudits Error: Could not recompute and match template ID\"\n    )\n  }\n\n  switch (template.f_version) {\n    case \"1.1.0\":\n    case \"1.0.0\":\n      const _auditors = auditors || (await context.config.get(\"flow.auditors\"))\n\n      invariant(\n        _auditors,\n        \"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not set\"\n      )\n      invariant(\n        Array.isArray(_auditors),\n        \"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not an array\"\n      )\n\n      let FlowInteractionAuditContract = opts.flowInteractionAuditContract\n      if (!FlowInteractionAuditContract) {\n        const fclNetwork = await createGetChainId(context)(opts)\n        invariant(\n          fclNetwork === \"mainnet\" || fclNetwork === \"testnet\",\n          \"getInteractionTemplateAudits Error: Unable to determine address for FlowInteractionTemplateAudit contract. Set configuration for 'fcl.network' to 'mainnet' or 'testnet'\"\n        )\n        if (fclNetwork === \"mainnet\") {\n          FlowInteractionAuditContract = \"0xfd100e39d50a13e6\"\n        } else {\n          FlowInteractionAuditContract = \"0xf78bfc12d0a786dc\"\n        }\n      }\n\n      const audits = await createQuery(context)({\n        cadence: `\n        import FlowInteractionTemplateAudit from ${FlowInteractionAuditContract}\n        access(all) fun main(templateId: String, auditors: [Address]): {Address:Bool} {\n          return FlowInteractionTemplateAudit.getHasTemplateBeenAuditedByAuditors(templateId: templateId, auditors: auditors)\n        }\n        `,\n        args: (arg: any, t: any) => [\n          arg(recomputedTemplateID, t.String),\n          arg(_auditors, t.Array(t.Address)),\n        ],\n      })\n\n      return audits\n\n    default:\n      throw new Error(\n        \"getInteractionTemplateAudits Error: Unsupported template version\"\n      )\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/get-template-argument-message.test.ts",
    "content": "import {getTemplateArgumentMessage} from \"./get-template-argument-message\"\n\ndescribe(\"Get interaction template argument messages\", () => {\n  const templatev1: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.0.0\",\n    id: \"abc123\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: {\n        title: {\n          i18n: {\n            \"en-US\": \"Transfer Tokens\",\n          },\n        },\n        description: {\n          i18n: {\n            \"en-US\": \"Transfer tokens from one account to another\",\n          },\n        },\n      },\n      cadence: \"import FungibleToken from 0xFUNGIBLETOKENADDRESS\\n\",\n      dependencies: {\n        \"0xFUNGIBLETOKENADDRESS\": {\n          FungibleToken: {\n            mainnet: {\n              address: \"0xf233dcee88fe0abe\",\n              fq_address: \"A.0xf233dcee88fe0abe.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 34166296,\n            },\n            testnet: {\n              address: \"0x9a0766d93b6608b7\",\n              fq_address: \"A.0x9a0766d93b6608b7.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 74776482,\n            },\n          },\n        },\n      },\n      arguments: {\n        amount: {\n          index: 0,\n          type: \"UFix64\",\n          messages: {\n            title: {\n              i18n: {\n                \"en-US\": \"The amount of FLOW tokens to send\",\n              },\n            },\n          },\n        },\n        to: {\n          index: 1,\n          type: \"Address\",\n          messages: {\n            title: {\n              i18n: {\n                \"en-US\": \"The Flow account the tokens will go to\",\n              },\n            },\n          },\n        },\n      },\n    },\n  }\n\n  test(\"It gets argument message for given argument and internationalization\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"amount\",\n      messageKey: \"title\",\n      template: templatev1 as any,\n    })\n\n    expect(message).toEqual(\"The amount of FLOW tokens to send\")\n  })\n\n  test(\"It fails to get message for an unknown argument\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"foo\",\n      messageKey: \"title\",\n      template: templatev1 as any,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n\n  test(\"It fails to get message for an unknown message key\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"amount\",\n      messageKey: \"baz\",\n      template: templatev1 as any,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n})\n\ndescribe(\"Get interaction template v1.1.0 parameters messages\", () => {\n  const templatev11: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.1.0\",\n    id: \"3a99af243b85f3f6af28304af2ed53a37fb913782b3efc483e6f0162a47720a0\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: [\n        {\n          key: \"title\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Flow\",\n            },\n          ],\n        },\n        {\n          key: \"description\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Flow to account\",\n            },\n          ],\n        },\n      ],\n      cadence: {\n        body: 'import \"FungibleToken\"\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}',\n        network_pins: [\n          {\n            network: \"mainnet\",\n            pin_self:\n              \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n          },\n          {\n            network: \"testnet\",\n            pin_self:\n              \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n          },\n        ],\n      },\n      dependencies: [\n        {\n          contracts: [\n            {\n              contract: \"FungibleToken\",\n              networks: [\n                {\n                  network: \"mainnet\",\n                  address: \"0xf233dcee88fe0abe\",\n                  dependency_pin_block_height: 70493190,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0xf233dcee88fe0abe\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"testnet\",\n                  address: \"0x9a0766d93b6608b7\",\n                  dependency_pin_block_height: 149595558,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0x9a0766d93b6608b7\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"emulator\",\n                  address: \"0xee82856bf20e2aa6\",\n                  dependency_pin_block_height: 0,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      parameters: [\n        {\n          label: \"amount\",\n          index: 0,\n          type: \"UFix64\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"Amount\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The amount of FLOW tokens to send\",\n                },\n              ],\n            },\n          ],\n        },\n        {\n          label: \"to\",\n          index: 1,\n          type: \"Address\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"To\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The Flow account the tokens will go to\",\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n  }\n\n  test(\"It gets argument message for given argument and internationalization\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"amount\",\n      messageKey: \"title\",\n      template: templatev11,\n    })\n\n    expect(message).toEqual(\"Amount\")\n  })\n\n  test(\"It fails to get message for an unknown argument\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"foo\",\n      messageKey: \"title\",\n      template: templatev11,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n\n  test(\"It fails to get message for an unknown message key\", async () => {\n    const message = getTemplateArgumentMessage({\n      localization: \"en-US\",\n      argumentLabel: \"amount\",\n      messageKey: \"baz\",\n      template: templatev11,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/get-template-argument-message.ts",
    "content": "import {invariant} from \"@onflow/sdk\"\nimport type {InteractionTemplate} from \"./interaction-template\"\n\nexport interface GetTemplateArgumentMessageParams {\n  localization?: string\n  argumentLabel: string\n  messageKey: string\n  template: InteractionTemplate\n}\n\n/**\n * @description Gets Interaction Template argument message by message key, argument label, and localization\n *\n * @param params\n * @param params.localization [localization=\"en-US\"] Localization to get message for\n * @param params.argumentLabel Argument label to get message for\n * @param params.messageKey Message key to get message for\n * @param params.template Interaction Template to get message from\n * @returns Message\n */\nexport function getTemplateArgumentMessage({\n  localization = \"en-US\",\n  argumentLabel,\n  messageKey,\n  template,\n}: GetTemplateArgumentMessageParams): string | undefined {\n  invariant(\n    messageKey,\n    \"getTemplateArgumentMessage({ messageKey }) -- messageKey must be defined\"\n  )\n  invariant(\n    typeof messageKey === \"string\",\n    \"getTemplateArgumentMessage({ messageKey }) -- messageKey must be a string\"\n  )\n\n  invariant(\n    argumentLabel,\n    \"getTemplateArgumentMessage({ argumentLabel }) -- argumentLabel must be defined\"\n  )\n  invariant(\n    typeof argumentLabel === \"string\",\n    \"getTemplateArgumentMessage({ argumentLabel }) -- argumentLabel must be a string\"\n  )\n\n  invariant(\n    localization,\n    \"getTemplateArgumentMessage({ localization }) -- localization must be defined\"\n  )\n  invariant(\n    typeof localization === \"string\",\n    \"getTemplateArgumentMessage({ localization }) -- localization must be a string\"\n  )\n\n  invariant(\n    template != undefined,\n    \"getTemplateArgumentMessage({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"getTemplateArgumentMessage({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"getTemplateArgumentMessage({ template }) -- template object must be an InteractionTemplate\"\n  )\n\n  switch (template.f_version) {\n    case \"1.1.0\":\n      const param = template?.data?.parameters?.find(\n        (a: any) => a.label === argumentLabel\n      )\n      if (!param) return undefined\n      const message = param?.messages?.find((a: any) => a.key === messageKey)\n      if (!message) return undefined\n      const lzn = message?.i18n?.find((a: any) => a.tag === localization)\n      if (!lzn) return undefined\n      return lzn.translation\n    case \"1.0.0\":\n      return template?.data?.arguments?.[argumentLabel]?.messages?.[messageKey]\n        ?.i18n?.[localization]\n    default:\n      throw new Error(\n        \"getTemplateArgumentMessage Error: Unsupported template version\"\n      )\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/get-template-message.test.ts",
    "content": "import {getTemplateMessage} from \"./get-template-message\"\n\ndescribe(\"Get interaction template messages 1.0.0\", () => {\n  const template: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.0.0\",\n    id: \"abc123\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: {\n        title: {\n          i18n: {\n            \"en-US\": \"Transfer Tokens\",\n          },\n        },\n        description: {\n          i18n: {\n            \"en-US\": \"Transfer tokens from one account to another\",\n          },\n        },\n      },\n      cadence: \"import FungibleToken from 0xFUNGIBLETOKENADDRESS\\n\",\n      dependencies: {\n        \"0xFUNGIBLETOKENADDRESS\": {\n          FungibleToken: {\n            mainnet: {\n              address: \"0xf233dcee88fe0abe\",\n              fq_address: \"A.0xf233dcee88fe0abe.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 34166296,\n            },\n            testnet: {\n              address: \"0x9a0766d93b6608b7\",\n              fq_address: \"A.0x9a0766d93b6608b7.FungibleToken\",\n              contract: \"FungibleToken\",\n              pin: \"83c9e3d61d3b5ebf24356a9f17b5b57b12d6d56547abc73e05f820a0ae7d9cf5\",\n              pin_block_height: 74776482,\n            },\n          },\n        },\n      },\n      arguments: {\n        amount: {\n          index: 0,\n          type: \"UFix64\",\n          messages: {\n            title: {\n              i18n: {\n                \"en-US\": \"The amount of FLOW tokens to send\",\n              },\n            },\n          },\n        },\n        to: {\n          index: 1,\n          type: \"Address\",\n          messages: {\n            title: {\n              i18n: {\n                \"en-US\": \"The Flow account the tokens will go to\",\n              },\n            },\n          },\n        },\n      },\n    },\n  }\n\n  test(\"It gets template message for given message key and internationalization\", async () => {\n    const title = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"title\",\n      template,\n    })\n\n    expect(title).toEqual(\"Transfer Tokens\")\n\n    const description = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"description\",\n      template,\n    })\n\n    expect(description).toEqual(\"Transfer tokens from one account to another\")\n  })\n\n  test(\"It fails to get message for an unknown message key\", async () => {\n    const message = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"foo\",\n      template,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n})\n\ndescribe(\"Get interaction template messages 1.1.0\", () => {\n  const template: any = {\n    f_type: \"InteractionTemplate\",\n    f_version: \"1.1.0\",\n    id: \"3a99af243b85f3f6af28304af2ed53a37fb913782b3efc483e6f0162a47720a0\",\n    data: {\n      type: \"transaction\",\n      interface: \"\",\n      messages: [\n        {\n          key: \"title\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Tokens\",\n            },\n          ],\n        },\n        {\n          key: \"description\",\n          i18n: [\n            {\n              tag: \"en-US\",\n              translation: \"Transfer Flow to account\",\n            },\n          ],\n        },\n      ],\n      cadence: {\n        body: 'import \"FungibleToken\"\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}',\n        network_pins: [\n          {\n            network: \"mainnet\",\n            pin_self:\n              \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n          },\n          {\n            network: \"testnet\",\n            pin_self:\n              \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n          },\n        ],\n      },\n      dependencies: [\n        {\n          contracts: [\n            {\n              contract: \"FungibleToken\",\n              networks: [\n                {\n                  network: \"mainnet\",\n                  address: \"0xf233dcee88fe0abe\",\n                  dependency_pin_block_height: 70493190,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0xf233dcee88fe0abe\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"testnet\",\n                  address: \"0x9a0766d93b6608b7\",\n                  dependency_pin_block_height: 149595558,\n                  dependency_pin: {\n                    pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                    pin_self:\n                      \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                    pin_contract_name: \"FungibleToken\",\n                    pin_contract_address: \"0x9a0766d93b6608b7\",\n                    imports: [],\n                  },\n                },\n                {\n                  network: \"emulator\",\n                  address: \"0xee82856bf20e2aa6\",\n                  dependency_pin_block_height: 0,\n                },\n              ],\n            },\n          ],\n        },\n      ],\n      parameters: [\n        {\n          label: \"amount\",\n          index: 0,\n          type: \"UFix64\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"Amount\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The amount of FLOW tokens to send\",\n                },\n              ],\n            },\n          ],\n        },\n        {\n          label: \"to\",\n          index: 1,\n          type: \"Address\",\n          messages: [\n            {\n              key: \"title\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"To\",\n                },\n              ],\n            },\n            {\n              key: \"description\",\n              i18n: [\n                {\n                  tag: \"en-US\",\n                  translation: \"The Flow account the tokens will go to\",\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n  }\n\n  test(\"It gets template title message for given message key and internationalization\", async () => {\n    const title = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"title\",\n      template,\n    })\n\n    expect(title).toEqual(\"Transfer Tokens\")\n  })\n\n  test(\"It gets template description message for given message key and internationalization\", async () => {\n    const description = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"description\",\n      template,\n    })\n\n    expect(description).toEqual(\"Transfer Flow to account\")\n  })\n\n  test(\"It fails to get message for an unknown message key\", async () => {\n    const message = getTemplateMessage({\n      localization: \"en-US\",\n      messageKey: \"foo\",\n      template,\n    })\n\n    expect(message).toEqual(undefined)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/get-template-message.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport type {InteractionTemplate} from \"./interaction-template\"\n\nexport interface GetTemplateMessageParams {\n  localization?: string\n  messageKey: string\n  template: InteractionTemplate\n}\n\n/**\n * @description Get Interaction Template argument message\n *\n * @param params\n * @param params.localization [localization=\"en-US\"] Localization code\n * @param params.messageKey Message key\n * @param params.template Interaction Template\n * @returns Message\n */\nexport function getTemplateMessage({\n  localization = \"en-US\",\n  messageKey,\n  template,\n}: GetTemplateMessageParams): string | undefined {\n  invariant(\n    messageKey as any,\n    \"getTemplateMessage({ messageKey }) -- messageKey must be defined\"\n  )\n  invariant(\n    typeof messageKey === \"string\",\n    \"getTemplateMessage({ messageKey }) -- messageKey must be a string\"\n  )\n\n  invariant(\n    localization as any,\n    \"getTemplateMessage({ localization }) -- localization must be defined\"\n  )\n  invariant(\n    typeof localization === \"string\",\n    \"getTemplateMessage({ localization }) -- localization must be a string\"\n  )\n\n  invariant(\n    template != undefined,\n    \"getTemplateMessage({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"getTemplateMessage({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"getTemplateMessage({ template }) -- template object must be an InteractionTemplate\"\n  )\n\n  switch (template.f_version) {\n    case \"1.1.0\":\n      const msg = template?.data?.messages?.find(\n        (a: any) => a.key === messageKey\n      )\n      if (!msg) return undefined\n      const lzn = msg?.i18n?.find((a: any) => a.tag === localization)\n      if (!lzn) return undefined\n      return lzn.translation\n    case \"1.0.0\":\n      return template?.data?.messages?.[messageKey]?.i18n?.[localization]\n    default:\n      throw new Error(\n        \"getTemplateArgumentMessage Error: Unsupported template version\"\n      )\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/index.ts",
    "content": "export {getInteractionTemplateAudits} from \"./get-interaction-template-audits\"\nexport {\n  generateDependencyPin,\n  generateDependencyPinAtLatestSealedBlock,\n} from \"./generate-dependency-pin/generate-dependency-pin\"\nexport {\n  generateTemplateId,\n  verifyGeneratedTemplateId,\n} from \"./generate-template-id/generate-template-id\"\nexport {\n  verifyDependencyPinsSame,\n  verifyDependencyPinsSameAtLatestSealedBlock,\n} from \"./verify-dependency-pin-same-at-block\"\nexport {deriveCadenceByNetwork} from \"./derive-cadence-by-network/derive-cadence-by-network\"\nexport {getTemplateMessage} from \"./get-template-message\"\nexport {getTemplateArgumentMessage} from \"./get-template-argument-message\"\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/interaction-template.ts",
    "content": "export interface ImportItem {\n  contractName: string\n  address: string\n  contract: string\n}\n\nexport interface InteractionTemplateI18n {\n  tag: string\n  translation: string\n}\n\nexport interface InteractionTemplateMessage {\n  key: string\n  i18n: InteractionTemplateI18n[]\n}\n\nexport interface InteractionTemplateParameter {\n  label: string\n  index: number\n  type: string\n  balance?: string\n  messages: InteractionTemplateMessage[]\n}\n\nexport interface InteractionTemplateNetwork {\n  network: string\n  address: string\n  dependency_pin?: string\n  dependency_pin_block_height?: number\n}\n\nexport interface InteractionTemplateContract {\n  contract: string\n  networks: InteractionTemplateNetwork[]\n}\n\nexport interface InteractionTemplateDependency {\n  contracts: InteractionTemplateContract[]\n}\n\nexport interface InteractionTemplateCadence {\n  body: string\n}\n\n// Version 1.0.0 specific types\nexport interface InteractionTemplateData100 {\n  type: string\n  interface: string\n  messages: Record<string, {i18n: Record<string, string>}>\n  cadence: string\n  dependencies: Record<\n    string,\n    Record<\n      string,\n      Record<\n        string,\n        {\n          address: string\n          contract: string\n          fq_address: string\n          pin: string\n          pin_block_height: number\n        }\n      >\n    >\n  >\n  arguments: Record<\n    string,\n    {\n      index: number\n      type: string\n      balance?: string\n      messages: Record<string, {i18n: Record<string, string>}>\n    }\n  >\n}\n\n// Version 1.1.0 specific types\nexport interface InteractionTemplateData110 {\n  type: string\n  interface: string\n  messages: InteractionTemplateMessage[]\n  cadence: InteractionTemplateCadence\n  dependencies: InteractionTemplateDependency[]\n  parameters: InteractionTemplateParameter[]\n}\n\nexport interface InteractionTemplate100 {\n  f_type: \"InteractionTemplate\"\n  f_version: \"1.0.0\"\n  id: string\n  data: InteractionTemplateData100\n}\n\nexport interface InteractionTemplate110 {\n  f_type: \"InteractionTemplate\"\n  f_version: \"1.1.0\"\n  id: string\n  data: InteractionTemplateData110\n}\n\nexport type InteractionTemplate =\n  | InteractionTemplate100\n  | InteractionTemplate110\n\n// Utility types for function parameters\nexport interface GenerateTemplateIdParams {\n  template: InteractionTemplate\n}\n\nexport interface GetInteractionTemplateAuditsParams {\n  template: InteractionTemplate\n  auditors?: string[]\n}\n\nexport interface GetInteractionTemplateAuditsOpts {\n  flowInteractionAuditContract?: string\n}\n\nexport interface DeriveCadenceByNetworkParams {\n  network: string\n  template: InteractionTemplate\n}\n\nexport interface GetTemplateMessageParams {\n  localization?: string\n  messageKey: string\n  template: InteractionTemplate\n}\n\nexport interface GetTemplateArgumentMessageParams {\n  localization?: string\n  argumentLabel: string\n  messageKey: string\n  template: InteractionTemplate\n}\n\nexport interface GenerateDependencyPinParams {\n  address: string\n  contractName: string\n  blockHeight: number\n}\n\nexport interface VerifyDependencyPinsSameParams {\n  template: InteractionTemplate\n  blockHeight?: number\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/find-imports.test.ts",
    "content": "import {findImports} from \"./find-imports\"\nimport {generateImport} from \"./generate-import\"\n\ndescribe(\"Find imports\", () => {\n  const cadenceA = `\n        import ContractA from 0xABC123\n        import ContractB from 0xDEF456\n\n        access(all) fun main(): Int {\n            return 12\n        }\n    `\n\n  const cadenceB = `\n        import ContractA from 0xABC123\n        import ContractB from 0xDEF456\n        import Crypto\n\n        access(all) fun main(): Int {\n            return 12\n        }\n    `\n\n  const cadenceC = `\n    // Go Flow!\n    import Crypto\n    import ContractA, ContractB, ContractD from 0xABC123\n    import ContractC from 0xDEF456\n    import Crypto\n\n    access(all) fun main(): Int {\n        return 12\n    }\n`\n\n  test(\"It parses contracts correctly for cadence A\", async () => {\n    const imports = findImports(cadenceA)\n\n    expect(imports).toEqual([\n      generateImport({\n        contractName: \"ContractA\",\n        address: \"0xABC123\",\n      }),\n      generateImport({\n        contractName: \"ContractB\",\n        address: \"0xDEF456\",\n      }),\n    ])\n  })\n\n  test(\"It parses contracts correctly for cadence B\", async () => {\n    const imports = findImports(cadenceA)\n\n    expect(imports).toEqual([\n      generateImport({\n        contractName: \"ContractA\",\n        address: \"0xABC123\",\n      }),\n      generateImport({\n        contractName: \"ContractB\",\n        address: \"0xDEF456\",\n      }),\n    ])\n  })\n\n  test(\"It parses contracts correctly for cadence C\", async () => {\n    const imports = findImports(cadenceC)\n\n    expect(imports).toEqual([\n      generateImport({\n        contractName: \"ContractA\",\n        address: \"0xABC123\",\n      }),\n      generateImport({\n        contractName: \"ContractB\",\n        address: \"0xABC123\",\n      }),\n      generateImport({\n        contractName: \"ContractD\",\n        address: \"0xABC123\",\n      }),\n      generateImport({\n        contractName: \"ContractC\",\n        address: \"0xDEF456\",\n      }),\n    ])\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/find-imports.ts",
    "content": "import {generateImport} from \"./generate-import\"\nimport {ImportItem} from \"../interaction-template\"\n\n/**\n * @description Parses a Cadence script or transaction to find all import statements and extracts\n * the contract names and addresses. This function uses regular expressions to identify import\n * statements and creates ImportItem objects for each imported contract.\n *\n * @param cadence The Cadence code string to parse for import statements\n * @returns Array of ImportItem objects containing contract names and addresses\n *\n * @example\n * // Parse imports from Cadence code\n * const cadenceCode = `\n *   import FlowToken from 0x1654653399040a61\n *   import FungibleToken, NonFungibleToken from 0x9a0766d93b6608b7\n *\n *   transaction() {\n *     // transaction code\n *   }\n * `\n *\n * const imports = findImports(cadenceCode)\n * console.log(imports)\n * // [\n * //   { contractName: \"FlowToken\", address: \"0x1654653399040a61\", contract: \"\" },\n * //   { contractName: \"FungibleToken\", address: \"0x9a0766d93b6608b7\", contract: \"\" },\n * //   { contractName: \"NonFungibleToken\", address: \"0x9a0766d93b6608b7\", contract: \"\" }\n * // ]\n */\nexport function findImports(cadence: string): ImportItem[] {\n  const imports: ImportItem[] = []\n\n  const importsReg = /import ((\\w|,| )+)* from 0x\\w+/g\n  const fileImports = cadence.match(importsReg) || []\n\n  for (const fileImport of fileImports) {\n    const importLineReg = /import ((\\w+|, |)*) from (0x\\w+)/g\n    const importLine = importLineReg.exec(fileImport)\n\n    const contractsReg = /((?:\\w+)+),?/g\n    const contracts = importLine?.[1].match(contractsReg) || []\n\n    for (const contract of contracts) {\n      imports.push(\n        generateImport({\n          address: importLine?.[3]!,\n          contractName: contract.replace(/,/g, \"\"),\n        })\n      )\n    }\n  }\n\n  return imports\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/generate-import.ts",
    "content": "import {ImportItem} from \"../interaction-template\"\n\nexport interface GenerateImportParams {\n  contractName: string\n  address: string\n}\n\n/**\n * @description Creates an ImportItem object from a contract name and address. This is a utility\n * function used to generate standardized import objects for interaction templates and dependency\n * management. The contract field is initialized as an empty string.\n *\n * @param params The parameters object containing contract details\n * @param params.contractName The name of the contract being imported\n * @param params.address The Flow address where the contract is deployed\n * @returns ImportItem object with contractName, address, and empty contract field\n *\n * @example\n * // Generate import for FlowToken contract\n * const importItem = generateImport({\n *   contractName: \"FlowToken\",\n *   address: \"0x1654653399040a61\"\n * })\n * console.log(importItem)\n * // { contractName: \"FlowToken\", address: \"0x1654653399040a61\", contract: \"\" }\n */\nexport function generateImport({\n  contractName,\n  address,\n}: GenerateImportParams): ImportItem {\n  return {contractName, address, contract: \"\"}\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/hash.ts",
    "content": "import {SHA3} from \"sha3\"\nimport {Buffer} from \"@onflow/rlp\"\n\n/**\n * @description Generates a SHA3-256 hash of a UTF-8 string. This function is commonly used in Flow\n * for creating deterministic hashes of Cadence code, interaction templates, and other string data\n * that need to be uniquely identified or verified for integrity.\n *\n * @param utf8String The UTF-8 string to hash\n * @returns The SHA3-256 hash of the input string as a hexadecimal string\n *\n * @example\n * // Generate hash of Cadence code\n * const cadenceCode = \"access(all) fun main(): String { return \\\"Hello\\\" }\"\n * const hash = genHash(cadenceCode)\n * console.log(hash) // \"a1b2c3d4e5f6...\" (64-character hex string)\n */\nexport function genHash(utf8String: string): string {\n  const sha = new SHA3(256)\n  sha.update(Buffer.from(utf8String, \"utf8\"))\n  return sha.digest(\"hex\")\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/replace-string-imports.test.ts",
    "content": "import {replaceStringImports} from \"./replace-string-imports\"\n\ndescribe(\"Verify replace imports works \", () => {\n  test(\"replace single import\", async () => {\n    const cadence = await replaceStringImports({\n      cadence: 'import \"FungibleToken\"\\n\\n',\n      networkDependencies: {\n        FungibleToken: \"0xf233dcee88fe0abe\",\n      },\n    })\n    expect(cadence).toEqual(\"import FungibleToken from 0xf233dcee88fe0abe\\n\\n\")\n  })\n\n  test(\"replace multiple import\", async () => {\n    const cadence = await replaceStringImports({\n      cadence: 'import \"FungibleToken\"\\nimport \"NonFungibleToken\"\\n\\n',\n      networkDependencies: {\n        FungibleToken: \"0xf233dcee88fe0abe\",\n        NonFungibleToken: \"0x1d7e57aa55817448\",\n      },\n    })\n\n    expect(cadence).toEqual(\n      \"import FungibleToken from 0xf233dcee88fe0abe\\nimport NonFungibleToken from 0x1d7e57aa55817448\\n\\n\"\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/utils/replace-string-imports.ts",
    "content": "export interface ReplaceStringImportsParams {\n  cadence: string\n  networkDependencies: Record<string, string>\n}\n\n/**\n * @description Replaces string imports with the actual contract address\n *\n * @param params\n * @param params.cadence The Cadence code\n * @param params.networkDependencies Network dependencies mapping\n * @returns Cadence code with replaced imports\n */\nexport function replaceStringImports({\n  cadence,\n  networkDependencies,\n}: ReplaceStringImportsParams): string {\n  return Object.keys(networkDependencies).reduce((c, contractName) => {\n    const address = networkDependencies[contractName]\n    const regex = new RegExp(`import \"\\\\b${contractName}\\\\b\"`, \"g\")\n    return c.replace(regex, `import ${contractName} from ${address}`)\n  }, cadence)\n}\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/verify-dependency-pin-same-at-block.test.ts",
    "content": "import {verifyDependencyPinsSame} from \"./verify-dependency-pin-same-at-block\"\nimport {config} from \"@onflow/config\"\n\nconst returnedAccount = {\n  address: \"0xf233dcee88fe0abe\",\n  keys: [],\n  balance: \"10\",\n  contracts: {\n    FungibleToken: `/**\n\n# The Flow Fungible Token standard\n\n## \\`FungibleToken\\` contract interface\n\nThe interface that all Fungible Token contracts would have to conform to.\nIf a users wants to deploy a new token contract, their contract\nwould need to implement the FungibleToken interface.\n\nTheir contract would have to follow all the rules and naming\nthat the interface specifies.\n\n## \\`Vault\\` resource\n\nEach account that owns tokens would need to have an instance\nof the Vault resource stored in their account storage.\n\nThe Vault resource has methods that the owner and other users can call.\n\n## \\`Provider\\`, \\`Receiver\\`, and \\`Balance\\` resource interfaces\n\nThese interfaces declare pre-conditions and post-conditions that restrict\nthe execution of the functions in the Vault.\n\nThey are separate because it gives the user the ability to share\na reference to their Vault that only exposes the fields functions\nin one or more of the interfaces.\n\nIt also gives users the ability to make custom resources that implement\nthese interfaces to do various things with the tokens.\nFor example, a faucet can be implemented by conforming\nto the Provider interface.\n\nBy using resources and interfaces, users of Fungible Token contracts\ncan send and receive tokens peer-to-peer, without having to interact\nwith a central ledger smart contract. To send tokens to another user,\na user would simply withdraw the tokens from their Vault, then call\nthe deposit function on another user's Vault to complete the transfer.\n\n*/\n\n/// The interface that Fungible Token contracts implement.\n///\npub contract interface FungibleToken {\n\n    /// The total number of tokens in existence.\n    /// It is up to the implementer to ensure that the total supply\n    /// stays accurate and up to date\n    pub var totalSupply: UFix64\n\n    /// The event that is emitted when the contract is created\n    pub event TokensInitialized(initialSupply: UFix64)\n\n    /// The event that is emitted when tokens are withdrawn from a Vault\n    pub event TokensWithdrawn(amount: UFix64, from: Address?)\n\n    /// The event that is emitted when tokens are deposited into a Vault\n    pub event TokensDeposited(amount: UFix64, to: Address?)\n\n    /// The interface that enforces the requirements for withdrawing\n    /// tokens from the implementing type.\n    ///\n    /// It does not enforce requirements on \\`balance\\` here,\n    /// because it leaves open the possibility of creating custom providers\n    /// that do not necessarily need their own balance.\n    ///\n    pub resource interface Provider {\n\n        /// Subtracts tokens from the owner's Vault\n        /// and returns a Vault with the removed tokens.\n        ///\n        /// The function's access level is public, but this is not a problem\n        /// because only the owner storing the resource in their account\n        /// can initially call this function.\n        ///\n        /// The owner may grant other accounts access by creating a private\n        /// capability that allows specific other users to access\n        /// the provider resource through a reference.\n        ///\n        /// The owner may also grant all accounts access by creating a public\n        /// capability that allows all users to access the provider\n        /// resource through a reference.\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        /// \n        pub fun withdraw(amount: UFix64): @Vault {\n            post {\n                // \\`result\\` refers to the return value\n                result.balance == amount:\n                    \"Withdrawal amount must be the same as the balance of the withdrawn Vault\"\n            }\n        }\n    }\n\n    /// The interface that enforces the requirements for depositing\n    /// tokens into the implementing type.\n    ///\n    /// We do not include a condition that checks the balance because\n    /// we want to give users the ability to make custom receivers that\n    /// can do custom things with the tokens, like split them up and\n    /// send them to different places.\n    ///\n    pub resource interface Receiver {\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault)\n\n        /// Below is referenced from the FLIP #69 https://github.com/onflow/flips/blob/main/flips/20230206-fungible-token-vault-type-discovery.md\n        /// \n        /// Returns the dictionary of Vault types that the the receiver is able to accept in its \\`deposit\\` method\n        /// this then it would return \\`{Type<@FlowToken.Vault>(): true}\\` and if any custom receiver\n        /// uses the default implementation then it would return empty dictionary as its parent\n        /// resource doesn't conform with the \\`FungibleToken.Vault\\` resource.\n        ///\n        /// Custom receiver implementations are expected to upgrade their contracts to add an implementation\n        /// that supports this method because it is very valuable for various applications to have.\n        ///\n        /// @return dictionary of supported deposit vault types by the implementing resource.\n        /// \n        pub fun getSupportedVaultTypes(): {Type: Bool} {\n            // Below check is implemented to make sure that run-time type would\n            // only get returned when the parent resource conforms with \\`FungibleToken.Vault\\`. \n            if self.getType().isSubtype(of: Type<@FungibleToken.Vault>()) {\n                return {self.getType(): true}\n            } else {\n                // Return an empty dictionary as the default value for resource who don't\n                // implement \\`FungibleToken.Vault\\`, such as \\`FungibleTokenSwitchboard\\`, \\`TokenForwarder\\` etc.\n                return {}\n            }\n        }\n    }\n\n    /// The interface that contains the \\`balance\\` field of the Vault\n    /// and enforces that when new Vaults are created, the balance\n    /// is initialized correctly.\n    ///\n    pub resource interface Balance {\n\n        /// The total balance of a vault\n        ///\n        pub var balance: UFix64\n\n        init(balance: UFix64) {\n            post {\n                self.balance == balance:\n                    \"Balance must be initialized to the initial balance\"\n            }\n        }\n\n        /// Function that returns all the Metadata Views implemented by a Fungible Token\n        ///\n        /// @return An array of Types defining the implemented views. This value will be used by\n        ///         developers to know which parameter to pass to the resolveView() method.\n        ///\n        pub fun getViews(): [Type] {\n            return []\n        }\n\n        /// Function that resolves a metadata view for this fungible token by type.\n        ///\n        /// @param view: The Type of the desired view.\n        /// @return A structure representing the requested view.\n        ///\n        pub fun resolveView(_ view: Type): AnyStruct? {\n            return nil\n        }\n    }\n\n    /// The resource that contains the functions to send and receive tokens.\n    /// The declaration of a concrete type in a contract interface means that\n    /// every Fungible Token contract that implements the FungibleToken interface\n    /// must define a concrete \\`Vault\\` resource that conforms to the \\`Provider\\`, \\`Receiver\\`,\n    /// and \\`Balance\\` interfaces, and declares their required fields and functions\n    ///\n    pub resource Vault: Provider, Receiver, Balance {\n\n        /// The total balance of the vault\n        pub var balance: UFix64\n\n        // The conforming type must declare an initializer\n        // that allows providing the initial balance of the Vault\n        //\n        init(balance: UFix64)\n\n        /// Subtracts \\`amount\\` from the Vault's balance\n        /// and returns a new Vault with the subtracted balance\n        ///\n        /// @param amount: The amount of tokens to be withdrawn from the vault\n        /// @return The Vault resource containing the withdrawn funds\n        ///\n        pub fun withdraw(amount: UFix64): @Vault {\n            pre {\n                self.balance >= amount:\n                    \"Amount withdrawn must be less than or equal than the balance of the Vault\"\n            }\n            post {\n                // use the special function \\`before\\` to get the value of the \\`balance\\` field\n                // at the beginning of the function execution\n                //\n                self.balance == before(self.balance) - amount:\n                    \"New Vault balance must be the difference of the previous balance and the withdrawn Vault\"\n            }\n        }\n\n        /// Takes a Vault and deposits it into the implementing resource type\n        ///\n        /// @param from: The Vault resource containing the funds that will be deposited\n        ///\n        pub fun deposit(from: @Vault) {\n            // Assert that the concrete type of the deposited vault is the same\n            // as the vault that is accepting the deposit\n            pre {\n                from.isInstance(self.getType()): \n                    \"Cannot deposit an incompatible token type\"\n            }\n            post {\n                self.balance == before(self.balance) + before(from.balance):\n                    \"New Vault balance must be the sum of the previous balance and the deposited Vault\"\n            }\n        }\n    }\n\n    /// Allows any user to create a new Vault that has a zero balance\n    ///\n    /// @return The new Vault resource\n    ///\n    pub fun createEmptyVault(): @Vault {\n        post {\n            result.balance == 0.0: \"The newly created Vault must have zero balance\"\n        }\n    }\n}\n`,\n  },\n  code: null,\n}\n\njest.mock(\"@onflow/sdk\", () => ({\n  send: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    const sanitized = returnedAccount.contracts.FungibleToken.replace(/\\\\/g, \"\")\n    returnedAccount.contracts.FungibleToken = sanitized\n    return Promise.resolve(returnedAccount)\n  }),\n  getAccount: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return Promise.resolve({data: returnedAccount})\n  }),\n  invariant: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return\n  }),\n  config: jest.fn().mockImplementation(() => {\n    // Adjusted mock implementation\n    return {\n      get: jest.fn().mockImplementation(() => {\n        // Adjusted mock implementation\n        return Promise.resolve(\"0xf233dcee88fe0abe\")\n      }),\n    }\n  }),\n  atBlockHeight: jest.fn().mockImplementation(({}) => {\n    // Adjusted mock implementation\n    return\n  }),\n}))\n\nconst template = {\n  f_type: \"InteractionTemplate\",\n  f_version: \"1.1.0\",\n  id: \"3accd8c0bf4c7b543a80287d6c158043b4c2e737c2205dba6e009abbbf1328a4\",\n  data: {\n    type: \"transaction\",\n    interface: \"\",\n    messages: [\n      {\n        key: \"title\",\n        i18n: [\n          {\n            tag: \"en-US\",\n            translation: \"Transfer Tokens\",\n          },\n        ],\n      },\n      {\n        key: \"description\",\n        i18n: [\n          {\n            tag: \"en-US\",\n            translation: \"Transfer Flow to account\",\n          },\n        ],\n      },\n    ],\n    cadence: {\n      body: 'import \"FungibleToken\"\\n\\n#interaction(\\n    version: \"1.1.0\",\\n    title: \"Transfer Flow\",\\n    description: \"Transfer Flow to account\",\\n    language: \"en-US\",\\n    parameters: [\\n        Parameter(\\n            name: \"amount\", \\n            title: \"Amount\", \\n            description: \"The amount of FLOW tokens to send\"\\n        ),\\n        Parameter(\\n            name: \"to\", \\n            title: \"To\",\\n            description: \"The Flow account the tokens will go to\"\\n        )\\n    ],\\n)\\n\\ntransaction(amount: UFix64, to: Address) {\\n    let vault: @FungibleToken.Vault\\n    \\n    prepare(signer: AuthAccount) {\\n        self.vault \\u003c- signer\\n            .borrow\\u003c\\u0026{FungibleToken.Provider}\\u003e(from: /storage/flowTokenVault)!\\n            .withdraw(amount: amount)\\n    }\\n\\n    execute {\\n        getAccount(to)\\n            .getCapability(/public/flowTokenReceiver)!\\n            .borrow\\u003c\\u0026{FungibleToken.Receiver}\\u003e()!\\n            .deposit(from: \\u003c-self.vault)\\n    }\\n}',\n      network_pins: [\n        {\n          network: \"mainnet\",\n          pin_self:\n            \"dd046de8ef442e4d708124d5710cb78962eb884a4387df1f0b1daf374bd28278\",\n        },\n        {\n          network: \"testnet\",\n          pin_self:\n            \"4089786f5e19fe66b39e347634ca28229851f4de1fd469bd8f327d79510e771f\",\n        },\n      ],\n    },\n    dependencies: [\n      {\n        contracts: [\n          {\n            contract: \"FungibleToken\",\n            networks: [\n              {\n                network: \"mainnet\",\n                address: \"0xf233dcee88fe0abe\",\n                dependency_pin_block_height: 70493190,\n                dependency_pin: {\n                  pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                  pin_self:\n                    \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                  pin_contract_name: \"FungibleToken\",\n                  pin_contract_address: \"0xf233dcee88fe0abe\",\n                  imports: [],\n                },\n              },\n              {\n                network: \"testnet\",\n                address: \"0x9a0766d93b6608b7\",\n                dependency_pin_block_height: 149595558,\n                dependency_pin: {\n                  pin: \"ac0208f93d07829ec96584d618ddbec6af3cf4e2866bd5071249e8ec93c7e0dc\",\n                  pin_self:\n                    \"cdadd5b5897f2dfe35d8b25f4e41fea9f8fca8f40f8a8b506b33701ef5033076\",\n                  pin_contract_name: \"FungibleToken\",\n                  pin_contract_address: \"0x9a0766d93b6608b7\",\n                  imports: [],\n                },\n              },\n              {\n                network: \"emulator\",\n                address: \"0xee82856bf20e2aa6\",\n                dependency_pin_block_height: 0,\n              },\n            ],\n          },\n        ],\n      },\n    ],\n    parameters: [\n      {\n        label: \"amount\",\n        index: 0,\n        type: \"UFix64\",\n        messages: [\n          {\n            key: \"title\",\n            i18n: [\n              {\n                tag: \"en-US\",\n                translation: \"Amount\",\n              },\n            ],\n          },\n          {\n            key: \"description\",\n            i18n: [\n              {\n                tag: \"en-US\",\n                translation: \"The amount of FLOW tokens to send\",\n              },\n            ],\n          },\n        ],\n      },\n      {\n        label: \"to\",\n        index: 1,\n        type: \"Address\",\n        messages: [\n          {\n            key: \"title\",\n            i18n: [\n              {\n                tag: \"en-US\",\n                translation: \"To\",\n              },\n            ],\n          },\n          {\n            key: \"description\",\n            i18n: [\n              {\n                tag: \"en-US\",\n                translation: \"The Flow account the tokens will go to\",\n              },\n            ],\n          },\n        ],\n      },\n    ],\n  },\n}\n\ndescribe(\"1.1.0, verify dependency pin same\", () => {\n  let consoleWarnSpy\n\n  beforeAll(() => {\n    consoleWarnSpy = jest.spyOn(console, \"warn\").mockImplementation(() => {})\n  })\n\n  afterAll(() => {\n    consoleWarnSpy.mockRestore()\n  })\n\n  test(\"v1.1.0, get dependency pin\", async () => {\n    config.put(\"flow.network\", \"mainnet\")\n    config.put(\"accessNode.api\", \"https://rest-mainnet.onflow.org\")\n\n    const isVerified = await verifyDependencyPinsSame({\n      template: template as any,\n      blockHeight: 70493190,\n      network: \"mainnet\",\n    })\n\n    expect(isVerified).toEqual(true)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/interaction-template-utils/verify-dependency-pin-same-at-block.ts",
    "content": "import {generateDependencyPin} from \"./generate-dependency-pin/generate-dependency-pin\"\nimport {invariant, block} from \"@onflow/sdk\"\nimport {log, LEVELS} from \"@onflow/util-logger\"\nimport {InteractionTemplate} from \"./interaction-template\"\n\nexport interface VerifyDependencyPinsSameParams {\n  template: InteractionTemplate\n  blockHeight?: number\n  network: string\n}\n\nexport interface VerifyDependencyPinsSameOpts {\n  [key: string]: any\n}\n\nexport interface VerifyDependencyPinsSameAtLatestSealedBlockParams {\n  template: InteractionTemplate\n  network: string\n}\n\n/**\n * @description Checks if an Interaction Template's pins match those generated at a block height\n *\n * @param params\n * @param params.template Interaction Template to check pins for\n * @param params.blockHeight Block height to check pins at\n * @param params.network Network to check pins on\n * @param opts\n * @returns Whether or not the pins match\n */\nexport async function verifyDependencyPinsSame(\n  {template, blockHeight, network}: VerifyDependencyPinsSameParams,\n  opts: VerifyDependencyPinsSameOpts = {}\n): Promise<boolean> {\n  invariant(\n    template != undefined,\n    \"generateDependencyPin({ template }) -- template must be defined\"\n  )\n  invariant(\n    typeof template === \"object\",\n    \"generateDependencyPin({ template }) -- template must be an object\"\n  )\n  invariant(\n    template.f_type === \"InteractionTemplate\",\n    \"generateDependencyPin({ template }) -- template must be an InteractionTemplate\"\n  )\n\n  invariant(\n    network != undefined,\n    \"generateDependencyPin({ network }) network must be defined\"\n  )\n  invariant(\n    blockHeight != undefined,\n    \"generateDependencyPin({ blockHeight }) blockHeight must be defined\"\n  )\n  invariant(\n    typeof blockHeight === \"number\",\n    \"generateDependencyPin({ blockHeight }) blockHeight must be a number\"\n  )\n\n  switch (template.f_version) {\n    case \"1.0.0\":\n      const templateDependenciesPlaceholderKeys = Object.keys(\n        template.data.dependencies\n      )\n\n      for (let templateDependencyPlaceholderKey of templateDependenciesPlaceholderKeys) {\n        const templateDependencyPlaceholder =\n          template.data.dependencies[templateDependencyPlaceholderKey]\n\n        const templateDependencyPlaceholderContractNames = Object.keys(\n          templateDependencyPlaceholder\n        )\n\n        for (let templateDependencyPlaceholderContractName of templateDependencyPlaceholderContractNames) {\n          const templateDependencyPlaceholderContractNetworks =\n            template.data.dependencies[templateDependencyPlaceholderKey][\n              templateDependencyPlaceholderContractName\n            ]\n\n          const templateDependency =\n            templateDependencyPlaceholderContractNetworks[network]\n          if (typeof templateDependency === \"undefined\") continue\n\n          const pin = await generateDependencyPin(\n            {\n              address: templateDependency.address,\n              contractName: templateDependency.contract,\n              blockHeight,\n            },\n            opts\n          )\n\n          if (pin !== templateDependency.pin) {\n            log({\n              title: \"verifyDependencyPinsSame Debug Error\",\n              message: `Could not recompute and match dependency pin.\n                                address: ${templateDependency.address} | contract: ${templateDependency.contract}\n                                computed: ${pin}\n                                template: ${templateDependency.pin}\n                            `,\n              level: LEVELS.debug,\n            })\n            return false\n          }\n        }\n      }\n\n      return true\n\n    case \"1.1.0\":\n      let isVerified = false\n      // iterate over each dependency\n      for (let i = 0; i < template.data?.dependencies.length; i++) {\n        const dependency = template.data?.dependencies[i]\n        // iterate over each contract in dependency\n        for (let j = 0; j < dependency?.contracts.length; j++) {\n          const contract = dependency?.contracts[j]\n          // iterate over each network in contract\n          for (let k = 0; k < contract?.networks.length; k++) {\n            const net = contract?.networks[k]\n            // if network matches, generate pin and compare\n            if (net.network === network) {\n              const pin = await generateDependencyPin(\n                {\n                  version: template.f_version,\n                  address: net.address,\n                  contractName: contract.contract,\n                  blockHeight,\n                },\n                opts\n              )\n\n              if (pin !== (net as any).dependency_pin.pin) {\n                log({\n                  title: \"verifyDependencyPinsSame Debug Error\",\n                  message: `Could not recompute and match dependency pin.\n                                    address: ${net.address} | contract: ${contract.contract}\n                                    computed: ${pin}\n                                    template: ${(net as any).pin}\n                                `,\n                  level: LEVELS.debug,\n                })\n                return false\n              } else {\n                isVerified = true\n              }\n            }\n          }\n        }\n      }\n      return isVerified\n\n    default:\n      throw new Error(\n        \"verifyDependencyPinsSame Error: Unsupported template version\"\n      )\n  }\n}\n\n/**\n * @description Checks if an Interaction Template's pins match those generated at the latest block height\n *\n * @param params\n * @param params.template Interaction Template to check pins for\n * @param params.network Network to check pins on\n * @param opts\n * @returns Whether or not the pins match\n */\nexport async function verifyDependencyPinsSameAtLatestSealedBlock(\n  {template, network}: VerifyDependencyPinsSameAtLatestSealedBlockParams,\n  opts: VerifyDependencyPinsSameOpts = {}\n): Promise<boolean> {\n  const latestSealedBlock = await block({sealed: true})\n  const latestSealedBlockHeight = latestSealedBlock?.height\n\n  return verifyDependencyPinsSame(\n    {template, network, blockHeight: latestSealedBlockHeight},\n    opts\n  )\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/__vsn.ts",
    "content": "export const SERVICE_PRAGMA = {\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const IDENTITY_PRAGMA = {\n  f_type: \"Identity\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const PROVIDER_PRAGMA = {\n  f_type: \"Provider\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const USER_PRAGMA = {\n  f_type: \"USER\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const POLLING_RESPONSE_PRAGMA = {\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const COMPOSITE_SIGNATURE_PRAGMA = {\n  f_type: \"CompositeSignature\",\n  f_vsn: \"1.0.0\",\n}\n\nexport const OPEN_ID_PRAGMA = {\n  f_type: \"OpenId\",\n  f_vsn: \"1.0.0\",\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/account-proof.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Normalizes an account-proof service to ensure compatibility with FCL service format\n *\n * @param service The account-proof service to normalize\n * @returns The normalized account-proof service or null\n *\n * @example\n * {\n *   \"f_type\": \"Service\",                    // Its a service!\n *   \"f_vsn\": \"1.0.0\",                       // Follows the v1.0.0 spec for the service\n *   \"type\": \"account-proof\",                // the type of service it is\n *   \"method\": \"DATA\",                       // Its data!\n *   \"uid\": \"awesome-wallet#account-proof\",  // A unique identifier for the service\n *   \"data\": {\n *     \"f_type\": \"account-proof\",\n *     \"f_vsn\": \"1.0.0\",\n *     \"nonce\": \"0A1BC2FF\",                  // Nonce signed by the current account-proof (minimum 32 bytes in total, i.e 64 hex characters)\n *     \"address\": \"0xUSER\",                  // The user's address (8 bytes, i.e 16 hex characters)\n *     \"signature\": CompositeSignature,      // address (sans-prefix), keyId, signature (hex)\n * }\n */\nexport function normalizeAccountProof(service: Service | null): Service | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    throw new Error(`FCL Normalizer Error: Invalid account-proof service`)\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/authn-refresh.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\n\nexport interface AuthnRefreshService extends Service {\n  id?: string\n  addr?: string\n  name?: string\n  icon?: string\n  authn?: string\n  pid?: string\n}\n\n/**\n * @description Normalizes an authn-refresh service to ensure compatibility with FCL service format\n *\n * @param service The authn-refresh service to normalize\n * @returns The normalized authn-refresh service or null\n *\n * @example\n * const service = normalizeAuthnRefresh({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"authn-refresh\",\n *   uid: \"uniqueDedupeKey\",\n *   endpoint: \"https://rawr\",\n *   method: \"HTTP/POST\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n *   id: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallets internal id for the user\n *   data: {}, // included in body of request\n *   params: {}, // included as query params on endpoint url\n * })\n */\nexport function normalizeAuthnRefresh(\n  service: AuthnRefreshService | null\n): AuthnRefreshService | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    throw new Error(\"Invalid authn-refresh service\")\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/authn.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\nimport {withPrefix} from \"@onflow/util-address\"\nimport {SERVICE_PRAGMA} from \"./__vsn\"\n\nexport interface AuthnService extends Service {\n  id?: string\n  addr?: string\n  name?: string\n  icon?: string\n  authn?: string\n  pid?: string\n}\n\n/**\n * @description Normalizes an authn service to ensure compatibility with FCL service format\n *\n * @param service The authn service to normalize\n * @returns The normalized authn service or null\n *\n * @example\n * const service = normalizeAuthn({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"authn\",\n *   uid: \"uniqueDedupeKey\",\n *   endpoint: \"https://rawr\",\n *   id: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallets internal id for the user\n *   identity: {\n *     address: \"0x____\"\n *   },\n *   provider: {\n *     address: \"0x____\",\n *     name: \"Best Wallet\",\n *     description: \"The Best Wallet\",\n *     icon: \"https://\",\n *   }\n * })\n */\nexport function normalizeAuthn(\n  service: AuthnService | null\n): AuthnService | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    return {\n      ...SERVICE_PRAGMA,\n      type: service.type,\n      uid: service.id,\n      endpoint: service.authn,\n      id: service.pid,\n      provider: {\n        address: withPrefix(service.addr!),\n        name: service.name,\n        icon: service.icon,\n      },\n    } as AuthnService\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/authz.ts",
    "content": "import {withPrefix} from \"@onflow/util-address\"\nimport {IDENTITY_PRAGMA, SERVICE_PRAGMA} from \"./__vsn\"\nimport {Service} from \"@onflow/typedefs\"\n\nexport interface AuthzService extends Service {\n  id?: string\n  addr?: string\n  keyId?: number\n  identity?: any\n}\n\n/**\n * @description Normalizes an authz service to ensure compatibility with FCL service format\n *\n * @param service The authz service to normalize\n * @returns The normalized authz service or null\n *\n * @example\n * const service = normalizeAuthz({\n *   f_type: \"service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"authz\",\n *   uid: \"uniqueDedupeKey\",\n *   endpoint: \"https://rawr\",\n *   method: \"HTTP/POST\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n *   identity: {\n *     address: \"0x______\",\n *     keyId: 0,\n *   },\n *   data: {}, // included in body of authz request\n *   params: {}, // included as query params on endpoint url\n * })\n */\nexport function normalizeAuthz(\n  service: AuthzService | null\n): AuthzService | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    return {\n      ...SERVICE_PRAGMA,\n      type: service.type,\n      uid: service.id,\n      endpoint: service.endpoint,\n      method: service.method,\n      identity: {\n        ...IDENTITY_PRAGMA,\n        address: withPrefix(service.addr!),\n        keyId: service.keyId,\n      },\n      params: service.params,\n      data: service.data,\n    } as AuthzService\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/back-channel-rpc.ts",
    "content": "import {SERVICE_PRAGMA} from \"./__vsn\"\nimport {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Normalizes a back-channel-rpc service to ensure compatibility with FCL service format\n *\n * @param service The back-channel-rpc service to normalize\n * @returns The normalized back-channel-rpc service or null\n *\n * @example\n * const service = normalizeBackChannelRpc({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"back-channel-rpc\",\n *   endpoint: \"https://rawr\",\n *   method: \"HTTP/GET\", // HTTP/GET | HTTP/POST\n *   data: {},           // included in body of rpc\n *   params: {},         // included as query params on endpoint url\n * })\n */\nexport function normalizeBackChannelRpc(\n  service: Service | null\n): Service | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    return {\n      ...SERVICE_PRAGMA,\n      type: \"back-channel-rpc\",\n      endpoint: service.endpoint,\n      method: service.method,\n      params: service.params || {},\n      data: service.data || {},\n    } as Service\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/composite-signature.ts",
    "content": "import {CompositeSignature} from \"@onflow/typedefs\"\nimport {sansPrefix} from \"@onflow/util-address\"\nimport {COMPOSITE_SIGNATURE_PRAGMA} from \"./__vsn\"\n\n/**\n * @description Normalizes a composite signature to ensure compatibility with FCL format\n *\n * @param resp The composite signature to normalize\n * @returns The normalized composite signature or null\n *\n * @example\n * const resp = normalizeCompositeSignature({\n *   f_type: \"CompositeSignature\",\n *   f_vsn: \"1.0.0\",\n *   addr: \"_____\",         // sans-prefix\n *   signature: \"adfe1234\", // hex\n *   keyId: 3,\n * })\n */\nexport function normalizeCompositeSignature(\n  resp: any\n): CompositeSignature | null {\n  if (resp == null) return null\n\n  if (!resp[\"f_vsn\"]) {\n    return {\n      ...COMPOSITE_SIGNATURE_PRAGMA,\n      addr: sansPrefix(resp.addr || (resp as any).address),\n      signature: resp.signature || (resp as any).sig,\n      keyId: resp.keyId,\n      ...(resp.extensionData ? {extensionData: resp.extensionData} : {}),\n    } as unknown as CompositeSignature\n  }\n\n  switch (resp[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return resp as unknown as CompositeSignature\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/frame.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\nimport {SERVICE_PRAGMA} from \"./__vsn\"\n\nexport interface FrameService extends Service {\n  old?: any\n}\n\n/**\n * @description Normalizes a frame service to ensure compatibility with FCL service format\n *\n * @param service The frame service to normalize\n * @returns The normalized frame service or null\n *\n * @example\n * const service = normalizeFrame({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"frame\",\n *   endpoint: \"https://rawr\",\n *   data: {},   // Sent to frame when ready\n *   params: {}, // include in query params on frame\n * })\n */\nexport function normalizeFrame(service: Service | null): FrameService | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    return {\n      old: service,\n      ...SERVICE_PRAGMA,\n      type: \"frame\",\n      endpoint: service.endpoint,\n      params: service.params || {},\n      data: service.data || {},\n    } as FrameService\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/local-view.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\nimport {SERVICE_PRAGMA} from \"./__vsn\"\n\n/**\n * @description Normalizes a local-view service to ensure compatibility with FCL format\n *\n * @param resp The local-view to normalize\n * @returns The normalized local-view or null\n *\n * @example\n * const service = normalizeLocalView({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"local-view\",\n *   method: \"VIEW/IFRAME\",\n *   endpoint: \"https://woot.org/authz/local\",\n *   data: {},\n *   params: {},\n * })\n */\nexport function normalizeLocalView(resp: Service | null): Service | null {\n  if (resp == null) return null\n  if (resp.method == null) {\n    resp = {...resp, type: \"local-view\", method: \"VIEW/IFRAME\"}\n  }\n\n  if (!resp[\"f_vsn\"]) {\n    return {\n      ...SERVICE_PRAGMA,\n      type: resp.type || \"local-view\",\n      method: resp.method,\n      endpoint: resp.endpoint,\n      data: resp.data || {},\n      params: resp.params || {},\n    } as Service\n  }\n\n  switch (resp[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return resp\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/open-id.ts",
    "content": "import {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Normalizes an open-id service to ensure compatibility with FCL service format\n *\n * @param service The open-id service to normalize\n * @returns The normalized open-id service or null\n *\n * @example\n * const service = normalizeOpenId({\n *   f_type: \"Service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"open-id\",\n *   uid: \"uniqueDedupeKey\",\n *   method: \"data\",\n *   data: {\n *      profile: {\n *        name: \"Bob\",\n *        family_name: \"Builder\",\n *        given_name: \"Robert\",\n *        middle_name: \"the\",\n *        nickname: \"Bob the Builder\",\n *        preferred_username: \"bob\",\n *        profile: \"https://www.bobthebuilder.com/\",\n *        picture: \"https://avatars.onflow.org/avatar/bob\",\n *        gender: \"...\",\n *        birthday: \"2001-01-18\",\n *        zoneinfo: \"America/Vancouver\",\n *        locale: \"en-us\",\n *        updated_at: \"1614970797388\"\n *      },\n *      email: {\n *        email: \"bob@bob.bob\",\n *        email_verified: true\n *      },\n *      address: {\n *        address: \"One Apple Park Way, Cupertino, CA 95014, USA\"\n *      },\n *      phone: {\n *        phone_number: \"+1 (xxx) yyy-zzzz\",\n *        phone_number_verified: true\n *      },\n *      social: {\n *        twitter: \"@_qvvg\",\n *        twitter_verified: true\n *      },\n *   }\n * })\n */\nexport function normalizeOpenId(service: Service | null): Service | null {\n  if (service == null) return null\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/polling-response.ts",
    "content": "import {CompositeSignature} from \"@onflow/typedefs\"\nimport {POLLING_RESPONSE_PRAGMA} from \"./__vsn\"\nimport {normalizeBackChannelRpc} from \"./back-channel-rpc\"\nimport {normalizeFrame} from \"./frame\"\n\nexport interface PollingResponse {\n  f_type: \"PollingResponse\"\n  f_vsn: \"1.0.0\"\n  status: \"PENDING\" | \"APPROVED\" | \"DECLINED\" | \"REDIRECT\"\n  reason: string | null\n  compositeSignature?: CompositeSignature\n  authorizationUpdates?: any\n  local: any\n  data?: any\n  updates?: any\n}\n\n/**\n * @description Normalizes a polling response to ensure compatibility with FCL format\n *\n * @param resp The polling response to normalize\n * @returns The normalized polling response or null\n *\n * @example\n * const resp = normalizePollingResponse({\n *   f_type: \"PollingResponse\",\n *   f_vsn: \"1.0.0\",\n *   status: \"PENDING\", // PENDING | APPROVED | DECLINED | REDIRECT\n *   reason: null,      // Reason for Declining Transaction\n *   data: null,        // Return value for APPROVED\n *   updates: BackChannelRpc,\n *   local: Frame,\n * })\n */\nexport function normalizePollingResponse(\n  resp: PollingResponse | null\n): PollingResponse | null {\n  if (resp == null) return null\n\n  if (!resp[\"f_vsn\"]) {\n    return {\n      ...POLLING_RESPONSE_PRAGMA,\n      status: resp.status ?? \"APPROVED\",\n      reason: resp.reason ?? null,\n      data: resp.compositeSignature || resp.data || {...resp} || {},\n      updates: normalizeBackChannelRpc(resp.authorizationUpdates),\n      local: normalizeFrame((resp.local || [])[0]),\n    } as PollingResponse\n  }\n\n  switch (resp[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return resp\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/pre-authz.ts",
    "content": "import {withPrefix} from \"@onflow/util-address\"\nimport {IDENTITY_PRAGMA, SERVICE_PRAGMA} from \"./__vsn\"\nimport {AuthzService} from \"./authz\"\n\n/**\n * @description Normalizes a pre-authz service to ensure compatibility with FCL service format\n *\n * @param service The pre-authz service to normalize\n * @returns The normalized pre-authz service or null\n *\n * @example\n * const service = normalizePreAuthz({\n *   f_type: \"service\",\n *   f_vsn: \"1.0.0\",\n *   type: \"pre-authz\",\n *   uid: \"uniqueDedupeKey\",\n *   endpoint: \"https://rawr\",\n *   method: \"HTTP/POST\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n *   identity: {\n *     address: \"0x______\",\n *     keyId: 0,\n *   },\n * })\n */\nexport function normalizePreAuthz(\n  service: AuthzService | null\n): AuthzService | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    return {\n      ...SERVICE_PRAGMA,\n      type: service.type,\n      uid: service.id,\n      endpoint: service.endpoint,\n      method: service.method,\n      identity: {\n        ...IDENTITY_PRAGMA,\n        address: withPrefix(service.addr!),\n        keyId: service.keyId,\n      },\n      params: service.params,\n      data: service.data,\n    } as AuthzService\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/service.ts",
    "content": "import {normalizeAuthn} from \"./authn\"\nimport {normalizeAuthz} from \"./authz\"\nimport {normalizePreAuthz} from \"./pre-authz\"\nimport {normalizeFrame} from \"./frame\"\nimport {normalizeBackChannelRpc} from \"./back-channel-rpc\"\nimport {normalizeOpenId} from \"./open-id\"\nimport {normalizeUserSignature} from \"./user-signature\"\nimport {normalizeLocalView} from \"./local-view\"\nimport {normalizeAccountProof} from \"./account-proof\"\nimport {normalizeAuthnRefresh} from \"./authn-refresh\"\nimport type {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Normalizes an array of services by applying type-specific normalization to each service.\n * This function processes multiple services in batch, applying the appropriate normalizer based on\n * each service's type, and filters out any services that fail normalization.\n *\n * @param services Array of services to normalize\n * @param data Optional additional data to pass to individual service normalizers\n * @returns Array of normalized services with invalid services filtered out\n *\n * @example\n * // Normalize multiple services from wallet discovery\n * const rawServices = [\n *   { type: \"authn\", endpoint: \"https://wallet.com/authn\", ... },\n *   { type: \"authz\", endpoint: \"https://wallet.com/authz\", ... },\n *   { type: \"user-signature\", endpoint: \"https://wallet.com/sign\", ... }\n * ]\n *\n * const normalizedServices = normalizeServices(rawServices)\n * console.log(\"Normalized services:\", normalizedServices)\n */\nexport function normalizeServices(services: Service[], data?: any): Service[] {\n  return services\n    .map(service => normalizeService(service, data))\n    .filter(Boolean)\n}\n\nconst serviceNormalizers: Record<\n  string,\n  (service: Service, data?: any) => any\n> = {\n  \"back-channel-rpc\": normalizeBackChannelRpc,\n  \"pre-authz\": normalizePreAuthz,\n  authz: normalizeAuthz,\n  authn: normalizeAuthn,\n  frame: normalizeFrame,\n  \"open-id\": normalizeOpenId,\n  \"user-signature\": normalizeUserSignature,\n  \"local-view\": normalizeLocalView,\n  \"account-proof\": normalizeAccountProof,\n  \"authn-refresh\": normalizeAuthnRefresh,\n}\n\n/**\n * @description Normalizes a single service by applying the appropriate type-specific normalizer.\n * This function looks up the correct normalizer based on the service type and applies it to\n * ensure the service conforms to expected formats and contains required fields.\n *\n * @param service The service object to normalize\n * @param data Optional additional data to pass to the service normalizer\n * @returns The normalized service object\n *\n * @example\n * // Normalize an authentication service\n * const rawService = {\n *   type: \"authn\",\n *   endpoint: \"https://wallet.example.com/authn\",\n *   method: \"HTTP/POST\",\n *   // ... other service properties\n * }\n *\n * const normalized = normalizeService(rawService)\n * console.log(\"Normalized service:\", normalized)\n */\nexport function normalizeService(service: Service, data?: any): Service {\n  try {\n    const normalized = serviceNormalizers[service.type](service, data)\n    return normalized\n  } catch (error) {\n    console.error(\n      `Unrecognized FCL Service Type [${service.type}]`,\n      service,\n      error\n    )\n    return service\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/normalizers/service/user-signature.ts",
    "content": "import type {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Normalizes a user-signature service to ensure compatibility with FCL service format\n *\n * @param service The user-signature service to normalize\n * @returns The normalized user-signature service or null\n *\n * @example\n * const service = {\n *   \"f_type\": \"Service\",\n *   \"f_vsn\": \"1.0.0\",\n *   \"type\": \"user-signature\",\n *   \"uid\": \"uniqueDedupeKey\",\n *   \"endpoint\": \"https://rawr\",\n *   \"method\": \"IFRAME/RPC\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n *   \"id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallets internal id for the user\n *   \"data\": {}, // included in body of user-signature request\n *   \"params\": {}, // included as query params on endpoint url\n * }\n */\nexport function normalizeUserSignature(\n  service: Service | null\n): Service | null {\n  if (service == null) return null\n\n  if (!service[\"f_vsn\"]) {\n    throw new Error(\"Invalid user-signature service\")\n  }\n\n  switch (service[\"f_vsn\"]) {\n    case \"1.0.0\":\n      return service\n\n    default:\n      return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/serialize/index.ts",
    "content": "import {\n  createSignableVoucher,\n  interaction,\n  InteractionBuilderFn,\n  pipe,\n} from \"@onflow/sdk\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nexport interface SerializeOptions {\n  resolve?: InteractionBuilderFn\n}\n\n/**\n * @description Serializes a Flow transaction or script to a JSON-formatted signable voucher that can be\n * used for offline signing or inspection. This is useful for creating signable transactions that can be\n * signed by external wallets or hardware devices.\n *\n * @param args Array of interaction builder functions or a pre-built interaction object. Builder functions are typically from @onflow/sdk such as\n * transaction(), script(), args(), proposer(), etc.\n * @param opts Optional configuration object\n * @param opts.resolve Custom resolve function to use instead of the default\n *\n * @returns A JSON string representation of the signable voucher that contains all\n * the transaction details needed for signing\n *\n * @example\n * // Serialize a simple transaction\n * import * as fcl from \"@onflow/fcl\"\n *\n * const voucher = await fcl.serialize([\n *   fcl.transaction`\n *     transaction(amount: UFix64, to: Address) {\n *       prepare(signer: AuthAccount) {\n *         // Transaction logic here\n *       }\n *     }\n *   `,\n *   fcl.args([\n *     fcl.arg(\"10.0\", fcl.t.UFix64),\n *     fcl.arg(\"0x01\", fcl.t.Address)\n *   ]),\n *   fcl.proposer(authz),\n *   fcl.payer(authz),\n *   fcl.authorizations([authz])\n * ])\n */\nexport function createSerialize(context: Pick<FCLContext, \"config\" | \"sdk\">) {\n  const serialize = async (\n    args: (InteractionBuilderFn | false)[] | Interaction,\n    opts: SerializeOptions = {}\n  ) => {\n    const resolveFunction = opts.resolve || context.sdk.resolve\n\n    if (Array.isArray(args)) args = await pipe(interaction(), args)\n\n    return JSON.stringify(\n      createSignableVoucher(await resolveFunction(args)),\n      null,\n      2\n    )\n  }\n\n  return serialize\n}\n\nexport const serialize = /* @__PURE__ */ createSerialize(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/test-utils/index.ts",
    "content": "export {\n  createMockContext,\n  createMockStorage,\n  createMockConfigService,\n  createMockCurrentUser,\n} from \"./mock-context\"\n"
  },
  {
    "path": "packages/fcl-core/src/test-utils/mock-context.ts",
    "content": "import type {FCLContext, ConfigService} from \"../context\"\nimport type {StorageProvider} from \"../utils/storage\"\nimport type {CurrentUserServiceApi} from \"../current-user\"\nimport * as sdk from \"@onflow/sdk\"\nimport type {createSdkClient} from \"@onflow/sdk\"\n\n/**\n * Creates a mock SDK client for testing\n *\n * This provides a fully mocked version of the SDK client with jest mock functions\n * for all methods. Each method is mocked to use the actual SDK implementation by default,\n * but you can override any method's behavior by providing custom implementations\n * in the overrides parameter.\n *\n * @example\n * // Mock the send method to return a specific response\n * const sdk = createMockSdkClient({\n *   send: jest.fn().mockResolvedValue({\n *     blockId: \"123\",\n *     transactionId: \"abc\"\n *   })\n * })\n *\n * @param overrides - Custom implementations for SDK methods\n * @returns A mocked SDK client instance\n */\nexport function createMockSdkClient(\n  overrides: Partial<ReturnType<typeof createSdkClient>> = {}\n): jest.Mocked<ReturnType<typeof createSdkClient>> {\n  // Create a mock for each SDK method we use\n  const mockSdk = {\n    send: jest.fn().mockResolvedValue({}),\n    decode: jest.fn().mockImplementation(sdk.decode),\n    subscribe: jest.fn().mockReturnValue(() => {}),\n    transaction: jest.fn().mockImplementation(sdk.transaction),\n    script: jest.fn().mockImplementation(sdk.script),\n    args: jest.fn().mockImplementation(sdk.args),\n    arg: jest.fn().mockImplementation(sdk.arg),\n    limit: jest.fn().mockImplementation(sdk.limit),\n    proposer: jest.fn().mockImplementation(sdk.proposer),\n    payer: jest.fn().mockImplementation(sdk.payer),\n    authorizations: jest.fn().mockImplementation(sdk.authorizations),\n    authorization: jest.fn().mockImplementation(sdk.authorization),\n    atBlockHeight: jest.fn().mockImplementation(sdk.atBlockHeight),\n    atBlockId: jest.fn().mockImplementation(sdk.atBlockId),\n    getAccount: jest.fn().mockImplementation(sdk.getAccount),\n    getEvents: jest.fn().mockImplementation(sdk.getEvents),\n    getEventsAtBlockHeightRange: jest\n      .fn()\n      .mockImplementation(sdk.getEventsAtBlockHeightRange),\n    getEventsAtBlockIds: jest.fn().mockImplementation(sdk.getEventsAtBlockIds),\n    getBlock: jest.fn().mockImplementation(sdk.getBlock),\n    getBlockHeader: jest.fn().mockImplementation(sdk.getBlockHeader),\n    getCollection: jest.fn().mockImplementation(sdk.getCollection),\n    getTransactionStatus: jest\n      .fn()\n      .mockImplementation(sdk.getTransactionStatus),\n    getTransaction: jest.fn().mockImplementation(sdk.getTransaction),\n    getNetworkParameters: jest\n      .fn()\n      .mockImplementation(sdk.getNetworkParameters),\n    ...overrides,\n  } as any\n\n  return mockSdk\n}\n\n/**\n * Creates an in-memory storage provider for testing\n */\nexport function createMockStorage(): StorageProvider {\n  const store = new Map<string, any>()\n  return {\n    can: true,\n    get: async (key: string) => store.get(key),\n    put: async (key: string, value: any) => {\n      store.set(key, value)\n    },\n    removeItem: async (key: string) => {\n      store.delete(key)\n    },\n  }\n}\n\n/**\n * Creates a mock config service for testing\n */\nexport function createMockConfigService(\n  initialValues: Record<string, any> = {}\n): ConfigService {\n  const configStore = new Map<string, any>(Object.entries(initialValues))\n  const subscribers = new Set<(config: Record<string, any>) => void>()\n\n  const configService: ConfigService = {\n    get: async (key: string, defaultValue?: any) => {\n      return configStore.has(key) ? configStore.get(key) : defaultValue\n    },\n    put: async (key: string, value: any) => {\n      configStore.set(key, value)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    update: async (key: string, updateFn: (oldValue: any) => any) => {\n      const oldValue = configStore.get(key)\n      const newValue = updateFn(oldValue)\n      configStore.set(key, newValue)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    delete: async (key: string) => {\n      configStore.delete(key)\n      subscribers.forEach(fn => fn(configStore))\n      return configService\n    },\n    where: async (pattern: RegExp) => {\n      const result: Record<string, any> = {}\n      for (const [key, value] of configStore.entries()) {\n        if (pattern.test(key)) {\n          result[key] = value\n        }\n      }\n      return result\n    },\n    first: async (keys: string[], defaultValue?: any) => {\n      if (typeof keys === \"string\") keys = [keys]\n      for (const key of keys) {\n        if (configStore.has(key)) {\n          return configStore.get(key)\n        }\n      }\n      return defaultValue\n    },\n    subscribe: (callback: (config: Record<string, any>) => void) => {\n      subscribers.add(callback)\n      return () => {\n        subscribers.delete(callback)\n      }\n    },\n    all: async () => {\n      return Object.fromEntries(configStore.entries())\n    },\n  }\n\n  return configService\n}\n\n/**\n * Creates a mock current user for testing\n */\nexport function createMockCurrentUser(\n  override: Partial<CurrentUserServiceApi> = {}\n): CurrentUserServiceApi {\n  return {\n    authenticate: jest.fn().mockResolvedValue({}),\n    unauthenticate: jest.fn().mockResolvedValue({}),\n    authorization: jest.fn().mockResolvedValue({}),\n    signUserMessage: jest.fn().mockResolvedValue([]),\n    subscribe: jest.fn().mockReturnValue(() => {}),\n    snapshot: jest.fn().mockResolvedValue({}),\n    resolveArgument: jest.fn().mockResolvedValue(\"0x0\"),\n    ...override,\n  }\n}\n\n/**\n * Creates a fully mocked FCL context for testing\n *\n * This creates a complete mock context with all dependencies needed for testing FCL\n * functions that require an FCLContext. Each component (storage, config, currentUser, sdk)\n * is mocked with reasonable defaults that can be customized through the options parameter.\n *\n * @example\n * // Create a mock context with customized config values and SDK behavior\n * const context = createMockContext({\n *   configValues: {\n *     \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n *     \"flowNetwork\": \"testnet\"\n *   },\n *   sdkOverrides: {\n *     send: jest.fn().mockResolvedValue({ ... }),\n *     getAccount: jest.fn().mockResolvedValue({ ... })\n *   }\n * })\n *\n * // Use with a context-aware function\n * const result = await myContextAwareFunction(context)\n */\nexport function createMockContext(\n  options: {\n    configValues?: {\n      platform?: string\n      discoveryWallet?: string\n      discoveryWalletMethod?: string\n      defaultComputeLimit?: number\n      flowNetwork?: string\n      serviceOpenIdScopes?: string[]\n      walletconnectProjectId?: string\n      walletconnectDisableNotifications?: boolean\n      \"accessNode.api\"?: string\n      \"fcl.limit\"?: number\n      \"discovery.authn.endpoint\"?: string\n      \"discovery.authn.include\"?: string[]\n      \"discovery.authn.exclude\"?: string[]\n      \"discovery.features.suggested\"?: string[]\n      \"fcl.authz\"?: any\n      [key: string]: any // Allow additional custom config values\n    }\n    currentUser?: Partial<CurrentUserServiceApi>\n    storage?: StorageProvider\n    sdkOverrides?: Partial<ReturnType<typeof createSdkClient>>\n  } = {}\n) {\n  const storage = options.storage || createMockStorage()\n  const config = createMockConfigService(options.configValues || {})\n  const currentUser = createMockCurrentUser(options.currentUser || {})\n  const sdk = createMockSdkClient(options.sdkOverrides || {})\n\n  return {\n    storage,\n    config,\n    currentUser,\n    sdk,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/constants.ts",
    "content": "export const TXID_REGEXP = /^[0-9a-fA-F]{64}$/\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/index.ts",
    "content": "export {TransactionError} from \"./transaction-error\"\nexport {transaction, createTransaction} from \"./transaction\"\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/legacy-polling.js",
    "content": "import \"../default-config\"\nimport {\n  spawn,\n  subscriber,\n  snapshoter,\n  UPDATED,\n  SNAPSHOT,\n  INIT,\n  SUBSCRIBE,\n  UNSUBSCRIBE,\n} from \"@onflow/util-actor\"\nimport {send as fclSend, decode, getTransactionStatus} from \"@onflow/sdk\"\nimport {HTTPRequestError} from \"@onflow/transport-http\"\nimport {grpc} from \"@improbable-eng/grpc-web\"\nimport {TransactionError} from \"./transaction-error\"\nimport {\n  scoped,\n  isDiff,\n  isUnknown,\n  isPending,\n  isFinalized,\n  isExecuted,\n  isSealed,\n  isExpired,\n} from \"./utils\"\nimport {TXID_REGEXP} from \"./constants\"\n\nconst POLL = \"POLL\"\nconst TIMEOUT = \"TIMEOUT\"\n\n/**\n * @typedef {import(\"@onflow/typedefs\").Transaction} Transaction\n */\n\n/**\n * @typedef {import(\"@onflow/typedefs\").TransactionStatus} TransactionStatus\n */\n\n/**\n * Check if a transaction ID is a scheduled transaction ID (UInt64 format)\n * Scheduled transaction IDs are numeric strings that are NOT 64 characters\n * (to avoid collision with all-digit transaction hashes)\n */\nfunction isScheduledTransactionId(txId) {\n  return /^\\d+$/.test(txId) && txId.length !== 64\n}\n\nconst fetchTxStatus = async transactionId => {\n  return fclSend([getTransactionStatus(transactionId)]).then(decode)\n}\n\nconst makeHandlers = (opts = {}) => ({\n  [INIT]: async ctx => {\n    setTimeout(() => ctx.sendSelf(TIMEOUT), opts.txNotFoundTimeout)\n    ctx.sendSelf(POLL)\n  },\n  [SUBSCRIBE]: (ctx, letter) => {\n    ctx.subscribe(letter.from)\n    ctx.send(letter.from, UPDATED, {...ctx.all()})\n  },\n  [UNSUBSCRIBE]: (ctx, letter) => {\n    ctx.unsubscribe(letter.from)\n  },\n  [SNAPSHOT]: async (ctx, letter) => {\n    letter.reply({...ctx.all()})\n  },\n  [TIMEOUT]: async ctx => {\n    // If status is still unknown, send a timeout error\n    if (Object.keys(ctx.all()).length === 0) {\n      ctx.fatalError(\n        new Error(\n          `TX status polling failed: no transaction was found within timeout interval (${opts.txNotFoundTimeout}ms)`\n        )\n      )\n    }\n  },\n  [POLL]: async ctx => {\n    // Helper to queue another poll\n    const poll = () => setTimeout(() => ctx.sendSelf(POLL), opts.pollRate)\n\n    let tx\n    const prevTx = {...ctx.all()}\n    try {\n      tx = await fetchTxStatus(ctx.self())\n    } catch (e) {\n      const isHttpNotFound =\n        e instanceof HTTPRequestError && e.statusCode === 404\n      const isGrpcNotFound = e.code === grpc.Code.NotFound\n\n      // If TX is not found, suppress error and poll again\n      if (isHttpNotFound || isGrpcNotFound) {\n        return poll()\n      }\n\n      return ctx.fatalError(e)\n    }\n\n    if (!isSealed(tx)) poll()\n    if (isDiff(prevTx, tx)) ctx.broadcast(UPDATED, {...tx})\n    ctx.merge(tx)\n  },\n})\n\nconst spawnTransaction =\n  (opts = {}) =>\n  transactionId => {\n    return spawn(makeHandlers(opts), scoped(transactionId))\n  }\n\n/**\n * Provides methods for interacting with a transaction\n *\n * @param {string} transactionId - The transaction ID\n * @param {object} [opts] - Optional parameters\n * @param {number} [opts.pollRate=1000] - Polling rate in milliseconds\n * @param {number} [opts.txNotFoundTimeout=12500] - Timeout in milliseconds for ignoring transaction not found errors (do not modify unless you know what you are doing)\n * @returns {{\n *    snapshot: function(): Promise<TransactionStatus>,\n *    subscribe: function(SubscriptionCallback): function(): void,\n *    onceFinalized: function(): Promise<TransactionStatus>,\n *    onceExecuted: function(): Promise<TransactionStatus>,\n *    onceSealed: function(): Promise<TransactionStatus>\n * }}\n * @throws {Error} If transactionId is not a 64 byte hash string\n */\nexport function transaction(\n  transactionId,\n  opts = {txNotFoundTimeout: 12500, pollRate: 1000}\n) {\n  // Validate transactionId format\n  // Must be either:\n  // 1. A 64-character hex hash (normal transaction), OR\n  // 2. A numeric string that's not 64 chars (scheduled transaction UInt64)\n  const scopedId = scoped(transactionId)\n  const isValidHash = TXID_REGEXP.test(scopedId)\n  const isScheduledTxId = isScheduledTransactionId(scopedId)\n\n  if (!isValidHash && !isScheduledTxId) {\n    throw new Error(\"Invalid transactionId\")\n  }\n\n  function snapshot() {\n    return snapshoter(transactionId, spawnTransaction(opts))\n  }\n\n  function subscribe(callback) {\n    return subscriber(scoped(transactionId), spawnTransaction(opts), callback)\n  }\n\n  function once(predicate) {\n    return function innerOnce(opts = {}) {\n      const suppress = opts.suppress || false\n      return new Promise((resolve, reject) => {\n        const unsub = subscribe((txStatus, error) => {\n          if ((error || txStatus.statusCode) && !suppress) {\n            if (error != null) {\n              reject(error)\n              unsub()\n            } else if (txStatus.statusCode === 1) {\n              const transactionError = TransactionError.fromErrorMessage(\n                txStatus.errorMessage\n              )\n              reject(transactionError)\n              unsub()\n            }\n            return\n          }\n\n          if (predicate(txStatus)) {\n            resolve(txStatus)\n            unsub()\n          }\n        })\n      })\n    }\n  }\n\n  return {\n    snapshot,\n    subscribe,\n    onceFinalized: once(isFinalized),\n    onceExecuted: once(isExecuted),\n    onceSealed: once(isSealed),\n  }\n}\n\ntransaction.isUnknown = isUnknown\ntransaction.isPending = isPending\ntransaction.isFinalized = isFinalized\ntransaction.isExecuted = isExecuted\ntransaction.isSealed = isSealed\ntransaction.isExpired = isExpired\n\nexport {TransactionError}\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/legacy-polling.test.js",
    "content": "import {HTTPRequestError} from \"@onflow/transport-http\"\nimport {transaction} from \"./legacy-polling\"\nimport {config} from \"@onflow/config\"\n\ndescribe(\"transaction\", () => {\n  let currentId = 0\n  let txId = null\n\n  beforeEach(() => {\n    // unique txId for each test case\n    txId = String(currentId++).toString(16).padStart(64, \"0\")\n  })\n\n  test(\"should throw if transactionId is not a 64 byte hash\", () => {\n    expect(() => transaction(\"not a 64 byte hash\")).toThrow(\n      \"Invalid transactionId\"\n    )\n  })\n\n  test(\"should ignore not found errors\", async () => {\n    const mockStatus = {\n      status: 1,\n      events: [],\n    }\n    let requestCount = 0\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": (ix, context) => {\n          if (requestCount++ === 0)\n            throw new HTTPRequestError({\n              statusCode: 404,\n              responseStatusText: \"Not Found\",\n            })\n\n          return {\n            ...context.response(),\n            tag: ix.tag,\n            transactionStatus: mockStatus,\n          }\n        },\n      },\n      async () => {\n        const tx = transaction(txId)\n        let receivedVal = null\n        await new Promise(resolve => {\n          const unsub = tx.subscribe(x => {\n            if (requestCount < 2) return\n            receivedVal = x\n            unsub()\n            resolve()\n          })\n        })\n        expect(receivedVal).toEqual(mockStatus)\n      }\n    )\n  }, 10000)\n\n  test(\"no timeout if valid transaction status has been received\", async () => {\n    // Set timeout short so we don't have to wait long\n    const txNotFoundTimeout = 100\n    // If we make it past the timeout, we know that polling continues as it should\n    const waitTime = 1000\n\n    const mockStatus = {\n      status: 1,\n      events: [],\n    }\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": (ix, context) => {\n          return {\n            ...context.response(),\n            tag: ix.tag,\n            transactionStatus: mockStatus,\n          }\n        },\n      },\n      async () => {\n        const tx = transaction(txId, {txNotFoundTimeout})\n\n        await expect(\n          new Promise((resolve, reject) => {\n            // If we make it past the timeout, we know that polling continues\n            setTimeout(() => {\n              resolve()\n              unsub()\n            }, waitTime)\n\n            const unsub = tx.subscribe((_, err) => {\n              if (err) {\n                unsub()\n                reject(err)\n              }\n            })\n          })\n        ).resolves.toBeUndefined()\n      }\n    )\n  })\n\n  test(\"initial subscribe value is not mutated by subsequent polls\", async () => {\n    let pollCount = 0\n\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": (ix, context) => {\n          const status = pollCount++ === 0 ? 1 : 4\n          return {\n            ...context.response(),\n            tag: ix.tag,\n            transactionStatus: {status, statusCode: 0, events: []},\n          }\n        },\n      },\n      async () => {\n        const tx = transaction(txId, {pollRate: 50, txNotFoundTimeout: 5000})\n        let firstValue = null\n\n        await new Promise(resolve => {\n          const unsub = tx.subscribe((val, err) => {\n            if (err || !val || val.status == null) return\n            if (!firstValue) {\n              firstValue = val\n            } else if (val.status === 4) {\n              unsub()\n              resolve()\n            }\n          })\n        })\n\n        expect(firstValue.status).toBe(1)\n      }\n    )\n  }, 15000)\n\n  test(\"snapshot returns a copy, not the internal state\", async () => {\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": (ix, context) => ({\n          ...context.response(),\n          tag: ix.tag,\n          transactionStatus: {status: 1, statusCode: 0, events: []},\n        }),\n      },\n      async () => {\n        const tx = transaction(txId, {pollRate: 50, txNotFoundTimeout: 5000})\n\n        const a = await new Promise(resolve => {\n          const unsub = tx.subscribe((val, err) => {\n            if (err || !val || val.status == null) return\n            unsub()\n            resolve(tx.snapshot())\n          })\n        })\n        const b = await tx.snapshot()\n\n        expect(a).not.toBe(b)\n        expect(a).toEqual(b)\n      }\n    )\n  }, 15000)\n\n  test(\"broadcast values are not shared references\", async () => {\n    let pollCount = 0\n\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": (ix, context) => {\n          const status = Math.min(++pollCount, 4)\n          return {\n            ...context.response(),\n            tag: ix.tag,\n            transactionStatus: {status, statusCode: 0, events: []},\n          }\n        },\n      },\n      async () => {\n        const tx = transaction(txId, {pollRate: 50, txNotFoundTimeout: 5000})\n        const received = []\n\n        await new Promise(resolve => {\n          const unsub = tx.subscribe((val, err) => {\n            if (err || !val || val.status == null) return\n            received.push(val)\n            if (val.status === 4) {\n              unsub()\n              resolve()\n            }\n          })\n        })\n\n        for (let i = 0; i < received.length; i++) {\n          for (let j = i + 1; j < received.length; j++) {\n            expect(received[i]).not.toBe(received[j])\n          }\n        }\n      }\n    )\n  }, 15000)\n\n  test(\"timeout if no valid transaction status has been received\", async () => {\n    // Set timeout short so we don't have to wait long\n    const txNotFoundTimeout = 100\n    // If we make it past the timeout, we know that polling continues (which is not what we want)\n    const waitTime = 1000\n\n    await config.overload(\n      {\n        \"accessNode.api\": \"http://example.com\",\n        \"sdk.transport\": () => {\n          // only 404s will be thrown\n          throw new HTTPRequestError({\n            statusCode: 404,\n            responseStatusText: \"Not Found\",\n          })\n        },\n      },\n      async () => {\n        const tx = transaction(txId, {txNotFoundTimeout})\n\n        await expect(\n          new Promise((resolve, reject) => {\n            // If we make it past the timeout, we know that polling continues\n            setTimeout(() => {\n              resolve()\n              unsub()\n            }, waitTime)\n\n            const unsub = tx.subscribe((_, err) => {\n              if (err) {\n                console.log(err)\n                unsub()\n                reject(err)\n              }\n            })\n          })\n        ).rejects.toThrowError(\n          `TX status polling failed: no transaction was found within timeout interval (${txNotFoundTimeout}ms)`\n        )\n      }\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/transaction-error.test.ts",
    "content": "import {FvmErrorCode} from \"@onflow/typedefs\"\nimport {TransactionError} from \"./transaction-error\"\n\ndescribe(\"TransactionError\", () => {\n  describe(\"fromErrorMessage\", () => {\n    test(\"returns unknown error if no code exists\", () => {\n      const errorMessage = \"Transaction rejected by the network\"\n      const error = TransactionError.fromErrorMessage(errorMessage)\n      expect(error).toBeInstanceOf(TransactionError)\n      expect(error.code).toEqual(FvmErrorCode.UNKNOWN_ERROR)\n      expect(error.type).toEqual(\"UNKNOWN_ERROR\")\n    })\n\n    test(\"parses transaction error with code from status\", () => {\n      const errorMessage = \"[Error Code: 1101] Some Cadence Error\"\n      const error = TransactionError.fromErrorMessage(errorMessage)\n      expect(error).toBeInstanceOf(TransactionError)\n      expect(error.code).toEqual(FvmErrorCode.CADENCE_RUNTIME_ERROR)\n      expect(error.type).toEqual(\"CADENCE_RUNTIME_ERROR\")\n    })\n\n    test(\"uses first instance of error code in message\", () => {\n      const errorMessage =\n        \"[Error Code: 1102] Unsupported value... [Error Code: 1105] Something else to say\"\n      const error = TransactionError.fromErrorMessage(errorMessage)\n      expect(error).toBeInstanceOf(TransactionError)\n      expect(error.code).toEqual(FvmErrorCode.ENCODING_UNSUPPORTED_VALUE)\n      expect(error.type).toEqual(\"ENCODING_UNSUPPORTED_VALUE\")\n    })\n\n    test(\"allows leading text before error code\", () => {\n      const errorMessage =\n        \"This is a message [Error Code: 1102] Unsupported value\"\n      const error = TransactionError.fromErrorMessage(errorMessage)\n      expect(error).toBeInstanceOf(TransactionError)\n      expect(error.code).toEqual(FvmErrorCode.ENCODING_UNSUPPORTED_VALUE)\n      expect(error.type).toEqual(\"ENCODING_UNSUPPORTED_VALUE\")\n    })\n\n    test(\"returns unknown error for missing error message\", () => {\n      const errorMessage = \"\"\n      const error = TransactionError.fromErrorMessage(errorMessage)\n      expect(error).toBeInstanceOf(TransactionError)\n      expect(error.code).toEqual(FvmErrorCode.UNKNOWN_ERROR)\n      expect(error.type).toEqual(\"UNKNOWN_ERROR\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/transaction-error.ts",
    "content": "import {FvmErrorCode} from \"@onflow/typedefs\"\n\nconst ERROR_CODE_REGEX = /\\[Error Code: (\\d+)\\]/\n\nexport class TransactionError extends Error {\n  public code: FvmErrorCode\n  public type: string\n\n  private constructor(message: string, code: FvmErrorCode) {\n    super(message)\n    this.code = code\n    this.type = FvmErrorCode[code]\n  }\n\n  static fromErrorMessage(errorMessage: string): TransactionError {\n    const match = errorMessage.match(ERROR_CODE_REGEX)\n    const code = match ? parseInt(match[1], 10) : undefined\n\n    return new TransactionError(\n      errorMessage,\n      code || FvmErrorCode.UNKNOWN_ERROR\n    )\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/transaction.test.ts",
    "content": "import {subscribe} from \"@onflow/sdk\"\nimport {SubscriptionsNotSupportedError} from \"@onflow/sdk\"\nimport {SubscriptionTopic, TransactionExecutionStatus} from \"@onflow/typedefs\"\nimport {transaction} from \"./transaction\"\nimport {transaction as legacyTransaction} from \"./legacy-polling\"\nimport {createGetChainId} from \"../utils\"\n\njest.mock(\"@onflow/sdk\")\njest.mock(\"./legacy-polling\")\njest.mock(\"../utils\")\n\ndescribe(\"transaction\", () => {\n  let mockGetChainId: jest.MockedFunction<() => Promise<string>>\n  beforeEach(() => {\n    jest.clearAllMocks()\n\n    jest.mocked(subscribe).mockReturnValue({\n      unsubscribe: jest.fn(),\n    })\n\n    jest.mocked(legacyTransaction).mockReturnValue({\n      subscribe: jest.fn(),\n      onceExecuted: jest.fn(),\n      onceSealed: jest.fn(),\n      onceFinalized: jest.fn(),\n      snapshot: jest.fn(),\n    })\n\n    mockGetChainId = jest.fn().mockResolvedValue(\"mainnet\")\n    jest.mocked(createGetChainId).mockReturnValue(mockGetChainId)\n  })\n\n  test(\"should throw an error if transactionId is not a 64 byte hash string\", () => {\n    const {transaction} = require(\"./transaction\")\n\n    const actual = () => transaction(\"invalid-transaction-id\")\n    expect(actual).toThrow(\"Invalid transactionId\")\n  })\n\n  test(\"subscribe should report transaction status\", async () => {\n    const txId =\n      \"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"\n    const callback = jest.fn()\n    const unsubscribe = transaction(txId).subscribe(callback)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Expect the subscribe method to be called with the correct parameters\n    const subscribeParams = jest.mocked(subscribe).mock\n      .calls[0][0] as Parameters<\n      typeof subscribe<SubscriptionTopic.TRANSACTION_STATUSES>\n    >[0]\n\n    expect(subscribeParams).toStrictEqual({\n      topic: SubscriptionTopic.TRANSACTION_STATUSES,\n      args: {transactionId: txId},\n      onData: expect.any(Function),\n      onError: expect.any(Function),\n    })\n\n    // Mock the observable to emit a PENDING status\n    subscribeParams.onData({\n      status: TransactionExecutionStatus.PENDING,\n      blockId: \"\",\n      statusCode: 0,\n      errorMessage: \"\",\n      events: [],\n      statusString: \"PENDING\",\n    })\n\n    // Mock the observable to emit a SEALED status\n    subscribeParams.onData({\n      status: TransactionExecutionStatus.SEALED,\n      blockId: \"\",\n      statusCode: 0,\n      errorMessage: \"\",\n      events: [],\n      statusString: \"SEALED\",\n    })\n\n    // Expect all subscription data to be reported\n    expect(callback.mock.calls).toStrictEqual([\n      [\n        {\n          blockId: \"\",\n          status: TransactionExecutionStatus.UNKNOWN,\n          statusString: \"\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n        },\n      ],\n      [\n        {\n          status: TransactionExecutionStatus.PENDING,\n          blockId: \"\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n          statusString: \"PENDING\",\n        },\n      ],\n      [\n        {\n          status: TransactionExecutionStatus.SEALED,\n          blockId: \"\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n          statusString: \"SEALED\",\n        },\n      ],\n    ])\n\n    unsubscribe()\n  })\n\n  test(\"subscribe should report an error if the transactionId is invalid\", async () => {\n    const txId = \"INVALID_TRANSACTION_ID\"\n\n    expect(() => transaction(txId)).toThrow(\"Invalid transactionId\")\n  })\n\n  test(\"should unsubscribe once the transaction has sealed\", async () => {\n    jest.resetModules()\n    const txId =\n      \"4234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"\n    const callback = jest.fn()\n    transaction(txId).subscribe(callback)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Mock the observable to emit a SEALED status\n    const subscribeParams = jest.mocked(subscribe).mock\n      .calls[0][0] as Parameters<\n      typeof subscribe<SubscriptionTopic.TRANSACTION_STATUSES>\n    >[0]\n\n    subscribeParams.onData({\n      status: TransactionExecutionStatus.PENDING,\n      blockId: \"\",\n      statusCode: 0,\n      errorMessage: \"\",\n      events: [],\n      statusString: \"PENDING\",\n    })\n\n    subscribeParams.onData({\n      status: TransactionExecutionStatus.SEALED,\n      blockId: \"\",\n      statusCode: 0,\n      errorMessage: \"\",\n      events: [],\n      statusString: \"SEALED\",\n    })\n\n    await new Promise(resolve => setTimeout(resolve, 100))\n\n    const unsubMock = jest.mocked(subscribe).mock.results[0].value\n    expect(unsubMock.unsubscribe).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"subscribe should fallback to polling if real-time streaming is not supported\", async () => {\n    const txId =\n      \"2234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"\n    const onData = jest.fn()\n    const onError = jest.fn()\n    const unsubscribe = transaction(txId).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Expect the subscribe method to be called with the correct parameters\n    const subscribeParams = jest.mocked(subscribe).mock\n      .calls[0][0] as Parameters<\n      typeof subscribe<SubscriptionTopic.TRANSACTION_STATUSES>\n    >[0]\n\n    expect(subscribeParams).toStrictEqual({\n      topic: SubscriptionTopic.TRANSACTION_STATUSES,\n      args: {transactionId: txId},\n      onData: expect.any(Function),\n      onError: expect.any(Function),\n    })\n\n    // Mock the observable to emit an error\n    subscribeParams.onError(new SubscriptionsNotSupportedError())\n\n    // Expect the error to be reported\n    expect(onData.mock.calls).toStrictEqual([\n      [\n        {\n          blockId: \"\",\n          status: TransactionExecutionStatus.UNKNOWN,\n          statusString: \"\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n        },\n      ],\n    ])\n    expect(onError).not.toHaveBeenCalled()\n\n    expect(legacyTransaction).toHaveBeenCalledWith(txId, {\n      pollRate: 1000,\n      txNotFoundTimeout: 12500,\n    })\n\n    unsubscribe()\n  })\n\n  test(\"should fall back to legacy polling if the Flow emulator is detected\", async () => {\n    mockGetChainId.mockResolvedValue(\"local\")\n\n    const txId =\n      \"3234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"\n    const onData = jest.fn()\n    const onError = jest.fn()\n    const unsubscribe = transaction(txId).subscribe(onData, onError)\n\n    // Flush the event loop\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    // Expect legacy polling to be called\n    expect(subscribe).not.toHaveBeenCalled()\n    expect(legacyTransaction).toHaveBeenCalledWith(txId, {\n      pollRate: 1000,\n      txNotFoundTimeout: 12500,\n    })\n\n    // Expect the legacy subscribe method to be called with the correct parameters\n    const legacySubscribe =\n      jest.mocked(legacyTransaction).mock.results[0].value.subscribe\n    expect(legacySubscribe).toHaveBeenCalledTimes(1)\n    expect(legacySubscribe).toHaveBeenCalledWith(expect.any(Function))\n\n    // Get the callback function\n    const legacyCallback = legacySubscribe.mock.calls[0][0]\n\n    // Mock the observable to emit a PENDING status\n    legacyCallback(\n      {\n        blockId: \"\",\n        status: TransactionExecutionStatus.PENDING,\n        statusString: \"PENDING\",\n        statusCode: 0,\n        errorMessage: \"\",\n        events: [],\n      },\n      null\n    )\n\n    // Expect the error to be reported\n    expect(onData.mock.calls).toStrictEqual([\n      [\n        {\n          blockId: \"\",\n          status: TransactionExecutionStatus.UNKNOWN,\n          statusString: \"\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n        },\n      ],\n      [\n        {\n          blockId: \"\",\n          status: TransactionExecutionStatus.PENDING,\n          statusString: \"PENDING\",\n          statusCode: 0,\n          errorMessage: \"\",\n          events: [],\n        },\n      ],\n    ])\n    expect(onError).not.toHaveBeenCalled()\n\n    expect(legacyTransaction).toHaveBeenCalledWith(txId, {\n      pollRate: 1000,\n      txNotFoundTimeout: 12500,\n    })\n\n    unsubscribe()\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/transaction.ts",
    "content": "import \"../default-config\"\nimport {\n  SubscriptionTopic,\n  TransactionExecutionStatus,\n  TransactionStatus,\n} from \"@onflow/typedefs\"\nimport {\n  isDiff,\n  isExecuted,\n  isExpired,\n  isFinalized,\n  isPending,\n  isSealed,\n  scoped,\n} from \"./utils\"\nimport {TXID_REGEXP} from \"./constants\"\nimport {isUnknown, SubscriptionsNotSupportedError} from \"@onflow/sdk\"\nimport {TransactionError} from \"./transaction-error\"\nimport {transaction as legacyTransaction} from \"./legacy-polling\"\nimport {createGetChainId} from \"../utils\"\nimport {FCLContext} from \"../context\"\nimport {createPartialGlobalFCLContext} from \"../context/global\"\n\nconst FLOW_EMULATOR = \"local\"\n\n// Map of transaction observables\n// Used for shared global singleton to prevent duplicate subscriptions\nconst registry = new Map<string, ReturnType<typeof createObservable>>()\n\n/**\n * Check if a transaction ID is a scheduled transaction ID (UInt64 format)\n * Scheduled transaction IDs are numeric strings that are NOT 64 characters\n * (to avoid collision with all-digit transaction hashes)\n */\nfunction isScheduledTransactionId(txId: string): boolean {\n  return /^\\d+$/.test(txId) && txId.length !== 64\n}\n\nexport function createTransaction(context: Pick<FCLContext, \"sdk\" | \"config\">) {\n  /**\n   * @description Creates a transaction monitor that provides methods for tracking and subscribing to\n   * transaction status updates on the Flow blockchain. This function returns an object with methods\n   * to get snapshots, subscribe to status changes, and wait for specific transaction states.\n   *\n   * @param transactionId The 64-character hex transaction ID to monitor. Must be a valid\n   * Flow transaction hash (64 bytes represented as hex string).\n   * @param opts Optional configuration parameters\n   * @param opts.pollRate Polling rate in milliseconds when using legacy polling fallback\n   * @param opts.txNotFoundTimeout Timeout in milliseconds for ignoring transaction\n   * not found errors during initial transaction propagation (do not modify unless you know what you are doing)\n   *\n   * @returns Transaction monitor object with methods for tracking transaction status\n   *\n   * @throws If transactionId is not a valid 64-byte hash string\n   *\n   * @example\n   * // Basic transaction monitoring\n   * import * as fcl from \"@onflow/fcl\"\n   *\n   * const txId = await fcl.mutate({\n   *   cadence: `\n   *     transaction {\n   *       execute { log(\"Hello, World!\") }\n   *     }\n   *   `\n   * })\n   *\n   * // Get current status\n   * const status = await fcl.tx(txId).snapshot()\n   * console.log(\"Current status:\", status.status)\n   *\n   * // Subscribe to all status changes\n   * const unsubscribe = fcl.tx(txId).subscribe((status) => {\n   *   console.log(\"Status update:\", status.status)\n   *   if (status.status === fcl.transaction.isSealed) {\n   *     console.log(\"Transaction sealed!\")\n   *     console.log(\"Events:\", status.events)\n   *   }\n   * })\n   * // Clean up subscription when done\n   * setTimeout(() => unsubscribe(), 60000)\n   *\n   * // Wait for specific transaction states\n   * try {\n   *   // Wait for finalization (consensus reached)\n   *   const finalizedStatus = await fcl.tx(txId).onceFinalized()\n   *   console.log(\"Transaction finalized\")\n   *\n   *   // Wait for execution (transaction executed)\n   *   const executedStatus = await fcl.tx(txId).onceExecuted()\n   *   console.log(\"Transaction executed\")\n   *\n   *   // Wait for sealing (transaction sealed in block)\n   *   const sealedStatus = await fcl.tx(txId).onceSealed()\n   *   console.log(\"Transaction sealed:\", sealedStatus.events)\n   * } catch (error) {\n   *   console.error(\"Transaction failed:\", error.message)\n   * }\n   *\n   * // Handle transaction errors\n   * fcl.tx(txId).subscribe(\n   *   (status) => {\n   *     if (status.statusCode === 1) {\n   *       console.error(\"Transaction error:\", status.errorMessage)\n   *     }\n   *   },\n   *   (error) => {\n   *     console.error(\"Subscription error:\", error)\n   *   }\n   * )\n   */\n  function transaction(\n    transactionId: string,\n    opts: {\n      pollRate?: number\n      txNotFoundTimeout?: number\n    } = {txNotFoundTimeout: 12500, pollRate: 1000}\n  ): {\n    snapshot: () => Promise<TransactionStatus>\n    subscribe: (\n      onData: (txStatus: TransactionStatus) => void,\n      onError?: (err: Error) => void\n    ) => () => void\n    onceFinalized: () => Promise<TransactionStatus>\n    onceExecuted: () => Promise<TransactionStatus>\n    onceSealed: () => Promise<TransactionStatus>\n  } {\n    // Validate transactionId format\n    // Must be either:\n    // 1. A 64-character hex hash (normal transaction), OR\n    // 2. A numeric string that's not 64 chars (scheduled transaction UInt64)\n    const scopedId = scoped(transactionId)\n    const isValidHash = TXID_REGEXP.test(scopedId)\n    const isScheduledTxId = isScheduledTransactionId(scopedId)\n\n    if (!isValidHash && !isScheduledTxId) {\n      throw new Error(\"Invalid transactionId\")\n    }\n\n    function getObservable() {\n      let observable = registry.get(transactionId)\n      if (!observable) {\n        observable = createObservable(context, transactionId, opts)\n        registry.set(transactionId, observable)\n      }\n      return observable\n    }\n\n    function snapshot() {\n      return Promise.resolve(getObservable().value)\n    }\n\n    function subscribe(\n      onData: (txStatus: TransactionStatus) => void,\n      onError?: (err: Error) => void\n    ) {\n      const observable = getObservable()\n      const {unsubscribe} = observable.subscribe(onData, onError)\n      return () => unsubscribe()\n    }\n\n    function once(predicate: (txStatus: TransactionStatus) => boolean) {\n      return function innerOnce(opts = {suppress: false}) {\n        const suppress = opts.suppress || false\n        return new Promise((resolve, reject) => {\n          const unsub = subscribe(\n            (txStatus: TransactionStatus) => {\n              if (txStatus.statusCode === 1) {\n                const transactionError = TransactionError.fromErrorMessage(\n                  txStatus.errorMessage\n                )\n                reject(transactionError)\n                unsub()\n              } else if (predicate(txStatus)) {\n                resolve(txStatus)\n                unsub()\n              }\n            },\n            err => {\n              if (!suppress) {\n                reject(err)\n                unsub()\n              }\n            }\n          )\n        }) as Promise<TransactionStatus>\n      }\n    }\n\n    return {\n      snapshot,\n      subscribe,\n      onceFinalized: once(isFinalized),\n      onceExecuted: once(isExecuted),\n      onceSealed: once(isSealed),\n    }\n  }\n\n  transaction.isUnknown = isUnknown\n  transaction.isPending = isPending\n  transaction.isFinalized = isFinalized\n  transaction.isExecuted = isExecuted\n  transaction.isSealed = isSealed\n  transaction.isExpired = isExpired\n\n  return transaction\n}\n\nexport const transaction = /* @__PURE__ */ createTransaction(\n  createPartialGlobalFCLContext()\n)\n\n/**\n * @description Creates an observable for a transaction\n */\nfunction createObservable(\n  context: Pick<FCLContext, \"sdk\" | \"config\">,\n  txId: string,\n  opts: {pollRate?: number; txNotFoundTimeout?: number}\n) {\n  const observers = new Set<{\n    onData: (txStatus: TransactionStatus) => void\n    onError: (err: Error) => void\n  }>()\n  let value: TransactionStatus = {\n    blockId: \"\",\n    status: TransactionExecutionStatus.UNKNOWN,\n    statusCode: 0,\n    errorMessage: \"\",\n    events: [],\n    statusString: \"\",\n  }\n\n  // Initialize the subscription\n  init().catch(error)\n\n  async function init() {\n    // Check if this is a scheduled transaction ID (UInt64 format)\n    // Scheduled transaction IDs are not supported by WebSocket, so we fall back to REST polling\n    const isScheduledTxId = isScheduledTransactionId(scoped(txId))\n\n    if (isScheduledTxId) {\n      // Use legacy polling for scheduled transaction IDs\n      fallbackLegacyPolling()\n      return\n    }\n\n    const flowNetwork = await createGetChainId(context)()\n\n    // As of Flow CLI v2.2.8, WebSocket subscriptions are not supported on the Flow emulator\n    // This conditional will be removed when WebSocket subscriptions are supported in this environment\n    if (flowNetwork === FLOW_EMULATOR) {\n      console.warn(\n        \"Events are not supported on the Flow emulator, falling back to legacy polling.\"\n      )\n      fallbackLegacyPolling()\n    } else {\n      subscribeTransactionStatuses()\n    }\n  }\n\n  // Subscribe to transaction status updates\n  function subscribeTransactionStatuses() {\n    // Subscribe to transaction status updates\n    const subscription = context.sdk.subscribe({\n      topic: SubscriptionTopic.TRANSACTION_STATUSES,\n      args: {transactionId: txId},\n      onData: txStatus => {\n        if (isDiff(value, txStatus)) {\n          value = txStatus\n          next(txStatus)\n        }\n\n        // Clean up the subscription if the transaction is sealed\n        // Wait for next tick to ensure unsubscribe is defined\n        if (isSealed(txStatus)) {\n          new Promise(resolve => setTimeout(resolve, 0)).then(() => {\n            if (isSealed(txStatus)) {\n              subscription.unsubscribe()\n            }\n          })\n        }\n      },\n      onError: (err: Error) => {\n        if (err instanceof SubscriptionsNotSupportedError) {\n          console.warn(\n            \"Failed to subscribe to transaction status updates using real-time streaming (are you using the deprecated GRPC transport?), falling back to polling.\"\n          )\n          fallbackLegacyPolling()\n        } else {\n          error(err)\n        }\n      },\n    })\n  }\n\n  function fallbackLegacyPolling() {\n    // Poll for transaction status updates\n    const unsubscribe = legacyTransaction(txId, opts).subscribe(\n      (txStatus?: TransactionStatus, err?: Error) => {\n        if (err) {\n          error(err)\n        } else if (txStatus && isDiff(value, txStatus)) {\n          value = txStatus\n          next(txStatus)\n\n          // Clean up the subscription if the transaction is sealed\n          // Wait for next tick to ensure unsubscribe is defined\n          if (isSealed(txStatus)) {\n            new Promise(resolve => setTimeout(resolve, 0)).then(() => {\n              unsubscribe()\n            })\n          }\n        }\n      }\n    )\n  }\n\n  function next(txStatus: TransactionStatus) {\n    for (const observer of observers) {\n      try {\n        observer.onData(txStatus)\n      } catch (error) {\n        console.error(\"Error in transaction observer\", error)\n      }\n    }\n  }\n\n  function error(err: Error) {\n    for (const observer of observers) {\n      try {\n        observer.onError(err)\n      } catch (error) {\n        console.error(\"Error in transaction observer\", error)\n      }\n    }\n  }\n\n  return {\n    subscribe(\n      onData: (status: TransactionStatus) => void,\n      onError?: (error: Error) => void\n    ) {\n      const observer = {\n        onData,\n        onError: onError || (() => {}),\n      }\n      observers.add(observer)\n      onData(value)\n\n      return {\n        unsubscribe: () => observers.delete(observer),\n      }\n    },\n    get value() {\n      return value\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/types.ts",
    "content": "import {TransactionStatus} from \"@onflow/typedefs\"\n"
  },
  {
    "path": "packages/fcl-core/src/transaction/utils.ts",
    "content": "import {TransactionStatus} from \"@onflow/typedefs\"\n\n/**\n * @description Checks if a transaction has expired based on its status code.\n * A transaction is considered expired when its status equals 5.\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction has expired, false otherwise\n *\n * @example\n * // Check if a transaction has expired\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isExpired(txStatus)) {\n *   console.log(\"Transaction has expired\")\n * }\n */\nexport const isExpired = (tx: TransactionStatus) => tx.status === 5\n\n/**\n * @description Checks if a transaction has been sealed. A transaction is sealed when it has been\n * included in a block and finalized on the blockchain (status >= 4).\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction is sealed, false otherwise\n *\n * @example\n * // Wait for transaction to be sealed\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isSealed(txStatus)) {\n *   console.log(\"Transaction is sealed and finalized\")\n * }\n */\nexport const isSealed = (tx: TransactionStatus) => tx.status >= 4\n\n/**\n * @description Checks if a transaction has been executed. A transaction is executed when it has\n * been processed by the blockchain network (status >= 3).\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction has been executed, false otherwise\n *\n * @example\n * // Check if transaction has been executed\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isExecuted(txStatus)) {\n *   console.log(\"Transaction has been executed\")\n * }\n */\nexport const isExecuted = (tx: TransactionStatus) => tx.status >= 3\n\n/**\n * @description Checks if a transaction has been finalized. A transaction is finalized when it has\n * been included in a block (status >= 2).\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction has been finalized, false otherwise\n *\n * @example\n * // Check if transaction has been finalized\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isFinalized(txStatus)) {\n *   console.log(\"Transaction has been finalized\")\n * }\n */\nexport const isFinalized = (tx: TransactionStatus) => tx.status >= 2\n\n/**\n * @description Checks if a transaction is pending. A transaction is pending when it has been\n * submitted to the network but not yet processed (status >= 1).\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction is pending, false otherwise\n *\n * @example\n * // Check if transaction is still pending\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isPending(txStatus)) {\n *   console.log(\"Transaction is still pending\")\n * }\n */\nexport const isPending = (tx: TransactionStatus) => tx.status >= 1\n\n/**\n * @description Checks if a transaction status is unknown. A transaction has unknown status when\n * it hasn't been processed yet or there's no information available (status >= 0).\n *\n * @param tx The transaction status object to check\n * @returns True if the transaction status is unknown, false otherwise\n *\n * @example\n * // Check if transaction status is unknown\n * const txStatus = await fcl.tx(transactionId).snapshot()\n * if (isUnknown(txStatus)) {\n *   console.log(\"Transaction status is unknown\")\n * }\n */\nexport const isUnknown = (tx: TransactionStatus) => tx.status >= 0\n\n/**\n * @description Performs a deep equality comparison between two values. This function recursively\n * compares all properties of objects and arrays to determine if they are equal.\n *\n * @param a First value to compare\n * @param b Second value to compare\n * @returns True if the values are deeply equal, false otherwise\n *\n * @example\n * // Compare two objects\n * const obj1 = { name: \"Flow\", version: \"1.0\" }\n * const obj2 = { name: \"Flow\", version: \"1.0\" }\n * console.log(deepEqual(obj1, obj2)) // true\n */\nexport const deepEqual = (a: any, b: any): boolean => {\n  if (a === b) return true\n  if (typeof a !== \"object\" || typeof b !== \"object\") return false\n  if (Object.keys(a).length !== Object.keys(b).length) return false\n  for (const key in a) if (!deepEqual(a[key], b[key])) return false\n  return true\n}\n\n/**\n * @description Checks if two values are different by performing a deep equality comparison.\n * This is the inverse of the deepEqual function.\n *\n * @param a First value to compare\n * @param b Second value to compare\n * @returns True if the values are different, false if they are equal\n *\n * @example\n * // Check if objects are different\n * const obj1 = { name: \"Flow\", version: \"1.0\" }\n * const obj2 = { name: \"Flow\", version: \"2.0\" }\n * console.log(isDiff(obj1, obj2)) // true\n */\nexport const isDiff = (a: any, b: any): boolean => {\n  return !deepEqual(a, b)\n}\n\n/**\n * @description Extracts a transaction ID from either a string or an object containing a transactionId property.\n * This utility function handles both formats and ensures a valid transaction ID is returned.\n *\n * @param transactionId Either a transaction ID string or an object with a transactionId property\n * @returns The transaction ID as a string\n * @throws If transactionId is null, undefined, or invalid\n *\n * @example\n * // Extract from string\n * const txId = scoped(\"abc123def456\")\n * console.log(txId) // \"abc123def456\"\n */\nexport const scoped = (\n  transactionId:\n    | string\n    | {\n        transactionId: string\n      }\n) => {\n  if (typeof transactionId === \"object\")\n    transactionId = transactionId.transactionId\n  if (transactionId == null) throw new Error(\"transactionId required\")\n  return transactionId\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/chain-id/chain-id-watcher.test.ts",
    "content": "import {watchForChainIdChanges} from \"./chain-id-watcher\"\nimport {config} from \"@onflow/config\"\nimport {createGetChainId} from \"./get-chain-id\"\n\njest.mock(\"./get-chain-id\")\n\ndescribe(\"chain-id-watcher\", () => {\n  let unsubscribe: () => void\n\n  afterEach(() => {\n    jest.restoreAllMocks()\n    unsubscribe?.()\n  })\n\n  test(\"flow.network.default is correctly set on first call\", async () => {\n    await config.overload(\n      {\"accessNode.api\": \"https://example.com\"},\n      async () => {\n        // Mock the getChainId function\n        const mockGetChainId = jest.fn(async () => \"testnet\")\n        jest.mocked(createGetChainId).mockReturnValue(mockGetChainId)\n\n        // Start watching for changes\n        unsubscribe = watchForChainIdChanges()\n\n        // Wait for microtask queue to flush\n        await new Promise(resolve => setTimeout(resolve, 0))\n\n        // Expect only one call at initial setup\n        expect(createGetChainId).toHaveBeenCalledTimes(1)\n        expect(mockGetChainId).toHaveBeenCalledTimes(1)\n      }\n    )\n  })\n\n  test(\"flow.network.default is correctly set when changed later\", async () => {\n    await config.overload({}, async () => {\n      // Mock the getChainId function\n      const mockGetChainId = jest.fn(async () => \"testnet\")\n      jest.mocked(createGetChainId).mockReturnValue(mockGetChainId)\n\n      // Start watching for changes\n      unsubscribe = watchForChainIdChanges()\n\n      // Wait for microtask queue to flush\n      await new Promise(resolve => setTimeout(resolve, 0))\n\n      config.put(\"accessNode.api\", \"https://example.com\")\n\n      // Wait for microtask queue to flush\n      await new Promise(resolve => setTimeout(resolve, 0))\n\n      // Expect two calls since we changed the access node and there is an initial call\n      expect(mockGetChainId).toHaveBeenCalledTimes(2)\n    })\n  })\n\n  test(\"watcher does not throw error if getChainId throws\", async () => {\n    await config.overload({}, async () => {\n      jest.mocked(createGetChainId).mockImplementation(() => {\n        return jest.fn(() => {\n          throw new Error(\"Test error\")\n        })\n      })\n\n      // Start watching for changes\n      unsubscribe = watchForChainIdChanges()\n\n      // Wait for microtask queue to flush\n      await new Promise(resolve => setTimeout(resolve, 0))\n    })\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/utils/chain-id/chain-id-watcher.ts",
    "content": "import {createGetChainId} from \"./get-chain-id\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\n/**\n * @description Watches the FCL configuration for changes to the access node and automatically updates\n * the chain ID cache accordingly. This ensures that chain ID information stays current when the\n * access node configuration changes, preventing stale chain ID data from being used.\n *\n * @returns A function that can be called to unsubscribe the configuration listener\n *\n * @example\n * // Start watching for chain ID changes\n * import * as fcl from \"@onflow/fcl\"\n *\n * const unsubscribe = fcl.watchForChainIdChanges()\n *\n * // Later, when you want to stop watching\n * unsubscribe()\n */\nexport function watchForChainIdChanges(\n  context?: Pick<FCLContext, \"config\" | \"sdk\">\n): () => void {\n  if (!context) {\n    context = createPartialGlobalFCLContext()\n  }\n  return context.config.subscribe(() => {\n    // Call getChainId to update the chainId cache if access node has changed\n    createGetChainId(context)({\n      enableRequestLogging: false,\n    }).catch(() => {})\n  })\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/chain-id/fetch-chain-id.ts",
    "content": "import {getNetworkParameters} from \"@onflow/sdk\"\nimport {FCLContext} from \"../../context\"\n\n/**\n * @description Fetches the chain ID from the Flow network by querying the network parameters.\n * The chain ID is a unique identifier for the specific Flow network (mainnet, testnet, etc.)\n * and is essential for ensuring transactions are executed on the correct network.\n *\n * @param opts Optional configuration object that can contain network access settings and other parameters\n * @returns Promise that resolves to the chain ID string (e.g., \"flow-mainnet\", \"flow-testnet\")\n *\n * @example\n * // Fetch chain ID from the configured network\n * const chainId = await fetchChainId()\n * console.log(chainId) // \"flow-mainnet\" or \"flow-testnet\"\n */\nexport async function fetchChainId(\n  context: Pick<FCLContext, \"sdk\">,\n  opts: Record<string, any> = {}\n): Promise<string> {\n  const response = await context.sdk\n    .send([getNetworkParameters()], opts)\n    .then(context.sdk.decode)\n  return response.chainId\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/chain-id/get-chain-id.test.ts",
    "content": "import {getChainId, clearChainIdCache} from \"./get-chain-id\"\nimport {config} from \"@onflow/config\"\nimport * as fetchChainIdModule from \"./fetch-chain-id\"\n\ndescribe(\"getChainId\", () => {\n  afterEach(() => {\n    jest.restoreAllMocks()\n\n    // Reset chainId cache\n    clearChainIdCache()\n  })\n\n  it(\"getChainId caches consecutive requests\", async () => {\n    await config.overload(\n      {\"accessNode.api\": \"https://example.com\"},\n      async () => {\n        const fetchChainIdSpy = jest.spyOn(fetchChainIdModule, \"fetchChainId\")\n        fetchChainIdSpy.mockImplementation(() => {\n          return new Promise(resolve => {\n            setTimeout(() => {\n              resolve(\"testnet\")\n            }, 0)\n          })\n        })\n\n        const result1 = await getChainId()\n        const result2 = await getChainId()\n\n        expect(fetchChainIdSpy).toHaveBeenCalledTimes(1)\n        expect(result1).toEqual(\"testnet\")\n        expect(result2).toEqual(\"testnet\")\n      }\n    )\n  })\n\n  it(\"getChainId does not cache requests if access node changes\", async () => {\n    await config.overload(\n      {\"accessNode.api\": \"https://example.com\"},\n      async () => {\n        const fetchChainIdSpy = jest.spyOn(fetchChainIdModule, \"fetchChainId\")\n        fetchChainIdSpy.mockImplementation(() => {\n          return new Promise(async resolve => {\n            const accessNode = await config.get(\"accessNode.api\")\n            setTimeout(() => {\n              if (accessNode === \"https://example.com\") {\n                resolve(\"testnet\")\n              } else {\n                resolve(\"mainnet\")\n              }\n            }, 0)\n          })\n        })\n\n        const result1 = await getChainId()\n        config.put(\"accessNode.api\", \"https://example2.com\")\n        const result2 = await getChainId()\n\n        expect(fetchChainIdSpy).toHaveBeenCalledTimes(2)\n        expect(result1).toEqual(\"testnet\")\n        expect(result2).toEqual(\"mainnet\")\n      }\n    )\n  })\n\n  it(\"getChainId uses opts.node if specified\", async () => {\n    await config.overload(\n      {\"accessNode.api\": \"https://example.com\"},\n      async () => {\n        const fetchChainIdSpy = jest.spyOn(fetchChainIdModule, \"fetchChainId\")\n        fetchChainIdSpy.mockImplementation((_, opts = {}) => {\n          return new Promise((resolve, reject) => {\n            if (opts.node === \"https://example2.com\") {\n              resolve(\"testnet\")\n            } else {\n              reject(new Error(\"Invalid node\"))\n            }\n          })\n        })\n\n        const result = await getChainId({node: \"https://example2.com\"})\n        await getChainId({node: \"https://example2.com\"})\n\n        // Should only be called once since we are using opts.node\n        expect(fetchChainIdSpy).toHaveBeenCalledTimes(1)\n        expect(result).toEqual(\"testnet\")\n      }\n    )\n  })\n\n  it(\"getChainId prefers accessNode.api over flow.network or en v\", async () => {\n    await config.overload(\n      {\"flow.network\": \"testnet\", env: \"testnet\", \"accessNode.api\": \"foobar\"},\n      async () => {\n        const fetchChainIdSpy = jest.spyOn(fetchChainIdModule, \"fetchChainId\")\n        fetchChainIdSpy.mockImplementation(() => {\n          return Promise.resolve(\"mainnet\")\n        })\n\n        const result = await getChainId()\n\n        expect(result).toEqual(\"mainnet\")\n      }\n    )\n  })\n\n  it(\"getChainId falls back to flow.network\", async () => {\n    await config.overload({\"flow.network\": \"testnet\"}, async () => {\n      const fetchChainIdSpy = jest.spyOn(fetchChainIdModule, \"fetchChainId\")\n      fetchChainIdSpy.mockImplementation(() => {\n        return Promise.reject(new Error(\"Invalid node\"))\n      })\n\n      const result = await getChainId()\n\n      expect(result).toEqual(\"testnet\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/utils/chain-id/get-chain-id.ts",
    "content": "import {fetchChainId} from \"./fetch-chain-id\"\nimport {log} from \"@onflow/util-logger\"\nimport {FCLContext} from \"../../context\"\nimport {createPartialGlobalFCLContext} from \"../../context/global\"\n\n// Cache of chainId promises for each access node value\n// key: access node, value: chainId promise\nlet chainIdCache: Record<string, Promise<string> | null> = {}\n\nlet hasWarnedFlowNetwork: boolean = false\nlet hasWarnedEnv: boolean = false\n\nexport interface GetChainIdOptions {\n  node?: unknown\n  enableRequestLogging?: boolean\n  [key: string]: any\n}\n\nexport function createGetChainId(context: {\n  config: FCLContext[\"config\"]\n  sdk: FCLContext[\"sdk\"]\n}) {\n  /**\n   * @description\n   * Gets the chain ID if its set, otherwise gets the chain ID from the access node\n   *\n   * @param opts Optional configuration parameters\n   * @param opts.node Override the access node URL for this request instead of using the configured one\n   * @param opts.enableRequestLogging Enable logging for the chain ID request\n   * @returns Promise that resolves to the chain ID string (e.g., \"mainnet\", \"testnet\", \"local\")\n   * @throws If the chain ID cannot be determined from configuration or access node\n   *\n   * @example\n   * // Get chain ID using configured access node\n   * import * as fcl from \"@onflow/fcl\"\n   *\n   * const chainId = await fcl.getChainId()\n   * console.log(\"Connected to:\", chainId) // \"testnet\" or \"mainnet\"\n   */\n  async function getChainId(opts: GetChainIdOptions = {}): Promise<string> {\n    let flowNetworkCfg: string | null = await context.config.get(\"flow.network\")\n    let envCfg: string | null = await context.config.get(\"env\")\n\n    /* \n    TODO: Add deprecation warning for flow.network config key\n    Remove this if statement when deprecation is complete\n\n    config.load() depends on flow.network config key even though this deprecation\n    warning has been available since https://github.com/onflow/fcl-js/pull/1420\n    it has effectively never been shown because of an issue in the implementation\n    of getChainId()\n\n    Showing this warning is the correct and intended behavior, but it would lead to\n    mixed messaging for users since config.load() depends on flow.network config key\n\n    We need to remove the dependency on flow.network config key from config.load()\n    before we can show this warning.\n  */\n    if (false && flowNetworkCfg && !hasWarnedFlowNetwork) {\n      log.deprecate({\n        pkg: \"FCL\",\n        subject:\n          'Using the \"flow.network\" configuration key for specifying the flow network',\n        message: \"Configuring flow.network is no longer required\",\n        transition:\n          \"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0002-deprecate-flow.network-config-key\",\n      })\n      hasWarnedFlowNetwork = true\n    }\n\n    if (envCfg && !hasWarnedEnv) {\n      log.deprecate({\n        pkg: \"FCL\",\n        subject:\n          'Using the \"env\" configuration key for specifying the flow network',\n        message: \"Configuring to specify flow network is no longer required\",\n        transition:\n          \"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0001-deprecate-env-config-key\",\n      })\n      hasWarnedEnv = true\n    }\n\n    const accessNode = opts.node || (await context.config.get(\"accessNode.api\"))\n    if (!accessNode) {\n      // Fall back to deprecated flow.network and env config keys\n      // This probably should have been done before trying to fetch the chainId from the access node\n      // However, this was the behaviour with the initial implementation of getChainId()\n      if (flowNetworkCfg) {\n        return flowNetworkCfg\n      } else if (envCfg) {\n        return envCfg\n      }\n\n      throw new Error(\n        `Either the \"accessNode.api\" config key or opts.node must be set`\n      )\n    }\n\n    // Try using cached chainId first if it exists and access node is the same\n    if (chainIdCache[accessNode as string]) {\n      try {\n        return await chainIdCache[accessNode as string]!\n      } catch {}\n    }\n\n    // If no cached chainId, value is stale, or last attempt failed, try getting chainId from access node\n    // Check if another getChainId() call has already started a new promise, if not, start a new one\n    // There may have been concurrent calls to getChainId() while the first call was waiting for the response\n    if (!chainIdCache[accessNode as string]) {\n      chainIdCache[accessNode as string] = fetchChainId(context, opts).catch(\n        (error: Error) => {\n          // If there was an error, reset the promise so that the next call will try again\n          chainIdCache[accessNode as string] = null\n          throw error\n        }\n      )\n    }\n\n    // Use newly created promise\n    try {\n      return await chainIdCache[accessNode as string]!\n    } catch (e: any) {\n      // Fall back to deprecated flow.network and env config keys\n      // This probably should have been done before trying to fetch the chainId from the access node\n      // However, this was the behaviour with the initial implementation of getChainId()\n      if (flowNetworkCfg) {\n        return flowNetworkCfg\n      } else if (envCfg) {\n        return envCfg\n      }\n\n      throw new Error(\n        `Error getting chainId from access node - are you using the correct access node endpoint.  If running locally, is your emulator up-to-date? ${e.message}`\n      )\n    }\n  }\n\n  return getChainId\n}\n\n/**\n * @description Clears the internal chain ID cache used by getChainId function. This is primarily useful\n * for testing scenarios where you need to reset the cached chain ID values, or when switching between\n * different access nodes and want to ensure fresh chain ID fetching.\n *\n * @example\n * // Clear cache during testing\n * import * as fcl from \"@onflow/fcl\"\n *\n * // Clear cache\n * fcl.clearChainIdCache()\n *\n * // Now getChainId will fetch fresh data\n * const chainId = await fcl.getChainId()\n */\nexport function clearChainIdCache(): void {\n  chainIdCache = {}\n}\n\nexport const getChainId = /* @__PURE__ */ createGetChainId(\n  createPartialGlobalFCLContext()\n)\n"
  },
  {
    "path": "packages/fcl-core/src/utils/constants.ts",
    "content": "export const FCL_REDIRECT_URL_PARAM_NAME: string = \"fcl_redirect_url\"\nexport const FCL_RESPONSE_PARAM_NAME: string = \"fclResponseJson\"\n\nexport const CORE_STRATEGIES: Record<string, string> = {\n  \"HTTP/RPC\": \"HTTP/RPC\",\n  \"HTTP/POST\": \"HTTP/POST\",\n  \"IFRAME/RPC\": \"IFRAME/RPC\",\n  \"POP/RPC\": \"POP/RPC\",\n  \"TAB/RPC\": \"TAB/RPC\",\n  \"EXT/RPC\": \"EXT/RPC\",\n  \"DEEPLINK/RPC\": \"DEEPLINK/RPC\",\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/index.ts",
    "content": "export {getChainId, createGetChainId} from \"./chain-id/get-chain-id\"\nexport {watchForChainIdChanges} from \"./chain-id/chain-id-watcher\"\n\n/**\n * @description Detects if the current environment is running on an Android device by checking the user agent string.\n *\n * @returns True if running on Android, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isAndroid()) {\n *   console.log(\"Running on Android device\")\n *   // Show Android-specific UI or behavior\n * }\n */\nexport function isAndroid(): boolean {\n  return (\n    typeof navigator !== \"undefined\" && /android/i.test(navigator.userAgent)\n  )\n}\n\n/**\n * @description Detects if the current environment is running on a small iOS device (iPhone or iPod Touch)\n * by checking the user agent string.\n *\n * @returns True if running on iPhone or iPod Touch, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isSmallIOS()) {\n *   console.log(\"Running on iPhone or iPod\")\n *   // Adjust UI for smaller screen\n * }\n */\nexport function isSmallIOS(): boolean {\n  return (\n    typeof navigator !== \"undefined\" && /iPhone|iPod/.test(navigator.userAgent)\n  )\n}\n\n/**\n * @description Detects if the current environment is running on a large iOS device (iPad)\n * by checking the user agent string.\n *\n * @returns True if running on iPad, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isLargeIOS()) {\n *   console.log(\"Running on iPad\")\n *   // Show tablet-optimized layout\n * }\n */\nexport function isLargeIOS(): boolean {\n  return typeof navigator !== \"undefined\" && /iPad/.test(navigator.userAgent)\n}\n\n/**\n * @description Detects if the current environment is running on any iOS device (iPhone, iPod, or iPad).\n * This is a convenience function that combines isSmallIOS() and isLargeIOS().\n *\n * @returns True if running on any iOS device, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isIOS()) {\n *   console.log(\"Running on iOS device\")\n *   // Apply iOS-specific styles or behaviors\n * }\n */\nexport function isIOS(): boolean {\n  return isSmallIOS() || isLargeIOS()\n}\n\n/**\n * @description Detects if the current environment is running on a mobile device (Android or iOS).\n * This is useful for providing mobile-optimized experiences or enabling mobile-specific features.\n *\n * @returns True if running on a mobile device, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isMobile()) {\n *   console.log(\"Running on mobile device\")\n *   // Enable touch gestures, mobile wallet connections, etc.\n * } else {\n *   console.log(\"Running on desktop\")\n *   // Show desktop wallet options\n * }\n */\nexport function isMobile(): boolean {\n  return isAndroid() || isIOS()\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/is-react-native.ts",
    "content": "let _isReactNative: boolean = false\n\n/**\n * @description Checks if the current environment is React Native. This function returns a boolean\n * indicating whether FCL is running in a React Native environment rather than a browser or Node.js.\n * This is useful for platform-specific functionality and enabling React Native-specific features.\n *\n * @returns True if running in React Native environment, false otherwise\n *\n * @example\n * // Check if running in React Native\n * import * as fcl from \"@onflow/fcl\"\n *\n * if (fcl.isReactNative()) {\n *   console.log(\"Running in React Native\")\n *   // Use React Native specific wallet integrations\n *   // Enable deep linking for wallet connections\n * } else {\n *   console.log(\"Running in browser or Node.js\")\n *   // Use web-based wallet integrations\n * }\n */\nexport function isReactNative(): boolean {\n  return _isReactNative\n}\n\n/**\n * @description Sets the React Native environment flag for FCL. This function should be called during\n * initialization of React Native applications to inform FCL that it's running in a React Native\n * environment. This enables React Native-specific behaviors and optimizations.\n *\n * @param value True to indicate React Native environment, false otherwise\n *\n * @example\n * // Set React Native flag during app initialization\n * import * as fcl from \"@onflow/fcl\"\n *\n * // In your React Native app's entry point (e.g., App.js)\n * fcl.setIsReactNative(true)\n *\n * // Configure FCL for React Native\n * fcl.config({\n *   \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n *   \"discovery.wallet\": \"https://fcl-discovery.onflow.org/api/testnet/authn\"\n * })\n */\nexport function setIsReactNative(value: boolean): void {\n  _isReactNative = value\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/is.ts",
    "content": "const is =\n  <T>(type: string) =>\n  (d: any): d is T =>\n    typeof d === type\n\n/**\n * @description Checks if a value is required (not null or undefined). This is a type guard that\n * ensures the value is not null or undefined, useful for validation and filtering operations.\n *\n * @param d The value to check for null or undefined\n * @returns True if the value is not null or undefined, false otherwise\n *\n * @example\n * // Filter out null/undefined values from an array\n * import * as fcl from \"@onflow/fcl\"\n *\n * const values = [1, null, \"hello\", undefined, true]\n * const requiredValues = values.filter(fcl.isRequired)\n * console.log(requiredValues) // [1, \"hello\", true]\n */\nexport const isRequired = (d: any): d is NonNullable<any> => d != null\n\n/**\n * @description Type guard that checks if a value is an object. This is useful for runtime type checking\n * and ensuring type safety when working with dynamic data.\n *\n * @param d The value to check\n * @returns True if the value is an object, false otherwise\n *\n * @example\n * // Check if a value is an object\n * import * as fcl from \"@onflow/fcl\"\n *\n * const obj = { name: \"Flow\" }\n * const notObj = \"string\"\n * console.log(fcl.isObject(obj)) // true\n * console.log(fcl.isObject(notObj)) // false\n */\nexport const isObject = is<object>(\"object\")\n\n/**\n * @description Type guard that checks if a value is a string. Useful for validating input types\n * and ensuring type safety in your applications.\n *\n * @param d The value to check\n * @returns True if the value is a string, false otherwise\n *\n * @example\n * // Validate string input\n * import * as fcl from \"@onflow/fcl\"\n *\n * const text = \"Hello, Flow!\"\n * const notText = 123\n * console.log(fcl.isString(text)) // true\n * console.log(fcl.isString(notText)) // false\n */\nexport const isString = is<string>(\"string\")\n\n/**\n * @description Type guard that checks if a value is a function. This is particularly useful\n * when working with callbacks, event handlers, or optional function parameters.\n *\n * @param d The value to check\n * @returns True if the value is a function, false otherwise\n *\n * @example\n * // Check if a callback is provided\n * import * as fcl from \"@onflow/fcl\"\n *\n * const callback = () => console.log(\"Hello\")\n * const notCallback = \"string\"\n * console.log(fcl.isFunc(callback)) // true\n * console.log(fcl.isFunc(notCallback)) // false\n */\nexport const isFunc = is<Function>(\"function\")\n\n/**\n * @description Type guard that checks if a value is a number. This includes both integers\n * and floating-point numbers, but excludes NaN and Infinity.\n *\n * @param d The value to check\n * @returns True if the value is a number, false otherwise\n *\n * @example\n * // Validate numeric input\n * import * as fcl from \"@onflow/fcl\"\n *\n * const num = 42\n * const notNum = \"42\"\n * console.log(fcl.isNumber(num)) // true\n * console.log(fcl.isNumber(notNum)) // false\n */\nexport const isNumber = is<number>(\"number\")\n"
  },
  {
    "path": "packages/fcl-core/src/utils/storage.ts",
    "content": "export type StorageProvider = {\n  can: boolean\n  get: (key: string) => Promise<any>\n  put: (key: string, value: any) => Promise<void>\n  removeItem: (key: string) => Promise<void>\n}\n"
  },
  {
    "path": "packages/fcl-core/src/utils/url.ts",
    "content": "// This is a workaround for an ongoing issue with URL in React Native\n// It does not parse the URL correctly and appends trailing slashes\n// See: https://github.com/facebook/react-native/issues/24428\n// See: https://github.com/facebook/react-native/issues/24428\n\n// The React Native team is aware of this issue but does not plan to fix it\n// since it could break existing apps, even though this is out of spec\n// See whatwg implementation: https://github.com/jsdom/whatwg-url/blob/master/lib/URL-impl.js#L6-L34\n// See react-native implementation: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Blob/URL.js#L144-L146\n\n// This is not polyfilled globally because it could break other libraries or the user's code\nimport {isReactNative} from \"./is-react-native\"\n\nconst _URL = globalThis.URL\nexport class URL extends _URL {\n  private _url?: string\n\n  constructor(url: string | URL, base?: string | URL, ...args: any[]) {\n    super(url, base, ...(args as []))\n\n    // Extra check if in React Native\n    if (!isReactNative()) {\n      return\n    }\n\n    // Fix trailing slash issue\n    if (this._url && !url.toString().endsWith(\"/\") && this._url.endsWith(\"/\")) {\n      this._url = this._url.slice(0, -1)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/README.md",
    "content": "Sorry, We will be adding these docs ASAP.\nIf you are interested in this, reach out to us on [Discord](https://discord.gg/k6cZ7QC).\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/assets/fcl-ars-auth-v1.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 1,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"id\": \"X82DstJUEARnSITNXvNB6\",\n      \"type\": \"text\",\n      \"x\": 233.3046875,\n      \"y\": -169.7421875,\n      \"width\": 45,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 136086990,\n      \"version\": 231,\n      \"versionNonce\": 1135402510,\n      \"isDeleted\": false,\n      \"text\": \"dApp\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"xH1RqhYL11nkjC3X_8IG6\",\n      \"type\": \"text\",\n      \"x\": 706.36328125,\n      \"y\": -167.02734375,\n      \"width\": 24,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1617085842,\n      \"version\": 242,\n      \"versionNonce\": 1084379602,\n      \"isDeleted\": false,\n      \"text\": \"fcl\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"GEnoVsC2cgiSNqlsaoL9h\",\n      \"type\": \"text\",\n      \"x\": 1011.1484375,\n      \"y\": -169.0859375,\n      \"width\": 77,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1943500494,\n      \"version\": 489,\n      \"versionNonce\": 469664274,\n      \"isDeleted\": false,\n      \"text\": \"provider\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"5BoO927donURMIR02xknP\",\n      \"type\": \"text\",\n      \"x\": 1344.03515625,\n      \"y\": -170.87890625,\n      \"width\": 99,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 695961166,\n      \"version\": 424,\n      \"versionNonce\": 575018382,\n      \"isDeleted\": false,\n      \"text\": \"handshake\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"BTAcvlT27MyZLn5RUNnfk\",\n      \"type\": \"line\",\n      \"x\": 251.87529592803025,\n      \"y\": -138.464902935606,\n      \"width\": 0,\n      \"height\": 3537.261777935606,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1484860622,\n      \"version\": 1714,\n      \"versionNonce\": 299491794,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3537.261777935606\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"2CwkGH75FWSk_nFRQq78l\",\n      \"type\": \"line\",\n      \"x\": 722.207741477273,\n      \"y\": -137.5621448863635,\n      \"width\": 0,\n      \"height\": 3503.9762073863635,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2003048206,\n      \"version\": 1850,\n      \"versionNonce\": 1851062674,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3503.9762073863635\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pq9iTWIOg7ZqsjTjUyydo\",\n      \"type\": \"line\",\n      \"x\": 1399.298295454546,\n      \"y\": -146.30208333333326,\n      \"width\": 0,\n      \"height\": 961.9505208333333,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1504300430,\n      \"version\": 1734,\n      \"versionNonce\": 934456334,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          961.9505208333333\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0vDqMZTf29GvLIjkcMN24\",\n      \"type\": \"line\",\n      \"x\": 1050.840317234849,\n      \"y\": -134.86162405303025,\n      \"width\": 0,\n      \"height\": 1829.3303740530303,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1891407570,\n      \"version\": 1872,\n      \"versionNonce\": 2032272462,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1829.3303740530303\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9lmBPDK9w0oEEGWepDzny\",\n      \"type\": \"arrow\",\n      \"x\": 257.1732954545463,\n      \"y\": 371.17294034090924,\n      \"width\": 453.7734375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1244921938,\n      \"version\": 750,\n      \"versionNonce\": 729298062,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          453.7734375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"-FvsrMYPf0xc-m5CxcwiW\",\n      \"type\": \"rectangle\",\n      \"x\": 749.8466796875,\n      \"y\": 232.308504971591,\n      \"width\": 760.62890625,\n      \"height\": 653.094815340909,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1534813390,\n      \"version\": 797,\n      \"versionNonce\": 201965582,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"hO7j8hOrCRU2U3wwsSLzj\",\n      \"type\": \"text\",\n      \"x\": 371.7230113636364,\n      \"y\": 381.8902698863636,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1445008718,\n      \"version\": 406,\n      \"versionNonce\": 509369810,\n      \"isDeleted\": false,\n      \"text\": \"fcl.authenticate()\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"ikPzB7NmlgsCiM7h48wzz\",\n      \"type\": \"text\",\n      \"x\": 769.322088068182,\n      \"y\": 208.5525568181818,\n      \"width\": 48,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1341841742,\n      \"version\": 151,\n      \"versionNonce\": 1793681998,\n      \"isDeleted\": false,\n      \"text\": \"iframe\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"6My7tLh7S7YLT57zWx_vE\",\n      \"type\": \"arrow\",\n      \"x\": 727.8359375000005,\n      \"y\": 390.31356534090924,\n      \"width\": 21.8359375,\n      \"height\": 0.484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1351137682,\n      \"version\": 1020,\n      \"versionNonce\": 1616856910,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          21.8359375,\n          0.484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yvj6VuyeHRCPi_vyel0r5\",\n      \"type\": \"arrow\",\n      \"x\": 777.1459517045454,\n      \"y\": 260.84588068181824,\n      \"width\": 607.16796875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1823087634,\n      \"version\": 234,\n      \"versionNonce\": 1095763346,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          607.16796875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"hR3478POWq3jwTfrLLoWQ\",\n      \"type\": \"text\",\n      \"x\": 1061.847478693183,\n      \"y\": 265.4570312500001,\n      \"width\": 300,\n      \"height\": 76,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1005826318,\n      \"version\": 602,\n      \"versionNonce\": 960796814,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.com/authorize\\n      ?l6n=dapp.com\\n      &nonce=NONCE\\n      &scope=email\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 72\n    },\n    {\n      \"id\": \"ElxdXQ7lbC9ExIaIWTu0f\",\n      \"type\": \"diamond\",\n      \"x\": 1319,\n      \"y\": 275.99609375,\n      \"width\": 159.53125,\n      \"height\": 109.62890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 990579794,\n      \"version\": 513,\n      \"versionNonce\": 1142089426,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"UEi0jEievAhBXhf9fLfIU\",\n      \"type\": \"text\",\n      \"x\": 1364.7871093749995,\n      \"y\": 297.68412642045473,\n      \"width\": 75,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1747693518,\n      \"version\": 525,\n      \"versionNonce\": 1745954638,\n      \"isDeleted\": false,\n      \"text\": \"user\\nselects\\nprovider\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"bNLRMaNe0HSIX5yffdAPN\",\n      \"type\": \"arrow\",\n      \"x\": 1381.6100852272734,\n      \"y\": 396.83416193181824,\n      \"width\": 322.00390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 782498958,\n      \"version\": 354,\n      \"versionNonce\": 2079672594,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -322.00390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"kLg5eP6E82X_bbmIMxEVT\",\n      \"type\": \"text\",\n      \"x\": 1097.391867897728,\n      \"y\": 400.0986328125001,\n      \"width\": 356,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 132491342,\n      \"version\": 1245,\n      \"versionNonce\": 210342610,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET provider.com/authorize\\n      ?l6n=dapp.com\\n      &nonce=NONCE\\n      &redirect=handshake.com/callback\\n      &scope=email\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"4e1gnzS6KGy9FpVvwsE0y\",\n      \"type\": \"diamond\",\n      \"x\": 963.7059659090914,\n      \"y\": 402.67116477272725,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1434665934,\n      \"version\": 340,\n      \"versionNonce\": 886573586,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"J-7KvrPQ_dcUDyCit0wrN\",\n      \"type\": \"text\",\n      \"x\": 986.7933238636365,\n      \"y\": 431.01580255681836,\n      \"width\": 122,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 256530706,\n      \"version\": 201,\n      \"versionNonce\": 739432462,\n      \"isDeleted\": false,\n      \"text\": \"user\\nauthenticates\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"ubbRoyGmT5am6i2G9lG-I\",\n      \"type\": \"arrow\",\n      \"x\": 1058.7833806818185,\n      \"y\": 514.8231534090908,\n      \"width\": 324.6328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1694970706,\n      \"version\": 114,\n      \"versionNonce\": 1103080594,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          324.6328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Yl6IlBQW0AQG8NJApG9yw\",\n      \"type\": \"text\",\n      \"x\": 1063.5085227272734,\n      \"y\": 516.21875,\n      \"width\": 291,\n      \"height\": 152,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1783396114,\n      \"version\": 448,\n      \"versionNonce\": 1030590610,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.com/callback\\n      ?acct=FLOW_ACCT_NUMBER\\n      ?pacct=PROVIDER_FLOW_ACCT\\n      ?code=CODE\\n      ?exp=WHEN_CODE_EXPIRES\\n      ?hks=HOOKS_URL\\n      ?nonce=NONCE\\n      ?l6n=dapp.com\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 148\n    },\n    {\n      \"id\": \"f__AKQ5JuFy95O3dHP60q\",\n      \"type\": \"arrow\",\n      \"x\": 1386.148259943182,\n      \"y\": 675.8124112215908,\n      \"width\": 632.32421875,\n      \"height\": 0.41015625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 452536210,\n      \"version\": 197,\n      \"versionNonce\": 464160910,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -632.32421875,\n          -0.41015625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"z3HYPBdyJe3D9Z5YmvVa7\",\n      \"type\": \"text\",\n      \"x\": 787.8634588068185,\n      \"y\": 677.0556640625,\n      \"width\": 253,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 324942094,\n      \"version\": 1090,\n      \"versionNonce\": 498672658,\n      \"isDeleted\": false,\n      \"text\": \"JS/postMessage dapp.com\\n{ type: \\\"FLOW::AUTHN::RESP\\\"\\n  acct: FLOW_ACCT_NUMBER\\n pacct: PROVIDER_FLOW_ACCT\\n  code: CODE\\n   exp: WHEN_CODE_EXPIRES\\n   hks: HOOKS_URL\\n nonce: NONCE\\n   l6n: dapp.com\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"J_YK6v96uJRCM-Mfcd4fX\",\n      \"type\": \"arrow\",\n      \"x\": 747.220525568182,\n      \"y\": 751.5370205965908,\n      \"width\": 22.13671875,\n      \"height\": 0.50390625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1175863054,\n      \"version\": 466,\n      \"versionNonce\": 341474066,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -22.13671875,\n          0.50390625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"z1nKyn4-r_NwUhKly50Dn\",\n      \"type\": \"arrow\",\n      \"x\": 257.8700284090918,\n      \"y\": -29.200639204545496,\n      \"width\": 454.40234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 158142606,\n      \"version\": 413,\n      \"versionNonce\": 1555938254,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          454.40234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vbN6hJoyYF5gPVEd-8rbE\",\n      \"type\": \"text\",\n      \"x\": 315.75958806818187,\n      \"y\": -20.711292613636346,\n      \"width\": 347,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1494716046,\n      \"version\": 389,\n      \"versionNonce\": 745067346,\n      \"isDeleted\": false,\n      \"text\": \"fcl.currentUser().subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"ZdYenok5PgTqBOZGqWJ9T\",\n      \"type\": \"arrow\",\n      \"x\": 710.2102272727283,\n      \"y\": 87.11186079545473,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1636347534,\n      \"version\": 628,\n      \"versionNonce\": 1593011346,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"uBoSR15InMuxDFczmXPNl\",\n      \"type\": \"text\",\n      \"x\": 375.4508167613635,\n      \"y\": 92.19202769886363,\n      \"width\": 188,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 599148370,\n      \"version\": 961,\n      \"versionNonce\": 1115417294,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK currentUser\\n{ acct: null\\n  verified: false\\n  name: null\\n  avatar: null\\n  hooks: null\\n  provider: null\\n  \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"kuvYgoF80yizx2t7l1_Wu\",\n      \"type\": \"arrow\",\n      \"x\": 253.6885653409098,\n      \"y\": -108.1796875,\n      \"width\": 458.5,\n      \"height\": 0.1015625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 92803918,\n      \"version\": 196,\n      \"versionNonce\": 1433473550,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          458.5,\n          -0.1015625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"M05GYmSmMRsGs8ba8L4NE\",\n      \"type\": \"text\",\n      \"x\": 295.52734375,\n      \"y\": -99.0752840909091,\n      \"width\": 375,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1794015378,\n      \"version\": 360,\n      \"versionNonce\": 2127083790,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config().set(\\\"authn.scope\\\", \\\"email\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"H2GMhSuYq7R82OOAh6mQU\",\n      \"type\": \"line\",\n      \"x\": 209.55959990530283,\n      \"y\": 53.17418323863649,\n      \"width\": 0,\n      \"height\": 1595.1148792613635,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1272655506,\n      \"version\": 1102,\n      \"versionNonce\": 985401938,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1595.1148792613635\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"bl1HxYodwSGdHcwgLAmHu\",\n      \"type\": \"text\",\n      \"x\": 100.953125,\n      \"y\": 140.890625,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 341119374,\n      \"version\": 231,\n      \"versionNonce\": 1721629646,\n      \"isDeleted\": false,\n      \"text\": \"currentUser callback\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"tpx39Uabm9WmwItnYcdL5\",\n      \"type\": \"arrow\",\n      \"x\": 728.7411221590909,\n      \"y\": 920.90625,\n      \"width\": 319.4375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 100270482,\n      \"version\": 115,\n      \"versionNonce\": 1131109842,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          319.4375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"s3ZENkjpa3X1xnEta75Vc\",\n      \"type\": \"text\",\n      \"x\": 773.6104403409096,\n      \"y\": 922.1803977272724,\n      \"width\": 169,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1619662994,\n      \"version\": 184,\n      \"versionNonce\": 1482080334,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL\\n      ?code=CODE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"GO8hfYa3F6Nt2H5xKQ2hv\",\n      \"type\": \"text\",\n      \"x\": 1679.064453125,\n      \"y\": -178.3564453125,\n      \"width\": 38,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2033488786,\n      \"version\": 518,\n      \"versionNonce\": 857480850,\n      \"isDeleted\": false,\n      \"text\": \"flow\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"YeYjJP5A3sGBrZExuWzFZ\",\n      \"type\": \"line\",\n      \"x\": 1700.257930871212,\n      \"y\": -155.798828125,\n      \"width\": 0,\n      \"height\": 3436.556640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 172459026,\n      \"version\": 1738,\n      \"versionNonce\": 2133090578,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3436.556640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pPk2e2mIzDd-J2s2YNg_L\",\n      \"type\": \"arrow\",\n      \"x\": 730.3025568181819,\n      \"y\": 893.6747159090908,\n      \"width\": 958.05078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1066210830,\n      \"version\": 146,\n      \"versionNonce\": 31432782,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          958.05078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lodWMrmO71NS9ONwZCs22\",\n      \"type\": \"text\",\n      \"x\": 1291.889825994319,\n      \"y\": 897.4580078125,\n      \"width\": 291,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2114953742,\n      \"version\": 302,\n      \"versionNonce\": 953841870,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT GET_FLOW_ACCT_HOOKS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"MrmoALjMi8PE8-Y0jNJqr\",\n      \"type\": \"arrow\",\n      \"x\": 1044.0951704545455,\n      \"y\": 979.98046875,\n      \"width\": 310.8046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2128973778,\n      \"version\": 91,\n      \"versionNonce\": 1168364434,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -310.8046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0idZBeC9LrWuHVBCFoGkf\",\n      \"type\": \"text\",\n      \"x\": 737.434037642046,\n      \"y\": 993.0625000000036,\n      \"width\": 441,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1030981714,\n      \"version\": 1125,\n      \"versionNonce\": 1028761294,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL RESPONSE\\n  { identity: IDENTITY {\\n      email: EMAIL (because requested in scope)\\n    provider: {\\n      providerId: PROVIDER_FLOW_ACCT\\n      uid: UID (provider specific id for acct)\\n      hooks: HOOKS_URL\\n    hooks: { /* private hooks */ }\\n    \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"ASD61pbFPqloPUWkna7UU\",\n      \"type\": \"arrow\",\n      \"x\": 1687.390625,\n      \"y\": 1198.1015625,\n      \"width\": 957.0078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 263596690,\n      \"version\": 122,\n      \"versionNonce\": 904029838,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -957.0078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zSn4Y-uN2zPsPLBeaHy8z\",\n      \"type\": \"text\",\n      \"x\": 1086.66512784091,\n      \"y\": 1216.2997159090914,\n      \"width\": 431,\n      \"height\": 304,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1025231886,\n      \"version\": 1091,\n      \"versionNonce\": 1242215246,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT GET_FLOW_ACCT_HOOKS RESPONSE\\n  { identity: IDENTITY {\\n      acct: FLOW_ACCT_NUMBER\\n      name: NAME\\n      avatar: AVATAR\\n      bio: BIO\\n    providers: [{\\n      providerId: PROVIDER_ID\\n      uid: UID (provider specific id for acct)\\n      hooks: HOOKS_URL\\n    hooks:\\n      authorizations: [{\\n        method: \\\"POST\\\"\\n        endpoint: \\\"provider.com/authorization\\\"\\n        data: {id: UID}\\n    \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 300\n    },\n    {\n      \"id\": \"um7BoVKD9JypyLYQYzSFM\",\n      \"type\": \"line\",\n      \"x\": 1193.5969460227266,\n      \"y\": 992.6349431818178,\n      \"width\": 0,\n      \"height\": 185.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1709236178,\n      \"version\": 162,\n      \"versionNonce\": 532411538,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          185.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Z8pExVkRYjlrhnS37T4QL\",\n      \"type\": \"line\",\n      \"x\": 1202.0539772727266,\n      \"y\": 993.8781960227268,\n      \"width\": 0,\n      \"height\": 185.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2138879502,\n      \"version\": 199,\n      \"versionNonce\": 1100535182,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          185.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0FrYhj3Gu1xlamFh5jKJz\",\n      \"type\": \"line\",\n      \"x\": 1536.2606534090905,\n      \"y\": 1218.383522727273,\n      \"width\": 0,\n      \"height\": 262.8203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 118646478,\n      \"version\": 431,\n      \"versionNonce\": 933720210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          262.8203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"iS-XZzhRH3CFhprUzLn6r\",\n      \"type\": \"line\",\n      \"x\": 1542.2780539772725,\n      \"y\": 1218.074928977273,\n      \"width\": 0,\n      \"height\": 262.8203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 517200722,\n      \"version\": 453,\n      \"versionNonce\": 221452686,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          262.8203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yqLmKs0TNdQEHDNJp__k6\",\n      \"type\": \"text\",\n      \"x\": 1156.6491477272725,\n      \"y\": 1060.1129261363637,\n      \"width\": 130,\n      \"height\": 40,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1226796622,\n      \"version\": 177,\n      \"versionNonce\": 1433499666,\n      \"isDeleted\": false,\n      \"text\": \"Provider Specific\\nPrivate Hooks\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"AaenfKnC9j29RCeA0EyPr\",\n      \"type\": \"line\",\n      \"x\": 1184.1882102272725,\n      \"y\": 990.1502130681818,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 950312082,\n      \"version\": 117,\n      \"versionNonce\": 244271630,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"T4N-w2KkZkqd5HNSam4rF\",\n      \"type\": \"line\",\n      \"x\": 1181.8386008522725,\n      \"y\": 1176.8110795454547,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 134665298,\n      \"version\": 143,\n      \"versionNonce\": 1550624210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lRiygRl6NILx4OZA0zSgl\",\n      \"type\": \"text\",\n      \"x\": 1518.4811789772725,\n      \"y\": 1315.964488636364,\n      \"width\": 94,\n      \"height\": 40,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1665507406,\n      \"version\": 343,\n      \"versionNonce\": 1716489810,\n      \"isDeleted\": false,\n      \"text\": \"OnChain\\nPublic Hooks\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"4mtya57_IVob6kqyppHqS\",\n      \"type\": \"line\",\n      \"x\": 1521.9618252840905,\n      \"y\": 1217.309303977273,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1059044562,\n      \"version\": 269,\n      \"versionNonce\": 318027726,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"OZw9Wl9s0eXouUyoTFXUG\",\n      \"type\": \"line\",\n      \"x\": 1521.577237215909,\n      \"y\": 1479.95703125,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 82386062,\n      \"version\": 284,\n      \"versionNonce\": 1303245842,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Hjl-IY-0lXFp7XFV0gYUs\",\n      \"type\": \"arrow\",\n      \"x\": 713.2150213068189,\n      \"y\": 1236.5823863636356,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2095221074,\n      \"version\": 694,\n      \"versionNonce\": 1556582738,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"U2hEd78EtsQOXYbHgGMY4\",\n      \"type\": \"text\",\n      \"x\": 265.84108664772725,\n      \"y\": 1242.5240589488676,\n      \"width\": 403,\n      \"height\": 418,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 526576846,\n      \"version\": 1349,\n      \"versionNonce\": 1016692494,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK currentUser\\n{ acct: FLOW_ACCT_NUMBER\\n  verified: true\\n  name: NAME\\n  avatar: AVATAR\\n  email: EMAIL\\n  hooks: {\\n    authorizations: [{\\n     method: \\\"POST\\\"\\n     endpoint: \\\"provider.com/authorization\\\"\\n     data: {id: UID}\\n  provider: {\\n    providerId: PROVIDER_ID\\n    uid: UID\\n    hooks: HOOKS_URL\\n  providers: [{\\n    providerId: PROVIDER_ID\\n    uid: UID\\n    hooks: HOOKS_URL\\n  ]\\n  \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 414\n    },\n    {\n      \"id\": \"nyHbdI1Y5GBfMmi1zZxfi\",\n      \"type\": \"line\",\n      \"x\": 704.96875,\n      \"y\": 920.3565340909091,\n      \"width\": 0.8274147727272521,\n      \"height\": 258.49431818181813,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2039216530,\n      \"version\": 396,\n      \"versionNonce\": 392936590,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.8274147727272521,\n          258.49431818181813\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"mjT8vnwL-WYLTTVhQf_u2\",\n      \"type\": \"line\",\n      \"x\": 701.1210937499995,\n      \"y\": 920.296164772727,\n      \"width\": 0.8274147727272521,\n      \"height\": 258.49431818181813,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1734622162,\n      \"version\": 474,\n      \"versionNonce\": 1960228878,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.8274147727272521,\n          258.49431818181813\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"qBQNXmZYHaiAza70BKW9Z\",\n      \"type\": \"line\",\n      \"x\": 711.6413352272727,\n      \"y\": 919.1207386363636,\n      \"width\": 11.864346590909122,\n      \"height\": 1.281960227272748,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 374289614,\n      \"version\": 79,\n      \"versionNonce\": 1181954958,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -11.864346590909122,\n          1.281960227272748\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -11.864346590909122,\n        1.281960227272748\n      ]\n    },\n    {\n      \"id\": \"ZiyIGma4qyuADMTHFSJkG\",\n      \"type\": \"line\",\n      \"x\": 714.4928977272727,\n      \"y\": 1174.9339488636365,\n      \"width\": 15.230823863636374,\n      \"height\": 0.7102272727270247,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1949701202,\n      \"version\": 23,\n      \"versionNonce\": 1245209550,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -15.230823863636374,\n          0.7102272727270247\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Ogp527Unhhs3_237MbyvS\",\n      \"type\": \"text\",\n      \"x\": 521.5042613636359,\n      \"y\": 1032.1960227272734,\n      \"width\": 307,\n      \"height\": 40,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1686109714,\n      \"version\": 322,\n      \"versionNonce\": 885254606,\n      \"isDeleted\": false,\n      \"text\": \"If This Request Returns Status 200\\nThe Account Is Considered Verified\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"AgLm-3O6LxnLLTdCrmZzK\",\n      \"type\": \"line\",\n      \"x\": 174.6044034090911,\n      \"y\": 1249.8771306818192,\n      \"width\": 0.13849431818181301,\n      \"height\": 360.61789772727263,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1354660814,\n      \"version\": 701,\n      \"versionNonce\": 404755214,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.13849431818181301,\n          360.61789772727263\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"JaCl70erlODzBwvSCq6hf\",\n      \"type\": \"line\",\n      \"x\": 170.66086647727246,\n      \"y\": 1249.8167613636372,\n      \"width\": 0,\n      \"height\": 363.73508522727184,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2102554642,\n      \"version\": 806,\n      \"versionNonce\": 1863709394,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          363.73508522727184\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"Ap4e4vPdboFvWfekpXnP5\",\n      \"type\": \"line\",\n      \"x\": 181.27698863636408,\n      \"y\": 1248.641335227274,\n      \"width\": 11.864346590909122,\n      \"height\": 1.281960227272748,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 190435854,\n      \"version\": 158,\n      \"versionNonce\": 1899462670,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -11.864346590909122,\n          1.281960227272748\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -11.864346590909122,\n        1.281960227272748\n      ]\n    },\n    {\n      \"id\": \"VD0dZ49pYA5zsWglDlPVy\",\n      \"type\": \"line\",\n      \"x\": 182.90696022727315,\n      \"y\": 1616.0703125000061,\n      \"width\": 15.230823863636374,\n      \"height\": 0.7102272727270247,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1299094994,\n      \"version\": 198,\n      \"versionNonce\": 724476558,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -15.230823863636374,\n          0.7102272727270247\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"n5NmVSRkP5wnLlL6p5rYH\",\n      \"type\": \"text\",\n      \"x\": -54.67329545454572,\n      \"y\": 1378.16548295455,\n      \"width\": 332,\n      \"height\": 100,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2091933774,\n      \"version\": 843,\n      \"versionNonce\": 1776913362,\n      \"isDeleted\": false,\n      \"text\": \"Merges the Public (onChain)\\nand Private (provider) hooks\\n(deep merge last wins, public then private)\\nNOTE: Data and format of what\\nis exposed to the subscriber may change\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"Kk39gnjHIQOItun-PEroJ\",\n      \"type\": \"line\",\n      \"x\": 93.5390625,\n      \"y\": 1701.2890625,\n      \"width\": 777.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1667327698,\n      \"version\": 252,\n      \"versionNonce\": 1399272338,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          777.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BVHNCKtE39YcX7rl-NYFk\",\n      \"type\": \"line\",\n      \"x\": 893.0234375,\n      \"y\": 1676.5390625,\n      \"width\": 19.234375,\n      \"height\": 47.828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 473551378,\n      \"version\": 151,\n      \"versionNonce\": 1619330702,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -19.234375,\n          47.828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"44w3pOz5LP8Y2i-OOCDqv\",\n      \"type\": \"line\",\n      \"x\": 908.25,\n      \"y\": 1671.5546875,\n      \"width\": 19.234375,\n      \"height\": 47.828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 547271186,\n      \"version\": 189,\n      \"versionNonce\": 455012690,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -19.234375,\n          47.828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"D8AhlJ8rs-11YCcNtGA--\",\n      \"type\": \"line\",\n      \"x\": 917.47265625,\n      \"y\": 1703.1171875,\n      \"width\": 834.63671875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 2092212558,\n      \"version\": 334,\n      \"versionNonce\": 1602290894,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          834.63671875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Y701Cljlpxs3VNvaw_mdc\",\n      \"type\": \"text\",\n      \"x\": 328.625,\n      \"y\": -155.5546875,\n      \"width\": 303,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1570471314,\n      \"version\": 242,\n      \"versionNonce\": 993528466,\n      \"isDeleted\": false,\n      \"text\": \"Tell fcl when we authenticate we want\\nthe users email if its available\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fEsObWhcjK5P6WDvXVkGh\",\n      \"type\": \"text\",\n      \"x\": 336.1640625,\n      \"y\": -69.6640625,\n      \"width\": 266,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 23237326,\n      \"version\": 154,\n      \"versionNonce\": 542094030,\n      \"isDeleted\": false,\n      \"text\": \"call the callback with the current\\nusers info anytime it changes\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"msFgx92-3AP5XrGwSDBLA\",\n      \"type\": \"text\",\n      \"x\": 293.9609375,\n      \"y\": 46.890625,\n      \"width\": 407,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 503214286,\n      \"version\": 275,\n      \"versionNonce\": 233726930,\n      \"isDeleted\": false,\n      \"text\": \"subscription callbacks are always called immediately\\nwith what we currently know, in this case nothing\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"x6jn8h4W47vbsNP76m9t7\",\n      \"type\": \"text\",\n      \"x\": 301.15625,\n      \"y\": 304.3203125,\n      \"width\": 340,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 215811470,\n      \"version\": 183,\n      \"versionNonce\": 370821518,\n      \"isDeleted\": false,\n      \"text\": \"initiate the authentication sequence.\\nfcl will inject an iframe into the application\\nshowing the handshake interface\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"efFHHKuH6DUI6OL--FrFK\",\n      \"type\": \"text\",\n      \"x\": 115.1328125,\n      \"y\": -216.4453125,\n      \"width\": 267,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1880771794,\n      \"version\": 105,\n      \"versionNonce\": 2020042194,\n      \"isDeleted\": false,\n      \"text\": \"consumer of fcl\\n(the thing the user wants to use)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fpX9FAuT2DJsHXOS_rwYl\",\n      \"type\": \"text\",\n      \"x\": 641.5859375,\n      \"y\": -191.8359375,\n      \"width\": 169,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 925850130,\n      \"version\": 292,\n      \"versionNonce\": 792939790,\n      \"isDeleted\": false,\n      \"text\": \"the flow client library\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"ahlNEXVqBb6yvOSHwMkjm\",\n      \"type\": \"text\",\n      \"x\": 868.6171875,\n      \"y\": -208.4453125,\n      \"width\": 346,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 873373778,\n      \"version\": 549,\n      \"versionNonce\": 1942254930,\n      \"isDeleted\": false,\n      \"text\": \"the authn and authz provider\\n(wallet - where the users private keys live)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"10hplQ_DHSsUGighRZYHn\",\n      \"type\": \"text\",\n      \"x\": 1255.3671875,\n      \"y\": -212.2890625,\n      \"width\": 261,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1701238610,\n      \"version\": 734,\n      \"versionNonce\": 1950668050,\n      \"isDeleted\": false,\n      \"text\": \"open source static service\\nthat knows what providers exist\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"NyJ8HxoQf_0obIZfAzAwV\",\n      \"type\": \"text\",\n      \"x\": 1585.7734375,\n      \"y\": -196.234375,\n      \"width\": 195,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1508736146,\n      \"version\": 900,\n      \"versionNonce\": 1744863378,\n      \"isDeleted\": false,\n      \"text\": \"the flow blockchain itself\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"XohdwJdJwugMecg0mWWrL\",\n      \"type\": \"text\",\n      \"x\": 1059.5234375,\n      \"y\": 24.9375,\n      \"width\": 337,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 689557134,\n      \"version\": 1533,\n      \"versionNonce\": 1314831378,\n      \"isDeleted\": false,\n      \"text\": \"The user is shown the handshake service\\nwhere they can pick which provider they \\nwant to use. Once they select the\\nprovider they are redirected to\\nsaid provider where they will authenticate\\nand be redirected back to the handshake \\nservice. The handshake service then\\ncompletes the handshake by sending an\\nevent to the main frame with the details\\nprovided by the provider.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"PA-OFs620jOJH6zBUwVhQ\",\n      \"type\": \"text\",\n      \"x\": 1066.880859375,\n      \"y\": 682.69140625,\n      \"width\": 295,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 300948174,\n      \"version\": 1120,\n      \"versionNonce\": 1334809230,\n      \"isDeleted\": false,\n      \"text\": \"fcl might eventually need to check\\na contract on the\\nPROVIDER_FLOW_ACCT\\nto verify things like the HOOKS_URL.\\n\\nl6n and nonce must match the ones\\nsupplied in the challenge\\n\\nan exp of \\\"0\\\" will be taken as\\n\\\"does not expire\\\"\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"fHu_Ej57UFKhjwQiH9caw\",\n      \"type\": \"text\",\n      \"x\": 280.8388671875,\n      \"y\": 777.2763671875,\n      \"width\": 356,\n      \"height\": 180,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 179421582,\n      \"version\": 692,\n      \"versionNonce\": 925722962,\n      \"isDeleted\": false,\n      \"text\": \"fcl will receive a code and location of where\\nto find the hooks for the given provider. It\\nshould also receive a flow acct number for\\nthe given authenticated user if it exists.\\nWith this information we can then fetch the\\nprivate hooks (from the provider) and the\\nthe public hooks from onChain. If there is no\\nflow acct yet, the provider is responsible for\\nalso providing the public hooks.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 174\n    },\n    {\n      \"id\": \"NiVUTrKc8zG3S7jPO8z4E\",\n      \"type\": \"text\",\n      \"x\": 1517.263671875,\n      \"y\": 246.2626953125,\n      \"width\": 178,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1018060690,\n      \"version\": 533,\n      \"versionNonce\": 1764713490,\n      \"isDeleted\": false,\n      \"text\": \"To start with we are \\nshipping with an iframe\\nflow, there are plans\\nfor a more advanced\\nredirection style flow\\nafter v1.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"DNNIurGXx6O6fLDts2gkl\",\n      \"type\": \"text\",\n      \"x\": -246.296875,\n      \"y\": 9.25,\n      \"width\": 353,\n      \"height\": 45,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 908119694,\n      \"version\": 482,\n      \"versionNonce\": 487404558,\n      \"isDeleted\": false,\n      \"text\": \"AUTHENTICATION\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"sVyCt94pEcj9uZhTn9vtv\",\n      \"type\": \"line\",\n      \"x\": -68.8125,\n      \"y\": 230.703125,\n      \"width\": 0,\n      \"height\": 1421.8046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 674401486,\n      \"version\": 441,\n      \"versionNonce\": 1892901330,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1421.8046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1nyFcQsUWS7SmqC4Athy0\",\n      \"type\": \"text\",\n      \"x\": -235.328125,\n      \"y\": 1855.15234375,\n      \"width\": 328,\n      \"height\": 45,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1145858130,\n      \"version\": 799,\n      \"versionNonce\": 254090446,\n      \"isDeleted\": false,\n      \"text\": \"AUTHORIZATION\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"R6pgiMUijRge1kkbrguoO\",\n      \"type\": \"line\",\n      \"x\": -72.9140625,\n      \"y\": 2050.1328125,\n      \"width\": 0,\n      \"height\": 1341.1875,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1128955342,\n      \"version\": 969,\n      \"versionNonce\": 574271762,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1341.1875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Xn8RaTdO__vAZuYHGKL5b\",\n      \"type\": \"text\",\n      \"x\": 261.1953125,\n      \"y\": 1913.0625,\n      \"width\": 459,\n      \"height\": 152,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1071355726,\n      \"version\": 564,\n      \"versionNonce\": 1195845518,\n      \"isDeleted\": false,\n      \"text\": \"const resp = await fcl.send([\\n  sdk.transaction``,\\n  sdk.authorizations([\\n    fcl.currentUser().authorization\\n  ]),\\n  sdk.proposer(fcl.currentUser().proposer),\\n  sdk.payer(fcl.currentUser().payerAuthorization)\\n])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 148\n    },\n    {\n      \"id\": \"WcLAobcLfNslSdZ7OvolZ\",\n      \"type\": \"arrow\",\n      \"x\": 263.1796875,\n      \"y\": 1912.390625,\n      \"width\": 448.84375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1960256466,\n      \"version\": 231,\n      \"versionNonce\": 122265682,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          448.84375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"DrttEMCTX96FWcYsEC-QM\",\n      \"type\": \"arrow\",\n      \"x\": 739.0546875,\n      \"y\": 1943.5,\n      \"width\": 594.2421875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1100047438,\n      \"version\": 309,\n      \"versionNonce\": 1132748434,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          594.2421875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qJ7Rcxap34blcAk4L1x73\",\n      \"type\": \"text\",\n      \"x\": 269.875,\n      \"y\": 1763.5078125,\n      \"width\": 298,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 541979470,\n      \"version\": 308,\n      \"versionNonce\": 1976392338,\n      \"isDeleted\": false,\n      \"text\": \"user initiates a transaction\\nthat transaction requires the\\ncurrent users authorization.\\nFCL will look at the current\\nusers authorization hooks, broadcast\\nto the authorization hooks the\\ntransaction to authorize\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"3IpMkjUGDG9GS1LKr61cL\",\n      \"type\": \"text\",\n      \"x\": 786.453125,\n      \"y\": 1948.5390625,\n      \"width\": 403,\n      \"height\": 133,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 201813774,\n      \"version\": 913,\n      \"versionNonce\": 2084695826,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization\\n{ payload: PAYLOAD (what to actually sign)\\n   params: {}\\n     hash: HASH (checksum of payload)\\nparamHash: PARAM_HASH\\n       ix: IX (data used to create payload)\\n    roles: [PAYER, PROPOSER, AUTHORIZATION]\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 129\n    },\n    {\n      \"id\": \"eUE-R38tGtCxC9UOcIVI5\",\n      \"type\": \"arrow\",\n      \"x\": 1324.109375,\n      \"y\": 2088.8828125,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 153273102,\n      \"version\": 199,\n      \"versionNonce\": 1425282702,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qC9J4YmM4gkX3IMeBmjov\",\n      \"type\": \"text\",\n      \"x\": 813.640625,\n      \"y\": 2101.765625,\n      \"width\": 300,\n      \"height\": 342,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2044839634,\n      \"version\": 1531,\n      \"versionNonce\": 1870666514,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization RESPONSE\\n{ status: PENDING\\n  signature: null\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n    local: [\\n      { method: \\\"IFRAME\\\"\\n        endpoint: FRAME_ENDPOINT\\n        width: WIDTH\\n        height: HEIGHT\\n        background: BG_COLOR\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 338\n    },\n    {\n      \"id\": \"T4oeBL1mIwCVPHO4iKZrJ\",\n      \"type\": \"line\",\n      \"x\": 1335.0078125,\n      \"y\": 1848.889500473485,\n      \"width\": 0,\n      \"height\": 933.149562026515,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1533478926,\n      \"version\": 2063,\n      \"versionNonce\": 137336142,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          933.149562026515\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3OGsOl0sZHOJXVm3y8LXY\",\n      \"type\": \"line\",\n      \"x\": 1050.796875,\n      \"y\": 1691.8828125,\n      \"width\": 284.1953125,\n      \"height\": 158.766749526515,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2005477390,\n      \"version\": 2654,\n      \"versionNonce\": 1385622286,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          284.1953125,\n          158.766749526515\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"5LSTVyBPoxUP_HHqm1IKQ\",\n      \"type\": \"arrow\",\n      \"x\": 738.421875,\n      \"y\": 2408.21875,\n      \"width\": 588.390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 472600718,\n      \"version\": 80,\n      \"versionNonce\": 1017686350,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          588.390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Kdv8pHJpP0pY1qAPwbqbF\",\n      \"type\": \"text\",\n      \"x\": 807.703125,\n      \"y\": 2418.9765625,\n      \"width\": 216,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1413339282,\n      \"version\": 1694,\n      \"versionNonce\": 1049352850,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET\\n      ?authzId=AUTHZ_ID\\n\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"blrFHdURkWCjSBmlPwz_C\",\n      \"type\": \"arrow\",\n      \"x\": 1318.8515625,\n      \"y\": 2479.1640625,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1735255054,\n      \"version\": 348,\n      \"versionNonce\": 614616974,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"RWAxQGxaplssv98HZXX1y\",\n      \"type\": \"text\",\n      \"x\": 795.15625,\n      \"y\": 2484.734375,\n      \"width\": 291,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2044505042,\n      \"version\": 1672,\n      \"versionNonce\": 683366866,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET RESPONSE\\n{ status: PENDING\\n  signature: null\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"g1yWXaOAaP33Q8RH40kkf\",\n      \"type\": \"arrow\",\n      \"x\": 729.69921875,\n      \"y\": 2670.5,\n      \"width\": 588.390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 482511694,\n      \"version\": 161,\n      \"versionNonce\": 1686965838,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          588.390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3wEk7jBn-ZuqZMMKemuNg\",\n      \"type\": \"text\",\n      \"x\": 798.98046875,\n      \"y\": 2681.0625,\n      \"width\": 216,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1861818514,\n      \"version\": 1774,\n      \"versionNonce\": 25492366,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET\\n      ?authzId=AUTHZ_ID\\n\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"WYl7ztgpr5dhQLjJ8B07m\",\n      \"type\": \"arrow\",\n      \"x\": 1316.62109375,\n      \"y\": 2738.8046875,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1798304142,\n      \"version\": 448,\n      \"versionNonce\": 761813902,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"DcL_FQz9lcO9xEWoXxaI4\",\n      \"type\": \"text\",\n      \"x\": 783.23046875,\n      \"y\": 2745.7578125,\n      \"width\": 291,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 355219026,\n      \"version\": 1817,\n      \"versionNonce\": 1083606354,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET RESPONSE\\n{ status: SUCCESS\\n  signature: SIGNATURE\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"uzLMXeMktDSo2y-f2jumf\",\n      \"type\": \"diamond\",\n      \"x\": 1248.6796875,\n      \"y\": 2507.818359375,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1772722898,\n      \"version\": 391,\n      \"versionNonce\": 292102414,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"dVJqOzMa5HaWW6aGEfQ3P\",\n      \"type\": \"text\",\n      \"x\": 1295.063920454545,\n      \"y\": 2536.162997159091,\n      \"width\": 75,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 326087502,\n      \"version\": 264,\n      \"versionNonce\": 1845477074,\n      \"isDeleted\": false,\n      \"text\": \"user\\napproved\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"9Wxw9Kdye3C4a3ybdCf2C\",\n      \"type\": \"diamond\",\n      \"x\": 204.203125,\n      \"y\": 191.326171875,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1406251534,\n      \"version\": 525,\n      \"versionNonce\": 1701397138,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"7Z5UyLIWE26Xn9gPVwl_5\",\n      \"type\": \"text\",\n      \"x\": 246.08735795454504,\n      \"y\": 210.170809659091,\n      \"width\": 84,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1357168082,\n      \"version\": 417,\n      \"versionNonce\": 1218082194,\n      \"isDeleted\": false,\n      \"text\": \"user\\nclicks\\n\\\"sign in\\\"\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"SP_PXl00bg8Tw7CZJv9gx\",\n      \"type\": \"text\",\n      \"x\": 817.171875,\n      \"y\": 1797.40625,\n      \"width\": 406,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1267066382,\n      \"version\": 930,\n      \"versionNonce\": 336558994,\n      \"isDeleted\": false,\n      \"text\": \"The hook needs to immediately return the\\nstatus of the authorization. This response\\nneeds to also include an info hook that fcl can\\npoll for an updated status. Optionally it can also\\ninclude a array of local hooks. These local hooks\\nwill allow the current user to approve things locally\\nvia things like an iframe or a browser extension.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"Ca1eNJOoLAZUjRT0efJAr\",\n      \"type\": \"text\",\n      \"x\": 299.8671875,\n      \"y\": 2462.7265625,\n      \"width\": 337,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1242259278,\n      \"version\": 522,\n      \"versionNonce\": 639887694,\n      \"isDeleted\": false,\n      \"text\": \"because the \\\"knowing\\\" of the transaction\\nstatus is done through a backchannel, this\\nshould allow us to completely lockdown this\\niframe.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"HwC_JIwnKJyv1GD_9tqP9\",\n      \"type\": \"arrow\",\n      \"x\": 646.7265625,\n      \"y\": 2439.4609375,\n      \"width\": 190.9296875,\n      \"height\": 157.953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1713436178,\n      \"version\": 127,\n      \"versionNonce\": 726732626,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          190.9296875,\n          -157.953125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"G3i7rU2mhmxBDnWjwysoE\",\n      \"type\": \"text\",\n      \"x\": 1472.515625,\n      \"y\": 2523.546875,\n      \"width\": 218,\n      \"height\": 100,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 850350158,\n      \"version\": 188,\n      \"versionNonce\": 910315214,\n      \"isDeleted\": false,\n      \"text\": \"fcl polls on a back channel\\n(provided by the info hook)\\nfor the current status and\\nthe signature of the\\nauthorization\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"v7iD8qs6xdnzO1F5-us7W\",\n      \"type\": \"arrow\",\n      \"x\": 1461.078125,\n      \"y\": 2522.3984375,\n      \"width\": 107.765625,\n      \"height\": 85.484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1418261010,\n      \"version\": 56,\n      \"versionNonce\": 1349303634,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -107.765625,\n          -85.484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ulTg1CxbGTU_jlq8VErm8\",\n      \"type\": \"arrow\",\n      \"x\": 1464.7109375,\n      \"y\": 2585.453125,\n      \"width\": 117.3046875,\n      \"height\": 114.78125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1773922322,\n      \"version\": 41,\n      \"versionNonce\": 979357902,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -117.3046875,\n          114.78125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"xfjvdXmyunnjfu5LPyRUA\",\n      \"type\": \"text\",\n      \"x\": 1356.09375,\n      \"y\": 1986.4296875,\n      \"width\": 327,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 712589390,\n      \"version\": 286,\n      \"versionNonce\": 931274190,\n      \"isDeleted\": false,\n      \"text\": \"fcl will include enough information\\nfor the provider to recreate the payload\\nand verify the hash.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"Qza6vMiZzFUQR5uaGlp1h\",\n      \"type\": \"arrow\",\n      \"x\": 1350.2109375,\n      \"y\": 1995.9921875,\n      \"width\": 152.515625,\n      \"height\": 46.1015625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1924713806,\n      \"version\": 151,\n      \"versionNonce\": 229830094,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -152.515625,\n          46.1015625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VmTKKaZeKqy9c4ubr2W6N\",\n      \"type\": \"arrow\",\n      \"x\": 1504.3046875,\n      \"y\": 2497.6328125,\n      \"width\": 396.0078125,\n      \"height\": 278.5703125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 178779982,\n      \"version\": 364,\n      \"versionNonce\": 46231502,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -112.8125,\n          -244.8359375\n        ],\n        [\n          -396.0078125,\n          -278.5703125\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -396.0078125,\n        -278.5703125\n      ]\n    },\n    {\n      \"id\": \"d_omQJFmqPDltYTA7PQy3\",\n      \"type\": \"text\",\n      \"x\": 1400.7890625,\n      \"y\": 2342.65625,\n      \"width\": 149,\n      \"height\": 20,\n      \"angle\": 1.1645555464937702,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 405322770,\n      \"version\": 230,\n      \"versionNonce\": 1604592590,\n      \"isDeleted\": false,\n      \"text\": \"backchannel to poll\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"sCx3IIu9HfbFW7qfRD3Lz\",\n      \"type\": \"arrow\",\n      \"x\": 267.4921875,\n      \"y\": 2972.78125,\n      \"width\": 448.84375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1161635086,\n      \"version\": 516,\n      \"versionNonce\": 126493138,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          448.84375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Wc5ekixGRrqwIcLPuZ9zr\",\n      \"type\": \"text\",\n      \"x\": 280.8359375,\n      \"y\": 2989.25,\n      \"width\": 384,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1454896210,\n      \"version\": 892,\n      \"versionNonce\": 654253134,\n      \"isDeleted\": false,\n      \"text\": \"fcl.transaction(resp).subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"_sfg3w7m47XMR4_8vIpjm\",\n      \"type\": \"arrow\",\n      \"x\": 709.7578125,\n      \"y\": 2917.2265625,\n      \"width\": 453.2109375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1289706066,\n      \"version\": 490,\n      \"versionNonce\": 260825358,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -453.2109375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BxQM8jjluMDetjp9Jzhsr\",\n      \"type\": \"text\",\n      \"x\": 397.0546875,\n      \"y\": 2921.0859375,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 527848398,\n      \"version\": 805,\n      \"versionNonce\": 1751711442,\n      \"isDeleted\": false,\n      \"text\": \"fcl.send() returns\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"8GKfI1923PfEAusMB8Vyq\",\n      \"type\": \"arrow\",\n      \"x\": 722.9332386363642,\n      \"y\": 3085.691761363636,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1847975250,\n      \"version\": 874,\n      \"versionNonce\": 1821005518,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yy929ezo92I2Jcv5rOjWU\",\n      \"type\": \"line\",\n      \"x\": 612.5426136363628,\n      \"y\": 3014.998224431818,\n      \"width\": 394.5390625,\n      \"height\": 54.5,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1437522126,\n      \"version\": 333,\n      \"versionNonce\": 28467854,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -394.5390625,\n          54.5\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Qq1hIQTw4JWYoC__BTd4Y\",\n      \"type\": \"line\",\n      \"x\": 218.2513612689387,\n      \"y\": 3069.215021306818,\n      \"width\": 0,\n      \"height\": 323.980291193182,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1138909970,\n      \"version\": 1618,\n      \"versionNonce\": 395772306,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          323.980291193182\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0yMRCatIazHXvCVVIaLR0\",\n      \"type\": \"text\",\n      \"x\": 109.84019886363592,\n      \"y\": 3156.931463068182,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 741773070,\n      \"version\": 410,\n      \"versionNonce\": 715317454,\n      \"isDeleted\": false,\n      \"text\": \"transaction callback\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"EI6X3C2RLjjuugjHw7Z-r\",\n      \"type\": \"text\",\n      \"x\": 349.84375,\n      \"y\": 3089.0703125,\n      \"width\": 188,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1813946830,\n      \"version\": 990,\n      \"versionNonce\": 956679442,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK transaction\\n{ status: RECEIVED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"zhmjLXcNfFqBZfEKiQe5c\",\n      \"type\": \"arrow\",\n      \"x\": 732.9921875,\n      \"y\": 2995.6796875,\n      \"width\": 953.9765625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1249711698,\n      \"version\": 399,\n      \"versionNonce\": 783459406,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          953.9765625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"st15_wioCusHgJ2E5_Ue9\",\n      \"type\": \"text\",\n      \"x\": 794.3046875,\n      \"y\": 3003.46875,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 883500430,\n      \"version\": 1933,\n      \"versionNonce\": 1181945746,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"Gtl77oNiCZtRLb3snipe3\",\n      \"type\": \"arrow\",\n      \"x\": 1680.2890625,\n      \"y\": 3125.0859375,\n      \"width\": 946.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 757225998,\n      \"version\": 590,\n      \"versionNonce\": 1107499026,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -946.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"GCImaGPjIA1d_h_meLrB5\",\n      \"type\": \"text\",\n      \"x\": 784.2265625,\n      \"y\": 3131.9453125,\n      \"width\": 272,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 520472786,\n      \"version\": 2041,\n      \"versionNonce\": 1336009358,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION RESPONSE\\n  { status: RECEIVED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"NTGXxvhF94g8lRBlFN0Gj\",\n      \"type\": \"arrow\",\n      \"x\": 732.78515625,\n      \"y\": 3210.29296875,\n      \"width\": 953.9765625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1569466958,\n      \"version\": 505,\n      \"versionNonce\": 1919450386,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          953.9765625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Skgv5jHJCR5ASTwarEoWl\",\n      \"type\": \"text\",\n      \"x\": 794.09765625,\n      \"y\": 3218.08203125,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 811395474,\n      \"version\": 2039,\n      \"versionNonce\": 607589646,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"MmPCE991HPZl8hsI24T_0\",\n      \"type\": \"arrow\",\n      \"x\": 1679.84765625,\n      \"y\": 3254.3515625,\n      \"width\": 946.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1866686418,\n      \"version\": 630,\n      \"versionNonce\": 1715528846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -946.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vdTbySx1toyPeqIiTfJtI\",\n      \"type\": \"text\",\n      \"x\": 783.78515625,\n      \"y\": 3260.8125,\n      \"width\": 272,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 553696846,\n      \"version\": 2109,\n      \"versionNonce\": 1510280146,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION RESPONSE\\n  { status: SEALED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"eid6-y7brbopEetUriCoV\",\n      \"type\": \"arrow\",\n      \"x\": 712.228515625,\n      \"y\": 3343.537286931818,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1083048270,\n      \"version\": 923,\n      \"versionNonce\": 847634898,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"dEBoWk9-IXVo658JiIHfZ\",\n      \"type\": \"text\",\n      \"x\": 339.1390269886358,\n      \"y\": 3347.111150568182,\n      \"width\": 188,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1481114258,\n      \"version\": 1049,\n      \"versionNonce\": 1903619090,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK transaction\\n{ status: SEALED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"Tl5PuHgh0Nvsdr9lPvJb2\",\n      \"type\": \"line\",\n      \"x\": 209.498046875,\n      \"y\": 55.55078125,\n      \"width\": 397.509765625,\n      \"height\": 54.8193359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1951999630,\n      \"version\": 92,\n      \"versionNonce\": 1153143506,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          397.509765625,\n          -54.8193359375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    }\n  ],\n  \"appState\": {\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/assets/fcl-ars-auth-v2.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 1,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"id\": \"X82DstJUEARnSITNXvNB6\",\n      \"type\": \"text\",\n      \"x\": 233.3046875,\n      \"y\": -169.7421875,\n      \"width\": 45,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 136086990,\n      \"version\": 231,\n      \"versionNonce\": 1135402510,\n      \"isDeleted\": false,\n      \"text\": \"dApp\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"xH1RqhYL11nkjC3X_8IG6\",\n      \"type\": \"text\",\n      \"x\": 706.36328125,\n      \"y\": -167.02734375,\n      \"width\": 24,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1617085842,\n      \"version\": 242,\n      \"versionNonce\": 1084379602,\n      \"isDeleted\": false,\n      \"text\": \"fcl\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"GEnoVsC2cgiSNqlsaoL9h\",\n      \"type\": \"text\",\n      \"x\": 1011.1484375,\n      \"y\": -169.0859375,\n      \"width\": 77,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1943500494,\n      \"version\": 489,\n      \"versionNonce\": 469664274,\n      \"isDeleted\": false,\n      \"text\": \"provider\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"5BoO927donURMIR02xknP\",\n      \"type\": \"text\",\n      \"x\": 1344.03515625,\n      \"y\": -170.87890625,\n      \"width\": 99,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 695961166,\n      \"version\": 424,\n      \"versionNonce\": 575018382,\n      \"isDeleted\": false,\n      \"text\": \"handshake\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"BTAcvlT27MyZLn5RUNnfk\",\n      \"type\": \"line\",\n      \"x\": 251.87529592803025,\n      \"y\": -138.464902935606,\n      \"width\": 0,\n      \"height\": 3537.261777935606,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1484860622,\n      \"version\": 1714,\n      \"versionNonce\": 299491794,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3537.261777935606\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"2CwkGH75FWSk_nFRQq78l\",\n      \"type\": \"line\",\n      \"x\": 722.207741477273,\n      \"y\": -137.5621448863635,\n      \"width\": 0,\n      \"height\": 3503.9762073863635,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2003048206,\n      \"version\": 1850,\n      \"versionNonce\": 1851062674,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3503.9762073863635\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pq9iTWIOg7ZqsjTjUyydo\",\n      \"type\": \"line\",\n      \"x\": 1399.298295454546,\n      \"y\": -146.30208333333326,\n      \"width\": 0,\n      \"height\": 961.9505208333333,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1504300430,\n      \"version\": 1734,\n      \"versionNonce\": 934456334,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          961.9505208333333\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0vDqMZTf29GvLIjkcMN24\",\n      \"type\": \"line\",\n      \"x\": 1050.840317234849,\n      \"y\": -134.86162405303025,\n      \"width\": 0,\n      \"height\": 1829.3303740530303,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1891407570,\n      \"version\": 1872,\n      \"versionNonce\": 2032272462,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1829.3303740530303\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9lmBPDK9w0oEEGWepDzny\",\n      \"type\": \"arrow\",\n      \"x\": 257.1732954545463,\n      \"y\": 371.17294034090924,\n      \"width\": 453.7734375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1244921938,\n      \"version\": 750,\n      \"versionNonce\": 729298062,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          453.7734375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"-FvsrMYPf0xc-m5CxcwiW\",\n      \"type\": \"rectangle\",\n      \"x\": 749.8466796875,\n      \"y\": 367.115234375,\n      \"width\": 760.62890625,\n      \"height\": 518.2880859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1534813390,\n      \"version\": 883,\n      \"versionNonce\": 589341394,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"hO7j8hOrCRU2U3wwsSLzj\",\n      \"type\": \"text\",\n      \"x\": 371.7230113636364,\n      \"y\": 381.8902698863636,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1445008718,\n      \"version\": 406,\n      \"versionNonce\": 509369810,\n      \"isDeleted\": false,\n      \"text\": \"fcl.authenticate()\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"ikPzB7NmlgsCiM7h48wzz\",\n      \"type\": \"text\",\n      \"x\": 763.755681818182,\n      \"y\": 339.43146306818176,\n      \"width\": 48,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1341841742,\n      \"version\": 210,\n      \"versionNonce\": 123861010,\n      \"isDeleted\": false,\n      \"text\": \"iframe\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"6My7tLh7S7YLT57zWx_vE\",\n      \"type\": \"arrow\",\n      \"x\": 727.8359375000005,\n      \"y\": 390.31356534090924,\n      \"width\": 21.8359375,\n      \"height\": 0.484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1351137682,\n      \"version\": 1020,\n      \"versionNonce\": 1616856910,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          21.8359375,\n          0.484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yvj6VuyeHRCPi_vyel0r5\",\n      \"type\": \"arrow\",\n      \"x\": 759.4580078125,\n      \"y\": 394.65447443181824,\n      \"width\": 618.2982954545455,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1823087634,\n      \"version\": 419,\n      \"versionNonce\": 1799559378,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          618.2982954545455,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"hR3478POWq3jwTfrLLoWQ\",\n      \"type\": \"text\",\n      \"x\": 1066.388494318183,\n      \"y\": 407.9277343750001,\n      \"width\": 300,\n      \"height\": 76,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1005826318,\n      \"version\": 709,\n      \"versionNonce\": 208691790,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.com/authorize\\n      ?l6n=dapp.com\\n      &nonce=NONCE\\n      &scope=email\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 72\n    },\n    {\n      \"id\": \"ElxdXQ7lbC9ExIaIWTu0f\",\n      \"type\": \"diamond\",\n      \"x\": 1319.576171875,\n      \"y\": 412.4609375,\n      \"width\": 159.53125,\n      \"height\": 109.62890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 990579794,\n      \"version\": 590,\n      \"versionNonce\": 1792067150,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"UEi0jEievAhBXhf9fLfIU\",\n      \"type\": \"text\",\n      \"x\": 1365.3583984374995,\n      \"y\": 434.14897017045473,\n      \"width\": 75,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1747693518,\n      \"version\": 604,\n      \"versionNonce\": 2084572562,\n      \"isDeleted\": false,\n      \"text\": \"user\\nselects\\nprovider\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"bNLRMaNe0HSIX5yffdAPN\",\n      \"type\": \"arrow\",\n      \"x\": 1383.5680930397734,\n      \"y\": 525.4327947443182,\n      \"width\": 322.00390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 782498958,\n      \"version\": 495,\n      \"versionNonce\": 1929257166,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -322.00390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"kLg5eP6E82X_bbmIMxEVT\",\n      \"type\": \"text\",\n      \"x\": 1099.349875710228,\n      \"y\": 528.697265625,\n      \"width\": 356,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 132491342,\n      \"version\": 1386,\n      \"versionNonce\": 1544264466,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET provider.com/authorize\\n      ?l6n=dapp.com\\n      &nonce=NONCE\\n      &redirect=handshake.com/callback\\n      &scope=email\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"4e1gnzS6KGy9FpVvwsE0y\",\n      \"type\": \"diamond\",\n      \"x\": 966.4159268465914,\n      \"y\": 543.5696022727273,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1434665934,\n      \"version\": 431,\n      \"versionNonce\": 459520654,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"J-7KvrPQ_dcUDyCit0wrN\",\n      \"type\": \"text\",\n      \"x\": 989.5032848011365,\n      \"y\": 572.0363103693185,\n      \"width\": 122,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 256530706,\n      \"version\": 293,\n      \"versionNonce\": 162889042,\n      \"isDeleted\": false,\n      \"text\": \"user\\nauthenticates\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"f__AKQ5JuFy95O3dHP60q\",\n      \"type\": \"arrow\",\n      \"x\": 1053.525390625,\n      \"y\": 675.4022549715908,\n      \"width\": 299.701349431818,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 452536210,\n      \"version\": 331,\n      \"versionNonce\": 2119654418,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -299.701349431818,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"z3HYPBdyJe3D9Z5YmvVa7\",\n      \"type\": \"text\",\n      \"x\": 790.5197088068185,\n      \"y\": 679.21875,\n      \"width\": 253,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 324942094,\n      \"version\": 1118,\n      \"versionNonce\": 1074274254,\n      \"isDeleted\": false,\n      \"text\": \"JS/postMessage dapp.com\\n{ type: \\\"FLOW::AUTHN::RESP\\\"\\n  acct: FLOW_ACCT_NUMBER\\n pacct: PROVIDER_FLOW_ACCT\\n  code: CODE\\n   exp: WHEN_CODE_EXPIRES\\n   hks: HOOKS_URL\\n nonce: NONCE\\n   l6n: dapp.com\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"J_YK6v96uJRCM-Mfcd4fX\",\n      \"type\": \"arrow\",\n      \"x\": 747.220525568182,\n      \"y\": 751.5370205965908,\n      \"width\": 22.13671875,\n      \"height\": 0.50390625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1175863054,\n      \"version\": 466,\n      \"versionNonce\": 341474066,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -22.13671875,\n          0.50390625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"z1nKyn4-r_NwUhKly50Dn\",\n      \"type\": \"arrow\",\n      \"x\": 257.8700284090918,\n      \"y\": -29.200639204545496,\n      \"width\": 454.40234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 158142606,\n      \"version\": 413,\n      \"versionNonce\": 1555938254,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          454.40234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vbN6hJoyYF5gPVEd-8rbE\",\n      \"type\": \"text\",\n      \"x\": 315.75958806818187,\n      \"y\": -20.711292613636346,\n      \"width\": 347,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1494716046,\n      \"version\": 389,\n      \"versionNonce\": 745067346,\n      \"isDeleted\": false,\n      \"text\": \"fcl.currentUser().subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"ZdYenok5PgTqBOZGqWJ9T\",\n      \"type\": \"arrow\",\n      \"x\": 710.2102272727283,\n      \"y\": 87.11186079545473,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1636347534,\n      \"version\": 628,\n      \"versionNonce\": 1593011346,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"uBoSR15InMuxDFczmXPNl\",\n      \"type\": \"text\",\n      \"x\": 375.4508167613635,\n      \"y\": 92.19202769886363,\n      \"width\": 188,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 599148370,\n      \"version\": 961,\n      \"versionNonce\": 1115417294,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK currentUser\\n{ acct: null\\n  verified: false\\n  name: null\\n  avatar: null\\n  hooks: null\\n  provider: null\\n  \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"kuvYgoF80yizx2t7l1_Wu\",\n      \"type\": \"arrow\",\n      \"x\": 253.6885653409098,\n      \"y\": -108.1796875,\n      \"width\": 458.5,\n      \"height\": 0.1015625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 92803918,\n      \"version\": 196,\n      \"versionNonce\": 1433473550,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          458.5,\n          -0.1015625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"M05GYmSmMRsGs8ba8L4NE\",\n      \"type\": \"text\",\n      \"x\": 295.52734375,\n      \"y\": -99.0752840909091,\n      \"width\": 375,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1794015378,\n      \"version\": 360,\n      \"versionNonce\": 2127083790,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config().set(\\\"authn.scope\\\", \\\"email\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"H2GMhSuYq7R82OOAh6mQU\",\n      \"type\": \"line\",\n      \"x\": 209.55959990530283,\n      \"y\": 53.17418323863649,\n      \"width\": 0,\n      \"height\": 1595.1148792613635,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1272655506,\n      \"version\": 1102,\n      \"versionNonce\": 985401938,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1595.1148792613635\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"bl1HxYodwSGdHcwgLAmHu\",\n      \"type\": \"text\",\n      \"x\": 100.953125,\n      \"y\": 140.890625,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 341119374,\n      \"version\": 231,\n      \"versionNonce\": 1721629646,\n      \"isDeleted\": false,\n      \"text\": \"currentUser callback\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"tpx39Uabm9WmwItnYcdL5\",\n      \"type\": \"arrow\",\n      \"x\": 728.7411221590909,\n      \"y\": 920.90625,\n      \"width\": 319.4375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 100270482,\n      \"version\": 115,\n      \"versionNonce\": 1131109842,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          319.4375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"s3ZENkjpa3X1xnEta75Vc\",\n      \"type\": \"text\",\n      \"x\": 773.6104403409096,\n      \"y\": 922.1803977272724,\n      \"width\": 169,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1619662994,\n      \"version\": 184,\n      \"versionNonce\": 1482080334,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL\\n      ?code=CODE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"GO8hfYa3F6Nt2H5xKQ2hv\",\n      \"type\": \"text\",\n      \"x\": 1679.064453125,\n      \"y\": -178.3564453125,\n      \"width\": 38,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2033488786,\n      \"version\": 518,\n      \"versionNonce\": 857480850,\n      \"isDeleted\": false,\n      \"text\": \"flow\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"YeYjJP5A3sGBrZExuWzFZ\",\n      \"type\": \"line\",\n      \"x\": 1700.257930871212,\n      \"y\": -155.798828125,\n      \"width\": 0,\n      \"height\": 3436.556640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 172459026,\n      \"version\": 1738,\n      \"versionNonce\": 2133090578,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          3436.556640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pPk2e2mIzDd-J2s2YNg_L\",\n      \"type\": \"arrow\",\n      \"x\": 730.3025568181819,\n      \"y\": 893.6747159090908,\n      \"width\": 958.05078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1066210830,\n      \"version\": 146,\n      \"versionNonce\": 31432782,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          958.05078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lodWMrmO71NS9ONwZCs22\",\n      \"type\": \"text\",\n      \"x\": 1291.889825994319,\n      \"y\": 897.4580078125,\n      \"width\": 291,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2114953742,\n      \"version\": 302,\n      \"versionNonce\": 953841870,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT GET_FLOW_ACCT_HOOKS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"MrmoALjMi8PE8-Y0jNJqr\",\n      \"type\": \"arrow\",\n      \"x\": 1044.0951704545455,\n      \"y\": 979.98046875,\n      \"width\": 310.8046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2128973778,\n      \"version\": 91,\n      \"versionNonce\": 1168364434,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -310.8046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0idZBeC9LrWuHVBCFoGkf\",\n      \"type\": \"text\",\n      \"x\": 737.434037642046,\n      \"y\": 993.0625000000036,\n      \"width\": 441,\n      \"height\": 171,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1030981714,\n      \"version\": 1125,\n      \"versionNonce\": 1028761294,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL RESPONSE\\n  { identity: IDENTITY {\\n      email: EMAIL (because requested in scope)\\n    provider: {\\n      providerId: PROVIDER_FLOW_ACCT\\n      uid: UID (provider specific id for acct)\\n      hooks: HOOKS_URL\\n    hooks: { /* private hooks */ }\\n    \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 167\n    },\n    {\n      \"id\": \"ASD61pbFPqloPUWkna7UU\",\n      \"type\": \"arrow\",\n      \"x\": 1687.390625,\n      \"y\": 1198.1015625,\n      \"width\": 957.0078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 263596690,\n      \"version\": 122,\n      \"versionNonce\": 904029838,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -957.0078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zSn4Y-uN2zPsPLBeaHy8z\",\n      \"type\": \"text\",\n      \"x\": 1086.66512784091,\n      \"y\": 1216.2997159090914,\n      \"width\": 431,\n      \"height\": 304,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1025231886,\n      \"version\": 1091,\n      \"versionNonce\": 1242215246,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT GET_FLOW_ACCT_HOOKS RESPONSE\\n  { identity: IDENTITY {\\n      acct: FLOW_ACCT_NUMBER\\n      name: NAME\\n      avatar: AVATAR\\n      bio: BIO\\n    providers: [{\\n      providerId: PROVIDER_ID\\n      uid: UID (provider specific id for acct)\\n      hooks: HOOKS_URL\\n    hooks:\\n      authorizations: [{\\n        method: \\\"POST\\\"\\n        endpoint: \\\"provider.com/authorization\\\"\\n        data: {id: UID}\\n    \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 300\n    },\n    {\n      \"id\": \"um7BoVKD9JypyLYQYzSFM\",\n      \"type\": \"line\",\n      \"x\": 1193.5969460227266,\n      \"y\": 992.6349431818178,\n      \"width\": 0,\n      \"height\": 185.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1709236178,\n      \"version\": 162,\n      \"versionNonce\": 532411538,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          185.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Z8pExVkRYjlrhnS37T4QL\",\n      \"type\": \"line\",\n      \"x\": 1202.0539772727266,\n      \"y\": 993.8781960227268,\n      \"width\": 0,\n      \"height\": 185.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2138879502,\n      \"version\": 199,\n      \"versionNonce\": 1100535182,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          185.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0FrYhj3Gu1xlamFh5jKJz\",\n      \"type\": \"line\",\n      \"x\": 1536.2606534090905,\n      \"y\": 1218.383522727273,\n      \"width\": 0,\n      \"height\": 262.8203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 118646478,\n      \"version\": 431,\n      \"versionNonce\": 933720210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          262.8203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"iS-XZzhRH3CFhprUzLn6r\",\n      \"type\": \"line\",\n      \"x\": 1542.2780539772725,\n      \"y\": 1218.074928977273,\n      \"width\": 0,\n      \"height\": 262.8203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 517200722,\n      \"version\": 453,\n      \"versionNonce\": 221452686,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          262.8203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yqLmKs0TNdQEHDNJp__k6\",\n      \"type\": \"text\",\n      \"x\": 1156.6491477272725,\n      \"y\": 1060.1129261363637,\n      \"width\": 130,\n      \"height\": 40,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1226796622,\n      \"version\": 177,\n      \"versionNonce\": 1433499666,\n      \"isDeleted\": false,\n      \"text\": \"Provider Specific\\nPrivate Hooks\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"AaenfKnC9j29RCeA0EyPr\",\n      \"type\": \"line\",\n      \"x\": 1184.1882102272725,\n      \"y\": 990.1502130681818,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 950312082,\n      \"version\": 117,\n      \"versionNonce\": 244271630,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"T4N-w2KkZkqd5HNSam4rF\",\n      \"type\": \"line\",\n      \"x\": 1181.8386008522725,\n      \"y\": 1176.8110795454547,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 134665298,\n      \"version\": 143,\n      \"versionNonce\": 1550624210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lRiygRl6NILx4OZA0zSgl\",\n      \"type\": \"text\",\n      \"x\": 1518.4811789772725,\n      \"y\": 1315.964488636364,\n      \"width\": 94,\n      \"height\": 40,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1665507406,\n      \"version\": 343,\n      \"versionNonce\": 1716489810,\n      \"isDeleted\": false,\n      \"text\": \"OnChain\\nPublic Hooks\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"4mtya57_IVob6kqyppHqS\",\n      \"type\": \"line\",\n      \"x\": 1521.9618252840905,\n      \"y\": 1217.309303977273,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1059044562,\n      \"version\": 269,\n      \"versionNonce\": 318027726,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"OZw9Wl9s0eXouUyoTFXUG\",\n      \"type\": \"line\",\n      \"x\": 1521.577237215909,\n      \"y\": 1479.95703125,\n      \"width\": 19.17578125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 82386062,\n      \"version\": 284,\n      \"versionNonce\": 1303245842,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          19.17578125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Hjl-IY-0lXFp7XFV0gYUs\",\n      \"type\": \"arrow\",\n      \"x\": 713.2150213068189,\n      \"y\": 1236.5823863636356,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2095221074,\n      \"version\": 694,\n      \"versionNonce\": 1556582738,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"U2hEd78EtsQOXYbHgGMY4\",\n      \"type\": \"text\",\n      \"x\": 265.84108664772725,\n      \"y\": 1242.5240589488676,\n      \"width\": 403,\n      \"height\": 418,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 526576846,\n      \"version\": 1349,\n      \"versionNonce\": 1016692494,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK currentUser\\n{ acct: FLOW_ACCT_NUMBER\\n  verified: true\\n  name: NAME\\n  avatar: AVATAR\\n  email: EMAIL\\n  hooks: {\\n    authorizations: [{\\n     method: \\\"POST\\\"\\n     endpoint: \\\"provider.com/authorization\\\"\\n     data: {id: UID}\\n  provider: {\\n    providerId: PROVIDER_ID\\n    uid: UID\\n    hooks: HOOKS_URL\\n  providers: [{\\n    providerId: PROVIDER_ID\\n    uid: UID\\n    hooks: HOOKS_URL\\n  ]\\n  \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 414\n    },\n    {\n      \"id\": \"nyHbdI1Y5GBfMmi1zZxfi\",\n      \"type\": \"line\",\n      \"x\": 704.96875,\n      \"y\": 920.3565340909091,\n      \"width\": 0.8274147727272521,\n      \"height\": 258.49431818181813,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2039216530,\n      \"version\": 396,\n      \"versionNonce\": 392936590,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.8274147727272521,\n          258.49431818181813\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"mjT8vnwL-WYLTTVhQf_u2\",\n      \"type\": \"line\",\n      \"x\": 701.1210937499995,\n      \"y\": 920.296164772727,\n      \"width\": 0.8274147727272521,\n      \"height\": 258.49431818181813,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1734622162,\n      \"version\": 474,\n      \"versionNonce\": 1960228878,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.8274147727272521,\n          258.49431818181813\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"qBQNXmZYHaiAza70BKW9Z\",\n      \"type\": \"line\",\n      \"x\": 711.6413352272727,\n      \"y\": 919.1207386363636,\n      \"width\": 11.864346590909122,\n      \"height\": 1.281960227272748,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 374289614,\n      \"version\": 79,\n      \"versionNonce\": 1181954958,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -11.864346590909122,\n          1.281960227272748\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -11.864346590909122,\n        1.281960227272748\n      ]\n    },\n    {\n      \"id\": \"ZiyIGma4qyuADMTHFSJkG\",\n      \"type\": \"line\",\n      \"x\": 714.4928977272727,\n      \"y\": 1174.9339488636365,\n      \"width\": 15.230823863636374,\n      \"height\": 0.7102272727270247,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1949701202,\n      \"version\": 23,\n      \"versionNonce\": 1245209550,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -15.230823863636374,\n          0.7102272727270247\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Ogp527Unhhs3_237MbyvS\",\n      \"type\": \"text\",\n      \"x\": 521.5042613636359,\n      \"y\": 1032.1960227272734,\n      \"width\": 307,\n      \"height\": 40,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1686109714,\n      \"version\": 322,\n      \"versionNonce\": 885254606,\n      \"isDeleted\": false,\n      \"text\": \"If This Request Returns Status 200\\nThe Account Is Considered Verified\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"AgLm-3O6LxnLLTdCrmZzK\",\n      \"type\": \"line\",\n      \"x\": 174.6044034090911,\n      \"y\": 1249.8771306818192,\n      \"width\": 0.13849431818181301,\n      \"height\": 360.61789772727263,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1354660814,\n      \"version\": 701,\n      \"versionNonce\": 404755214,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -0.13849431818181301,\n          360.61789772727263\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"JaCl70erlODzBwvSCq6hf\",\n      \"type\": \"line\",\n      \"x\": 170.66086647727246,\n      \"y\": 1249.8167613636372,\n      \"width\": 0,\n      \"height\": 363.73508522727184,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2102554642,\n      \"version\": 806,\n      \"versionNonce\": 1863709394,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          363.73508522727184\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -0.8274147727272521,\n        258.49431818181813\n      ]\n    },\n    {\n      \"id\": \"Ap4e4vPdboFvWfekpXnP5\",\n      \"type\": \"line\",\n      \"x\": 181.27698863636408,\n      \"y\": 1248.641335227274,\n      \"width\": 11.864346590909122,\n      \"height\": 1.281960227272748,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 190435854,\n      \"version\": 158,\n      \"versionNonce\": 1899462670,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -11.864346590909122,\n          1.281960227272748\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -11.864346590909122,\n        1.281960227272748\n      ]\n    },\n    {\n      \"id\": \"VD0dZ49pYA5zsWglDlPVy\",\n      \"type\": \"line\",\n      \"x\": 182.90696022727315,\n      \"y\": 1616.0703125000061,\n      \"width\": 15.230823863636374,\n      \"height\": 0.7102272727270247,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1299094994,\n      \"version\": 198,\n      \"versionNonce\": 724476558,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -15.230823863636374,\n          0.7102272727270247\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"n5NmVSRkP5wnLlL6p5rYH\",\n      \"type\": \"text\",\n      \"x\": -54.67329545454572,\n      \"y\": 1378.16548295455,\n      \"width\": 332,\n      \"height\": 100,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2091933774,\n      \"version\": 843,\n      \"versionNonce\": 1776913362,\n      \"isDeleted\": false,\n      \"text\": \"Merges the Public (onChain)\\nand Private (provider) hooks\\n(deep merge last wins, public then private)\\nNOTE: Data and format of what\\nis exposed to the subscriber may change\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"Kk39gnjHIQOItun-PEroJ\",\n      \"type\": \"line\",\n      \"x\": 93.5390625,\n      \"y\": 1701.2890625,\n      \"width\": 777.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1667327698,\n      \"version\": 252,\n      \"versionNonce\": 1399272338,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          777.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BVHNCKtE39YcX7rl-NYFk\",\n      \"type\": \"line\",\n      \"x\": 893.0234375,\n      \"y\": 1676.5390625,\n      \"width\": 19.234375,\n      \"height\": 47.828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 473551378,\n      \"version\": 151,\n      \"versionNonce\": 1619330702,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -19.234375,\n          47.828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"44w3pOz5LP8Y2i-OOCDqv\",\n      \"type\": \"line\",\n      \"x\": 908.25,\n      \"y\": 1671.5546875,\n      \"width\": 19.234375,\n      \"height\": 47.828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 547271186,\n      \"version\": 189,\n      \"versionNonce\": 455012690,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -19.234375,\n          47.828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"D8AhlJ8rs-11YCcNtGA--\",\n      \"type\": \"line\",\n      \"x\": 917.47265625,\n      \"y\": 1703.1171875,\n      \"width\": 834.63671875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 2092212558,\n      \"version\": 334,\n      \"versionNonce\": 1602290894,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          834.63671875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Y701Cljlpxs3VNvaw_mdc\",\n      \"type\": \"text\",\n      \"x\": 328.625,\n      \"y\": -155.5546875,\n      \"width\": 303,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1570471314,\n      \"version\": 242,\n      \"versionNonce\": 993528466,\n      \"isDeleted\": false,\n      \"text\": \"Tell fcl when we authenticate we want\\nthe users email if its available\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fEsObWhcjK5P6WDvXVkGh\",\n      \"type\": \"text\",\n      \"x\": 336.1640625,\n      \"y\": -69.6640625,\n      \"width\": 266,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 23237326,\n      \"version\": 154,\n      \"versionNonce\": 542094030,\n      \"isDeleted\": false,\n      \"text\": \"call the callback with the current\\nusers info anytime it changes\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"msFgx92-3AP5XrGwSDBLA\",\n      \"type\": \"text\",\n      \"x\": 293.9609375,\n      \"y\": 46.890625,\n      \"width\": 407,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 503214286,\n      \"version\": 275,\n      \"versionNonce\": 233726930,\n      \"isDeleted\": false,\n      \"text\": \"subscription callbacks are always called immediately\\nwith what we currently know, in this case nothing\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"x6jn8h4W47vbsNP76m9t7\",\n      \"type\": \"text\",\n      \"x\": 301.15625,\n      \"y\": 304.3203125,\n      \"width\": 340,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 215811470,\n      \"version\": 183,\n      \"versionNonce\": 370821518,\n      \"isDeleted\": false,\n      \"text\": \"initiate the authentication sequence.\\nfcl will inject an iframe into the application\\nshowing the handshake interface\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"efFHHKuH6DUI6OL--FrFK\",\n      \"type\": \"text\",\n      \"x\": 115.1328125,\n      \"y\": -216.4453125,\n      \"width\": 267,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1880771794,\n      \"version\": 105,\n      \"versionNonce\": 2020042194,\n      \"isDeleted\": false,\n      \"text\": \"consumer of fcl\\n(the thing the user wants to use)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fpX9FAuT2DJsHXOS_rwYl\",\n      \"type\": \"text\",\n      \"x\": 641.5859375,\n      \"y\": -191.8359375,\n      \"width\": 169,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 925850130,\n      \"version\": 292,\n      \"versionNonce\": 792939790,\n      \"isDeleted\": false,\n      \"text\": \"the flow client library\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"ahlNEXVqBb6yvOSHwMkjm\",\n      \"type\": \"text\",\n      \"x\": 868.6171875,\n      \"y\": -208.4453125,\n      \"width\": 346,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 873373778,\n      \"version\": 549,\n      \"versionNonce\": 1942254930,\n      \"isDeleted\": false,\n      \"text\": \"the authn and authz provider\\n(wallet - where the users private keys live)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"10hplQ_DHSsUGighRZYHn\",\n      \"type\": \"text\",\n      \"x\": 1255.3671875,\n      \"y\": -212.2890625,\n      \"width\": 261,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1701238610,\n      \"version\": 734,\n      \"versionNonce\": 1950668050,\n      \"isDeleted\": false,\n      \"text\": \"open source static service\\nthat knows what providers exist\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"NyJ8HxoQf_0obIZfAzAwV\",\n      \"type\": \"text\",\n      \"x\": 1585.7734375,\n      \"y\": -196.234375,\n      \"width\": 195,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1508736146,\n      \"version\": 900,\n      \"versionNonce\": 1744863378,\n      \"isDeleted\": false,\n      \"text\": \"the flow blockchain itself\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"XohdwJdJwugMecg0mWWrL\",\n      \"type\": \"text\",\n      \"x\": 1060.3828125,\n      \"y\": 159.0048828125,\n      \"width\": 337,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 689557134,\n      \"version\": 1618,\n      \"versionNonce\": 1200972814,\n      \"isDeleted\": false,\n      \"text\": \"The user is shown the handshake service\\nwhere they can pick which provider they \\nwant to use. Once they select the\\nprovider they are redirected to\\nsaid provider where they will authenticate\\nand be redirected back to the handshake \\nservice. The handshake service then\\ncompletes the handshake by sending an\\nevent to the main frame with the details\\nprovided by the provider.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"PA-OFs620jOJH6zBUwVhQ\",\n      \"type\": \"text\",\n      \"x\": 1071.4267578125,\n      \"y\": 669,\n      \"width\": 295,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 300948174,\n      \"version\": 1178,\n      \"versionNonce\": 1258392846,\n      \"isDeleted\": false,\n      \"text\": \"fcl might eventually need to check\\na contract on the\\nPROVIDER_FLOW_ACCT\\nto verify things like the HOOKS_URL.\\n\\nl6n and nonce must match the ones\\nsupplied in the challenge\\n\\nan exp of \\\"0\\\" will be taken as\\n\\\"does not expire\\\"\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"fHu_Ej57UFKhjwQiH9caw\",\n      \"type\": \"text\",\n      \"x\": 280.8388671875,\n      \"y\": 777.2763671875,\n      \"width\": 356,\n      \"height\": 180,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 179421582,\n      \"version\": 692,\n      \"versionNonce\": 925722962,\n      \"isDeleted\": false,\n      \"text\": \"fcl will receive a code and location of where\\nto find the hooks for the given provider. It\\nshould also receive a flow acct number for\\nthe given authenticated user if it exists.\\nWith this information we can then fetch the\\nprivate hooks (from the provider) and the\\nthe public hooks from onChain. If there is no\\nflow acct yet, the provider is responsible for\\nalso providing the public hooks.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 174\n    },\n    {\n      \"id\": \"NiVUTrKc8zG3S7jPO8z4E\",\n      \"type\": \"text\",\n      \"x\": 1519.1728515625,\n      \"y\": 373.26953125,\n      \"width\": 178,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1018060690,\n      \"version\": 591,\n      \"versionNonce\": 683364114,\n      \"isDeleted\": false,\n      \"text\": \"To start with we are \\nshipping with an iframe\\nflow, there are plans\\nfor a more advanced\\nredirection style flow\\nafter v1.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"DNNIurGXx6O6fLDts2gkl\",\n      \"type\": \"text\",\n      \"x\": -246.296875,\n      \"y\": 9.25,\n      \"width\": 353,\n      \"height\": 45,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 908119694,\n      \"version\": 482,\n      \"versionNonce\": 487404558,\n      \"isDeleted\": false,\n      \"text\": \"AUTHENTICATION\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"sVyCt94pEcj9uZhTn9vtv\",\n      \"type\": \"line\",\n      \"x\": -68.8125,\n      \"y\": 230.703125,\n      \"width\": 0,\n      \"height\": 1421.8046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 674401486,\n      \"version\": 441,\n      \"versionNonce\": 1892901330,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1421.8046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1nyFcQsUWS7SmqC4Athy0\",\n      \"type\": \"text\",\n      \"x\": -235.328125,\n      \"y\": 1855.15234375,\n      \"width\": 328,\n      \"height\": 45,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1145858130,\n      \"version\": 799,\n      \"versionNonce\": 254090446,\n      \"isDeleted\": false,\n      \"text\": \"AUTHORIZATION\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"R6pgiMUijRge1kkbrguoO\",\n      \"type\": \"line\",\n      \"x\": -72.9140625,\n      \"y\": 2050.1328125,\n      \"width\": 0,\n      \"height\": 1341.1875,\n      \"angle\": 0,\n      \"strokeColor\": \"#495057\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 30,\n      \"seed\": 1128955342,\n      \"version\": 969,\n      \"versionNonce\": 574271762,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1341.1875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Xn8RaTdO__vAZuYHGKL5b\",\n      \"type\": \"text\",\n      \"x\": 261.1953125,\n      \"y\": 1913.0625,\n      \"width\": 459,\n      \"height\": 152,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1071355726,\n      \"version\": 564,\n      \"versionNonce\": 1195845518,\n      \"isDeleted\": false,\n      \"text\": \"const resp = await fcl.send([\\n  sdk.transaction``,\\n  sdk.authorizations([\\n    fcl.currentUser().authorization\\n  ]),\\n  sdk.proposer(fcl.currentUser().proposer),\\n  sdk.payer(fcl.currentUser().payerAuthorization)\\n])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 148\n    },\n    {\n      \"id\": \"WcLAobcLfNslSdZ7OvolZ\",\n      \"type\": \"arrow\",\n      \"x\": 263.1796875,\n      \"y\": 1912.390625,\n      \"width\": 448.84375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1960256466,\n      \"version\": 231,\n      \"versionNonce\": 122265682,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          448.84375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"DrttEMCTX96FWcYsEC-QM\",\n      \"type\": \"arrow\",\n      \"x\": 739.0546875,\n      \"y\": 1943.5,\n      \"width\": 594.2421875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1100047438,\n      \"version\": 309,\n      \"versionNonce\": 1132748434,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          594.2421875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qJ7Rcxap34blcAk4L1x73\",\n      \"type\": \"text\",\n      \"x\": 269.875,\n      \"y\": 1763.5078125,\n      \"width\": 298,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 541979470,\n      \"version\": 308,\n      \"versionNonce\": 1976392338,\n      \"isDeleted\": false,\n      \"text\": \"user initiates a transaction\\nthat transaction requires the\\ncurrent users authorization.\\nFCL will look at the current\\nusers authorization hooks, broadcast\\nto the authorization hooks the\\ntransaction to authorize\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"3IpMkjUGDG9GS1LKr61cL\",\n      \"type\": \"text\",\n      \"x\": 786.453125,\n      \"y\": 1948.5390625,\n      \"width\": 403,\n      \"height\": 133,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 201813774,\n      \"version\": 913,\n      \"versionNonce\": 2084695826,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization\\n{ payload: PAYLOAD (what to actually sign)\\n   params: {}\\n     hash: HASH (checksum of payload)\\nparamHash: PARAM_HASH\\n       ix: IX (data used to create payload)\\n    roles: [PAYER, PROPOSER, AUTHORIZATION]\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 129\n    },\n    {\n      \"id\": \"eUE-R38tGtCxC9UOcIVI5\",\n      \"type\": \"arrow\",\n      \"x\": 1324.109375,\n      \"y\": 2088.8828125,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 153273102,\n      \"version\": 199,\n      \"versionNonce\": 1425282702,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qC9J4YmM4gkX3IMeBmjov\",\n      \"type\": \"text\",\n      \"x\": 813.640625,\n      \"y\": 2101.765625,\n      \"width\": 300,\n      \"height\": 342,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2044839634,\n      \"version\": 1531,\n      \"versionNonce\": 1870666514,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization RESPONSE\\n{ status: PENDING\\n  signature: null\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n    local: [\\n      { method: \\\"IFRAME\\\"\\n        endpoint: FRAME_ENDPOINT\\n        width: WIDTH\\n        height: HEIGHT\\n        background: BG_COLOR\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 338\n    },\n    {\n      \"id\": \"T4oeBL1mIwCVPHO4iKZrJ\",\n      \"type\": \"line\",\n      \"x\": 1335.0078125,\n      \"y\": 1848.889500473485,\n      \"width\": 0,\n      \"height\": 933.149562026515,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1533478926,\n      \"version\": 2063,\n      \"versionNonce\": 137336142,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          933.149562026515\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3OGsOl0sZHOJXVm3y8LXY\",\n      \"type\": \"line\",\n      \"x\": 1050.796875,\n      \"y\": 1691.8828125,\n      \"width\": 284.1953125,\n      \"height\": 158.766749526515,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 2005477390,\n      \"version\": 2654,\n      \"versionNonce\": 1385622286,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          284.1953125,\n          158.766749526515\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"5LSTVyBPoxUP_HHqm1IKQ\",\n      \"type\": \"arrow\",\n      \"x\": 738.421875,\n      \"y\": 2408.21875,\n      \"width\": 588.390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 472600718,\n      \"version\": 80,\n      \"versionNonce\": 1017686350,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          588.390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Kdv8pHJpP0pY1qAPwbqbF\",\n      \"type\": \"text\",\n      \"x\": 807.703125,\n      \"y\": 2418.9765625,\n      \"width\": 216,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1413339282,\n      \"version\": 1694,\n      \"versionNonce\": 1049352850,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET\\n      ?authzId=AUTHZ_ID\\n\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"blrFHdURkWCjSBmlPwz_C\",\n      \"type\": \"arrow\",\n      \"x\": 1318.8515625,\n      \"y\": 2479.1640625,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1735255054,\n      \"version\": 348,\n      \"versionNonce\": 614616974,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"RWAxQGxaplssv98HZXX1y\",\n      \"type\": \"text\",\n      \"x\": 795.15625,\n      \"y\": 2484.734375,\n      \"width\": 291,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2044505042,\n      \"version\": 1672,\n      \"versionNonce\": 683366866,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET RESPONSE\\n{ status: PENDING\\n  signature: null\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"g1yWXaOAaP33Q8RH40kkf\",\n      \"type\": \"arrow\",\n      \"x\": 729.69921875,\n      \"y\": 2670.5,\n      \"width\": 588.390625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 482511694,\n      \"version\": 161,\n      \"versionNonce\": 1686965838,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          588.390625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3wEk7jBn-ZuqZMMKemuNg\",\n      \"type\": \"text\",\n      \"x\": 798.98046875,\n      \"y\": 2681.0625,\n      \"width\": 216,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1861818514,\n      \"version\": 1774,\n      \"versionNonce\": 25492366,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET\\n      ?authzId=AUTHZ_ID\\n\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"WYl7ztgpr5dhQLjJ8B07m\",\n      \"type\": \"arrow\",\n      \"x\": 1316.62109375,\n      \"y\": 2738.8046875,\n      \"width\": 591.359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1798304142,\n      \"version\": 448,\n      \"versionNonce\": 761813902,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -591.359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"DcL_FQz9lcO9xEWoXxaI4\",\n      \"type\": \"text\",\n      \"x\": 783.23046875,\n      \"y\": 2745.7578125,\n      \"width\": 291,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 355219026,\n      \"version\": 1817,\n      \"versionNonce\": 1083606354,\n      \"isDeleted\": false,\n      \"text\": \"HOOK info HTTP/GET RESPONSE\\n{ status: SUCCESS\\n  signature: SIGNATURE\\n  acct: FLOW_ACCT_NUMBER\\n  hooks: {\\n    info: {\\n      method: \\\"GET\\\"\\n      endpoint: AUTHZ_INFO_URL\\n      data: {authzId: AUTHZ_ID}\\n        \\n      \\n  \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"uzLMXeMktDSo2y-f2jumf\",\n      \"type\": \"diamond\",\n      \"x\": 1248.6796875,\n      \"y\": 2507.818359375,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1772722898,\n      \"version\": 391,\n      \"versionNonce\": 292102414,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"dVJqOzMa5HaWW6aGEfQ3P\",\n      \"type\": \"text\",\n      \"x\": 1295.063920454545,\n      \"y\": 2536.162997159091,\n      \"width\": 75,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 326087502,\n      \"version\": 264,\n      \"versionNonce\": 1845477074,\n      \"isDeleted\": false,\n      \"text\": \"user\\napproved\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"9Wxw9Kdye3C4a3ybdCf2C\",\n      \"type\": \"diamond\",\n      \"x\": 204.203125,\n      \"y\": 191.326171875,\n      \"width\": 170.40625,\n      \"height\": 109.87890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1406251534,\n      \"version\": 525,\n      \"versionNonce\": 1701397138,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"7Z5UyLIWE26Xn9gPVwl_5\",\n      \"type\": \"text\",\n      \"x\": 246.08735795454504,\n      \"y\": 210.170809659091,\n      \"width\": 84,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1357168082,\n      \"version\": 417,\n      \"versionNonce\": 1218082194,\n      \"isDeleted\": false,\n      \"text\": \"user\\nclicks\\n\\\"sign in\\\"\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"SP_PXl00bg8Tw7CZJv9gx\",\n      \"type\": \"text\",\n      \"x\": 817.171875,\n      \"y\": 1797.40625,\n      \"width\": 406,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1267066382,\n      \"version\": 930,\n      \"versionNonce\": 336558994,\n      \"isDeleted\": false,\n      \"text\": \"The hook needs to immediately return the\\nstatus of the authorization. This response\\nneeds to also include an info hook that fcl can\\npoll for an updated status. Optionally it can also\\ninclude a array of local hooks. These local hooks\\nwill allow the current user to approve things locally\\nvia things like an iframe or a browser extension.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"Ca1eNJOoLAZUjRT0efJAr\",\n      \"type\": \"text\",\n      \"x\": 299.8671875,\n      \"y\": 2462.7265625,\n      \"width\": 337,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1242259278,\n      \"version\": 522,\n      \"versionNonce\": 639887694,\n      \"isDeleted\": false,\n      \"text\": \"because the \\\"knowing\\\" of the transaction\\nstatus is done through a backchannel, this\\nshould allow us to completely lockdown this\\niframe.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"HwC_JIwnKJyv1GD_9tqP9\",\n      \"type\": \"arrow\",\n      \"x\": 646.7265625,\n      \"y\": 2439.4609375,\n      \"width\": 190.9296875,\n      \"height\": 157.953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1713436178,\n      \"version\": 127,\n      \"versionNonce\": 726732626,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          190.9296875,\n          -157.953125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"G3i7rU2mhmxBDnWjwysoE\",\n      \"type\": \"text\",\n      \"x\": 1472.515625,\n      \"y\": 2523.546875,\n      \"width\": 218,\n      \"height\": 100,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 850350158,\n      \"version\": 188,\n      \"versionNonce\": 910315214,\n      \"isDeleted\": false,\n      \"text\": \"fcl polls on a back channel\\n(provided by the info hook)\\nfor the current status and\\nthe signature of the\\nauthorization\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"v7iD8qs6xdnzO1F5-us7W\",\n      \"type\": \"arrow\",\n      \"x\": 1461.078125,\n      \"y\": 2522.3984375,\n      \"width\": 107.765625,\n      \"height\": 85.484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1418261010,\n      \"version\": 56,\n      \"versionNonce\": 1349303634,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -107.765625,\n          -85.484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ulTg1CxbGTU_jlq8VErm8\",\n      \"type\": \"arrow\",\n      \"x\": 1464.7109375,\n      \"y\": 2585.453125,\n      \"width\": 117.3046875,\n      \"height\": 114.78125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1773922322,\n      \"version\": 41,\n      \"versionNonce\": 979357902,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -117.3046875,\n          114.78125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"xfjvdXmyunnjfu5LPyRUA\",\n      \"type\": \"text\",\n      \"x\": 1356.09375,\n      \"y\": 1986.4296875,\n      \"width\": 327,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 712589390,\n      \"version\": 286,\n      \"versionNonce\": 931274190,\n      \"isDeleted\": false,\n      \"text\": \"fcl will include enough information\\nfor the provider to recreate the payload\\nand verify the hash.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"Qza6vMiZzFUQR5uaGlp1h\",\n      \"type\": \"arrow\",\n      \"x\": 1350.2109375,\n      \"y\": 1995.9921875,\n      \"width\": 152.515625,\n      \"height\": 46.1015625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1924713806,\n      \"version\": 151,\n      \"versionNonce\": 229830094,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -152.515625,\n          46.1015625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VmTKKaZeKqy9c4ubr2W6N\",\n      \"type\": \"arrow\",\n      \"x\": 1504.3046875,\n      \"y\": 2497.6328125,\n      \"width\": 396.0078125,\n      \"height\": 278.5703125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 178779982,\n      \"version\": 364,\n      \"versionNonce\": 46231502,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -112.8125,\n          -244.8359375\n        ],\n        [\n          -396.0078125,\n          -278.5703125\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -396.0078125,\n        -278.5703125\n      ]\n    },\n    {\n      \"id\": \"d_omQJFmqPDltYTA7PQy3\",\n      \"type\": \"text\",\n      \"x\": 1400.7890625,\n      \"y\": 2342.65625,\n      \"width\": 149,\n      \"height\": 20,\n      \"angle\": 1.1645555464937702,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 405322770,\n      \"version\": 230,\n      \"versionNonce\": 1604592590,\n      \"isDeleted\": false,\n      \"text\": \"backchannel to poll\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"sCx3IIu9HfbFW7qfRD3Lz\",\n      \"type\": \"arrow\",\n      \"x\": 267.4921875,\n      \"y\": 2972.78125,\n      \"width\": 448.84375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1161635086,\n      \"version\": 516,\n      \"versionNonce\": 126493138,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          448.84375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Wc5ekixGRrqwIcLPuZ9zr\",\n      \"type\": \"text\",\n      \"x\": 280.8359375,\n      \"y\": 2989.25,\n      \"width\": 384,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1454896210,\n      \"version\": 892,\n      \"versionNonce\": 654253134,\n      \"isDeleted\": false,\n      \"text\": \"fcl.transaction(resp).subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"_sfg3w7m47XMR4_8vIpjm\",\n      \"type\": \"arrow\",\n      \"x\": 709.7578125,\n      \"y\": 2917.2265625,\n      \"width\": 453.2109375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1289706066,\n      \"version\": 490,\n      \"versionNonce\": 260825358,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -453.2109375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BxQM8jjluMDetjp9Jzhsr\",\n      \"type\": \"text\",\n      \"x\": 397.0546875,\n      \"y\": 2921.0859375,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 527848398,\n      \"version\": 805,\n      \"versionNonce\": 1751711442,\n      \"isDeleted\": false,\n      \"text\": \"fcl.send() returns\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"8GKfI1923PfEAusMB8Vyq\",\n      \"type\": \"arrow\",\n      \"x\": 722.9332386363642,\n      \"y\": 3085.691761363636,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1847975250,\n      \"version\": 874,\n      \"versionNonce\": 1821005518,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"yy929ezo92I2Jcv5rOjWU\",\n      \"type\": \"line\",\n      \"x\": 612.5426136363628,\n      \"y\": 3014.998224431818,\n      \"width\": 394.5390625,\n      \"height\": 54.5,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1437522126,\n      \"version\": 333,\n      \"versionNonce\": 28467854,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -394.5390625,\n          54.5\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Qq1hIQTw4JWYoC__BTd4Y\",\n      \"type\": \"line\",\n      \"x\": 218.2513612689387,\n      \"y\": 3069.215021306818,\n      \"width\": 0,\n      \"height\": 323.980291193182,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1138909970,\n      \"version\": 1618,\n      \"versionNonce\": 395772306,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          323.980291193182\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0yMRCatIazHXvCVVIaLR0\",\n      \"type\": \"text\",\n      \"x\": 109.84019886363592,\n      \"y\": 3156.931463068182,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 741773070,\n      \"version\": 410,\n      \"versionNonce\": 715317454,\n      \"isDeleted\": false,\n      \"text\": \"transaction callback\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"EI6X3C2RLjjuugjHw7Z-r\",\n      \"type\": \"text\",\n      \"x\": 349.84375,\n      \"y\": 3089.0703125,\n      \"width\": 188,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1813946830,\n      \"version\": 990,\n      \"versionNonce\": 956679442,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK transaction\\n{ status: RECEIVED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"zhmjLXcNfFqBZfEKiQe5c\",\n      \"type\": \"arrow\",\n      \"x\": 732.9921875,\n      \"y\": 2995.6796875,\n      \"width\": 953.9765625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1249711698,\n      \"version\": 399,\n      \"versionNonce\": 783459406,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          953.9765625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"st15_wioCusHgJ2E5_Ue9\",\n      \"type\": \"text\",\n      \"x\": 794.3046875,\n      \"y\": 3003.46875,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 883500430,\n      \"version\": 1933,\n      \"versionNonce\": 1181945746,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"Gtl77oNiCZtRLb3snipe3\",\n      \"type\": \"arrow\",\n      \"x\": 1680.2890625,\n      \"y\": 3125.0859375,\n      \"width\": 946.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 757225998,\n      \"version\": 590,\n      \"versionNonce\": 1107499026,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -946.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"GCImaGPjIA1d_h_meLrB5\",\n      \"type\": \"text\",\n      \"x\": 784.2265625,\n      \"y\": 3131.9453125,\n      \"width\": 272,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 520472786,\n      \"version\": 2041,\n      \"versionNonce\": 1336009358,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION RESPONSE\\n  { status: RECEIVED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"NTGXxvhF94g8lRBlFN0Gj\",\n      \"type\": \"arrow\",\n      \"x\": 732.78515625,\n      \"y\": 3210.29296875,\n      \"width\": 953.9765625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1569466958,\n      \"version\": 505,\n      \"versionNonce\": 1919450386,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          953.9765625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Skgv5jHJCR5ASTwarEoWl\",\n      \"type\": \"text\",\n      \"x\": 794.09765625,\n      \"y\": 3218.08203125,\n      \"width\": 188,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 811395474,\n      \"version\": 2039,\n      \"versionNonce\": 607589646,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"MmPCE991HPZl8hsI24T_0\",\n      \"type\": \"arrow\",\n      \"x\": 1679.84765625,\n      \"y\": 3254.3515625,\n      \"width\": 946.8203125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 2,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1866686418,\n      \"version\": 630,\n      \"versionNonce\": 1715528846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -946.8203125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vdTbySx1toyPeqIiTfJtI\",\n      \"type\": \"text\",\n      \"x\": 783.78515625,\n      \"y\": 3260.8125,\n      \"width\": 272,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 553696846,\n      \"version\": 2109,\n      \"versionNonce\": 1510280146,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/GET_TRANSACTION RESPONSE\\n  { status: SEALED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"eid6-y7brbopEetUriCoV\",\n      \"type\": \"arrow\",\n      \"x\": 712.228515625,\n      \"y\": 3343.537286931818,\n      \"width\": 495.80078125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 2,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1083048270,\n      \"version\": 923,\n      \"versionNonce\": 847634898,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -495.80078125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"dEBoWk9-IXVo658JiIHfZ\",\n      \"type\": \"text\",\n      \"x\": 339.1390269886358,\n      \"y\": 3347.111150568182,\n      \"width\": 188,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1481114258,\n      \"version\": 1049,\n      \"versionNonce\": 1903619090,\n      \"isDeleted\": false,\n      \"text\": \"CALLBACK transaction\\n{ status: SEALED\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"Tl5PuHgh0Nvsdr9lPvJb2\",\n      \"type\": \"line\",\n      \"x\": 209.498046875,\n      \"y\": 55.55078125,\n      \"width\": 397.509765625,\n      \"height\": 54.8193359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#1864ab\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 4,\n      \"roughness\": 0,\n      \"opacity\": 100,\n      \"seed\": 1951999630,\n      \"version\": 92,\n      \"versionNonce\": 1153143506,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          397.509765625,\n          -54.8193359375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    }\n  ],\n  \"appState\": {\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/assets/fcl-ars-auth-v3.1.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 1,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"id\": \"coRgXgxDx_rGztManLJNj\",\n      \"type\": \"line\",\n      \"x\": 1826.82421875,\n      \"y\": 402.9375,\n      \"width\": 0,\n      \"height\": 630.359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1312138966,\n      \"version\": 662,\n      \"versionNonce\": 1794938954,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          630.359375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"M0qjT3k6XLsaUrGM5l_Jk\",\n      \"type\": \"text\",\n      \"x\": 1762.546875,\n      \"y\": 1093.79296875,\n      \"width\": 128,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 590355926,\n      \"version\": 850,\n      \"versionNonce\": 1122986326,\n      \"isDeleted\": false,\n      \"text\": \"Challenge\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LLYkOAmehERqY2yfQ4-mS\",\n      \"type\": \"line\",\n      \"x\": 1824.30078125,\n      \"y\": 1033.98828125,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1128019606,\n      \"version\": 124,\n      \"versionNonce\": 890699530,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"4jiRvxEhO_mq0VrMwSgL3\",\n      \"type\": \"line\",\n      \"x\": 118.14453125,\n      \"y\": 2993.164306640625,\n      \"width\": 0,\n      \"height\": 300.202880859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1278829846,\n      \"version\": 1995,\n      \"versionNonce\": 1120731158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          300.202880859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BGN-MZTIw8KwbM7X_KkY2\",\n      \"type\": \"line\",\n      \"x\": 118.302734375,\n      \"y\": 1008.3447265625,\n      \"width\": 0,\n      \"height\": 603.4599609375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 363991382,\n      \"version\": 867,\n      \"versionNonce\": 805282966,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          603.4599609375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"un0BO73k-S9mWt9N8vfWt\",\n      \"type\": \"text\",\n      \"x\": 108.84765625,\n      \"y\": 219.35546875,\n      \"width\": 45,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1641930582,\n      \"version\": 151,\n      \"versionNonce\": 957137290,\n      \"isDeleted\": false,\n      \"text\": \"dApp\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"chwyHplpBxENYV0oFYUJ5\",\n      \"type\": \"text\",\n      \"x\": 506.296875,\n      \"y\": 218.80859375,\n      \"width\": 24,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 377033738,\n      \"version\": 190,\n      \"versionNonce\": 2062019082,\n      \"isDeleted\": false,\n      \"text\": \"fcl\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"A_YGfR-4aRXOHoeUej2FH\",\n      \"type\": \"text\",\n      \"x\": 871.4375,\n      \"y\": 219.44921875,\n      \"width\": 77,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1848970902,\n      \"version\": 158,\n      \"versionNonce\": 567364246,\n      \"isDeleted\": false,\n      \"text\": \"provider\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"4cHNGYbFyLPBSmllMxnqG\",\n      \"type\": \"text\",\n      \"x\": 1277.8984375,\n      \"y\": 218.390625,\n      \"width\": 38,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 544904458,\n      \"version\": 159,\n      \"versionNonce\": 2049224662,\n      \"isDeleted\": false,\n      \"text\": \"flow\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"jacsVi7b_9LRNYvWMBgax\",\n      \"type\": \"text\",\n      \"x\": 1635.7578125,\n      \"y\": 215.31640625,\n      \"width\": 99,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 594396554,\n      \"version\": 142,\n      \"versionNonce\": 1415635850,\n      \"isDeleted\": false,\n      \"text\": \"handshake\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"ryyCHYiHt6qIijgNyuznw\",\n      \"type\": \"line\",\n      \"x\": 1686.97265625,\n      \"y\": 242.30859375,\n      \"width\": 0,\n      \"height\": 1078.56640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 949453258,\n      \"version\": 550,\n      \"versionNonce\": 656589526,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1078.56640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"PdSxGy2bbk0IQ6U3sbaaO\",\n      \"type\": \"line\",\n      \"x\": 1295.9375,\n      \"y\": 250.052734375,\n      \"width\": 0,\n      \"height\": 4522.494140625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1141283658,\n      \"version\": 1407,\n      \"versionNonce\": 1476993046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4522.494140625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"q4v_gQ0kus8ABlQjh2qfU\",\n      \"type\": \"line\",\n      \"x\": 907.69921875,\n      \"y\": 252.095703125,\n      \"width\": 0,\n      \"height\": 4519.337890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 718607446,\n      \"version\": 1343,\n      \"versionNonce\": 561951690,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4519.337890625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"sD6hFB9Fg_yS4wv-kXCd7\",\n      \"type\": \"line\",\n      \"x\": 518.66015625,\n      \"y\": 250.041015625,\n      \"width\": 0,\n      \"height\": 4521.998046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1951527242,\n      \"version\": 1276,\n      \"versionNonce\": 1296645718,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4521.998046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qk9t0Pn0gqz1vMQ3-PPVs\",\n      \"type\": \"rectangle\",\n      \"x\": 495.0703125,\n      \"y\": 1090.64453125,\n      \"width\": 1236.47265625,\n      \"height\": 518.51953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1052625546,\n      \"version\": 134,\n      \"versionNonce\": 1816547594,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"WAjcohb9hozxf_x_K2Q70\",\n      \"type\": \"line\",\n      \"x\": 127.6796875,\n      \"y\": 247.509765625,\n      \"width\": 0,\n      \"height\": 4524.509765625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 451624970,\n      \"version\": 1267,\n      \"versionNonce\": 1700701898,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4524.509765625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1uT7ljw353mq_pBF1krUo\",\n      \"type\": \"arrow\",\n      \"x\": 132.875,\n      \"y\": 330.609375,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 453198294,\n      \"version\": 247,\n      \"versionNonce\": 2111004886,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9_RwWHhR4z7t6UN2sMXZp\",\n      \"type\": \"text\",\n      \"x\": -178.890625,\n      \"y\": 263.02734375,\n      \"width\": 268,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1786272714,\n      \"version\": 1433,\n      \"versionNonce\": 1274253526,\n      \"isDeleted\": false,\n      \"text\": \"Scopes allow dApps to request\\nadditional (private) information\\nfrom the provider. They will be\\nsent along to the provider during\\nthe initial challenge. If the\\n user has decided to allow the\\nprovider to share the information,\\nsaid information will be available\\nin the providers private hooks\\nrequest.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"3pLEjtL6UX46WlYKdWkJD\",\n      \"type\": \"text\",\n      \"x\": 135.88671875,\n      \"y\": 337.0390625,\n      \"width\": 422,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 251468054,\n      \"version\": 520,\n      \"versionNonce\": 1557952146,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"challenge.scope\\\", \\\"email+publicKey\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fbb9O2zUQnZNHHgxrXulZ\",\n      \"type\": \"arrow\",\n      \"x\": 134.09765625,\n      \"y\": 401.00390625,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2097487190,\n      \"version\": 372,\n      \"versionNonce\": 526001482,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"V2OPDQAf4l7Ba2i58gZ1n\",\n      \"type\": \"text\",\n      \"x\": 142.6640625,\n      \"y\": 412.84765625,\n      \"width\": 431,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 392596234,\n      \"version\": 771,\n      \"versionNonce\": 298348434,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"send.scope\\\", \\\"https://accessNodeUrl\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KuTZ_hrxsU6Nuq1hi_Pi9\",\n      \"type\": \"line\",\n      \"x\": 115.57421875,\n      \"y\": 278.06640625,\n      \"width\": 0,\n      \"height\": 186.05859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1103091658,\n      \"version\": 80,\n      \"versionNonce\": 777121290,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          186.05859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"XJ4RlWOEKco-1mBvuKISA\",\n      \"type\": \"line\",\n      \"x\": 67.6875,\n      \"y\": 355.89453125,\n      \"width\": 47.6640625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 269160854,\n      \"version\": 35,\n      \"versionNonce\": 1127334922,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.6640625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BwaqTUADSaiRHoCGokXKI\",\n      \"type\": \"text\",\n      \"x\": -178.97265625,\n      \"y\": 575.17578125,\n      \"width\": 263,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1391733194,\n      \"version\": 2490,\n      \"versionNonce\": 716580118,\n      \"isDeleted\": false,\n      \"text\": \"Subscribing allows the dApp to\\nreactively receive updates about\\na given topic. In this case we\\nwill want to receive any updates\\non the currentUser.\\n\\nSubscription callbacks are always\\ncalled immediately with what we\\ncurrently know.\\n\\nAll data should be considered\\nOPTIONAL\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"gyDGsALUUdgK_TzjT78zF\",\n      \"type\": \"arrow\",\n      \"x\": 133.03515625,\n      \"y\": 575.626953125,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 496657494,\n      \"version\": 370,\n      \"versionNonce\": 1173122634,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"UBeyLHncVlN6Qy8Z9Yq0P\",\n      \"type\": \"text\",\n      \"x\": 134.34765625,\n      \"y\": 579.634765625,\n      \"width\": 216,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793930250,\n      \"version\": 731,\n      \"versionNonce\": 66402390,\n      \"isDeleted\": false,\n      \"text\": \"fcl.currentUser()\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"BhVeXm_7Q-PW9YO_BFdjo\",\n      \"type\": \"arrow\",\n      \"x\": 507.73828125,\n      \"y\": 653.05859375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 512638486,\n      \"version\": 230,\n      \"versionNonce\": 1206320662,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BA2XTg-utF__4ANomq0DX\",\n      \"type\": \"text\",\n      \"x\": 169.609375,\n      \"y\": 655.84765625,\n      \"width\": 225,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 12563158,\n      \"version\": 1969,\n      \"versionNonce\": 1285559882,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: null\\ncid: null\\nloggedIn: false\\nverified: false\\nidentity:\\n  name: null\\n  avatar: null\\nscoped:\\n  email: null\\n  publicKey: null\\nprovider:\\n  addr: null\\n  pid: null\\n  name: null\\n  icon: null\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"2STUByBmNYXHz9OqNHNGe\",\n      \"type\": \"line\",\n      \"x\": 117.3984375,\n      \"y\": 559.306640625,\n      \"width\": 0,\n      \"height\": 291.021484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 429212246,\n      \"version\": 314,\n      \"versionNonce\": 1359200598,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          291.021484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lOQfNEIEHhNIe2KGKuEQF\",\n      \"type\": \"line\",\n      \"x\": 32.31640625,\n      \"y\": 679.796875,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 957144778,\n      \"version\": 453,\n      \"versionNonce\": 170207498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"AmNNkLgvu36sA-XfvGzvm\",\n      \"type\": \"text\",\n      \"x\": 323.33203125,\n      \"y\": 688.62109375,\n      \"width\": 493,\n      \"height\": 300,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 941271766,\n      \"version\": 1867,\n      \"versionNonce\": 531821962,\n      \"isDeleted\": false,\n      \"text\": \"- users flow address\\n- a composite id representing the users authentication method\\n- has fcl received either public or private hooks?\\n- could fcl successfully request private hooks?\\n- users profile info\\n  - users name per received hooks\\n  - users avatar per received hooks\\n- private scoped data as requested in the challenge\\n  - the optional email from the provider\\n  - the optional publicKey from the provider\\n- information about the provider\\n  - the flow address of provider\\n  - the users internal id for the provider\\n  - the name of the provider\\n  - the providers icon\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 294\n    },\n    {\n      \"id\": \"Qlrsmnvxv0Yu-6XxjPmon\",\n      \"type\": \"diamond\",\n      \"x\": 58.4375,\n      \"y\": 1010.71875,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 966881814,\n      \"version\": 948,\n      \"versionNonce\": 175724182,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"2Q0NcifLTOiWHZZp7CjVT\",\n      \"type\": \"text\",\n      \"x\": 87.32421875,\n      \"y\": 1032.84375,\n      \"width\": 84,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1980422282,\n      \"version\": 386,\n      \"versionNonce\": 1969063370,\n      \"isDeleted\": false,\n      \"text\": \"CLICK\\n\\\"sign in\\\"\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KlOxVWTL9pUeM5MOu6mHQ\",\n      \"type\": \"arrow\",\n      \"x\": 196.2734375,\n      \"y\": 1057.07421875,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 250703958,\n      \"version\": 517,\n      \"versionNonce\": 101467798,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jVn7DRTBVHuqU6aNGKgn1\",\n      \"type\": \"text\",\n      \"x\": 198.6328125,\n      \"y\": 1062.94140625,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 660400138,\n      \"version\": 720,\n      \"versionNonce\": 1689359818,\n      \"isDeleted\": false,\n      \"text\": \"fcl.authenticate()\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"tDpOm2KyUP_mfcEOtaC6g\",\n      \"type\": \"text\",\n      \"x\": -176.26171875,\n      \"y\": 1083.24609375,\n      \"width\": 274,\n      \"height\": 260,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 408947158,\n      \"version\": 2262,\n      \"versionNonce\": 1389549462,\n      \"isDeleted\": false,\n      \"text\": \"The authentication process truly\\nstarts here. The user clicks some\\nsort of sign in button in the dApp\\nwhich triggers the challenge flow.\\n\\nFCL will then render an iframe\\ndisplaying the handshake service.\\n\\nThe handshake services job is to\\nenable a Bring Your Own Provider\\ntype of experience, even providers\\nfcl and our team have never heard\\nof before.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 254\n    },\n    {\n      \"id\": \"VANgxLAjMWIqDaOMkQGew\",\n      \"type\": \"arrow\",\n      \"x\": 526.576171875,\n      \"y\": 1126.8046875,\n      \"width\": 1154.728515625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1345945814,\n      \"version\": 778,\n      \"versionNonce\": 688930710,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          1154.728515625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ZwB84bTSRuYNQBJ797UUX\",\n      \"type\": \"text\",\n      \"x\": 528.24609375,\n      \"y\": 1069.0078125,\n      \"width\": 185,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2029685718,\n      \"version\": 186,\n      \"versionNonce\": 1899835222,\n      \"isDeleted\": false,\n      \"text\": \"iframe rendered in dApp\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"3kh7r3_OMznv14O4Q7lds\",\n      \"type\": \"text\",\n      \"x\": 528.65625,\n      \"y\": 1128.5390625,\n      \"width\": 272,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1752712214,\n      \"version\": 2306,\n      \"versionNonce\": 161396042,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.onflow.org\\n---\\nl6n: dapp.com\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"I-bSnIv7qk4N11TBrWUvp\",\n      \"type\": \"text\",\n      \"x\": 749.22265625,\n      \"y\": 1167.3671875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1473737942,\n      \"version\": 2315,\n      \"versionNonce\": 140039818,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"xsaHRUOAlZ8ZI4kGqybV5\",\n      \"type\": \"diamond\",\n      \"x\": 1616.3515625,\n      \"y\": 1133.822265625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 783279446,\n      \"version\": 1251,\n      \"versionNonce\": 525459274,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"F-S5Qg94dsbKj8AmYRYUm\",\n      \"type\": \"text\",\n      \"x\": 1647.96875,\n      \"y\": 1155.748046875,\n      \"width\": 75,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1085031178,\n      \"version\": 702,\n      \"versionNonce\": 147359114,\n      \"isDeleted\": false,\n      \"text\": \"select\\nprovider\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"B2msJeeJj2r7pmQ9572Tt\",\n      \"type\": \"arrow\",\n      \"x\": 1684.63671875,\n      \"y\": 1248.70703125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 135045386,\n      \"version\": 92,\n      \"versionNonce\": 128871894,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QDa016qky6i2rbpghQINV\",\n      \"type\": \"text\",\n      \"x\": 944.94140625,\n      \"y\": 1251.53515625,\n      \"width\": 206,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 151321174,\n      \"version\": 2478,\n      \"versionNonce\": 1662550666,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET provider.com\\n---\\nl6n: L6N\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"6VaavfynVHFqaOHcJm68y\",\n      \"type\": \"text\",\n      \"x\": 1155.625,\n      \"y\": 1290.04296875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1531656010,\n      \"version\": 2395,\n      \"versionNonce\": 1533528662,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"NoiopQQrQ6gA3gBnK8QEO\",\n      \"type\": \"diamond\",\n      \"x\": 826.49609375,\n      \"y\": 1331.916015625,\n      \"width\": 158.109375,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 212982614,\n      \"version\": 1492,\n      \"versionNonce\": 605161866,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"VSakes544b46aPuOgA12w\",\n      \"type\": \"text\",\n      \"x\": 845.65234375,\n      \"y\": 1350.134765625,\n      \"width\": 122,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 879537418,\n      \"version\": 813,\n      \"versionNonce\": 761283466,\n      \"isDeleted\": false,\n      \"text\": \"user\\nauthenticates\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"TQB93-jsxoUcL9GwaBlZ1\",\n      \"type\": \"arrow\",\n      \"x\": 825.63671875,\n      \"y\": 1377.748046875,\n      \"width\": 302.73828125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 92871114,\n      \"version\": 442,\n      \"versionNonce\": 629633162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -302.73828125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"SkzWVjyWaeBHWW38XqLMT\",\n      \"type\": \"text\",\n      \"x\": 558.888671875,\n      \"y\": 1392.056640625,\n      \"width\": 300,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1183170518,\n      \"version\": 3074,\n      \"versionNonce\": 1994755286,\n      \"isDeleted\": false,\n      \"text\": \"JS/postMessage l6N\\n---\\ntype: \\\"FCL::CHALLENGE::RESPONSE\\\"\\naddr: FLOW_ADDRESS\\npaddr: PROVIDER_FLOW_ADDRESS\\ncode: CODE\\nexp: CODE_EXPIRES_AT\\nhks: HOOKS_URL\\nnonce: NONCE\\nl6n: L6N\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"25wzZQ-dBZxMxT8MW1Z-d\",\n      \"type\": \"text\",\n      \"x\": 868.22265625,\n      \"y\": 1427.90234375,\n      \"width\": 672,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1366848586,\n      \"version\": 3377,\n      \"versionNonce\": 2108085130,\n      \"isDeleted\": false,\n      \"text\": \"- fcl listens for this event type\\n- flow address of the user (used to fetch public hooks)\\n- flow address of the provider (used to fetch providers info)\\n- a token supplied when requesting the provider for private hooks\\n- when the code expires (epoch timestamp in the future)\\n- where to request the providers private hooks for the user\\n- the nonce provided by fcl at the start of the challenge\\n- the location.origin of the dApp (also provided by fcl at the start of the challenge)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"NXxTdsH-rCQCSFd5SbNvX\",\n      \"type\": \"arrow\",\n      \"x\": 1616.328125,\n      \"y\": 1159.81640625,\n      \"width\": 308.453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1011362634,\n      \"version\": 98,\n      \"versionNonce\": 62543126,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -308.453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnEjAi8iE7V1aahOopRXY\",\n      \"type\": \"arrow\",\n      \"x\": 1307.71484375,\n      \"y\": 1202.07421875,\n      \"width\": 316.8359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 954039370,\n      \"version\": 50,\n      \"versionNonce\": 144070166,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          316.8359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1ZVyii2hq0Wpqq8542uW9\",\n      \"type\": \"text\",\n      \"x\": 1318.5078125,\n      \"y\": 1172.37109375,\n      \"width\": 284,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1705453142,\n      \"version\": 174,\n      \"versionNonce\": 1058064970,\n      \"isDeleted\": false,\n      \"text\": \"fetch available providers from chain\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"X6HUR1_MrW9gTRgJGheAA\",\n      \"type\": \"arrow\",\n      \"x\": 523.095703125,\n      \"y\": 2420.91796875,\n      \"width\": 379.943359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1506760842,\n      \"version\": 1136,\n      \"versionNonce\": 94275030,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.943359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7PcbZK4cQREATn7XIHt_A\",\n      \"type\": \"text\",\n      \"x\": 525.306640625,\n      \"y\": 2425.44140625,\n      \"width\": 169,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1876413718,\n      \"version\": 1321,\n      \"versionNonce\": 232123018,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL\\n---\\ncode: CODE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"42lCsAd4TL61C2ZBEbmuC\",\n      \"type\": \"line\",\n      \"x\": 33.736328125,\n      \"y\": 1173.4833984375,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1664276234,\n      \"version\": 754,\n      \"versionNonce\": 934966614,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3WLQiIIioSPeHv0xMKLko\",\n      \"type\": \"text\",\n      \"x\": -173.546875,\n      \"y\": 1886.24609375,\n      \"width\": 280,\n      \"height\": 560,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 964205782,\n      \"version\": 4104,\n      \"versionNonce\": 1022153674,\n      \"isDeleted\": false,\n      \"text\": \"FCL should now have the pieces\\nit needs to fetch both the public\\nand private hooks.\\n\\nPublic hooks are stored on chain\\nin a resource owned by the flow\\naddress. They can also point out\\nto resources owned by the provider\\nallowing the provider to change\\nprovider specific detail as needed\\nand example of that is moving the\\nauthorization endpoint. SENSITIVE\\nDATA SHOULD NEVER BE PUT IN\\nA PUBLIC HOOK.\\n\\nPrivate hooks are provided by\\nthe provider. They include provider\\nspecific overrides to the public\\nhooks as well as the additional\\nscopes that were requested in\\nthe challenge.\\n\\nFCL will attempt to fetch both\\nprivate and public hooks, deep\\nmerge the private into the public\\nand then let any currentUser\\nsubscribers know there is some\\nnew data for them.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 554\n    },\n    {\n      \"id\": \"oByTwhCzigB059e9baKhZ\",\n      \"type\": \"arrow\",\n      \"x\": 524.0869140625,\n      \"y\": 1639.83203125,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1399244246,\n      \"version\": 1012,\n      \"versionNonce\": 894784022,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"bQl2f4HdK2Ezo1MVmCQs-\",\n      \"type\": \"text\",\n      \"x\": 525.6220703125,\n      \"y\": 1640.6640625,\n      \"width\": 216,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 263301770,\n      \"version\": 1277,\n      \"versionNonce\": 1310257610,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_HOOKS\\n---\\naddress: FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"OfQGmyTtgjme0SWUklR_a\",\n      \"type\": \"arrow\",\n      \"x\": 1293.146484375,\n      \"y\": 1722.36328125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210260886,\n      \"version\": 263,\n      \"versionNonce\": 210434070,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zlS_RGPXHJyxMTeGPbPaA\",\n      \"type\": \"text\",\n      \"x\": 556.822265625,\n      \"y\": 1727.609375,\n      \"width\": 338,\n      \"height\": 361,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 358067914,\n      \"version\": 4272,\n      \"versionNonce\": 895971274,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nauthorizations:\\n  - id: PROVIDER_AUTHORIZATION_ID\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"HTTP/POST\\\"\\n    endpoint: AUTHORIZATION_ENDPOINT\\n    data:\\n      id: PID\\n  - id: PROVIDER_AUTHORIZATION_ID_2\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"REMOTE\\\"\\n    data:\\n      id: PID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 357\n    },\n    {\n      \"id\": \"RpkmMqz9tdMWF-3_bw77s\",\n      \"type\": \"text\",\n      \"x\": 731.95703125,\n      \"y\": 1765.109375,\n      \"width\": 226,\n      \"height\": 100,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 253356234,\n      \"version\": 5160,\n      \"versionNonce\": 1711938006,\n      \"isDeleted\": false,\n      \"text\": \"- flow address for user\\n- preferred signing key\\n- public identity info\\n  - an optional name value\\n  - an optional avatar value\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"2z30__NPjKNxvuE9Pyxmf\",\n      \"type\": \"text\",\n      \"x\": 916.23046875,\n      \"y\": 2017.57421875,\n      \"width\": 629,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231760906,\n      \"version\": 5822,\n      \"versionNonce\": 1146700234,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that points to a remote authorization\\nit will use the providers flow address and id that is supplied to do the look up\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wwWWue6mYk9yxli73gPmW\",\n      \"type\": \"line\",\n      \"x\": 901.21875,\n      \"y\": 1991.62890625,\n      \"width\": 0,\n      \"height\": 98.58984375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94038550,\n      \"version\": 363,\n      \"versionNonce\": 1292446730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          98.58984375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"egK8LT0KvLONRfcsgWWyx\",\n      \"type\": \"arrow\",\n      \"x\": 525.68017578125,\n      \"y\": 2181.4375,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1321042966,\n      \"version\": 1094,\n      \"versionNonce\": 152448970,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"oi3nAccLri9ZoY-toeQbo\",\n      \"type\": \"text\",\n      \"x\": 529.15673828125,\n      \"y\": 2186.72265625,\n      \"width\": 281,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 685568074,\n      \"version\": 1382,\n      \"versionNonce\": 86931402,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_PROVIDER\\n---\\naddress: PROVIDER_FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"HM8bKmZ_6p8oTn3sLt9NW\",\n      \"type\": \"text\",\n      \"x\": 916.25,\n      \"y\": 1893.673828125,\n      \"width\": 547,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1139490582,\n      \"version\": 6267,\n      \"versionNonce\": 692740886,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that is controlled by users flow account\\nit can be overloaded by private hooks if the addr and id match.\\nOverloading should be avoided where possible as this authorization\\nstrategy could still be used by non-currentUser situations\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"HPG9r6GWIVU-MLDXRhR0c\",\n      \"type\": \"line\",\n      \"x\": 901.12109375,\n      \"y\": 1880.525390625,\n      \"width\": 0,\n      \"height\": 105.830078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 851207498,\n      \"version\": 554,\n      \"versionNonce\": 1201238218,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          105.830078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"s6PIfFtwf-7CX3o-PHI9l\",\n      \"type\": \"arrow\",\n      \"x\": 1291.263671875,\n      \"y\": 2257.9453125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 631656074,\n      \"version\": 367,\n      \"versionNonce\": 17668362,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"d-aTpJ55bJetrQsYzT-8o\",\n      \"type\": \"text\",\n      \"x\": 554.728515625,\n      \"y\": 2260.98828125,\n      \"width\": 253,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 697513750,\n      \"version\": 4543,\n      \"versionNonce\": 1310176022,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: PROVIDER_FLOW_ADDRESS\\nname: PROVIDER_NAME\\nicon: PROVIDER_ICON\\nauthn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"2_VuSBa3bFRM7KYWRfqpK\",\n      \"type\": \"line\",\n      \"x\": 508.91796875,\n      \"y\": 1644.27734375,\n      \"width\": 154.62109375,\n      \"height\": 311.0625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 441658570,\n      \"version\": 350,\n      \"versionNonce\": 389400074,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -154.62109375,\n          311.0625\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -157.6171875,\n        295.58984375\n      ]\n    },\n    {\n      \"id\": \"5ME55bvkr9r1r5Zqo7QMP\",\n      \"type\": \"line\",\n      \"x\": 350.4609375,\n      \"y\": 2023.38671875,\n      \"width\": 162.4765625,\n      \"height\": 160.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 442543050,\n      \"version\": 54,\n      \"versionNonce\": 1075938122,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          162.4765625,\n          160.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jT1SAtxFHgoSlX-HSjGb3\",\n      \"type\": \"line\",\n      \"x\": 349.04296875,\n      \"y\": 2091.76953125,\n      \"width\": 165.9921875,\n      \"height\": 330.19921875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 677853206,\n      \"version\": 165,\n      \"versionNonce\": 1014681046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          165.9921875,\n          330.19921875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnpb7wSSUK_sV4qXlPQVt\",\n      \"type\": \"text\",\n      \"x\": 270.62109375,\n      \"y\": 2018.0078125,\n      \"width\": 126,\n      \"height\": 20,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 843163990,\n      \"version\": 190,\n      \"versionNonce\": 599478794,\n      \"isDeleted\": false,\n      \"text\": \"Done in parallel\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"msGB2E2TZJGP7TkawkmAf\",\n      \"type\": \"arrow\",\n      \"x\": 900.84765625,\n      \"y\": 2509.64453125,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210719318,\n      \"version\": 490,\n      \"versionNonce\": 16187478,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"-VVQYfd22ZmqYqXRLxXEm\",\n      \"type\": \"text\",\n      \"x\": 554.970703125,\n      \"y\": 2514.1875,\n      \"width\": 272,\n      \"height\": 304,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1012202506,\n      \"version\": 5187,\n      \"versionNonce\": 1530171926,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL RESPONSE\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\\n  authn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 300\n    },\n    {\n      \"id\": \"OnbDFeHN4fQhUjlz_WLfY\",\n      \"type\": \"text\",\n      \"x\": 731.4140625,\n      \"y\": 2549.73046875,\n      \"width\": 680,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2121614090,\n      \"version\": 7076,\n      \"versionNonce\": 292326282,\n      \"isDeleted\": false,\n      \"text\": \"- Users Flow Address\\n- overloading the preferred signing key\\n- private identity info (will overload public info)\\n  in this case the data is the same\\n  if it was omitted fcl will use the public info if its there\\n- the requested scoped data\\n  - user decided to send the email\\n  - but also decided to NOT send the publicKey (reminder that everything is optional)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"2N9s2KDB46jGhu9W9zxZ5\",\n      \"type\": \"text\",\n      \"x\": 835.90234375,\n      \"y\": 2722.09375,\n      \"width\": 414,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1232014154,\n      \"version\": 7368,\n      \"versionNonce\": 1966205206,\n      \"isDeleted\": false,\n      \"text\": \"- flow address of provider (used in composite id)\\n- id controlled by the provider (used in composite id)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"SUbm9_A_s1r_jH2PsAK_i\",\n      \"type\": \"line\",\n      \"x\": 120.42578125,\n      \"y\": 1632.94189453125,\n      \"width\": 0,\n      \"height\": 1330.13232421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1251139734,\n      \"version\": 1260,\n      \"versionNonce\": 719119498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1330.13232421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zts7CpbK3b8hN6Lf_L4NX\",\n      \"type\": \"line\",\n      \"x\": 33.37109375,\n      \"y\": 2168.4453125,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1021861962,\n      \"version\": 883,\n      \"versionNonce\": 504499158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6-8TIlr57ixKs6Sj3Voqe\",\n      \"type\": \"text\",\n      \"x\": 110.08984375,\n      \"y\": 92.10546875,\n      \"width\": 1183,\n      \"height\": 45,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1019216458,\n      \"version\": 772,\n      \"versionNonce\": 2018618070,\n      \"isDeleted\": false,\n      \"text\": \"Flow Client Library - Remote Async Authentication & Authorization\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"p424mWR_hsD0j4YBnrCVw\",\n      \"type\": \"text\",\n      \"x\": 110.375,\n      \"y\": 137.62109375,\n      \"width\": 303,\n      \"height\": 50,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1331610518,\n      \"version\": 433,\n      \"versionNonce\": 2029861522,\n      \"isDeleted\": false,\n      \"text\": \"Last Updated: April 17th 2020\\nVersion: 3.1\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 43\n    },\n    {\n      \"id\": \"qF5Aeoa9iYz0RqCATeZEH\",\n      \"type\": \"text\",\n      \"x\": 1738.421875,\n      \"y\": 288.890625,\n      \"width\": 176,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2000233674,\n      \"version\": 424,\n      \"versionNonce\": 186896022,\n      \"isDeleted\": false,\n      \"text\": \"Setup/Config\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"SwAuz72dvcZhh4zIV1V_W\",\n      \"type\": \"line\",\n      \"x\": 1826.83984375,\n      \"y\": 1178.0390625,\n      \"width\": 0,\n      \"height\": 436.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2110378634,\n      \"version\": 1335,\n      \"versionNonce\": 289846422,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          436.82421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Pr75G8We8YRy0Yi_gYH0l\",\n      \"type\": \"text\",\n      \"x\": 1759.25,\n      \"y\": 1681.26171875,\n      \"width\": 132,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1327777994,\n      \"version\": 1007,\n      \"versionNonce\": 320669642,\n      \"isDeleted\": false,\n      \"text\": \"Collection\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"PVT9D64GjjaP2ucRTUfLs\",\n      \"type\": \"line\",\n      \"x\": 1826.046875,\n      \"y\": 1770.51171875,\n      \"width\": 0,\n      \"height\": 1215.11328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1522073814,\n      \"version\": 2352,\n      \"versionNonce\": 2129637846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1215.11328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jvYGx-4d-NipQ0Bpnu05q\",\n      \"type\": \"arrow\",\n      \"x\": 508.783203125,\n      \"y\": 2558.3984375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 616907798,\n      \"version\": 440,\n      \"versionNonce\": 88690262,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IZXf_z8RKv6FuMhkvkXNf\",\n      \"type\": \"text\",\n      \"x\": 170.095703125,\n      \"y\": 2563.9375,\n      \"width\": 272,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1748054090,\n      \"version\": 2404,\n      \"versionNonce\": 1955554902,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: FLOW_ADDRESS\\ncid: COMPOSITE_ID\\nloggedIn: true\\nverified: true\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"waRSRXDeKvd5f6JPg0G6E\",\n      \"type\": \"diamond\",\n      \"x\": 56.0546875,\n      \"y\": 3013.853515625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1556613014,\n      \"version\": 1054,\n      \"versionNonce\": 1451302358,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"paxn_sWovWBSehdKXh9Yq\",\n      \"type\": \"text\",\n      \"x\": 75.44140625,\n      \"y\": 3035.978515625,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 961438922,\n      \"version\": 526,\n      \"versionNonce\": 604557962,\n      \"isDeleted\": false,\n      \"text\": \"TRIGGER\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hrSSY4HIR0R4f4pjnZxdq\",\n      \"type\": \"arrow\",\n      \"x\": 195.189453125,\n      \"y\": 3058.953125,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94461718,\n      \"version\": 622,\n      \"versionNonce\": 1200903050,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6_zL8bXZ7lEK83iY4swSO\",\n      \"type\": \"text\",\n      \"x\": 188.287109375,\n      \"y\": 3066.16796875,\n      \"width\": 525,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 653804874,\n      \"version\": 1965,\n      \"versionNonce\": 1765016086,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([\\n  vtx.TRANSFER_FLOW_TOKENS,\\n  sdk.params([\\n    sdk.param(AMOUNT, t.UFix64),\\n    sdk.param(TO_ADDRESS, t.Address)\\n  ]),\\n  sdk.proposer(fcl.currentUser().proposerAuthorization),\\n  sdk.payer(fcl.currentUser().payerAuthorization),\\n  sdk.authorizations([\\n    fcl.currentUser().authorization\\n  ])\\n])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"huhsom-5KjKGKdIYDMOqy\",\n      \"type\": \"text\",\n      \"x\": 718.8828125,\n      \"y\": 3180.875,\n      \"width\": 300,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 868467722,\n      \"version\": 7984,\n      \"versionNonce\": 141727690,\n      \"isDeleted\": false,\n      \"text\": \"- who is proposing the transaction\\n- who is paying for the transaction\\n- who are authorizing the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"EZpsNzOMm6AF6ard6rzL9\",\n      \"type\": \"text\",\n      \"x\": 455.97265625,\n      \"y\": 3083.23828125,\n      \"width\": 297,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 771410058,\n      \"version\": 8237,\n      \"versionNonce\": 1499597386,\n      \"isDeleted\": false,\n      \"text\": \"- a verified/provable transaction\\n- params to pass to the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"zIfBGvs5LZkn3wLsdHnBD\",\n      \"type\": \"arrow\",\n      \"x\": 518.708984375,\n      \"y\": 3285.18359375,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1573066122,\n      \"version\": 784,\n      \"versionNonce\": 1662081558,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QeOvoAeQuTwqV9BaVr0RY\",\n      \"type\": \"text\",\n      \"x\": 523.40625,\n      \"y\": 3287.86328125,\n      \"width\": 272,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1929637910,\n      \"version\": 2844,\n      \"versionNonce\": 469574922,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization\\n---\\npayload: PAYLOAD\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nrole:\\n  - proposer\\n  - payer\\n  - authorizer\\ninteraction: INTERACTION_DATA\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"m-dBP7WUdYjECj9H_N-Lw\",\n      \"type\": \"text\",\n      \"x\": 702.2421875,\n      \"y\": 3323.265625,\n      \"width\": 215,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 566844874,\n      \"version\": 8350,\n      \"versionNonce\": 2015418326,\n      \"isDeleted\": false,\n      \"text\": \"- what needs to be signed\\n- flow address to sign with\\n- preferred signing key\\n- roles to be signing as\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"uFmYk6gAWEzV926It2dyS\",\n      \"type\": \"text\",\n      \"x\": 803.859375,\n      \"y\": 3457.97265625,\n      \"width\": 406,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 963183382,\n      \"version\": 9206,\n      \"versionNonce\": 2061418122,\n      \"isDeleted\": false,\n      \"text\": \"- data that can be used to recreate the payload\\n  so it can be verified. It should have everything\\n  about the transaction so the provider could also\\n  use that data in here to give the user a better\\n  experience when they go to approve/decline the\\n  transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"VkMECX5n8ypX3ZzyzSoiY\",\n      \"type\": \"arrow\",\n      \"x\": 902.3193359375,\n      \"y\": 3588.53515625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1725344714,\n      \"version\": 556,\n      \"versionNonce\": 1331222230,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"fTfdefywWKAJLExOheTvm\",\n      \"type\": \"text\",\n      \"x\": 554.4619140625,\n      \"y\": 3591.27734375,\n      \"width\": 413,\n      \"height\": 380,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 403852758,\n      \"version\": 6211,\n      \"versionNonce\": 1875251478,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\\nlocal:\\n  - method: \\\"BROWSER/IFRAME\\\"\\n    endpoint: LOCAL_IFRAME_ENDPOINT\\n    width: WIDTH\\n    height: HEIGHT\\n    background: BG_COLOR\\n  - method: \\\"BROWSER/EXTENSION\\\"\\n    eventType: PROVIDER_EXTENSION_EVENT_TYPE\\n    data: DATA_TO_SEND_EXTENSION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 376\n    },\n    {\n      \"id\": \"dnULn5eXCu25FbJ5ADvgb\",\n      \"type\": \"arrow\",\n      \"x\": 520.8291015625,\n      \"y\": 3998.94921875,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 782169098,\n      \"version\": 936,\n      \"versionNonce\": 318209162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aXHKmUTpcXq-KXd22YVHZ\",\n      \"type\": \"text\",\n      \"x\": 523.3154296875,\n      \"y\": 4006.41015625,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1174514070,\n      \"version\": 3106,\n      \"versionNonce\": 796185162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"Qt5oM_exd-ilHtenCfsx1\",\n      \"type\": \"arrow\",\n      \"x\": 899.611328125,\n      \"y\": 4085.2265625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1781753622,\n      \"version\": 639,\n      \"versionNonce\": 1286590294,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"HkOFxXHDQ51b1hvi6qcyX\",\n      \"type\": \"text\",\n      \"x\": 555.01171875,\n      \"y\": 4090.125,\n      \"width\": 319,\n      \"height\": 209,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 308985162,\n      \"version\": 6371,\n      \"versionNonce\": 1920465162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 205\n    },\n    {\n      \"id\": \"3INOWYSzlw6A2i5ZFLpWE\",\n      \"type\": \"arrow\",\n      \"x\": 523.39208984375,\n      \"y\": 4318.509765625,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1575886678,\n      \"version\": 1069,\n      \"versionNonce\": 892796950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1GaZCC06LIykjWF8msHrO\",\n      \"type\": \"text\",\n      \"x\": 526.07763671875,\n      \"y\": 4325.970703125,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1460054282,\n      \"version\": 3239,\n      \"versionNonce\": 499725386,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"rJdS3rSR6xZz3q3K8_obb\",\n      \"type\": \"arrow\",\n      \"x\": 902.37353515625,\n      \"y\": 4404.787109375,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 14402710,\n      \"version\": 772,\n      \"versionNonce\": 1707773270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VeXvW_CPgoYJy_zq6RVC6\",\n      \"type\": \"text\",\n      \"x\": 557.45361328125,\n      \"y\": 4407.943359375,\n      \"width\": 319,\n      \"height\": 133,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1595996106,\n      \"version\": 6605,\n      \"versionNonce\": 1537513802,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: APPROVED\\ncompositeSignature:\\n  addr: FLOW_ADDRESS\\n  keyId: KEY_ID_2\\n  signature: SIGNATURE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 129\n    },\n    {\n      \"id\": \"Sd2FuAqCDzEl9_UVKxCdu\",\n      \"type\": \"text\",\n      \"x\": 741.82421875,\n      \"y\": 3627.671875,\n      \"width\": 256,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 664875030,\n      \"version\": 8575,\n      \"versionNonce\": 1250821334,\n      \"isDeleted\": false,\n      \"text\": \"- the status of the transaction\\n- an empty composite signature \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hM2bEW5KNVxetY6j53I3-\",\n      \"type\": \"text\",\n      \"x\": 763.0625,\n      \"y\": 3723.57421875,\n      \"width\": 421,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231038090,\n      \"version\": 8746,\n      \"versionNonce\": 244451670,\n      \"isDeleted\": false,\n      \"text\": \"- where and how to get updates for the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"fNHFI8o8oO5yAGFPaxe5s\",\n      \"type\": \"text\",\n      \"x\": 860,\n      \"y\": 3798.71484375,\n      \"width\": 760,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 610817162,\n      \"version\": 9131,\n      \"versionNonce\": 414310218,\n      \"isDeleted\": false,\n      \"text\": \"- lets FCL know if there are local ways of letting the user authorize from their current device\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"tfACerMEHudHalqtkDVxw\",\n      \"type\": \"text\",\n      \"x\": 916.138671875,\n      \"y\": 3836.7060546875,\n      \"width\": 366,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1720766870,\n      \"version\": 6618,\n      \"versionNonce\": 596298954,\n      \"isDeleted\": false,\n      \"text\": \"FCL will render an iframe showing the endpoint\\nthe iframe will be rendered with the supplied\\nwidth, height and background color\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"lEAUSNRbeExIAbUFoi457\",\n      \"type\": \"line\",\n      \"x\": 898.724609375,\n      \"y\": 3819.2880859375,\n      \"width\": 0,\n      \"height\": 92.2431640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 617560778,\n      \"version\": 810,\n      \"versionNonce\": 687063446,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          92.2431640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VMWNVeWbavakv7ZbvBDZ4\",\n      \"type\": \"text\",\n      \"x\": 986.568359375,\n      \"y\": 3938.26123046875,\n      \"width\": 373,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1532948950,\n      \"version\": 6925,\n      \"versionNonce\": 1496202634,\n      \"isDeleted\": false,\n      \"text\": \"FCL will send an event to a browser extension\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"SNdO8VWRuFZGJFHu1jM1s\",\n      \"type\": \"line\",\n      \"x\": 975.658203125,\n      \"y\": 3912.92529296875,\n      \"width\": 0,\n      \"height\": 70.04736328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1134706314,\n      \"version\": 1016,\n      \"versionNonce\": 1539103638,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          70.04736328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"U-EEL_3O6Lsxb7mROH8Pr\",\n      \"type\": \"line\",\n      \"x\": 548.703125,\n      \"y\": 3801.44091796875,\n      \"width\": 0,\n      \"height\": 168.72705078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 237420362,\n      \"version\": 1079,\n      \"versionNonce\": 1922915862,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          168.72705078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VRe96xT0_1RxtHTMIyi62\",\n      \"type\": \"text\",\n      \"x\": 346.95703125,\n      \"y\": 3819.34375,\n      \"width\": 195,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1235761750,\n      \"version\": 7272,\n      \"versionNonce\": 1943726230,\n      \"isDeleted\": false,\n      \"text\": \"These will only happen\\nfor the currentUser, but\\nthe provider should still\\nmake sure that the user\\nis authenticated before\\nshowing any possibly\\nsensitive information\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"58mykrKHV9EaCFvmLqX9I\",\n      \"type\": \"text\",\n      \"x\": 913.681640625,\n      \"y\": 4180.76904296875,\n      \"width\": 302,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 291843082,\n      \"version\": 7021,\n      \"versionNonce\": 506427606,\n      \"isDeleted\": false,\n      \"text\": \"The same as the above authorization\\nresponse but sans the local info\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wJIW4AG-R71Cq1nvCREvC\",\n      \"type\": \"line\",\n      \"x\": 901.482421875,\n      \"y\": 4120.62060546875,\n      \"width\": 0,\n      \"height\": 184.09423828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 64680342,\n      \"version\": 1105,\n      \"versionNonce\": 1179937866,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          184.09423828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1_bAu7XiS5YNkJzGVFz-P\",\n      \"type\": \"text\",\n      \"x\": 213,\n      \"y\": 4136.0703125,\n      \"width\": 249,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 530454218,\n      \"version\": 7482,\n      \"versionNonce\": 1808024342,\n      \"isDeleted\": false,\n      \"text\": \"FCL will continue to request\\nauthorizationUpdates until\\nthe response no longer returns\\nan authorizationUpdates hook\\nor the status is APPROVED or\\nREFUSED\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"19wWD272ASOGmsbjs-59d\",\n      \"type\": \"line\",\n      \"x\": 443.7265625,\n      \"y\": 4170.546875,\n      \"width\": 65.46484375,\n      \"height\": 129.7421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1153278166,\n      \"version\": 109,\n      \"versionNonce\": 2074859210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          65.46484375,\n          -129.7421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"FP82AskFm3Lh1tPvv1lq9\",\n      \"type\": \"line\",\n      \"x\": 450.05859375,\n      \"y\": 4240.8671875,\n      \"width\": 61.82421875,\n      \"height\": 113.42578125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 199143626,\n      \"version\": 255,\n      \"versionNonce\": 292145110,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          61.82421875,\n          113.42578125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"t_6ydp1uC_v23r855FNXE\",\n      \"type\": \"arrow\",\n      \"x\": 525.6611328125,\n      \"y\": 4585,\n      \"width\": 761.1201171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 179347786,\n      \"version\": 1329,\n      \"versionNonce\": 526737418,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          761.1201171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"us3PQTgK_fN8w5Nk4IhG_\",\n      \"type\": \"text\",\n      \"x\": 565.6875,\n      \"y\": 4590.29296875,\n      \"width\": 319,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2127509142,\n      \"version\": 1722,\n      \"versionNonce\": 2040934282,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/TRANSACTION submitTransaction\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"GfjjxVGNRF0p99UbfDZjq\",\n      \"type\": \"arrow\",\n      \"x\": 1286.1953125,\n      \"y\": 4646.7734375,\n      \"width\": 760.6982421875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1092171862,\n      \"version\": 975,\n      \"versionNonce\": 53636950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -760.6982421875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pW8AlxjpdNg5jWX_4n0dM\",\n      \"type\": \"text\",\n      \"x\": 567.89453125,\n      \"y\": 4653.734375,\n      \"width\": 300,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 432772490,\n      \"version\": 1993,\n      \"versionNonce\": 933974614,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE submitTransaction \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"pKKtykoGvufR7ERvt-eTi\",\n      \"type\": \"arrow\",\n      \"x\": 512.6123046875,\n      \"y\": 4647.16796875,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1779519574,\n      \"version\": 863,\n      \"versionNonce\": 964619158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Ap9Cyn92PMXlJBo3aPhoP\",\n      \"type\": \"text\",\n      \"x\": 160.5078125,\n      \"y\": 4652.4609375,\n      \"width\": 356,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1261986506,\n      \"version\": 2126,\n      \"versionNonce\": 2067928278,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([...])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"u-UfsHkkQadRF6SCVyVx1\",\n      \"type\": \"arrow\",\n      \"x\": 136.68359375,\n      \"y\": 4710.556640625,\n      \"width\": 377.4296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1607577482,\n      \"version\": 823,\n      \"versionNonce\": 836980298,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          377.4296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3F1bHxsqx2nTNCPGB-6NI\",\n      \"type\": \"text\",\n      \"x\": 140.59375,\n      \"y\": 4715.869140625,\n      \"width\": 234,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 51013142,\n      \"version\": 2270,\n      \"versionNonce\": 451491158,\n      \"isDeleted\": false,\n      \"text\": \"fcl.transaction(response)\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"-UaYdX-OEaS5wVMrwN5xR\",\n      \"type\": \"text\",\n      \"x\": 1744.84375,\n      \"y\": 3064.501953125,\n      \"width\": 162,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 338788298,\n      \"version\": 1205,\n      \"versionNonce\": 1853718154,\n      \"isDeleted\": false,\n      \"text\": \"Transaction\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LuFDPJCxj7GY2koIvvpQY\",\n      \"type\": \"line\",\n      \"x\": 1827.22265625,\n      \"y\": 3166.751953125,\n      \"width\": 0,\n      \"height\": 1603.451171875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 561953238,\n      \"version\": 2787,\n      \"versionNonce\": 1627850518,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1603.451171875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0qPJx0BzT51VBvJZZbAtb\",\n      \"type\": \"line\",\n      \"x\": 1828.48046875,\n      \"y\": 1618.515625,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1012736982,\n      \"version\": 218,\n      \"versionNonce\": 1545674058,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pb8U1YVZRiNyhtgwvxJoO\",\n      \"type\": \"line\",\n      \"x\": 1823.1328125,\n      \"y\": 2984.24609375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1893180118,\n      \"version\": 393,\n      \"versionNonce\": 1208071254,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9mq_YXv-6dfI7LCcLOoZk\",\n      \"type\": \"line\",\n      \"x\": 1825.71875,\n      \"y\": 4770.21484375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 303631562,\n      \"version\": 488,\n      \"versionNonce\": 2036524042,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vKI1TN3W9zEYCqXspw6cd\",\n      \"type\": \"line\",\n      \"x\": 116.59765625,\n      \"y\": 3556.2403564453125,\n      \"width\": 0,\n      \"height\": 987.7479248046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 561630986,\n      \"version\": 2591,\n      \"versionNonce\": 1883029270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          987.7479248046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"x_rOBERCd6TqS6QnIH9qV\",\n      \"type\": \"line\",\n      \"x\": 116.16015625,\n      \"y\": 4690.296875,\n      \"width\": 0,\n      \"height\": 76.2421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 406239574,\n      \"version\": 2817,\n      \"versionNonce\": 691342730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          76.2421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zOwAE2N733ejewShvmEsl\",\n      \"type\": \"line\",\n      \"x\": 115.9921875,\n      \"y\": 4556.8359375,\n      \"width\": 0,\n      \"height\": 119.27734375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 315952906,\n      \"version\": 3005,\n      \"versionNonce\": 1280138506,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          119.27734375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aDpvsyDq7LP1_OC4cpBxX\",\n      \"type\": \"text\",\n      \"x\": 458.748046875,\n      \"y\": 2862.462890625,\n      \"width\": 372,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 385734090,\n      \"version\": 6220,\n      \"versionNonce\": 1866634186,\n      \"isDeleted\": false,\n      \"text\": \"A deep merge of the private currentUser data\\ninto the public currentUser data\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"h7Bs0gToLSbntCq0_kmTk\",\n      \"type\": \"line\",\n      \"x\": 452.544921875,\n      \"y\": 2604.6953125,\n      \"width\": 0,\n      \"height\": 292.771484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1087030230,\n      \"version\": 626,\n      \"versionNonce\": 48037846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          292.771484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"toQyT3WzIMdRQiPm4x9M2\",\n      \"type\": \"text\",\n      \"x\": -219.69921875,\n      \"y\": 2983.08203125,\n      \"width\": 292,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 331266710,\n      \"version\": 5459,\n      \"versionNonce\": 1436890454,\n      \"isDeleted\": false,\n      \"text\": \"When a transaction is initiated fcl\\nwill go through a process called\\nasynchronous decomposition. In short\\nit will try to make sure it has all\\nthe things it needs to have a high\\nprobability of submitting a successful\\ntransaction. As an example if there\\nisn't a currentUser but the\\ntransaction needs a currentUser, fcl\\nwill attempt to authenticate the\\nuser before the transaction needs\\nany of the currentUsers information.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"x_lnq9l_uj6CvcgnVJgeJ\",\n      \"type\": \"line\",\n      \"x\": 18.23828125,\n      \"y\": 3134.0078125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 142857302,\n      \"version\": 1239,\n      \"versionNonce\": 821686986,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"b_B9QDbiNzXEojm8Ot3A6\",\n      \"type\": \"line\",\n      \"x\": 118.421875,\n      \"y\": 3302.0743408203125,\n      \"width\": 0,\n      \"height\": 241.8240966796875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1749654346,\n      \"version\": 2215,\n      \"versionNonce\": 568597834,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          241.8240966796875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Co3Eq_HoZ3jX0sykDN2jl\",\n      \"type\": \"text\",\n      \"x\": -160.5390625,\n      \"y\": 3359.703125,\n      \"width\": 257,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 832108426,\n      \"version\": 5797,\n      \"versionNonce\": 1452595658,\n      \"isDeleted\": false,\n      \"text\": \"FCL will attempt to authorize\\nthe transaction with the various\\nauthorization hooks.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"3tVP74pUyHOCD2o9JmG9o\",\n      \"type\": \"line\",\n      \"x\": 18.845703125,\n      \"y\": 3408.4453125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 272878102,\n      \"version\": 1318,\n      \"versionNonce\": 1339264278,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"xlOhPrPEy7PRuivNrLRnv\",\n      \"type\": \"text\",\n      \"x\": -177.6328125,\n      \"y\": 3559.34375,\n      \"width\": 287,\n      \"height\": 520,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 190797386,\n      \"version\": 7155,\n      \"versionNonce\": 1392608586,\n      \"isDeleted\": false,\n      \"text\": \"FCL will timeout authorizations\\nfairly quickly if they don't respond\\nright away. This is because the\\nauthorization doesn't actually need\\nto happen with this request.\\nInstead what this request is doing\\nis supplying the provider with what\\nto sign, and then the provider sends\\nback the information required to\\ncreate a backchannel in which FCL\\ncan then request the results.\\n\\nThe provider can also supply some\\nlocal strategies that can give the\\nuser an in dApp authorization flow.\\nThese strategies can be things like\\nrendering an iframe or sending an\\nevent to a browser extension.\\n\\nBecause the actual response that\\nmatters for the authorization\\nhappens in a back channel we can\\nlock these local strategies down\\nas they really only act as a window\\ninto the providers authorization\\nuser experience.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 514\n    },\n    {\n      \"id\": \"NEX_J-rQLNq2wm5mbCd7c\",\n      \"type\": \"line\",\n      \"x\": 68.46875,\n      \"y\": 3788.57421875,\n      \"width\": 47.951171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 317150154,\n      \"version\": 1438,\n      \"versionNonce\": 987723158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.951171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"JVb2QMCeDhYIHIb3lBAJ8\",\n      \"type\": \"line\",\n      \"x\": 1700.62890625,\n      \"y\": 3370.12890625,\n      \"width\": 0,\n      \"height\": 758.33203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 287421898,\n      \"version\": 3322,\n      \"versionNonce\": 1327943754,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          758.33203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"T0FONKIugMmjyhBNPa1b2\",\n      \"type\": \"arrow\",\n      \"x\": 908.5869140625,\n      \"y\": 3392.4375,\n      \"width\": 783.2568359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 62204694,\n      \"version\": 1042,\n      \"versionNonce\": 1425626198,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          783.2568359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"RzUmFjJWM7eyvTR6uIWjl\",\n      \"type\": \"arrow\",\n      \"x\": 1694.3984375,\n      \"y\": 4106,\n      \"width\": 782.88671875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 302396822,\n      \"version\": 1558,\n      \"versionNonce\": 568895754,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -782.88671875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IvLj82FximT02G1AK9jZ_\",\n      \"type\": \"diamond\",\n      \"x\": 1622.4375,\n      \"y\": 3971.888671875,\n      \"width\": 150.1953125,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1415433814,\n      \"version\": 1295,\n      \"versionNonce\": 1640663126,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"oXRPPSMK37VNWnLwkYuZP\",\n      \"type\": \"text\",\n      \"x\": 1647.4921875,\n      \"y\": 3995.099609375,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 65890826,\n      \"version\": 735,\n      \"versionNonce\": 2008735114,\n      \"isDeleted\": false,\n      \"text\": \"APPROVED\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"pmu2RB5R3JQnXZ20pKfb6\",\n      \"type\": \"text\",\n      \"x\": 1657.11328125,\n      \"y\": 3281.0546875,\n      \"width\": 83,\n      \"height\": 75,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1528973770,\n      \"version\": 654,\n      \"versionNonce\": 399838934,\n      \"isDeleted\": false,\n      \"text\": \"provider\\napproval\\nprocess\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 68\n    },\n    {\n      \"id\": \"jNThL9TEd_WZFS1q9bspt\",\n      \"type\": \"text\",\n      \"x\": 1474.6015625,\n      \"y\": 3224.20703125,\n      \"width\": 206,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793138506,\n      \"version\": 8513,\n      \"versionNonce\": 1450144202,\n      \"isDeleted\": false,\n      \"text\": \"These could be things like\\n- the providers mobile app\\n- a hardware device\\n- browser extension\\n- iframe\\n- text message\\n- providers website\\n- desktop application\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"IF08tbolyi3Jhmflhqsew\",\n      \"type\": \"line\",\n      \"x\": 1645.6796875,\n      \"y\": 3292.703125,\n      \"width\": 0,\n      \"height\": 63.39501953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1043337802,\n      \"version\": 1030,\n      \"versionNonce\": 891123786,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          63.39501953125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ljhLjuHekKgxFYwog8Fwn\",\n      \"type\": \"line\",\n      \"x\": 1645.95703125,\n      \"y\": 3325.228759765625,\n      \"width\": 29.6171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 138692298,\n      \"version\": 1258,\n      \"versionNonce\": 1338804566,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -29.6171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7wScteC3L1Oah6wsNyl8R\",\n      \"type\": \"text\",\n      \"x\": -179.7890625,\n      \"y\": 4584.96875,\n      \"width\": 285,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1886238922,\n      \"version\": 7618,\n      \"versionNonce\": 286539338,\n      \"isDeleted\": false,\n      \"text\": \"Once FCL thinks it has everything\\nit needs, it will attempt to submit\\nthe transaction to the access node\\nreturning a Response\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"Lt5zP-8-JtS3R8KXjCn_y\",\n      \"type\": \"line\",\n      \"x\": 97.60546875,\n      \"y\": 4618.953125,\n      \"width\": 17.7060546875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1566435478,\n      \"version\": 1705,\n      \"versionNonce\": 30330582,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          17.7060546875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"_hXtzS2Onepme0YJyWzLw\",\n      \"type\": \"text\",\n      \"x\": -149.98828125,\n      \"y\": 4704.33984375,\n      \"width\": 248,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 451638870,\n      \"version\": 7890,\n      \"versionNonce\": 1114224214,\n      \"isDeleted\": false,\n      \"text\": \"The response can be used to\\nsubscribe to the status of the\\ntransaction.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"XaIR2rfIdf4M2OpALv-I2\",\n      \"type\": \"line\",\n      \"x\": 28.1796875,\n      \"y\": 4755.40234375,\n      \"width\": 85.70849609375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 491140886,\n      \"version\": 1932,\n      \"versionNonce\": 1203742282,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          85.70849609375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    }\n  ],\n  \"appState\": {\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/assets/fcl-ars-auth-v3.2.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 1,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"id\": \"coRgXgxDx_rGztManLJNj\",\n      \"type\": \"line\",\n      \"x\": 1826.82421875,\n      \"y\": 402.9375,\n      \"width\": 0,\n      \"height\": 630.359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1312138966,\n      \"version\": 662,\n      \"versionNonce\": 1794938954,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          630.359375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"M0qjT3k6XLsaUrGM5l_Jk\",\n      \"type\": \"text\",\n      \"x\": 1762.546875,\n      \"y\": 1093.79296875,\n      \"width\": 128,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 590355926,\n      \"version\": 850,\n      \"versionNonce\": 1122986326,\n      \"isDeleted\": false,\n      \"text\": \"Challenge\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LLYkOAmehERqY2yfQ4-mS\",\n      \"type\": \"line\",\n      \"x\": 1824.30078125,\n      \"y\": 1033.98828125,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1128019606,\n      \"version\": 124,\n      \"versionNonce\": 890699530,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"4jiRvxEhO_mq0VrMwSgL3\",\n      \"type\": \"line\",\n      \"x\": 118.14453125,\n      \"y\": 2993.164306640625,\n      \"width\": 0,\n      \"height\": 300.202880859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1278829846,\n      \"version\": 1995,\n      \"versionNonce\": 1120731158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          300.202880859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BGN-MZTIw8KwbM7X_KkY2\",\n      \"type\": \"line\",\n      \"x\": 118.302734375,\n      \"y\": 1008.3447265625,\n      \"width\": 0,\n      \"height\": 603.4599609375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 363991382,\n      \"version\": 867,\n      \"versionNonce\": 805282966,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          603.4599609375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"un0BO73k-S9mWt9N8vfWt\",\n      \"type\": \"text\",\n      \"x\": 108.84765625,\n      \"y\": 219.35546875,\n      \"width\": 45,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1641930582,\n      \"version\": 151,\n      \"versionNonce\": 957137290,\n      \"isDeleted\": false,\n      \"text\": \"dApp\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"chwyHplpBxENYV0oFYUJ5\",\n      \"type\": \"text\",\n      \"x\": 506.296875,\n      \"y\": 218.80859375,\n      \"width\": 24,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 377033738,\n      \"version\": 190,\n      \"versionNonce\": 2062019082,\n      \"isDeleted\": false,\n      \"text\": \"fcl\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"A_YGfR-4aRXOHoeUej2FH\",\n      \"type\": \"text\",\n      \"x\": 871.4375,\n      \"y\": 219.44921875,\n      \"width\": 77,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1848970902,\n      \"version\": 158,\n      \"versionNonce\": 567364246,\n      \"isDeleted\": false,\n      \"text\": \"provider\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"4cHNGYbFyLPBSmllMxnqG\",\n      \"type\": \"text\",\n      \"x\": 1277.8984375,\n      \"y\": 218.390625,\n      \"width\": 38,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 544904458,\n      \"version\": 159,\n      \"versionNonce\": 2049224662,\n      \"isDeleted\": false,\n      \"text\": \"flow\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"jacsVi7b_9LRNYvWMBgax\",\n      \"type\": \"text\",\n      \"x\": 1635.7578125,\n      \"y\": 215.31640625,\n      \"width\": 99,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 594396554,\n      \"version\": 142,\n      \"versionNonce\": 1415635850,\n      \"isDeleted\": false,\n      \"text\": \"handshake\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"ryyCHYiHt6qIijgNyuznw\",\n      \"type\": \"line\",\n      \"x\": 1686.97265625,\n      \"y\": 242.30859375,\n      \"width\": 0,\n      \"height\": 1078.56640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 949453258,\n      \"version\": 550,\n      \"versionNonce\": 656589526,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1078.56640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"PdSxGy2bbk0IQ6U3sbaaO\",\n      \"type\": \"line\",\n      \"x\": 1295.9375,\n      \"y\": 250.052734375,\n      \"width\": 0,\n      \"height\": 4522.494140625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1141283658,\n      \"version\": 1407,\n      \"versionNonce\": 1476993046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4522.494140625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"q4v_gQ0kus8ABlQjh2qfU\",\n      \"type\": \"line\",\n      \"x\": 907.69921875,\n      \"y\": 252.095703125,\n      \"width\": 0,\n      \"height\": 4519.337890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 718607446,\n      \"version\": 1343,\n      \"versionNonce\": 561951690,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4519.337890625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"sD6hFB9Fg_yS4wv-kXCd7\",\n      \"type\": \"line\",\n      \"x\": 518.66015625,\n      \"y\": 250.041015625,\n      \"width\": 0,\n      \"height\": 4521.998046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1951527242,\n      \"version\": 1276,\n      \"versionNonce\": 1296645718,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4521.998046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qk9t0Pn0gqz1vMQ3-PPVs\",\n      \"type\": \"rectangle\",\n      \"x\": 495.0703125,\n      \"y\": 1090.64453125,\n      \"width\": 1236.47265625,\n      \"height\": 518.51953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1052625546,\n      \"version\": 134,\n      \"versionNonce\": 1816547594,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"WAjcohb9hozxf_x_K2Q70\",\n      \"type\": \"line\",\n      \"x\": 127.6796875,\n      \"y\": 247.509765625,\n      \"width\": 0,\n      \"height\": 4524.509765625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 451624970,\n      \"version\": 1267,\n      \"versionNonce\": 1700701898,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4524.509765625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1uT7ljw353mq_pBF1krUo\",\n      \"type\": \"arrow\",\n      \"x\": 132.875,\n      \"y\": 330.609375,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 453198294,\n      \"version\": 247,\n      \"versionNonce\": 2111004886,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9_RwWHhR4z7t6UN2sMXZp\",\n      \"type\": \"text\",\n      \"x\": -178.890625,\n      \"y\": 263.02734375,\n      \"width\": 268,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1786272714,\n      \"version\": 1433,\n      \"versionNonce\": 1274253526,\n      \"isDeleted\": false,\n      \"text\": \"Scopes allow dApps to request\\nadditional (private) information\\nfrom the provider. They will be\\nsent along to the provider during\\nthe initial challenge. If the\\n user has decided to allow the\\nprovider to share the information,\\nsaid information will be available\\nin the providers private hooks\\nrequest.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"3pLEjtL6UX46WlYKdWkJD\",\n      \"type\": \"text\",\n      \"x\": 135.88671875,\n      \"y\": 337.0390625,\n      \"width\": 422,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 251468054,\n      \"version\": 520,\n      \"versionNonce\": 1557952146,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"challenge.scope\\\", \\\"email+publicKey\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fbb9O2zUQnZNHHgxrXulZ\",\n      \"type\": \"arrow\",\n      \"x\": 134.09765625,\n      \"y\": 401.00390625,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2097487190,\n      \"version\": 372,\n      \"versionNonce\": 526001482,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"V2OPDQAf4l7Ba2i58gZ1n\",\n      \"type\": \"text\",\n      \"x\": 142.6640625,\n      \"y\": 412.84765625,\n      \"width\": 431,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 392596234,\n      \"version\": 771,\n      \"versionNonce\": 298348434,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"send.scope\\\", \\\"https://accessNodeUrl\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KuTZ_hrxsU6Nuq1hi_Pi9\",\n      \"type\": \"line\",\n      \"x\": 115.57421875,\n      \"y\": 278.06640625,\n      \"width\": 0,\n      \"height\": 186.05859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1103091658,\n      \"version\": 80,\n      \"versionNonce\": 777121290,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          186.05859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"XJ4RlWOEKco-1mBvuKISA\",\n      \"type\": \"line\",\n      \"x\": 67.6875,\n      \"y\": 355.89453125,\n      \"width\": 47.6640625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 269160854,\n      \"version\": 35,\n      \"versionNonce\": 1127334922,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.6640625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BwaqTUADSaiRHoCGokXKI\",\n      \"type\": \"text\",\n      \"x\": -178.97265625,\n      \"y\": 575.17578125,\n      \"width\": 263,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1391733194,\n      \"version\": 2490,\n      \"versionNonce\": 716580118,\n      \"isDeleted\": false,\n      \"text\": \"Subscribing allows the dApp to\\nreactively receive updates about\\na given topic. In this case we\\nwill want to receive any updates\\non the currentUser.\\n\\nSubscription callbacks are always\\ncalled immediately with what we\\ncurrently know.\\n\\nAll data should be considered\\nOPTIONAL\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"gyDGsALUUdgK_TzjT78zF\",\n      \"type\": \"arrow\",\n      \"x\": 133.03515625,\n      \"y\": 575.626953125,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 496657494,\n      \"version\": 370,\n      \"versionNonce\": 1173122634,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"UBeyLHncVlN6Qy8Z9Yq0P\",\n      \"type\": \"text\",\n      \"x\": 134.34765625,\n      \"y\": 579.634765625,\n      \"width\": 216,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793930250,\n      \"version\": 731,\n      \"versionNonce\": 66402390,\n      \"isDeleted\": false,\n      \"text\": \"fcl.currentUser()\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"BhVeXm_7Q-PW9YO_BFdjo\",\n      \"type\": \"arrow\",\n      \"x\": 507.73828125,\n      \"y\": 653.05859375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 512638486,\n      \"version\": 230,\n      \"versionNonce\": 1206320662,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BA2XTg-utF__4ANomq0DX\",\n      \"type\": \"text\",\n      \"x\": 169.609375,\n      \"y\": 655.84765625,\n      \"width\": 225,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 12563158,\n      \"version\": 1969,\n      \"versionNonce\": 1285559882,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: null\\ncid: null\\nloggedIn: false\\nverified: false\\nidentity:\\n  name: null\\n  avatar: null\\nscoped:\\n  email: null\\n  publicKey: null\\nprovider:\\n  addr: null\\n  pid: null\\n  name: null\\n  icon: null\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"2STUByBmNYXHz9OqNHNGe\",\n      \"type\": \"line\",\n      \"x\": 117.3984375,\n      \"y\": 559.306640625,\n      \"width\": 0,\n      \"height\": 291.021484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 429212246,\n      \"version\": 314,\n      \"versionNonce\": 1359200598,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          291.021484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lOQfNEIEHhNIe2KGKuEQF\",\n      \"type\": \"line\",\n      \"x\": 32.31640625,\n      \"y\": 679.796875,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 957144778,\n      \"version\": 453,\n      \"versionNonce\": 170207498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"AmNNkLgvu36sA-XfvGzvm\",\n      \"type\": \"text\",\n      \"x\": 323.33203125,\n      \"y\": 688.62109375,\n      \"width\": 493,\n      \"height\": 300,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 941271766,\n      \"version\": 1867,\n      \"versionNonce\": 531821962,\n      \"isDeleted\": false,\n      \"text\": \"- users flow address\\n- a composite id representing the users authentication method\\n- has fcl received either public or private hooks?\\n- could fcl successfully request private hooks?\\n- users profile info\\n  - users name per received hooks\\n  - users avatar per received hooks\\n- private scoped data as requested in the challenge\\n  - the optional email from the provider\\n  - the optional publicKey from the provider\\n- information about the provider\\n  - the flow address of provider\\n  - the users internal id for the provider\\n  - the name of the provider\\n  - the providers icon\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 294\n    },\n    {\n      \"id\": \"Qlrsmnvxv0Yu-6XxjPmon\",\n      \"type\": \"diamond\",\n      \"x\": 58.4375,\n      \"y\": 1010.71875,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 966881814,\n      \"version\": 948,\n      \"versionNonce\": 175724182,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"2Q0NcifLTOiWHZZp7CjVT\",\n      \"type\": \"text\",\n      \"x\": 87.32421875,\n      \"y\": 1032.84375,\n      \"width\": 84,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1980422282,\n      \"version\": 386,\n      \"versionNonce\": 1969063370,\n      \"isDeleted\": false,\n      \"text\": \"CLICK\\n\\\"sign in\\\"\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KlOxVWTL9pUeM5MOu6mHQ\",\n      \"type\": \"arrow\",\n      \"x\": 196.2734375,\n      \"y\": 1057.07421875,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 250703958,\n      \"version\": 517,\n      \"versionNonce\": 101467798,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jVn7DRTBVHuqU6aNGKgn1\",\n      \"type\": \"text\",\n      \"x\": 198.6328125,\n      \"y\": 1062.94140625,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 660400138,\n      \"version\": 720,\n      \"versionNonce\": 1689359818,\n      \"isDeleted\": false,\n      \"text\": \"fcl.authenticate()\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"tDpOm2KyUP_mfcEOtaC6g\",\n      \"type\": \"text\",\n      \"x\": -176.26171875,\n      \"y\": 1083.24609375,\n      \"width\": 274,\n      \"height\": 260,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 408947158,\n      \"version\": 2262,\n      \"versionNonce\": 1389549462,\n      \"isDeleted\": false,\n      \"text\": \"The authentication process truly\\nstarts here. The user clicks some\\nsort of sign in button in the dApp\\nwhich triggers the challenge flow.\\n\\nFCL will then render an iframe\\ndisplaying the handshake service.\\n\\nThe handshake services job is to\\nenable a Bring Your Own Provider\\ntype of experience, even providers\\nfcl and our team have never heard\\nof before.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 254\n    },\n    {\n      \"id\": \"VANgxLAjMWIqDaOMkQGew\",\n      \"type\": \"arrow\",\n      \"x\": 526.576171875,\n      \"y\": 1126.8046875,\n      \"width\": 1154.728515625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1345945814,\n      \"version\": 778,\n      \"versionNonce\": 688930710,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          1154.728515625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ZwB84bTSRuYNQBJ797UUX\",\n      \"type\": \"text\",\n      \"x\": 528.24609375,\n      \"y\": 1069.0078125,\n      \"width\": 185,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2029685718,\n      \"version\": 186,\n      \"versionNonce\": 1899835222,\n      \"isDeleted\": false,\n      \"text\": \"iframe rendered in dApp\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"3kh7r3_OMznv14O4Q7lds\",\n      \"type\": \"text\",\n      \"x\": 528.65625,\n      \"y\": 1128.5390625,\n      \"width\": 272,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1752712214,\n      \"version\": 2306,\n      \"versionNonce\": 161396042,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.onflow.org\\n---\\nl6n: dapp.com\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"I-bSnIv7qk4N11TBrWUvp\",\n      \"type\": \"text\",\n      \"x\": 749.22265625,\n      \"y\": 1167.3671875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1473737942,\n      \"version\": 2315,\n      \"versionNonce\": 140039818,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"xsaHRUOAlZ8ZI4kGqybV5\",\n      \"type\": \"diamond\",\n      \"x\": 1616.3515625,\n      \"y\": 1133.822265625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 783279446,\n      \"version\": 1251,\n      \"versionNonce\": 525459274,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"F-S5Qg94dsbKj8AmYRYUm\",\n      \"type\": \"text\",\n      \"x\": 1647.96875,\n      \"y\": 1155.748046875,\n      \"width\": 75,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1085031178,\n      \"version\": 702,\n      \"versionNonce\": 147359114,\n      \"isDeleted\": false,\n      \"text\": \"select\\nprovider\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"B2msJeeJj2r7pmQ9572Tt\",\n      \"type\": \"arrow\",\n      \"x\": 1684.63671875,\n      \"y\": 1248.70703125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 135045386,\n      \"version\": 92,\n      \"versionNonce\": 128871894,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QDa016qky6i2rbpghQINV\",\n      \"type\": \"text\",\n      \"x\": 944.94140625,\n      \"y\": 1251.53515625,\n      \"width\": 206,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 151321174,\n      \"version\": 2478,\n      \"versionNonce\": 1662550666,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET provider.com\\n---\\nl6n: L6N\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"6VaavfynVHFqaOHcJm68y\",\n      \"type\": \"text\",\n      \"x\": 1155.625,\n      \"y\": 1290.04296875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1531656010,\n      \"version\": 2395,\n      \"versionNonce\": 1533528662,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"NoiopQQrQ6gA3gBnK8QEO\",\n      \"type\": \"diamond\",\n      \"x\": 826.49609375,\n      \"y\": 1331.916015625,\n      \"width\": 158.109375,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 212982614,\n      \"version\": 1492,\n      \"versionNonce\": 605161866,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"VSakes544b46aPuOgA12w\",\n      \"type\": \"text\",\n      \"x\": 845.65234375,\n      \"y\": 1350.134765625,\n      \"width\": 122,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 879537418,\n      \"version\": 813,\n      \"versionNonce\": 761283466,\n      \"isDeleted\": false,\n      \"text\": \"user\\nauthenticates\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"TQB93-jsxoUcL9GwaBlZ1\",\n      \"type\": \"arrow\",\n      \"x\": 825.63671875,\n      \"y\": 1377.748046875,\n      \"width\": 302.73828125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 92871114,\n      \"version\": 442,\n      \"versionNonce\": 629633162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -302.73828125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"SkzWVjyWaeBHWW38XqLMT\",\n      \"type\": \"text\",\n      \"x\": 558.888671875,\n      \"y\": 1392.056640625,\n      \"width\": 300,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1183170518,\n      \"version\": 3074,\n      \"versionNonce\": 1994755286,\n      \"isDeleted\": false,\n      \"text\": \"JS/postMessage l6N\\n---\\ntype: \\\"FCL::CHALLENGE::RESPONSE\\\"\\naddr: FLOW_ADDRESS\\npaddr: PROVIDER_FLOW_ADDRESS\\ncode: CODE\\nexp: CODE_EXPIRES_AT\\nhks: HOOKS_URL\\nnonce: NONCE\\nl6n: L6N\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"25wzZQ-dBZxMxT8MW1Z-d\",\n      \"type\": \"text\",\n      \"x\": 868.22265625,\n      \"y\": 1427.90234375,\n      \"width\": 672,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1366848586,\n      \"version\": 3377,\n      \"versionNonce\": 2108085130,\n      \"isDeleted\": false,\n      \"text\": \"- fcl listens for this event type\\n- flow address of the user (used to fetch public hooks)\\n- flow address of the provider (used to fetch providers info)\\n- a token supplied when requesting the provider for private hooks\\n- when the code expires (epoch timestamp in the future)\\n- where to request the providers private hooks for the user\\n- the nonce provided by fcl at the start of the challenge\\n- the location.origin of the dApp (also provided by fcl at the start of the challenge)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"NXxTdsH-rCQCSFd5SbNvX\",\n      \"type\": \"arrow\",\n      \"x\": 1616.328125,\n      \"y\": 1159.81640625,\n      \"width\": 308.453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1011362634,\n      \"version\": 98,\n      \"versionNonce\": 62543126,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -308.453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnEjAi8iE7V1aahOopRXY\",\n      \"type\": \"arrow\",\n      \"x\": 1307.71484375,\n      \"y\": 1202.07421875,\n      \"width\": 316.8359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 954039370,\n      \"version\": 50,\n      \"versionNonce\": 144070166,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          316.8359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1ZVyii2hq0Wpqq8542uW9\",\n      \"type\": \"text\",\n      \"x\": 1318.5078125,\n      \"y\": 1172.37109375,\n      \"width\": 284,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1705453142,\n      \"version\": 174,\n      \"versionNonce\": 1058064970,\n      \"isDeleted\": false,\n      \"text\": \"fetch available providers from chain\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"X6HUR1_MrW9gTRgJGheAA\",\n      \"type\": \"arrow\",\n      \"x\": 523.095703125,\n      \"y\": 2420.91796875,\n      \"width\": 379.943359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1506760842,\n      \"version\": 1136,\n      \"versionNonce\": 94275030,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.943359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7PcbZK4cQREATn7XIHt_A\",\n      \"type\": \"text\",\n      \"x\": 525.306640625,\n      \"y\": 2425.44140625,\n      \"width\": 169,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1876413718,\n      \"version\": 1321,\n      \"versionNonce\": 232123018,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL\\n---\\ncode: CODE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"42lCsAd4TL61C2ZBEbmuC\",\n      \"type\": \"line\",\n      \"x\": 33.736328125,\n      \"y\": 1173.4833984375,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1664276234,\n      \"version\": 754,\n      \"versionNonce\": 934966614,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3WLQiIIioSPeHv0xMKLko\",\n      \"type\": \"text\",\n      \"x\": -173.546875,\n      \"y\": 1886.24609375,\n      \"width\": 280,\n      \"height\": 560,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 964205782,\n      \"version\": 4104,\n      \"versionNonce\": 1022153674,\n      \"isDeleted\": false,\n      \"text\": \"FCL should now have the pieces\\nit needs to fetch both the public\\nand private hooks.\\n\\nPublic hooks are stored on chain\\nin a resource owned by the flow\\naddress. They can also point out\\nto resources owned by the provider\\nallowing the provider to change\\nprovider specific detail as needed\\nand example of that is moving the\\nauthorization endpoint. SENSITIVE\\nDATA SHOULD NEVER BE PUT IN\\nA PUBLIC HOOK.\\n\\nPrivate hooks are provided by\\nthe provider. They include provider\\nspecific overrides to the public\\nhooks as well as the additional\\nscopes that were requested in\\nthe challenge.\\n\\nFCL will attempt to fetch both\\nprivate and public hooks, deep\\nmerge the private into the public\\nand then let any currentUser\\nsubscribers know there is some\\nnew data for them.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 554\n    },\n    {\n      \"id\": \"oByTwhCzigB059e9baKhZ\",\n      \"type\": \"arrow\",\n      \"x\": 524.0869140625,\n      \"y\": 1639.83203125,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1399244246,\n      \"version\": 1012,\n      \"versionNonce\": 894784022,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"bQl2f4HdK2Ezo1MVmCQs-\",\n      \"type\": \"text\",\n      \"x\": 525.6220703125,\n      \"y\": 1640.6640625,\n      \"width\": 216,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 263301770,\n      \"version\": 1277,\n      \"versionNonce\": 1310257610,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_HOOKS\\n---\\naddress: FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"OfQGmyTtgjme0SWUklR_a\",\n      \"type\": \"arrow\",\n      \"x\": 1293.146484375,\n      \"y\": 1722.36328125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210260886,\n      \"version\": 263,\n      \"versionNonce\": 210434070,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zlS_RGPXHJyxMTeGPbPaA\",\n      \"type\": \"text\",\n      \"x\": 556.822265625,\n      \"y\": 1727.609375,\n      \"width\": 338,\n      \"height\": 361,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 358067914,\n      \"version\": 4272,\n      \"versionNonce\": 895971274,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nauthorizations:\\n  - id: PROVIDER_AUTHORIZATION_ID\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"HTTP/POST\\\"\\n    endpoint: AUTHORIZATION_ENDPOINT\\n    data:\\n      id: PID\\n  - id: PROVIDER_AUTHORIZATION_ID_2\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"REMOTE\\\"\\n    data:\\n      id: PID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 357\n    },\n    {\n      \"id\": \"RpkmMqz9tdMWF-3_bw77s\",\n      \"type\": \"text\",\n      \"x\": 731.95703125,\n      \"y\": 1765.109375,\n      \"width\": 226,\n      \"height\": 100,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 253356234,\n      \"version\": 5160,\n      \"versionNonce\": 1711938006,\n      \"isDeleted\": false,\n      \"text\": \"- flow address for user\\n- preferred signing key\\n- public identity info\\n  - an optional name value\\n  - an optional avatar value\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"2z30__NPjKNxvuE9Pyxmf\",\n      \"type\": \"text\",\n      \"x\": 916.23046875,\n      \"y\": 2017.57421875,\n      \"width\": 629,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231760906,\n      \"version\": 5822,\n      \"versionNonce\": 1146700234,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that points to a remote authorization\\nit will use the providers flow address and id that is supplied to do the look up\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wwWWue6mYk9yxli73gPmW\",\n      \"type\": \"line\",\n      \"x\": 901.21875,\n      \"y\": 1991.62890625,\n      \"width\": 0,\n      \"height\": 98.58984375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94038550,\n      \"version\": 363,\n      \"versionNonce\": 1292446730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          98.58984375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"egK8LT0KvLONRfcsgWWyx\",\n      \"type\": \"arrow\",\n      \"x\": 525.68017578125,\n      \"y\": 2181.4375,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1321042966,\n      \"version\": 1094,\n      \"versionNonce\": 152448970,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"oi3nAccLri9ZoY-toeQbo\",\n      \"type\": \"text\",\n      \"x\": 529.15673828125,\n      \"y\": 2186.72265625,\n      \"width\": 281,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 685568074,\n      \"version\": 1382,\n      \"versionNonce\": 86931402,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_PROVIDER\\n---\\naddress: PROVIDER_FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"HM8bKmZ_6p8oTn3sLt9NW\",\n      \"type\": \"text\",\n      \"x\": 916.25,\n      \"y\": 1893.673828125,\n      \"width\": 547,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1139490582,\n      \"version\": 6267,\n      \"versionNonce\": 692740886,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that is controlled by users flow account\\nit can be overloaded by private hooks if the addr and id match.\\nOverloading should be avoided where possible as this authorization\\nstrategy could still be used by non-currentUser situations\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"HPG9r6GWIVU-MLDXRhR0c\",\n      \"type\": \"line\",\n      \"x\": 901.12109375,\n      \"y\": 1880.525390625,\n      \"width\": 0,\n      \"height\": 105.830078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 851207498,\n      \"version\": 554,\n      \"versionNonce\": 1201238218,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          105.830078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"s6PIfFtwf-7CX3o-PHI9l\",\n      \"type\": \"arrow\",\n      \"x\": 1291.263671875,\n      \"y\": 2257.9453125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 631656074,\n      \"version\": 367,\n      \"versionNonce\": 17668362,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"d-aTpJ55bJetrQsYzT-8o\",\n      \"type\": \"text\",\n      \"x\": 554.728515625,\n      \"y\": 2260.98828125,\n      \"width\": 253,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 697513750,\n      \"version\": 4543,\n      \"versionNonce\": 1310176022,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: PROVIDER_FLOW_ADDRESS\\nname: PROVIDER_NAME\\nicon: PROVIDER_ICON\\nauthn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"2_VuSBa3bFRM7KYWRfqpK\",\n      \"type\": \"line\",\n      \"x\": 508.91796875,\n      \"y\": 1644.27734375,\n      \"width\": 154.62109375,\n      \"height\": 311.0625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 441658570,\n      \"version\": 350,\n      \"versionNonce\": 389400074,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -154.62109375,\n          311.0625\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -157.6171875,\n        295.58984375\n      ]\n    },\n    {\n      \"id\": \"5ME55bvkr9r1r5Zqo7QMP\",\n      \"type\": \"line\",\n      \"x\": 350.4609375,\n      \"y\": 2023.38671875,\n      \"width\": 162.4765625,\n      \"height\": 160.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 442543050,\n      \"version\": 54,\n      \"versionNonce\": 1075938122,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          162.4765625,\n          160.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jT1SAtxFHgoSlX-HSjGb3\",\n      \"type\": \"line\",\n      \"x\": 349.04296875,\n      \"y\": 2091.76953125,\n      \"width\": 165.9921875,\n      \"height\": 330.19921875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 677853206,\n      \"version\": 165,\n      \"versionNonce\": 1014681046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          165.9921875,\n          330.19921875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnpb7wSSUK_sV4qXlPQVt\",\n      \"type\": \"text\",\n      \"x\": 270.62109375,\n      \"y\": 2018.0078125,\n      \"width\": 126,\n      \"height\": 20,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 843163990,\n      \"version\": 190,\n      \"versionNonce\": 599478794,\n      \"isDeleted\": false,\n      \"text\": \"Done in parallel\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"msGB2E2TZJGP7TkawkmAf\",\n      \"type\": \"arrow\",\n      \"x\": 900.84765625,\n      \"y\": 2509.64453125,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210719318,\n      \"version\": 490,\n      \"versionNonce\": 16187478,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"-VVQYfd22ZmqYqXRLxXEm\",\n      \"type\": \"text\",\n      \"x\": 554.970703125,\n      \"y\": 2514.1875,\n      \"width\": 272,\n      \"height\": 304,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1012202506,\n      \"version\": 5187,\n      \"versionNonce\": 1530171926,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL RESPONSE\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\\n  authn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 300\n    },\n    {\n      \"id\": \"OnbDFeHN4fQhUjlz_WLfY\",\n      \"type\": \"text\",\n      \"x\": 731.4140625,\n      \"y\": 2549.73046875,\n      \"width\": 680,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2121614090,\n      \"version\": 7076,\n      \"versionNonce\": 292326282,\n      \"isDeleted\": false,\n      \"text\": \"- Users Flow Address\\n- overloading the preferred signing key\\n- private identity info (will overload public info)\\n  in this case the data is the same\\n  if it was omitted fcl will use the public info if its there\\n- the requested scoped data\\n  - user decided to send the email\\n  - but also decided to NOT send the publicKey (reminder that everything is optional)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"2N9s2KDB46jGhu9W9zxZ5\",\n      \"type\": \"text\",\n      \"x\": 835.90234375,\n      \"y\": 2722.09375,\n      \"width\": 414,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1232014154,\n      \"version\": 7368,\n      \"versionNonce\": 1966205206,\n      \"isDeleted\": false,\n      \"text\": \"- flow address of provider (used in composite id)\\n- id controlled by the provider (used in composite id)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"SUbm9_A_s1r_jH2PsAK_i\",\n      \"type\": \"line\",\n      \"x\": 120.42578125,\n      \"y\": 1632.94189453125,\n      \"width\": 0,\n      \"height\": 1330.13232421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1251139734,\n      \"version\": 1260,\n      \"versionNonce\": 719119498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1330.13232421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zts7CpbK3b8hN6Lf_L4NX\",\n      \"type\": \"line\",\n      \"x\": 33.37109375,\n      \"y\": 2168.4453125,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1021861962,\n      \"version\": 883,\n      \"versionNonce\": 504499158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6-8TIlr57ixKs6Sj3Voqe\",\n      \"type\": \"text\",\n      \"x\": 110.08984375,\n      \"y\": 92.10546875,\n      \"width\": 1183,\n      \"height\": 45,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1019216458,\n      \"version\": 772,\n      \"versionNonce\": 2018618070,\n      \"isDeleted\": false,\n      \"text\": \"Flow Client Library - Remote Async Authentication & Authorization\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"p424mWR_hsD0j4YBnrCVw\",\n      \"type\": \"text\",\n      \"x\": 108.97265625,\n      \"y\": 137.62109375,\n      \"width\": 306,\n      \"height\": 50,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1331610518,\n      \"version\": 444,\n      \"versionNonce\": 1716453646,\n      \"isDeleted\": false,\n      \"text\": \"Last Updated: April 19th 2020\\nVersion: 3.2\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 43\n    },\n    {\n      \"id\": \"qF5Aeoa9iYz0RqCATeZEH\",\n      \"type\": \"text\",\n      \"x\": 1738.421875,\n      \"y\": 288.890625,\n      \"width\": 176,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2000233674,\n      \"version\": 424,\n      \"versionNonce\": 186896022,\n      \"isDeleted\": false,\n      \"text\": \"Setup/Config\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"SwAuz72dvcZhh4zIV1V_W\",\n      \"type\": \"line\",\n      \"x\": 1826.83984375,\n      \"y\": 1178.0390625,\n      \"width\": 0,\n      \"height\": 436.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2110378634,\n      \"version\": 1335,\n      \"versionNonce\": 289846422,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          436.82421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Pr75G8We8YRy0Yi_gYH0l\",\n      \"type\": \"text\",\n      \"x\": 1759.25,\n      \"y\": 1681.26171875,\n      \"width\": 132,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1327777994,\n      \"version\": 1007,\n      \"versionNonce\": 320669642,\n      \"isDeleted\": false,\n      \"text\": \"Collection\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"PVT9D64GjjaP2ucRTUfLs\",\n      \"type\": \"line\",\n      \"x\": 1826.046875,\n      \"y\": 1770.51171875,\n      \"width\": 0,\n      \"height\": 1215.11328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1522073814,\n      \"version\": 2352,\n      \"versionNonce\": 2129637846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1215.11328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jvYGx-4d-NipQ0Bpnu05q\",\n      \"type\": \"arrow\",\n      \"x\": 508.783203125,\n      \"y\": 2558.3984375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 616907798,\n      \"version\": 440,\n      \"versionNonce\": 88690262,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IZXf_z8RKv6FuMhkvkXNf\",\n      \"type\": \"text\",\n      \"x\": 170.095703125,\n      \"y\": 2563.9375,\n      \"width\": 272,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1748054090,\n      \"version\": 2404,\n      \"versionNonce\": 1955554902,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: FLOW_ADDRESS\\ncid: COMPOSITE_ID\\nloggedIn: true\\nverified: true\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"waRSRXDeKvd5f6JPg0G6E\",\n      \"type\": \"diamond\",\n      \"x\": 56.0546875,\n      \"y\": 3013.853515625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1556613014,\n      \"version\": 1054,\n      \"versionNonce\": 1451302358,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"paxn_sWovWBSehdKXh9Yq\",\n      \"type\": \"text\",\n      \"x\": 75.44140625,\n      \"y\": 3035.978515625,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 961438922,\n      \"version\": 526,\n      \"versionNonce\": 604557962,\n      \"isDeleted\": false,\n      \"text\": \"TRIGGER\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hrSSY4HIR0R4f4pjnZxdq\",\n      \"type\": \"arrow\",\n      \"x\": 195.189453125,\n      \"y\": 3058.953125,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94461718,\n      \"version\": 622,\n      \"versionNonce\": 1200903050,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6_zL8bXZ7lEK83iY4swSO\",\n      \"type\": \"text\",\n      \"x\": 188.287109375,\n      \"y\": 3066.16796875,\n      \"width\": 525,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 653804874,\n      \"version\": 1965,\n      \"versionNonce\": 1765016086,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([\\n  vtx.TRANSFER_FLOW_TOKENS,\\n  sdk.params([\\n    sdk.param(AMOUNT, t.UFix64),\\n    sdk.param(TO_ADDRESS, t.Address)\\n  ]),\\n  sdk.proposer(fcl.currentUser().proposerAuthorization),\\n  sdk.payer(fcl.currentUser().payerAuthorization),\\n  sdk.authorizations([\\n    fcl.currentUser().authorization\\n  ])\\n])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"huhsom-5KjKGKdIYDMOqy\",\n      \"type\": \"text\",\n      \"x\": 718.8828125,\n      \"y\": 3180.875,\n      \"width\": 300,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 868467722,\n      \"version\": 7984,\n      \"versionNonce\": 141727690,\n      \"isDeleted\": false,\n      \"text\": \"- who is proposing the transaction\\n- who is paying for the transaction\\n- who are authorizing the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"EZpsNzOMm6AF6ard6rzL9\",\n      \"type\": \"text\",\n      \"x\": 455.97265625,\n      \"y\": 3083.23828125,\n      \"width\": 297,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 771410058,\n      \"version\": 8237,\n      \"versionNonce\": 1499597386,\n      \"isDeleted\": false,\n      \"text\": \"- a verified/provable transaction\\n- params to pass to the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"zIfBGvs5LZkn3wLsdHnBD\",\n      \"type\": \"arrow\",\n      \"x\": 518.708984375,\n      \"y\": 3285.18359375,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1573066122,\n      \"version\": 784,\n      \"versionNonce\": 1662081558,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QeOvoAeQuTwqV9BaVr0RY\",\n      \"type\": \"text\",\n      \"x\": 523.296875,\n      \"y\": 3287.96875,\n      \"width\": 272,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1929637910,\n      \"version\": 2943,\n      \"versionNonce\": 547750290,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization\\n---\\nmessage: MESSAGE\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nrole:\\n  proposer: true\\n  authorizer: true\\n  payer: true\\ninteraction: INTERACTION_DATA\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"m-dBP7WUdYjECj9H_N-Lw\",\n      \"type\": \"text\",\n      \"x\": 698.4765625,\n      \"y\": 3324.60546875,\n      \"width\": 613,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 566844874,\n      \"version\": 8754,\n      \"versionNonce\": 1647442638,\n      \"isDeleted\": false,\n      \"text\": \"- what needs to be signed (will be in hex, need to cast to binary for signing)\\n- flow address to sign with\\n- preferred signing key\\n- what roles this signature plays\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"uFmYk6gAWEzV926It2dyS\",\n      \"type\": \"text\",\n      \"x\": 803.859375,\n      \"y\": 3457.97265625,\n      \"width\": 406,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 963183382,\n      \"version\": 9206,\n      \"versionNonce\": 2061418122,\n      \"isDeleted\": false,\n      \"text\": \"- data that can be used to recreate the payload\\n  so it can be verified. It should have everything\\n  about the transaction so the provider could also\\n  use that data in here to give the user a better\\n  experience when they go to approve/decline the\\n  transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"VkMECX5n8ypX3ZzyzSoiY\",\n      \"type\": \"arrow\",\n      \"x\": 902.3193359375,\n      \"y\": 3588.53515625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1725344714,\n      \"version\": 556,\n      \"versionNonce\": 1331222230,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"fTfdefywWKAJLExOheTvm\",\n      \"type\": \"text\",\n      \"x\": 554.4619140625,\n      \"y\": 3591.27734375,\n      \"width\": 413,\n      \"height\": 380,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 403852758,\n      \"version\": 6211,\n      \"versionNonce\": 1875251478,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\\nlocal:\\n  - method: \\\"BROWSER/IFRAME\\\"\\n    endpoint: LOCAL_IFRAME_ENDPOINT\\n    width: WIDTH\\n    height: HEIGHT\\n    background: BG_COLOR\\n  - method: \\\"BROWSER/EXTENSION\\\"\\n    eventType: PROVIDER_EXTENSION_EVENT_TYPE\\n    data: DATA_TO_SEND_EXTENSION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 376\n    },\n    {\n      \"id\": \"dnULn5eXCu25FbJ5ADvgb\",\n      \"type\": \"arrow\",\n      \"x\": 520.8291015625,\n      \"y\": 3998.94921875,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 782169098,\n      \"version\": 936,\n      \"versionNonce\": 318209162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aXHKmUTpcXq-KXd22YVHZ\",\n      \"type\": \"text\",\n      \"x\": 523.3154296875,\n      \"y\": 4006.41015625,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1174514070,\n      \"version\": 3106,\n      \"versionNonce\": 796185162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"Qt5oM_exd-ilHtenCfsx1\",\n      \"type\": \"arrow\",\n      \"x\": 899.611328125,\n      \"y\": 4085.2265625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1781753622,\n      \"version\": 639,\n      \"versionNonce\": 1286590294,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"HkOFxXHDQ51b1hvi6qcyX\",\n      \"type\": \"text\",\n      \"x\": 555.01171875,\n      \"y\": 4090.125,\n      \"width\": 319,\n      \"height\": 209,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 308985162,\n      \"version\": 6371,\n      \"versionNonce\": 1920465162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 205\n    },\n    {\n      \"id\": \"3INOWYSzlw6A2i5ZFLpWE\",\n      \"type\": \"arrow\",\n      \"x\": 523.39208984375,\n      \"y\": 4318.509765625,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1575886678,\n      \"version\": 1069,\n      \"versionNonce\": 892796950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1GaZCC06LIykjWF8msHrO\",\n      \"type\": \"text\",\n      \"x\": 526.07763671875,\n      \"y\": 4325.970703125,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1460054282,\n      \"version\": 3239,\n      \"versionNonce\": 499725386,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"rJdS3rSR6xZz3q3K8_obb\",\n      \"type\": \"arrow\",\n      \"x\": 902.37353515625,\n      \"y\": 4404.787109375,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 14402710,\n      \"version\": 772,\n      \"versionNonce\": 1707773270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VeXvW_CPgoYJy_zq6RVC6\",\n      \"type\": \"text\",\n      \"x\": 557.45361328125,\n      \"y\": 4407.943359375,\n      \"width\": 319,\n      \"height\": 133,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1595996106,\n      \"version\": 6605,\n      \"versionNonce\": 1537513802,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: APPROVED\\ncompositeSignature:\\n  addr: FLOW_ADDRESS\\n  keyId: KEY_ID_2\\n  signature: SIGNATURE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 129\n    },\n    {\n      \"id\": \"Sd2FuAqCDzEl9_UVKxCdu\",\n      \"type\": \"text\",\n      \"x\": 741.82421875,\n      \"y\": 3627.671875,\n      \"width\": 256,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 664875030,\n      \"version\": 8575,\n      \"versionNonce\": 1250821334,\n      \"isDeleted\": false,\n      \"text\": \"- the status of the transaction\\n- an empty composite signature \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hM2bEW5KNVxetY6j53I3-\",\n      \"type\": \"text\",\n      \"x\": 763.0625,\n      \"y\": 3723.57421875,\n      \"width\": 421,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231038090,\n      \"version\": 8746,\n      \"versionNonce\": 244451670,\n      \"isDeleted\": false,\n      \"text\": \"- where and how to get updates for the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"fNHFI8o8oO5yAGFPaxe5s\",\n      \"type\": \"text\",\n      \"x\": 860,\n      \"y\": 3798.71484375,\n      \"width\": 760,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 610817162,\n      \"version\": 9131,\n      \"versionNonce\": 414310218,\n      \"isDeleted\": false,\n      \"text\": \"- lets FCL know if there are local ways of letting the user authorize from their current device\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"tfACerMEHudHalqtkDVxw\",\n      \"type\": \"text\",\n      \"x\": 916.138671875,\n      \"y\": 3836.7060546875,\n      \"width\": 366,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1720766870,\n      \"version\": 6618,\n      \"versionNonce\": 596298954,\n      \"isDeleted\": false,\n      \"text\": \"FCL will render an iframe showing the endpoint\\nthe iframe will be rendered with the supplied\\nwidth, height and background color\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"lEAUSNRbeExIAbUFoi457\",\n      \"type\": \"line\",\n      \"x\": 898.724609375,\n      \"y\": 3819.2880859375,\n      \"width\": 0,\n      \"height\": 92.2431640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 617560778,\n      \"version\": 810,\n      \"versionNonce\": 687063446,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          92.2431640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VMWNVeWbavakv7ZbvBDZ4\",\n      \"type\": \"text\",\n      \"x\": 986.568359375,\n      \"y\": 3938.26123046875,\n      \"width\": 373,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1532948950,\n      \"version\": 6925,\n      \"versionNonce\": 1496202634,\n      \"isDeleted\": false,\n      \"text\": \"FCL will send an event to a browser extension\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"SNdO8VWRuFZGJFHu1jM1s\",\n      \"type\": \"line\",\n      \"x\": 975.658203125,\n      \"y\": 3912.92529296875,\n      \"width\": 0,\n      \"height\": 70.04736328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1134706314,\n      \"version\": 1016,\n      \"versionNonce\": 1539103638,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          70.04736328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"U-EEL_3O6Lsxb7mROH8Pr\",\n      \"type\": \"line\",\n      \"x\": 548.703125,\n      \"y\": 3801.44091796875,\n      \"width\": 0,\n      \"height\": 168.72705078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 237420362,\n      \"version\": 1079,\n      \"versionNonce\": 1922915862,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          168.72705078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VRe96xT0_1RxtHTMIyi62\",\n      \"type\": \"text\",\n      \"x\": 346.95703125,\n      \"y\": 3819.34375,\n      \"width\": 195,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1235761750,\n      \"version\": 7272,\n      \"versionNonce\": 1943726230,\n      \"isDeleted\": false,\n      \"text\": \"These will only happen\\nfor the currentUser, but\\nthe provider should still\\nmake sure that the user\\nis authenticated before\\nshowing any possibly\\nsensitive information\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"58mykrKHV9EaCFvmLqX9I\",\n      \"type\": \"text\",\n      \"x\": 913.681640625,\n      \"y\": 4180.76904296875,\n      \"width\": 302,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 291843082,\n      \"version\": 7021,\n      \"versionNonce\": 506427606,\n      \"isDeleted\": false,\n      \"text\": \"The same as the above authorization\\nresponse but sans the local info\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wJIW4AG-R71Cq1nvCREvC\",\n      \"type\": \"line\",\n      \"x\": 901.482421875,\n      \"y\": 4120.62060546875,\n      \"width\": 0,\n      \"height\": 184.09423828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 64680342,\n      \"version\": 1105,\n      \"versionNonce\": 1179937866,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          184.09423828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1_bAu7XiS5YNkJzGVFz-P\",\n      \"type\": \"text\",\n      \"x\": 213,\n      \"y\": 4136.0703125,\n      \"width\": 249,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 530454218,\n      \"version\": 7482,\n      \"versionNonce\": 1808024342,\n      \"isDeleted\": false,\n      \"text\": \"FCL will continue to request\\nauthorizationUpdates until\\nthe response no longer returns\\nan authorizationUpdates hook\\nor the status is APPROVED or\\nREFUSED\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"19wWD272ASOGmsbjs-59d\",\n      \"type\": \"line\",\n      \"x\": 443.7265625,\n      \"y\": 4170.546875,\n      \"width\": 65.46484375,\n      \"height\": 129.7421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1153278166,\n      \"version\": 109,\n      \"versionNonce\": 2074859210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          65.46484375,\n          -129.7421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"FP82AskFm3Lh1tPvv1lq9\",\n      \"type\": \"line\",\n      \"x\": 450.05859375,\n      \"y\": 4240.8671875,\n      \"width\": 61.82421875,\n      \"height\": 113.42578125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 199143626,\n      \"version\": 255,\n      \"versionNonce\": 292145110,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          61.82421875,\n          113.42578125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"t_6ydp1uC_v23r855FNXE\",\n      \"type\": \"arrow\",\n      \"x\": 525.6611328125,\n      \"y\": 4585,\n      \"width\": 761.1201171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 179347786,\n      \"version\": 1329,\n      \"versionNonce\": 526737418,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          761.1201171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"us3PQTgK_fN8w5Nk4IhG_\",\n      \"type\": \"text\",\n      \"x\": 565.6875,\n      \"y\": 4590.29296875,\n      \"width\": 319,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2127509142,\n      \"version\": 1722,\n      \"versionNonce\": 2040934282,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/TRANSACTION submitTransaction\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"GfjjxVGNRF0p99UbfDZjq\",\n      \"type\": \"arrow\",\n      \"x\": 1286.1953125,\n      \"y\": 4646.7734375,\n      \"width\": 760.6982421875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1092171862,\n      \"version\": 975,\n      \"versionNonce\": 53636950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -760.6982421875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pW8AlxjpdNg5jWX_4n0dM\",\n      \"type\": \"text\",\n      \"x\": 567.89453125,\n      \"y\": 4653.734375,\n      \"width\": 300,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 432772490,\n      \"version\": 1993,\n      \"versionNonce\": 933974614,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE submitTransaction \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"pKKtykoGvufR7ERvt-eTi\",\n      \"type\": \"arrow\",\n      \"x\": 512.6123046875,\n      \"y\": 4647.16796875,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1779519574,\n      \"version\": 863,\n      \"versionNonce\": 964619158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Ap9Cyn92PMXlJBo3aPhoP\",\n      \"type\": \"text\",\n      \"x\": 160.5078125,\n      \"y\": 4652.4609375,\n      \"width\": 356,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1261986506,\n      \"version\": 2126,\n      \"versionNonce\": 2067928278,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([...])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"u-UfsHkkQadRF6SCVyVx1\",\n      \"type\": \"arrow\",\n      \"x\": 136.68359375,\n      \"y\": 4710.556640625,\n      \"width\": 377.4296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1607577482,\n      \"version\": 823,\n      \"versionNonce\": 836980298,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          377.4296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3F1bHxsqx2nTNCPGB-6NI\",\n      \"type\": \"text\",\n      \"x\": 140.59375,\n      \"y\": 4715.869140625,\n      \"width\": 234,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 51013142,\n      \"version\": 2270,\n      \"versionNonce\": 451491158,\n      \"isDeleted\": false,\n      \"text\": \"fcl.transaction(response)\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"-UaYdX-OEaS5wVMrwN5xR\",\n      \"type\": \"text\",\n      \"x\": 1744.84375,\n      \"y\": 3064.501953125,\n      \"width\": 162,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 338788298,\n      \"version\": 1205,\n      \"versionNonce\": 1853718154,\n      \"isDeleted\": false,\n      \"text\": \"Transaction\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LuFDPJCxj7GY2koIvvpQY\",\n      \"type\": \"line\",\n      \"x\": 1827.22265625,\n      \"y\": 3166.751953125,\n      \"width\": 0,\n      \"height\": 1603.451171875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 561953238,\n      \"version\": 2787,\n      \"versionNonce\": 1627850518,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1603.451171875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0qPJx0BzT51VBvJZZbAtb\",\n      \"type\": \"line\",\n      \"x\": 1828.48046875,\n      \"y\": 1618.515625,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1012736982,\n      \"version\": 218,\n      \"versionNonce\": 1545674058,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pb8U1YVZRiNyhtgwvxJoO\",\n      \"type\": \"line\",\n      \"x\": 1823.1328125,\n      \"y\": 2984.24609375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1893180118,\n      \"version\": 393,\n      \"versionNonce\": 1208071254,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9mq_YXv-6dfI7LCcLOoZk\",\n      \"type\": \"line\",\n      \"x\": 1825.71875,\n      \"y\": 4770.21484375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 303631562,\n      \"version\": 488,\n      \"versionNonce\": 2036524042,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vKI1TN3W9zEYCqXspw6cd\",\n      \"type\": \"line\",\n      \"x\": 116.59765625,\n      \"y\": 3556.2403564453125,\n      \"width\": 0,\n      \"height\": 987.7479248046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 561630986,\n      \"version\": 2591,\n      \"versionNonce\": 1883029270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          987.7479248046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"x_rOBERCd6TqS6QnIH9qV\",\n      \"type\": \"line\",\n      \"x\": 116.16015625,\n      \"y\": 4690.296875,\n      \"width\": 0,\n      \"height\": 76.2421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 406239574,\n      \"version\": 2817,\n      \"versionNonce\": 691342730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          76.2421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zOwAE2N733ejewShvmEsl\",\n      \"type\": \"line\",\n      \"x\": 115.9921875,\n      \"y\": 4556.8359375,\n      \"width\": 0,\n      \"height\": 119.27734375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 315952906,\n      \"version\": 3005,\n      \"versionNonce\": 1280138506,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          119.27734375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aDpvsyDq7LP1_OC4cpBxX\",\n      \"type\": \"text\",\n      \"x\": 458.748046875,\n      \"y\": 2862.462890625,\n      \"width\": 372,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 385734090,\n      \"version\": 6220,\n      \"versionNonce\": 1866634186,\n      \"isDeleted\": false,\n      \"text\": \"A deep merge of the private currentUser data\\ninto the public currentUser data\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"h7Bs0gToLSbntCq0_kmTk\",\n      \"type\": \"line\",\n      \"x\": 452.544921875,\n      \"y\": 2604.6953125,\n      \"width\": 0,\n      \"height\": 292.771484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1087030230,\n      \"version\": 626,\n      \"versionNonce\": 48037846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          292.771484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"toQyT3WzIMdRQiPm4x9M2\",\n      \"type\": \"text\",\n      \"x\": -219.69921875,\n      \"y\": 2983.08203125,\n      \"width\": 292,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 331266710,\n      \"version\": 5459,\n      \"versionNonce\": 1436890454,\n      \"isDeleted\": false,\n      \"text\": \"When a transaction is initiated fcl\\nwill go through a process called\\nasynchronous decomposition. In short\\nit will try to make sure it has all\\nthe things it needs to have a high\\nprobability of submitting a successful\\ntransaction. As an example if there\\nisn't a currentUser but the\\ntransaction needs a currentUser, fcl\\nwill attempt to authenticate the\\nuser before the transaction needs\\nany of the currentUsers information.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"x_lnq9l_uj6CvcgnVJgeJ\",\n      \"type\": \"line\",\n      \"x\": 18.23828125,\n      \"y\": 3134.0078125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 142857302,\n      \"version\": 1239,\n      \"versionNonce\": 821686986,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"b_B9QDbiNzXEojm8Ot3A6\",\n      \"type\": \"line\",\n      \"x\": 118.421875,\n      \"y\": 3302.0743408203125,\n      \"width\": 0,\n      \"height\": 241.8240966796875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1749654346,\n      \"version\": 2215,\n      \"versionNonce\": 568597834,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          241.8240966796875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Co3Eq_HoZ3jX0sykDN2jl\",\n      \"type\": \"text\",\n      \"x\": -160.5390625,\n      \"y\": 3359.703125,\n      \"width\": 257,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 832108426,\n      \"version\": 5797,\n      \"versionNonce\": 1452595658,\n      \"isDeleted\": false,\n      \"text\": \"FCL will attempt to authorize\\nthe transaction with the various\\nauthorization hooks.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"3tVP74pUyHOCD2o9JmG9o\",\n      \"type\": \"line\",\n      \"x\": 18.845703125,\n      \"y\": 3408.4453125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 272878102,\n      \"version\": 1318,\n      \"versionNonce\": 1339264278,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"xlOhPrPEy7PRuivNrLRnv\",\n      \"type\": \"text\",\n      \"x\": -177.6328125,\n      \"y\": 3559.34375,\n      \"width\": 287,\n      \"height\": 520,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 190797386,\n      \"version\": 7155,\n      \"versionNonce\": 1392608586,\n      \"isDeleted\": false,\n      \"text\": \"FCL will timeout authorizations\\nfairly quickly if they don't respond\\nright away. This is because the\\nauthorization doesn't actually need\\nto happen with this request.\\nInstead what this request is doing\\nis supplying the provider with what\\nto sign, and then the provider sends\\nback the information required to\\ncreate a backchannel in which FCL\\ncan then request the results.\\n\\nThe provider can also supply some\\nlocal strategies that can give the\\nuser an in dApp authorization flow.\\nThese strategies can be things like\\nrendering an iframe or sending an\\nevent to a browser extension.\\n\\nBecause the actual response that\\nmatters for the authorization\\nhappens in a back channel we can\\nlock these local strategies down\\nas they really only act as a window\\ninto the providers authorization\\nuser experience.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 514\n    },\n    {\n      \"id\": \"NEX_J-rQLNq2wm5mbCd7c\",\n      \"type\": \"line\",\n      \"x\": 68.46875,\n      \"y\": 3788.57421875,\n      \"width\": 47.951171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 317150154,\n      \"version\": 1438,\n      \"versionNonce\": 987723158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.951171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"JVb2QMCeDhYIHIb3lBAJ8\",\n      \"type\": \"line\",\n      \"x\": 1700.52734375,\n      \"y\": 3341.05859375,\n      \"width\": 0,\n      \"height\": 787.40234375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 287421898,\n      \"version\": 3387,\n      \"versionNonce\": 363875278,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          787.40234375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"T0FONKIugMmjyhBNPa1b2\",\n      \"type\": \"arrow\",\n      \"x\": 908.6572265625,\n      \"y\": 3375.17578125,\n      \"width\": 783.2568359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 62204694,\n      \"version\": 1087,\n      \"versionNonce\": 533242706,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          783.2568359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"RzUmFjJWM7eyvTR6uIWjl\",\n      \"type\": \"arrow\",\n      \"x\": 1694.3984375,\n      \"y\": 4106,\n      \"width\": 782.88671875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 302396822,\n      \"version\": 1558,\n      \"versionNonce\": 568895754,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -782.88671875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IvLj82FximT02G1AK9jZ_\",\n      \"type\": \"diamond\",\n      \"x\": 1622.4375,\n      \"y\": 3971.888671875,\n      \"width\": 150.1953125,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1415433814,\n      \"version\": 1295,\n      \"versionNonce\": 1640663126,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"oXRPPSMK37VNWnLwkYuZP\",\n      \"type\": \"text\",\n      \"x\": 1647.4921875,\n      \"y\": 3995.099609375,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 65890826,\n      \"version\": 735,\n      \"versionNonce\": 2008735114,\n      \"isDeleted\": false,\n      \"text\": \"APPROVED\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"pmu2RB5R3JQnXZ20pKfb6\",\n      \"type\": \"text\",\n      \"x\": 1660.42578125,\n      \"y\": 3264.2890625,\n      \"width\": 83,\n      \"height\": 75,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1528973770,\n      \"version\": 840,\n      \"versionNonce\": 419656398,\n      \"isDeleted\": false,\n      \"text\": \"provider\\napproval\\nprocess\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 68\n    },\n    {\n      \"id\": \"jNThL9TEd_WZFS1q9bspt\",\n      \"type\": \"text\",\n      \"x\": 1478.015625,\n      \"y\": 3207.4375,\n      \"width\": 206,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793138506,\n      \"version\": 8696,\n      \"versionNonce\": 20736274,\n      \"isDeleted\": false,\n      \"text\": \"These could be things like\\n- the providers mobile app\\n- a hardware device\\n- browser extension\\n- iframe\\n- text message\\n- providers website\\n- desktop application\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"IF08tbolyi3Jhmflhqsew\",\n      \"type\": \"line\",\n      \"x\": 1648.9921875,\n      \"y\": 3276.03515625,\n      \"width\": 0,\n      \"height\": 63.39501953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1043337802,\n      \"version\": 1215,\n      \"versionNonce\": 233302286,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          63.39501953125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ljhLjuHekKgxFYwog8Fwn\",\n      \"type\": \"line\",\n      \"x\": 1649.37109375,\n      \"y\": 3308.560791015625,\n      \"width\": 29.6171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 138692298,\n      \"version\": 1442,\n      \"versionNonce\": 330397394,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -29.6171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7wScteC3L1Oah6wsNyl8R\",\n      \"type\": \"text\",\n      \"x\": -179.7890625,\n      \"y\": 4584.96875,\n      \"width\": 285,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1886238922,\n      \"version\": 7618,\n      \"versionNonce\": 286539338,\n      \"isDeleted\": false,\n      \"text\": \"Once FCL thinks it has everything\\nit needs, it will attempt to submit\\nthe transaction to the access node\\nreturning a Response\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"Lt5zP-8-JtS3R8KXjCn_y\",\n      \"type\": \"line\",\n      \"x\": 97.60546875,\n      \"y\": 4618.953125,\n      \"width\": 17.7060546875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1566435478,\n      \"version\": 1705,\n      \"versionNonce\": 30330582,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          17.7060546875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"_hXtzS2Onepme0YJyWzLw\",\n      \"type\": \"text\",\n      \"x\": -149.98828125,\n      \"y\": 4704.33984375,\n      \"width\": 248,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 451638870,\n      \"version\": 7890,\n      \"versionNonce\": 1114224214,\n      \"isDeleted\": false,\n      \"text\": \"The response can be used to\\nsubscribe to the status of the\\ntransaction.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"XaIR2rfIdf4M2OpALv-I2\",\n      \"type\": \"line\",\n      \"x\": 28.1796875,\n      \"y\": 4755.40234375,\n      \"width\": 85.70849609375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 491140886,\n      \"version\": 1932,\n      \"versionNonce\": 1203742282,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          85.70849609375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    }\n  ],\n  \"appState\": {\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/assets/fcl-ars-auth-v3.excalidraw",
    "content": "{\n  \"type\": \"excalidraw\",\n  \"version\": 1,\n  \"source\": \"https://excalidraw.com\",\n  \"elements\": [\n    {\n      \"id\": \"coRgXgxDx_rGztManLJNj\",\n      \"type\": \"line\",\n      \"x\": 1826.82421875,\n      \"y\": 402.9375,\n      \"width\": 0,\n      \"height\": 630.359375,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1312138966,\n      \"version\": 662,\n      \"versionNonce\": 1794938954,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          630.359375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"M0qjT3k6XLsaUrGM5l_Jk\",\n      \"type\": \"text\",\n      \"x\": 1762.546875,\n      \"y\": 1093.79296875,\n      \"width\": 128,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 590355926,\n      \"version\": 850,\n      \"versionNonce\": 1122986326,\n      \"isDeleted\": false,\n      \"text\": \"Challenge\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LLYkOAmehERqY2yfQ4-mS\",\n      \"type\": \"line\",\n      \"x\": 1824.30078125,\n      \"y\": 1033.98828125,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1128019606,\n      \"version\": 124,\n      \"versionNonce\": 890699530,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"4jiRvxEhO_mq0VrMwSgL3\",\n      \"type\": \"line\",\n      \"x\": 118.14453125,\n      \"y\": 2993.164306640625,\n      \"width\": 0,\n      \"height\": 300.202880859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1278829846,\n      \"version\": 1995,\n      \"versionNonce\": 1120731158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          300.202880859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BGN-MZTIw8KwbM7X_KkY2\",\n      \"type\": \"line\",\n      \"x\": 118.302734375,\n      \"y\": 1008.3447265625,\n      \"width\": 0,\n      \"height\": 603.4599609375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 363991382,\n      \"version\": 867,\n      \"versionNonce\": 805282966,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          603.4599609375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"un0BO73k-S9mWt9N8vfWt\",\n      \"type\": \"text\",\n      \"x\": 108.84765625,\n      \"y\": 219.35546875,\n      \"width\": 45,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1641930582,\n      \"version\": 151,\n      \"versionNonce\": 957137290,\n      \"isDeleted\": false,\n      \"text\": \"dApp\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"chwyHplpBxENYV0oFYUJ5\",\n      \"type\": \"text\",\n      \"x\": 506.296875,\n      \"y\": 218.80859375,\n      \"width\": 24,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 377033738,\n      \"version\": 190,\n      \"versionNonce\": 2062019082,\n      \"isDeleted\": false,\n      \"text\": \"fcl\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"A_YGfR-4aRXOHoeUej2FH\",\n      \"type\": \"text\",\n      \"x\": 871.4375,\n      \"y\": 219.44921875,\n      \"width\": 77,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1848970902,\n      \"version\": 158,\n      \"versionNonce\": 567364246,\n      \"isDeleted\": false,\n      \"text\": \"provider\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"4cHNGYbFyLPBSmllMxnqG\",\n      \"type\": \"text\",\n      \"x\": 1277.8984375,\n      \"y\": 218.390625,\n      \"width\": 38,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 544904458,\n      \"version\": 159,\n      \"versionNonce\": 2049224662,\n      \"isDeleted\": false,\n      \"text\": \"flow\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"jacsVi7b_9LRNYvWMBgax\",\n      \"type\": \"text\",\n      \"x\": 1635.7578125,\n      \"y\": 215.31640625,\n      \"width\": 99,\n      \"height\": 25,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 594396554,\n      \"version\": 142,\n      \"versionNonce\": 1415635850,\n      \"isDeleted\": false,\n      \"text\": \"handshake\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 18\n    },\n    {\n      \"id\": \"ryyCHYiHt6qIijgNyuznw\",\n      \"type\": \"line\",\n      \"x\": 1686.97265625,\n      \"y\": 242.30859375,\n      \"width\": 0,\n      \"height\": 1078.56640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 949453258,\n      \"version\": 550,\n      \"versionNonce\": 656589526,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1078.56640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"PdSxGy2bbk0IQ6U3sbaaO\",\n      \"type\": \"line\",\n      \"x\": 1295.9375,\n      \"y\": 250.052734375,\n      \"width\": 0,\n      \"height\": 4522.494140625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1141283658,\n      \"version\": 1407,\n      \"versionNonce\": 1476993046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4522.494140625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"q4v_gQ0kus8ABlQjh2qfU\",\n      \"type\": \"line\",\n      \"x\": 907.69921875,\n      \"y\": 252.095703125,\n      \"width\": 0,\n      \"height\": 4519.337890625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 718607446,\n      \"version\": 1343,\n      \"versionNonce\": 561951690,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4519.337890625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"sD6hFB9Fg_yS4wv-kXCd7\",\n      \"type\": \"line\",\n      \"x\": 518.66015625,\n      \"y\": 250.041015625,\n      \"width\": 0,\n      \"height\": 4521.998046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 1951527242,\n      \"version\": 1276,\n      \"versionNonce\": 1296645718,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4521.998046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"qk9t0Pn0gqz1vMQ3-PPVs\",\n      \"type\": \"rectangle\",\n      \"x\": 495.0703125,\n      \"y\": 1090.64453125,\n      \"width\": 1236.47265625,\n      \"height\": 518.51953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1052625546,\n      \"version\": 134,\n      \"versionNonce\": 1816547594,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"WAjcohb9hozxf_x_K2Q70\",\n      \"type\": \"line\",\n      \"x\": 127.6796875,\n      \"y\": 247.509765625,\n      \"width\": 0,\n      \"height\": 4524.509765625,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 451624970,\n      \"version\": 1267,\n      \"versionNonce\": 1700701898,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          4524.509765625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1uT7ljw353mq_pBF1krUo\",\n      \"type\": \"arrow\",\n      \"x\": 132.875,\n      \"y\": 330.609375,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 453198294,\n      \"version\": 247,\n      \"versionNonce\": 2111004886,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9_RwWHhR4z7t6UN2sMXZp\",\n      \"type\": \"text\",\n      \"x\": -178.890625,\n      \"y\": 263.02734375,\n      \"width\": 268,\n      \"height\": 200,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1786272714,\n      \"version\": 1433,\n      \"versionNonce\": 1274253526,\n      \"isDeleted\": false,\n      \"text\": \"Scopes allow dApps to request\\nadditional (private) information\\nfrom the provider. They will be\\nsent along to the provider during\\nthe initial challenge. If the\\n user has decided to allow the\\nprovider to share the information,\\nsaid information will be available\\nin the providers private hooks\\nrequest.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 194\n    },\n    {\n      \"id\": \"3pLEjtL6UX46WlYKdWkJD\",\n      \"type\": \"text\",\n      \"x\": 133.08984375,\n      \"y\": 333.21875,\n      \"width\": 328,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 251468054,\n      \"version\": 469,\n      \"versionNonce\": 592087114,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"challenge.scope\\\", \\\"email\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"fbb9O2zUQnZNHHgxrXulZ\",\n      \"type\": \"arrow\",\n      \"x\": 134.09765625,\n      \"y\": 401.00390625,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2097487190,\n      \"version\": 372,\n      \"versionNonce\": 526001482,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"V2OPDQAf4l7Ba2i58gZ1n\",\n      \"type\": \"text\",\n      \"x\": 131.5078125,\n      \"y\": 404.61328125,\n      \"width\": 366,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 392596234,\n      \"version\": 670,\n      \"versionNonce\": 1678919446,\n      \"isDeleted\": false,\n      \"text\": \"fcl.config()\\n   .put(\\\"challenge.scope\\\", \\\"publicKey\\\")\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KuTZ_hrxsU6Nuq1hi_Pi9\",\n      \"type\": \"line\",\n      \"x\": 115.57421875,\n      \"y\": 278.06640625,\n      \"width\": 0,\n      \"height\": 186.05859375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1103091658,\n      \"version\": 80,\n      \"versionNonce\": 777121290,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          186.05859375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"XJ4RlWOEKco-1mBvuKISA\",\n      \"type\": \"line\",\n      \"x\": 67.6875,\n      \"y\": 355.89453125,\n      \"width\": 47.6640625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 269160854,\n      \"version\": 35,\n      \"versionNonce\": 1127334922,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.6640625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BwaqTUADSaiRHoCGokXKI\",\n      \"type\": \"text\",\n      \"x\": -178.97265625,\n      \"y\": 575.17578125,\n      \"width\": 263,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1391733194,\n      \"version\": 2490,\n      \"versionNonce\": 716580118,\n      \"isDeleted\": false,\n      \"text\": \"Subscribing allows the dApp to\\nreactively receive updates about\\na given topic. In this case we\\nwill want to receive any updates\\non the currentUser.\\n\\nSubscription callbacks are always\\ncalled immediately with what we\\ncurrently know.\\n\\nAll data should be considered\\nOPTIONAL\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"gyDGsALUUdgK_TzjT78zF\",\n      \"type\": \"arrow\",\n      \"x\": 133.03515625,\n      \"y\": 575.626953125,\n      \"width\": 379.125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 496657494,\n      \"version\": 370,\n      \"versionNonce\": 1173122634,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"UBeyLHncVlN6Qy8Z9Yq0P\",\n      \"type\": \"text\",\n      \"x\": 134.34765625,\n      \"y\": 579.634765625,\n      \"width\": 216,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793930250,\n      \"version\": 731,\n      \"versionNonce\": 66402390,\n      \"isDeleted\": false,\n      \"text\": \"fcl.currentUser()\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"BhVeXm_7Q-PW9YO_BFdjo\",\n      \"type\": \"arrow\",\n      \"x\": 507.73828125,\n      \"y\": 653.05859375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 512638486,\n      \"version\": 230,\n      \"versionNonce\": 1206320662,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"BA2XTg-utF__4ANomq0DX\",\n      \"type\": \"text\",\n      \"x\": 169.609375,\n      \"y\": 655.84765625,\n      \"width\": 225,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 12563158,\n      \"version\": 1969,\n      \"versionNonce\": 1285559882,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: null\\ncid: null\\nloggedIn: false\\nverified: false\\nidentity:\\n  name: null\\n  avatar: null\\nscoped:\\n  email: null\\n  publicKey: null\\nprovider:\\n  addr: null\\n  pid: null\\n  name: null\\n  icon: null\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"2STUByBmNYXHz9OqNHNGe\",\n      \"type\": \"line\",\n      \"x\": 117.3984375,\n      \"y\": 559.306640625,\n      \"width\": 0,\n      \"height\": 291.021484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 429212246,\n      \"version\": 314,\n      \"versionNonce\": 1359200598,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          291.021484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lOQfNEIEHhNIe2KGKuEQF\",\n      \"type\": \"line\",\n      \"x\": 32.31640625,\n      \"y\": 679.796875,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 957144778,\n      \"version\": 453,\n      \"versionNonce\": 170207498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"AmNNkLgvu36sA-XfvGzvm\",\n      \"type\": \"text\",\n      \"x\": 323.33203125,\n      \"y\": 688.62109375,\n      \"width\": 493,\n      \"height\": 300,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 941271766,\n      \"version\": 1867,\n      \"versionNonce\": 531821962,\n      \"isDeleted\": false,\n      \"text\": \"- users flow address\\n- a composite id representing the users authentication method\\n- has fcl received either public or private hooks?\\n- could fcl successfully request private hooks?\\n- users profile info\\n  - users name per received hooks\\n  - users avatar per received hooks\\n- private scoped data as requested in the challenge\\n  - the optional email from the provider\\n  - the optional publicKey from the provider\\n- information about the provider\\n  - the flow address of provider\\n  - the users internal id for the provider\\n  - the name of the provider\\n  - the providers icon\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 294\n    },\n    {\n      \"id\": \"Qlrsmnvxv0Yu-6XxjPmon\",\n      \"type\": \"diamond\",\n      \"x\": 58.4375,\n      \"y\": 1010.71875,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 966881814,\n      \"version\": 948,\n      \"versionNonce\": 175724182,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"2Q0NcifLTOiWHZZp7CjVT\",\n      \"type\": \"text\",\n      \"x\": 87.32421875,\n      \"y\": 1032.84375,\n      \"width\": 84,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1980422282,\n      \"version\": 386,\n      \"versionNonce\": 1969063370,\n      \"isDeleted\": false,\n      \"text\": \"CLICK\\n\\\"sign in\\\"\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"KlOxVWTL9pUeM5MOu6mHQ\",\n      \"type\": \"arrow\",\n      \"x\": 196.2734375,\n      \"y\": 1057.07421875,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 250703958,\n      \"version\": 517,\n      \"versionNonce\": 101467798,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jVn7DRTBVHuqU6aNGKgn1\",\n      \"type\": \"text\",\n      \"x\": 198.6328125,\n      \"y\": 1062.94140625,\n      \"width\": 169,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 660400138,\n      \"version\": 720,\n      \"versionNonce\": 1689359818,\n      \"isDeleted\": false,\n      \"text\": \"fcl.authenticate()\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"tDpOm2KyUP_mfcEOtaC6g\",\n      \"type\": \"text\",\n      \"x\": -176.26171875,\n      \"y\": 1083.24609375,\n      \"width\": 274,\n      \"height\": 260,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 408947158,\n      \"version\": 2262,\n      \"versionNonce\": 1389549462,\n      \"isDeleted\": false,\n      \"text\": \"The authentication process truly\\nstarts here. The user clicks some\\nsort of sign in button in the dApp\\nwhich triggers the challenge flow.\\n\\nFCL will then render an iframe\\ndisplaying the handshake service.\\n\\nThe handshake services job is to\\nenable a Bring Your Own Provider\\ntype of experience, even providers\\nfcl and our team have never heard\\nof before.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 254\n    },\n    {\n      \"id\": \"VANgxLAjMWIqDaOMkQGew\",\n      \"type\": \"arrow\",\n      \"x\": 526.576171875,\n      \"y\": 1126.8046875,\n      \"width\": 1154.728515625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1345945814,\n      \"version\": 778,\n      \"versionNonce\": 688930710,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          1154.728515625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ZwB84bTSRuYNQBJ797UUX\",\n      \"type\": \"text\",\n      \"x\": 528.24609375,\n      \"y\": 1069.0078125,\n      \"width\": 185,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2029685718,\n      \"version\": 186,\n      \"versionNonce\": 1899835222,\n      \"isDeleted\": false,\n      \"text\": \"iframe rendered in dApp\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"3kh7r3_OMznv14O4Q7lds\",\n      \"type\": \"text\",\n      \"x\": 528.65625,\n      \"y\": 1128.5390625,\n      \"width\": 272,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1752712214,\n      \"version\": 2306,\n      \"versionNonce\": 161396042,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET handshake.onflow.org\\n---\\nl6n: dapp.com\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"I-bSnIv7qk4N11TBrWUvp\",\n      \"type\": \"text\",\n      \"x\": 749.22265625,\n      \"y\": 1167.3671875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1473737942,\n      \"version\": 2315,\n      \"versionNonce\": 140039818,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"xsaHRUOAlZ8ZI4kGqybV5\",\n      \"type\": \"diamond\",\n      \"x\": 1616.3515625,\n      \"y\": 1133.822265625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 783279446,\n      \"version\": 1251,\n      \"versionNonce\": 525459274,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"F-S5Qg94dsbKj8AmYRYUm\",\n      \"type\": \"text\",\n      \"x\": 1647.96875,\n      \"y\": 1155.748046875,\n      \"width\": 75,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1085031178,\n      \"version\": 702,\n      \"versionNonce\": 147359114,\n      \"isDeleted\": false,\n      \"text\": \"select\\nprovider\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"B2msJeeJj2r7pmQ9572Tt\",\n      \"type\": \"arrow\",\n      \"x\": 1684.63671875,\n      \"y\": 1248.70703125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 135045386,\n      \"version\": 92,\n      \"versionNonce\": 128871894,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QDa016qky6i2rbpghQINV\",\n      \"type\": \"text\",\n      \"x\": 944.94140625,\n      \"y\": 1251.53515625,\n      \"width\": 206,\n      \"height\": 95,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 151321174,\n      \"version\": 2478,\n      \"versionNonce\": 1662550666,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET provider.com\\n---\\nl6n: L6N\\nnonce: NONCE\\nscope: email+publicKey\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 91\n    },\n    {\n      \"id\": \"6VaavfynVHFqaOHcJm68y\",\n      \"type\": \"text\",\n      \"x\": 1155.625,\n      \"y\": 1290.04296875,\n      \"width\": 297,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1531656010,\n      \"version\": 2395,\n      \"versionNonce\": 1533528662,\n      \"isDeleted\": false,\n      \"text\": \"- the location.origin of the dApp\\n- a random value supplied by fcl\\n- the special scopes the dApp wants \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"NoiopQQrQ6gA3gBnK8QEO\",\n      \"type\": \"diamond\",\n      \"x\": 826.49609375,\n      \"y\": 1331.916015625,\n      \"width\": 158.109375,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 212982614,\n      \"version\": 1492,\n      \"versionNonce\": 605161866,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"VSakes544b46aPuOgA12w\",\n      \"type\": \"text\",\n      \"x\": 845.65234375,\n      \"y\": 1350.134765625,\n      \"width\": 122,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 879537418,\n      \"version\": 813,\n      \"versionNonce\": 761283466,\n      \"isDeleted\": false,\n      \"text\": \"user\\nauthenticates\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"TQB93-jsxoUcL9GwaBlZ1\",\n      \"type\": \"arrow\",\n      \"x\": 825.63671875,\n      \"y\": 1377.748046875,\n      \"width\": 302.73828125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 92871114,\n      \"version\": 442,\n      \"versionNonce\": 629633162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -302.73828125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"SkzWVjyWaeBHWW38XqLMT\",\n      \"type\": \"text\",\n      \"x\": 558.888671875,\n      \"y\": 1392.056640625,\n      \"width\": 300,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1183170518,\n      \"version\": 3074,\n      \"versionNonce\": 1994755286,\n      \"isDeleted\": false,\n      \"text\": \"JS/postMessage l6N\\n---\\ntype: \\\"FCL::CHALLENGE::RESPONSE\\\"\\naddr: FLOW_ADDRESS\\npaddr: PROVIDER_FLOW_ADDRESS\\ncode: CODE\\nexp: CODE_EXPIRES_AT\\nhks: HOOKS_URL\\nnonce: NONCE\\nl6n: L6N\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"25wzZQ-dBZxMxT8MW1Z-d\",\n      \"type\": \"text\",\n      \"x\": 868.22265625,\n      \"y\": 1427.90234375,\n      \"width\": 672,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1366848586,\n      \"version\": 3377,\n      \"versionNonce\": 2108085130,\n      \"isDeleted\": false,\n      \"text\": \"- fcl listens for this event type\\n- flow address of the user (used to fetch public hooks)\\n- flow address of the provider (used to fetch providers info)\\n- a token supplied when requesting the provider for private hooks\\n- when the code expires (epoch timestamp in the future)\\n- where to request the providers private hooks for the user\\n- the nonce provided by fcl at the start of the challenge\\n- the location.origin of the dApp (also provided by fcl at the start of the challenge)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"NXxTdsH-rCQCSFd5SbNvX\",\n      \"type\": \"arrow\",\n      \"x\": 1616.328125,\n      \"y\": 1159.81640625,\n      \"width\": 308.453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1011362634,\n      \"version\": 98,\n      \"versionNonce\": 62543126,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -308.453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnEjAi8iE7V1aahOopRXY\",\n      \"type\": \"arrow\",\n      \"x\": 1307.71484375,\n      \"y\": 1202.07421875,\n      \"width\": 316.8359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 954039370,\n      \"version\": 50,\n      \"versionNonce\": 144070166,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          316.8359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1ZVyii2hq0Wpqq8542uW9\",\n      \"type\": \"text\",\n      \"x\": 1318.5078125,\n      \"y\": 1172.37109375,\n      \"width\": 284,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1705453142,\n      \"version\": 174,\n      \"versionNonce\": 1058064970,\n      \"isDeleted\": false,\n      \"text\": \"fetch available providers from chain\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"X6HUR1_MrW9gTRgJGheAA\",\n      \"type\": \"arrow\",\n      \"x\": 523.095703125,\n      \"y\": 2420.91796875,\n      \"width\": 379.943359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1506760842,\n      \"version\": 1136,\n      \"versionNonce\": 94275030,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          379.943359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7PcbZK4cQREATn7XIHt_A\",\n      \"type\": \"text\",\n      \"x\": 525.306640625,\n      \"y\": 2425.44140625,\n      \"width\": 169,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1876413718,\n      \"version\": 1321,\n      \"versionNonce\": 232123018,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL\\n---\\ncode: CODE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"42lCsAd4TL61C2ZBEbmuC\",\n      \"type\": \"line\",\n      \"x\": 33.736328125,\n      \"y\": 1173.4833984375,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1664276234,\n      \"version\": 754,\n      \"versionNonce\": 934966614,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3WLQiIIioSPeHv0xMKLko\",\n      \"type\": \"text\",\n      \"x\": -173.546875,\n      \"y\": 1886.24609375,\n      \"width\": 280,\n      \"height\": 560,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 964205782,\n      \"version\": 4104,\n      \"versionNonce\": 1022153674,\n      \"isDeleted\": false,\n      \"text\": \"FCL should now have the pieces\\nit needs to fetch both the public\\nand private hooks.\\n\\nPublic hooks are stored on chain\\nin a resource owned by the flow\\naddress. They can also point out\\nto resources owned by the provider\\nallowing the provider to change\\nprovider specific detail as needed\\nand example of that is moving the\\nauthorization endpoint. SENSITIVE\\nDATA SHOULD NEVER BE PUT IN\\nA PUBLIC HOOK.\\n\\nPrivate hooks are provided by\\nthe provider. They include provider\\nspecific overrides to the public\\nhooks as well as the additional\\nscopes that were requested in\\nthe challenge.\\n\\nFCL will attempt to fetch both\\nprivate and public hooks, deep\\nmerge the private into the public\\nand then let any currentUser\\nsubscribers know there is some\\nnew data for them.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 554\n    },\n    {\n      \"id\": \"oByTwhCzigB059e9baKhZ\",\n      \"type\": \"arrow\",\n      \"x\": 524.0869140625,\n      \"y\": 1639.83203125,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1399244246,\n      \"version\": 1012,\n      \"versionNonce\": 894784022,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"bQl2f4HdK2Ezo1MVmCQs-\",\n      \"type\": \"text\",\n      \"x\": 525.6220703125,\n      \"y\": 1640.6640625,\n      \"width\": 216,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 263301770,\n      \"version\": 1277,\n      \"versionNonce\": 1310257610,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_HOOKS\\n---\\naddress: FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"OfQGmyTtgjme0SWUklR_a\",\n      \"type\": \"arrow\",\n      \"x\": 1293.146484375,\n      \"y\": 1722.36328125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210260886,\n      \"version\": 263,\n      \"versionNonce\": 210434070,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zlS_RGPXHJyxMTeGPbPaA\",\n      \"type\": \"text\",\n      \"x\": 556.822265625,\n      \"y\": 1727.609375,\n      \"width\": 338,\n      \"height\": 361,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 358067914,\n      \"version\": 4272,\n      \"versionNonce\": 895971274,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nauthorizations:\\n  - id: PROVIDER_AUTHORIZATION_ID\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"HTTP/POST\\\"\\n    endpoint: AUTHORIZATION_ENDPOINT\\n    data:\\n      id: PID\\n  - id: PROVIDER_AUTHORIZATION_ID_2\\n    addr: PROVIDER_FLOW_ADDRESS\\n    method: \\\"REMOTE\\\"\\n    data:\\n      id: PID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 357\n    },\n    {\n      \"id\": \"RpkmMqz9tdMWF-3_bw77s\",\n      \"type\": \"text\",\n      \"x\": 731.95703125,\n      \"y\": 1765.109375,\n      \"width\": 226,\n      \"height\": 100,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 253356234,\n      \"version\": 5160,\n      \"versionNonce\": 1711938006,\n      \"isDeleted\": false,\n      \"text\": \"- flow address for user\\n- preferred signing key\\n- public identity info\\n  - an optional name value\\n  - an optional avatar value\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 94\n    },\n    {\n      \"id\": \"2z30__NPjKNxvuE9Pyxmf\",\n      \"type\": \"text\",\n      \"x\": 916.23046875,\n      \"y\": 2017.57421875,\n      \"width\": 629,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231760906,\n      \"version\": 5822,\n      \"versionNonce\": 1146700234,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that points to a remote authorization\\nit will use the providers flow address and id that is supplied to do the look up\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wwWWue6mYk9yxli73gPmW\",\n      \"type\": \"line\",\n      \"x\": 901.21875,\n      \"y\": 1991.62890625,\n      \"width\": 0,\n      \"height\": 98.58984375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94038550,\n      \"version\": 363,\n      \"versionNonce\": 1292446730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          98.58984375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"egK8LT0KvLONRfcsgWWyx\",\n      \"type\": \"arrow\",\n      \"x\": 525.68017578125,\n      \"y\": 2181.4375,\n      \"width\": 767.9365234375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1321042966,\n      \"version\": 1094,\n      \"versionNonce\": 152448970,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          767.9365234375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"oi3nAccLri9ZoY-toeQbo\",\n      \"type\": \"text\",\n      \"x\": 529.15673828125,\n      \"y\": 2186.72265625,\n      \"width\": 281,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 685568074,\n      \"version\": 1382,\n      \"versionNonce\": 86931402,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/SCRIPT FETCH_PROVIDER\\n---\\naddress: PROVIDER_FLOW_ADDRESS\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"HM8bKmZ_6p8oTn3sLt9NW\",\n      \"type\": \"text\",\n      \"x\": 916.25,\n      \"y\": 1893.673828125,\n      \"width\": 547,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1139490582,\n      \"version\": 6267,\n      \"versionNonce\": 692740886,\n      \"isDeleted\": false,\n      \"text\": \"an public authorization hook that is controlled by users flow account\\nit can be overloaded by private hooks if the addr and id match.\\nOverloading should be avoided where possible as this authorization\\nstrategy could still be used by non-currentUser situations\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"HPG9r6GWIVU-MLDXRhR0c\",\n      \"type\": \"line\",\n      \"x\": 901.12109375,\n      \"y\": 1880.525390625,\n      \"width\": 0,\n      \"height\": 105.830078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 851207498,\n      \"version\": 554,\n      \"versionNonce\": 1201238218,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          105.830078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"s6PIfFtwf-7CX3o-PHI9l\",\n      \"type\": \"arrow\",\n      \"x\": 1291.263671875,\n      \"y\": 2257.9453125,\n      \"width\": 774.36328125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 631656074,\n      \"version\": 367,\n      \"versionNonce\": 17668362,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -774.36328125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"d-aTpJ55bJetrQsYzT-8o\",\n      \"type\": \"text\",\n      \"x\": 554.728515625,\n      \"y\": 2260.98828125,\n      \"width\": 253,\n      \"height\": 114,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 697513750,\n      \"version\": 4543,\n      \"versionNonce\": 1310176022,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE FETCH_HOOKS\\n---\\naddr: PROVIDER_FLOW_ADDRESS\\nname: PROVIDER_NAME\\nicon: PROVIDER_ICON\\nauthn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 110\n    },\n    {\n      \"id\": \"2_VuSBa3bFRM7KYWRfqpK\",\n      \"type\": \"line\",\n      \"x\": 508.91796875,\n      \"y\": 1644.27734375,\n      \"width\": 154.62109375,\n      \"height\": 311.0625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 441658570,\n      \"version\": 350,\n      \"versionNonce\": 389400074,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -154.62109375,\n          311.0625\n        ]\n      ],\n      \"lastCommittedPoint\": [\n        -157.6171875,\n        295.58984375\n      ]\n    },\n    {\n      \"id\": \"5ME55bvkr9r1r5Zqo7QMP\",\n      \"type\": \"line\",\n      \"x\": 350.4609375,\n      \"y\": 2023.38671875,\n      \"width\": 162.4765625,\n      \"height\": 160.96875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 442543050,\n      \"version\": 54,\n      \"versionNonce\": 1075938122,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          162.4765625,\n          160.96875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jT1SAtxFHgoSlX-HSjGb3\",\n      \"type\": \"line\",\n      \"x\": 349.04296875,\n      \"y\": 2091.76953125,\n      \"width\": 165.9921875,\n      \"height\": 330.19921875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 677853206,\n      \"version\": 165,\n      \"versionNonce\": 1014681046,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          165.9921875,\n          330.19921875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"lnpb7wSSUK_sV4qXlPQVt\",\n      \"type\": \"text\",\n      \"x\": 270.62109375,\n      \"y\": 2018.0078125,\n      \"width\": 126,\n      \"height\": 20,\n      \"angle\": 4.71238898038469,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 843163990,\n      \"version\": 190,\n      \"versionNonce\": 599478794,\n      \"isDeleted\": false,\n      \"text\": \"Done in parallel\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"msGB2E2TZJGP7TkawkmAf\",\n      \"type\": \"arrow\",\n      \"x\": 900.84765625,\n      \"y\": 2509.64453125,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1210719318,\n      \"version\": 490,\n      \"versionNonce\": 16187478,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"-VVQYfd22ZmqYqXRLxXEm\",\n      \"type\": \"text\",\n      \"x\": 554.970703125,\n      \"y\": 2514.1875,\n      \"width\": 272,\n      \"height\": 304,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1012202506,\n      \"version\": 5187,\n      \"versionNonce\": 1530171926,\n      \"isDeleted\": false,\n      \"text\": \"HTTP/GET HOOKS_URL RESPONSE\\n---\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\\n  authn: AUTHENTICATION_URL\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 300\n    },\n    {\n      \"id\": \"OnbDFeHN4fQhUjlz_WLfY\",\n      \"type\": \"text\",\n      \"x\": 731.4140625,\n      \"y\": 2549.73046875,\n      \"width\": 680,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2121614090,\n      \"version\": 7076,\n      \"versionNonce\": 292326282,\n      \"isDeleted\": false,\n      \"text\": \"- Users Flow Address\\n- overloading the preferred signing key\\n- private identity info (will overload public info)\\n  in this case the data is the same\\n  if it was omitted fcl will use the public info if its there\\n- the requested scoped data\\n  - user decided to send the email\\n  - but also decided to NOT send the publicKey (reminder that everything is optional)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"2N9s2KDB46jGhu9W9zxZ5\",\n      \"type\": \"text\",\n      \"x\": 835.90234375,\n      \"y\": 2722.09375,\n      \"width\": 414,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1232014154,\n      \"version\": 7368,\n      \"versionNonce\": 1966205206,\n      \"isDeleted\": false,\n      \"text\": \"- flow address of provider (used in composite id)\\n- id controlled by the provider (used in composite id)\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"SUbm9_A_s1r_jH2PsAK_i\",\n      \"type\": \"line\",\n      \"x\": 120.42578125,\n      \"y\": 1632.94189453125,\n      \"width\": 0,\n      \"height\": 1330.13232421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1251139734,\n      \"version\": 1260,\n      \"versionNonce\": 719119498,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1330.13232421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zts7CpbK3b8hN6Lf_L4NX\",\n      \"type\": \"line\",\n      \"x\": 33.37109375,\n      \"y\": 2168.4453125,\n      \"width\": 82.9140625,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1021861962,\n      \"version\": 883,\n      \"versionNonce\": 504499158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          82.9140625,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6-8TIlr57ixKs6Sj3Voqe\",\n      \"type\": \"text\",\n      \"x\": 110.08984375,\n      \"y\": 92.10546875,\n      \"width\": 1183,\n      \"height\": 45,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1019216458,\n      \"version\": 772,\n      \"versionNonce\": 2018618070,\n      \"isDeleted\": false,\n      \"text\": \"Flow Client Library - Remote Async Authentication & Authorization\",\n      \"font\": \"36px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 32\n    },\n    {\n      \"id\": \"p424mWR_hsD0j4YBnrCVw\",\n      \"type\": \"text\",\n      \"x\": 110.375,\n      \"y\": 137.62109375,\n      \"width\": 303,\n      \"height\": 50,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1331610518,\n      \"version\": 428,\n      \"versionNonce\": 789812618,\n      \"isDeleted\": false,\n      \"text\": \"Last Updated: April 17th 2020\\nVersion: 3\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 43\n    },\n    {\n      \"id\": \"qF5Aeoa9iYz0RqCATeZEH\",\n      \"type\": \"text\",\n      \"x\": 1738.421875,\n      \"y\": 288.890625,\n      \"width\": 176,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2000233674,\n      \"version\": 424,\n      \"versionNonce\": 186896022,\n      \"isDeleted\": false,\n      \"text\": \"Setup/Config\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"SwAuz72dvcZhh4zIV1V_W\",\n      \"type\": \"line\",\n      \"x\": 1826.83984375,\n      \"y\": 1178.0390625,\n      \"width\": 0,\n      \"height\": 436.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 2110378634,\n      \"version\": 1335,\n      \"versionNonce\": 289846422,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          436.82421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Pr75G8We8YRy0Yi_gYH0l\",\n      \"type\": \"text\",\n      \"x\": 1759.25,\n      \"y\": 1681.26171875,\n      \"width\": 132,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1327777994,\n      \"version\": 1007,\n      \"versionNonce\": 320669642,\n      \"isDeleted\": false,\n      \"text\": \"Collection\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"PVT9D64GjjaP2ucRTUfLs\",\n      \"type\": \"line\",\n      \"x\": 1826.046875,\n      \"y\": 1770.51171875,\n      \"width\": 0,\n      \"height\": 1215.11328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1522073814,\n      \"version\": 2352,\n      \"versionNonce\": 2129637846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1215.11328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"jvYGx-4d-NipQ0Bpnu05q\",\n      \"type\": \"arrow\",\n      \"x\": 508.783203125,\n      \"y\": 2558.3984375,\n      \"width\": 374.96484375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 616907798,\n      \"version\": 440,\n      \"versionNonce\": 88690262,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -374.96484375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IZXf_z8RKv6FuMhkvkXNf\",\n      \"type\": \"text\",\n      \"x\": 170.095703125,\n      \"y\": 2563.9375,\n      \"width\": 272,\n      \"height\": 323,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1748054090,\n      \"version\": 2404,\n      \"versionNonce\": 1955554902,\n      \"isDeleted\": false,\n      \"text\": \"SUBSCRIPTION currentUser\\n---\\naddr: FLOW_ADDRESS\\ncid: COMPOSITE_ID\\nloggedIn: true\\nverified: true\\nidentity:\\n  name: NAME\\n  avatar: AVATAR\\nscoped:\\n  email: EMAIL\\n  publicKey: null\\nprovider:\\n  addr: PROVIDER_FLOW_ADDRESS\\n  pid: PID\\n  name: PROVIDER_NAME\\n  icon: PROVIDER_ICON\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 319\n    },\n    {\n      \"id\": \"waRSRXDeKvd5f6JPg0G6E\",\n      \"type\": \"diamond\",\n      \"x\": 56.0546875,\n      \"y\": 3013.853515625,\n      \"width\": 138.90625,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1556613014,\n      \"version\": 1054,\n      \"versionNonce\": 1451302358,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"paxn_sWovWBSehdKXh9Yq\",\n      \"type\": \"text\",\n      \"x\": 75.44140625,\n      \"y\": 3035.978515625,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 961438922,\n      \"version\": 526,\n      \"versionNonce\": 604557962,\n      \"isDeleted\": false,\n      \"text\": \"TRIGGER\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hrSSY4HIR0R4f4pjnZxdq\",\n      \"type\": \"arrow\",\n      \"x\": 195.189453125,\n      \"y\": 3058.953125,\n      \"width\": 315.79296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 94461718,\n      \"version\": 622,\n      \"versionNonce\": 1200903050,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          315.79296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"6_zL8bXZ7lEK83iY4swSO\",\n      \"type\": \"text\",\n      \"x\": 188.287109375,\n      \"y\": 3066.16796875,\n      \"width\": 525,\n      \"height\": 228,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 653804874,\n      \"version\": 1965,\n      \"versionNonce\": 1765016086,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([\\n  vtx.TRANSFER_FLOW_TOKENS,\\n  sdk.params([\\n    sdk.param(AMOUNT, t.UFix64),\\n    sdk.param(TO_ADDRESS, t.Address)\\n  ]),\\n  sdk.proposer(fcl.currentUser().proposerAuthorization),\\n  sdk.payer(fcl.currentUser().payerAuthorization),\\n  sdk.authorizations([\\n    fcl.currentUser().authorization\\n  ])\\n])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 224\n    },\n    {\n      \"id\": \"huhsom-5KjKGKdIYDMOqy\",\n      \"type\": \"text\",\n      \"x\": 718.8828125,\n      \"y\": 3180.875,\n      \"width\": 300,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 868467722,\n      \"version\": 7984,\n      \"versionNonce\": 141727690,\n      \"isDeleted\": false,\n      \"text\": \"- who is proposing the transaction\\n- who is paying for the transaction\\n- who are authorizing the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"EZpsNzOMm6AF6ard6rzL9\",\n      \"type\": \"text\",\n      \"x\": 455.97265625,\n      \"y\": 3083.23828125,\n      \"width\": 297,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 771410058,\n      \"version\": 8237,\n      \"versionNonce\": 1499597386,\n      \"isDeleted\": false,\n      \"text\": \"- a verified/provable transaction\\n- params to pass to the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"zIfBGvs5LZkn3wLsdHnBD\",\n      \"type\": \"arrow\",\n      \"x\": 518.708984375,\n      \"y\": 3285.18359375,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1573066122,\n      \"version\": 784,\n      \"versionNonce\": 1662081558,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"QeOvoAeQuTwqV9BaVr0RY\",\n      \"type\": \"text\",\n      \"x\": 523.40625,\n      \"y\": 3287.86328125,\n      \"width\": 272,\n      \"height\": 190,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1929637910,\n      \"version\": 2844,\n      \"versionNonce\": 469574922,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization\\n---\\npayload: PAYLOAD\\naddr: FLOW_ADDRESS\\nkeyId: KEY_ID_2\\nrole:\\n  - proposer\\n  - payer\\n  - authorizer\\ninteraction: INTERACTION_DATA\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 186\n    },\n    {\n      \"id\": \"m-dBP7WUdYjECj9H_N-Lw\",\n      \"type\": \"text\",\n      \"x\": 702.2421875,\n      \"y\": 3323.265625,\n      \"width\": 215,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 566844874,\n      \"version\": 8350,\n      \"versionNonce\": 2015418326,\n      \"isDeleted\": false,\n      \"text\": \"- what needs to be signed\\n- flow address to sign with\\n- preferred signing key\\n- roles to be signing as\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"uFmYk6gAWEzV926It2dyS\",\n      \"type\": \"text\",\n      \"x\": 803.859375,\n      \"y\": 3457.97265625,\n      \"width\": 406,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 963183382,\n      \"version\": 9206,\n      \"versionNonce\": 2061418122,\n      \"isDeleted\": false,\n      \"text\": \"- data that can be used to recreate the payload\\n  so it can be verified. It should have everything\\n  about the transaction so the provider could also\\n  use that data in here to give the user a better\\n  experience when they go to approve/decline the\\n  transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"VkMECX5n8ypX3ZzyzSoiY\",\n      \"type\": \"arrow\",\n      \"x\": 902.3193359375,\n      \"y\": 3588.53515625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1725344714,\n      \"version\": 556,\n      \"versionNonce\": 1331222230,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"fTfdefywWKAJLExOheTvm\",\n      \"type\": \"text\",\n      \"x\": 554.4619140625,\n      \"y\": 3591.27734375,\n      \"width\": 413,\n      \"height\": 380,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 403852758,\n      \"version\": 6211,\n      \"versionNonce\": 1875251478,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorization RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\\nlocal:\\n  - method: \\\"BROWSER/IFRAME\\\"\\n    endpoint: LOCAL_IFRAME_ENDPOINT\\n    width: WIDTH\\n    height: HEIGHT\\n    background: BG_COLOR\\n  - method: \\\"BROWSER/EXTENSION\\\"\\n    eventType: PROVIDER_EXTENSION_EVENT_TYPE\\n    data: DATA_TO_SEND_EXTENSION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 376\n    },\n    {\n      \"id\": \"dnULn5eXCu25FbJ5ADvgb\",\n      \"type\": \"arrow\",\n      \"x\": 520.8291015625,\n      \"y\": 3998.94921875,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 782169098,\n      \"version\": 936,\n      \"versionNonce\": 318209162,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aXHKmUTpcXq-KXd22YVHZ\",\n      \"type\": \"text\",\n      \"x\": 523.3154296875,\n      \"y\": 4006.41015625,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1174514070,\n      \"version\": 3106,\n      \"versionNonce\": 796185162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"Qt5oM_exd-ilHtenCfsx1\",\n      \"type\": \"arrow\",\n      \"x\": 899.611328125,\n      \"y\": 4085.2265625,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1781753622,\n      \"version\": 639,\n      \"versionNonce\": 1286590294,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"HkOFxXHDQ51b1hvi6qcyX\",\n      \"type\": \"text\",\n      \"x\": 555.01171875,\n      \"y\": 4090.125,\n      \"width\": 319,\n      \"height\": 209,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 308985162,\n      \"version\": 6371,\n      \"versionNonce\": 1920465162,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: PENDING\\ncompositeSignature:\\n  addr: null\\n  keyId: null\\n  signature: null\\nauthorizationUpdates:\\n  method: \\\"HTTP/GET\\\"\\n  endpoint: AUTHZ_INFO_URL\\n  data: { aid: AUTHORIZATION_ID }\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 205\n    },\n    {\n      \"id\": \"3INOWYSzlw6A2i5ZFLpWE\",\n      \"type\": \"arrow\",\n      \"x\": 523.39208984375,\n      \"y\": 4318.509765625,\n      \"width\": 382.380859375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1575886678,\n      \"version\": 1069,\n      \"versionNonce\": 892796950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          382.380859375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1GaZCC06LIykjWF8msHrO\",\n      \"type\": \"text\",\n      \"x\": 526.07763671875,\n      \"y\": 4325.970703125,\n      \"width\": 234,\n      \"height\": 57,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1460054282,\n      \"version\": 3239,\n      \"versionNonce\": 499725386,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates\\n---\\naid: AUTHORIZATION_ID\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 53\n    },\n    {\n      \"id\": \"rJdS3rSR6xZz3q3K8_obb\",\n      \"type\": \"arrow\",\n      \"x\": 902.37353515625,\n      \"y\": 4404.787109375,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 14402710,\n      \"version\": 772,\n      \"versionNonce\": 1707773270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VeXvW_CPgoYJy_zq6RVC6\",\n      \"type\": \"text\",\n      \"x\": 557.45361328125,\n      \"y\": 4407.943359375,\n      \"width\": 319,\n      \"height\": 133,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1595996106,\n      \"version\": 6605,\n      \"versionNonce\": 1537513802,\n      \"isDeleted\": false,\n      \"text\": \"HOOK authorizationUpdates RESPONSE\\n---\\nstatus: APPROVED\\ncompositeSignature:\\n  addr: FLOW_ADDRESS\\n  keyId: KEY_ID_2\\n  signature: SIGNATURE\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 129\n    },\n    {\n      \"id\": \"Sd2FuAqCDzEl9_UVKxCdu\",\n      \"type\": \"text\",\n      \"x\": 741.82421875,\n      \"y\": 3627.671875,\n      \"width\": 256,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 664875030,\n      \"version\": 8575,\n      \"versionNonce\": 1250821334,\n      \"isDeleted\": false,\n      \"text\": \"- the status of the transaction\\n- an empty composite signature \",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"hM2bEW5KNVxetY6j53I3-\",\n      \"type\": \"text\",\n      \"x\": 763.0625,\n      \"y\": 3723.57421875,\n      \"width\": 421,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1231038090,\n      \"version\": 8746,\n      \"versionNonce\": 244451670,\n      \"isDeleted\": false,\n      \"text\": \"- where and how to get updates for the transaction\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"fNHFI8o8oO5yAGFPaxe5s\",\n      \"type\": \"text\",\n      \"x\": 860,\n      \"y\": 3798.71484375,\n      \"width\": 760,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 610817162,\n      \"version\": 9131,\n      \"versionNonce\": 414310218,\n      \"isDeleted\": false,\n      \"text\": \"- lets FCL know if there are local ways of letting the user authorize from their current device\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"tfACerMEHudHalqtkDVxw\",\n      \"type\": \"text\",\n      \"x\": 916.138671875,\n      \"y\": 3836.7060546875,\n      \"width\": 366,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1720766870,\n      \"version\": 6618,\n      \"versionNonce\": 596298954,\n      \"isDeleted\": false,\n      \"text\": \"FCL will render an iframe showing the endpoint\\nthe iframe will be rendered with the supplied\\nwidth, height and background color\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"lEAUSNRbeExIAbUFoi457\",\n      \"type\": \"line\",\n      \"x\": 898.724609375,\n      \"y\": 3819.2880859375,\n      \"width\": 0,\n      \"height\": 92.2431640625,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 617560778,\n      \"version\": 810,\n      \"versionNonce\": 687063446,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          92.2431640625\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VMWNVeWbavakv7ZbvBDZ4\",\n      \"type\": \"text\",\n      \"x\": 986.568359375,\n      \"y\": 3938.26123046875,\n      \"width\": 373,\n      \"height\": 20,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1532948950,\n      \"version\": 6925,\n      \"versionNonce\": 1496202634,\n      \"isDeleted\": false,\n      \"text\": \"FCL will send an event to a browser extension\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 14\n    },\n    {\n      \"id\": \"SNdO8VWRuFZGJFHu1jM1s\",\n      \"type\": \"line\",\n      \"x\": 975.658203125,\n      \"y\": 3912.92529296875,\n      \"width\": 0,\n      \"height\": 70.04736328125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1134706314,\n      \"version\": 1016,\n      \"versionNonce\": 1539103638,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          70.04736328125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"U-EEL_3O6Lsxb7mROH8Pr\",\n      \"type\": \"line\",\n      \"x\": 548.703125,\n      \"y\": 3801.44091796875,\n      \"width\": 0,\n      \"height\": 168.72705078125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 237420362,\n      \"version\": 1079,\n      \"versionNonce\": 1922915862,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          168.72705078125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"VRe96xT0_1RxtHTMIyi62\",\n      \"type\": \"text\",\n      \"x\": 346.95703125,\n      \"y\": 3819.34375,\n      \"width\": 195,\n      \"height\": 140,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1235761750,\n      \"version\": 7272,\n      \"versionNonce\": 1943726230,\n      \"isDeleted\": false,\n      \"text\": \"These will only happen\\nfor the currentUser, but\\nthe provider should still\\nmake sure that the user\\nis authenticated before\\nshowing any possibly\\nsensitive information\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 134\n    },\n    {\n      \"id\": \"58mykrKHV9EaCFvmLqX9I\",\n      \"type\": \"text\",\n      \"x\": 913.681640625,\n      \"y\": 4180.76904296875,\n      \"width\": 302,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 291843082,\n      \"version\": 7021,\n      \"versionNonce\": 506427606,\n      \"isDeleted\": false,\n      \"text\": \"The same as the above authorization\\nresponse but sans the local info\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"wJIW4AG-R71Cq1nvCREvC\",\n      \"type\": \"line\",\n      \"x\": 901.482421875,\n      \"y\": 4120.62060546875,\n      \"width\": 0,\n      \"height\": 184.09423828125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 64680342,\n      \"version\": 1105,\n      \"versionNonce\": 1179937866,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          184.09423828125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"1_bAu7XiS5YNkJzGVFz-P\",\n      \"type\": \"text\",\n      \"x\": 213,\n      \"y\": 4136.0703125,\n      \"width\": 249,\n      \"height\": 120,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 530454218,\n      \"version\": 7482,\n      \"versionNonce\": 1808024342,\n      \"isDeleted\": false,\n      \"text\": \"FCL will continue to request\\nauthorizationUpdates until\\nthe response no longer returns\\nan authorizationUpdates hook\\nor the status is APPROVED or\\nREFUSED\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 114\n    },\n    {\n      \"id\": \"19wWD272ASOGmsbjs-59d\",\n      \"type\": \"line\",\n      \"x\": 443.7265625,\n      \"y\": 4170.546875,\n      \"width\": 65.46484375,\n      \"height\": 129.7421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1153278166,\n      \"version\": 109,\n      \"versionNonce\": 2074859210,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          65.46484375,\n          -129.7421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"FP82AskFm3Lh1tPvv1lq9\",\n      \"type\": \"line\",\n      \"x\": 450.05859375,\n      \"y\": 4240.8671875,\n      \"width\": 61.82421875,\n      \"height\": 113.42578125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 199143626,\n      \"version\": 255,\n      \"versionNonce\": 292145110,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          61.82421875,\n          113.42578125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"t_6ydp1uC_v23r855FNXE\",\n      \"type\": \"arrow\",\n      \"x\": 525.6611328125,\n      \"y\": 4585,\n      \"width\": 761.1201171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 179347786,\n      \"version\": 1329,\n      \"versionNonce\": 526737418,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          761.1201171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"us3PQTgK_fN8w5Nk4IhG_\",\n      \"type\": \"text\",\n      \"x\": 565.6875,\n      \"y\": 4590.29296875,\n      \"width\": 319,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 2127509142,\n      \"version\": 1722,\n      \"versionNonce\": 2040934282,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/TRANSACTION submitTransaction\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"GfjjxVGNRF0p99UbfDZjq\",\n      \"type\": \"arrow\",\n      \"x\": 1286.1953125,\n      \"y\": 4646.7734375,\n      \"width\": 760.6982421875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1092171862,\n      \"version\": 975,\n      \"versionNonce\": 53636950,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -760.6982421875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pW8AlxjpdNg5jWX_4n0dM\",\n      \"type\": \"text\",\n      \"x\": 567.89453125,\n      \"y\": 4653.734375,\n      \"width\": 300,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 432772490,\n      \"version\": 1993,\n      \"versionNonce\": 933974614,\n      \"isDeleted\": false,\n      \"text\": \"FLOW/RESPONSE submitTransaction \",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"pKKtykoGvufR7ERvt-eTi\",\n      \"type\": \"arrow\",\n      \"x\": 512.6123046875,\n      \"y\": 4647.16796875,\n      \"width\": 379.458984375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1779519574,\n      \"version\": 863,\n      \"versionNonce\": 964619158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -379.458984375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Ap9Cyn92PMXlJBo3aPhoP\",\n      \"type\": \"text\",\n      \"x\": 160.5078125,\n      \"y\": 4652.4609375,\n      \"width\": 356,\n      \"height\": 19,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1261986506,\n      \"version\": 2126,\n      \"versionNonce\": 2067928278,\n      \"isDeleted\": false,\n      \"text\": \"const response = await fcl.send([...])\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 15\n    },\n    {\n      \"id\": \"u-UfsHkkQadRF6SCVyVx1\",\n      \"type\": \"arrow\",\n      \"x\": 136.68359375,\n      \"y\": 4710.556640625,\n      \"width\": 377.4296875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1607577482,\n      \"version\": 823,\n      \"versionNonce\": 836980298,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          377.4296875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"3F1bHxsqx2nTNCPGB-6NI\",\n      \"type\": \"text\",\n      \"x\": 140.59375,\n      \"y\": 4715.869140625,\n      \"width\": 234,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#862e9c\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 51013142,\n      \"version\": 2270,\n      \"versionNonce\": 451491158,\n      \"isDeleted\": false,\n      \"text\": \"fcl.transaction(response)\\n   .subscribe(callback)\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"-UaYdX-OEaS5wVMrwN5xR\",\n      \"type\": \"text\",\n      \"x\": 1744.84375,\n      \"y\": 3064.501953125,\n      \"width\": 162,\n      \"height\": 35,\n      \"angle\": 1.5707963267948966,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 338788298,\n      \"version\": 1205,\n      \"versionNonce\": 1853718154,\n      \"isDeleted\": false,\n      \"text\": \"Transaction\",\n      \"font\": \"28px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 25\n    },\n    {\n      \"id\": \"LuFDPJCxj7GY2koIvvpQY\",\n      \"type\": \"line\",\n      \"x\": 1827.22265625,\n      \"y\": 3166.751953125,\n      \"width\": 0,\n      \"height\": 1603.451171875,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 561953238,\n      \"version\": 2787,\n      \"versionNonce\": 1627850518,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          1603.451171875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"0qPJx0BzT51VBvJZZbAtb\",\n      \"type\": \"line\",\n      \"x\": 1828.48046875,\n      \"y\": 1618.515625,\n      \"width\": 1701.3046875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1012736982,\n      \"version\": 218,\n      \"versionNonce\": 1545674058,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1701.3046875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"pb8U1YVZRiNyhtgwvxJoO\",\n      \"type\": \"line\",\n      \"x\": 1823.1328125,\n      \"y\": 2984.24609375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 1893180118,\n      \"version\": 393,\n      \"versionNonce\": 1208071254,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"9mq_YXv-6dfI7LCcLOoZk\",\n      \"type\": \"line\",\n      \"x\": 1825.71875,\n      \"y\": 4770.21484375,\n      \"width\": 1695.5,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 4,\n      \"roughness\": 1,\n      \"opacity\": 40,\n      \"seed\": 303631562,\n      \"version\": 488,\n      \"versionNonce\": 2036524042,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -1695.5,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"vKI1TN3W9zEYCqXspw6cd\",\n      \"type\": \"line\",\n      \"x\": 116.59765625,\n      \"y\": 3556.2403564453125,\n      \"width\": 0,\n      \"height\": 987.7479248046875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 561630986,\n      \"version\": 2591,\n      \"versionNonce\": 1883029270,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          987.7479248046875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"x_rOBERCd6TqS6QnIH9qV\",\n      \"type\": \"line\",\n      \"x\": 116.16015625,\n      \"y\": 4690.296875,\n      \"width\": 0,\n      \"height\": 76.2421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 406239574,\n      \"version\": 2817,\n      \"versionNonce\": 691342730,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          76.2421875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"zOwAE2N733ejewShvmEsl\",\n      \"type\": \"line\",\n      \"x\": 115.9921875,\n      \"y\": 4556.8359375,\n      \"width\": 0,\n      \"height\": 119.27734375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 315952906,\n      \"version\": 3005,\n      \"versionNonce\": 1280138506,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          119.27734375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"aDpvsyDq7LP1_OC4cpBxX\",\n      \"type\": \"text\",\n      \"x\": 458.748046875,\n      \"y\": 2862.462890625,\n      \"width\": 372,\n      \"height\": 40,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 385734090,\n      \"version\": 6220,\n      \"versionNonce\": 1866634186,\n      \"isDeleted\": false,\n      \"text\": \"A deep merge of the private currentUser data\\ninto the public currentUser data\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"h7Bs0gToLSbntCq0_kmTk\",\n      \"type\": \"line\",\n      \"x\": 452.544921875,\n      \"y\": 2604.6953125,\n      \"width\": 0,\n      \"height\": 292.771484375,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1087030230,\n      \"version\": 626,\n      \"versionNonce\": 48037846,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          292.771484375\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"toQyT3WzIMdRQiPm4x9M2\",\n      \"type\": \"text\",\n      \"x\": -219.69921875,\n      \"y\": 2983.08203125,\n      \"width\": 292,\n      \"height\": 240,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 331266710,\n      \"version\": 5459,\n      \"versionNonce\": 1436890454,\n      \"isDeleted\": false,\n      \"text\": \"When a transaction is initiated fcl\\nwill go through a process called\\nasynchronous decomposition. In short\\nit will try to make sure it has all\\nthe things it needs to have a high\\nprobability of submitting a successful\\ntransaction. As an example if there\\nisn't a currentUser but the\\ntransaction needs a currentUser, fcl\\nwill attempt to authenticate the\\nuser before the transaction needs\\nany of the currentUsers information.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 234\n    },\n    {\n      \"id\": \"x_lnq9l_uj6CvcgnVJgeJ\",\n      \"type\": \"line\",\n      \"x\": 18.23828125,\n      \"y\": 3134.0078125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 142857302,\n      \"version\": 1239,\n      \"versionNonce\": 821686986,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"b_B9QDbiNzXEojm8Ot3A6\",\n      \"type\": \"line\",\n      \"x\": 118.421875,\n      \"y\": 3302.0743408203125,\n      \"width\": 0,\n      \"height\": 241.8240966796875,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1749654346,\n      \"version\": 2215,\n      \"versionNonce\": 568597834,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          241.8240966796875\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"Co3Eq_HoZ3jX0sykDN2jl\",\n      \"type\": \"text\",\n      \"x\": -160.5390625,\n      \"y\": 3359.703125,\n      \"width\": 257,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 832108426,\n      \"version\": 5797,\n      \"versionNonce\": 1452595658,\n      \"isDeleted\": false,\n      \"text\": \"FCL will attempt to authorize\\nthe transaction with the various\\nauthorization hooks.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"3tVP74pUyHOCD2o9JmG9o\",\n      \"type\": \"line\",\n      \"x\": 18.845703125,\n      \"y\": 3408.4453125,\n      \"width\": 98.14453125,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 272878102,\n      \"version\": 1318,\n      \"versionNonce\": 1339264278,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          98.14453125,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"xlOhPrPEy7PRuivNrLRnv\",\n      \"type\": \"text\",\n      \"x\": -177.6328125,\n      \"y\": 3559.34375,\n      \"width\": 287,\n      \"height\": 520,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 190797386,\n      \"version\": 7155,\n      \"versionNonce\": 1392608586,\n      \"isDeleted\": false,\n      \"text\": \"FCL will timeout authorizations\\nfairly quickly if they don't respond\\nright away. This is because the\\nauthorization doesn't actually need\\nto happen with this request.\\nInstead what this request is doing\\nis supplying the provider with what\\nto sign, and then the provider sends\\nback the information required to\\ncreate a backchannel in which FCL\\ncan then request the results.\\n\\nThe provider can also supply some\\nlocal strategies that can give the\\nuser an in dApp authorization flow.\\nThese strategies can be things like\\nrendering an iframe or sending an\\nevent to a browser extension.\\n\\nBecause the actual response that\\nmatters for the authorization\\nhappens in a back channel we can\\nlock these local strategies down\\nas they really only act as a window\\ninto the providers authorization\\nuser experience.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 514\n    },\n    {\n      \"id\": \"NEX_J-rQLNq2wm5mbCd7c\",\n      \"type\": \"line\",\n      \"x\": 68.46875,\n      \"y\": 3788.57421875,\n      \"width\": 47.951171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 317150154,\n      \"version\": 1438,\n      \"versionNonce\": 987723158,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          47.951171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"JVb2QMCeDhYIHIb3lBAJ8\",\n      \"type\": \"line\",\n      \"x\": 1700.62890625,\n      \"y\": 3370.12890625,\n      \"width\": 0,\n      \"height\": 758.33203125,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 20,\n      \"seed\": 287421898,\n      \"version\": 3322,\n      \"versionNonce\": 1327943754,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          758.33203125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"T0FONKIugMmjyhBNPa1b2\",\n      \"type\": \"arrow\",\n      \"x\": 908.5869140625,\n      \"y\": 3392.4375,\n      \"width\": 783.2568359375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 62204694,\n      \"version\": 1042,\n      \"versionNonce\": 1425626198,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          783.2568359375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"RzUmFjJWM7eyvTR6uIWjl\",\n      \"type\": \"arrow\",\n      \"x\": 1694.3984375,\n      \"y\": 4106,\n      \"width\": 782.88671875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 302396822,\n      \"version\": 1558,\n      \"versionNonce\": 568895754,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -782.88671875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"IvLj82FximT02G1AK9jZ_\",\n      \"type\": \"diamond\",\n      \"x\": 1622.4375,\n      \"y\": 3971.888671875,\n      \"width\": 150.1953125,\n      \"height\": 93.82421875,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1415433814,\n      \"version\": 1295,\n      \"versionNonce\": 1640663126,\n      \"isDeleted\": false\n    },\n    {\n      \"id\": \"oXRPPSMK37VNWnLwkYuZP\",\n      \"type\": \"text\",\n      \"x\": 1647.4921875,\n      \"y\": 3995.099609375,\n      \"width\": 103,\n      \"height\": 38,\n      \"angle\": 0,\n      \"strokeColor\": \"#5f3dc4\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 65890826,\n      \"version\": 735,\n      \"versionNonce\": 2008735114,\n      \"isDeleted\": false,\n      \"text\": \"APPROVED\\nTRANSACTION\",\n      \"font\": \"16px Cascadia\",\n      \"textAlign\": \"center\",\n      \"baseline\": 34\n    },\n    {\n      \"id\": \"pmu2RB5R3JQnXZ20pKfb6\",\n      \"type\": \"text\",\n      \"x\": 1657.11328125,\n      \"y\": 3281.0546875,\n      \"width\": 83,\n      \"height\": 75,\n      \"angle\": 0,\n      \"strokeColor\": \"#000000\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1528973770,\n      \"version\": 654,\n      \"versionNonce\": 399838934,\n      \"isDeleted\": false,\n      \"text\": \"provider\\napproval\\nprocess\",\n      \"font\": \"20px Virgil\",\n      \"textAlign\": \"center\",\n      \"baseline\": 68\n    },\n    {\n      \"id\": \"jNThL9TEd_WZFS1q9bspt\",\n      \"type\": \"text\",\n      \"x\": 1474.6015625,\n      \"y\": 3224.20703125,\n      \"width\": 206,\n      \"height\": 160,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1793138506,\n      \"version\": 8513,\n      \"versionNonce\": 1450144202,\n      \"isDeleted\": false,\n      \"text\": \"These could be things like\\n- the providers mobile app\\n- a hardware device\\n- browser extension\\n- iframe\\n- text message\\n- providers website\\n- desktop application\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 154\n    },\n    {\n      \"id\": \"IF08tbolyi3Jhmflhqsew\",\n      \"type\": \"line\",\n      \"x\": 1645.6796875,\n      \"y\": 3292.703125,\n      \"width\": 0,\n      \"height\": 63.39501953125,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1043337802,\n      \"version\": 1030,\n      \"versionNonce\": 891123786,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          0,\n          63.39501953125\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"ljhLjuHekKgxFYwog8Fwn\",\n      \"type\": \"line\",\n      \"x\": 1645.95703125,\n      \"y\": 3325.228759765625,\n      \"width\": 29.6171875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ced4da\",\n      \"fillStyle\": \"cross-hatch\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 138692298,\n      \"version\": 1258,\n      \"versionNonce\": 1338804566,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          -29.6171875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"7wScteC3L1Oah6wsNyl8R\",\n      \"type\": \"text\",\n      \"x\": -179.7890625,\n      \"y\": 4584.96875,\n      \"width\": 285,\n      \"height\": 80,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1886238922,\n      \"version\": 7618,\n      \"versionNonce\": 286539338,\n      \"isDeleted\": false,\n      \"text\": \"Once FCL thinks it has everything\\nit needs, it will attempt to submit\\nthe transaction to the access node\\nreturning a Response\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 74\n    },\n    {\n      \"id\": \"Lt5zP-8-JtS3R8KXjCn_y\",\n      \"type\": \"line\",\n      \"x\": 97.60546875,\n      \"y\": 4618.953125,\n      \"width\": 17.7060546875,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 1566435478,\n      \"version\": 1705,\n      \"versionNonce\": 30330582,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          17.7060546875,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    },\n    {\n      \"id\": \"_hXtzS2Onepme0YJyWzLw\",\n      \"type\": \"text\",\n      \"x\": -149.98828125,\n      \"y\": 4704.33984375,\n      \"width\": 248,\n      \"height\": 60,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"transparent\",\n      \"fillStyle\": \"hachure\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 451638870,\n      \"version\": 7890,\n      \"versionNonce\": 1114224214,\n      \"isDeleted\": false,\n      \"text\": \"The response can be used to\\nsubscribe to the status of the\\ntransaction.\",\n      \"font\": \"16px Virgil\",\n      \"textAlign\": \"left\",\n      \"baseline\": 54\n    },\n    {\n      \"id\": \"XaIR2rfIdf4M2OpALv-I2\",\n      \"type\": \"line\",\n      \"x\": 28.1796875,\n      \"y\": 4755.40234375,\n      \"width\": 85.70849609375,\n      \"height\": 0,\n      \"angle\": 0,\n      \"strokeColor\": \"#e67700\",\n      \"backgroundColor\": \"#ffffff\",\n      \"fillStyle\": \"solid\",\n      \"strokeWidth\": 1,\n      \"roughness\": 1,\n      \"opacity\": 100,\n      \"seed\": 491140886,\n      \"version\": 1932,\n      \"versionNonce\": 1203742282,\n      \"isDeleted\": false,\n      \"points\": [\n        [\n          0,\n          0\n        ],\n        [\n          85.70849609375,\n          0\n        ]\n      ],\n      \"lastCommittedPoint\": null\n    }\n  ],\n  \"appState\": {\n    \"viewBackgroundColor\": \"#ffffff\"\n  }\n}"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/authorization-function.md",
    "content": "# Authorization Function\n\n## Overview\n\nAn Authorization Function is a function which enables the JS-SDK and FCL to know which Flow account fulfills which signatory role in a transaction and how to receive a signature on behalf of the supplied account.\n\n## How to Use an Authorization Function\n\nAn authorization function is a function that you may use in place of an authorization in the Flow JS-SDK and FCL. An authorization is a concept that is used when denoting a proposer, payer or authorizer for a transaction. An authorization can either be a data structure represenating an authorization, or a function which when called returns an authorization called an Authorization Function. In this document we discuss the latter.\n\nTo use an Authorization Function, you specify that Authorization Function as the authorization for a proposer, payer or authorizer for a transaction.\n\n> `fcl.currentUser().authorization` which is aliased to `fcl.authz` is itself an authorization function. It tells the underlying js-sdk the current users flow account will be used for the signatory role and supplies a signing function that enables the application to request a signature from the users wallet.\n\nExample 1:\n```javascript\nimport * as fcl from \"@onflow/fcl\"\n\nconst myAuthorizationFunction = ... // An Authorization Function\n\nconst response = fcl.send([\n    fcl.transaction`transaction() { prepare(acct: AuthAccount) {} execute { log(\"Hello, Flow!\") } }`,\n    fcl.proposer(myAuthorizationFunction),\n    fcl.payer(myAuthorizationFunction),\n    fcl.authorizers([ myAuthorizationFunction ])\n])\n```\n\nThe builder functions, `fcl.proposer`, `fcl.payer` and `fcl.authorizations` each consume the Authorization Function and set it as the resolve field on the internal Account object it creates.\n\nDuring the resolve phase of the Flow JS-SDK and FCL, when [`resolveAccounts`](https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/src/resolve/resolve.js#L22) is called, the resolve field on each internal Account object is called, which means each Authorization Function is called appropriately and the account is _resolved_ into the data structure the authorizationFunction returns. These accounts are then deduped based on the a mix of the `addr`, `keyId` and `tempId` so that only a single signature request happens per `address` `keyId` pair. When [`resolveSignatures`](https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/src/resolve/resolve.js#L25) is called the signing function for each `address` `keyId` pair is called returning a composite signature for each signatory role.\n\n## How to Create An Authorization Function\n\nFortunately, creating an Authorization Function is relatively straight forward.\n\nAn Authorization Function needs to be able to do at minimum two things.\n- Who will sign -- Know which account is going to sign and the keyId of the key it will use to sign\n- How they sign -- Know how to get a signature for the supplied account and key from the first piece.\n\nThe Authorization Function has a concept of an account. An account represent a possible signatory for the transaction, it includes the who is signing as well as the how it will be signed. The Authorization Function is passed an empty Account and needs to return an Account, your job when making an Authorization Function is mostly to fill in this Account with the information so that the account you want to sign things can.\n\nLets say we knew up front the account, keyId and had a function that could sign things.\n\n```javascript\nconst ADDRESS = \"0xba1132bc08f82fe2\"\nconst KEY_ID = 1 // this account on testnet has three keys, we want the one with an index of 1 (has a weight of 1000)\nconst sign = msg => { /* ... returns signature (for the key above) for supplied message ... */ }\n```\n\nOur Authorization Function becomes about filling things in:\n\nExample 2:\n```javascript\nconst authorizationFunction = async (account) => {\n  // authorization function need to return an account\n  return {\n    ...account, // bunch of defaults in here, we want to overload some of them though\n    tempId: `${ADDRESS}-${KEY_ID}`, // tempIds are more of an advanced topic, for 99% of the times where you know the address and keyId you will want it to be a unique string per that address and keyId\n    addr: ADDRESS, // the address of the signatory\n    keyId: Number(KEY_ID), // this is the keyId for the accounts registered key that will be used to sign, make extra sure this is a number and not a string\n    signingFunction: async signable => {\n      // Singing functions are passed a signable and need to return a composite signature\n      // signable.message is a hex string of what needs to be signed.\n      return {\n        addr: ADDRESS, // needs to be the same as the account.addr\n        keyId: Number(KEY_ID), // needs to be the same as account.keyId, once again make sure its a number and not a string\n        signature: sign(signable.message), // this needs to be a hex string of the signature, where signable.message is the hex value that needs to be signed\n      }\n    }\n  }\n}\n```\n\n## Async stuff\n\nBoth the Authorization Function, and the accounts Signing Function can be asynchronous. This means both of these functions can go and get the information needed elsewhere. Say each of your users had a `userId`. From this `userId` say you had an api call that could return the corresponding address and key that is needed for the Authorization Functions account. You could also have another endpoint that when posted the signable (includes what needs to be signed) and the `userId` it can return with the composite signature if your api decides its okay to sign (the signable has all sorts of info to help you decide). An authorization function that can do that could look something like this.\n\nExample 3:\n```javascript\nconst getAccount = (userId) => fetch(`/api/user/${userId}/account`).then(d => d.json())\nconst getSignature = (userId, signable) = fetch(`/api/user/${userId}/sign`, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\"},\n  body: JSON.stringify(signable),\n})\n\nfunction authz (userId) {\n  return async function authorizationFunction (account) {\n    const {addr, keyId} = await getAccount(userId)\n\n    return {\n       ...account,\n       tempId: `${addr}-${keyId}`,\n       addr: addr,\n       keyId: Number(keyId),\n       signingFunction: signable => {\n         return getSignature(userId, signable)\n       }\n    }\n  }\n}\n```\nThe above **Example 3** is the same as **Example 2**, but the information is gathered during the execution of the authorization function based on the supplied user id.\n\n## How to create a Signing Function\n\nCreating a signing function is also relatively simple!\n\nTo create a signing function you specify a function which consumes a payload and returns a signature data structure.\n\nExample 3:\n```javascript\nconst signingFunction = ({\n  message, // The encoded string which needs to be used to produce the signature.\n  addr, // The address of the Flow Account this signature is to be produced for.\n  keyId, // The keyId of the key which is to be used to produce the signature.\n  roles: {\n    proposer, // A Boolean representing if this signature to be produced for a proposer.\n    authorizer, // A Boolean representing if this signature to be produced for a authorizer.\n    payer, // A Boolean representing if this signature to be produced for a payer.\n  }, \n  voucher, // The raw transactions information, can be used to create the message for additional safety and lack of trust in the supplied message.\n}) => {\n  return {\n    addr, // The address of the Flow Account this signature was produced for.\n    keyId, // The keyId for which key was used to produce the signature.\n    signature: produceSignature(message) // The hex encoded string representing the signature of the message.\n  }\n}\n```\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/custodial.md",
    "content": "# Introduction\n\nA Wallet Provider handles Authentications and Authorizations. They play a very important role of being the place the users control their information and approve transactions.\n\nOne of FCLs core ideals is for the user to be in control of their data, a wallet provider is where many users will do just that.\n\nFCL has been built in a way that it doesn't need to know any intimate details about a wallet provider up front, they can be discovered when the users wishes to let the dapp know about them. This gives us a concept we have been calling Bring Your Own Identity.\n\n# Identity\n\nConceptually, FCL thinks of identity in two ways: Public and Private.\n\nPublic identity will be stored on chain as a resource, it will be publicly available to anyone that knows the Flow Address for the account.\n\nIn FCL getting a users public identity will be as easy as:\n\n```javascript\nimport {user} from \"@onflow/fcl\"\n\nconst identity = await user(flowAddress).snapshot()\n//       ^\n//       `------ The public identity for `flowAddress`\n\nconst unsub = user(flowAddress).subscribe(identity => console.log(identity))\n//                                           ^\n//                                           `------- The public identity for `flowAddress`\n```\n\nPrivate identity will be stored by the Wallet Provider, it will only be available to the currentUser.\n\nIn FCL getting the currentUsers identity will fetch both the public and the private identities, merging the private into the public.\n\nPrivate info needs to be requested via scopes before the challenge step, more on that later.\nWe highly recommend Wallet Providers let the user see what scopes are being requested, and decide what scopes to share with the dapp.\n\nConsumers of identities in FCL should always assume all data is optional, and should store as little as possible, FCL will make sure the users always see the latest.\n\n```javascript\nimport {config, currentUser, authenticate} from \"@onflow/fcl\"\n\nconfig.put(\"challenge.scope\", \"email\") // request the email scope\n\nconst unsub = currentUser().subscribe(identity => console.log(identity))\n//                                       ^\n//                                       `------- The private identity for the currentUser\n\nauthenticate() // trigger the challenge step (authenticate the user via a wallet provider)\n```\n\n# Identity Data\n\n- All information in Identities are optional and may not be there.\n- All values can be stored on chain, but most probably shouldn't be.\n\nWe would love to see Wallet Providers enable the user to control the following info publicly, sort of a public profile starter kit if you will.\n\nFCL will always publicly try to fetch these fields when asked for a users information and it will be up to the Wallet provider to make sure they are there and keep them up to date if the user wants to change them.\n\n- **`name`** -- A human readable name/alias/nym for a dapp users display name\n- **`avatar`** -- A fully qualified url to a smaller image used to visually represent the dapp user\n- **`cover`** -- A fully qualified url to a bigger image, could be used by the dapp for personalization\n- **`color`** -- A 6 character hex color, could be used by the dapp for personalization\n- **`bio`** -- A small amount of text that a user can use to express themselves\n\nIf we can give dapp developers a solid foundation of usable information that is in the direct control of the users from the very start, which we believe the above fields would do, our hopes are they can rely more on the chain and will need to store less in their own database.\n\nPrivate data on the other hand has more use cases than general data. It is pretty easy to imagine ordering something and needing information like contact details and where to ship something.\n\nEventually we would love to see that sort of thing handled completely on-chain, securely, privately and safely, but in the interim it probably means storing a copy of data in a database when its needed, and allowed by a user.\n\nThe process of a dapp receiving private data is as follows:\n\n1. The dapp requests the scopes they want up front `fcl.config().put(\"challenge.scope\", \"email+shippingAddress\")`.\n2. The User authenticates `fcl.authenticate()` and inside the Wallet Providers authentication process decides its okay for the dapp to know both the `email` and the `shippingAddress`. The User should be able to decide which information to share, if any at all.\n3. When the dapp needs the information they can request it from FCLs current cache of data, if it isnt there the dapp needs to be okay with that and adjust accordingly.\n\nBelow are the scopes we are thinking of supporting privately:\nFCL will only publicly and privately try to fetch these when specified up front by a dapp.\n\n- **`email`**\n- **`fullName`**\n- **`phone`**\n- **`textMessage`**\n- **`address`**\n- **`shippingAddress`**\n- **`location`**\n- **`publicKey`**\n\nAll of the above are still subject to change as it is still early days, we would like to work closely with Wallet Providers to produce a robust, detailed and consistent spec regarding scopes. Feedback and thoughts are always welcome.\n\n# Authentication Challenge\n\nAuthentication can happen one of two ways:\n\n- Iframe Flow\n- Redirection Flow\n\nAs a Wallet Provider you will be expected to register a URL endpoint (and some other information) with a handshake service (FCL will be launching with one in which registration happens on chain and is completely open source (Apache-2.0 lincense)).\nThis registered URL will be what is shown inside the iFrame or where the dapp users will be redirected.\nFor the remainder of this documentation we will refer to it as the _Authentication Endpoint_ and pair it with the `GET https://provider.com/flow/authentication` route.\n\nThe Authentication Endpoint will receive the following data as query params:\n\n- `l6n` _(required)_ -- location (origin) of dapp\n- `nonce` _(required)_ -- a random string supplied by the FCL\n- `scope` _(optional)_ -- the scopes requested by the dapp\n- `redirect` _(optional)_ -- where to redirect once the authentication challenge is complete\n\n```\nGET https://provider.com/flow/authenticate\n  ?l6n=https%3A%2F%2Fdapp.com\n  &nonce=asdfasdfasdf\n  &scope=email+shippingAddress\n  &redirect=https%3A%2F%2Fdapp.com%2Fflow%2Fcallback\n\nThe values will use javascripts `encodeURIComponent` function and scopes will be `+` delimited.\n```\n\nWe can tell that this challenge is using the Redirect Flow because of the inclusion of the redirect query param.\nThe Iframe Flow will still need to be supported as it will be the default flow for dapps.\n\nAt this point its on the Wallet Provider to do their magic and be confident enough that the user is who they say they are.\nThe user should then be shown in some form what the dapp is requesting via the scopes and allow them to opt in or out of anything they want.\nOnce the Wallet Provider is ready to hand back control to the dapp and FCL it needs to complete the challenge by redirecting or emitting a javascript `postMessage` event.\n\nRedirecting will look like this:\n\n```\nGET https://dapp.com/flow/callback         # supplied by the redirect query param above\n  ?l6n=https%3A%2F%2Fdapp.com              # the l6n supplied by FCL above\n  &nonce=asdfasdfasdf                      # the nonce supplied by FCL above\n  &addr=0xab4U9KMf                         # address for the users flow account (if available) -- will be used to fetch public identity information and hooks\n  &padder=0xhMgqTff86                      # address for the Wallet Providers account -- will be used to fetch provider information\n  &code=afseasdfsadf                       # a token supplied to FCL from the Wallet Provider, FCL will use this token when requesting private information and hooks, can be any url safe value\n  &exp=1650400809517                       # when the code expires, a value of `0` will be considered as never expires\n  &hks==https%3A%2F%2Fprovider.com%2Fhooks # a URL where FCL can request the private information and hooks\n```\n\nIframe will look like this:\n\n```javascript\nparent.postMessage(\n  {\n    type: \"FCL::CHALLENGE::RESPONSE\", // used by FCL to know what kind of message this is\n    addr: \"0xab4U9KMf\",\n    paddr: \"0xhMgqTff86\",\n    code: \"afseasdfsadf\",\n    exp: 1650400809517,\n    hks: \"https://provider.com/hooks\",\n    nonce: \"asdfasdfasdf\",\n    l6n: decodeURIComponent(l6n),\n  },\n  decodeURIComponent(l6n)\n)\n```\n\nFCL should now have everything it needs to collect the Public, Private and Wallet Provider Info.\nThe Wallet Provider info will be on chain so its not something that needs to be worried about here by the Wallet Provider.\nWhat does need to be worried about handling the hooks request which was supplied to FCL via the `hks` value in the challenge response `https://provider.hooks`.\n\nThe hooks request will be to the `hks` value supplied in the challenge response. The request will also include the code as a query param\n\n```\nGET https://povider.com/hooks\n  ?code=afseasdfsadf\n```\n\nThis request needs to happen for a number of reasons.\n\n- If it fails FCL knows something is wrong and will attempt to re-authenticate.\n- If is succeeds FCL knows that the code it has is valid.\n- It creates a direct way for FCL to \"verify\" the user against the Wallet Provider.\n- It gives FCL a direct way to get Private Identity Information and Hooks.\n- The code can be passed to the backend to create a back-channel between the backend and the Wallet Provider.\n\nWhen users return to a dapp, if the code FCL stored hasnt expired, FCL will make this request again in order to stay up to date with the latest information. FCL may also intermitently request this information before some critical actions.\n\nThe hooks request should respond with the following JSON\n\n```javascript\nconst privateHooks = {\n  addr: \"0xab4U9KMf\",       // the flow address this user is using for the dapp\n  keyId: 3,                 // the keyId the user wants to use when authorizing transaction\n  identity: {               // the identity information fcl always wants if its there, will be deep merged into public info\n    name: \"Bob the Builder\",\n    avatar: \"https://avatars.onflow.org/avatar/0xab4U9KMf.svg\"\n    cover: \"https://placekittens.com/g/900/300\",\n    color: \"cccc00\",\n    bio: \"\",\n  },\n  scoped: {                 // the private info request in the original challenge\n    email: \"bob@bob.bob\",   // the user said it was okay for the dapp to know the email\n    shippingAddress: null,  // the user said it was NOT okay for the dapp to know the shippingAddress\n  },\n  provider: {\n    addr: \"0xhMgqTff86\", // the flow address for the wallet provider (used in the identity composite id)\n    pid: 2345432,        // the wallet providers internal id for the user (used in the identity composite id)\n    name: \"Super Wallet\",\n    icon: \"https://provider.com/assets/icon.svg\",\n    authn: \"https://provider.com/flow/authenticate\",\n  }\n}\n```\n\nWhen FCL requested the Public info from the chain it is expecting something like this.\nIt will be on the Wallet Provider to keep this information up to date.\n\n```javascript\nconst publicHooks = {\n  addr: \"0xab4U9KMf\",\n  keyId: 2,\n  identity: {\n    name: \"Bob the Builder\",\n    avatar: \"https://avatars.onflow.org/avatar/0xab4U9KMf.svg\"\n    cover: \"https://placekittens.com/g/900/300\",\n    color: \"cccc00\",\n    bio: \"\",\n  },\n  authorizations: [\n    {\n      id: 345324539,\n      addr: \"0xhMgqTff86\",\n      method: \"HTTP/POST\",\n      endpoint: \"https://provider.com/flow/authorize\",\n      data: {\n        id: 2345432\n      }\n    }\n  ]\n}\n```\n\nAt this point FCL can be fairly confident who the currentUser is and is ready to initiate transactions the user can authorize.\n\n# Authorization\n\nFCL will broadcast authorization requests to the Public and Private authorization hooks it knows for a User, in a process we call Asynchronous Remote Signing.\n\nThe core concepts to this idea are:\n\n- Hooks tell FCL where to send authorization requests (Wallet Provider)\n- Wallet Provider responds immediately with:\n  - a back-channel where FCL can request the results of the authorization\n  - some optional local hooks ways the currentUser can authorize\n- FCL will trigger the local hooks if they are for the currentUser\n- FCL will poll the back-channel requesting updates until an approval or denial is given\n\nBelow is the public authorization hook we received during the challenge above.\n\n```javascript\n  {\n    id: 345324539,\n    addr: \"0xhMgqTff86\",\n    method: \"HTTP/POST\",\n    endpoint: \"https://provider.com/flow/authorize\",\n    data: {\n      id: 2345432\n    }\n  }\n```\n\nFCL will take that hook and do the following post request:\n\n```\nPOST https://provider.com/flow/authorize\n  ?id=2345432\n---\n{\n  message: \"...\",     // what needs to be signed (needs to be converted from hex to binary before signing)\n  addr: \"0xab4U9KMf\", // the flow address that needs to sign\n  keyId: 3,           // the flow account keyId for the private key that needs to sign\n  roles: {\n    proposer: true,   // this accounts sequence number will be used in the transaction\n    authorizer: true, // this transaction can \"move\" and \"modify\" the accounts resources directly\n    payer: true,      // this transaction will be paid for by this account (also signifies that they are signing an envelopeMessage instead of a payloadMessage)\n  },\n  interaction: {...}  // needed to recreate the message if the Wallet Provider wants to verify the message.\n}\n```\n\nFCL ise expecting something like this in response:\n\n```javascript\n{\n  status: \"PENDING\",\n  reason: null,\n  compositeSignature: null,\n  authorizationUpdates: {\n    method: \"HTTP/POST\",\n    endpoint: \"https://provider.com/flow/authorizations/4323\",\n  },\n  local: [\n    {\n      method: \"BROWSER/IFRAME\",\n      endpoint: \"https://provider.com/authorizations/4324\",\n      width: \"300\",\n      height: \"600\",\n      background: \"#ff0066\"\n    }\n  ]\n}\n```\n\nThat local hook will be consumed by FCL, rendering an iframe with the endpoint as the src. If the user is already authenticated this screen could show them the Wallet Providers transaction approval process directly.\nBecause FCL isnt relying on any communication to or from the Iframe it can lock it down as much as possible, and remove it once the authorization is complete.\nWhile displaying the local hook, it will request the status of the authorization from the `authorizationUpdates` hook.\n\n```\nPOST https://provider.com/flow/authorizations/4323\n```\n\nExpecting a response that has the same structure as the origin but without the local hooks:\n\n```javascript\n{\n  status: \"PENDING\",\n  reason: \"\",\n  compositeSignature: null,\n  authorizationUpdates: {\n    method: \"HTTP/POST\",\n    endpoint: \"https://provider.com/flow/authorizations/4323\",\n  },\n}\n```\n\nFCL will then follow the new `authorizationUpdates` hooks until the status changes to `\"APPROVED\"` or `\"DECLINED\"`.\nIf the authorization is declined it should include a reason if possible.\n\n```javascript\n{\n  status: \"DECLINED\",\n  reason: \"They said no\",\n}\n```\n\nIf the authorization is approved it should include a composite signature:\n\n```javascript\n{\n  status: \"APPROVED\",\n  compositeSignature: {\n    addr: \"0xab4U9KMf\", // the flow address that needs to sign\n    keyId: 3,           // the flow account keyId for the private key that needs to sign\n    signature: \"...\"    // binary signature of message encoded as hex\n  }\n}\n```\n\nFCl can now submit the transaction to the Flow blockchain.\n\n# TL;DR Wallet Provider\n\nRegister Provider with FCL Handshake and implement 5 Endpoints.\n\n- `GET flow/authenticate` -> `parent.postMessage(..., l6n)`\n- `GET flow/hooks?code=___` -> `{ ...identityAndHooks }`\n- `POST flow/authorize` -> `{ status, reason, compositeSignature, authorizationUpdates, local }`\n- `POST authorizations/:authorization_id`\n- `GET authorizations/:authorization_id`\n\n![diagram showing current fcl authn and authz flow](./assets/fcl-ars-auth-v3.2.png)\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/draft-v2.md",
    "content": "# Third Generation FCL Compatible Wallet Provider Docs\n\n## Status\n\n- **Last Updated:** Dec 1st 2020\n- **Stable:** Yes\n- **Risk of Breaking Change:** Medium\n- **Compatibility:** `>= @onflow/fcl@0.0.67`\n\nThis document is a rough draft and very much a work in progress, the concepts here are\nan extension and refinement on the Second Generation FCL Compatible Wallet Provider Docs.\nWe will try as hard as possible to not introduce any breaking changes for wallets that already exist.\n\n# Overview\n\nIn general one of the main goals of FCL is to create a system of back-channel communications\nbetween the applications and the service providers. The user should be able to initiate this\nback-channel via the application, discover their desired service and then verify the connection\nfrom the service. FCL aims to standardise the discovery and communications between these three\nparties (User, Application, Service).\n\n# Table of Contents\n\n- Overview\n- Discovery of Identity\n- Identity as Configuration\n- Key Services\n  - authn\n  - authz\n  - pre-authz\n  - back-channel-rpc\n  - frame\n- Service Methods\n  - HTTP/POST\n  - HTTP/RPC\n  - IFRAME/RPC\n- Responses\n  - Polling Response\n  - Composite Signature\n  - PreAuthzResponse\n\n# Discovery of Identity\n\nTODO: Write\n\n# Identity as Configuration\n\nTODO: Write\n\n# Key Services\n\nServices are abilities an account can perform. You can kind of think of them as\na function where its behaviour and input is defined by the service. The returned\nvalue will be dependant on the type of service it is.\n\n## `authn`\n\n> Not yet implemented\n\nReturns a `__TODO__` with a `__TODO__` as the data.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authn\",\n  uid: \"____\",\n  endpoint: \"https://____\",\n  id: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallets internal id for the user\n  identity: {\n    address: \"0x_____\", // users flow address\n  },\n  provider: {\n    address: \"0x______\", // providers flow address\n    name: \"Best Wallet\", // Name of wallet\n    icon: \"https://___\", // Img url for wallet logo\n    description: \"Description of the best wallet\",\n  },\n}\n```\n\n## `authz`\n\nReturns a `PollingResponse` with a `CompositeSignature` as the data.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authz\",\n  uid: \"____\",\n  endpoint: \"https://___\",\n  method: \"HTTP/POST\", // Service Methods: HTTP/POST | IFRAME/RPC | HTTP/RPC\n  identity: {\n    address: \"0x_________\",\n    keyId: 0\n  },\n  data: {},   // included in body of authz request\n  params: {}, // included as query params on endpoint url\n}\n```\n\n## `pre-authz`\n\nReturns a `PollingResponse` with a `PreAuthzResponse` as the data.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"pre-authz\",\n  uid: \"____\",\n  endpoint: \"https://___\",\n  method: \"HTTP/POST\", // Service Methods: HTTP/POST | IFRAME/RPC | HTTP/RPC\n  data: {},   // included in body of pre-authz request\n  params: {}, // included as query params on endpoint url\n}\n```\n\n## `back-channel-rpc`\n\nReturns a `PollingResponse` with an `inherited return value` as the data.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"back-channel-rpc\",\n  endpoint: \"https://___\",\n  method: \"HTTP/GET\", // HTTP/GET | HTTP/POST (these are actual http methods, not a service method)\n  data: {},   // included in body of back-channel-rpc request, if supplied method must be \"HTTP/POST\"\n  params: {}, // included as query params on endpoint url\n}\n```\n\n## `frame`\n\nReturns a `PollingResponse` with an `inherited return value` as the data.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"frame\",\n  endpoint: \"https://___\",\n  data: {},   // included in body of ready message\n  params: {}, // included as query params on endpoint url\n}\n```\n\n# Service Methods\n\n## `HTTP/POST`\n\n```\n           FCL                               ENDPOINT\n            |                                    |\n            |---[fetchService(service, body)]--->|\n            |                                    |\n            |<-[PollingResponse(PENDING)]--------|\n            |                                    |\n            ?-----[render(resp.local)]           |\n            |                                    |\n+-PENDING-->|-----[poll(resp.updates)]---------->|\n|           |                                    |\n+<----------+-------[PollingResponse]------------|\n|           |\n+-APPROVED->|-----[CONTINUE]\n|\n+-DECLINED--------[ERROR]\n```\n\n```javascript\n// Example of calling fetchService with an HTTP/POST Service to showcase endpoint/params/data\nasync function fetchService(service, body) {\n  return fetch(url(service.endpoint, service.params), {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({...body, data: service.data}),\n  }).then(d => d.json())\n} // REturns a PollingResonse Data Type\n```\n\n## `HTTP/RPC`\n\n> This is currently aliased to HTTP/POST, if you want this functionality return a PollingResponse that is either `APPROVED` or `DECLINED`.\n\n## `IFRAME/RPC`\n\n```\n        FCL\n         |\n         |----------------------------+-[frame(service, body)]--+\n         |                            |                         |\n         |                            |         ENDPOINT        |\n         |                            |            |            |\n         |<------[message(FCL:FRAME:READY)]--------|            |\n         |                            |            |            |\n         |----------[message(fcl:sign)]----------->|  // Will eventually be FCL:FRAME:RPC\n         |                            |            |            |\n         |<------[message(PollingResponse)]--------|            |\n         |                            |            |            |\n         |                            |                         |\n         |-----[CLOSE]--------------->+-------------------------+\n```\n\n```javascript\n// Example of calling frame(service, body) to showcase endpoint/params/data\nasync function frame(service, body) {\n  const [sendMessage, on] = renderFrame(url(service.endpoint, service.params))\n  on(\"FCL:FRAME:READY\", () => sendMessage({...body, data: service.data}))\n}\n```\n\n# Responses\n\n## `PollingResponse`\n\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"PENDING\", // PENDING | APPROVED | DECLINED\n  reason: null,      // if status is DECLINED this is a string that specifies why\n  data: null,        // if status is APPROVED this is the value FCL needs\n  updates: null,     // Optional `back-channel-rpc` Service (Required if status is PENDING)\n  local: null,       // Optional `frame` Service\n}\n```\n\n## `CompositeSignature`\n\n```javascript\n{\n  f_type: \"CompositeSignature\",\n  f_vsn: \"1.0.0\",\n  addr: \"____\", // Flow Address (sans-prefix)\n  keyId: 3,\n  signature: \"______\", // Signature as a hex string\n}\n```\n\n## `PreAuthzResponse`\n\n> If the same Flow Address/KeyId pair is used in multiple different roles, they will need to show up in the result once for each role.\n\n```javascript\n{\n  f_type: \"PreAuthzResponse\",\n  f_vsn: \"1.0.0\",\n  proposer: null,    // Singular Authz Service,\n  payer: [],         // Multiple Authz Services (for same Flow Address (different KeyId))\n  authorization: [], // Multiple Authz Services (for same Flow Address (different KeyId))\n}\n```\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/draft-v3.md",
    "content": "## Status\n\n- **Last Updated:** April 4th 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** Medium\n- **Compatibility:** `>= @onflow/fcl@1.0.0-alpha.0`\n\n## Definitions\n\nThis document is written with the perspective that _you_ who are reading this right now are an FCL Wallet Developer. All references to _you_ in this doc are done with this perspective in mind.\n\n# Overview\n\nFlow Client Library (FCL) approaches the idea of blockchain wallets on Flow in a different way than how wallets may be supported on other blockchains. For example, with FCL, a wallet is not necessarily limited to being a browser extension or even a native application on a users device. FCL offers wallet developers the flexibility and freedom to build many different types of applications. Since wallet applications can take on many forms, we needed to create a way for these varying applications to be able to communicate and work together.\n\nFCL acts in many ways as a protocol to facilitate communication and configuration between the different parties involved in a blockchain application. An _Application_ can use FCL to _authenticate_ users, and request _authorizations_ for transactions, as well as mutate and query the _Blockchain_. An application using FCL offers its _Users_ a way to connect and select any number of Wallet Providers and their Wallet Services. A selected _Wallet_ provides an Application's instance of FCL with configuration information about itself and its Wallet Services, allowing the _User_ and _Application_ to interact with them.\n\nIn the following paragraphs we'll explore ways in which you can integrate with FCL by providing implementations of various FCL services.\n\nThe following services will be covered:\n\n- Authentication (Authn) Service\n- Authorization (Authz) Service\n- User Signature Service\n- Pre-Authz Service\n\n# Service Methods\n\nFCL Services are your way as a Wallet Provider of configuring FCL with information about what your wallet can do. FCL uses what it calls `Service Methods` to perform your supported FCL services. Service Methods are the ways FCL can talk to your wallet. Your wallet gets to decide which of these service methods each of your supported services use to communicate with you.\n\nSometimes services just configure FCL and that's it. An example of this can be seen with the Authentication Service and the OpenID Service.\nWith those two services you are simply telling FCL \"here is a bunch of info about the current user\". (You will see that those two services both have a `method: \"DATA\"` field in them.\nCurrently these are the only two cases that can be a data service.)\n\nOther services can be a little more complex. For example, they might require a back and forth communication between FCL and the Service in question.\nUltimately we want to do this back and forth via a secure back-channel (https requests to servers), **but in some situations that isn't a viable option, so there is also a front-channel option**.\nWhere possible, you should aim to provide a back-channel support for services, and only fall back to a front-channel if absolutely necessary.\n\nBack-channel communications use `method: \"HTTP/POST\"`, while front-channel communications use `method: \"IFRAME/RPC\"`, `method: \"POP/RPC\"`, `method: \"TAB/RPC` and `method: \"EXT/RPC\"`.\n\n| Service Method | Front  |  Back |\n|----------------|--------|-------|\n| HTTP/POST      |   ⛔   |   ✅   |\n| IFRAME/RPC     |   ✅   |   ⛔   |\n| POP/RPC        |   ✅   |   ⛔   |\n| TAB/RPC        |   ✅   |   ⛔   |\n| EXT/RPC        |   ✅   |   ⛔   |\n\nIt's important to note that regardless of the method of communication, the data that is sent back and forth between the parties involved is the same.\n\n## IFRAME/RPC (Front Channel)\n\n`IFRAME/RPC` is the easiest to explain, so we will start with it:\n\n- An iframe is rendered (comes from the `endpoint` in the service).\n- The rendered iframe adds a listener and sends the `\"FCL:VIEW:READY\"` message. This can be simplified `WalletUtils.ready(callback)`\n- FCL will send the data to be dealt with:\n  - Where `body` is the stuff you care about, `params` and `data` are additional information you can provide in the service object.\n- The wallet sends back an `\"APPROVED\"` or `\"DECLINED\"` post message. (It will be a `f_type: \"PollingResponse\"`, which we will get to in a bit). This can be simplified using `WalletUtils.approve` and `WalletUtils.decline`\n  - If it's approved, the polling response's data field will need to be what FCL is expecting.\n  - If it's declined, the polling response's reason field should say why it was declined.\n\n```javascript\nexport const WalletUtils.approve = data => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    reason: null,\n    data: data,\n  })\n}\n\nexport const WalletUtils.decline = reason => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"DECLINED\",\n    reason: reason,\n    data: null,\n  })\n}\n```\n\n![IFRAME/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/iframe-rpc.png)\n\n### POP/RPC | TAB/RPC (Front Channel)\n\n`POP/RPC` and `TAB/RPC` work in an almost entirely similar way to `IFRAME/RPC`, except instead of rendering the `method` in an iframe, we render it in a popup or new tab. The same communication protocol between the rendered view and FCL applies.\n\n![POP/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/pop-rpc.png)\n\n![TAB/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/tab-rpc.png)\n\n### HTTP/POST (Back Channel)\n\n`HTTP/POST` initially sends a post request to the `endpoint` specified in the service, which should immediately return a `f_type: \"PollingResponse\"`.\n\nLike `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`, our goal is to eventually get an `APPROVED` or `DECLINED` polling response, and technically this endpoint could return one of those immediately.\n\nBut more than likely that isn't the case and it will be in a `PENDING` state (`PENDING` is not available to `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`).\nWhen the polling response is `PENDING` it requires an `updates` field that includes a service, `BackChannelRpc`, that FCL can use to request an updated `PollingResponse` from.\nFCL will use that `BackChannelRpc` to request a new `PollingResponse` which itself can be `APPROVED`, `DECLINED` or `PENDING`.\nIf it is `APPROVED` FCL will return, otherwise if it is `DECLINED` FCL will error. However, if it is `PENDING`, it will use the `BackChannelRpc` supplied in the new `PollingResponse` updates field. It will repeat this cycle until it is either `APPROVED` or `DECLINED`.\n\nThere is an additional optional feature that `HTTP/POST` enables in the first `PollingResponse` that is returned.\nThis optional feature is the ability for FCL to render an iframe, popup or new tab, and it can be triggered by supplying a service `type: \"VIEW/IFRAME\"`, `type: \"VIEW/POP\"` or `type: \"VIEW/TAB\"` and the `endpoint` that the wallet wishes to render in the `local` field of the `PollingResponse`. This is a great way for a wallet provider to switch to a webpage if displaying a UI is necessary for the service it is performing.\n\n![HTTP/POST Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/http-post.png)\n\n### EXT/RPC (Front Channel)\n\n`EXT/RPC` is used to enable and communicate between FCL and an installed (Chrome) browser extension. Usage of `EXT/RPC` is a bit more complex and relies on 3 key scripts to allow message passing between an installed extension and FCL. The global separation of context created by Chrome between the two and the availability of Chrome APIs within those contexts require these scripts to be setup in a particular sequence so that the communication channels needed by FCL's `EXT/RPC` service method will work.\n\nThe following is an overview of these scripts and the functionality they need to support FCL:\n\n- `background.js`: Used to launch the extension with `chrome.windows.create` if selected by the user from Discovery or set directly via `fcl.config.discovery.wallet`\n- `content.js`: Used to proxy messages between the dapp to the extension via `chrome.runtime.sendMessage`.\n- `script.js`: Injected by `content.js` into the dapp's HTML page. It adds the extension authn service to `window.fcl_extensions` list on page load. This allows FCL to confirm installation and send extension details to Discovery or launch your wallet as the default wallet.\n\nAn example and guide showing how to build an FCL compatible wallet extension on Flow can be found [here](https://github.com/onflow/wallet-extension-example).\n\nOnce the extension is enabled, the same communication protocol between the rendered view and FCL applies:\n\n- A extension is rendered in a popup or new tab (comes from `endpoint` in the service).\n- The rendered popup says it's ready by sending a `\"FCL:VIEW:READY\"` message to the content script in the specified tab.\n- FCL will send the service data via `window.postMessage()` including the `type`: `\"FCL:VIEW:READY:RESPONSE\"`, `body`, and optional `params` or `data`.\n- The wallet sends back an `\"APPROVED\"` or `\"DECLINED\"` response via `chrome.tabs.sendMessage()` (It will be a `f_type: \"PollingResponse\"`)\n  - If it's approved, the polling response's data field will need to be what FCL is expecting.\n  - If it's declined, the polling response's reason field should say why it was declined.\n\n```javascript\n  chrome.tabs.sendMessage(tabs[0].id, {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    reason: null,\n    data: {\n      f_type: \"AuthnResponse\",\n      f_vsn: \"1.0.0\",\n      addr: address,\n      services: services,\n    },\n  });\n```\n\n![EXT/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/ext-rpc.png)\n\n### Polling Response\n\nEach response back to FCL must be \"wrapped\" in a Polling Response. Each Polling Response can have its status as `\"APPROVED\"`, `\"DECLINED\"`, or `\"PENDING\"`.\n\nIt is entirely acceptable for your service to immediately return an `\"APPROVED\"` Polling Response, skipping a `\"PENDING\"` state.\n\n`\"DECLINED\"` Polling Responses must include a human readable reason for why it was declined.\n\n```javascript\n// APPROVED\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: ___, // what the service needs to send to FCL\n}\n\n// Declined\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"DECLINED\",\n  reason: \"Declined by user.\"\n}\n\n// Pending - Simple\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"PENDING\",\n  updates: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    type: \"back-channel-rpc\",\n    endpoint: \"https://____\", // where post request will be sent\n    method: \"HTTP/POST\",\n    data: {},   // will be included in the request's body\n    params: {}, // will be included in the request's url\n  }\n}\n\n// Pending - First Time with Local\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"PENDING\",\n  updates: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    type: \"back-channel-rpc\",\n    endpoint: \"https://____\", // where post request will be sent\n    method: \"HTTP/POST\",\n    data: {},   // included in body of request\n    params: {}, // included as query params on endpoint\n  },\n  local: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    endpoint: \"https://____\", // the iframe that will be rendered,\n    method: \"VIEW/IFRAME\",\n    data: {}, // sent to frame when ready\n    params: {}, // included as query params on endpoint\n  }\n}\n```\n\nA `PollingResponse` can alternatively be constructed using `WalletUtils` when sending `\"APPROVED\"` or `\"DECLINED\"` responses.\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\n// Approving a PollingResponse\n// Example using an AuthnResponse as the PollingResponse data\nWalletUtils.approve({\n  f_type: \"AuthnResponse\",\n  f_vsn: \"1.0.0\"\n  ...\n})\n\n// Rejecting a PollingResponse\n// Supplies a reason for declining\nconst reason = \"User declined to authenticate.\"\nWalletUtils.decline(reason)\n```\n\n### `data` and `params`\n\n`data` and `params` are information that the wallet can provide in the service config that FCL will pass back to the service.\n- `params` will be added onto the `endpoint` as query params.\n- `data` will be included in the body of the `HTTP/POST` request or in the `FCL:VIEW:READY:RESPONSE` for a `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\n\n# Authentication Service\n\nIn the following examples, we'll walk you through the process of building an authentication service.\n\nIn FCL, wallets are configured by passing in a wallet provider's authentication URL or extension endpoint as the `discovery.wallet` config variable.\n\nYou will need to make and expose a webpage or API hosted at an authentication endpoint that FCL will use.\n\n```javascript\n// IN APPLICATION\n// configuring fcl to point at a wallet looks like this\nimport {config} from \"@onflow/fcl\"\n\nconfig({\n  \"discovery.wallet\": \"url-or-endpoint-fcl-will-use-for-authentication\", // FCL Discovery endpoint, wallet provider's authentication URL or extension endpoint\n  \"discovery.wallet.method\": \"IFRAME/RPC\" // Optional. Available methods are \"IFRAME/RPC\", \"POP/RPC\", \"TAB/RPC\", \"EXT/RPC\" or \"HTTP/POST\", defaults to \"IFRAME/RPC\".\n})\n```\n\nIf the method specified is `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`, then the URL specified as `discovery.wallet` will be rendered as a webpage. If the configured method is `EXT/RPC`, `discovery.wallet` should be set to the extension's `authn` `endpoint`. Otherwise, if the method specified is `HTTP/POST`, then the authentication process will happen over HTTP requests. (While authentication can be accomplished using any of those service methods, this example will use the `IFRAME/RPC` service method.)\n\nOnce the Authentication webpage is rendered, the extension popup is enabled, or the API is ready, you then need to tell FCL that it is ready. You will do this by sending a message to FCL, and FCL will send back a message with some additional information that you can use about the application requesting authentication on behalf of the user.\n\nThe following example is using the `IFRAME/RPC` method. Your authentication webpage will likely resemble the following code:\n\n```javascript\n// IN WALLET AUTHENTICATION FRAME\nimport {WalletUtils} from \"@onflow/fcl\"\n\nfunction callback(data) {\n  if (typeof data != \"object\") return\n  if (data.type !== \"FCL:VIEW:READY:RESPONSE\") return\n\n  ... // Do authentication things ...\n\n  // Send back AuthnResponse\n  WalletUtils.sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    data: {\n      f_type: \"AuthnResponse\",\n      f_vsn: \"1.0.0\"\n      ...\n    }\n  })\n  \n  // Alternatively be sent using WalletUtils.approve (or WalletUtils.decline)\n  // which will wrap AuthnResponse in a PollingResponse\n  WalletUtils.approve({\n    f_type: \"AuthnResponse\",\n    f_vsn: \"1.0.0\"\n    ...\n  })\n}\n// add event listener first\nWalletUtils.onMsgFromFCL(\"FCL:VIEW:READY:RESPONSE\", callback)\n\n// tell fcl the wallet is ready\nWalletUtils.sendMsgToFCL(\"FCL:VIEW:READY\")\n\n// alternatively adds \"FCL:VIEW:READY:RESPONSE\" listener and sends \"FCL:VIEW:READY\"\nWalletUtils.ready(callback)\n```\n\nDuring authentication, the application has a chance to request to you what they would like you to send back to them. These requests are included in the `FCL:VIEW:READY:RESPONSE` message sent to the wallet from FCL.\n\nAn example of such a request is the OpenID service. The application can request for example that you to send them the email address of the current user. The application requesting this information does not mean you need to send it. It's entirely optional for you to do so. However, some applications may depend on you sending the requested information back, and should you decline to do so it may cause the application to not work.\n\nIn the config they can also tell you a variety of things about them, such as the name of their application or a url for an icon of their application. You can use these pieces of information to customize your wallet's user experience should you desire to do so.\n\nYour wallet having a visual distinction from the application, but still a seamless and connected experience is our goal here.\n\nWhether your authentication process happens using a webpage with the `IFRAME/RPC`, `POP/RPC` or `TAB/RPC` methods, via an enabled extension using the `EXT/RPC` method, or using a backchannel to an API with the `HTTP/POST` method, the handshake is the same. The same messages are sent in all methods, however the transport mechanism changes. For `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC` methods, the transport is `window.postMessage()`, with the `HTTP/POST` method, the transport is HTTP post messages.\n\nAs always, you must never trust anything you receive from an application. Always do your due-diligence and be alert as you are the user's first line of defense against potentially malicious applications.\n\n### Authenticate your User \n\nIt's important that you are confident that the user is who the user claims to be.\n\nHave them provide enough proof to you that you are okay with passing their details back to FCL.\nUsing Blocto as an example, an authentication code is sent to the email a user enters at login.\nThis code can be used as validation and is everything Blocto needs to be confident in the user's identity.\n\n### Once you know who your User is\n\nOnce you're confident in the user's identity, we can complete the authentication process.\n\nThe authentication process is complete once FCL receives back a response that configures FCL with FCL Services for the current user. This response is extremely important to FCL. At its core it tells FCL who the user is, and then via the included services it tells FCL how the user authenticated, how to request transaction signatures, how to get a personal message signed and the user's email and other details if requested. In the future it may also include many more things!\n\nYou can kind of think of FCL as a plugin system. But since those plugins exist elsewhere outside of FCL, FCL needs to be configured with information on how to communicate with them.\n\nWhat you are sending back to FCL is everything that it needs to communicate with the plugins that you are supplying.\nYour wallet is like a plugin to FCL, and these details tell FCL how to use you as a plugin.\n\nHere is an example of an authentication response:\n\n```javascript\n// IN WALLET AUTHENTICATION FRAME\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.approve({\n  f_type: \"AuthnResponse\",\n  f_vsn: \"1.0.0\",\n  addr: \"0xUSER\",                      // The user's flow address\n\n  services: [                          // All the stuff that configures FCL\n      \n      // Authentication Service - REQUIRED\n      {\n          f_type: \"Service\",                                         // It's a service!\n          f_vsn: \"1.0.0\",                                            // Follows the v1.0.0 spec for the service\n          type: \"authn\",                                             // the type of service it is\n          method: \"DATA\",                                            // It's data!\n          uid: \"amazing-wallet#authn\",                               // A unique identifier for the service\n          endpoint: \"your-url-that-fcl-will-use-for-authentication\", // should be the same as was passed into the config\n          id: \"0xUSER\",                                              // the wallet's internal id for the user, use flow address if you don't have one\n          // The User's Info\n          identity: {\n              f_type: \"Identity\",  // It's an Identity!\n              f_vsn: \"1.0.0\",      // Follows the v1.0.0 spec for an identity\n              address: \"0xUSER\",   // The user's address\n              keyId: 0,            // OPTIONAL - The User's KeyId they will use\n          },\n          // The Wallet's Info\n          provider: {\n              f_type: \"ServiceProvider\",      // It's a Service Provider\n              f_vsn: \"1.0.0\",                 // Follows the v1.0.0 spec for service providers\n              address: \"0xWallet\",            // A flow address owned by the wallet\n              name: \"Amazing Wallet\",         // OPTIONAL - The name of your wallet. ie: \"Dapper Wallet\" or \"Blocto Wallet\"\n              description: \"The best wallet\", // OPTIONAL - A short description for your wallet\n              icon: \"https://___\",            // OPTIONAL - Image url for your wallet's icon\n              website: \"https://___\",         // OPTIONAL - Your wallet's website\n              supportUrl: \"https://___\",      // OPTIONAL - An url the user can use to get support from you\n              supportEmail: \"help@aw.com\",    // OPTIONAL - An email the user can use to get support from you\n          },\n      },\n\n      // Authorization Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"authz\",\n          uid: \"amazing-wallet#authz\",\n          ...\n          // We will cover this at length in the authorization section of this guide\n      },\n      \n      // User Signature Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"user-signature\",\n          uid: \"amazing-wallet#user-signature\",\n          ...\n          // We will cover this at length in the user signature section of this guide\n      },\n\n      // OpenID Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"open-id\",\n          uid: \"amazing-wallet#open-id\",\n          method: \"DATA\",\n          data: { // only include data that was request, ideally only if the user approves the sharing of data, everything is optional\n              f_type: \"OpenID\",\n              f_vsn: \"1.0.0\",\n              profile: {\n                  name: \"Jeff\",\n                  family_name: \"D\", // icky underscored names because of OpenID Connect spec\n                  given_name: \"Jeffrey\",\n                  middle_name: \"FakeMiddleName\",\n                  nickname: \"JeffJeff\",\n                  preferred_username: \"Jeff\",\n                  profile: \"https://www.jeff.jeff/\",\n                  picture: \"https://avatars.onflow.org/avatar/jeff\",\n                  website: \"https://www.jeff.jeff/\",\n                  gender: \"male\",\n                  birthday: \"1900-01-01\", // can use 0000 for year if year is not known\n                  zoneinfo: \"America/Vancouver\",\n                  locale: \"en\",\n                  updated_at: \"1625588304427\"\n              },\n              email: {\n                  email: \"jeff@jeff.jeff\",\n                  email_verified: false,\n              }\n          },\n      }\n  ]\n})\n```\n\n### Stopping an Authentication Process\n\nFrom any frame, you can send a `FCL:VIEW:CLOSE` post message to FCL, which will halt FCL's current routine and close the frame.\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.sendMsgToFCL(\"FCL:VIEW:CLOSE\")\n```\n\n# Authorization Service\n\nAuthorization services are depicted with with a `type: \"authz\"`, and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return a `f_type: \"CompositeSignature\"`.\n\nAn authorization service is expected to know the Account and the Key that will be used to sign the transaction at the time the service is sent to FCL (during authentication).\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authz\",               // say it's an authorization service\n  uid: \"amazing-wallet#authz\", // standard service uid\n  method: \"HTTP/POST\",         // can also be `IFRAME/RPC` or `POP/RPC`\n  endpoint: \"https://____\",    // where to talk to the service\n  identity: {\n    f_type: \"Identity\",\n    f_vsn: \"1.0.0\",\n    address: \"0xUser\",         // the address that the signature will be for\n    keyId: 0,                  // the key for the address that the signature will be for\n  },\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request an array of composite signature from authorization service (Wrapped in a `PollingResponse`).\nThe authorization service will be sent a `Signable`.\nThe service is expected to construct an encoded message to sign from `Signable.voucher`.\nIt then needs to hash the encoded message, and prepend a required [transaction domain tag](../../../sdk/src/encode/encode.ts#L12-L13).\nFinally it signs the payload with the user/s keys, producing a signature.\nThis signature, as a HEX string, is sent back to FCL as part of the `CompositeSignature` which includes the user address and keyID in the data property of a `PollingResponse`.\n\n```elixir\nsignature = \n  signable.voucher\n    |> encode\n    |> hash\n    |> tag\n    |> sign\n    |> convert_to_hex\n```\n\nThe eventual response back from the authorization service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"CompositeSignature\",\n    f_vsn: \"1.0.0\",\n    addr: \"0xUSER\",\n    keyId: 0,\n    signature: \"signature as hex value\"\n  }\n}\n```\n\nA `CompositeSignature` can alternatively be constructed using `WalletUtils`\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.CompositeSignature(addr: String, keyId: Number, signature: Hex)\n\n```\n\n# User Signature Service\n\nUser Signature services are depicted with a `type: \"user-signature\"` and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return an array of `f_type: \"CompositeSignature\"`.\n\nThe User Signature service is a stock/standard service.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"user-signature\",               // say it's an user-signature service\n  uid: \"amazing-wallet#user-signature\", // standard service uid\n  method: \"HTTP/POST\",                  // can also be `IFRAME/RPC`\n  endpoint: \"https://___\",              // where to talk to the service\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request an array of composite signatures from the user signature service (Wrapped in a `PollingResponse`).\nThe user signature service will be sent a `Signable`.\nThe service is expected to tag the `Signable.message` and then sign it with enough keys to produce a full weight.\nThe signatures need to be sent back to FCL as HEX strings in an array of `CompositeSignatures`.\n\n```javascript\n// Pseudocode:\n// For every required signature\nimport {WalletUtils} from \"@onflow/fcl\"\n\nconst encoded = WalletUtils.encodeMessageFromSignable(signable, signerAddress)\nconst taggedMessage = tagMessage(encoded) // Tag the message to sign\nconst signature = signMessage(taggedMessage) // Sign the message\nconst hexSignature = signatureToHex(signature) // Convert the signature to hex, if required.\n\nreturn hexSignature\n```\n\nThe eventual response back from the user signature service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: [\n    {\n      f_type: \"CompositeSignature\",\n      f_vsn: \"1.0.0\",\n      addr: \"0xUSER\",\n      keyId: 0,\n      signature: \"signature as hex value\"\n    },\n    {\n      f_type: \"CompositeSignature\",\n      f_vsn: \"1.0.0\",\n      addr: \"0xUSER\",\n      keyId: 1,\n      signature: \"signature as hex value\"\n    }\n  ]\n}\n```\n\n# Pre Authz Service\n\nThis is a strange one, but extremely powerful. This service should be used when a wallet is responsible for an account that's signing as multiple roles of a transaction, and wants the ability to change the accounts on a per role basis.\n\nPre Authz Services are depicted with a `type: \"pre-authz\"` and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return a `f_type: \"PreAuthzResponse\"`.\n\nThe Pre Authz Service is a stock/standard service.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"pre-authz\",               // say it's a pre-authz service\n  uid: \"amazing-wallet#pre-authz\", // standard service uid\n  method: \"HTTP/POST\",             // can also be IFRAME/RPC, POP/RPC, TAB/RPC\n  endpoint: \"https://___\",         // where to talk to the service\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request a `PreAuthzReponse` (Wrapped in a `PollingResponse`).\nThe Authorizations service will be sent a `PreSignable`.\nThe pre-authz service is expected to look at the `PreSignable` and determine the breakdown of accounts to be used.\nThe pre-authz service is expected to return `Authz` services for each role it is responsible for.\nA pre-authz service can only supply roles it is responsible for.\nIf a pre-authz service is responsible for multiple roles, but it wants the same account to be responsible for all the roles, it will need to supply an Authz service per role.\n\nThe eventual response back from the pre-authz service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"PreAuthzResponse\",\n    f_vsn: \"1.0.0\",\n    proposer: {              // A single Authz Service\n      f_type: \"Service\",\n      f_vsn: \"1.0.0\",\n      type: \"authz\",\n      ...\n    },\n    payer: [                // An array of Authz Services\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      }\n    ],\n    authorization: [       // An array of Authz Services (it's singular because it only represents a singular authorization)\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      }\n    ],\n  }\n}\n```\n\n# Authentication Refresh Service\n\nSince synchronization of a user's session is important to provide a seamless user experience when using an app and transacting with the Flow Blockchain, a way to confirm, extend, and refresh a user session can be provided by the wallet.\n\nAuthentication Refresh Services should include a `type: \"authn-refresh\"`, `endpoint`, and supported `method` (`HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, or `EXT/RPC`).\n\nFCL will use the `endpoint` and service `method` provided to request updated authentication data.\nThe `authn-refresh` service should refresh the user's session if necessary and return updated authentication configuration and user session data.\n\nThe service is expected to return a `PollingResponse` with a new `AuthnResponse` as data. If user input is required, a `PENDING` `PollingResponse` can be returned with a `local` view for approval/re-submission of user details.\n\nThe Authentication Refresh Service is a stock/standard service.\n\n```javascript\n  {\n    \"f_type\": \"Service\",\n    \"f_vsn\": \"1.0.0\",\n    \"type\": \"authn-refresh\",\n    \"uid\": \"uniqueDedupeKey\",\n    \"endpoint\": \"https://rawr\",\n    \"method\": \"HTTP/POST\",  // \"HTTP/POST\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n    \"id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallet's internal id for the user\n    \"data\": {}, // included in body of request\n    \"params\": {}, // included as query params on endpoint url\n  }\n```\n\nThe provided `data` and `params` should include all the wallet needs to identify and re-authenticate the user if necessary.\n\nThe eventual response back from the `authn-refresh` service should resolve to an `AuthnResponse` and look something like this:\n\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"AuthnResponse\",\n    f_vsn: \"1.0.0\",\n    addr: \"0xUSER\",\n    services: [\n      // Authentication Service - REQUIRED\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn\",\n        ...\n      },\n      // Authorization Service\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      },\n      // Authentication Refresh Service\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn-refresh\",\n        ...\n      }\n      // Additional Services\n    ],\n  }\n}\n```\n\n# Data Structures\n\nFCL employs the following data structures, of which you have previously seen in use throughout this document.\n\n- [CompositeSignature](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/composite-signature.js)\n- [PollingResponse](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/polling-response.js)\n- [authn](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/authn.js)\n- [authz](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/authz.js)\n- [pre-authz](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/pre-authz.js)\n- [user-signature](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/user-signature.js)\n- [local-view](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/local-view.js)\n- [frame](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/frame.js)\n- [back-channel-rpc](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/back-channel-rpc.js)\n- [open-id](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/open-id.js)\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/draft-v4.md",
    "content": "## Status\n\n- **Last Updated:** June 20th 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** Medium\n- **Compatibility:** `>= @onflow/fcl@1.0.0-alpha.0`\n\n## Definitions\n\nThis document is written with the perspective that _you_ who are reading this right now are an FCL Wallet Developer. All references to _you_ in this doc are done with this perspective in mind.\n\n# Overview\n\nFlow Client Library (FCL) approaches the idea of blockchain wallets on Flow in a different way than how wallets may be supported on other blockchains. For example, with FCL, a wallet is not necessarily limited to being a browser extension or even a native application on a users device. FCL offers wallet developers the flexibility and freedom to build many different types of applications. Since wallet applications can take on many forms, we needed to create a way for these varying applications to be able to communicate and work together.\n\nFCL acts in many ways as a protocol to facilitate communication and configuration between the different parties involved in a blockchain application. An _Application_ can use FCL to _authenticate_ users, and request _authorizations_ for transactions, as well as mutate and query the _Blockchain_. An application using FCL offers its _Users_ a way to connect and select any number of Wallet Providers and their Wallet Services. A selected _Wallet_ provides an Application's instance of FCL with configuration information about itself and its Wallet Services, allowing the _User_ and _Application_ to interact with them.\n\nIn the following paragraphs we'll explore ways in which you can integrate with FCL by providing implementations of various FCL services.\n\nThe following services will be covered:\n\n- Authentication (Authn) Service\n- Authorization (Authz) Service\n- User Signature Service\n- Pre-Authz Service\n\n# Service Methods\n\nFCL Services are your way as a Wallet Provider of configuring FCL with information about what your wallet can do. FCL uses what it calls `Service Methods` to perform your supported FCL services. Service Methods are the ways FCL can talk to your wallet. Your wallet gets to decide which of these service methods each of your supported services use to communicate with you.\n\nSometimes services just configure FCL and that's it. An example of this can be seen with the Authentication Service and the OpenID Service.\nWith those two services you are simply telling FCL \"here is a bunch of info about the current user\". (You will see that those two services both have a `method: \"DATA\"` field in them.\nCurrently these are the only two cases that can be a data service.)\n\nOther services can be a little more complex. For example, they might require a back and forth communication between FCL and the Service in question.\nUltimately we want to do this back and forth via a secure back-channel (https requests to servers), **but in some situations that isn't a viable option, so there is also a front-channel option**.\nWhere possible, you should aim to provide a back-channel support for services, and only fall back to a front-channel if absolutely necessary.\n\nBack-channel communications use `method: \"HTTP/POST\"`, while front-channel communications use `method: \"IFRAME/RPC\"`, `method: \"POP/RPC\"`, `method: \"TAB/RPC` and `method: \"EXT/RPC\"`.\n\n| Service Method | Front  |  Back |\n|----------------|--------|-------|\n| HTTP/POST      |   ⛔   |   ✅   |\n| IFRAME/RPC     |   ✅   |   ⛔   |\n| POP/RPC        |   ✅   |   ⛔   |\n| TAB/RPC        |   ✅   |   ⛔   |\n| EXT/RPC        |   ✅   |   ⛔   |\n\nIt's important to note that regardless of the method of communication, the data that is sent back and forth between the parties involved is the same.\n\n# Protocol schema definitions\nIn this section we define the schema of objects used in the protocol. While they are JavaScript objects, only features supported by JSON should be used. (Meaning that conversion of an object to and from JSON should not result in any loss.)\n\nFor the schema definition language we choose TypeScript, so that the schema closely resembles the actual type definitions one would use when making an FCL implementation.\n\n**Note that currently there are no official type definitions available for FCL. If you are using TypeScript, you will have to create your own type definitions (possibly based on the schema definitions presented in this document).**\n\n## Common definitions\nIn this section we introduce some common definitions that the individual object definitions will be deriving from.\n\nFirst, let us define the kinds of FCL objects available:\n```typescript\ntype ObjectType =\n  | 'PollingResponse'\n  | 'Service'\n  | 'Identity'\n  | 'ServiceProvider'\n  | 'AuthnResponse'\n  | 'Signable'\n  | 'CompositeSignature'\n  | 'OpenID'\n```\n\nThe fields common to all FCL objects then can be defined as follows:\n```typescript\ninterface ObjectBase<Version = '1.0.0'> {\n  f_vsn: Version\n  f_type: ObjectType\n}\n```\n\nThe `f_vsn` field is usually `1.0.0` for this specification, but some exceptions will be defined by passing a different `Version` type parameter to `ObjectBase`.\n\nAll FCL objects carry an `f_type` field so that their types can be identified at runtime.\n\n## FCL objects\nIn this section we will define the FCL objects with each `ObjectType`.\n\nWe also define the union of them to mean any FCL object:\n```typescript\ntype FclObject =\n  | PollingResponse\n  | Service\n  | Identity\n  | ServiceProvider\n  | AuthnResponse\n  | Signable\n  | CompositeSignature\n  | OpenID\n```\n\n### `PollingResponse`\n\n```typescript\ninterface PollingResponse extends ObjectBase {\n  f_type: 'PollingResponse'\n  status: 'APPROVED' | 'DECLINED' | 'PENDING' | 'REDIRECT'\n  reason: string | null\n  data?: FclObject\n  updates?: FclObject\n  local?: FclObject\n}\n```\n\nEach response back to FCL must be \"wrapped\" in a `PollingResponse`. The `status` field determines the meaning of the response:\n- An `APPROVED` status means that the request has been approved. The `data` field should be present.\n- A `DECLINED` status means that the request has been declined. The `reason` field should contain a human readable reason for the refusal.\n- A `PENDING` status means that the request is being processed. More `PENDING` responses may follow, but eventually a non-pending status should be returned. The `updates` and `local` fields may be present.\n- The `REDIRECT` status is reserved, and should not be used by wallet services.\n\nIn summary, zero or more `PENDING` responses should be followed by a non-pending response. It is entirely acceptable for your service to immediately return an `APPROVED` Polling Response, skipping a `PENDING` state.\n\nSee also [PollingResponse](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/polling-response.js).\n\nHere are some examples of valid `PollingResponse` objects:\n```javascript\n// APPROVED\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: ___, // what the service needs to send to FCL\n}\n\n// Declined\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"DECLINED\",\n  reason: \"Declined by user.\"\n}\n\n// Pending - Simple\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"PENDING\",\n  updates: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    type: \"back-channel-rpc\",\n    endpoint: \"https://____\", // where post request will be sent\n    method: \"HTTP/POST\",\n    data: {},   // will be included in the request's body\n    params: {}, // will be included in the request's url\n  }\n}\n\n// Pending - First Time with Local\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"PENDING\",\n  updates: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    type: \"back-channel-rpc\",\n    endpoint: \"https://____\", // where post request will be sent\n    method: \"HTTP/POST\",\n    data: {},   // included in body of request\n    params: {}, // included as query params on endpoint\n  },\n  local: {\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    endpoint: \"https://____\", // the iframe that will be rendered,\n    method: \"VIEW/IFRAME\",\n    data: {}, // sent to frame when ready\n    params: {}, // included as query params on endpoint\n  }\n}\n```\n\nA `PollingResponse` can alternatively be constructed using `WalletUtils` when sending `\"APPROVED\"` or `\"DECLINED\"` responses.\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\n// Approving a PollingResponse\n// Example using an AuthnResponse as the PollingResponse data\nWalletUtils.approve({\n  f_type: \"AuthnResponse\",\n  f_vsn: \"1.0.0\"\n  ...\n})\n\n// Rejecting a PollingResponse\n// Supplies a reason for declining\nconst reason = \"User declined to authenticate.\"\nWalletUtils.decline(reason)\n```\n\n### `Service`\n\n```typescript\ntype ServiceType =\n  | 'authn'\n  | 'authz'\n  | 'user-signature'\n  | 'pre-authz'\n  | 'open-id'\n  | 'back-channel-rpc'\n  | 'authn-refresh'\n\ntype ServiceMethod =\n  | 'HTTP/POST'\n  | 'IFRAME/RPC'\n  | 'POP/RPC'\n  | 'TAB/RPC'\n  | 'EXT/RPC'\n  | 'DATA'\n\ninterface Service extends ObjectBase {\n  f_type: 'Service'\n  type: ServiceType\n  method: ServiceMethod\n  uid: string\n  endpoint: string\n  id: string\n  identity: Identity\n  provider?: ServiceProvider\n  data?: FclObject\n}\n```\n\nThe meaning of the fields is as follows.\n- `type`: The type of this service.\n- `method`: The service method this service uses. `DATA` means that the purpose of this service is just to provide the information in this `Service` object, and no active communication services are provided.\n- `uid`: A unique identifier for the service. A common scheme for deriving this is to use `'wallet-name#${type}'`, where `${type}` refers to the type of this service.\n- `endpoint`: Defines where to communicate with the service.\n  - When `method` is `EXT/RPC`, this can be an arbitrary unique string, and the extension will need to use it to identify its own services. A common scheme for deriving the `endpoint` is to use `'ext:${address}'`, where `${address}` refers to the wallet's address. (See `ServiceProvider` for more information.)\n- `id`: The wallet's internal identifier for the user. If no other identifier is used, simply the user's flow account address can be used here.\n- `identity`: Information about the identity of the user.\n- `provider`: Information about the wallet.\n- `data`: Additional information used with a service of type `open-id`.\n\nSee also:\n- [authn](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/authn.js)\n- [authz](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/authz.js)\n- [user-signature](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/user-signature.js)\n- [pre-authz](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/pre-authz.js)\n- [open-id](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/open-id.js)\n- [back-channel-rpc](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/back-channel-rpc.js)\n\n### `Identity`\nThis object is used to define the identity of the user.\n\n```typescript\ninterface Identity extends ObjectBase {\n  f_type: 'Identity'\n  address: string\n  keyId?: number\n}\n```\n\nThe meaning of the fields is as follows.\n- `address`: The flow account address of the user.\n- `keyId`: The id of the key associated with this account that will be used for signing.\n\n### `ServiceProvider`\nThis object is used to communicate information about a wallet.\n\n```typescript\ninterface ServiceProvider extends ObjectBase {\n  f_type: 'ServiceProvider'\n  address: string\n  name?: string\n  description?: string\n  icon?: string\n  website?: string\n  supportUrl?: string\n  supportEmail?: string\n}\n```\n\nThe meaning of the fields is as follows.\n- `address`: A flow account address owned by the wallet. It is unspecified what this will be used for.\n- `name`: The name of the wallet.\n- `description`: A short description for the wallet.\n- `icon`: An image URL for the wallet's icon.\n- `website`: The wallet's website.\n- `supportUrl`: A URL the user can use to get support with the wallet.\n- `supportEmail`: An e-mail address the user can use to get support with the wallet.\n\n### `AuthnResponse`\nThis object is used to inform FCL about the services a wallet provides.\n\n```typescript\ninterface AuthnResponse extends ObjectBase {\n  f_type: 'AuthnResponse'\n  addr: string\n  services: Service[]\n}\n```\n\nThe meaning of the fields is as follows.\n- `addr`: The flow account address of the user.\n- `services`: The list of services provided by the wallet.\n\n### `Signable`\n\n```typescript\ninterface Signable extends ObjectBase<'1.0.1'> {\n  f_type: 'Signable'\n  addr: string\n  keyId: number\n  voucher: {\n    cadence: string\n    refBlock: string\n    computeLimit: number\n    arguments: {\n      type: string\n      value: unknown\n    }[]\n    proposalKey: {\n      address: string\n      keyId: number\n      sequenceNum: number\n    }\n    payer: string\n    authorizers: string[]\n  }\n}\n```\n\nThe `WalletUtils.encodeMessageFromSignable` function can be used to calculate the message that needs to be signed.\n\n### `CompositeSignature`\n\n```typescript\ninterface CompositeSignature extends ObjectBase {\n  f_type: 'CompositeSignature'\n  addr: string\n  keyId: number\n  signature: string\n}\n```\n\nSee also [CompositeSignature](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/composite-signature.js).\n\n### `OpenID`\nTODO\n\n## Miscellaneous objects\n\n### `Message`\n```typescript\ntype MessageType =\n  | 'FCL:VIEW:READY'\n  | 'FCL:VIEW:READY:RESPONSE'\n  | 'FCL:VIEW:RESPONSE'\n  | 'FCL:VIEW:CLOSE'\n\ntype Message = {\n  type: MessageType\n}\n```\n\nA message that indicates the status of the protocol invocation.\n\nThis type is sometimes used as part of an _intersection type_. For example, the type `Message & PollingResponse` means a `PollingResponse` extended with the `type` field from `Message`.\n\n### `ExtensionServiceInitiationMessage`\n```typescript\ntype ExtensionServiceInitiationMessage = {\n  service: Service\n}\n```\n\nThis object is used to invoke a service when the `EXT/RPC` service method is used.\n\n## See also\n- [local-view](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/local-view.js)\n- [frame](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/frame.js)\n\n# Service Methods\n\n## IFRAME/RPC (Front Channel)\n\n`IFRAME/RPC` is the easiest to explain, so we will start with it:\n\n- An iframe is rendered (comes from the `endpoint` in the service).\n- The rendered iframe adds a listener and sends the `\"FCL:VIEW:READY\"` message. This can be simplified `WalletUtils.ready(callback)`\n- FCL will send the data to be dealt with:\n  - Where `body` is the stuff you care about, `params` and `data` are additional information you can provide in the service object.\n- The wallet sends back an `\"APPROVED\"` or `\"DECLINED\"` post message. (It will be a `f_type: \"PollingResponse\"`, which we will get to in a bit). This can be simplified using `WalletUtils.approve` and `WalletUtils.decline`\n  - If it's approved, the polling response's data field will need to be what FCL is expecting.\n  - If it's declined, the polling response's reason field should say why it was declined.\n\n```javascript\nexport const WalletUtils.approve = data => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    reason: null,\n    data: data,\n  })\n}\n\nexport const WalletUtils.decline = reason => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"DECLINED\",\n    reason: reason,\n    data: null,\n  })\n}\n```\n\n![IFRAME/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/iframe-rpc.png)\n\n## POP/RPC | TAB/RPC (Front Channel)\n\n`POP/RPC` and `TAB/RPC` work in an almost entirely similar way to `IFRAME/RPC`, except instead of rendering the `method` in an iframe, we render it in a popup or new tab. The same communication protocol between the rendered view and FCL applies.\n\n![POP/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/pop-rpc.png)\n\n![TAB/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/tab-rpc.png)\n\n## HTTP/POST (Back Channel)\n\n`HTTP/POST` initially sends a post request to the `endpoint` specified in the service, which should immediately return a `f_type: \"PollingResponse\"`.\n\nLike `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`, our goal is to eventually get an `APPROVED` or `DECLINED` polling response, and technically this endpoint could return one of those immediately.\n\nBut more than likely that isn't the case and it will be in a `PENDING` state (`PENDING` is not available to `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`).\nWhen the polling response is `PENDING` it requires an `updates` field that includes a service, `BackChannelRpc`, that FCL can use to request an updated `PollingResponse` from.\nFCL will use that `BackChannelRpc` to request a new `PollingResponse` which itself can be `APPROVED`, `DECLINED` or `PENDING`.\nIf it is `APPROVED` FCL will return, otherwise if it is `DECLINED` FCL will error. However, if it is `PENDING`, it will use the `BackChannelRpc` supplied in the new `PollingResponse` updates field. It will repeat this cycle until it is either `APPROVED` or `DECLINED`.\n\nThere is an additional optional feature that `HTTP/POST` enables in the first `PollingResponse` that is returned.\nThis optional feature is the ability for FCL to render an iframe, popup or new tab, and it can be triggered by supplying a service `type: \"VIEW/IFRAME\"`, `type: \"VIEW/POP\"` or `type: \"VIEW/TAB\"` and the `endpoint` that the wallet wishes to render in the `local` field of the `PollingResponse`. This is a great way for a wallet provider to switch to a webpage if displaying a UI is necessary for the service it is performing.\n\n![HTTP/POST Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/http-post.png)\n\n## EXT/RPC (Front Channel)\n\n`EXT/RPC` is used to enable and communicate between FCL and an installed web browser extension. (Though this specification is geared towards Chromium based browsers, it should be implementable in any browser with similar extension APIs available. From now on we will be using the word _Chrome_ to refer to Chromium based browsers.)\n\nAn implementation of `EXT/RPC` needs to somehow enable communication between the application and the extension context. Implementing this is a bit more complex and usually relies on 3 key scripts to allow message passing between an installed extension and FCL. The separation of contexts enforced by Chrome and the availability of different Chrome APIs within those contexts require these scripts to be set up in a particular sequence so that the communication channels needed by FCL's `EXT/RPC` service method will work.\n\nThe following is an overview of these scripts and the functionality they need to support FCL:\n\n- `background.js`: Used to launch the extension popup with `chrome.windows.create` if selected by the user from Discovery or set directly via `fcl.config.discovery.wallet`\n- `content.js`: Used to proxy messages between the application to the extension via `chrome.runtime.sendMessage`.\n- `script.js`: Injected by `content.js` into the application's HTML page. It appends the extension authn service to the `window.fcl_extensions` array on page load. This allows FCL to confirm installation and send extension details to Discovery or launch your wallet as the default wallet.\n\nAn example and guide showing how to build an FCL compatible wallet extension on Flow can be found [here](https://github.com/onflow/wallet-extension-example).\n\nOnce the extension is enabled (for example when the user selects it through the discovery service), the following communication protocol applies. (The term _send_ should specifically refer to using `window.postMessage` in the application context, as this is the only interface between the application and the extension. Note that since `window.postMessage` broadcasts messages to all message event handlers, care should be taken by each party to filter only the messages targeted at them.)\n\n- An `ExtensionServiceInitiationMessage` object is sent by FCL. It is the extension's responsibility to inspect the `endpoint` field of the service, and only activate itself (e.g. by opening a popup) if it is the provider of this service.\n- The extension should respond by sending a `Message` with type `FCL:VIEW:READY`. (Usually this message will originate from the extension popup, and be relayed to the application context.)\n- FCL will send a `Message` with type `FCL:VIEW:READY:RESPONSE`. Additional fields specific to the service (such as `body`, `params` or `data`) are usually present. See the section on the specific service for a description of these fields.\n- The wallet sends back a `Message & PollingResponse` with type `FCL:VIEW:RESPONSE` with either an `APPROVED` or `DECLINED` status.\n  - If it's approved, the polling response's data field will need to be what FCL is expecting.\n  - If it's declined, the polling response's reason field should say why it was declined.\n\nThe extension can send a `Message` with type `FCL:VIEW:CLOSE` at any point during this protocol to indicate an interruption. This will halt FCL's current routine. On the other hand, once a `PollingResponse` with either an `APPROVED` or `DECLINED` status was sent, the protocol is considered finished, and the extension should not send any further messages as part of this exchange.\n\nConversely, when FCL sends a new `ExtensionServiceInitiationMessage`, the previous routine is interrupted. (This is the case even when the new service invocation is targeted at a different extension.)\n\nNote that as a consequence of the above restrictions, only single service invocation can be in progress at a time.\n\nHere is a code example for how an extension popup might send its response:\n```javascript\n  chrome.tabs.sendMessage(tabs[0].id, {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    reason: null,\n    data: {\n      f_type: \"AuthnResponse\",\n      f_vsn: \"1.0.0\",\n      addr: address,\n      services: services,\n    },\n  });\n```\n\n![EXT/RPC Diagram](https://raw.githubusercontent.com/onflow/flow-js-sdk/master/packages/fcl/assets/service-method-diagrams/ext-rpc.png)\n\n## `data` and `params`\n\n`data` and `params` are information that the wallet can provide in the service config that FCL will pass back to the service.\n- `params` will be added onto the `endpoint` as query params.\n- `data` will be included in the body of the `HTTP/POST` request or in the `FCL:VIEW:READY:RESPONSE` for a `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\n\n# Authentication Service\n\nIn the following examples, we'll walk you through the process of building an authentication service.\n\nIn FCL, wallets are configured by passing in a wallet provider's authentication URL or extension endpoint as the `discovery.wallet` config variable.\n\nYou will need to make and expose a webpage or API hosted at an authentication endpoint that FCL will use.\n\n```javascript\n// IN APPLICATION\n// configuring fcl to point at a wallet looks like this\nimport {config} from \"@onflow/fcl\"\n\nconfig({\n  \"discovery.wallet\": \"url-or-endpoint-fcl-will-use-for-authentication\", // FCL Discovery endpoint, wallet provider's authentication URL or extension endpoint\n  \"discovery.wallet.method\": \"IFRAME/RPC\" // Optional. Available methods are \"IFRAME/RPC\", \"POP/RPC\", \"TAB/RPC\", \"EXT/RPC\" or \"HTTP/POST\", defaults to \"IFRAME/RPC\".\n})\n```\n\nIf the method specified is `IFRAME/RPC`, `POP/RPC` or `TAB/RPC`, then the URL specified as `discovery.wallet` will be rendered as a webpage. If the configured method is `EXT/RPC`, `discovery.wallet` should be set to the extension's `authn` `endpoint`. Otherwise, if the method specified is `HTTP/POST`, then the authentication process will happen over HTTP requests. (While authentication can be accomplished using any of those service methods, this example will use the `IFRAME/RPC` service method.)\n\nOnce the Authentication webpage is rendered, the extension popup is enabled, or the API is ready, you then need to tell FCL that it is ready. You will do this by sending a message to FCL, and FCL will send back a message with some additional information that you can use about the application requesting authentication on behalf of the user.\n\nThe following example is using the `IFRAME/RPC` method. Your authentication webpage will likely resemble the following code:\n\n```javascript\n// IN WALLET AUTHENTICATION FRAME\nimport {WalletUtils} from \"@onflow/fcl\"\n\nfunction callback(data) {\n  if (typeof data != \"object\") return\n  if (data.type !== \"FCL:VIEW:READY:RESPONSE\") return\n\n  ... // Do authentication things ...\n\n  // Send back AuthnResponse\n  WalletUtils.sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    data: {\n      f_type: \"AuthnResponse\",\n      f_vsn: \"1.0.0\"\n      ...\n    }\n  })\n\n  // Alternatively be sent using WalletUtils.approve (or WalletUtils.decline)\n  // which will wrap AuthnResponse in a PollingResponse\n  WalletUtils.approve({\n    f_type: \"AuthnResponse\",\n    f_vsn: \"1.0.0\"\n    ...\n  })\n}\n// add event listener first\nWalletUtils.onMsgFromFCL(\"FCL:VIEW:READY:RESPONSE\", callback)\n\n// tell fcl the wallet is ready\nWalletUtils.sendMsgToFCL(\"FCL:VIEW:READY\")\n\n// alternatively adds \"FCL:VIEW:READY:RESPONSE\" listener and sends \"FCL:VIEW:READY\"\nWalletUtils.ready(callback)\n```\n\nDuring authentication, the application has a chance to request to you what they would like you to send back to them. These requests are included in the `FCL:VIEW:READY:RESPONSE` message sent to the wallet from FCL.\n\nAn example of such a request is the OpenID service. The application can request for example that you to send them the email address of the current user. The application requesting this information does not mean you need to send it. It's entirely optional for you to do so. However, some applications may depend on you sending the requested information back, and should you decline to do so it may cause the application to not work.\n\nIn the config they can also tell you a variety of things about them, such as the name of their application or a url for an icon of their application. You can use these pieces of information to customize your wallet's user experience should you desire to do so.\n\nYour wallet having a visual distinction from the application, but still a seamless and connected experience is our goal here.\n\nWhether your authentication process happens using a webpage with the `IFRAME/RPC`, `POP/RPC` or `TAB/RPC` methods, via an enabled extension using the `EXT/RPC` method, or using a backchannel to an API with the `HTTP/POST` method, the handshake is the same. The same messages are sent in all methods, however the transport mechanism changes. For `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC` methods, the transport is `window.postMessage()`, with the `HTTP/POST` method, the transport is HTTP post messages.\n\nAs always, you must never trust anything you receive from an application. Always do your due-diligence and be alert as you are the user's first line of defense against potentially malicious applications.\n\n### Authenticate your User\n\nIt's important that you are confident that the user is who the user claims to be.\n\nHave them provide enough proof to you that you are okay with passing their details back to FCL.\nUsing Blocto as an example, an authentication code is sent to the email a user enters at login.\nThis code can be used as validation and is everything Blocto needs to be confident in the user's identity.\n\n### Once you know who your User is\n\nOnce you're confident in the user's identity, we can complete the authentication process.\n\nThe authentication process is complete once FCL receives back a response that configures FCL with FCL Services for the current user. This response is extremely important to FCL. At its core it tells FCL who the user is, and then via the included services it tells FCL how the user authenticated, how to request transaction signatures, how to get a personal message signed and the user's email and other details if requested. In the future it may also include many more things!\n\nYou can kind of think of FCL as a plugin system. But since those plugins exist elsewhere outside of FCL, FCL needs to be configured with information on how to communicate with them.\n\nWhat you are sending back to FCL is everything that it needs to communicate with the plugins that you are supplying.\nYour wallet is like a plugin to FCL, and these details tell FCL how to use you as a plugin.\n\nHere is an example of an authentication response:\n\n```javascript\n// IN WALLET AUTHENTICATION FRAME\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.approve({\n  f_type: \"AuthnResponse\",\n  f_vsn: \"1.0.0\",\n  addr: \"0xUSER\",                      // The user's flow address\n\n  services: [                          // All the stuff that configures FCL\n\n      // Authentication Service - REQUIRED\n      {\n          f_type: \"Service\",                                         // It's a service!\n          f_vsn: \"1.0.0\",                                            // Follows the v1.0.0 spec for the service\n          type: \"authn\",                                             // the type of service it is\n          method: \"DATA\",                                            // It's data!\n          uid: \"amazing-wallet#authn\",                               // A unique identifier for the service\n          endpoint: \"your-url-that-fcl-will-use-for-authentication\", // should be the same as was passed into the config\n          id: \"0xUSER\",                                              // the wallet's internal id for the user, use flow address if you don't have one\n          // The User's Info\n          identity: {\n              f_type: \"Identity\",  // It's an Identity!\n              f_vsn: \"1.0.0\",      // Follows the v1.0.0 spec for an identity\n              address: \"0xUSER\",   // The user's address\n              keyId: 0,            // OPTIONAL - The User's KeyId they will use\n          },\n          // The Wallet's Info\n          provider: {\n              f_type: \"ServiceProvider\",      // It's a Service Provider\n              f_vsn: \"1.0.0\",                 // Follows the v1.0.0 spec for service providers\n              address: \"0xWallet\",            // A flow address owned by the wallet\n              name: \"Amazing Wallet\",         // OPTIONAL - The name of your wallet. ie: \"Dapper Wallet\" or \"Blocto Wallet\"\n              description: \"The best wallet\", // OPTIONAL - A short description for your wallet\n              icon: \"https://___\",            // OPTIONAL - Image url for your wallet's icon\n              website: \"https://___\",         // OPTIONAL - Your wallet's website\n              supportUrl: \"https://___\",      // OPTIONAL - An url the user can use to get support from you\n              supportEmail: \"help@aw.com\",    // OPTIONAL - An email the user can use to get support from you\n          },\n      },\n\n      // Authorization Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"authz\",\n          uid: \"amazing-wallet#authz\",\n          ...\n          // We will cover this at length in the authorization section of this guide\n      },\n\n      // User Signature Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"user-signature\",\n          uid: \"amazing-wallet#user-signature\",\n          ...\n          // We will cover this at length in the user signature section of this guide\n      },\n\n      // OpenID Service\n      {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          type: \"open-id\",\n          uid: \"amazing-wallet#open-id\",\n          method: \"DATA\",\n          data: { // only include data that was request, ideally only if the user approves the sharing of data, everything is optional\n              f_type: \"OpenID\",\n              f_vsn: \"1.0.0\",\n              profile: {\n                  name: \"Jeff\",\n                  family_name: \"D\", // icky underscored names because of OpenID Connect spec\n                  given_name: \"Jeffrey\",\n                  middle_name: \"FakeMiddleName\",\n                  nickname: \"JeffJeff\",\n                  preferred_username: \"Jeff\",\n                  profile: \"https://www.jeff.jeff/\",\n                  picture: \"https://avatars.onflow.org/avatar/jeff\",\n                  website: \"https://www.jeff.jeff/\",\n                  gender: \"male\",\n                  birthday: \"1900-01-01\", // can use 0000 for year if year is not known\n                  zoneinfo: \"America/Vancouver\",\n                  locale: \"en\",\n                  updated_at: \"1625588304427\"\n              },\n              email: {\n                  email: \"jeff@jeff.jeff\",\n                  email_verified: false,\n              }\n          },\n      }\n  ]\n})\n```\n\n### Stopping an Authentication Process\n\nFrom any frame, you can send a `FCL:VIEW:CLOSE` post message to FCL, which will halt FCL's current routine and close the frame.\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.sendMsgToFCL(\"FCL:VIEW:CLOSE\")\n```\n\n# Authorization Service\n\nAuthorization services are depicted with with a `type: \"authz\"`, and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return a `f_type: \"CompositeSignature\"`.\n\nAn authorization service is expected to know the Account and the Key that will be used to sign the transaction at the time the service is sent to FCL (during authentication).\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"authz\",               // say it's an authorization service\n  uid: \"amazing-wallet#authz\", // standard service uid\n  method: \"HTTP/POST\",         // can also be `IFRAME/RPC` or `POP/RPC`\n  endpoint: \"https://____\",    // where to talk to the service\n  identity: {\n    f_type: \"Identity\",\n    f_vsn: \"1.0.0\",\n    address: \"0xUser\",         // the address that the signature will be for\n    keyId: 0,                  // the key for the address that the signature will be for\n  },\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request an array of composite signature from authorization service (Wrapped in a `PollingResponse`).\nThe authorization service will be sent a `Signable`.\nThe service is expected to construct an encoded message to sign from `Signable.voucher`.\nIt then needs to hash the encoded message, and prepend a required [transaction domain tag](../../../sdk/src/encode/encode.ts#L12-L13).\nFinally it signs the payload with the user/s keys, producing a signature.\nThis signature, as a HEX string, is sent back to FCL as part of the `CompositeSignature` which includes the user address and keyID in the data property of a `PollingResponse`.\n\n```elixir\nsignature =\n  signable.voucher\n    |> encode\n    |> hash\n    |> tag\n    |> sign\n    |> convert_to_hex\n```\n\nThe eventual response back from the authorization service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"CompositeSignature\",\n    f_vsn: \"1.0.0\",\n    addr: \"0xUSER\",\n    keyId: 0,\n    signature: \"signature as hex value\"\n  }\n}\n```\n\nA `CompositeSignature` can alternatively be constructed using `WalletUtils`\n\n```javascript\nimport {WalletUtils} from \"@onflow/fcl\"\n\nWalletUtils.CompositeSignature(addr: String, keyId: Number, signature: Hex)\n\n```\n\n# User Signature Service\n\nUser Signature services are depicted with a `type: \"user-signature\"` and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return an array of `f_type: \"CompositeSignature\"`.\n\nThe User Signature service is a stock/standard service.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"user-signature\",               // say it's an user-signature service\n  uid: \"amazing-wallet#user-signature\", // standard service uid\n  method: \"HTTP/POST\",                  // can also be `IFRAME/RPC`\n  endpoint: \"https://___\",              // where to talk to the service\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request an array of composite signatures from the user signature service (Wrapped in a `PollingResponse`).\nThe user signature service will be sent a `Signable`.\nThe service is expected to tag the `Signable.message` and then sign it with enough keys to produce a full weight.\nThe signatures need to be sent back to FCL as HEX strings in an array of `CompositeSignatures`.\n\n```javascript\n// Pseudocode:\n// For every required signature\nimport {WalletUtils} from \"@onflow/fcl\"\n\nconst encoded = WalletUtils.encodeMessageFromSignable(signable, signerAddress)\nconst taggedMessage = tagMessage(encoded) // Tag the message to sign\nconst signature = signMessage(taggedMessage) // Sign the message\nconst hexSignature = signatureToHex(signature) // Convert the signature to hex, if required.\n\nreturn hexSignature\n```\n\nThe eventual response back from the user signature service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: [\n    {\n      f_type: \"CompositeSignature\",\n      f_vsn: \"1.0.0\",\n      addr: \"0xUSER\",\n      keyId: 0,\n      signature: \"signature as hex value\"\n    },\n    {\n      f_type: \"CompositeSignature\",\n      f_vsn: \"1.0.0\",\n      addr: \"0xUSER\",\n      keyId: 1,\n      signature: \"signature as hex value\"\n    }\n  ]\n}\n```\n\n# Pre Authz Service\n\nThis is a strange one, but extremely powerful. This service should be used when a wallet is responsible for an account that's signing as multiple roles of a transaction, and wants the ability to change the accounts on a per role basis.\n\nPre Authz Services are depicted with a `type: \"pre-authz\"` and a `method` of either `HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, `TAB/RPC` or `EXT/RPC`.\nThey are expected to eventually return a `f_type: \"PreAuthzResponse\"`.\n\nThe Pre Authz Service is a stock/standard service.\n\n```javascript\n{\n  f_type: \"Service\",\n  f_vsn: \"1.0.0\",\n  type: \"pre-authz\",               // say it's a pre-authz service\n  uid: \"amazing-wallet#pre-authz\", // standard service uid\n  method: \"HTTP/POST\",             // can also be IFRAME/RPC, POP/RPC, TAB/RPC\n  endpoint: \"https://___\",         // where to talk to the service\n  data: {},\n  params: {},\n}\n```\n\nFCL will use the `method` provided to request a `PreAuthzReponse` (Wrapped in a `PollingResponse`).\nThe Authorizations service will be sent a `PreSignable`.\nThe pre-authz service is expected to look at the `PreSignable` and determine the breakdown of accounts to be used.\nThe pre-authz service is expected to return `Authz` services for each role it is responsible for.\nA pre-authz service can only supply roles it is responsible for.\nIf a pre-authz service is responsible for multiple roles, but it wants the same account to be responsible for all the roles, it will need to supply an Authz service per role.\n\nThe eventual response back from the pre-authz service should resolve to something like this:\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"PreAuthzResponse\",\n    f_vsn: \"1.0.0\",\n    proposer: {              // A single Authz Service\n      f_type: \"Service\",\n      f_vsn: \"1.0.0\",\n      type: \"authz\",\n      ...\n    },\n    payer: [                // An array of Authz Services\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      }\n    ],\n    authorization: [       // An array of Authz Services (it's singular because it only represents a singular authorization)\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      }\n    ],\n  }\n}\n```\n\n# Authentication Refresh Service\n\nSince synchronization of a user's session is important to provide a seamless user experience when using an app and transacting with the Flow Blockchain, a way to confirm, extend, and refresh a user session can be provided by the wallet.\n\nAuthentication Refresh Services should include a `type: \"authn-refresh\"`, `endpoint`, and supported `method` (`HTTP/POST`, `IFRAME/RPC`, `POP/RPC`, or `EXT/RPC`).\n\nFCL will use the `endpoint` and service `method` provided to request updated authentication data.\nThe `authn-refresh` service should refresh the user's session if necessary and return updated authentication configuration and user session data.\n\nThe service is expected to return a `PollingResponse` with a new `AuthnResponse` as data. If user input is required, a `PENDING` `PollingResponse` can be returned with a `local` view for approval/re-submission of user details.\n\nThe Authentication Refresh Service is a stock/standard service.\n\n```javascript\n  {\n    \"f_type\": \"Service\",\n    \"f_vsn\": \"1.0.0\",\n    \"type\": \"authn-refresh\",\n    \"uid\": \"uniqueDedupeKey\",\n    \"endpoint\": \"https://rawr\",\n    \"method\": \"HTTP/POST\",  // \"HTTP/POST\", // HTTP/POST | IFRAME/RPC | HTTP/RPC\n    \"id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\", // wallet's internal id for the user\n    \"data\": {}, // included in body of request\n    \"params\": {}, // included as query params on endpoint url\n  }\n```\n\nThe provided `data` and `params` should include all the wallet needs to identify and re-authenticate the user if necessary.\n\nThe eventual response back from the `authn-refresh` service should resolve to an `AuthnResponse` and look something like this:\n\n```javascript\n{\n  f_type: \"PollingResponse\",\n  f_vsn: \"1.0.0\",\n  status: \"APPROVED\",\n  data: {\n    f_type: \"AuthnResponse\",\n    f_vsn: \"1.0.0\",\n    addr: \"0xUSER\",\n    services: [\n      // Authentication Service - REQUIRED\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn\",\n        ...\n      },\n      // Authorization Service\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authz\",\n        ...\n      },\n      // Authentication Refresh Service\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn-refresh\",\n        ...\n      }\n      // Additional Services\n    ],\n  }\n}\n```\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/draft.md",
    "content": "# Second Generation FCL Compatible Wallet Provider Docs\n\n## Status\n\n- **Last Updated:** Sept 3rd 2020\n- **Stable:** No\n- **Risk of Breaking Change:** Medium\n\nThis is a rough draft, the concepts here are an extension and refinement on the First\nGeneration FCL Compatible Wallet Provider Docs. We will try as hard as possible to not\nintroduce any breaking changes for wallets that already exist, but this is not a document\nthat should be built against quite yet.\n\n# Overview\n\nCurrently, at a minimum, there are two main aspects that wallet providers need to supply\nin order to be considered an FCL compatible wallet: Authentication and Authorization.\n\nAuthentication configures FCL, telling it which Flow account to use and how FCL can\nperform certain tasks (like authorizing a transaction) once the user initiates them\nvia the application.\n\nAuthorization is an ability that allows FCL to authorize transactions. FCL knows how\nto send the data that needs to be signed and how to retrieve the signature with the\nFCL compatible wallet provider because it was configured to know how during the\nauthentication step.\n\nWe aim to add more abilities (services) than Authentication and Authorization in the future, as\nwell as expanding on transport strategies and various ways in which FCL can be configured\nto communicate with various services like wallets.\n\n```\n  Note: Wallet Providers act as both           Currently only Authentication and Authorization\n    - an Authentication Service (authn)        Serivices have been spec'd out. Other services\n    - an Authorization Service (authz)         listed below are just ideas of possible services.\n\n  +-----------------+   +-----------------+   +-----------------+   +-----------------+\n  | Wallet Provider |   | Wallet Provider |   | Wallet Provider |   | Wallet Provider |\n  +-------+---------+   +-------+---------+   +-------+---------+   +-------+---------+\n          |                     |                     |                     |\n          +---------------------+--------------------------------------------\n                                |\n                        +-------+---------+                             +----------------------+\n  +-------------+   +-->| Wallet Discovery|<--+   +-------------+   +-->| Private Info Service |\n  | Application |   |   +-----------------+   |   | Application |   |   +----------------------+\n  |  (Minimal)  |   |                         |   |  (Advanced) |   |\n  | +---------+ |   |   +-----------------+   |   | +---------+ |   |   +--------------+\n  | |   FCL   |<----+-->| Profile Service |<--+---->|   FCL   |<----+-->| IPFS Service |\n  | +---------+ |       +-----------------+       | +---------+ |   |   +--------------+\n  |      ^      |                                 |      ^      |   |\n  |      |      |       +-----------------+       |      |      |   |   +----------------------+\n  |      |      |   +-->|   Access Node   |<--+   |      |      |   +-->| Notification Service |\n  |      v      |   |   +-----------------+   |   |      v      |   |   +----------------------+\n  | +---------+ |   |            ^            |   | +---------+ |   |\n  | |   SDK   |<----+            |            +---->|   SDK   | |   |   +-----------------+\n  | +---------+ |                v                | +---------+ |   +-->| Payment Service |\n  + ------------+       +-----------------+       + ------------+       +-----------------+\n                        | Flow Blockchain |\n                        +-----------------+\n```\n\n# General User Flow\n\n### User signs up or in.\n\n`fcl.authenticate()` is triggered. It looks up the **Challenge Handshake Url** with\n`config().get(\"challenge.handshake\")`. FCL will render an iframe using the **Challenge\nHandshake Url** at the src, also passing in a couple query parameters.\n\n> During development (and on mainnet) FCL can be configured to use the wallet directly by\n> setting the **Challenge Handshake Url** to the wallet providers **Authentication Endpoint**\n> by configuring fcl like this `config().put(\"challenge.handshake\", \"https://my-awesome-wallet-provider.com/fcl/authenticate\")`.\n> On mainnet though our idea is this configuration can be removed and FCL will fallback to\n> a **Challenge Handshake** that enables the discovery of FCL compatible wallets, meaning\n> users on mainnet should be able to use the same FCL compatible wallet they trust on any\n> application that uses FCL.\n\nThis iframe is responsible for the **Authentication** process, the wallet , it\nneeds to be able to send (via `postMessage`) the users **Flow Address** and some\nconfiguration (and/or instructions on how to get configuration) that tells FCL\nhow to **Authorize Transactions**.\n\nFCL (and by extension the application) now has a `Current User` and should know\nhow to talk to the wallet in a way that a transaction can be signed.\n\n```\nApplication                  FCL                       Wallet Provider      Flow Blockchain\n  |                           |                              |                  |\n  *---[Authenticate]--------->*---[Render Auth(n) iframe]--->|                  |\n  |                           |                              |                  |\n  |                           |<---[postMessage(config)]-----*                  |\n============ [IFRAME/RPC] =================================================================\n  |                           |                              |                  |\n  |---[Trigger Tx]----------->*---[Render Auth(z) iframe]--->|                  |\n  |                           |                              |                  |\n  |                           *---[postMessage(tx)]--------->|                  |\n  |                           |                              |                  |\n  |                           |<---[postMessage(signature)---*                  |\n  |                           |                              |                  |\n  |                           *---[send(tx)]----------------------------------->|\n  |                           |                                                 |\n  |<-----------------[txId]---*<------------------------------[respond(txId)]---*\n  |                           |                                                 |\n============ [HTTP/POST] ==================================================================\n  |                           |                              |                  |\n  |---[Trigger Tx]----------->*---[Post(tx)]---------------->|                  |\n  |                           |                              |                  |\n  |<-[render iframe(status)]--*<-[respond(status): Pending]--*                  |\n  |                           |                              |                  |\n  |                           *---[getStatus(status)]------->|                  |\n  |                           |                              |                  |\n  |<---------[close Iframe]---*<------[respond(signature)]---*                  |\n  |                           |                              |                  |\n  |                           *---[send(tx)]----------------------------------->|\n  |                           |                                                 |\n  |<-----------------[txId]---*<------------------------------[respond(txId)]---*\n  |                           |                                                 |\n```\n\n### User performs a transaction.\n\nCurrently FCL can be configured in two mutually exclusive ways to handle transactions.\nThe first is what we call `IFRAME/RPC` while the other is `HTTP/POST`.\n\n> We have plans to expand to more strategies in the future, and if you are building a\n> wallet provider and neither of these work for you we would love to have a chat with you.\n\nWhen a transaction needs a signature from the **Current User** it will first make sure\ntheir is a **Current User**, possibly triggering the **Authentication** flow if needed.\nOnce it has a **Current User** FCL will look at the configuration it received during\n**Authentication**, which as mentioned above will be either an `IFRAME/RPC` or an\n`HTTP/POST`. It will then communicate with the wallet (using the configuration) in order\nto get the signature it needs.\n\n`IFRAME/RPC` has the least moving parts. When a transaction needs a signature from\nthe **Current User** it will render an iframe at the url provided by the configuration,\nsend it a message (via `postMessage`) and wait for a response that contains the signature.\n\n`HTTP/POST` is a little more complex, but opens the door for what we hope to be some\ngame changing user experiences. When a transaction needs a signature from the\n**Current User** it will first post (via an `http` backchannel) what needs to be signed\nto an endpoint specified by the configuration. The response of this http request returns\nthe status of the signature request, instructions on how to get an update on the signature\nrequest, and some optional instructions that can be used to render an iframe. Forgetting\nabout the iframe for a second, FCL will poll for updates against the configuration supplied\nby the response, until the polling returns a signature. Circling back around to the optional\niframe info the back channel returned with, if it is there FCL will render the iframe, and\nclose it once the back channel polling completes. In this method, because we have decoupled\nthe approval/signing of the transaction from what the user sees (other than the optional iframe),\nwe believe this approach should enable user experiences where, as an example, a push message\nis sent to a phone, the phone signs the transaction using its HSM, sending the signature back\nto the wallet providers servers, then the backchannel polling picking up signature when asking\nfor the signature status.\n\n# A more in-depth look.\n\n### Authentication -- The Challenge Handshake\n\nAssumptions:\n\n- The Wallet Provider has an FCL Authentication URL: `https://example.wallet/fcl/authn`\n- The Application lives at: `https://example.app`\n\nFirst, FCL needs to be configured to point to the Wallet Providers Authentication URL:\n\n```javascript\nimport {config} from \"@onflow/config\"\n\nconfig().put(\"challenge.handshake\", \"https://example.wallet/fcl/authn\")\n```\n\nThe user then decides to authenticate, by clicking a signin link or something. This user\naction would then trigger the fcl.authenticate call.\n\n```javascript\nimport React from \"react\"\n\nexport const Authenticate = () => (\n  <button onClick={() => fcl.authenticate()}>Sign In/Up</button>\n)\n```\n\nWhen `fcl.authenticate()` is triggered, FCL will render an iframe using\n`config().get(\"challenge.handshake\")` as its source. Some additional query params\nare added to the url. Inside of this iframe, everything is up to the wallet, once\nthe wallet is confident the user is who they say they are, they need to send\n(via `postMessage`) back to FCL a bunch of information. This information sent back\nis then used to configure FCL in the application for future user actions.\n\nUsers will be shown a page that the wallet controls inside of an iframe,\nthat page is responsible to send a message back to the application (via `postMessage`)\nthat either configures FCL or tells FCL how to find how to configure.\n\nThe basic shape of the `postMessage` response looks like this:\n\n```graphql\nscalar FlowAddress # Flow Address sans 0x prefix ie: ba1132bc08f82fe2\nscalar URL         # A fully qualified url https://example.wallet/fcl/hooks\nalias UnixEpoch = number # in seconds\n\ntype Data {\n  \"\"\"\n  Arbitrary key value data\n  \"\"\"\n  [string]: string | number\n}\n\ntype Handshake {\n  \"\"\"\n  The Flow Address of the Current User\n  \"\"\"\n  addr:  FlowAddress!\n\n  \"\"\"\n  The Flow Address of the Wallet Provider\n  \"\"\"\n  paddr: FlowAddress\n\n  \"\"\"\n  A list of services that FCL will use to configure\n  itself for the Current User.\n  \"\"\"\n  services: [Service]\n\n  \"\"\"\n  hks and code work together to enable FCL to discover\n  how to configure itself for the Current User. If these\n  are both supplied an http get request will be made\n  to the hks url with the code as a query parameter.\n  It should return an array of services. These services\n  will be chosen over those returned directly in the\n  handshake\n  \"\"\"\n  hks: URL\n  code: string\n\n  \"\"\"\n  A unix epoch in the future, when the above code expires.\n  If the value is 0 or null FCL will assume this code never becomes invalid.\n  \"\"\"\n  expires: UnixEpoch\n}\n\ninterface Service {\n  \"\"\"\n  A service is considered the same if there id and type\n  match each other. Services that are discovered via\n  a hooks call will overload those supplied by the\n  handshake. These two fields are always required for\n  all services.\n  \"\"\"\n  id: string!\n  type: string!\n\n  \"\"\"\n  A timestamp for when this service will become invalid.\n  If the value is 0 or null FCL will assume this service never becomes invalid.\n  \"\"\"\n  expires: UnixEpoch\n}\n\ntype ServiceAuthn implements Service {\n  id: string!\n  type: \"authn\"\n  expires: UnixEpoch\n\n  \"\"\"\n  The Flow Address of the provider\n  \"\"\"\n  addr: FlowAddress!\n\n  \"\"\"\n  Where FCL can go to attempt to athenticate again.\n  This value would be the same as the used in the\n  challenge handshake.\n  \"\"\"\n  authn: URL!\n\n  \"\"\"\n  Name of the wallet provider\n  \"\"\"\n  name: string\n\n  \"\"\"\n  A fully qualified url to an image that an application can\n  use to show the wallet provider inside of their interface.\n  \"\"\"\n  icon: URL\n\n  \"\"\"\n  An internal id for the wallet provider. If internally\n  the wallet\n  \"\"\"\n  pid: ID,\n}\n\ninterface ServiceAuthz implements Service {\n  id: string!\n  type: \"authz\"\n  expires: UnixEpoch\n\n  \"\"\"\n  Is used by FCL to understand how to utilize the rest of\n  the service configuration and talk to the wallet provider\n  \"\"\"\n  method: string!\n\n  \"\"\"\n  The Flow Address that should be used to authorize\n  the transaction\n  \"\"\"\n  addr: FlowAddress!\n\n  \"\"\"\n  The keyId for the Flow Accounts corresponding public\n  key that Flow will use to verify the transaction\n  \"\"\"\n  keyId: integer!\n\n  \"\"\"\n  data that will be sent back to the wallet during the\n  authorization request.\n  \"\"\"\n  data: Data\n}\n\ntype ServiceAuthzIframeRPC implements ServiceAuthz {\n  id: string!\n  type: \"authz\"\n  method: \"IFRAME/RPC\"\n  addr: FlowAddress!\n  keyId: integer!\n  params: Data\n  expires: UnixEpoch\n\n  \"\"\"\n  The webpage that FCL will render in an iframe\n  \"\"\"\n  endpoint: URL!\n}\n\ntype ServiceAuthzHttpPost implements SerivceAuthz {\n  id: string!\n  type: \"authz\"\n  method: \"HTTP/POST\"\n  addr: FlowAddress!\n  keyId: integer!\n  params: Data\n  expires: UnixEpoch\n\n  \"\"\"\n  FCL will do a post request to this URL when it\n  needs something signed.\n  \"\"\"\n  endpoint: URL!\n}\n```\n\nAn example handshake response:\n\n```javascript\nconst handshakeResponse = {\n  addr: \"0xba1132bc08f82fe2\", // users flow address\n  paddr: \"0xf086a545ce3c552d\", // wallet providers flow address\n  hks: \"https://example.wallet/fcl/hooks\",\n  code: \"SOME_TOKEN\",\n  expires: 1599180117,\n  services: [\n    {\n      type: \"authn\",\n      id: \"example-wallet#authn\", // used to dedupe services Private > Public\n      addr: \"0xf086a545ce3c552d\", // wallet providers flow address\n      authn: \"https://example.wallet/fcl/authn\",\n      name: \"Example Wallet\",\n      icon: \"https://example.wallet/assets/icon.png\",\n      pid: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\", // wallet providers internal id representation for the user\n      // it needs to stay the same every time the user authenticates\n    },\n    {\n      type: \"authz\",\n      id: \"example-wallet#authz\",\n      method: \"IFRAME/RPC\",\n      addr: \"0xba1132bc08f82fe2\", // users flow address, this is who needs to sign the transaction\n      keyId: 3, // which key in the users flow address needs to sign the transaction\n      endpoint: \"https://example.wallet/fcl/authz\",\n      data: {\n        id: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\", // data that will be sent to the endpoint along with the signable\n      },\n    },\n  ],\n}\n\nwindow.opener(handshakeResponse)\n```\n\nAnd the same but with an `authz -- HTTP/POST` service:\n\n```javascript\nconst handshakeResponse = {\n  addr: \"0xba1132bc08f82fe2\",\n  paddr: \"0xf086a545ce3c552d\",\n  hks: \"https://example.wallet/fcl/hooks\",\n  code: \"SOME_TOKEN\",\n  expires: 1599180117,\n  services: [\n    {\n      type: \"authn\",\n      id: \"example-wallet#authn\",\n      addr: \"0xf086a545ce3c552d\",\n      authn: \"https://example.wallet/fcl/authn\",\n      name: \"Example Wallet\",\n      icon: \"https://example.wallet/assets/icon.png\",\n      pid: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\",\n    },\n    {\n      type: \"authz\",\n      id: \"example-wallet#authz\",\n      method: \"HTTP/POST\", // The change is here\n      addr: \"0xba1132bc08f82fe2\",\n      keyId: 3,\n      endpoint: \"https://example.wallet/fcl/authz\",\n      data: {\n        id: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\",\n      },\n    },\n  ],\n}\n\nwindow.opener(handshakeResponse)\n```\n\n# Authorizing a Transaction\n\nAuthorization Services have a sole job. Describing how a wallet can receive a `Signable` from FCL and send back a `Composite Signature`.\n\n```graphql\nscalar FlowAddress # Flow Address sans 0x prefix ie: ba1132bc08f82fe2\nscalar Hex # A hex representation of a binary array (Buffer)\ntype Signable {\n  message: Hex\n  tag: string\n  addr: FlowAddress\n  keyId: number\n  roles: Roles\n  interaction: Object\n}\n\ntype Roles {\n  proposer: boolean\n  authorizer: boolean\n  payer: boolean\n}\n\ntype CompositeSignature {\n  addr: FlowAddress\n  keyId: number\n  signature: Hex\n}\n```\n\n### `IFRAME/RPC`\n\nGiven this service:\n\n```javascript\nconst service = {\n  type: \"authz\",\n  id: \"example-wallet#authz\",\n  method: \"IFRAME/RPC\",\n  addr: \"0xba1132bc08f82fe2\",\n  keyId: 3,\n  endpoint: \"https://example.wallet/fcl/authz\",\n  data: {\n    id: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\",\n  },\n}\n```\n\nWhen a user triggers a transaction, and FCL has the above service.\n\nFCL will\n\n- Open an iframe at `https://example.wallet/fcl/authz`\n- Post a message to the iframe\n- Wait for a response back that includes a status and relevant info.\n- Handle response\n\nThe message FCL will post to the iframe will look like this:\n\n```javascript\nconst msg = {\n  jsonrpc: \"2.0\",\n  id: \"6a545ce3c82fe\",\n  method: \"fcl:sign\",\n  params: [signable, service.data],\n}\n\n$frame.targetWindow.postMessage(msg)\n```\n\nThe wallet should then sign the `signable.message` and send back a response that looks similar to this:\n\n```javascript\nconst msg = {\n  jsonrpc: \"2.0\",\n  id: \"6a545ce3c82fe\",\n  result: {\n    status: \"APPROVED\",\n    reason: null,\n    compositeSignature: {\n      addr: \"0xba1132bc08f82fe2\",\n      keyId: 3,\n      signature:\n        \"95ee6929dda9548abbf79802be19400fb717b003476eb1f2e080bf15f7d40b1c087e7ff2b42bea8756c6509a5135c5ee6994897367f669279fadb392f4651d48\",\n    },\n  },\n}\n\nwindow.opener.postMessage(msg)\n```\n\nIf the user declines the transaction the message sent back should look as follows:\n\n```javascript\nconst msg = {\n  jsonrpc: \"2.0\",\n  id: \"6a545ce3c82fe\",\n  result: {\n    status: \"DECLINED\",\n    reason: \"They didn't want to sign that...\",\n    compositeSignature: null,\n  },\n}\n\nwindow.opener.postMessage(msg)\n```\n\n### `HTTP/POST`\n\nGiven this service:\n\n```javascript\nconst service = {\n  type: \"authz\",\n  id: \"example-wallet#authz\",\n  method: \"HTTP/POST\",\n  addr: \"0xba1132bc08f82fe2\",\n  keyId: 3,\n  endpoint: \"https://example.wallet/fcl/authz\",\n  data: {\n    id: \"0609d667-944c-3c2d-9d09-18af5c58c8fb\",\n  },\n}\n```\n\nWhen a user triggers a transaction, and FCL has the above service.\n\nFCL will\n\n- Post the `Signable` to `https://example.wallet/fcl/authz`\n- Receive a StatusResponse that includes an AuthzUpdates and a Status\n- (Optional Side Effect) If Status includes local instructions follow them\n- If Status is PENDING use AuthzUpdates to fetch a new Status Response and repeat this step\n- If Status is APPROVED continue with `Composite Signature`\n\nWith the above service FCL will make a `application/json` POST request to\n`https://example.wallet/fcl/authz?id=0609d667-944c-3c2d-9d09-18af5c58c8fb`\nwith the `Signable` as the body and expect to receive something like this back:\n\n```javascript\nconst statusResponse = {\n  status: \"PENDING\",\n  reason: null,\n  compositeSignature: null,\n  authorizationUpdates: {\n    method: \"HTTP/POST\",\n    endpoint: \"https://example.wallet/fcl/authz/736\",\n  },\n  local: [\n    {\n      method: \"BROWSER/IFRAME\",\n      endpoint: \"https://example.wallet/authz/736\",\n    },\n  ],\n}\n```\n\nFCL will first see that there is an optional local side effect of `BROWSER/IFRAME`,\nso FCL will render an iframe that renders `https://example.wallet/authz/736`.\nThis iframe is probably showing a convenience interface the user can authorize the\ntransaction from inside the application.\n\nNext FCL will next notice that the signature request is `PENDING`, so it will then\nuse the data in `authorizationUpdates` to request a new status. Which could return\nsomething like this:\n\n```javascript\nconst statusResponse = {\n  status: \"PENDING\",\n  reason: null,\n  compositeSignature: null,\n  authorizationUpdates: {\n    method: \"HTTP/POST\",\n    endpoint: \"https://example.wallet/fcl/authz/736\",\n  },\n}\n```\n\nOnce again FCL received back a `PENDING` status response, so its going to request\nthe status again and again and again until the status is either `APPROVED` or `DECLINED`.\n\n> It is **IMPORTANT** to note that using an `HTTP/POST` service means the wallet provider\n> is responsible for getting the signature and making it available via subsequent\n> `authorizationsUpdates` calls.\n\nAn `APPROVED` status response looks like this:\n\n```javascript\nconst statusResponse = {\n  status: \"APPROVED\",\n  compositeSignature: {\n    addr: \"0xba1132bc08f82fe2\",\n    keyId: 3,\n    signature:\n      \"95ee6929dda9548abbf79802be19400fb717b003476eb1f2e080bf15f7d40b1c087e7ff2b42bea8756c6509a5135c5ee6994897367f669279fadb392f4651d48\",\n  },\n}\n```\n\nWhile a `DECLINED` status response looks like this:\n\n```javascript\nconst statusResponse = {\n  status: \"DECLINED\",\n  reason: \"They said no\",\n}\n```\n\nIf FCL opened an optional local side effect iframe, it will\nautomatically close it once the status response is something\nother than `PENDING`.\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/non-custodial.md",
    "content": "Sorry, We will be adding these docs ASAP.\nIf you are interested in this, reach out to us on [Discord](https://discord.gg/k6cZ7QC).\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/provable-authn.md",
    "content": "# Provable Authn\n\nIn order to improve UX/DX and encourage seamless integration with App backends and services, `fcl.authenticate` has been upgraded.\n\nAdditional data is sent in the body of `FCL:VIEW:READY:RESPONSE`. This data includes what the wallet needs to build a message for signing with the user’s private key/s.\nThe signature can be returned as part of an optional `account-proof` service with the `FCL:VIEW:RESPONSE`.\n\nWhen provided by the wallet, this **signature** and additional **account-proof data** is available to the App via `fcl.currentUser` services. The service data can be used to recreate the message, and verify the signature on the Flow Blockchain.\n\nFor example, it can be sent to the App’s backend and after validating the signature and the other account-proof data, it can safely associate the included account address to a user and log them in.\n\n---\n\n## TL;DR Wallet Provider\n\n1. Wallet receives Authn `FCL:VIEW:READY:RESPONSE` request and parses out the `appIdentifier`, and `nonce`.\n2. The wallet authenticates the user however they choose to do, and determines the user's account `address`\n3. Wallet prepares and signs the message:\n      - Encodes the `appIdentifier`, `nonce`, and `address` along with the `\"FCL-ACCOUNT-PROOF-V0.0\"` domain separation tag, [using the encoding scheme described below](#account-proof-message-encoding).\n      - Signs the message with the `signatureAlgorithm` and `hashAlgorithm` specified on user's key. **It is highly recommended that the wallet display the message data and receive user approval before signing.**\n4. Wallet sends back this new service and data along with the other service configuration when completing Authn.\n\n### Account Proof Message Encoding\n\nThe account proof message is encoded as follows:\n\n```text\nMESSAGE = \n  USER_DOMAIN_TAG ||\n  RLP_ENCODE([\n    APP_IDENTIFIER, \n    ADDRESS, \n    NONCE\n  ])\n```\n\nwith the following values:\n\n- `ACCOUNT_PROOF_DOMAIN_TAG` is the constant `\"FCL-ACCOUNT-PROOF-V0.0\"`, encoded as UTF-8 byte array and right-padded with zero bytes to a length of 32 bytes.\n- `APP_IDENTIFIER` is an arbitrary length string.\n- `ADDRESS` is a byte array containing the address bytes, left-padded with zero bytes to a length of 8 bytes.\n- `NONCE` is an byte array with a minimum length of 32 bytes.\n\n`RLP_ENCODE` is a function that performs [RLP encoding](https://eth.wiki/fundamentals/rlp) and returns the encoded value as bytes.\n\n### JavaScript Signing Example\n\n```javascript\n// Using WalletUtils\nimport {WalletUtils} from \"@onflow/fcl\"\n\nconst message = WalletUtils.encodeAccountProof(\n  appIdentifier, // A human readable string to identify your application during signing\n  address,       // Flow address of the user authenticating\n  nonce,         // minimum 32-byte nonce\n)\n\nsign(privateKey, message)\n\n// Without using FCL WalletUtils\nconst ACCOUNT_PROOF_DOMAIN_TAG = rightPaddedHexBuffer(\n  Buffer.from(\"FCL-ACCOUNT-PROOF-V0.0\").toString(\"hex\"),\n  32\n)\nconst message =  rlp([appIdentifier, address, nonce])\nconst prependUserDomainTag = (message) => ACCOUNT_PROOF_DOMAIN_TAG + message\n\nsign(privateKey, prependUserDomainTag(message))\n```\n\n```json\n// Authentication Proof Service\n{\n  f_type: \"Service\",                       // Its a service!\n  f_vsn: \"1.0.0\",                          // Follows the v1.0.0 spec for the service\n  type: \"account-proof\",                   // the type of service it is\n  method: \"DATA\",                          // Its data!\n  uid: \"awesome-wallet#account-proof\",     // A unique identifier for the service            \n  data: {\n    f_type: \"account-proof\",\n    f_vsn: \"1.0.0\"\n    // The user's address (8 bytes, i.e 16 hex characters)\n    address: \"0xf8d6e0586b0a20c7\",                 \n    // Nonce signed by the current account-proof (minimum 32 bytes in total, i.e 64 hex characters)\n    nonce: \"75f8587e5bd5f9dcc9909d0dae1f0ac5814458b2ae129620502cb936fde7120a\",\n    signatures: [CompositeSignature],\n  }\n}\n```\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/user-signature.md",
    "content": "# User Signature\n\n## Status\n\n- **Last Updated:** June 1st 2021\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n- **Compatibility:** `>= @onflow/fcl@0.0.71`\n\n# Overview and Introduction\n\n**Personally sign data via FCL Compatible Wallets**\n\n**FCL** now includes **`signUserMessage()`** which allows for the sending of unencrypted message data to a connected wallet provider or service to be signed with a user's private key. \n\nAn application or service can verify a signature against a user's public key on the **Flow Blockchain**, providing proof a user controls the account's private key.   \n\n**Use Cases**\n\n- **Authentication**: Cryptographically verify the ownership of a **Flow** account by signing a piece of data using a private key\n- **Improved Application Login**\n  - **Increased security**: Arguably more secure than proof of ownership by email/password\n  - **Simplified UX**: No application password required\n  - **Increased privacy**: No email or third party authentication service needed\n- **Message Validation**: Assuring that a message sent or received has not been tampered with\n- **Multisig contracts**\n- **Decentralised exchanges**\n- **Meta transactions**\n\n\n# Config and Authentication\n\nAs a prerequisite, **FCL** is configured to point to the Wallet Provider's Authentication Endpoint. No additional configuration is required.\n\n> During development (and on mainnet) FCL can be configured to use the wallet directly by\n> setting the **Wallet Discovery Url** to the wallet provider's **Authentication Endpoint**\n> by configuring fcl like this `config().put(\"discovery.wallet\", \"https://my-awesome-wallet-provider.com/fcl/authenticate\")`.\n\nCommon Configuration Keys and additional info can be found here [How to Configure FCL](https://github.com/onflow/flow-js-sdk/blob/master/docs/configure-fcl.mdx#common-configuration-keys)\n\n1. A user initiates authentication with the wallet provider via application UI\n2. The wallet confirms a user's identity and sends back information used to configure **FCL** for future user actions in the application\n3. Included in the authentication response should be the provider's [Key Services](#) including a **`user-signature`** service for use with **`signUserMessage()`**\n\n# User Signature Service\n\nA [user-signature service](https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/current-user/normalize/user-signature.js#L4-L14) is a standard service, with methods for **IFRAME/RPC** or **HTTP/POST**.\n\nThe `user-signature` service receives a signable message from **FCL** and returns a standard [PollingResponse](https://github.com/onflow/flow-js-sdk/blob/8e53ac59636e28cdcfa2494de6cb278e71bc14c2/packages/fcl/src/current-user/normalize/polling-response.js#L5) with an array of [CompositeSignatures](https://github.com/onflow/flow-js-sdk/blob/8e53ac59636e28cdcfa2494de6cb278e71bc14c2/packages/fcl/src/current-user/normalize/composite-signature.js#L4) or `null` as the data.\n\nA status of **Approved** needs to have an array of composite signatures as data. \n\nA status of **Declined** needs to include a reason why. \n\nA **Pending** status needs to include an updates service and can include a local. \nA service using the **`IFRAME/RPC`** method can only respond with approved or declined, as pending is not valid for iframes.\n\n\nWhen `signUserMessage()` is called by the application, **FCL** uses the service method to decide how to send the signable to the wallet.\n\nThe Wallet is responsible for prepending the signable with the correct `UserDomainTag`, hashing, and signing the message.\n\n# Signing Sequence\n\n1. Application sends message to signing service. **FCL expects a hexadecimal string**\n3. Wallet/Service tags the message with required `UserDomainTag` (see below), hashes, and signs using the `signatureAlgorithm` specified on account key\n2. Wallet makes available a Composite Signature consisting of `addr`, `keyId`, and `signature` **as a hex string**\n\n### UserDomainTag\nThe **`UserDomainTag`** is the prefix of all signed user space payloads.\n\nBefore hashing and signing the message, the wallet must add a specified DOMAIN TAG.\n\n> currently **\"FLOW-V0.0-user\"**\n\nA domain tag is encoded as **UTF-8 bytes, right padded to a total length of 32 bytes**, prepended to the message.\n\nThe signature can now be verified on the Flow blockchain. The following illustrates an example using `fcl.verifyUserSignatures`\n\n```javascript\n/**\n * Verify a valid signature/s for an account on Flow.\n *\n * @param {string} msg - A message string in hexadecimal format\n * @param {Array} compSigs - An array of Composite Signatures\n * @param {string} compSigs[].addr - The account address\n * @param {number} compSigs[].keyId - The account keyId\n * @param {string} compSigs[].signature - The signature to verify\n * @return {bool}\n *\n * @example\n *\n *  const isValid = await fcl.verifyUserSignatures(\n *    Buffer.from('FOO').toString(\"hex\"),\n *    [{f_type: \"CompositeSignature\", f_vsn: \"1.0.0\", addr: \"0x123\", keyId: 0, signature: \"abc123\"}]\n *  )\n */\n```\n\n## TL;DR Wallet Provider\n\n- Register with **FCL** and provide signing service endpoint. No further configuration is needed.\n- On receipt of message, prompt user to approve or decline\n- Prepend `UserDomainTag`, hash and sign the message with the signatureAlgorithm specified on user's key\n- Return a standard `PollingResponse` with an array of `CompositeSignatures` as data or `null` and `reason` if declined\n\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-provider-spec/wallet-discover.md",
    "content": "Sorry, We will be adding these docs ASAP.\nIf you are interested in this, reach out to us on [Discord](https://discord.gg/k6cZ7QC).\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/CompositeSignature.ts",
    "content": "import {withPrefix} from \"@onflow/util-address\"\nimport {COMPOSITE_SIGNATURE_PRAGMA} from \"../normalizers/service/__vsn\"\n\n/**\n * @description Creates a new CompositeSignature instance. CompositeSignature is a standardized\n * signature format used in the Flow ecosystem to represent cryptographic signatures along with\n * the signing account information. It includes the signature data, the account address, and\n * the key ID used for signing.\n *\n * @param addr Flow account address that created the signature (will be normalized with 0x prefix)\n * @param keyId The key ID/index used to create the signature (will be converted to number)\n * @param signature The cryptographic signature as a hexadecimal string\n *\n * @property f_type FCL type identifier, always \"CompositeSignature\"\n * @property f_vsn FCL version identifier for the signature format\n * @property addr Flow account address with 0x prefix\n * @property keyId Key ID used for signing (as number)\n * @property signature Signature data as hex string\n *\n * @example\n * // Create a composite signature for transaction signing\n * import { CompositeSignature } from \"@onflow/fcl\"\n *\n * const compSig = new CompositeSignature(\n *   \"1234567890abcdef\", // will be normalized to \"0x1234567890abcdef\"\n *   0,                  // key ID\n *   \"abc123def456...\"   // signature hex string\n * )\n *\n * console.log(compSig)\n * // {\n * //   f_type: \"CompositeSignature\",\n * //   f_vsn: \"1.0.0\",\n * //   addr: \"0x1234567890abcdef\",\n * //   keyId: 0,\n * //   signature: \"abc123def456...\"\n * // }\n */\nexport class CompositeSignature {\n  f_type: string\n  f_vsn: string\n  addr: string\n  keyId: number\n  signature: string\n\n  constructor(addr: string, keyId: number | string, signature: string) {\n    this.f_type = COMPOSITE_SIGNATURE_PRAGMA.f_type\n    this.f_vsn = COMPOSITE_SIGNATURE_PRAGMA.f_vsn\n    this.addr = withPrefix(addr)\n    this.keyId = Number(keyId)\n    this.signature = signature\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/encode-account-proof.test.ts",
    "content": "import {encodeAccountProof} from \"./encode-account-proof\"\n\nconst address = \"0xABC123DEF456\"\nconst appIdentifier = \"AWESOME-APP-ID\"\nconst invalidNonce =\n  \"303736613463633964356462333031663662623932316166346534613139366\"\nconst nonce = \"3037366134636339643564623330316636626239323161663465346131393662\"\nconst encodedWithDomainTag =\n  \"46434c2d4143434f554e542d50524f4f462d56302e3000000000000000000000f8398e415745534f4d452d4150502d4944880000abc123def456a03037366134636339643564623330316636626239323161663465346131393662\"\nconst encodedWithoutDomainTag =\n  \"f8398e415745534f4d452d4150502d4944880000abc123def456a03037366134636339643564623330316636626239323161663465346131393662\"\n\ndescribe(\"encode account proof\", () => {\n  test(\"encode account proof with invalid nonce\", () => {\n    const nonce = invalidNonce\n    expect.assertions(1)\n    expect(() => {\n      encodeAccountProof({address, nonce, appIdentifier})\n    }).toThrow(Error)\n  })\n\n  test(\"encode account proof with missing address\", () => {\n    expect.assertions(1)\n    expect(() => {\n      encodeAccountProof({nonce, appIdentifier})\n    }).toThrow(Error)\n  })\n\n  test(\"encode account proof with missing appIdentifier\", () => {\n    expect.assertions(1)\n    expect(() => {\n      encodeAccountProof({address, nonce})\n    }).toThrow(Error)\n  })\n\n  test(\"encode account proof without domain tag\", () => {\n    const message = encodeAccountProof({address, nonce, appIdentifier}, false)\n    expect(message).toEqual(encodedWithoutDomainTag)\n  })\n\n  test(\"encode account proof with domain tag\", () => {\n    const message = encodeAccountProof({address, nonce, appIdentifier})\n    expect(message).toEqual(encodedWithDomainTag)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/encode-account-proof.ts",
    "content": "import {sansPrefix} from \"@onflow/util-address\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {Buffer, encode as rlpEncode} from \"@onflow/rlp\"\n\nexport interface AccountProofData {\n  address?: string\n  nonce?: string\n  appIdentifier?: string\n}\n\nconst rightPaddedHexBuffer = (value: string, pad: number): Buffer =>\n  Buffer.from(value.padEnd(pad * 2, \"0\"), \"hex\")\n\nconst leftPaddedHexBuffer = (value: string, pad: number): Buffer =>\n  Buffer.from(value.padStart(pad * 2, \"0\"), \"hex\")\n\nconst addressBuffer = (addr: string): Buffer => leftPaddedHexBuffer(addr, 8)\n\nconst nonceBuffer = (nonce: string): Buffer => Buffer.from(nonce, \"hex\")\n\n/**\n * @description Encodes account proof data for cryptographic signing on the Flow blockchain. This function\n * creates a standardized message format that combines the application identifier, account address,\n * and nonce into a format suitable for cryptographic signing. The encoded message can then be signed\n * by the account's private key to create an account proof.\n *\n * @param data Object containing the account proof components\n * @param data.address The Flow account address for which to create the proof\n * @param data.nonce A random hexadecimal string (minimum 32 bytes/64 hex chars) to prevent replay attacks\n * @param data.appIdentifier A unique identifier for your application to prevent cross-app replay attacks\n * @param includeDomainTag Whether to include the FCL domain tag in the encoding\n *\n * @returns The encoded message as a hexadecimal string ready for signing\n *\n * @throws If required parameters are missing or invalid, or if nonce is too short\n *\n * @example\n * // Basic account proof encoding\n * import { encodeAccountProof } from \"@onflow/fcl\"\n *\n * const accountProofData = {\n *   address: \"0x1234567890abcdef\",\n *   nonce: \"75f8587e5bd982ec9289c5be1f9426bd12b4c1de9c7a7e4d8c5f9e8b2a7c3f1e9\", // 64 hex chars (32 bytes)\n *   appIdentifier: \"MyAwesomeApp\"\n * }\n *\n * const encodedMessage = encodeAccountProof(accountProofData)\n * console.log(\"Encoded message:\", encodedMessage)\n */\nexport const encodeAccountProof = (\n  {address, nonce, appIdentifier}: AccountProofData,\n  includeDomainTag: boolean = true\n): string => {\n  invariant(\n    !!address,\n    \"Encode Message For Provable Authn Error: address must be defined\"\n  )\n  invariant(\n    !!nonce,\n    \"Encode Message For Provable Authn Error: nonce must be defined\"\n  )\n  invariant(\n    !!appIdentifier,\n    \"Encode Message For Provable Authn Error: appIdentifier must be defined\"\n  )\n\n  invariant(\n    nonce!.length >= 64,\n    \"Encode Message For Provable Authn Error: nonce must be minimum of 32 bytes\"\n  )\n\n  const ACCOUNT_PROOF_DOMAIN_TAG = rightPaddedHexBuffer(\n    Buffer.from(\"FCL-ACCOUNT-PROOF-V0.0\").toString(\"hex\"),\n    32\n  )\n\n  if (includeDomainTag) {\n    return Buffer.concat([\n      ACCOUNT_PROOF_DOMAIN_TAG,\n      rlpEncode([\n        appIdentifier,\n        addressBuffer(sansPrefix(address!)),\n        nonceBuffer(nonce!),\n      ]),\n    ]).toString(\"hex\")\n  }\n\n  return rlpEncode([\n    appIdentifier,\n    addressBuffer(sansPrefix(address!)),\n    nonceBuffer(nonce!),\n  ]).toString(\"hex\")\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/index.ts",
    "content": "export {\n  sendMsgToFCL,\n  ready,\n  close,\n  approve,\n  decline,\n  redirect,\n} from \"./send-msg-to-fcl\"\nexport {onMessageFromFCL} from \"./on-message-from-fcl\"\nexport {encodeMessageFromSignable} from \"@onflow/sdk\"\nexport {CompositeSignature} from \"./CompositeSignature\"\nexport {encodeAccountProof} from \"./encode-account-proof\"\nexport {injectExtService} from \"./inject-ext-service\"\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/inject-ext-service.ts",
    "content": "import type {Service} from \"@onflow/typedefs\"\n\n/**\n * @description Injects an external authentication service into the global FCL extensions array.\n * This function is used by wallet providers to register their authentication services with FCL,\n * making them available for user authentication. The service must be of type \"authn\" and have\n * a valid endpoint.\n *\n * @param service The authentication service to inject. Must have type \"authn\" and a valid endpoint\n *\n * @example\n * // Register a wallet authentication service\n * const walletService = {\n *   type: \"authn\",\n *   endpoint: \"https://example-wallet.com/fcl/authn\",\n *   method: \"HTTP/POST\",\n *   identity: { address: \"0x123...\" },\n *   provider: { name: \"Example Wallet\" }\n * }\n * fcl.WalletUtils.injectExtService(walletService)\n */\nexport function injectExtService(service: Service): void {\n  if (service.type === \"authn\" && service.endpoint != null) {\n    if (!Array.isArray((window as any).fcl_extensions)) {\n      ;(window as any).fcl_extensions = []\n    }\n    ;(window as any).fcl_extensions.push(service)\n  } else {\n    console.warn(\"Authn service is required\")\n  }\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/on-message-from-fcl.ts",
    "content": "/**\n * @description Sets up a message listener to receive messages from the parent FCL application. This\n * function is used by wallet services to listen for specific message types from FCL and respond\n * accordingly. It handles message filtering, data sanitization, and provides context about the\n * message origin for security purposes.\n *\n * @param messageType The specific message type to listen for (e.g., \"FCL:VIEW:READY:RESPONSE\")\n * @param cb Callback function executed when a matching message is received\n * @param cb.data The message data received from FCL, with deprecated fields removed\n * @param cb.context Context object providing security information\n * @param cb.context.origin The origin URL of the FCL application sending the message\n *\n * @returns Function to remove the event listener and stop listening for messages\n *\n * @example\n * // Listen for authentication requests from FCL\n * import { onMessageFromFCL } from \"@onflow/fcl\"\n *\n * const removeListener = onMessageFromFCL(\"FCL:VIEW:READY:RESPONSE\", (data, context) => {\n *   console.log(\"FCL is ready for communication\")\n *   console.log(\"Message from:\", context.origin)\n *   console.log(\"Ready data:\", data)\n *\n *   // Verify origin for security\n *   if (context.origin === \"https://myapp.com\") {\n *     initializeWalletServices()\n *   } else {\n *     console.warn(\"Unexpected origin:\", context.origin)\n *   }\n * })\n *\n * // Stop listening when wallet service closes\n * window.addEventListener(\"beforeunload\", () => {\n *   removeListener()\n * })\n */\nexport const onMessageFromFCL = (\n  messageType: string,\n  cb: (data: any, context: {origin: string}) => void = () => {}\n): (() => void) => {\n  const buildData = (data: any): any => {\n    if (data.deprecated)\n      console.warn(\"DEPRECATION NOTICE\", data.deprecated.message)\n    delete data?.body?.interaction\n\n    return data\n  }\n\n  const internal = (e: MessageEvent): void => {\n    const {data, origin} = e\n    if (typeof data !== \"object\") return\n    if (typeof data == null) return\n    if (data.type !== messageType) return\n\n    cb(buildData(data), {origin})\n  }\n\n  window.addEventListener(\"message\", internal)\n  return () => window.removeEventListener(\"message\", internal)\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/send-msg-to-fcl.ts",
    "content": "import {\n  FCL_REDIRECT_URL_PARAM_NAME,\n  FCL_RESPONSE_PARAM_NAME,\n} from \"../utils/constants\"\nimport {onMessageFromFCL} from \"./on-message-from-fcl\"\n\nexport interface PollingResponse {\n  f_type: \"PollingResponse\"\n  f_vsn: \"1.0.0\"\n  status: \"APPROVED\" | \"DECLINED\" | \"REDIRECT\"\n  reason: string | null\n  data: any\n}\n\n/**\n * @description Sends messages from a wallet or service back to the parent FCL application. This function\n * handles communication between wallet UIs (running in iframes, popups, or redirects) and the main FCL\n * application. It automatically detects the communication method (redirect, iframe, or popup) and sends\n * the message accordingly.\n *\n * @param type The message type identifier (e.g., \"FCL:VIEW:RESPONSE\", \"FCL:VIEW:READY\")\n * @param msg Optional message payload containing response data\n * @param msg.f_type FCL message format type, should be \"PollingResponse\"\n * @param msg.f_vsn FCL message format version, should be \"1.0.0\"\n * @param msg.status Response status\n * @param msg.reason Reason for the response (especially for DECLINED status)\n * @param msg.data Actual response data (signatures, account info, etc.)\n *\n * @throws When unable to communicate with parent FCL instance\n *\n * @example\n * // Send approval response with signature data\n * import { sendMsgToFCL } from \"@onflow/fcl\"\n *\n * sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n *   f_type: \"CompositeSignature\",\n *   f_vsn: \"1.0.0\",\n *   addr: \"0x1234567890abcdef\",\n *   keyId: 0,\n *   signature: \"abc123...\"\n * })\n */\nexport const sendMsgToFCL = (type: string, msg?: PollingResponse): void => {\n  const data = {...msg, type}\n\n  const urlParams = new URLSearchParams(window.location.search)\n  const redirectUrl = urlParams.get(FCL_REDIRECT_URL_PARAM_NAME)\n  if (redirectUrl) {\n    const url = new URL(redirectUrl)\n    url.searchParams.append(FCL_RESPONSE_PARAM_NAME, JSON.stringify(data))\n    window.location.href = url.href\n  } else if (window.location !== window.parent.location) {\n    window.parent.postMessage({...msg, type}, \"*\")\n  } else if (window.opener) {\n    window.opener.postMessage({...msg, type}, \"*\")\n  } else {\n    throw new Error(\"Unable to communicate with parent FCL instance\")\n  }\n}\n\n/**\n * @description Initiates the communication handshake between a wallet service and FCL. This function\n * listens for the \"FCL:VIEW:READY:RESPONSE\" message from FCL and automatically sends \"FCL:VIEW:READY\"\n * to indicate the wallet service is ready to receive requests. This is typically the first function\n * called when a wallet service loads.\n *\n * @param cb Callback function executed when FCL responds with ready confirmation\n * @param cb.data Data received from FCL ready response\n * @param cb.context Context object containing origin information\n * @param cb.context.origin Origin of the FCL application\n * @param msg Optional message payload to include with ready signal\n *\n * @example\n * // Basic wallet service initialization\n * import { ready } from \"@onflow/fcl\"\n *\n * ready((data, context) => {\n *   console.log(\"FCL is ready to communicate\")\n *   console.log(\"FCL origin:\", context.origin)\n *   console.log(\"Ready data:\", data)\n *\n *   // Wallet service is now ready to handle authentication requests\n *   initializeWalletUI()\n * })\n */\nexport const ready = (\n  cb: (data: any, context: {origin: string}) => void,\n  msg: PollingResponse = {} as PollingResponse\n): void => {\n  onMessageFromFCL(\"FCL:VIEW:READY:RESPONSE\", cb)\n  sendMsgToFCL(\"FCL:VIEW:READY\")\n}\n\n/**\n * @description Closes the wallet service window/iframe and notifies FCL that the service is shutting down.\n * This should be called when the user cancels an operation or when the wallet service needs to close itself.\n *\n * Sends \"FCL:VIEW:CLOSE\".\n */\nexport const close = (): void => {\n  sendMsgToFCL(\"FCL:VIEW:CLOSE\")\n}\n\n/**\n * @description Sends an approval response to FCL with the provided data. This indicates that the user\n * has approved the requested operation (authentication, transaction signing, etc.) and includes the\n * resulting data (signatures, account information, etc.).\n *\n * Sends \"FCL:VIEW:RESPONSE\". with status \"APPROVED\".\n *\n * @param data The approval data to send back to FCL (signatures, account info, etc.)\n *\n * @example\n * // Approve authentication with account data\n * import { approve } from \"@onflow/fcl\"\n *\n * const accountData = {\n *   f_type: \"AuthnResponse\",\n *   f_vsn: \"1.0.0\",\n *   addr: \"0x1234567890abcdef\",\n *   services: [\n *     {\n *       f_type: \"Service\",\n *       f_vsn: \"1.0.0\",\n *       type: \"authz\",\n *       method: \"HTTP/POST\",\n *       endpoint: \"https://wallet.example.com/authz\"\n *     }\n *   ]\n * }\n *\n * approve(accountData)\n */\nexport const approve = (data: any): void => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"APPROVED\",\n    reason: null,\n    data: data,\n  })\n}\n\n/**\n * @description Sends a decline response to FCL indicating that the user has rejected or cancelled\n * the requested operation. This should be called when the user explicitly cancels an operation\n * or when an error prevents the operation from completing.\n *\n * Sends \"FCL:VIEW:RESPONSE\". with status \"DECLINED\".\n *\n * @param reason Human-readable reason for declining the request\n *\n * @example\n * // Decline when user cancels authentication\n * import { decline } from \"@onflow/fcl\"\n *\n * document.getElementById('cancel-btn').addEventListener('click', () => {\n *   decline(\"User cancelled authentication\")\n * })\n */\nexport const decline = (reason: string): void => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"DECLINED\",\n    reason: reason,\n    data: null,\n  })\n}\n\n/**\n * @description Sends a redirect response to FCL indicating that the operation requires a redirect\n * to complete. This is used when the wallet service needs to redirect the user to another URL\n * (such as a native app deep link or external service).\n *\n * Sends \"FCL:VIEW:RESPONSE\". with status \"REDIRECT\".\n *\n * @param data Redirect data containing the target URL and any additional parameters\n *\n * @example\n * // Redirect to native wallet app\n * import { redirect } from \"@onflow/fcl\"\n *\n * redirect({\n *   f_type: \"RedirectResponse\",\n *   f_vsn: \"1.0.0\",\n *   url: \"flow-wallet://sign?transaction=abc123\",\n *   callback: \"https://myapp.com/callback\"\n * })\n */\nexport const redirect = (data: any): void => {\n  sendMsgToFCL(\"FCL:VIEW:RESPONSE\", {\n    f_type: \"PollingResponse\",\n    f_vsn: \"1.0.0\",\n    status: \"REDIRECT\",\n    reason: null,\n    data: data,\n  })\n}\n"
  },
  {
    "path": "packages/fcl-core/src/wallet-utils/wallet-utils.test.ts",
    "content": "import {CompositeSignature} from \"./CompositeSignature\"\n\ndescribe(\"wallet utils\", () => {\n  test(\"returns composite signature\", () => {\n    const COMPOSITE_SIGNATURE = {\n      f_type: \"CompositeSignature\",\n      f_vsn: \"1.0.0\",\n      addr: \"0x1\",\n      keyId: 0,\n      signature: \"foo\",\n    }\n    const compSig = new CompositeSignature(\"1\", 0, \"foo\")\n    expect(compSig).toEqual(COMPOSITE_SIGNATURE)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/CHANGELOG.md",
    "content": "# @onflow/fcl-ethereum-provider\n\n## 0.1.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.10\n  - @onflow/fcl-wc@6.0.22\n\n## 0.1.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.9\n  - @onflow/fcl-wc@6.0.21\n\n## 0.1.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.8\n  - @onflow/fcl-wc@6.0.20\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.7\n  - @onflow/fcl-wc@6.0.19\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.6\n  - @onflow/fcl-wc@6.0.18\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.5\n  - @onflow/fcl-wc@6.0.17\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.4\n  - @onflow/fcl-wc@6.0.16\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.3\n  - @onflow/fcl-wc@6.0.15\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.2\n  - @onflow/fcl-wc@6.0.14\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.1\n  - @onflow/fcl-wc@6.0.13\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl@1.21.0\n  - @onflow/fcl-wc@6.0.12\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.6\n  - @onflow/fcl-wc@6.0.11\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`a5e84666b0482547fe9411064f4821e8067e5238`](https://github.com/onflow/fcl-js/commit/a5e84666b0482547fe9411064f4821e8067e5238)]:\n  - @onflow/fcl@1.20.5\n  - @onflow/fcl-wc@6.0.10\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.4\n  - @onflow/fcl-wc@6.0.9\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.3\n  - @onflow/fcl-wc@6.0.8\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.2\n  - @onflow/fcl-wc@6.0.7\n\n## 0.0.8\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/fcl@1.20.1\n  - @onflow/fcl-wc@6.0.6\n  - @onflow/rlp@1.2.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0\n  - @onflow/fcl-wc@6.0.5\n\n## 0.0.7-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl-wc@6.0.5-alpha.2\n  - @onflow/fcl@1.20.0-alpha.2\n\n## 0.0.7-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b)]:\n  - @onflow/fcl@1.20.0-alpha.1\n  - @onflow/fcl-wc@6.0.5-alpha.1\n\n## 0.0.7-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc)]:\n  - @onflow/fcl@1.20.0-alpha.0\n  - @onflow/fcl-wc@6.0.5-alpha.0\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl@1.19.0\n  - @onflow/fcl-wc@6.0.4\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0\n  - @onflow/fcl-wc@6.0.3\n\n## 0.0.5-alpha.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.2\n  - @onflow/fcl-wc@6.0.3-alpha.2\n\n## 0.0.5-alpha.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.1\n  - @onflow/fcl-wc@6.0.3-alpha.1\n\n## 0.0.5-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0-alpha.0\n  - @onflow/fcl-wc@6.0.3-alpha.0\n\n## 0.0.4\n\n### Patch Changes\n\n- [#2382](https://github.com/onflow/fcl-js/pull/2382) [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b) Thanks [@jribbink](https://github.com/jribbink)! - Update WalletConnect packages\n\n- Updated dependencies [[`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29)]:\n  - @onflow/fcl-wc@6.0.2\n  - @onflow/fcl@1.17.0\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`f4d8bc53c9902f74c1751206ddbece497017683d`](https://github.com/onflow/fcl-js/commit/f4d8bc53c9902f74c1751206ddbece497017683d)]:\n  - @onflow/fcl-wc@6.0.1\n  - @onflow/fcl@1.16.1\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d), [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`837fdf7f019c3f154ff007c50959b90b9b603297`](https://github.com/onflow/fcl-js/commit/837fdf7f019c3f154ff007c50959b90b9b603297)]:\n  - @onflow/fcl-wc@6.0.0\n  - @onflow/fcl@1.16.0\n\n## 0.0.1\n\nInitial release of the FCL Etheruem Provider. This adapter allows you to use FCL wallets within EVM tooling in a shared session with FCL-JS.\n\nRead more about this package in [FLIP-316](https://github.com/onflow/flips/pull/317) and the official [Flow Developer Documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/rainbowkit-adapter).\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/README.md",
    "content": "# @onflow/fcl-ethereum-provider\n\nThis package exposes a client-side [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compatible Ethereum provider that leverages an FCL-authenticated Cadence Owned Account (COA) under the hood. It enables wallets without native EVM capabilities to emulate Ethereum JSON-RPC by delegating signing and COA interactions to FCL.\n\n## Installation\n\n```bash\nnpm install --save @onflow/fcl-ethereum-provider\n```\n\n## Usage\n\nCheck out the [documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/ethereum-provider) for guides and examples on how to integrate and use this provider in your project.\n\n## License\n\nApache-2.0"
  },
  {
    "path": "packages/fcl-ethereum-provider/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-ethereum-provider\",\n  \"version\": \"0.1.2\",\n  \"description\": \"Ethereum provider for FCL-compatible wallets\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Dapper Labs <dev@dapperlabs.com>\",\n  \"homepage\": \"https://onflow.org\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@ethersproject/bytes\": \"^5.7.0\",\n    \"@ethersproject/hash\": \"^5.7.0\",\n    \"@noble/hashes\": \"^1.7.1\",\n    \"@onflow/fcl-wc\": \"6.0.22\",\n    \"@onflow/rlp\": \"^1.2.4\",\n    \"@walletconnect/ethereum-provider\": \"^2.20.2\",\n    \"@walletconnect/jsonrpc-http-connection\": \"^1.0.8\",\n    \"@walletconnect/jsonrpc-provider\": \"^1.0.14\",\n    \"@walletconnect/types\": \"^2.18.0\",\n    \"@walletconnect/universal-provider\": \"^2.20.2\",\n    \"@walletconnect/utils\": \"^2.20.2\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl\": \"1.21.10\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/__mocks__/fcl.ts",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport {CurrentUser} from \"@onflow/typedefs\"\n\nexport function mockUser(initialValue?: CurrentUser | null) {\n  if (!initialValue) {\n    initialValue = {\n      loggedIn: false,\n    } as CurrentUser\n  }\n  let value: CurrentUser = initialValue\n  let subscribers: ((cfg: CurrentUser, err: Error | null) => void)[] = []\n  const currentUser = {\n    authenticate: jest.fn(),\n    unauthenticate: jest.fn(),\n    authorization: jest.fn(),\n    signUserMessage: jest.fn(),\n    subscribe: jest.fn().mockImplementation(cb => {\n      cb(value)\n      subscribers.push(cb)\n      return () => {\n        subscribers = subscribers.filter(s => s !== cb)\n      }\n    }),\n    snapshot: jest.fn(),\n    resolveArgument: jest.fn(),\n  }\n\n  const mock: jest.Mocked<typeof fcl.currentUser> = Object.assign(\n    () => {\n      return {...currentUser}\n    },\n    {...currentUser}\n  )\n\n  return {\n    mock,\n    set: async (cfg: CurrentUser) => {\n      value = cfg\n      subscribers.forEach(s => s(cfg, null))\n      await new Promise(resolve => setTimeout(resolve, 0))\n    },\n  }\n}\n\nexport function mockConfig(\n  {\n    initialValue,\n  }: {\n    initialValue: Record<string, any> | null\n  } = {initialValue: null}\n) {\n  let value = initialValue\n  let subscribers: ((cfg: Record<string, any>, err: Error | null) => void)[] =\n    []\n\n  const config = {\n    put: jest.fn(),\n    get: jest.fn(),\n    all: jest.fn(),\n    first: jest.fn(),\n    update: jest.fn(),\n    delete: jest.fn(),\n    where: jest.fn(),\n    subscribe: jest.fn().mockImplementation(cb => {\n      cb(value, null)\n      subscribers.push(cb)\n      return () => {\n        subscribers = subscribers.filter(s => s !== cb)\n      }\n    }),\n    overload: jest.fn(),\n    load: jest.fn(),\n  }\n\n  const cfg: jest.Mocked<typeof fcl.config> = Object.assign(\n    () => {\n      return {...config}\n    },\n    {...config}\n  )\n\n  return {\n    mock: cfg,\n    set: async (cfg: Record<string, any>) => {\n      value = cfg\n      subscribers.forEach(s => s(cfg, null))\n      await new Promise(resolve => setTimeout(resolve, 0))\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/accounts/account-manager.test.ts",
    "content": "import {AccountManager} from \"./account-manager\"\nimport {mockUser} from \"../__mocks__/fcl\"\nimport * as fcl from \"@onflow/fcl\"\nimport {CurrentUser, FvmErrorCode} from \"@onflow/typedefs\"\nimport {NetworkManager} from \"../network/network-manager\"\nimport {BehaviorSubject} from \"../util/observable\"\nimport {TransactionError} from \"@onflow/fcl\"\nimport * as notifications from \"../notifications\"\nimport {Gateway} from \"../gateway/gateway\"\n\njest.mock(\"@onflow/fcl\", () => {\n  const fcl = jest.requireActual(\"@onflow/fcl\")\n  return {\n    withPrefix: fcl.withPrefix,\n    sansPrefix: fcl.sansPrefix,\n    tx: jest.fn(),\n    mutate: jest.fn(),\n    query: jest.fn(),\n    TransactionError: {\n      fromErrorMessage: jest.fn(),\n    },\n  }\n})\n\njest.mock(\"../notifications\", () => ({\n  displayErrorNotification: jest.fn(),\n}))\n\nconst mockFcl = jest.mocked(fcl)\nconst mockQuery = jest.mocked(fcl.query)\n\ndescribe(\"AccountManager\", () => {\n  let networkManager: jest.Mocked<NetworkManager>\n  let userMock: ReturnType<typeof mockUser>\n  let gatewayMock: jest.Mocked<Gateway>\n\n  beforeEach(() => {\n    jest.resetAllMocks()\n\n    const chainId$ = new BehaviorSubject<number | null>(747)\n    networkManager = {\n      $chainId: chainId$,\n      getChainId: () => chainId$.getValue(),\n    } as any as jest.Mocked<NetworkManager>\n    userMock = mockUser()\n    gatewayMock = {\n      request: jest.fn(),\n    } as any as jest.Mocked<Gateway>\n  })\n\n  it(\"should initialize with null COA address\", async () => {\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n    expect(await accountManager.getCOAAddress()).toBeNull()\n    expect(await accountManager.getAccounts()).toEqual([])\n  })\n\n  it(\"should reset state when the user is not logged in\", async () => {\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    expect(await accountManager.getCOAAddress()).toBeNull()\n    expect(await accountManager.getAccounts()).toEqual([])\n  })\n\n  it(\"should fetch and update COA address when user logs in\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    expect(await accountManager.getCOAAddress()).toBe(null)\n\n    userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    expect(await accountManager.getCOAAddress()).toBe(\"0x123\")\n    expect(await accountManager.getAccounts()).toEqual([\"0x123\"])\n    expect(fcl.query).toHaveBeenCalledWith({\n      cadence: expect.any(String),\n      args: expect.any(Function),\n    })\n  })\n\n  it(\"should not update COA address if user has not changed\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    await new Promise(setImmediate)\n\n    expect(await accountManager.getCOAAddress()).toBe(\"0x123\")\n    expect(fcl.query).toHaveBeenCalledTimes(1)\n\n    userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    expect(await accountManager.getCOAAddress()).toBe(\"0x123\")\n    expect(fcl.query).toHaveBeenCalledTimes(1) // Should not have fetched again\n  })\n\n  it(\"should not update COA address if fetch is outdated when user changes\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    mockQuery\n      // 1st fetch: delayed\n      .mockImplementationOnce(\n        () => new Promise(resolve => setTimeout(() => resolve(\"0x123\"), 500))\n      )\n      // 2nd fetch: immediate\n      .mockResolvedValueOnce(\"0x456\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    await userMock.set!({addr: \"0x1\"} as CurrentUser)\n    await userMock.set!({addr: \"0x2\"} as CurrentUser)\n\n    // The second fetch (for address 0x2) is the latest, so \"0x456\"\n    expect(await accountManager.getCOAAddress()).toBe(\"0x456\")\n  })\n\n  it(\"should throw if COA address fetch fails\", async () => {\n    mockQuery.mockRejectedValueOnce(new Error(\"Fetch failed\"))\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    await userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    await expect(accountManager.getCOAAddress()).rejects.toThrow(\"Fetch failed\")\n  })\n\n  it(\"getAndCreateAccounts should get a COA address if it already exists\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    // Trigger the state update\n    await userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    // Call getAndCreateAccounts. Since the COA already exists, it should just return it.\n    const accounts = await accountManager.getAndCreateAccounts(545)\n\n    expect(accounts).toEqual([\"0x123\"])\n    // Should not have created a new COA\n    expect(fcl.mutate).not.toHaveBeenCalled()\n  })\n\n  it(\"getAndCreateAccounts should create a COA if it does not exist\", async () => {\n    const mockTxResult = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        events: [\n          {\n            type: \"A.e467b9dd11fa00df.EVM.CadenceOwnedAccountCreated\",\n            data: {\n              address: \"0x123\",\n            },\n          },\n        ],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(mockTxResult)\n    jest.mocked(fcl.mutate).mockResolvedValue(\"1111\")\n\n    // For the subscription, simulate that initially no COA is found, then after creation the query returns \"0x123\"\n    mockQuery.mockResolvedValueOnce(null).mockResolvedValueOnce(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    await userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    const accounts = await accountManager.getAndCreateAccounts(747)\n    expect(accounts).toEqual([\"0x123\"])\n    expect(fcl.mutate).toHaveBeenCalled()\n  })\n\n  it(\"should display error notification and throw if STORAGE_CAPACITY_EXCEEDED error occurs\", async () => {\n    const txResultError = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        statusCode: 0,\n        errorMessage: \"Simulated error\",\n        events: [],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(txResultError)\n    jest.mocked(fcl.mutate).mockResolvedValue(\"1111\")\n\n    const storageError = {\n      code: FvmErrorCode.STORAGE_CAPACITY_EXCEEDED,\n      message: \"Simulated storage capacity exceeded\",\n      type: \"TRANSACTION_ERROR\",\n      name: \"TransactionError\",\n    } as TransactionError\n\n    jest.mocked(TransactionError.fromErrorMessage).mockReturnValue(storageError)\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    await userMock.set!({addr: \"0x1\"} as CurrentUser)\n\n    await expect(accountManager.createCOA(747)).rejects.toThrow(\n      \"Insufficient funds to cover storage costs.\"\n    )\n    expect(notifications.displayErrorNotification).toHaveBeenCalledWith(\n      \"Storage Error\",\n      \"Your wallet does not have enough funds to cover storage costs. Please add more funds.\"\n    )\n  })\n\n  it(\"should handle user changes correctly\", async () => {\n    mockQuery\n      .mockResolvedValueOnce(\"0x123\") // for user 0x1\n      .mockResolvedValueOnce(\"0x456\") // for user 0x2\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    await userMock.set({addr: \"0x1\"} as CurrentUser)\n    expect(await accountManager.getCOAAddress()).toBe(\"0x123\")\n\n    await userMock.set({addr: \"0x2\"} as CurrentUser)\n\n    expect(await accountManager.getCOAAddress()).toBe(\"0x456\")\n  })\n\n  it(\"should call the callback with updated accounts in subscribe\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    const callback = jest.fn()\n    accountManager.subscribe(callback)\n\n    await userMock.set({addr: \"0x1\"} as CurrentUser)\n\n    expect(callback).toHaveBeenCalledWith([\"0x123\"])\n  })\n\n  it(\"should reset accounts in subscribe if user is not authenticated\", async () => {\n    mockQuery.mockResolvedValue(\"0x123\")\n\n    const callback = jest.fn()\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    accountManager.subscribe(callback)\n\n    await new Promise(setImmediate)\n\n    expect(callback).toHaveBeenCalledWith([])\n  })\n\n  it(\"should call the callback when COA address is updated\", async () => {\n    const callback = jest.fn()\n\n    mockQuery.mockResolvedValueOnce(\"0x123\")\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    userMock.set({addr: \"0x1\"} as CurrentUser)\n\n    accountManager.subscribe(callback)\n\n    await new Promise(setImmediate)\n\n    expect(callback).toHaveBeenCalledWith([\"0x123\"])\n  })\n\n  it(\"should return an empty array when COA address is null\", async () => {\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n    expect(await accountManager.getAccounts()).toEqual([])\n  })\n\n  it(\"should return COA address array when available\", async () => {\n    mockQuery.mockResolvedValueOnce(\"0x123\")\n    userMock.set({addr: \"0x1\"} as CurrentUser)\n\n    const accountManager = new AccountManager(\n      userMock.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    expect(await accountManager.getAccounts()).toEqual([\"0x123\"])\n  })\n\n  test(\"should update accounts if user is connected to the same authz service\", async () => {\n    userMock.set({\n      addr: \"0x1\",\n      services: [\n        {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          endpoint: \"flow_authn\",\n          method: \"EXT/RPC\",\n          type: \"authz\",\n          uid: \"123\",\n        },\n      ],\n    } as CurrentUser)\n\n    const accountManager = new AccountManager(userMock.mock, networkManager, {\n      uid: \"123\",\n    } as any)\n\n    const callback = jest.fn()\n    accountManager.subscribe(callback)\n\n    await new Promise(setImmediate)\n\n    expect(callback).toHaveBeenCalledWith([])\n  })\n\n  it(\"should not update accounts if user is connected to different authz service\", async () => {\n    userMock.set({\n      addr: \"0x1\",\n      services: [\n        {\n          f_type: \"Service\",\n          f_vsn: \"1.0.0\",\n          endpoint: \"flow_authn\",\n          method: \"EXT/RPC\",\n          type: \"authz\",\n          uid: \"123\",\n        },\n      ],\n    } as CurrentUser)\n\n    const accountManager = new AccountManager(userMock.mock, networkManager, {\n      uid: \"abc\",\n    } as any)\n\n    const callback = jest.fn()\n    accountManager.subscribe(callback)\n\n    await new Promise(setImmediate)\n\n    expect(callback).toHaveBeenCalledWith([])\n  })\n})\n\ndescribe(\"sendTransaction\", () => {\n  let networkManager: jest.Mocked<NetworkManager>\n  let $mockChainId: BehaviorSubject<number | null>\n  let gatewayMock: jest.Mocked<Gateway>\n\n  beforeEach(() => {\n    $mockChainId = new BehaviorSubject<number | null>(747)\n    networkManager = {\n      $chainId: $mockChainId,\n      getChainId: () => $mockChainId.getValue(),\n    } as any as jest.Mocked<NetworkManager>\n    gatewayMock = {\n      request: jest.fn(),\n    } as any as jest.Mocked<Gateway>\n\n    jest.resetAllMocks()\n  })\n\n  test(\"sendTransaction returns a pre-calculated hash (mainnet)\", async () => {\n    const mockTxResult = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        events: [\n          {\n            type: \"A.e467b9dd11fa00df.EVM.TransactionExecuted\",\n            data: {hash: [\"12\", \"34\"]},\n          },\n        ],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(mockTxResult)\n    jest.mocked(fcl.mutate).mockResolvedValue(\"1111\")\n    jest\n      .mocked(fcl.query)\n      .mockResolvedValueOnce(\"0x1234\")\n      .mockResolvedValueOnce(\"0x0\")\n\n    const user = mockUser({addr: \"0x1234\"} as CurrentUser).mock\n    const accountManager = new AccountManager(user, networkManager, gatewayMock)\n\n    // Numbers maxed out to test edge cases\n    const txInput = {\n      to: \"0xffffffffffffffffffffffffffffffffffffffff\",\n      from: \"0x1234\",\n      value:\n        \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n      data: \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n      gas: \"0xffffffffffffffff\",\n      chainId: \"747\",\n    }\n\n    const result = await accountManager.sendTransaction(txInput)\n\n    expect(result).toEqual(\n      \"0xc4a532f9ed47b2092206a768b3ad3d32dfd80ed1f3b10690b81fdedc24685de7\"\n    )\n    expect(fcl.mutate).toHaveBeenCalled()\n  })\n\n  test(\"send transaction mainnet\", async () => {\n    const mockTxResult = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        events: [\n          {\n            type: \"A.e467b9dd11fa00df.EVM.TransactionExecuted\",\n            data: {\n              hash: [\"12\", \"34\"],\n            },\n          },\n        ],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(mockTxResult)\n    jest.mocked(fcl.query).mockResolvedValue(\"0x1234\")\n\n    const user = mockUser({addr: \"0x4444\"} as CurrentUser).mock\n    const accountManager = new AccountManager(user, networkManager, gatewayMock)\n\n    const tx = {\n      to: \"0x1234\",\n      from: \"0x1234\",\n      value: \"0\",\n      data: \"0x1234\",\n      nonce: \"0\",\n      gas: \"0\",\n      chainId: \"747\",\n    }\n\n    const result = await accountManager.sendTransaction(tx)\n\n    expect(result).toEqual(\n      \"0xb7f94fa964193ab940ed6e24bdc72b4a59eb4e69546d8f423b8e52835dbf1d18\"\n    )\n    expect(fcl.mutate).toHaveBeenCalled()\n    expect(mockFcl.mutate.mock.calls[0][0]).toMatchObject({\n      cadence: expect.any(String),\n      args: expect.any(Function),\n      authz: user,\n      limit: 9999,\n    })\n  })\n\n  test(\"send transaction testnet\", async () => {\n    // Set chainId to testnet\n    $mockChainId.next(545)\n\n    const mockTxResult = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        events: [\n          {\n            type: \"A.8c5303eaa26202d6.EVM.TransactionExecuted\",\n            data: {\n              hash: [\"12\", \"34\"],\n            },\n          },\n        ],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(mockTxResult)\n    jest.mocked(fcl.mutate).mockResolvedValue(\"1111\")\n    jest.mocked(fcl.query).mockResolvedValue(\"0x1234\")\n\n    const user = mockUser({addr: \"0x4444\"} as CurrentUser)\n    const accountManager = new AccountManager(\n      user.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    const tx = {\n      to: \"0x1234\",\n      from: \"0x1234\",\n      value: \"0\",\n      data: \"0x1234\",\n      nonce: \"0\",\n      gas: \"0\",\n      chainId: \"545\",\n    }\n\n    const result = await accountManager.sendTransaction(tx)\n\n    expect(result).not.toBeNull()\n    expect(fcl.mutate).toHaveBeenCalled()\n    expect(mockFcl.mutate.mock.calls[0][0]).toMatchObject({\n      cadence: expect.any(String),\n      args: expect.any(Function),\n      authz: user.mock,\n      limit: 9999,\n    })\n  })\n\n  test(\"throws error if from address does not match user address\", async () => {\n    jest.mocked(fcl.query).mockResolvedValue(\"0x1234\")\n    const user = mockUser({addr: \"0x4444\"} as CurrentUser)\n    const accountManager = new AccountManager(\n      user.mock,\n      networkManager,\n      gatewayMock\n    )\n\n    const tx = {\n      to: \"0x1234\",\n      from: \"0x4567\",\n      value: \"0\",\n      data: \"0x1234\",\n      nonce: \"0\",\n      gas: \"0\",\n      chainId: \"545\",\n    }\n\n    await expect(accountManager.sendTransaction(tx)).rejects.toThrow(\n      `Chain ID does not match the current network. Expected: 747, Received: 545`\n    )\n\n    expect(fcl.mutate).not.toHaveBeenCalled()\n  })\n\n  test(\"falls back to estimated gas limit if not provided\", async () => {\n    const mockTxResult = {\n      onceExecuted: jest.fn().mockResolvedValue({\n        events: [\n          {\n            type: \"A.e467b9dd11fa00df.EVM.TransactionExecuted\",\n            data: {hash: [\"12\", \"34\"]},\n          },\n        ],\n      }),\n    } as any as jest.Mocked<ReturnType<typeof fcl.tx>>\n\n    jest.mocked(fcl.tx).mockReturnValue(mockTxResult)\n    jest.mocked(fcl.mutate).mockResolvedValue(\"1111\")\n    jest\n      .mocked(fcl.query)\n      .mockResolvedValueOnce(\"0x1234\")\n      .mockResolvedValueOnce(\"0x0\")\n\n    jest.mocked(gatewayMock.request).mockResolvedValueOnce(\"0x1234\")\n\n    const user = mockUser({addr: \"0x1234\"} as CurrentUser).mock\n    const accountManager = new AccountManager(user, networkManager, gatewayMock)\n\n    const txInput = {\n      to: \"0xffffffffffffffffffffffffffffffffffffffff\",\n      from: \"0x1234\",\n      value:\n        \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n      data: \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n      nonce: \"0xffffffffffffffff\",\n      chainId: \"747\",\n    }\n\n    await accountManager.sendTransaction(txInput)\n\n    expect(gatewayMock.request).toHaveBeenCalledWith({\n      chainId: 747,\n      method: \"eth_estimateGas\",\n      params: [\n        {\n          from: \"0x1234\",\n          to: \"0xffffffffffffffffffffffffffffffffffffffff\",\n          value:\n            \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n          data: \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n        },\n      ],\n    })\n\n    expect(fcl.mutate).toHaveBeenCalledWith(\n      expect.objectContaining({\n        cadence: expect.any(String),\n        args: expect.any(Function),\n        limit: 9999,\n      })\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/accounts/account-manager.ts",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport * as rlp from \"@onflow/rlp\"\nimport {\n  CompositeSignature,\n  CurrentUser,\n  Service,\n  FvmErrorCode,\n} from \"@onflow/typedefs\"\nimport {EVENT_IDENTIFIERS, EventType, FlowNetwork} from \"../constants\"\nimport {\n  BehaviorSubject,\n  concat,\n  distinctUntilChanged,\n  filter,\n  firstValueFrom,\n  from,\n  map,\n  Observable,\n  of,\n  Subscription,\n  switchMap,\n} from \"../util/observable\"\nimport {EthSignatureResponse} from \"../types/eth\"\nimport {NetworkManager} from \"../network/network-manager\"\nimport {\n  createCOATx,\n  getCOAScript,\n  getNonceScript,\n  sendTransactionTx,\n} from \"../cadence\"\nimport {TransactionError} from \"@onflow/fcl\"\nimport {displayErrorNotification} from \"../notifications\"\nimport {AddressStoreState} from \"../types/account\"\nimport {getFlowNetwork} from \"../util/chain\"\nimport {precalculateTxHash} from \"../util/transaction\"\nimport {Gateway} from \"../gateway/gateway\"\n\nexport class AccountManager {\n  private $addressStore = new BehaviorSubject<AddressStoreState>({\n    isLoading: true,\n    address: null,\n    error: null,\n  })\n\n  constructor(\n    private user: typeof fcl.currentUser,\n    private networkManager: NetworkManager,\n    private gateway: Gateway,\n    private service?: Service\n  ) {\n    this.initializeUserSubscription()\n  }\n\n  /**\n   * Subscribes to the current user observable and updates the address store.\n   */\n  private initializeUserSubscription() {\n    const $user = new Observable<CurrentUser>(subscriber => {\n      return this.user.subscribe((currentUser: CurrentUser, error?: Error) => {\n        if (error) {\n          subscriber.error?.(error)\n        } else {\n          subscriber.next(currentUser)\n        }\n      }) as Subscription\n    })\n\n    $user\n      .pipe(\n        // Only listen bind to users matching the current authn service\n        map(snapshot => {\n          const addr = snapshot?.addr || null\n          if (!addr) {\n            return null\n          }\n\n          const authnService = snapshot?.services?.find(\n            service => service.type === \"authn\"\n          )\n          const matchingAuthnService = authnService?.uid === this.service?.uid\n          return matchingAuthnService ? addr : null\n        }),\n        distinctUntilChanged(),\n        switchMap(addr =>\n          concat(\n            of({isLoading: true} as AddressStoreState),\n            from(\n              (async () => {\n                try {\n                  if (!addr) {\n                    return {isLoading: false, address: null, error: null}\n                  }\n                  return {\n                    isLoading: false,\n                    address: await this.fetchCOAFromFlowAddress(addr),\n                    error: null,\n                  }\n                } catch (error: any) {\n                  return {isLoading: false, address: null, error}\n                }\n              })()\n            )\n          )\n        )\n      )\n      .subscribe(this.$addressStore)\n  }\n\n  public async authenticate(): Promise<string[]> {\n    const user = await this.user.authenticate({\n      service: this.service,\n      forceReauth: true,\n    })\n    if (!user?.addr || !user?.loggedIn) {\n      throw new Error(\"Failed to authenticate user\")\n    }\n\n    return this.getAccounts()\n  }\n\n  public async unauthenticate(): Promise<void> {\n    await this.user.unauthenticate()\n    await new Promise(resolve => setTimeout(resolve, 0))\n  }\n\n  private async waitForTxResult(\n    txId: string,\n    eventType: string,\n    errorMsg: string = `${eventType} event not found`\n  ): Promise<any> {\n    const txResult = await fcl.tx(txId).onceExecuted()\n\n    const event = txResult.events.find(e => e.type === eventType)\n    if (!event) {\n      throw new Error(errorMsg)\n    }\n    return event\n  }\n\n  private async fetchCOAFromFlowAddress(flowAddr: string): Promise<string> {\n    const chainId = await this.networkManager.getChainId()\n    if (!chainId) {\n      throw new Error(\"No active chain\")\n    }\n\n    return await fcl.query({\n      cadence: getCOAScript(chainId),\n      args: (arg: typeof fcl.arg, t: typeof fcl.t) => [\n        arg(flowAddr, t.Address),\n      ],\n    })\n  }\n\n  public async getCOAAddress(): Promise<string | null> {\n    const {address, error} = await firstValueFrom(\n      this.$addressStore.pipe(filter(x => !x.isLoading))\n    )\n    if (error) {\n      throw error\n    }\n    return address || null\n  }\n\n  public async getAccounts(): Promise<string[]> {\n    const coaAddress = await this.getCOAAddress()\n    return coaAddress ? [coaAddress] : []\n  }\n\n  /**\n   * Get the COA address and create it if it doesn't exist\n   */\n  public async getAndCreateAccounts(chainId: number): Promise<string[]> {\n    const accounts = await this.getAccounts()\n\n    if (accounts.length === 0) {\n      const coaAddress = await this.createCOA(chainId)\n      return [coaAddress]\n    }\n\n    if (accounts.length === 0) {\n      throw new Error(\"COA address is still missing after creation.\")\n    }\n\n    return accounts\n  }\n\n  public async createCOA(chainId: number): Promise<string> {\n    const flowNetwork = this.getFlowNetworkOrThrow(chainId)\n    await this.validateChainId(chainId)\n\n    const txId = await fcl.mutate({\n      cadence: createCOATx(chainId),\n      limit: 9999,\n      authz: this.user,\n    })\n\n    const txResult = await fcl.tx(txId).onceExecuted()\n\n    if (txResult.statusCode == 0) {\n      const txErr = TransactionError.fromErrorMessage(txResult.errorMessage)\n\n      if (txErr && txErr.code === FvmErrorCode.STORAGE_CAPACITY_EXCEEDED) {\n        displayErrorNotification(\n          \"Storage Error\",\n          \"Your wallet does not have enough funds to cover storage costs. Please add more funds.\"\n        )\n\n        throw new Error(\"Insufficient funds to cover storage costs.\")\n      }\n\n      throw new Error(`Transaction failed: ${txErr.message}`)\n    }\n\n    const event = await this.waitForTxResult(\n      txId,\n      EVENT_IDENTIFIERS[EventType.CADENCE_OWNED_ACCOUNT_CREATED][flowNetwork],\n      \"Failed to create COA: COACreated event not found\"\n    )\n\n    const coaAddress = event.data.address\n    if (!coaAddress) {\n      throw new Error(\"COA created event did not include an address\")\n    }\n\n    this.$addressStore.next({\n      isLoading: false,\n      address: coaAddress,\n      error: null,\n    })\n\n    return coaAddress\n  }\n\n  public subscribe(callback: (accounts: string[]) => void): Subscription {\n    return this.$addressStore\n      .pipe(filter(x => !x.isLoading && !x.error))\n      .subscribe(({address}) => {\n        callback(address ? [address] : [])\n      })\n  }\n\n  /**\n   * Fetch the current nonce from the EVM contract via a Cadence script.\n   */\n  private async getNonce(evmAddress: string): Promise<string> {\n    const chainId = await this.networkManager.getChainId()\n\n    if (!chainId) {\n      throw new Error(\"No active chain\")\n    }\n\n    const nonce = await fcl.query({\n      cadence: getNonceScript(chainId),\n      args: (arg, t) => [arg(evmAddress, t.String)],\n    })\n\n    return nonce.toString()\n  }\n\n  async sendTransaction(params: {\n    to: string\n    from: string\n    chainId: string\n    value?: string\n    gas?: string\n    data?: string\n  }) {\n    const {to, from, value = \"0\", data = \"\", chainId} = params\n\n    const parsedChainId = parseInt(chainId)\n    this.getFlowNetworkOrThrow(parsedChainId)\n    await this.validateChainId(parsedChainId)\n\n    // Determine gas limit\n    let gas = params.gas\n    if (!gas) {\n      const gasLimit = await this.gateway.request({\n        method: \"eth_estimateGas\",\n        params: [\n          {\n            from: fcl.withPrefix(from),\n            to: fcl.withPrefix(to),\n            value: fcl.withPrefix(value),\n            data: fcl.withPrefix(data),\n          },\n        ],\n        chainId: parsedChainId,\n      })\n\n      // Add a 20% buffer to the estimate\n      gas = ((BigInt(gasLimit) * BigInt(6)) / BigInt(5)).toString()\n    }\n\n    // Check if the from address matches the authenticated COA address\n    const expectedCOAAddress = await this.getCOAAddress()\n    if (\n      fcl.sansPrefix(from.toLowerCase()) !==\n        fcl.sansPrefix(expectedCOAAddress?.toLowerCase() || null) &&\n      !!expectedCOAAddress\n    ) {\n      throw new Error(\n        `From address does not match authenticated user address.\\nUser: ${expectedCOAAddress}\\nFrom: ${from}`\n      )\n    }\n\n    // ----- Pre-calculate the transaction hash -----\n    const evmAddress = fcl.sansPrefix(expectedCOAAddress!).toLowerCase()\n    const nonceStr = await this.getNonce(evmAddress)\n    const nonce = parseInt(nonceStr, 10)\n    const preCalculatedTxHash = precalculateTxHash(\n      nonce,\n      gas,\n      value,\n      to,\n      data,\n      evmAddress\n    )\n    // ----- End pre-calculation -----\n\n    await fcl.mutate({\n      cadence: sendTransactionTx(parsedChainId),\n      limit: 9999,\n      args: (arg: typeof fcl.arg, t: typeof fcl.t) => [\n        arg(fcl.sansPrefix(to), t.String),\n        arg(fcl.sansPrefix(data), t.String),\n        arg(BigInt(gas).toString(), t.UInt64),\n        arg(BigInt(value).toString(), t.UInt),\n      ],\n      authz: this.user,\n    })\n\n    return preCalculatedTxHash\n  }\n\n  public async signMessage(\n    message: string,\n    from: string\n  ): Promise<EthSignatureResponse> {\n    const coaAddress = await this.getCOAAddress()\n    if (!coaAddress) {\n      throw new Error(\n        \"COA address is not available. User might not be authenticated.\"\n      )\n    }\n\n    if (\n      fcl.sansPrefix(from).toLowerCase() !==\n      fcl.sansPrefix(coaAddress).toLowerCase()\n    ) {\n      throw new Error(\"Signer address does not match authenticated COA address\")\n    }\n\n    try {\n      const response: CompositeSignature[] =\n        await this.user.signUserMessage(message)\n\n      if (!response || response.length === 0) {\n        throw new Error(\"Failed to sign message\")\n      }\n\n      const keyIndices = response.map(sig => sig.keyId)\n      const signatures = response.map(sig => sig.signature)\n\n      const addressHexArray = Buffer.from(fcl.sansPrefix(from), \"hex\")\n\n      const capabilityPath = \"/public/evm\"\n\n      const rlpEncodedProof = rlp\n        .encode([keyIndices, addressHexArray, capabilityPath, signatures])\n        .toString(\"hex\")\n\n      return fcl.withPrefix(rlpEncodedProof)\n    } catch (error) {\n      throw error\n    }\n  }\n\n  /**\n   * Validates that the provided chain ID matches the current network.\n   */\n  private async validateChainId(chainId: number): Promise<void> {\n    const currentChainId = await this.networkManager.getChainId()\n    if (chainId !== currentChainId) {\n      throw new Error(\n        `Chain ID does not match the current network. Expected: ${currentChainId}, Received: ${chainId}`\n      )\n    }\n  }\n\n  /**\n   * Gets the Flow network based on the chain ID or throws an error.\n   */\n  private getFlowNetworkOrThrow(chainId: number): FlowNetwork {\n    const flowNetwork = getFlowNetwork(chainId)\n    if (!flowNetwork) {\n      throw new Error(\"Flow network not found for chain ID\")\n    }\n    return flowNetwork\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/accounts/sign-message.test.ts",
    "content": "import {NetworkManager} from \"../network/network-manager\"\nimport {AccountManager} from \"./account-manager\"\nimport {mockUser} from \"../__mocks__/fcl\"\nimport {CurrentUser} from \"@onflow/typedefs\"\nimport * as fcl from \"@onflow/fcl\"\nimport {BehaviorSubject} from \"../util/observable\"\nimport * as rlp from \"@onflow/rlp\"\n\njest.mock(\"@onflow/fcl\", () => {\n  const fcl = jest.requireActual(\"@onflow/fcl\")\n  return {\n    withPrefix: fcl.withPrefix,\n    sansPrefix: fcl.sansPrefix,\n    mutate: jest.fn(),\n    query: jest.fn(),\n  }\n})\n\njest.mock(\"@onflow/rlp\", () => ({\n  encode: jest.fn(),\n  Buffer: jest.requireActual(\"@onflow/rlp\").Buffer,\n}))\n\ndescribe(\"signMessage\", () => {\n  let networkManager: jest.Mocked<NetworkManager>\n  let accountManager: AccountManager\n  let user: ReturnType<typeof mockUser>[\"mock\"]\n  let updateUser: ReturnType<typeof mockUser>[\"set\"]\n\n  beforeEach(() => {\n    jest.resetAllMocks()\n    ;({mock: user, set: updateUser} = mockUser({addr: \"0x123\"} as CurrentUser))\n    jest.mocked(fcl.query).mockResolvedValue(\"0xCOA1\")\n    const $mockChainId = new BehaviorSubject<number | null>(747)\n    networkManager = {\n      $chainId: $mockChainId,\n      getChainId: () => $mockChainId.getValue(),\n    } as any as jest.Mocked<NetworkManager>\n    accountManager = new AccountManager(user, networkManager)\n  })\n\n  it(\"should throw an error if the COA address is not available\", async () => {\n    await updateUser({addr: undefined} as CurrentUser)\n\n    await expect(\n      accountManager.signMessage(\"Test message\", \"0x1234\")\n    ).rejects.toThrow(\n      \"COA address is not available. User might not be authenticated.\"\n    )\n  })\n\n  it(\"should throw an error if the signer address does not match the COA address\", async () => {\n    await expect(\n      accountManager.signMessage(\"Test message\", \"0xDIFFERENT\")\n    ).rejects.toThrow(\"Signer address does not match authenticated COA address\")\n  })\n\n  it(\"should successfully sign a message and return an RLP-encoded proof\", async () => {\n    const mockSignature = \"0xabcdef1234567890\"\n    const mockRlpEncoded = \"f86a808683abcdef682f73746f726167652f65766d\"\n\n    user.signUserMessage.mockResolvedValue([\n      {addr: \"0xCOA1\", keyId: 0, signature: mockSignature} as any,\n    ])\n\n    jest.mocked(rlp.encode).mockReturnValue(Buffer.from(mockRlpEncoded, \"hex\"))\n\n    const proof = await accountManager.signMessage(\"Test message\", \"0xCOA1\")\n\n    expect(proof).toBe(`0x${mockRlpEncoded}`)\n\n    expect(user.signUserMessage).toHaveBeenCalledWith(\"Test message\")\n\n    expect(rlp.encode).toHaveBeenCalledWith([\n      [0],\n      expect.any(Buffer),\n      \"/public/evm\",\n      [mockSignature],\n    ])\n  })\n\n  it(\"should throw an error if signUserMessage returns an empty array\", async () => {\n    user.signUserMessage.mockResolvedValue([])\n    await expect(\n      accountManager.signMessage(\"Test message\", \"0xCOA1\")\n    ).rejects.toThrow(\"Failed to sign message\")\n  })\n\n  it(\"should throw an error if signUserMessage fails\", async () => {\n    user.signUserMessage = jest\n      .fn()\n      .mockRejectedValue(new Error(\"Signing failed\"))\n\n    await expect(\n      accountManager.signMessage(\"Test message\", \"0xCOA1\")\n    ).rejects.toThrow(\"Signing failed\")\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/cadence.ts",
    "content": "import {getContractAddress} from \"./util/eth\"\nimport {ContractType} from \"./constants\"\n\nconst evmImport = (chainId: number) =>\n  `import EVM from ${getContractAddress(ContractType.EVM, chainId)}`\n\nexport const getCOAScript = (chainId: number) => `${evmImport(chainId)}\n\n/// Returns the hex encoded address of the COA in the given Flow address\naccess(all) fun main(flowAddress: Address): String? {\n    return getAuthAccount<auth(BorrowValue) &Account>(flowAddress)\n        .storage.borrow<&EVM.CadenceOwnedAccount>(from: /storage/evm)\n        ?.address()\n        ?.toString()\n        ?? nil\n}`\n\nexport const createCOATx = (chainId: number) => `${evmImport(chainId)}\n\ntransaction() {\n    prepare(signer: auth(SaveValue, IssueStorageCapabilityController, PublishCapability) &Account) {\n        let storagePath = /storage/evm\n        let publicPath = /public/evm\n\n        let coa: @EVM.CadenceOwnedAccount <- EVM.createCadenceOwnedAccount()\n        signer.storage.save(<-coa, to: storagePath)\n\n        let cap = signer.capabilities.storage.issue<&EVM.CadenceOwnedAccount>(storagePath)\n        signer.capabilities.publish(cap, at: publicPath)\n    }\n}`\n\nexport const sendTransactionTx = (chainId: number) => `${evmImport(chainId)}\n\n/// Executes the calldata from the signer's COA\ntransaction(evmContractAddressHex: String, calldata: String, gasLimit: UInt64, value: UInt) {\n    \n    let evmAddress: EVM.EVMAddress\n    let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount\n\n    prepare(signer: auth(BorrowValue) &Account) {\n        self.evmAddress = EVM.addressFromString(evmContractAddressHex)\n        self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA from provided gateway address\")\n    }\n\n    execute {\n        let valueBalance = EVM.Balance(attoflow: value)\n        let callResult = self.coa.call(\n            to: self.evmAddress,\n            data: calldata.decodeHex(),\n            gasLimit: gasLimit,\n            value: valueBalance\n        )\n    }\n}`\n\nexport const getNonceScript = (chainId: number) => `${evmImport(chainId)}\n\naccess(all)\nfun main(evmAddress: String): UInt64 {\n    let addr = EVM.EVMAddress(bytes: evmAddress.decodeHex().toConstantSized<[UInt8; 20]>()!)\n    let nonce = addr.nonce()\n    return nonce\n}`\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/constants.ts",
    "content": "export enum FlowNetwork {\n  MAINNET = \"mainnet\",\n  TESTNET = \"testnet\",\n}\n\nexport const FLOW_CHAINS = {\n  [FlowNetwork.MAINNET]: {\n    eip155ChainId: 747,\n    publicRpcUrl: \"https://mainnet.evm.nodes.onflow.org\",\n  },\n  [FlowNetwork.TESTNET]: {\n    eip155ChainId: 545,\n    publicRpcUrl: \"https://testnet.evm.nodes.onflow.org\",\n  },\n}\n\nexport enum ContractType {\n  EVM = \"EVM\",\n}\n\nexport enum EventType {\n  CADENCE_OWNED_ACCOUNT_CREATED = \"CADENCE_OWNED_ACCOUNT_CREATED\",\n  TRANSACTION_EXECUTED = \"TRANSACTION_EXECUTED\",\n}\n\nexport const EVENT_IDENTIFIERS = {\n  [EventType.TRANSACTION_EXECUTED]: {\n    [FlowNetwork.TESTNET]: \"A.8c5303eaa26202d6.EVM.TransactionExecuted\",\n    [FlowNetwork.MAINNET]: \"A.e467b9dd11fa00df.EVM.TransactionExecuted\",\n  },\n  [EventType.CADENCE_OWNED_ACCOUNT_CREATED]: {\n    [FlowNetwork.TESTNET]: \"A.8c5303eaa26202d6.EVM.CadenceOwnedAccountCreated\",\n    [FlowNetwork.MAINNET]: \"A.e467b9dd11fa00df.EVM.CadenceOwnedAccountCreated\",\n  },\n}\n\nexport const FLOW_CONTRACTS = {\n  [ContractType.EVM]: {\n    [FlowNetwork.TESTNET]: \"0x8c5303eaa26202d6\",\n    [FlowNetwork.MAINNET]: \"0xe467b9dd11fa00df\",\n  },\n}\n\nexport interface TransactionExecutedEvent {\n  hash: string[]\n  index: string\n  type: string\n  payload: string[]\n  errorCode: string\n  errorMessage: string\n  gasConsumed: string\n  contractAddress: string\n  logs: string[]\n  blockHeight: string\n  returnedData: string[]\n  precompiledCalls: string[]\n  stateUpdateChecksum: string\n}\n\nexport const ACCESS_NODE_API_KEY = \"accessNode.api\"\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/create-provider.ts",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport {Eip1193Provider} from \"./types/provider\"\nimport {FclEthereumProvider} from \"./provider\"\nimport {RpcProcessor} from \"./rpc/rpc-processor\"\nimport {Service} from \"@onflow/typedefs\"\nimport {EventDispatcher} from \"./events/event-dispatcher\"\nimport {AccountManager} from \"./accounts/account-manager\"\nimport {FLOW_CHAINS} from \"./constants\"\nimport {Gateway} from \"./gateway/gateway\"\nimport {NetworkManager} from \"./network/network-manager\"\n\nexport type FclProviderConfig = {\n  user: typeof fcl.currentUser\n  config: typeof fcl.config\n  service?: Service\n  rpcUrls?: {[chainId: number]: string}\n}\n\n/**\n * Create a new FCL Ethereum provider\n * @param config - Configuration object\n * @param config.user - The current user\n * @param config.config - The FCL config\n * @param config.service - The service\n * @param config.rpcUrls - The RPC URLs\n * @returns The provider\n * @public\n * @example\n * ```javascript\n * import {createProvider} from \"@onflow/fcl-ethereum-provider\"\n *\n * const provider = createProvider({\n *  user: fcl.currentUser,\n *  config: fcl.config,\n *  service: fcl.service,\n *  rpcUrls: {\n *   747: \"https://mainnet.evm.nodes.onflow.org\",\n *  }\n * })\n * ```\n */\nexport function createProvider(config: FclProviderConfig): Eip1193Provider {\n  const defaultRpcUrls = Object.values(FLOW_CHAINS).reduce(\n    (acc, chain) => {\n      acc[chain.eip155ChainId] = chain.publicRpcUrl\n      return acc\n    },\n    {} as {[chainId: number]: string}\n  )\n\n  const networkManager = new NetworkManager(config.config)\n  const gateway = new Gateway({\n    ...defaultRpcUrls,\n    ...(config.rpcUrls || {}),\n  })\n  const accountManager = new AccountManager(\n    config.user,\n    networkManager,\n    gateway,\n    config.service\n  )\n  const rpcProcessor = new RpcProcessor(gateway, accountManager, networkManager)\n  const eventProcessor = new EventDispatcher(accountManager, networkManager)\n  const provider = new FclEthereumProvider(\n    accountManager,\n    rpcProcessor,\n    eventProcessor\n  )\n\n  return provider\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/events/event-dispatcher.test.ts",
    "content": "import {AccountManager} from \"../accounts/account-manager\"\nimport {ChainIdStore, NetworkManager} from \"../network/network-manager\"\nimport {BehaviorSubject, Subject} from \"../util/observable\"\nimport {EventDispatcher} from \"./event-dispatcher\"\n\njest.mock(\"../accounts/account-manager\")\njest.mock(\"../network/network-manager\")\n\ndescribe(\"event dispatcher\", () => {\n  let networkManager: jest.Mocked<NetworkManager>\n  let $mockChainId: Subject<ChainIdStore>\n  let accountManager: jest.Mocked<AccountManager>\n\n  beforeEach(() => {\n    jest.clearAllMocks()\n    $mockChainId = new Subject<ChainIdStore>()\n    networkManager = {\n      $chainId: $mockChainId,\n      getChainId: jest.fn(),\n    } as any\n    accountManager = new (AccountManager as any)()\n  })\n  test(\"unsubscribe should remove listener\", () => {\n    let subs: ((accounts: string[]) => void)[] = []\n    accountManager.subscribe.mockImplementation(cb => {\n      subs.push(cb)\n      return () => {\n        subs = subs.filter(sub => sub !== cb)\n      }\n    })\n    const listener = jest.fn()\n\n    const eventDispatcher = new EventDispatcher(accountManager, networkManager)\n    eventDispatcher.on(\"accountsChanged\", listener)\n\n    expect(accountManager.subscribe).toHaveBeenCalled()\n    expect(accountManager.subscribe).toHaveBeenCalledTimes(1)\n    expect(accountManager.subscribe).toHaveBeenCalledWith(expect.any(Function))\n\n    // Simulate account change from account manager\n    subs.forEach(sub => sub([\"1234\"]))\n\n    expect(listener).toHaveBeenCalled()\n    expect(listener).toHaveBeenCalledTimes(1)\n    expect(listener).toHaveBeenCalledWith([\"0x1234\"])\n\n    eventDispatcher.off(\"accountsChanged\", listener)\n\n    // Simulate account change from account manager\n    subs.forEach(sub => sub([\"5678\"]))\n\n    expect(listener).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"should emit accountsChanged\", () => {\n    let mockMgrSubCb: (accounts: string[]) => void\n    accountManager.subscribe.mockImplementation(cb => {\n      mockMgrSubCb = cb\n      return () => {}\n    })\n    const listener = jest.fn()\n\n    const eventDispatcher = new EventDispatcher(accountManager, networkManager)\n    eventDispatcher.on(\"accountsChanged\", listener)\n\n    expect(accountManager.subscribe).toHaveBeenCalled()\n    expect(accountManager.subscribe).toHaveBeenCalledTimes(1)\n    expect(accountManager.subscribe).toHaveBeenCalledWith(expect.any(Function))\n\n    // Simulate account change from account manager\n    mockMgrSubCb!([\"1234\"])\n\n    expect(listener).toHaveBeenCalled()\n    expect(listener).toHaveBeenCalledTimes(1)\n    expect(listener).toHaveBeenCalledWith([\"0x1234\"])\n  })\n\n  test(\"should emit accountsChanged multiple times\", () => {\n    let mockMgrSubCb: (accounts: string[]) => void\n    accountManager.subscribe.mockImplementation(cb => {\n      mockMgrSubCb = cb\n      return () => {}\n    })\n    const listener = jest.fn()\n\n    const eventDispatcher = new EventDispatcher(accountManager, networkManager)\n    eventDispatcher.on(\"accountsChanged\", listener)\n\n    expect(accountManager.subscribe).toHaveBeenCalled()\n    expect(accountManager.subscribe).toHaveBeenCalledTimes(1)\n    expect(accountManager.subscribe).toHaveBeenCalledWith(expect.any(Function))\n\n    // Simulate account change from account manager\n    mockMgrSubCb!([\"1234\"])\n    mockMgrSubCb!([\"5678\"])\n\n    expect(listener).toHaveBeenCalled()\n    expect(listener).toHaveBeenCalledTimes(2)\n    expect(listener).toHaveBeenNthCalledWith(1, [\"0x1234\"])\n    expect(listener).toHaveBeenNthCalledWith(2, [\"0x5678\"])\n  })\n\n  test(\"should emit chainChanged\", async () => {\n    const listener = jest.fn()\n\n    const eventDispatcher = new EventDispatcher(accountManager, networkManager)\n    eventDispatcher.on(\"chainChanged\", listener)\n\n    // Initial chain id, should not emit as a change\n    $mockChainId.next({isLoading: false, error: null, chainId: 0x286})\n\n    // Change chain id\n    $mockChainId.next({isLoading: false, error: null, chainId: 0x2eb})\n\n    await new Promise(resolve => setTimeout(resolve, 100))\n\n    expect(listener).toHaveBeenCalledTimes(1)\n    expect(listener).toHaveBeenCalledWith(\"0x2eb\")\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/events/event-dispatcher.ts",
    "content": "import {EventCallback, ProviderEvents} from \"../types/provider\"\nimport {AccountManager} from \"../accounts/account-manager\"\nimport {NetworkManager} from \"../network/network-manager\"\nimport {\n  distinctUntilChanged,\n  filter,\n  map,\n  Observable,\n  pairwise,\n  skip,\n  Subscription,\n  takeFirst,\n} from \"../util/observable\"\nimport {formatChainId} from \"../util/eth\"\nimport {withPrefix} from \"@onflow/fcl\"\nimport {ProviderError, ProviderErrorCode} from \"../util/errors\"\n\nexport class EventDispatcher {\n  private $emitters: {\n    [E in keyof ProviderEvents]: Observable<ProviderEvents[E]>\n  }\n  private subscriptions: {\n    [E in keyof ProviderEvents]: Map<\n      EventCallback<ProviderEvents[E]>,\n      Subscription\n    >\n  }\n\n  constructor(accountManager: AccountManager, networkManager: NetworkManager) {\n    this.$emitters = {\n      // Emit changes to the accounts as an accountsChanged event\n      accountsChanged: new Observable(subscriber => {\n        return accountManager.subscribe(accounts => {\n          subscriber.next(accounts.map(x => withPrefix(x)))\n        })\n      }),\n      // Emit changes to the chainId as a chainChanged event\n      chainChanged: networkManager.$chainId.pipe(\n        filter(({isLoading, error}) => !isLoading && !error),\n        map(({chainId}) => {\n          return formatChainId(chainId!)\n        }),\n        skip(1)\n      ) as Observable<string>,\n      // Emit the first chainId as a connect event\n      connect: networkManager.$chainId.pipe(\n        filter(({isLoading, error}) => !isLoading && !error),\n        map(({chainId}) => {\n          return {chainId: formatChainId(chainId!)}\n        }),\n        takeFirst()\n      ),\n      disconnect: networkManager.$chainId.pipe(\n        filter(({isLoading, error}) => !isLoading && !error),\n        pairwise(),\n        filter(\n          ([prev, curr]) => prev.chainId !== null && curr.chainId === null\n        ),\n        map(() => {\n          return new ProviderError({code: ProviderErrorCode.Disconnected})\n        })\n      ),\n    }\n\n    this.subscriptions = {\n      accountsChanged: new Map(),\n      chainChanged: new Map(),\n      connect: new Map(),\n      disconnect: new Map(),\n    }\n  }\n\n  // Listen to events\n  on<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void {\n    const unsub = this.$emitters[event].subscribe(listener)\n    this.subscriptions[event].set(listener, unsub)\n  }\n\n  // Remove event listeners\n  off<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void {\n    this.subscriptions[event].get(listener)?.()\n    this.subscriptions[event].delete(listener)\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/gateway/gateway.test.ts",
    "content": "import HttpConnection from \"@walletconnect/jsonrpc-http-connection\"\nimport {Gateway} from \"./gateway\"\nimport {JsonRpcProvider} from \"@walletconnect/jsonrpc-provider\"\n\njest.mock(\"@walletconnect/jsonrpc-http-connection\")\njest.mock(\"@walletconnect/jsonrpc-provider\")\n\ndescribe(\"gateway\", () => {\n  beforeEach(() => {\n    jest.clearAllMocks()\n  })\n\n  test(\"request should work for mainnet\", async () => {\n    const gateway = new Gateway({\n      747: \"https://example.com\",\n      545: \"https://example.com/testnet\",\n    })\n\n    jest.mocked(JsonRpcProvider).mockImplementation(\n      jest.fn(\n        () =>\n          ({\n            request: jest.fn().mockResolvedValue([\"0x123\"]),\n          }) as any as JsonRpcProvider\n      )\n    )\n\n    const returnValue = await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 747,\n    })\n\n    // Check that the arguments are correct\n    expect(\n      jest.mocked(JsonRpcProvider).mock.results[0].value.request\n    ).toHaveBeenCalledWith({method: \"eth_accounts\", params: []})\n\n    // Check that the return value propagates correctly\n    expect(returnValue).toEqual([\"0x123\"])\n\n    // Verify that the mainnet provider was used\n    expect(JsonRpcProvider).toHaveBeenCalled()\n    expect(JsonRpcProvider).toHaveBeenCalledTimes(1)\n    expect(JsonRpcProvider).toHaveBeenCalledWith(\n      jest.mocked(HttpConnection).mock.instances[0]\n    )\n    expect(HttpConnection).toHaveBeenCalledWith(\"https://example.com\")\n  })\n\n  test(\"request should work for testnet\", async () => {\n    const gateway = new Gateway({\n      747: \"https://example.com\",\n      545: \"https://example.com/testnet\",\n    })\n\n    jest.mocked(JsonRpcProvider).mockImplementation(\n      jest.fn(\n        () =>\n          ({\n            request: jest.fn().mockResolvedValue([\"0x123\"]),\n          }) as any as JsonRpcProvider\n      )\n    )\n\n    const returnValue = await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 545,\n    })\n\n    // Check that the arguments are correct\n    expect(\n      jest.mocked(JsonRpcProvider).mock.results[0].value.request\n    ).toHaveBeenCalledWith({method: \"eth_accounts\", params: []})\n\n    // Check that the return value propagates correctly\n    expect(returnValue).toEqual([\"0x123\"])\n\n    // Verify that the testnet provider was used\n    expect(JsonRpcProvider).toHaveBeenCalled()\n    expect(JsonRpcProvider).toHaveBeenCalledTimes(1)\n    expect(JsonRpcProvider).toHaveBeenCalledWith(\n      jest.mocked(HttpConnection).mock.instances[0]\n    )\n    expect(HttpConnection).toHaveBeenCalledWith(\"https://example.com/testnet\")\n  })\n\n  test(\"subsequent requests should use the same provider\", async () => {\n    const gateway = new Gateway({\n      747: \"https://example.com\",\n      545: \"https://example.com/testnet\",\n    })\n\n    jest.mocked(JsonRpcProvider).mockImplementation(\n      jest.fn(\n        () =>\n          ({\n            request: jest.fn().mockResolvedValue([\"0x123\"]),\n          }) as any as JsonRpcProvider\n      )\n    )\n\n    await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 545,\n    })\n\n    await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 545,\n    })\n\n    // Verify that the testnet provider was used\n    expect(JsonRpcProvider).toHaveBeenCalled()\n    expect(JsonRpcProvider).toHaveBeenCalledTimes(1)\n    expect(JsonRpcProvider).toHaveBeenCalledWith(\n      jest.mocked(HttpConnection).mock.instances[0]\n    )\n    expect(HttpConnection).toHaveBeenCalledWith(\"https://example.com/testnet\")\n  })\n\n  test(\"request should throw if chainId is not found\", async () => {\n    const gateway = new Gateway({\n      747: \"https://example.com\",\n      545: \"https://example.com/testnet\",\n    })\n\n    await expect(\n      gateway.request({\n        method: \"eth_accounts\",\n        params: [],\n        chainId: 123,\n      })\n    ).rejects.toThrow(\"RPC URL not found for chainId 123\")\n  })\n\n  test(\"should default to public gateway mainnet\", async () => {\n    const gateway = new Gateway({})\n\n    jest.mocked(JsonRpcProvider).mockImplementation(\n      jest.fn(\n        () =>\n          ({\n            request: jest.fn().mockResolvedValue([\"0x123\"]),\n          }) as any as JsonRpcProvider\n      )\n    )\n\n    await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 747,\n    })\n\n    // Verify that the mainnet provider was used\n    expect(JsonRpcProvider).toHaveBeenCalled()\n    expect(JsonRpcProvider).toHaveBeenCalledTimes(1)\n    expect(JsonRpcProvider).toHaveBeenCalledWith(\n      jest.mocked(HttpConnection).mock.instances[0]\n    )\n    expect(HttpConnection).toHaveBeenCalledWith(\n      \"https://mainnet.evm.nodes.onflow.org\"\n    )\n  })\n\n  test(\"should default to public gateway testnet\", async () => {\n    const gateway = new Gateway({})\n\n    jest.mocked(JsonRpcProvider).mockImplementation(\n      jest.fn(\n        () =>\n          ({\n            request: jest.fn().mockResolvedValue([\"0x123\"]),\n          }) as any as JsonRpcProvider\n      )\n    )\n\n    await gateway.request({\n      method: \"eth_accounts\",\n      params: [],\n      chainId: 545,\n    })\n\n    // Verify that the testnet provider was used\n    expect(JsonRpcProvider).toHaveBeenCalled()\n    expect(JsonRpcProvider).toHaveBeenCalledTimes(1)\n    expect(JsonRpcProvider).toHaveBeenCalledWith(\n      jest.mocked(HttpConnection).mock.instances[0]\n    )\n    expect(HttpConnection).toHaveBeenCalledWith(\n      \"https://testnet.evm.nodes.onflow.org\"\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/gateway/gateway.ts",
    "content": "import HTTPConnection from \"@walletconnect/jsonrpc-http-connection\"\nimport {JsonRpcProvider} from \"@walletconnect/jsonrpc-provider\"\nimport {FLOW_CHAINS} from \"../constants\"\n\nexport class Gateway {\n  private providers: {[chainId: number]: JsonRpcProvider} = {}\n\n  constructor(private rpcUrls: {[chainId: number]: string}) {}\n\n  public async request({\n    method,\n    params,\n    chainId,\n  }: {\n    method: string\n    params: any\n    chainId: number\n  }): Promise<any> {\n    return this.getProvider(chainId).then(provider =>\n      provider.request({method, params})\n    )\n  }\n\n  private async getProvider(eip155ChainId: number): Promise<JsonRpcProvider> {\n    if (this.providers[eip155ChainId]) {\n      return this.providers[eip155ChainId]\n    }\n\n    let rpcUrl: string | undefined = this.rpcUrls[eip155ChainId]\n    if (!rpcUrl) {\n      for (const chain of Object.values(FLOW_CHAINS)) {\n        if (chain.eip155ChainId === eip155ChainId) {\n          rpcUrl = chain.publicRpcUrl\n          break\n        }\n      }\n    }\n    if (!rpcUrl) {\n      throw new Error(`RPC URL not found for chainId ${eip155ChainId}`)\n    }\n\n    const provider = new JsonRpcProvider(new HTTPConnection(rpcUrl))\n    this.providers[eip155ChainId] = provider\n    return provider\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/hash-utils.test.ts",
    "content": "import {keccak_256} from \"@noble/hashes/sha3\"\nimport {bytesToHex} from \"@noble/hashes/utils\"\nimport {concat, arrayify} from \"@ethersproject/bytes\"\nimport {_TypedDataEncoder as TypedDataEncoder} from \"@ethersproject/hash\"\nimport {TypedData} from \"./types/eth\"\nimport {\n  hashTypedDataLegacy,\n  hashTypedDataV3,\n  hashTypedDataV4,\n} from \"./hash-utils\"\n\njest.mock(\"@noble/hashes/sha3\", () => ({\n  keccak_256: jest.fn(() =>\n    Uint8Array.from([0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90])\n  ),\n}))\n\njest.mock(\"@ethersproject/hash\", () => {\n  const original = jest.requireActual(\"@ethersproject/hash\")\n  return {\n    ...original,\n    _TypedDataEncoder: {\n      hashDomain: jest.fn(\n        domain =>\n          // Return a valid 32-byte hex string (64 hex characters after \"0x\")\n          \"0x1111111111111111111111111111111111111111111111111111111111111111\"\n      ),\n      hash: jest.fn(\n        (domain, types, message) =>\n          \"0x2222222222222222222222222222222222222222222222222222222222222222\"\n      ),\n    },\n  }\n})\n\ndescribe(\"Hash Utils\", () => {\n  const mockTypedData: TypedData = {\n    domain: {name: \"Ether Mail\", chainId: 1},\n    message: {from: \"Alice\", to: \"Bob\", contents: \"Hello\"},\n    types: {\n      EIP712Domain: [\n        {name: \"name\", type: \"string\"},\n        {name: \"chainId\", type: \"uint256\"},\n      ],\n      Mail: [\n        {name: \"from\", type: \"string\"},\n        {name: \"to\", type: \"string\"},\n        {name: \"contents\", type: \"string\"},\n      ],\n    },\n    primaryType: \"Mail\",\n  }\n\n  afterEach(() => {\n    jest.clearAllMocks()\n  })\n\n  describe(\"hashTypedDataLegacy\", () => {\n    it(\"should throw an error for legacy (legacy support is not provided)\", () => {\n      expect(() => hashTypedDataLegacy(mockTypedData)).toThrowError(\n        \"Legacy eth_signTypedData is not supported. Please use eth_signTypedData_v3 or eth_signTypedData_v4 instead.\"\n      )\n    })\n  })\n\n  describe(\"hashTypedDataV3\", () => {\n    it(\"should call the TypedDataEncoder functions and then keccak_256 correctly\", () => {\n      const result = hashTypedDataV3(mockTypedData)\n\n      expect(TypedDataEncoder.hashDomain).toHaveBeenCalledWith(\n        mockTypedData.domain\n      )\n\n      expect(TypedDataEncoder.hash).toHaveBeenCalledWith(\n        mockTypedData.domain,\n        mockTypedData.types,\n        mockTypedData.message\n      )\n\n      // The implementation concatenates:\n      //   prefix (0x1901), domainSeparator, and messageHash.\n      const prefix = \"0x1901\"\n      const expectedConcat = concat([\n        arrayify(prefix),\n        arrayify(\n          \"0x1111111111111111111111111111111111111111111111111111111111111111\"\n        ),\n        arrayify(\n          \"0x2222222222222222222222222222222222222222222222222222222222222222\"\n        ),\n      ])\n\n      expect(keccak_256).toHaveBeenCalledWith(expectedConcat)\n\n      // The keccak_256 mock always returns our fixed Uint8Array,\n      // so the expected hash is:\n      const expectedV3Hash =\n        \"0x\" +\n        bytesToHex(\n          Uint8Array.from([0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90])\n        )\n      expect(result).toBe(expectedV3Hash)\n    })\n  })\n\n  describe(\"hashTypedDataV4\", () => {\n    it(\"should produce the same result as v3 (for non-nested cases)\", () => {\n      const v3Result = hashTypedDataV3(mockTypedData)\n      const v4Result = hashTypedDataV4(mockTypedData)\n      expect(v4Result).toBe(v3Result)\n    })\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/hash-utils.ts",
    "content": "import {keccak_256} from \"@noble/hashes/sha3\"\nimport {bytesToHex} from \"@noble/hashes/utils\"\nimport {arrayify, concat} from \"@ethersproject/bytes\"\nimport {_TypedDataEncoder as TypedDataEncoder} from \"@ethersproject/hash\"\nimport {TypedData} from \"./types/eth\"\n\nexport function hashTypedDataLegacy(data: TypedData): string {\n  throw new Error(\n    \"Legacy eth_signTypedData is not supported. Please use eth_signTypedData_v3 or eth_signTypedData_v4 instead.\"\n  )\n}\n\n/**\n * Hash for `eth_signTypedData_v3`\n *\n * Uses EIP‑712 encoding:\n *   digest = keccak_256( \"\\x19\\x01\" || domainSeparator || messageHash )\n */\nexport function hashTypedDataV3(data: TypedData): string {\n  const domainSeparator = TypedDataEncoder.hashDomain(data.domain)\n  const messageHash = TypedDataEncoder.hash(\n    data.domain,\n    data.types,\n    data.message\n  )\n  // The EIP‑191 prefix is \"0x1901\".\n  const prefix = \"0x1901\"\n  const digest = keccak_256(\n    concat([arrayify(prefix), arrayify(domainSeparator), arrayify(messageHash)])\n  )\n  return \"0x\" + bytesToHex(digest)\n}\n\n/**\n * Hash for `eth_signTypedData_v4`\n *\n * For many cases, v3 and v4 yield the same result (if you’re not using arrays or nested dynamic types).\n */\nexport function hashTypedDataV4(data: TypedData): string {\n  return hashTypedDataV3(data)\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/index.ts",
    "content": "export {createProvider} from \"./create-provider\"\nexport {WalletConnectEthereumProvider} from \"./wc-provider\"\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/network/network-manager.test.ts",
    "content": "import {mockConfig} from \"../__mocks__/fcl\"\nimport {NetworkManager} from \"./network-manager\"\nimport * as fcl from \"@onflow/fcl\"\n\njest.mock(\"@onflow/fcl\", () => {\n  return {\n    getChainId: jest.fn(),\n  }\n})\n\ndescribe(\"network manager\", () => {\n  beforeEach(() => {\n    jest.clearAllMocks()\n  })\n\n  test(\"getChainId should return correct chain id mainnet\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"mainnet\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n    const manager = new NetworkManager(config.mock)\n    const chainId = await manager.getChainId()\n\n    expect(chainId).toBe(747)\n  })\n\n  test(\"getChainId should return correct chain id testnet\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"testnet\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n    const manager = new NetworkManager(config.mock)\n    const chainId = await manager.getChainId()\n\n    expect(chainId).toBe(545)\n  })\n\n  test(\"getChainId should throw error on unknown network\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"unknown\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n\n    const manager = new NetworkManager(config.mock)\n    await expect(manager.getChainId()).rejects.toThrow(\"Unknown network\")\n  })\n\n  test(\"getChainId should throw error on error\", async () => {\n    jest.mocked(fcl.getChainId).mockRejectedValue(new Error(\"error\"))\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n\n    const manager = new NetworkManager(config.mock)\n    await expect(manager.getChainId()).rejects.toThrow(\"error\")\n  })\n\n  test(\"subscribe should return correct chain id\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"mainnet\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n\n    const manager = new NetworkManager(config.mock)\n    const chainId = await new Promise<number>(resolve => {\n      const unsub = manager.$chainId.subscribe(({chainId}) => {\n        if (chainId) {\n          resolve(chainId)\n          unsub()\n        }\n      })\n    })\n\n    expect(chainId).toBe(747)\n  })\n\n  test(\"subscribe should update chain id\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"mainnet\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n\n    const manager = new NetworkManager(config.mock)\n\n    const chainIds: number[] = []\n\n    const unsub = manager.$chainId.subscribe(({chainId}) => {\n      if (chainId) {\n        chainIds.push(chainId)\n      }\n    })\n\n    await config.set({\n      \"accessNode.api\": \"https://example2.com\",\n    })\n\n    await config.set({\n      \"accessNode.api\": \"https://example3.com\",\n    })\n\n    unsub()\n\n    expect(chainIds).toEqual([747, 747, 747])\n    expect(fcl.getChainId).toHaveBeenCalledTimes(3)\n  })\n\n  test(\"should not query chain id multiple times for same access node\", async () => {\n    jest.mocked(fcl.getChainId).mockResolvedValue(\"mainnet\")\n\n    const config = mockConfig()\n    await config.set({\n      \"accessNode.api\": \"https://example.com\",\n    })\n\n    const manager = new NetworkManager(config.mock)\n\n    await manager.getChainId()\n    await manager.getChainId()\n    await manager.getChainId()\n\n    expect(fcl.getChainId).toHaveBeenCalledTimes(1)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/network/network-manager.ts",
    "content": "import {ACCESS_NODE_API_KEY, FLOW_CHAINS, FlowNetwork} from \"../constants\"\nimport {\n  BehaviorSubject,\n  concat,\n  distinctUntilChanged,\n  filter,\n  firstValueFrom,\n  from,\n  map,\n  of,\n  switchMap,\n} from \"../util/observable\"\nimport * as fcl from \"@onflow/fcl\"\nimport {AddEthereumChainParams, SwitchEthereumChainParams} from \"../types/eth\"\n\nexport type ChainIdStore = {\n  isLoading: boolean\n  chainId: number | null\n  error: unknown | null\n}\n\nexport class NetworkManager {\n  private $chainIdStore = new BehaviorSubject<ChainIdStore>({\n    isLoading: true,\n    chainId: null,\n    error: null,\n  })\n\n  constructor(config: typeof fcl.config) {\n    // Map FCL config to behavior subject\n    const $config = new BehaviorSubject<Record<string, unknown> | null>(null)\n    config.subscribe((cfg, err) => {\n      if (err) {\n        $config.error(err)\n      } else {\n        $config.next(cfg)\n      }\n    })\n\n    // Bind $network to chainId\n    $config\n      .pipe(\n        map(cfg => cfg?.[ACCESS_NODE_API_KEY]),\n        distinctUntilChanged(),\n        switchMap(accessNode =>\n          concat(\n            of({isLoading: true} as ChainIdStore),\n            from(\n              (async () => {\n                try {\n                  const flowNetwork = (await fcl.getChainId({\n                    node: accessNode,\n                  })) as FlowNetwork\n                  if (!(flowNetwork in FLOW_CHAINS)) {\n                    throw new Error(\"Unknown network\")\n                  }\n                  const {eip155ChainId: chainId} = FLOW_CHAINS[flowNetwork]\n                  return {isLoading: false, chainId, error: null}\n                } catch (error) {\n                  return {isLoading: false, chainId: null, error}\n                }\n              })()\n            )\n          )\n        )\n      )\n      .subscribe(this.$chainIdStore)\n  }\n\n  get $chainId() {\n    return this.$chainIdStore.asObservable()\n  }\n\n  public async getChainId(): Promise<number | null> {\n    const {chainId, error} = await firstValueFrom(\n      this.$chainIdStore.pipe(filter(x => !x.isLoading))\n    )\n\n    if (error) {\n      throw error\n    }\n    return chainId\n  }\n\n  /**\n   * No-op implementation for wallet_addEthereumChain.\n   * Since FCL does support dynamic chain additions.\n   */\n  public async addChain(_chainConfig: AddEthereumChainParams): Promise<null> {\n    return null\n  }\n\n  public async switchChain(params: SwitchEthereumChainParams): Promise<null> {\n    const activeChainId = await this.getChainId()\n    if (activeChainId === null) {\n      throw new Error(\"No active chain configured.\")\n    }\n\n    // Convert the chainId from hex (e.g., \"0x64\") to a number.\n    const requestedChainId = parseInt(params.chainId, 16)\n\n    if (requestedChainId !== activeChainId) {\n      throw new Error(\n        \"Network switch error: The requested chain ID does not match the currently configured network.\"\n      )\n    }\n    return null\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/notifications.ts",
    "content": "export function displayErrorNotification(title: string, message: string) {\n  const existing = document.getElementById(\"flow-error-notification\")\n  if (existing) {\n    existing.remove()\n  }\n\n  const container = document.createElement(\"div\")\n  container.id = \"flow-error-notification\"\n  document.body.appendChild(container)\n\n  const shadow = container.attachShadow({mode: \"closed\"})\n\n  const isDarkMode =\n    window.matchMedia &&\n    window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n  const backgroundColor = isDarkMode ? \"#2c2c2c\" : \"#ffffff\"\n  const textColor = isDarkMode ? \"#f0f0f0\" : \"#333333\"\n  const borderColor = isDarkMode ? \"#444444\" : \"#e0e0e0\"\n\n  const style = document.createElement(\"style\")\n  style.textContent = `\n    :host {\n      position: fixed;\n      bottom: 20px;\n      right: 20px;\n      z-index: 1000;\n      max-width: 320px;\n      overflow: hidden;\n    }\n    .notification {\n      background-color: ${backgroundColor};\n      color: ${textColor};\n      padding: 16px 24px;\n      border-radius: 8px;\n      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n      font-family: Arial, sans-serif;\n      border: 1px solid ${borderColor};\n      opacity: 0;\n      transform: translateY(20px);\n      transition: opacity 0.3s ease, transform 0.3s ease;\n    }\n    .title {\n      font-weight: bold;\n      margin-bottom: 8px;\n      font-size: 16px;\n    }\n    .message {\n      font-size: 14px;\n      line-height: 1.4;\n    }\n  `\n  shadow.appendChild(style)\n\n  const notification = document.createElement(\"div\")\n  notification.classList.add(\"notification\")\n\n  const titleElem = document.createElement(\"div\")\n  titleElem.classList.add(\"title\")\n  titleElem.innerText = title\n  notification.appendChild(titleElem)\n\n  const messageElem = document.createElement(\"div\")\n  messageElem.classList.add(\"message\")\n  messageElem.innerText = message\n  notification.appendChild(messageElem)\n\n  shadow.appendChild(notification)\n\n  // Trigger the fade-in animation\n  requestAnimationFrame(() => {\n    notification.style.opacity = \"1\"\n    notification.style.transform = \"translateY(0)\"\n  })\n\n  setTimeout(() => {\n    notification.style.opacity = \"0\"\n    notification.style.transform = \"translateY(20px)\"\n    notification.addEventListener(\"transitionend\", () => container.remove())\n  }, 5000)\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/provider.test.ts",
    "content": "describe(\"provider\", () => {\n  test(\"should be tested\", () => {\n    expect(true).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/provider.ts",
    "content": "import {\n  Eip1193Provider,\n  EventCallback,\n  ProviderEvents,\n  ProviderRequest,\n  ProviderResponse,\n} from \"./types/provider\"\nimport {RpcProcessor} from \"./rpc/rpc-processor\"\nimport {EventDispatcher} from \"./events/event-dispatcher\"\nimport {ProviderError, ProviderErrorCode} from \"./util/errors\"\nimport {AccountManager} from \"./accounts/account-manager\"\n\nexport class FclEthereumProvider implements Eip1193Provider {\n  constructor(\n    private acountManager: AccountManager,\n    private rpcProcessor: RpcProcessor,\n    private eventDispatcher: EventDispatcher\n  ) {}\n\n  // Handle requests\n  async request<T = unknown>({\n    method,\n    params,\n  }: ProviderRequest): Promise<ProviderResponse<T>> {\n    if (!method) {\n      throw new Error(\"Method is required\")\n    }\n    const result = await this.rpcProcessor.handleRequest({method, params})\n    return result\n  }\n\n  async disconnect(): Promise<void> {\n    await this.acountManager.unauthenticate()\n  }\n\n  // Listen to events\n  on<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void {\n    this.eventDispatcher.on(event, listener)\n  }\n\n  // Remove event listeners\n  removeListener<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void {\n    this.eventDispatcher.off(event, listener)\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-accounts.test.ts",
    "content": "import {ethAccounts, ethRequestAccounts} from \"./eth-accounts\"\nimport {AccountManager} from \"../../accounts/account-manager\"\n\ndescribe(\"ethAccounts handler\", () => {\n  let accountManagerMock: jest.Mocked<AccountManager>\n\n  beforeEach(() => {\n    accountManagerMock = {\n      getAccounts: jest.fn(),\n      subscribe: jest.fn(),\n      updateCOAAddress: jest.fn(),\n    } as unknown as jest.Mocked<AccountManager>\n  })\n\n  it(\"should return accounts from the AccountManager\", async () => {\n    accountManagerMock.getAccounts.mockResolvedValue([\"0x1234...\", \"0x5678...\"])\n\n    const accounts = await ethAccounts(accountManagerMock)\n\n    expect(accounts).toEqual([\"0x1234...\", \"0x5678...\"])\n    expect(accountManagerMock.getAccounts).toHaveBeenCalled()\n  })\n\n  it(\"should return an empty array if no accounts are available\", async () => {\n    accountManagerMock.getAccounts.mockResolvedValue([])\n\n    const accounts = await ethAccounts(accountManagerMock)\n\n    expect(accounts).toEqual([])\n    expect(accountManagerMock.getAccounts).toHaveBeenCalled()\n  })\n})\n\ndescribe(\"ethRequestAccounts handler\", () => {\n  let accountManagerMock: jest.Mocked<AccountManager>\n\n  beforeEach(() => {\n    accountManagerMock = {\n      authenticate: jest.fn(),\n      getAccounts: jest.fn(),\n      getAndCreateAccounts: jest.fn(),\n      updateCOAAddress: jest.fn(),\n      subscribe: jest.fn(),\n    } as unknown as jest.Mocked<AccountManager>\n  })\n\n  it(\"should call authenticate, updateCOAAddress, and return the manager's accounts\", async () => {\n    accountManagerMock.getAndCreateAccounts.mockResolvedValue([\"0x1234...\"])\n\n    const accounts = await ethRequestAccounts(accountManagerMock, 747)\n\n    expect(accounts).toEqual([\"0x1234...\"])\n\n    expect(accountManagerMock.authenticate).toHaveBeenCalled()\n    expect(accountManagerMock.getAndCreateAccounts).toHaveBeenCalledWith(747)\n  })\n\n  it(\"should handle empty accounts scenario\", async () => {\n    accountManagerMock.getAndCreateAccounts.mockResolvedValue([])\n\n    const accounts = await ethRequestAccounts(accountManagerMock, 747)\n\n    expect(accountManagerMock.authenticate).toHaveBeenCalled()\n    expect(accountManagerMock.getAndCreateAccounts).toHaveBeenCalledWith(747)\n    expect(accounts).toEqual([])\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-accounts.ts",
    "content": "import {withPrefix} from \"@onflow/fcl\"\nimport {AccountManager} from \"../../accounts/account-manager\"\n\nexport async function ethAccounts(\n  accountManager: AccountManager\n): Promise<string[]> {\n  const accounts = await accountManager.getAccounts()\n  return accounts.map(x => withPrefix(x))\n}\n\nexport async function ethRequestAccounts(\n  accountManager: AccountManager,\n  chainId: number\n): Promise<string[]> {\n  await accountManager.authenticate()\n  const accounts = await accountManager.getAndCreateAccounts(chainId)\n  return accounts.map(x => withPrefix(x))\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-chain-id.test.ts",
    "content": "import {NetworkManager} from \"../../network/network-manager\"\nimport {ethChainId} from \"./eth-chain-id\"\n\njest.mock(\"../../util/eth\", () => ({\n  ...jest.requireActual(\"../../util/eth\"),\n  formatChainId: jest.fn().mockReturnValue(\"0x747\"),\n}))\n\ndescribe(\"eth_chainId handler\", () => {\n  test(\"should return the formatted chain id\", async () => {\n    const networkManagerMock = {\n      getChainId: jest.fn(),\n    }\n    networkManagerMock.getChainId.mockResolvedValue(747)\n\n    const chainId = await ethChainId(networkManagerMock as any)\n\n    expect(chainId).toEqual(\"0x747\")\n    expect(networkManagerMock.getChainId).toHaveBeenCalled()\n  })\n\n  test(\"should throw an error if no chain id is available\", async () => {\n    const networkManagerMock = {\n      getChainId: jest.fn(),\n    } as unknown as jest.Mocked<NetworkManager>\n    networkManagerMock.getChainId.mockResolvedValue(null)\n\n    await expect(ethChainId(networkManagerMock)).rejects.toThrow(\n      \"No active chain\"\n    )\n    expect(networkManagerMock.getChainId).toHaveBeenCalled()\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-chain-id.ts",
    "content": "import {NetworkManager} from \"../../network/network-manager\"\nimport {formatChainId} from \"../../util/eth\"\n\nexport async function ethChainId(networkManager: NetworkManager) {\n  const chainId = await networkManager.getChainId()\n  if (!chainId) {\n    throw new Error(\"No active chain\")\n  }\n  return formatChainId(chainId)\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-send-transaction.test.ts",
    "content": "import {AccountManager} from \"../../accounts/account-manager\"\nimport {NetworkManager} from \"../../network/network-manager\"\nimport {ethSendTransaction} from \"./eth-send-transaction\"\n\njest.mock(\"../../accounts/account-manager\")\njest.mock(\"../../network/network-manager\")\n\ndescribe(\"eth_sendTransaction handler\", () => {\n  test(\"should call the AccountManager to send a transaction\", async () => {\n    const mockAccountManager = new (AccountManager as any)()\n    mockAccountManager.sendTransaction.mockResolvedValue(\"0x123456\")\n\n    const mockNetworkManager = new (NetworkManager as any)()\n    mockNetworkManager.getChainId.mockResolvedValue(1)\n\n    const params = [\n      {\n        from: \"0x1234\",\n        to: \"0x5678\",\n        value: \"0x100\",\n      },\n    ]\n\n    const evmTxHash = await ethSendTransaction(\n      mockAccountManager,\n      mockNetworkManager,\n      params\n    )\n\n    expect(mockAccountManager.sendTransaction).toHaveBeenCalled()\n    expect(mockAccountManager.sendTransaction).toHaveBeenCalledTimes(1)\n    expect(mockAccountManager.sendTransaction).toHaveBeenCalledWith({\n      ...params[0],\n      chainId: 1,\n    })\n    expect(evmTxHash).toEqual(\"0x123456\")\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-send-transaction.ts",
    "content": "import {AccountManager} from \"../../accounts/account-manager\"\nimport {NetworkManager} from \"../../network/network-manager\"\n\nexport async function ethSendTransaction(\n  accountManager: AccountManager,\n  networkManager: NetworkManager,\n  params: any\n) {\n  return await accountManager.sendTransaction({\n    ...params[0],\n    // We pass the chainId to avoid race conditions where the chainId changes\n    chainId: await networkManager.getChainId(),\n  })\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/eth-signtypeddata.ts",
    "content": "import {AccountManager} from \"../../accounts/account-manager\"\nimport {SignTypedDataParams} from \"../../types/eth\"\nimport {\n  hashTypedDataLegacy,\n  hashTypedDataV3,\n  hashTypedDataV4,\n} from \"../../hash-utils\"\n\nexport async function signTypedData(\n  accountManager: AccountManager,\n  params: SignTypedDataParams,\n  version: \"eth_signTypedData\" | \"eth_signTypedData_v3\" | \"eth_signTypedData_v4\"\n) {\n  const {address, data} = params\n\n  if (!address || !data) {\n    throw new Error(\"Missing signer address or typed data\")\n  }\n\n  let hashedMessage: string\n  if (version === \"eth_signTypedData_v3\") {\n    hashedMessage = hashTypedDataV3(data)\n  } else if (version === \"eth_signTypedData_v4\") {\n    hashedMessage = hashTypedDataV4(data)\n  } else {\n    hashedMessage = hashTypedDataLegacy(data)\n  }\n\n  return await accountManager.signMessage(hashedMessage, address)\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/handlers/personal-sign.ts",
    "content": "import {AccountManager} from \"../../accounts/account-manager\"\nimport {PersonalSignParams} from \"../../types/eth\"\n\nexport async function personalSign(\n  accountManager: AccountManager,\n  params: PersonalSignParams\n) {\n  const [message, from] = params\n\n  return await accountManager.signMessage(message, from)\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/rpc-processor.test.ts",
    "content": "import {AccountManager} from \"../accounts/account-manager\"\nimport {Gateway} from \"../gateway/gateway\"\nimport {NetworkManager} from \"../network/network-manager\"\nimport {RpcProcessor} from \"./rpc-processor\"\n\njest.mock(\"../gateway/gateway\")\njest.mock(\"../accounts/account-manager\")\njest.mock(\"../network/network-manager\")\n\ndescribe(\"rpc processor\", () => {\n  test(\"fallback to gateway mainnet\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    jest.mocked(gateway).request.mockResolvedValue(\"0x0\")\n    networkManager.getChainId.mockResolvedValue(747)\n\n    const response = await rpcProcessor.handleRequest({\n      method: \"eth_blockNumber\",\n      params: [],\n    })\n\n    expect(response).toEqual(\"0x0\")\n    expect(gateway.request).toHaveBeenCalled()\n    expect(gateway.request).toHaveBeenCalledTimes(1)\n    expect(gateway.request).toHaveBeenCalledWith({\n      method: \"eth_blockNumber\",\n      params: [],\n      chainId: 747,\n    })\n  })\n\n  test(\"fallback to gateway testnet\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    jest.mocked(gateway).request.mockResolvedValue(\"0x0\")\n    networkManager.getChainId.mockResolvedValue(545)\n\n    const response = await rpcProcessor.handleRequest({\n      method: \"eth_blockNumber\",\n      params: [],\n    })\n\n    expect(response).toEqual(\"0x0\")\n    expect(gateway.request).toHaveBeenCalled()\n    expect(gateway.request).toHaveBeenCalledTimes(1)\n    expect(gateway.request).toHaveBeenCalledWith({\n      method: \"eth_blockNumber\",\n      params: [],\n      chainId: 545,\n    })\n  })\n\n  test(\"caught RpcError should be rethrown\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    const error = new Error(\"test error\")\n    ;(error as any).code = -32000\n    jest.mocked(gateway).request.mockRejectedValue(error)\n    networkManager.getChainId.mockResolvedValue(747)\n\n    await expect(\n      rpcProcessor.handleRequest({\n        method: \"eth_blockNumber\",\n        params: [],\n      })\n    ).rejects.toMatchObject({\n      code: -32000,\n      message: \"test error\",\n    })\n  })\n\n  test(\"caught generic error should be rethrown as an internal error\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    jest.mocked(gateway).request.mockRejectedValue(new Error(\"test error\"))\n    networkManager.getChainId.mockResolvedValue(747)\n\n    const promise = rpcProcessor.handleRequest({\n      method: \"eth_blockNumber\",\n      params: [],\n    })\n\n    await expect(promise).rejects.toMatchObject({\n      code: -32603,\n      message: \"Internal error\",\n      cause: new Error(\"test error\"),\n    })\n  })\n\n  test(\"caught RpcError should be rethrown\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    const error = new Error(\"test error\")\n    ;(error as any).code = -32000\n    jest.mocked(gateway).request.mockRejectedValue(error)\n    networkManager.getChainId.mockResolvedValue(747)\n\n    await expect(\n      rpcProcessor.handleRequest({\n        method: \"eth_blockNumber\",\n        params: [],\n      })\n    ).rejects.toMatchObject({\n      code: -32000,\n      message: \"test error\",\n    })\n  })\n\n  test(\"caught generic error should be rethrown as an internal error\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    jest.mocked(gateway).request.mockRejectedValue(new Error(\"test error\"))\n    networkManager.getChainId.mockResolvedValue(747)\n\n    const promise = rpcProcessor.handleRequest({\n      method: \"eth_blockNumber\",\n      params: [],\n    })\n\n    await expect(promise).rejects.toMatchObject({\n      code: -32603,\n      message: \"Internal error\",\n      cause: new Error(\"test error\"),\n    })\n  })\n\n  test(\"caught RpcError should be rethrown\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    const error = new Error(\"test error\")\n    ;(error as any).code = -32000\n    jest.mocked(gateway).request.mockRejectedValue(error)\n    networkManager.getChainId.mockResolvedValue(747)\n\n    await expect(\n      rpcProcessor.handleRequest({\n        method: \"eth_blockNumber\",\n        params: [],\n      })\n    ).rejects.toMatchObject({\n      code: -32000,\n      message: \"test error\",\n    })\n  })\n\n  test(\"caught generic error should be rethrown as an internal error\", async () => {\n    const gateway: jest.Mocked<Gateway> = new (Gateway as any)()\n    const accountManager: jest.Mocked<AccountManager> =\n      new (AccountManager as any)()\n    const networkManager: jest.Mocked<NetworkManager> =\n      new (NetworkManager as any)()\n    const rpcProcessor = new RpcProcessor(\n      gateway,\n      accountManager,\n      networkManager\n    )\n\n    jest.mocked(gateway).request.mockRejectedValue(new Error(\"test error\"))\n    networkManager.getChainId.mockResolvedValue(747)\n\n    const promise = rpcProcessor.handleRequest({\n      method: \"eth_blockNumber\",\n      params: [],\n    })\n\n    await expect(promise).rejects.toMatchObject({\n      code: -32603,\n      message: \"Internal error\",\n      cause: new Error(\"test error\"),\n    })\n  })\n})\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/rpc-processor.ts",
    "content": "import {ProviderRequest} from \"../types/provider\"\nimport {ethAccounts, ethRequestAccounts} from \"./handlers/eth-accounts\"\nimport {Gateway} from \"../gateway/gateway\"\nimport {AccountManager} from \"../accounts/account-manager\"\nimport {ethSendTransaction} from \"./handlers/eth-send-transaction\"\nimport {NetworkManager} from \"../network/network-manager\"\nimport {personalSign} from \"./handlers/personal-sign\"\nimport {\n  AddEthereumChainParams,\n  PersonalSignParams,\n  SignTypedDataParams,\n  SwitchEthereumChainParams,\n  TypedData,\n} from \"../types/eth\"\nimport {signTypedData} from \"./handlers/eth-signtypeddata\"\nimport {ethChainId} from \"./handlers/eth-chain-id\"\nimport {ProviderError, ProviderErrorCode} from \"../util/errors\"\n\nexport class RpcProcessor {\n  constructor(\n    private gateway: Gateway,\n    private accountManager: AccountManager,\n    private networkManager: NetworkManager\n  ) {}\n\n  async handleRequest({method, params}: ProviderRequest): Promise<any> {\n    try {\n      const chainId = await this.networkManager.getChainId()\n      if (!chainId) {\n        throw new Error(\"No active chain\")\n      }\n\n      switch (method) {\n        case \"eth_accounts\":\n          return await ethAccounts(this.accountManager)\n        case \"eth_requestAccounts\":\n          return await ethRequestAccounts(this.accountManager, chainId)\n        case \"eth_sendTransaction\":\n          return await ethSendTransaction(\n            this.accountManager,\n            this.networkManager,\n            params\n          )\n        case \"eth_signTypedData\":\n        case \"eth_signTypedData_v3\":\n        case \"eth_signTypedData_v4\": {\n          if (!params || typeof params !== \"object\") {\n            throw new Error(`${method} requires valid parameters.`)\n          }\n\n          const {address, data} = params as {address?: unknown; data?: unknown}\n\n          if (\n            typeof address !== \"string\" ||\n            typeof data !== \"object\" ||\n            data === null\n          ) {\n            throw new Error(\n              `${method} requires 'address' (string) and a valid 'data' object.`\n            )\n          }\n\n          const validParams: SignTypedDataParams = {\n            address,\n            data: data as TypedData,\n          }\n\n          return await signTypedData(this.accountManager, validParams, method)\n        }\n        case \"personal_sign\":\n          return await personalSign(\n            this.accountManager,\n            params as PersonalSignParams\n          )\n        case \"wallet_addEthereumChain\":\n          // Expect params to be an array with one chain configuration object.\n          if (!params || !Array.isArray(params) || !params[0]) {\n            throw new Error(\n              \"wallet_addEthereumChain requires an array with a chain configuration object.\"\n            )\n          }\n          const chainConfig = params[0] as AddEthereumChainParams\n\n          return await this.networkManager.addChain(chainConfig)\n        case \"wallet_switchEthereumChain\":\n          // Expect params to be an array with one object.\n          if (!params || !Array.isArray(params) || !params[0]) {\n            throw new Error(\n              \"wallet_switchEthereumChain requires an array with a chain configuration object.\"\n            )\n          }\n          const switchParams = params[0] as SwitchEthereumChainParams\n          return await this.networkManager.switchChain(switchParams)\n        case \"eth_chainId\":\n          return await ethChainId(this.networkManager)\n        default:\n          return await this.gateway.request({\n            chainId,\n            method,\n            params,\n          })\n      }\n    } catch (error: any) {\n      if (error?.code !== undefined) {\n        throw error\n      } else {\n        throw new ProviderError({\n          code: ProviderErrorCode.InternalError,\n          cause: error,\n        })\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/rpc/types.ts",
    "content": "export type RpcHandler = (params: any) => Promise<any>\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/types/account.ts",
    "content": "export interface AddressStoreState {\n  isLoading: boolean\n  address: string | null\n  error: Error | null\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/types/eth.ts",
    "content": "export type EthSignatureResponse = string\n\nexport type PersonalSignParams = [string, string]\n\nexport interface SignTypedDataParams {\n  address: string\n  data: TypedData // This represents the EIP-712 structured data\n}\n\nexport interface TypedDataField {\n  name: string\n  type: string\n}\n\nexport interface TypedDataDomain {\n  name?: string\n  version?: string\n  chainId?: number\n  verifyingContract?: string\n  salt?: string\n}\n\nexport interface TypedData {\n  types: Record<string, TypedDataField[]>\n  domain: TypedDataDomain\n  primaryType: string\n  message: Record<string, any>\n}\n\nexport interface AddEthereumChainParams {\n  chainId: string // Hex string, e.g. \"0x1\"\n  chainName: string\n  nativeCurrency: {\n    name: string\n    symbol: string\n    decimals: number\n  }\n  rpcUrls: string[]\n  blockExplorerUrls?: string[]\n  iconUrls?: string[]\n}\n\nexport interface SwitchEthereumChainParams {\n  chainId: string // Hex string, e.g., \"0x64\"\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/types/events.ts",
    "content": "export type TransactionExecutedEvent = {\n  hash: string[]\n  index: string\n  type: string\n  payload: string[]\n  errorCode: string\n  errorMessage: string\n  gasConsumed: string\n  contractAddress: string\n  logs: string[]\n  blockHeight: string\n  returnedData: string[]\n  precompiledCalls: string[]\n  stateUpdateChecksum: string\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/types/provider.ts",
    "content": "// Types for RPC request and events\nimport {ProviderError} from \"../util/errors\"\n\nexport type ProviderRequest = {\n  method: string\n  params?: unknown[] | Record<string, unknown>\n}\n\nexport type ProviderResponse<T = unknown> = T\n\n// Event types for the provider\nexport type ProviderEvents = {\n  connect: {chainId: string}\n  disconnect: ProviderError\n  chainChanged: string\n  accountsChanged: string[]\n}\n\n// Event callback\nexport type EventCallback<T> = (event: T) => void\n\n// Base EIP-1193 Provider Interface\nexport interface Eip1193Provider {\n  request<T = unknown>(args: ProviderRequest): Promise<ProviderResponse<T>>\n  on<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void\n  removeListener<E extends keyof ProviderEvents>(\n    event: E,\n    listener: EventCallback<ProviderEvents[E]>\n  ): void\n  disconnect(): Promise<void>\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/util/chain.ts",
    "content": "import {FLOW_CHAINS, FlowNetwork} from \"../constants\"\n\nexport function getFlowNetwork(chainId: number): FlowNetwork | undefined {\n  return Object.entries(FLOW_CHAINS).find(\n    ([, chain]) => chain.eip155ChainId === chainId\n  )?.[0] as FlowNetwork | undefined\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/util/errors.ts",
    "content": "export enum ProviderErrorCode {\n  // EIP-1193 error codes\n  UserRejectedRequest = 4001,\n  Unauthorized = 4100,\n  UnsupportedMethod = 4200,\n  Disconnected = 4900,\n\n  // EIP-1474 / JSON-RPC error codes\n  ParseError = -32700,\n  InvalidRequest = -32600,\n  MethodNotFound = -32601,\n  InvalidParams = -32602,\n  InternalError = -32603,\n}\nexport const ProviderErrorMessage: Record<ProviderErrorCode, string> = {\n  // EIP-1193 error messages\n  [4001]: \"User rejected request\",\n  [4100]: \"Unauthorized\",\n  [4200]: \"Unsupported method\",\n  [4900]: \"Disconnected\",\n  // EIP-1474 / JSON-RPC error messages\n  [-32700]: \"Parse error\",\n  [-32600]: \"Invalid request\",\n  [-32601]: \"Method not found\",\n  [-32602]: \"Invalid params\",\n  [-32603]: \"Internal error\",\n}\n\nexport class ProviderError extends Error {\n  public code: ProviderErrorCode\n  public cause?: any\n\n  constructor({code, cause}: {code: ProviderErrorCode; cause?: any}) {\n    super(ProviderErrorMessage[code])\n    this.code = code\n    this.cause = cause\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/util/eth.ts",
    "content": "import {\n  ContractType,\n  FLOW_CHAINS,\n  FLOW_CONTRACTS,\n  FlowNetwork,\n} from \"../constants\"\nimport * as fcl from \"@onflow/fcl\"\n\nexport function formatChainId(chainId: string | number): `0x${string}` {\n  const numericChainId =\n    typeof chainId === \"string\" ? parseInt(chainId) : chainId\n  return `0x${numericChainId.toString(16)}`\n}\n\nexport function getContractAddress(\n  contractType: ContractType,\n  chainId: number\n) {\n  // Find the Flow network based on the chain ID\n  const flowNetwork = Object.entries(FLOW_CHAINS).find(\n    ([, chain]) => chain.eip155ChainId === chainId\n  )?.[0] as FlowNetwork | undefined\n\n  if (!flowNetwork) {\n    throw new Error(\"Flow network not found for chain ID\")\n  }\n\n  const evmContractAddress = fcl.withPrefix(\n    FLOW_CONTRACTS[contractType][flowNetwork]\n  )\n  return evmContractAddress\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/util/observable.ts",
    "content": "/*******************************\n * Core Observable/Types\n *******************************/\n\nexport class Observable<T> {\n  private _subscribe: (subscriber: Observer<T>) => Subscription\n\n  constructor(subscribe: (subscriber: Observer<T>) => Subscription) {\n    this._subscribe = subscribe\n  }\n\n  subscribe(observerOrNext: ObserverOrNext<T>): Subscription {\n    const observer = normalizeObserver(observerOrNext)\n    return this._subscribe(observer)\n  }\n\n  /**\n   * Pipe overloads — remove error type parameter\n   */\n  pipe<T1>(op1: (source: Observable<T>) => Observable<T1>): Observable<T1>\n  pipe<T1, T2>(\n    op1: (source: Observable<T>) => Observable<T1>,\n    op2: (source: Observable<T1>) => Observable<T2>\n  ): Observable<T2>\n  pipe<T1, T2, T3>(\n    op1: (source: Observable<T>) => Observable<T1>,\n    op2: (source: Observable<T1>) => Observable<T2>,\n    op3: (source: Observable<T2>) => Observable<T3>\n  ): Observable<T3>\n  pipe<T1, T2, T3, T4>(\n    op1: (source: Observable<T>) => Observable<T1>,\n    op2: (source: Observable<T1>) => Observable<T2>,\n    op3: (source: Observable<T2>) => Observable<T3>,\n    op4: (source: Observable<T3>) => Observable<T4>\n  ): Observable<T4>\n  pipe<T1, T2, T3, T4, T5>(\n    op1: (source: Observable<T>) => Observable<T1>,\n    op2: (source: Observable<T1>) => Observable<T2>,\n    op3: (source: Observable<T2>) => Observable<T3>,\n    op4: (source: Observable<T3>) => Observable<T4>,\n    op5: (source: Observable<T4>) => Observable<T5>\n  ): Observable<T5>\n  pipe<T1, T2, T3, T4, T5, T6>(\n    op1: (source: Observable<T>) => Observable<T1>,\n    op2: (source: Observable<T1>) => Observable<T2>,\n    op3: (source: Observable<T2>) => Observable<T3>,\n    op4: (source: Observable<T3>) => Observable<T4>,\n    op5: (source: Observable<T4>) => Observable<T5>,\n    op6: (source: Observable<T5>) => Observable<T6>\n  ): Observable<T6>\n\n  pipe(\n    ...operators: Array<(input: Observable<any>) => Observable<any>>\n  ): Observable<any> {\n    return operators.reduce(\n      (prev, operator) => operator(prev),\n      this as Observable<any>\n    )\n  }\n\n  asObservable(): Observable<T> {\n    return new Observable(subscriber => {\n      return this.subscribe(subscriber)\n    })\n  }\n}\n\nexport type Subscription = () => void\n\nexport type Observer<T> = {\n  next: (value: T) => void\n  complete?: () => void\n  error?: (error: any) => void // In RxJS, `error` is usually typed as `any`\n}\n\n// A type for either an Observer<T> or a next callback\nexport type ObserverOrNext<T> = Observer<T> | ((value: T) => void)\n\n/*******************************\n * Subjects\n *******************************/\n\nexport class Subject<T> extends Observable<T> {\n  private subscribers: Observer<T>[] = []\n\n  constructor() {\n    super(subscriber => {\n      this.subscribers.push(subscriber)\n      return () => {\n        this.subscribers = this.subscribers.filter(s => s !== subscriber)\n      }\n    })\n  }\n\n  next(value: T) {\n    this.subscribers.forEach(subscriber => subscriber.next(value))\n  }\n\n  error(error: any) {\n    this.subscribers.forEach(subscriber => subscriber.error?.(error))\n  }\n\n  complete() {\n    this.subscribers.forEach(subscriber => subscriber.complete?.())\n    this.subscribers = []\n  }\n}\n\nexport class BehaviorSubject<T> extends Subject<T> {\n  private value: T\n\n  constructor(initialValue: T) {\n    super()\n    this.value = initialValue\n  }\n\n  next(value: T) {\n    this.value = value\n    super.next(value)\n  }\n\n  getValue() {\n    return this.value\n  }\n\n  subscribe(observerOrNext: ObserverOrNext<T>): Subscription {\n    const observer = normalizeObserver(observerOrNext)\n    // Emit the current value immediately\n    observer.next(this.value)\n    return super.subscribe(observer)\n  }\n}\n\n/*******************************\n * Operators\n *******************************/\n\n/** switchMap */\nexport function switchMap<T, R>(\n  project: (value: T) => Observable<R>\n): (source: Observable<T>) => Observable<R> {\n  return (source: Observable<T>) => {\n    return new Observable<R>(subscriber => {\n      let activeSubscription: Subscription | null = null\n\n      const subscription = source.subscribe({\n        next: value => {\n          if (activeSubscription) {\n            activeSubscription()\n          }\n          const innerObservable = project(value)\n          activeSubscription = innerObservable.subscribe({\n            next: subscriber.next.bind(subscriber),\n            error: subscriber.error?.bind(subscriber),\n            complete: () => {\n              activeSubscription = null\n            },\n          })\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n\n      return () => {\n        if (activeSubscription) {\n          activeSubscription()\n        }\n        subscription()\n      }\n    })\n  }\n}\n\n/** map */\nexport function map<T, R>(\n  project: (value: T) => R\n): (source: Observable<T>) => Observable<R> {\n  return (source: Observable<T>) => {\n    return new Observable<R>(subscriber => {\n      return source.subscribe({\n        next: value => subscriber.next(project(value)),\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\n/** from (promise) */\nexport function from<T>(promise: Promise<T>): Observable<T> {\n  return new Observable<T>(subscriber => {\n    let isCancelled = false\n\n    promise\n      .then(value => {\n        if (!isCancelled) {\n          subscriber.next(value)\n          subscriber.complete?.()\n        }\n      })\n      .catch(error => {\n        if (!isCancelled) {\n          subscriber.error?.(error)\n        }\n      })\n\n    return () => {\n      isCancelled = true\n    }\n  })\n}\n\n/** firstValueFrom */\nexport async function firstValueFrom<T>(source: Observable<T>): Promise<T> {\n  return await new Promise<T>((resolve, reject) => {\n    const unsub = source.subscribe({\n      next: value => {\n        resolve(value)\n        // wait until the next tick for unsub to be defined\n        setTimeout(() => unsub(), 0)\n      },\n      error: reject,\n      complete: () => {\n        reject(new Error(\"Observable completed without emitting a value\"))\n      },\n    })\n  })\n}\n\n/** distinctUntilChanged */\nexport function distinctUntilChanged<T>(): (\n  source: Observable<T>\n) => Observable<T> {\n  return source => {\n    return new Observable<T>(subscriber => {\n      let lastValue: T | undefined\n      return source.subscribe({\n        next: value => {\n          if (value !== lastValue) {\n            lastValue = value\n            subscriber.next(value)\n          }\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\n/** concat */\nexport function concat<T>(...sources: Observable<T>[]): Observable<T> {\n  return new Observable<T>(subscriber => {\n    let activeSubscription: Subscription | null = null\n\n    function subscribeNext() {\n      if (sources.length === 0) {\n        subscriber.complete?.()\n        return\n      }\n\n      const source = sources.shift()!\n      activeSubscription = source.subscribe({\n        next: subscriber.next.bind(subscriber),\n        error: subscriber.error?.bind(subscriber),\n        complete: () => {\n          activeSubscription = null\n          subscribeNext()\n        },\n      })\n    }\n\n    subscribeNext()\n\n    return () => {\n      activeSubscription?.()\n    }\n  })\n}\n\n/** filter */\nexport function filter<T>(\n  predicate: (value: T) => boolean\n): (source: Observable<T>) => Observable<T> {\n  return source => {\n    return new Observable<T>(subscriber => {\n      return source.subscribe({\n        next: value => {\n          if (predicate(value)) {\n            subscriber.next(value)\n          }\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\n/** of */\nexport function of<T>(value: T): Observable<T> {\n  return new Observable<T>(subscriber => {\n    subscriber.next(value)\n    subscriber.complete?.()\n    return () => {}\n  })\n}\n\n/** skip */\nexport function skip<T>(\n  count: number\n): (source: Observable<T>) => Observable<T> {\n  return source => {\n    return new Observable<T>(subscriber => {\n      let skipped = 0\n      return source.subscribe({\n        next: value => {\n          if (skipped >= count) {\n            subscriber.next(value)\n          } else {\n            skipped++\n          }\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\n/** takeFirst */\nexport function takeFirst<T>(): (source: Observable<T>) => Observable<T> {\n  return source => {\n    return new Observable<T>(subscriber => {\n      return source.subscribe({\n        next: value => {\n          subscriber.next(value)\n          subscriber.complete?.()\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\nexport function pairwise<T>(): (source: Observable<T>) => Observable<[T, T]> {\n  return source => {\n    return new Observable<[T, T]>(subscriber => {\n      let previous: T | undefined\n      return source.subscribe({\n        next: value => {\n          if (previous !== undefined) {\n            subscriber.next([previous, value])\n          }\n          previous = value\n        },\n        error: subscriber.error?.bind(subscriber),\n        complete: subscriber.complete?.bind(subscriber),\n      })\n    })\n  }\n}\n\n/*******************************\n * Internal utility\n *******************************/\n\nfunction normalizeObserver<T>(observer: ObserverOrNext<T>): Observer<T> {\n  return typeof observer === \"function\" ? {next: observer} : observer\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/util/transaction.ts",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport * as rlp from \"@onflow/rlp\"\nimport {bytesToHex, hexToBytes} from \"@noble/hashes/utils\"\nimport {keccak_256} from \"@noble/hashes/sha3\"\n\n// Helper function to convert a number or bigint to a Uint8Array (minimal byte representation)\nfunction numberToUint8Array(value: number | bigint): Uint8Array {\n  const big = typeof value === \"bigint\" ? value : BigInt(value)\n  if (big === BigInt(0)) return new Uint8Array([])\n  let hex = big.toString(16)\n  if (hex.length % 2 !== 0) {\n    hex = \"0\" + hex\n  }\n  return hexToBytes(hex)\n}\n\n/**\n * Pre-calculates the transaction hash by building the transaction array,\n * encoding it with RLP, and hashing it with keccak_256.\n */\nexport function precalculateTxHash(\n  nonce: number,\n  gas: string,\n  value: string,\n  to: string,\n  data: string,\n  evmAddress: string\n): string {\n  const gasLimit = BigInt(gas)\n  const valueHex = fcl.sansPrefix(value)\n  const txValue = BigInt(\"0x\" + valueHex)\n  const dataHex = fcl.sansPrefix(data)\n\n  const gasPrice = BigInt(0)\n  const directCallTxType = BigInt(255)\n  const contractCallSubType = BigInt(5)\n\n  const txArray = [\n    numberToUint8Array(nonce),\n    numberToUint8Array(gasPrice),\n    numberToUint8Array(gasLimit),\n    hexToBytes(fcl.sansPrefix(to)),\n    numberToUint8Array(txValue),\n    hexToBytes(dataHex),\n    numberToUint8Array(directCallTxType),\n    numberToUint8Array(BigInt(fcl.withPrefix(evmAddress))),\n    numberToUint8Array(contractCallSubType),\n  ]\n\n  const encodedTx = rlp.encode(txArray)\n  const digest = keccak_256(encodedTx)\n  return fcl.withPrefix(bytesToHex(digest))\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/src/wc-provider.ts",
    "content": "import {\n  EthereumProvider,\n  EthereumProviderOptions,\n  OPTIONAL_EVENTS,\n  OPTIONAL_METHODS,\n  REQUIRED_EVENTS,\n  REQUIRED_METHODS,\n} from \"@walletconnect/ethereum-provider\"\nimport {\n  NamespaceConfig,\n  UniversalProvider,\n} from \"@walletconnect/universal-provider\"\nimport {SessionTypes} from \"@walletconnect/types\"\nimport {FLOW_CHAINS, FlowNetwork} from \"./constants\"\nimport {formatChainId} from \"./util/eth\"\nimport {getAccountsFromNamespaces} from \"@walletconnect/utils\"\nimport {FLOW_METHODS} from \"@onflow/fcl-wc\"\nimport * as fcl from \"@onflow/fcl\"\nimport {Service} from \"@onflow/typedefs\"\n\nconst BASE_WC_SERVICE = (\n  externalProvider: InstanceType<typeof UniversalProvider>\n) =>\n  ({\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n    type: \"authn\",\n    method: \"WC/RPC\",\n    uid: \"cross-vm-walletconnect#authn\",\n    endpoint: \"flow_authn\",\n    optIn: true,\n    provider: {\n      address: null,\n      name: \"WalletConnect\",\n      icon: \"https://avatars.githubusercontent.com/u/37784886\",\n      description: \"WalletConnect Base Service\",\n      website: \"https://walletconnect.com\",\n      color: null,\n      supportEmail: null,\n    },\n    params: {\n      externalProvider,\n      disableNotifications: true,\n    },\n  }) as unknown as Service\n\nexport class WalletConnectEthereumProvider extends EthereumProvider {\n  static async init(\n    opts: EthereumProviderOptions\n  ): Promise<WalletConnectEthereumProvider> {\n    const provider = new WalletConnectEthereumProvider()\n    await provider.initialize(opts)\n\n    // Refresh the FCL user to align with the WalletConnect session\n    async function refreshFclUser() {\n      const fclUser = fcl.currentUser()\n      const wcService = BASE_WC_SERVICE(provider.signer)\n      const snapshot = await fclUser.snapshot()\n\n      // Find the authentication service from the current FCL user snapshot\n      const authnService = snapshot?.services.find(\n        service => service.type === \"authn\"\n      )\n\n      // If there’s no auth service or the auth service\n      if (authnService && authnService.uid !== wcService.uid) {\n        // Another FCL user is already authenticated, we need to unauthenticate it\n        if (provider.signer.session) {\n          await fclUser.authenticate({service: wcService, forceReauth: true})\n        }\n      } else {\n        // Determine the external provider's topic from the auth service params\n        const externalProvider = authnService?.params?.externalProvider as\n          | string\n          | InstanceType<typeof UniversalProvider>\n          | undefined\n        const externalProviderTopic =\n          typeof externalProvider === \"string\"\n            ? externalProvider\n            : (externalProvider?.session?.topic ?? null)\n\n        // If the provider is already connected with a matching session, re-authenticate the user\n        if (\n          provider.signer.session &&\n          (externalProviderTopic == null ||\n            externalProviderTopic === provider.signer.session.topic)\n        ) {\n          await fclUser.authenticate({\n            service: wcService,\n            forceReauth: true,\n          })\n        } else if (!provider.signer.session) {\n          // If no session is set but FCL is still authenticated, unauthenticate the user\n          await fclUser.unauthenticate()\n        }\n      }\n    }\n\n    // Set up event listeners regardless of the current authentication state\n    provider.on(\"connect\", async () => {\n      try {\n        await refreshFclUser()\n      } catch (error) {\n        console.error(\"Error during authentication on connect:\", error)\n      }\n    })\n\n    provider.on(\"disconnect\", async () => {\n      try {\n        await refreshFclUser()\n      } catch (error) {\n        console.error(\"Error during unauthentication on disconnect:\", error)\n      }\n    })\n\n    return provider\n  }\n\n  async connect(\n    opts?: Parameters<InstanceType<typeof EthereumProvider>[\"connect\"]>[0]\n  ) {\n    if (!this.signer.client) {\n      throw new Error(\"Provider not initialized. Call init() first\")\n    }\n\n    this.loadConnectOpts(opts)\n\n    const chains = new Set(opts?.chains ?? [])\n    const optionalChains = new Set(opts?.optionalChains ?? [])\n    const chainIds = Array.from(chains).concat(Array.from(optionalChains))\n\n    const flowNetwork = Object.entries(FLOW_CHAINS).find(\n      ([, {eip155ChainId}]) => {\n        if (chainIds.includes(eip155ChainId)) {\n          return true\n        }\n        return false\n      }\n    )?.[0]\n    if (!flowNetwork) {\n      throw new Error(\n        `Unsupported chainId: ${chainIds.join(\", \")}, expected one of ${Object.values(\n          FLOW_CHAINS\n        )\n          .map(({eip155ChainId}) => eip155ChainId)\n          .join(\", \")}`\n      )\n    }\n\n    const {required, optional} = buildNamespaces(flowNetwork as FlowNetwork)\n    try {\n      const session = await new Promise<SessionTypes.Struct | undefined>(\n        async (resolve, reject) => {\n          if (this.rpc.showQrModal) {\n            this.modal?.subscribeModal((state: {open: boolean}) => {\n              // the modal was closed so reject the promise\n              if (!state.open && !this.signer.session) {\n                this.signer.abortPairingAttempt()\n                reject(new Error(\"Connection request reset. Please try again.\"))\n              }\n            })\n          }\n          await this.signer\n            .connect({\n              namespaces: required,\n              optionalNamespaces: optional,\n              pairingTopic: opts?.pairingTopic,\n            })\n            .then((session?: SessionTypes.Struct) => {\n              resolve(session)\n            })\n            .catch((error: unknown) => {\n              var newErr = new Error(\"Failed to connect\")\n              if (error instanceof Error)\n                newErr.stack += \"\\nCaused by: \" + error.stack\n              throw newErr\n            })\n        }\n      )\n      if (!session) return\n\n      const accounts = getAccountsFromNamespaces(session.namespaces, [\n        this.namespace,\n      ])\n      // if no required chains are set, use the approved accounts to fetch chainIds\n      this.setChainIds(this.rpc.chains.length ? this.rpc.chains : accounts)\n      this.setAccounts(accounts)\n      this.events.emit(\"connect\", {chainId: formatChainId(this.chainId)})\n    } catch (error) {\n      this.signer.logger.error(error)\n      throw error\n    } finally {\n      if (this.modal) this.modal.closeModal()\n    }\n  }\n}\n\nfunction buildNamespaces(network: FlowNetwork): {\n  required: NamespaceConfig\n  optional: NamespaceConfig\n} {\n  const {eip155ChainId} = FLOW_CHAINS[network]\n\n  return {\n    required: {\n      eip155: {\n        methods: REQUIRED_METHODS,\n        chains: [`eip155:${eip155ChainId}`],\n        events: REQUIRED_EVENTS,\n      },\n    },\n    optional: {\n      eip155: {\n        methods: OPTIONAL_METHODS,\n        chains: [`eip155:${eip155ChainId}`],\n        events: OPTIONAL_EVENTS,\n      },\n      flow: {\n        methods: Object.values(FLOW_METHODS),\n        events: [\"chainChanged\", \"accountsChanged\"],\n        chains: [`flow:${network}`],\n      },\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-ethereum-provider/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/CHANGELOG.md",
    "content": "# @onflow/fcl-rainbowkit-adapter\n\n## 0.3.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.10\n  - @onflow/fcl-ethereum-provider@0.1.2\n  - @onflow/fcl-wagmi-adapter@0.1.2\n\n## 0.3.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.9\n  - @onflow/fcl-ethereum-provider@0.1.1\n  - @onflow/fcl-wagmi-adapter@0.1.1\n\n## 0.3.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/fcl-ethereum-provider@0.1.0\n  - @onflow/fcl-wagmi-adapter@0.1.0\n  - @onflow/fcl@1.21.8\n\n## 0.2.17\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.7\n  - @onflow/fcl-ethereum-provider@0.0.21\n  - @onflow/fcl-wagmi-adapter@0.0.21\n\n## 0.2.16\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.6\n  - @onflow/fcl-ethereum-provider@0.0.20\n  - @onflow/fcl-wagmi-adapter@0.0.20\n\n## 0.2.15\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.5\n  - @onflow/fcl-ethereum-provider@0.0.19\n  - @onflow/fcl-wagmi-adapter@0.0.19\n\n## 0.2.14\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.4\n  - @onflow/fcl-ethereum-provider@0.0.18\n  - @onflow/fcl-wagmi-adapter@0.0.18\n\n## 0.2.13\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.3\n  - @onflow/fcl-ethereum-provider@0.0.17\n  - @onflow/fcl-wagmi-adapter@0.0.17\n\n## 0.2.12\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.2\n  - @onflow/fcl-ethereum-provider@0.0.16\n  - @onflow/fcl-wagmi-adapter@0.0.16\n\n## 0.2.11\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.1\n  - @onflow/fcl-ethereum-provider@0.0.15\n  - @onflow/fcl-wagmi-adapter@0.0.15\n\n## 0.2.10\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl@1.21.0\n  - @onflow/fcl-ethereum-provider@0.0.14\n  - @onflow/fcl-wagmi-adapter@0.0.14\n\n## 0.2.9\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.6\n  - @onflow/fcl-ethereum-provider@0.0.13\n  - @onflow/fcl-wagmi-adapter@0.0.13\n\n## 0.2.8\n\n### Patch Changes\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`a5e84666b0482547fe9411064f4821e8067e5238`](https://github.com/onflow/fcl-js/commit/a5e84666b0482547fe9411064f4821e8067e5238)]:\n  - @onflow/fcl@1.20.5\n  - @onflow/fcl-ethereum-provider@0.0.12\n  - @onflow/fcl-wagmi-adapter@0.0.12\n\n## 0.2.7\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.4\n  - @onflow/fcl-ethereum-provider@0.0.11\n  - @onflow/fcl-wagmi-adapter@0.0.11\n\n## 0.2.6\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.3\n  - @onflow/fcl-ethereum-provider@0.0.10\n  - @onflow/fcl-wagmi-adapter@0.0.10\n\n## 0.2.5\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.2\n  - @onflow/fcl-ethereum-provider@0.0.9\n  - @onflow/fcl-wagmi-adapter@0.0.9\n\n## 0.2.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/fcl@1.20.1\n  - @onflow/fcl-ethereum-provider@0.0.8\n  - @onflow/fcl-wagmi-adapter@0.0.8\n  - @onflow/rlp@1.2.4\n\n## 0.2.3\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0\n  - @onflow/fcl-ethereum-provider@0.0.7\n  - @onflow/fcl-wagmi-adapter@0.0.7\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0-alpha.2\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.2\n  - @onflow/fcl-wagmi-adapter@0.0.7-alpha.2\n\n## 0.2.3-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b)]:\n  - @onflow/fcl@1.20.0-alpha.1\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.1\n  - @onflow/fcl-wagmi-adapter@0.0.7-alpha.1\n\n## 0.2.3-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc)]:\n  - @onflow/fcl@1.20.0-alpha.0\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.0\n  - @onflow/fcl-wagmi-adapter@0.0.7-alpha.0\n\n## 0.2.2\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl@1.19.0\n  - @onflow/fcl-ethereum-provider@0.0.6\n  - @onflow/fcl-wagmi-adapter@0.0.6\n\n## 0.2.1\n\n### Patch Changes\n\n- Updated dependencies [[`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0\n  - @onflow/fcl-ethereum-provider@0.0.5\n  - @onflow/fcl-wagmi-adapter@0.0.5\n\n## 0.2.1-alpha.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.2\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.2\n  - @onflow/fcl-wagmi-adapter@0.0.5-alpha.2\n\n## 0.2.1-alpha.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.1\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.1\n  - @onflow/fcl-wagmi-adapter@0.0.5-alpha.1\n\n## 0.2.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0-alpha.0\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.0\n  - @onflow/fcl-wagmi-adapter@0.0.5-alpha.0\n\n## 0.2.0\n\n### Minor Changes\n\n- [#2326](https://github.com/onflow/fcl-js/pull/2326) [`2446dbee70b25780e31cf8d0b45db7acac6281d6`](https://github.com/onflow/fcl-js/commit/2446dbee70b25780e31cf8d0b45db7acac6281d6) Thanks [@jribbink](https://github.com/jribbink)! - Add `useIsCadenceWalletConnected` hook\n\n### Patch Changes\n\n- Updated dependencies [[`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29)]:\n  - @onflow/fcl-wagmi-adapter@0.0.4\n  - @onflow/fcl-ethereum-provider@0.0.4\n  - @onflow/fcl@1.17.0\n\n## 0.1.0\n\n### Minor Changes\n\n- [#2361](https://github.com/onflow/fcl-js/pull/2361) [`ac665aa4c2c3e03b52f5b94fa0dd88f2a233d144`](https://github.com/onflow/fcl-js/commit/ac665aa4c2c3e03b52f5b94fa0dd88f2a233d144) Thanks [@jribbink](https://github.com/jribbink)! - Change mobile deeplink to a universal link for Flow Wallet connector\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.16.1\n  - @onflow/fcl-ethereum-provider@0.0.3\n  - @onflow/fcl-wagmi-adapter@0.0.3\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d)]:\n  - @onflow/fcl@1.16.0\n  - @onflow/fcl-ethereum-provider@0.0.2\n  - @onflow/fcl-wagmi-adapter@0.0.2\n\n## 0.0.1\n\nInitial release of the FCL Rainbowkit Adapter. This adapter allows you to use FCL wallets within Rainbowkit in a shared session with FCL-JS.\n\nRead more about this package in [FLIP-316](https://github.com/onflow/flips/pull/317) and the official [Flow Developer Documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/rainbowkit-adapter).\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/README.md",
    "content": "# @onflow/fcl-rainbowkit-adapter\n\nRainbowKit adapter used to enable cross-VM wallet connections across both FCL & Wagmi.  This package exposes RainbowKit connectors which can be used to establish these hybrid-style wallet connections.\n\n## Installation\n\n```bash\nnpm install --save @onflow/fcl-rainbowkit-adapter\n```\n\n## Usage\n\nCheck out the [documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/rainbowkit-adapter) for guides and examples on how to integrate and use this adapter in your project.\n\n## License\n\nApache-2.0"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-rainbowkit-adapter\",\n  \"version\": \"0.3.2\",\n  \"description\": \"Rainbowkit adapter for FCL-compatible wallets\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Dapper Labs <dev@dapperlabs.com>\",\n  \"homepage\": \"https://onflow.org\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"@types/react\": \"^16.0.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@ethersproject/bytes\": \"^5.7.0\",\n    \"@ethersproject/hash\": \"^5.7.0\",\n    \"@onflow/fcl-ethereum-provider\": \"0.1.2\",\n    \"@onflow/fcl-wagmi-adapter\": \"0.1.2\",\n    \"@onflow/rlp\": \"^1.2.4\",\n    \"@wagmi/core\": \"^2.16.3\",\n    \"mipd\": \"^0.0.7\",\n    \"react\": \"17.x || 18.x || 19.x\",\n    \"viem\": \"^2.22.21\",\n    \"wagmi\": \"^2.14.11\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl\": \"1.21.10\",\n    \"@rainbow-me/rainbowkit\": \"^2.2.3\",\n    \"react\": \"17.x || 18.x || 19.x\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/create-connector.ts",
    "content": "import {fclWagmiAdapter} from \"@onflow/fcl-wagmi-adapter\"\nimport {\n  RainbowKitWalletConnectParameters,\n  Wallet,\n  WalletDetailsParams,\n} from \"@rainbow-me/rainbowkit\"\nimport {createConnector, CreateConnectorFn} from \"@wagmi/core\"\nimport * as mipd from \"mipd\"\nimport {getWalletConnectConnector} from \"./get-wc-connector\"\nimport {Service} from \"@onflow/typedefs\"\nimport * as fcl from \"@onflow/fcl\"\n\nconst store = mipd.createStore()\n\ntype FclConnectorOptions = {\n  user?: typeof fcl.currentUser\n  config?: typeof fcl.config\n  rpcUrls?: {[chainId: number]: string}\n  walletConnectParams?: RainbowKitWalletConnectParameters\n  walletDetails: Omit<Wallet, \"createConnector\">\n  services?: Service[]\n}\n\ntype DefaultWalletOptions = {\n  projectId: string\n}\n\nconst FALLBACK_ICON =\n  \"https://assets.website-files.com/5f6294c0c7a8cdd643b1c820/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.svg\"\n\nexport const createFclConnector = (options: FclConnectorOptions) => {\n  return ({projectId}: DefaultWalletOptions): Wallet => {\n    const rdns = options.walletDetails.rdns\n\n    const obj: Wallet = {\n      ...options.walletDetails,\n      // Do not list RDNS here since Rainbowkit will discard the wallet\n      // when conflicting with an injected wallet\n      rdns: undefined,\n      createConnector: walletDetails => {\n        return createConnector(config => {\n          const originalDetails = {...walletDetails.rkDetails}\n          let currentHandler: any\n          let currentDetails = walletDetails.rkDetails\n          let isInstalled = false\n\n          // Initialize the primary connector (e.g. anything other than WalletConnect)\n          const primaryService = options.services?.find(\n            service => service.method !== \"WC/RPC\"\n          )\n          let primaryConnector = {\n            ...fclWagmiAdapter({\n              user: options.user || fcl.currentUser,\n              config: options.config || fcl.config,\n              service: primaryService,\n              rdns: rdns,\n              rpcUrls: options.rpcUrls,\n            })(config),\n            ...walletDetails,\n          }\n          primaryConnector.setup?.().catch(e => {\n            console.error(\"Failed to setup installed connector\", e)\n          })\n\n          // Initialize the WalletConnect connector\n          let supportsWc = options.services?.some(\n            service => service.method === \"WC/RPC\"\n          )\n          let walletConnectConnector = supportsWc\n            ? getWalletConnectConnector({\n                projectId,\n                walletConnectParameters: options.walletConnectParams,\n              })({\n                ...walletDetails,\n              })(config)\n            : null\n          walletConnectConnector?.setup?.().catch(e => {\n            console.error(\"Failed to setup installed connector\", e)\n          })\n\n          // Update connectors and subscribe to changes (used for dynamic switching)\n          updateConnectors()\n          store.subscribe(() => {\n            updateConnectors()\n          })\n\n          /**\n           * This is a workaround for Flow Wallet which has a race condition where the MIPD\n           * provider is not immediately available.  We instead proxy the Wagmi connector\n           * such that we can dynamically switch between the installed and WalletConnect\n           * connectors.\n           *\n           * It's pretty brittle and should be removed ASAP once Flow Wallet is fixed.\n           * (e.g. there's no teardown logic when switching between connectors)\n           */\n          return {\n            ...primaryConnector,\n            ...walletDetails,\n            async getProvider(params) {\n              return currentHandler.getProvider(params)\n            },\n            async connect(params) {\n              return currentHandler.connect(params)\n            },\n            async disconnect() {\n              return currentHandler.disconnect()\n            },\n            async getAccounts() {\n              return currentHandler.getAccounts()\n            },\n            async getChainId() {\n              return currentHandler.getChainId()\n            },\n            async isAuthorized() {\n              return currentHandler.isAuthorized()\n            },\n            async switchChain(params) {\n              return currentHandler.switchChain?.(params)\n            },\n            rkDetails: currentDetails,\n          } as ReturnType<CreateConnectorFn>\n\n          // Update the connectors based on the current state\n          function updateConnectors() {\n            isInstalled =\n              (rdns &&\n                !!store.findProvider({\n                  rdns: rdns,\n                })) ||\n              false\n\n            let rkDetails: WalletDetailsParams[\"rkDetails\"]\n            if (isInstalled || !walletConnectConnector) {\n              rkDetails = {\n                ...originalDetails,\n                groupIndex: -1,\n                groupName: \"Installed\",\n                qrCode: undefined,\n                mobile: undefined,\n                installed: true,\n              }\n            } else {\n              rkDetails = {\n                ...originalDetails,\n                installed: undefined,\n              }\n            }\n\n            // Reset the rainbowkit details (used for UI config specific to connector)\n            Object.keys(currentDetails).forEach(\n              key => delete (currentDetails as any)[key]\n            )\n            Object.assign(currentDetails, rkDetails)\n\n            // Update the current handler (i.e. the proxied connector which is actually active)\n            const _currentHandler = isInstalled\n              ? primaryConnector\n              : walletConnectConnector\n\n            if (!_currentHandler) {\n              throw new Error(\"No handler found\")\n            }\n\n            currentHandler = {\n              getProvider: _currentHandler.getProvider.bind(_currentHandler),\n              connect: _currentHandler.connect.bind(_currentHandler),\n              disconnect: _currentHandler.disconnect.bind(_currentHandler),\n              getAccounts: _currentHandler.getAccounts.bind(_currentHandler),\n              getChainId: _currentHandler.getChainId.bind(_currentHandler),\n              isAuthorized: _currentHandler.isAuthorized.bind(_currentHandler),\n              switchChain: _currentHandler.switchChain?.bind(_currentHandler),\n            }\n          }\n        })\n      },\n    }\n\n    return obj\n  }\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/fcl-rainbowkit-adapter.test.ts",
    "content": "describe(\"fcl rainbowkit adapter\", () => {\n  it(\"should be tested\", () => {\n    expect(true).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/get-wc-connector.ts",
    "content": "/*\n * This file is mostly a copy of Rainbowkit's internal get wc connector utility,\n * meant to cache and reuse walletConnect connector instances.\n *\n * The caveat is that we are substituting the original connector with a multi-scoped\n * version that is able to be used in a cross-VM context.\n *\n * See: https://github.com/rainbow-me/rainbowkit/blob/0c9679812123e17b45e1330d5e3b665b48c82864/packages/rainbowkit/src/wallets/getWalletConnectConnector.ts\n */\n\n/*!\n * MIT License\n *\n * Copyright (c) 2024 Rainbow\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software\n * and associated documentation files (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge, publish, distribute,\n * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\n * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport {createConnector} from \"wagmi\"\nimport type {CreateConnectorFn} from \"wagmi\"\nimport {walletConnect, WalletConnectParameters} from \"@onflow/fcl-wagmi-adapter\"\nimport type {\n  RainbowKitWalletConnectParameters,\n  WalletDetailsParams,\n} from \"@rainbow-me/rainbowkit\"\n\ntype RainbowKitDetails = any\ntype CreateConnector = (walletDetails: WalletDetailsParams) => CreateConnectorFn\n\ninterface GetWalletConnectConnectorParams {\n  projectId: string\n  walletConnectParameters?: RainbowKitWalletConnectParameters\n}\n\ninterface CreateWalletConnectConnectorParams {\n  projectId: string\n  walletDetails: WalletDetailsParams\n  walletConnectParameters?: RainbowKitWalletConnectParameters\n}\n\ninterface GetOrCreateWalletConnectInstanceParams {\n  projectId: string\n  walletConnectParameters?: RainbowKitWalletConnectParameters\n  rkDetailsShowQrModal?: RainbowKitDetails[\"showQrModal\"]\n}\n\nconst walletConnectInstances = new Map<\n  string,\n  ReturnType<typeof walletConnect>\n>()\n\n// Function to get or create a walletConnect instance\nconst getOrCreateWalletConnectInstance = ({\n  projectId,\n  walletConnectParameters,\n  rkDetailsShowQrModal,\n}: GetOrCreateWalletConnectInstanceParams): ReturnType<\n  typeof walletConnect\n> => {\n  let config: WalletConnectParameters = {\n    ...(walletConnectParameters ? walletConnectParameters : {}),\n    projectId,\n    showQrModal: false, // Required. Otherwise WalletConnect modal (Web3Modal) will popup during time of connection for a wallet\n  } as any\n\n  // `rkDetailsShowQrModal` should always be `true`\n  if (rkDetailsShowQrModal) {\n    config = {...config, showQrModal: true}\n  }\n\n  const serializedConfig = JSON.stringify(\n    Object.keys(config)\n      .sort()\n      .reduce((obj: any, key) => {\n        obj[key] = config[key as keyof WalletConnectParameters]\n        return obj\n      }, {} as WalletConnectParameters)\n  )\n\n  const sharedWalletConnector = walletConnectInstances.get(serializedConfig)\n\n  if (sharedWalletConnector) {\n    return sharedWalletConnector\n  }\n\n  // Create a new walletConnect instance and store it\n  const newWalletConnectInstance = walletConnect(config)\n\n  walletConnectInstances.set(serializedConfig, newWalletConnectInstance)\n\n  return newWalletConnectInstance\n}\n\n// Creates a WalletConnect connector with the given project ID and additional options.\nfunction createWalletConnectConnector({\n  projectId,\n  walletDetails,\n  walletConnectParameters,\n}: CreateWalletConnectConnectorParams): CreateConnectorFn {\n  // Create and configure the WalletConnect connector with project ID and options.\n  return createConnector(config => ({\n    ...getOrCreateWalletConnectInstance({\n      projectId,\n      walletConnectParameters,\n      // Used in `connectorsForWallets` to add another\n      // walletConnect wallet into rainbowkit with modal popup option\n      rkDetailsShowQrModal: walletDetails.rkDetails.showQrModal,\n    })(config),\n    ...walletDetails,\n  }))\n}\n\n// Factory function to obtain a configured WalletConnect connector.\nexport function getWalletConnectConnector({\n  projectId,\n  walletConnectParameters,\n}: GetWalletConnectConnectorParams): CreateConnector {\n  // We use this projectId in place of YOUR_PROJECT_ID for our examples.\n  // This allows us our examples and templates to be functional with WalletConnect v2.\n  // We warn developers against using this projectId in their dApp in production.\n  const exampleProjectId = \"21fef48091f12692cad574a6f7753643\"\n\n  if (!projectId || projectId === \"\") {\n    throw new Error(\n      \"No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure\"\n    )\n  }\n\n  if (projectId === \"YOUR_PROJECT_ID\") {\n    projectId = exampleProjectId\n  }\n\n  // Return a function that merges additional wallet details with `CreateConnectorFn`.\n  return (walletDetails: WalletDetailsParams) =>\n    createWalletConnectConnector({\n      projectId,\n      walletDetails,\n      walletConnectParameters,\n    })\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/index.ts",
    "content": "export {flowWallet} from \"./wallets/flow-wallet\"\nexport {createFclConnector} from \"./create-connector\"\nexport {\n  type WalletConnectWalletOptions,\n  walletConnectWallet,\n} from \"./wallets/wc-wallet\"\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/use-is-cadence-wallet-connected.ts",
    "content": "import * as fcl from \"@onflow/fcl\"\nimport {CurrentUser} from \"@onflow/typedefs\"\nimport {Config, getAccount, watchAccount} from \"@wagmi/core\"\nimport {useEffect, useState} from \"react\"\n\nexport async function useIsCadenceWalletConnected(config: Config) {\n  const [wagmiAccount, setWagmiAccount] = useState(() => getAccount(config))\n  const [fclAccount, setFclAccount] = useState<CurrentUser | null>(() => null)\n\n  useEffect(() => {\n    const unsub = watchAccount(config, {\n      onChange: account => {\n        const isCadenceWallet = account?.address !== undefined\n        setWagmiAccount(getAccount(config))\n      },\n    })\n\n    return () => {\n      unsub()\n    }\n  }, [config])\n\n  useEffect(() => {\n    const unsubscribe = fcl.currentUser().subscribe((user: CurrentUser) => {\n      setFclAccount(user)\n    })\n\n    return () => {\n      unsubscribe()\n    }\n  })\n\n  return (\n    fclAccount?.addr !== undefined &&\n    fclAccount?.loggedIn === true &&\n    wagmiAccount.isConnected\n  )\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/wallets/flow-wallet.ts",
    "content": "import {createFclConnector} from \"../create-connector\"\nimport * as fcl from \"@onflow/fcl\"\n\n/**\n * Create a connector for the Flow Wallet (currently only supports the extension)\n * @param params - Optional parameters\n * @param params.user - The current user\n * @param params.config - The current config\n * @returns\n */\nexport const flowWallet = (params?: {\n  user?: typeof fcl.currentUser\n  config?: typeof fcl.config\n}) =>\n  createFclConnector({\n    user: params?.user || fcl.currentUser,\n    config: params?.config || fcl.config,\n    services: [\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn\",\n        uid: \"fcw#authn\",\n        endpoint:\n          \"chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html\",\n        method: \"EXT/RPC\",\n        provider: {},\n        params: {},\n      },\n      {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn\",\n        method: \"WC/RPC\",\n        uid: \"https://fcw-link.lilico.app/wc\",\n        endpoint: \"flow_authn\",\n        provider: {},\n        params: {},\n      },\n    ],\n    walletDetails: {\n      id: \"flow-wallet\",\n      name: \"Flow Wallet\",\n      iconUrl: \"https://lilico.app/logo_mobile.png\",\n      iconBackground: \"#FFFFFF\",\n      downloadUrls: {\n        android:\n          \"https://play.google.com/store/apps/details?id=com.flowfoundation.wallet\",\n        ios: \"https://apps.apple.com/ca/app/flow-wallet-nfts-and-crypto/id6478996750\",\n        chrome:\n          \"https://chromewebstore.google.com/detail/flow-wallet/hpclkefagolihohboafpheddmmgdffjm\",\n        qrCode: \"https://link.lilico.app\",\n      },\n      mobile: {\n        getUri: (uri: string) =>\n          `https://fcw-link.lilico.app/wc?uri=${encodeURIComponent(uri)}`,\n      },\n      qrCode: {\n        getUri: (uri: string) => uri,\n        instructions: {\n          learnMoreUrl: \"https://wallet.flow.com\",\n          steps: [\n            {\n              description:\n                \"We recommend putting Flow Wallet on your home screen for faster access to your wallet.\",\n              step: \"install\",\n              title: \"Open the Flow Wallet app\",\n            },\n            {\n              description:\n                \"You can find the scan button on the home page. A connection prompt will appear, allowing you to connect your wallet.\",\n              step: \"scan\",\n              title: \"Tap the scan button\",\n            },\n          ],\n        },\n      },\n      extension: {\n        instructions: {\n          learnMoreUrl: \"https://wallet.flow.com\",\n          steps: [\n            {\n              description:\n                \"We recommend pinning Flow Wallet to your taskbar for quicker access to your wallet.\",\n              step: \"install\",\n              title: \"Install the Flow Wallet extension\",\n            },\n            {\n              description:\n                \"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.\",\n              step: \"create\",\n              title: \"Create or Import a Wallet\",\n            },\n            {\n              description:\n                \"Once you set up your wallet, click below to refresh the browser and load up the extension.\",\n              step: \"refresh\",\n              title: \"Refresh your browser\",\n            },\n          ],\n        },\n      },\n      rdns: \"com.flowfoundation.wallet\",\n    },\n  })\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/src/wallets/wc-wallet.ts",
    "content": "/*\n * This file is mostly a copy of Rainbowkit's internal WalletConnect wallet implementation.\n * The purpose is to substitute the original connector with a multi-scoped version that is\n * able to be used in a cross-VM context.\n *\n * See: https://github.com/rainbow-me/rainbowkit/blob/0c9679812123e17b45e1330d5e3b665b48c82864/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.ts#L9\n */\n\n/*!\n * MIT License\n *\n * Copyright (c) 2024 Rainbow\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software\n * and associated documentation files (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge, publish, distribute,\n * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\n * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport {\n  type RainbowKitWalletConnectParameters,\n  type Wallet,\n} from \"@rainbow-me/rainbowkit\"\nimport {getWalletConnectConnector} from \"../get-wc-connector\"\n\nconst WALLETCONNECT_ICON = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiBmaWxsPSIjM0I5OUZDIi8+CjxwYXRoIGQ9Ik04LjM4OTY5IDEwLjM3MzlDMTEuNDg4MiA3LjI3NTM4IDE2LjUxMTggNy4yNzUzOCAxOS42MTAzIDEwLjM3MzlMMTkuOTgzMiAxMC43NDY4QzIwLjEzODIgMTAuOTAxNyAyMC4xMzgyIDExLjE1MjkgMTkuOTgzMiAxMS4zMDc4TDE4LjcwNzYgMTIuNTgzNUMxOC42MzAxIDEyLjY2MDkgMTguNTA0NSAxMi42NjA5IDE4LjQyNzEgMTIuNTgzNUwxNy45MTM5IDEyLjA3MDNDMTUuNzUyMyA5LjkwODcgMTIuMjQ3NyA5LjkwODcgMTAuMDg2MSAxMi4wNzAzTDkuNTM2NTUgMTIuNjE5OEM5LjQ1OTA5IDEyLjY5NzMgOS4zMzM1IDEyLjY5NzMgOS4yNTYwNCAxMi42MTk4TDcuOTgwMzkgMTEuMzQ0MkM3LjgyNTQ3IDExLjE4OTMgNy44MjU0NyAxMC45MzgxIDcuOTgwMzkgMTAuNzgzMkw4LjM4OTY5IDEwLjM3MzlaTTIyLjI0ODUgMTMuMDEyTDIzLjM4MzggMTQuMTQ3NEMyMy41Mzg3IDE0LjMwMjMgMjMuNTM4NyAxNC41NTM1IDIzLjM4MzggMTQuNzA4NEwxOC4yNjQ1IDE5LjgyNzdDMTguMTA5NiAxOS45ODI3IDE3Ljg1ODQgMTkuOTgyNyAxNy43MDM1IDE5LjgyNzdDMTcuNzAzNSAxOS44Mjc3IDE3LjcwMzUgMTkuODI3NyAxNy43MDM1IDE5LjgyNzdMMTQuMDcwMiAxNi4xOTQ0QzE0LjAzMTQgMTYuMTU1NyAxMy45Njg2IDE2LjE1NTcgMTMuOTI5OSAxNi4xOTQ0QzEzLjkyOTkgMTYuMTk0NCAxMy45Mjk5IDE2LjE5NDQgMTMuOTI5OSAxNi4xOTQ0TDEwLjI5NjYgMTkuODI3N0MxMC4xNDE3IDE5Ljk4MjcgOS44OTA1MyAxOS45ODI3IDkuNzM1NjEgMTkuODI3OEM5LjczNTYgMTkuODI3OCA5LjczNTYgMTkuODI3NyA5LjczNTYgMTkuODI3N0w0LjYxNjE5IDE0LjcwODNDNC40NjEyNyAxNC41NTM0IDQuNDYxMjcgMTQuMzAyMiA0LjYxNjE5IDE0LjE0NzNMNS43NTE1MiAxMy4wMTJDNS45MDY0NSAxMi44NTcgNi4xNTc2MyAxMi44NTcgNi4zMTI1NSAxMy4wMTJMOS45NDU5NSAxNi42NDU0QzkuOTg0NjggMTYuNjg0MSAxMC4wNDc1IDE2LjY4NDEgMTAuMDg2MiAxNi42NDU0QzEwLjA4NjIgMTYuNjQ1NCAxMC4wODYyIDE2LjY0NTQgMTAuMDg2MiAxNi42NDU0TDEzLjcxOTQgMTMuMDEyQzEzLjg3NDMgMTIuODU3IDE0LjEyNTUgMTIuODU3IDE0LjI4MDUgMTMuMDEyQzE0LjI4MDUgMTMuMDEyIDE0LjI4MDUgMTMuMDEyIDE0LjI4MDUgMTMuMDEyTDE3LjkxMzkgMTYuNjQ1NEMxNy45NTI2IDE2LjY4NDEgMTguMDE1NCAxNi42ODQxIDE4LjA1NDEgMTYuNjQ1NEwyMS42ODc0IDEzLjAxMkMyMS44NDI0IDEyLjg1NzEgMjIuMDkzNiAxMi44NTcxIDIyLjI0ODUgMTMuMDEyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==`\n\nexport interface WalletConnectWalletOptions {\n  projectId: string\n  options?: RainbowKitWalletConnectParameters\n}\n\nexport const walletConnectWallet = ({\n  projectId,\n  options,\n}: WalletConnectWalletOptions): Wallet => {\n  const getUri = (uri: string) => {\n    return uri\n  }\n\n  return {\n    id: \"walletConnect\",\n    name: \"WalletConnect\",\n    installed: undefined,\n    iconUrl: WALLETCONNECT_ICON,\n    iconBackground: \"#3b99fc\",\n    qrCode: {getUri},\n    createConnector: getWalletConnectConnector({\n      projectId,\n      walletConnectParameters: options,\n    }),\n  }\n}\n"
  },
  {
    "path": "packages/fcl-rainbowkit-adapter/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/fcl-react-native/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-react-native/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"globals\": {\n    \"JSX\": \"readonly\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/tag-lines\": 0,\n    \"jsdoc/require-param-description\": 0,\n    \"jsdoc/valid-types\": 0,\n    \"jsdoc/require-returns-description\": 0,\n    \"no-undef\": 1\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/.gitignore",
    "content": "types/"
  },
  {
    "path": "packages/fcl-react-native/.npmignore",
    "content": "src/"
  },
  {
    "path": "packages/fcl-react-native/CHANGELOG.md",
    "content": "# @onflow/fcl-react-native\n\n## 1.22.1\n\n### Patch Changes\n\n- Updated dependencies [[`b438549005eba70ab18089abe117ed6816cc1b7f`](https://github.com/onflow/fcl-js/commit/b438549005eba70ab18089abe117ed6816cc1b7f)]:\n  - @onflow/fcl-core@1.30.2\n\n## 1.22.0\n\n### Minor Changes\n\n- [#2774](https://github.com/onflow/fcl-js/pull/2774) [`d8cbe12f20ca9c047567155b40642e3dbea66c89`](https://github.com/onflow/fcl-js/commit/d8cbe12f20ca9c047567155b40642e3dbea66c89) Thanks [@mfbz](https://github.com/mfbz)! - Improved wc redirect flexibility and updated connect modal to be normal centered modal for better layout support.\n\n## 1.21.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338) Thanks [@mfbz](https://github.com/mfbz)! - Added react-native-sdk package, similar to react-sdk but for react-native applications. It fully supports all the same hooks available in react-sdk, plus the connect and profile components. It leverages fcl-react-native for managing blockchain interactions and it's compatible to both react-native and expo applications.\n\n## 1.20.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/config@1.11.1\n  - @onflow/fcl-core@1.30.1\n  - @onflow/sdk@1.13.7\n\n## 1.20.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/config@1.11.0\n  - @onflow/fcl-core@1.30.0\n  - @onflow/sdk@1.13.6\n\n## 1.19.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/config@1.10.0\n  - @onflow/fcl-core@1.29.0\n  - @onflow/sdk@1.13.5\n\n## 1.18.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/config@1.9.0\n  - @onflow/fcl-core@1.28.0\n  - @onflow/sdk@1.13.4\n\n## 1.17.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/config@1.8.0\n  - @onflow/fcl-core@1.27.0\n  - @onflow/sdk@1.13.3\n\n## 1.16.4\n\n### Patch Changes\n\n- Updated dependencies [[`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6)]:\n  - @onflow/fcl-core@1.26.0\n\n## 1.16.3\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/config@1.7.0\n  - @onflow/fcl-core@1.25.0\n  - @onflow/sdk@1.13.2\n\n## 1.16.2\n\n### Patch Changes\n\n- Updated dependencies [[`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd)]:\n  - @onflow/fcl-core@1.24.0\n\n## 1.16.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.23.1\n  - @onflow/sdk@1.13.1\n\n## 1.16.0\n\n### Minor Changes\n\n- [#2739](https://github.com/onflow/fcl-js/pull/2739) [`82b75ceada5664b4bc42a1f9664f6a60f439e8c4`](https://github.com/onflow/fcl-js/commit/82b75ceada5664b4bc42a1f9664f6a60f439e8c4) Thanks [@mfbz](https://github.com/mfbz)! - Fixed metro interop issues with peer deps.\n\n## 1.15.0\n\n### Minor Changes\n\n- [#2734](https://github.com/onflow/fcl-js/pull/2734) [`dab4bd4786099b6aa035e127c0f6235b980ff8c9`](https://github.com/onflow/fcl-js/commit/dab4bd4786099b6aa035e127c0f6235b980ff8c9) Thanks [@mfbz](https://github.com/mfbz)! - Updated fcl-react-native dependencies.\n\n## 1.14.0\n\n### Minor Changes\n\n- [#2704](https://github.com/onflow/fcl-js/pull/2704) [`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d) Thanks [@mfbz](https://github.com/mfbz)! - Improved fcl-react-native WalletConnect implementation with full fcl specs support, automatic redirect URI detection, session validation and full feature parity with fcl.\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl-core@1.23.0\n  - @onflow/sdk@1.13.0\n\n## 1.13.6\n\n### Patch Changes\n\n- Updated dependencies [[`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212)]:\n  - @onflow/sdk@1.12.0\n  - @onflow/fcl-core@1.22.3\n\n## 1.13.5\n\n### Patch Changes\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e)]:\n  - @onflow/fcl-core@1.22.2\n  - @onflow/config@1.6.3\n  - @onflow/sdk@1.11.2\n\n## 1.13.4\n\n### Patch Changes\n\n- Updated dependencies [[`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73), [`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557)]:\n  - @onflow/types@1.5.0\n  - @onflow/sdk@1.11.1\n  - @onflow/config@1.6.2\n  - @onflow/fcl-core@1.22.1\n\n## 1.13.3\n\n### Patch Changes\n\n- Updated dependencies [[`ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23`](https://github.com/onflow/fcl-js/commit/ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23), [`81d21f98ab2838885ad32217de42b85481f5595c`](https://github.com/onflow/fcl-js/commit/81d21f98ab2838885ad32217de42b85481f5595c), [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960)]:\n  - @onflow/sdk@1.11.0\n  - @onflow/fcl-core@1.22.0\n\n## 1.13.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.21.2\n  - @onflow/sdk@1.10.2\n\n## 1.13.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/config@1.6.1\n  - @onflow/fcl-core@1.21.1\n  - @onflow/rlp@1.2.4\n  - @onflow/sdk@1.10.1\n  - @onflow/types@1.4.2\n  - @onflow/util-actor@1.3.5\n  - @onflow/util-address@1.2.4\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n  - @onflow/util-semver@1.0.4\n  - @onflow/util-template@1.2.4\n  - @onflow/util-uid@1.2.4\n\n## 1.13.0\n\n### Minor Changes\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76), [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/fcl-core@1.21.0\n  - @onflow/sdk@1.10.0\n  - @onflow/config@1.6.0\n\n## 1.13.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl-core@1.21.0-alpha.2\n\n## 1.13.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350), [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2)]:\n  - @onflow/config@1.6.0-alpha.0\n  - @onflow/fcl-core@1.21.0-alpha.1\n  - @onflow/sdk@1.10.0-alpha.1\n\n## 1.13.0-alpha.0\n\n### Minor Changes\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76)]:\n  - @onflow/fcl-core@1.21.0-alpha.0\n  - @onflow/sdk@1.10.0-alpha.0\n\n## 1.12.1\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl-core@1.20.0\n\n## 1.12.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89), [`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/sdk@1.9.0\n  - @onflow/fcl-core@1.19.0\n\n## 1.12.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12)]:\n  - @onflow/fcl-core@1.19.0-alpha.2\n\n## 1.12.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89)]:\n  - @onflow/sdk@1.9.0-alpha.1\n  - @onflow/fcl-core@1.19.0-alpha.1\n\n## 1.12.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Developers using `fcl.tx` and `fcl.events` will not need to make any changes to their existing app to realize the latency improvements of this change and will automatically benefit by upgrading to this version.\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/fcl-core@1.19.0-alpha.0\n  - @onflow/sdk@1.9.0-alpha.0\n\n## 1.11.0\n\n### Minor Changes\n\n- [#2384](https://github.com/onflow/fcl-js/pull/2384) [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29) Thanks [@jribbink](https://github.com/jribbink)! - Include origin information in `onMessageFromFcl` function\n\n### Patch Changes\n\n- Updated dependencies [[`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29), [`094ed6dd38cae9ae39183f5ead8d59f9276f8f5d`](https://github.com/onflow/fcl-js/commit/094ed6dd38cae9ae39183f5ead8d59f9276f8f5d)]:\n  - @onflow/fcl-core@1.18.0\n  - @onflow/sdk@1.8.1\n\n## 1.10.1\n\n### Patch Changes\n\n- Updated dependencies [[`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d), [`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01)]:\n  - @onflow/fcl-core@1.17.0\n  - @onflow/sdk@1.8.0\n  - @onflow/config@1.5.2\n\n## 1.10.0\n\n### Minor Changes\n\n- [#2252](https://github.com/onflow/fcl-js/pull/2252) [`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714) Thanks [@jribbink](https://github.com/jribbink)! - Default to soft-finality for all queries (get account, get block, get block header, execute script). Developers can manually override this setting on a per-query basis if required.\n\n  Because developers can now query against un-sealed blocks, it is now recommended to switch to waiting for soft-finality (\"executed\" status) when awaiting for transaction results whenever possible for significant latency improvements (~2.5x faster).\n\n  This can be done by switching from `fcl.tx(...).onceSealed()` to `fcl.tx(...).onceExecuted()` or updating listeners passed to `fcl.tx(...).subscribe()`.\n\n### Patch Changes\n\n- Updated dependencies [[`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714)]:\n  - @onflow/fcl-core@1.16.0\n  - @onflow/sdk@1.7.0\n\n## 1.9.16\n\n### Patch Changes\n\n- [#2245](https://github.com/onflow/fcl-js/pull/2245) [`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac) Thanks [@jribbink](https://github.com/jribbink)! - Fix regression in `account` query at latest block\n\n- Updated dependencies [[`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac)]:\n  - @onflow/fcl-core@1.15.1\n  - @onflow/sdk@1.6.1\n\n## 1.9.15\n\n### Patch Changes\n\n- Updated dependencies [[`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8)]:\n  - @onflow/fcl-core@1.15.0\n  - @onflow/sdk@1.6.0\n\n## 1.9.14\n\n### Patch Changes\n\n- Updated dependencies [[`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec)]:\n  - @onflow/sdk@1.5.7\n  - @onflow/fcl-core@1.14.1\n\n## 1.9.13\n\n### Patch Changes\n\n- Updated dependencies [[`68cf725a4d618cc963f31a758998ad14a7a43716`](https://github.com/onflow/fcl-js/commit/68cf725a4d618cc963f31a758998ad14a7a43716)]:\n  - @onflow/fcl-core@1.14.0\n\n## 1.9.12\n\n### Patch Changes\n\n- Updated dependencies [[`3fccbef7bbf985f19d9a9bae2638e538f126f754`](https://github.com/onflow/fcl-js/commit/3fccbef7bbf985f19d9a9bae2638e538f126f754)]:\n  - @onflow/fcl-core@1.13.5\n\n## 1.9.11\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.13.4\n  - @onflow/sdk@1.5.6\n\n## 1.9.10\n\n### Patch Changes\n\n- Updated dependencies [[`c88f170ab2342f5382dead9a2270e72ce9c6d68a`](https://github.com/onflow/fcl-js/commit/c88f170ab2342f5382dead9a2270e72ce9c6d68a)]:\n  - @onflow/fcl-core@1.13.3\n\n## 1.9.9\n\n### Patch Changes\n\n- [#2043](https://github.com/onflow/fcl-js/pull/2043) [`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f) Thanks [@jribbink](https://github.com/jribbink)! - Export `TransactionError`\n\n- Updated dependencies [[`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f)]:\n  - @onflow/fcl-core@1.13.2\n\n## 1.9.8\n\n### Patch Changes\n\n- [#2039](https://github.com/onflow/fcl-js/pull/2039) [`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d) Thanks [@jribbink](https://github.com/jribbink)! - Update cross-fetch to v4\n\n- Updated dependencies [[`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d)]:\n  - @onflow/fcl-core@1.13.1\n  - @onflow/sdk@1.5.5\n\n## 1.9.7\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Pass getStorageProvider to currentUser configuration\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7), [`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35), [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1), [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7), [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21)]:\n  - @onflow/fcl-core@1.13.0\n  - @onflow/sdk@1.5.4\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-template@1.2.3\n  - @onflow/util-address@1.2.3\n  - @onflow/util-logger@1.3.3\n  - @onflow/util-semver@1.0.3\n  - @onflow/util-actor@1.3.4\n  - @onflow/util-uid@1.2.3\n  - @onflow/config@1.5.1\n  - @onflow/types@1.4.1\n  - @onflow/rlp@1.2.3\n\n## 1.9.7-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`b7860a388960f3d2220c5f85a820a33e41915f35`](https://github.com/onflow/fcl-js/commit/b7860a388960f3d2220c5f85a820a33e41915f35)]:\n  - @onflow/sdk@1.5.4-alpha.3\n  - @onflow/fcl-core@1.13.0-alpha.6\n\n## 1.9.7-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26)]:\n  - @onflow/fcl-core@1.13.0-alpha.5\n  - @onflow/sdk@1.5.4-alpha.2\n\n## 1.9.7-alpha.4\n\n### Patch Changes\n\n- [#2001](https://github.com/onflow/fcl-js/pull/2001) [`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7) Thanks [@jribbink](https://github.com/jribbink)! - Pass getStorageProvider to currentUser configuration\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7)]:\n  - @onflow/fcl-core@1.13.0-alpha.4\n\n## 1.9.7-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1)]:\n  - @onflow/fcl-core@1.13.0-alpha.3\n\n## 1.9.7-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3)]:\n  - @onflow/fcl-core@1.13.0-alpha.2\n\n## 1.9.7-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21)]:\n  - @onflow/fcl-core@1.13.0-alpha.1\n  - @onflow/sdk@1.5.4-alpha.1\n\n## 1.9.7-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/util-semver@1.0.3-alpha.0\n  - @onflow/util-actor@1.3.4-alpha.0\n  - @onflow/fcl-core@1.12.1-alpha.0\n  - @onflow/util-uid@1.2.3-alpha.0\n  - @onflow/config@1.5.1-alpha.0\n  - @onflow/types@1.4.1-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n  - @onflow/sdk@1.5.4-alpha.0\n\n## 1.9.6\n\n### Patch Changes\n\n- Updated dependencies [[`f2831107`](https://github.com/onflow/fcl-js/commit/f283110707d5edc166bbe05e5482d38fa29de29e)]:\n  - @onflow/fcl-core@1.12.0\n\n## 1.9.5\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.5.3\n  - @onflow/fcl-core@1.11.1\n\n## 1.9.4\n\n### Patch Changes\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`e97e8d2f`](https://github.com/onflow/fcl-js/commit/e97e8d2f5197aecf793f26ba82771fd4f7ebc757), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7), [`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24), [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/fcl-core@1.11.0\n  - @onflow/sdk@1.5.2\n  - @onflow/config@1.5.0\n\n## 1.9.4-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/config@1.5.0-alpha.0\n  - @onflow/fcl-core@1.11.0-alpha.4\n  - @onflow/sdk@1.5.2-alpha.3\n\n## 1.9.4-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c)]:\n  - @onflow/fcl-core@1.11.0-alpha.3\n\n## 1.9.4-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7), [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec)]:\n  - @onflow/fcl-core@1.11.0-alpha.2\n  - @onflow/sdk@1.5.2-alpha.2\n\n## 1.9.4-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24)]:\n  - @onflow/sdk@1.5.2-alpha.1\n  - @onflow/fcl-core@1.11.0-alpha.1\n\n## 1.9.4-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807)]:\n  - @onflow/sdk@1.5.2-alpha.0\n  - @onflow/fcl-core@1.11.0-alpha.0\n\n## 1.9.3\n\n### Patch Changes\n\n- Updated dependencies [[`5428fca4`](https://github.com/onflow/fcl-js/commit/5428fca4cdc1b37526d429cb646a72bea577a29b)]:\n  - @onflow/fcl-core@1.10.0\n\n## 1.9.2\n\n### Patch Changes\n\n- Updated dependencies [[`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175), [`38607662`](https://github.com/onflow/fcl-js/commit/38607662dbfc54f268c40488e7a6a89bedd169d8)]:\n  - @onflow/util-actor@1.3.3\n  - @onflow/fcl-core@1.9.2\n  - @onflow/config@1.4.1\n  - @onflow/sdk@1.5.1\n\n## 1.9.1\n\n### Patch Changes\n\n- Updated dependencies [[`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074), [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`8fb453b5`](https://github.com/onflow/fcl-js/commit/8fb453b5ff3a00285d91a5432972afbe9e779706), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]:\n  - @onflow/sdk@1.5.0\n  - @onflow/types@1.4.0\n  - @onflow/util-invariant@1.2.3\n  - @onflow/config@1.4.0\n  - @onflow/fcl-core@1.9.1\n\n## 1.9.0\n\n### Minor Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- [#1825](https://github.com/onflow/fcl-js/pull/1825) [`e689325c`](https://github.com/onflow/fcl-js/commit/e689325c579a76c9e76e4bb62f72c40d6ad15bd1) Thanks [@nialexsan](https://github.com/nialexsan)! - bump react native version\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a), [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3), [`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/fcl-core@1.9.0\n  - @onflow/types@1.3.0\n  - @onflow/sdk@1.4.0\n  - @onflow/util-address@1.2.2\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/util-actor@1.3.2\n  - @onflow/util-uid@1.2.2\n  - @onflow/config@1.3.0\n  - @onflow/rlp@1.2.2\n  - @onflow/util-semver@1.0.2\n\n## 1.9.0-alpha.11\n\n### Patch Changes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n  - @onflow/sdk@1.4.0-alpha.9\n  - @onflow/fcl-core@1.9.0-alpha.8\n\n## 1.9.0-alpha.10\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- Updated dependencies [[`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88)]:\n  - @onflow/fcl-core@1.9.0-alpha.7\n  - @onflow/sdk@1.4.0-alpha.8\n\n## 1.9.0-alpha.9\n\n### Patch Changes\n\n- Updated dependencies [[`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0), [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0)]:\n  - @onflow/sdk@1.4.0-alpha.7\n  - @onflow/fcl-core@1.9.0-alpha.6\n\n## 1.9.0-alpha.8\n\n### Patch Changes\n\n- Updated dependencies [[`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/config@1.3.0-alpha.3\n  - @onflow/fcl-core@1.9.0-alpha.5\n  - @onflow/sdk@1.4.0-alpha.6\n\n## 1.9.0-alpha.7\n\n### Patch Changes\n\n- Updated dependencies [[`8ffd3f50`](https://github.com/onflow/fcl-js/commit/8ffd3f5040db314bc1358f05946780af1c03df1a)]:\n  - @onflow/fcl-core@1.9.0-alpha.4\n\n## 1.9.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d)]:\n  - @onflow/sdk@1.4.0-alpha.5\n  - @onflow/fcl-core@1.8.2-alpha.3\n\n## 1.9.0-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f)]:\n  - @onflow/types@1.3.0-alpha.3\n  - @onflow/fcl-core@1.8.2-alpha.2\n\n## 1.9.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f)]:\n  - @onflow/fcl-core@1.8.2-alpha.1\n  - @onflow/sdk@1.4.0-alpha.4\n\n## 1.9.0-alpha.3\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/util-semver@1.0.2-alpha.0\n  - @onflow/util-actor@1.3.2-alpha.2\n  - @onflow/fcl-core@1.8.2-alpha.0\n  - @onflow/util-uid@1.2.2-alpha.2\n  - @onflow/config@1.2.2-alpha.2\n  - @onflow/types@1.3.0-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n  - @onflow/sdk@1.4.0-alpha.3\n\n## 1.9.0-alpha.2\n\n### Patch Changes\n\n- [#1825](https://github.com/onflow/fcl-js/pull/1825) [`e689325c`](https://github.com/onflow/fcl-js/commit/e689325c579a76c9e76e4bb62f72c40d6ad15bd1) Thanks [@nialexsan](https://github.com/nialexsan)! - bump react native version\n"
  },
  {
    "path": "packages/fcl-react-native/README.md",
    "content": "# FCL: Flow Client Library\n### Making secure web applications powered by the Flow Blockchain\n\nFlow Client Library (FCL) enables applications to easily integrate with all FCL-compatible wallets and\nother services (e.g. (Coming Soon) profiles, private information, notifications). This offers developers a strong\nfoundation to compose their apps with existing building blocks. It’s currently supported for browser\napplications, and will be extended to other platforms.\n\nWith FCL, you can:\n\n- Integrate all compatible wallets without any custom code or code injection\n- Authenticate users\n- Query the Flow Blockchain\n- Send transactions (e.g. initializing resources, sending assets, purchasing, etc.)\n- Sign transactions through wallet integration avoiding key management\n\nWith FCL, you will eventually be able to:\n\n- Personally sign data via FCL Compatible Wallets\n- Request Additional User info like Emails\n\n## Status\n\n- **Last Updated:** Mar 2nd 2021\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n\nThe things that exists probably won't be changing much externally, we will be adding new functionality in the near future.\n\n## Install\n\n```bash\nnpm install --save @onflow/fcl @onflow/types\n```\n\n## Getting Started\n\nFor a detailed guide explaining how to use `@onflow/fcl` to interact with Flow please see the [Flow App Quick Start](https://developers.flow.com/tutorials/flow-app-quickstart)\n\nHaving trouble with something? Reach out to us on [Discord](https://discord.gg/k6cZ7QC), we are more than happy to help.\n\n## WalletConnect Deeplinks\n\nThis package uses `wc-redirect` as the deeplink path for WalletConnect redirects (e.g., `myapp://wc-redirect`). When a wallet approves a connection or transaction, it redirects back to your app using this path.\n\nIf you're using Expo Router, you may want to intercept this path to prevent unwanted navigation. See `@onflow/react-native-sdk` README for details.\n"
  },
  {
    "path": "packages/fcl-react-native/docs/extra.md",
    "content": "## Configuration\n\nFCL has a mechanism that lets you configure various aspects of FCL. When you move from one instance of the Flow Blockchain to another (Local Emulator to Testnet to Mainnet) the only thing you should need to change for your FCL implementation is your configuration.\n\n### Setting Configuration Values\n\nValues only need to be set once. We recommend doing this once and as early in the life cycle as possible. To set a configuration value, the `put` method on the `config` instance needs to be called, the `put` method returns the `config` instance so they can be chained.\n\nAlternatively, you can set the config by passing a JSON object directly.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config() // returns the config instance\n  .put('foo', 'bar') // configures \"foo\" to be \"bar\"\n  .put('baz', 'buz'); // configures \"baz\" to be \"buz\"\n\n// OR\n\nfcl.config({\n  foo: 'bar',\n  baz: 'buz',\n});\n```\n\n### Getting Configuration Values\n\nThe `config` instance has an **asynchronous** `get` method. You can also pass it a fallback value.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('foo', 'bar').put('woot', 5).put('rawr', 7);\n\nconst FALLBACK = 1;\n\nasync function addStuff() {\n  var woot = await fcl.config().get('woot', FALLBACK); // will be 5 -- set in the config before\n  var rawr = await fcl.config().get('rawr', FALLBACK); // will be 7 -- set in the config before\n  var hmmm = await fcl.config().get('hmmm', FALLBACK); // will be 1 -- uses fallback because this isnt in the config\n\n  return woot + rawr + hmmm;\n}\n\naddStuff().then((d) => console.log(d)); // 13 (5 + 7 + 1)\n```\n\n### Common Configuration Keys\n\n| Name                                 | Example                                                       | Description                                                                                                                                                             |\n| ------------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `accessNode.api` **(required)**      | `https://rest-testnet.onflow.org`                             | API URL for the Flow Blockchain Access Node you want to be communicating with. See all available access node endpoints [here](https://developers.onflow.org/http-api/). |\n| `app.detail.title`                   | `Cryptokitties`                                               | Your applications title, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                       |\n| `app.detail.icon`                    | `https://fcl-discovery.onflow.org/images/blocto.png`          | Url for your applications icon, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                |\n| `app.detail.description`             | `Cryptokitties is a blockchain game`                          | Your applications description, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                 |\n| `app.detail.url`                     | `https://cryptokitties.co`                                    | Your applications url, can be requested by wallets and other services. Used by WalletConnect plugin & Wallet Discovery service.                                         |\n| `challenge.handshake`                | **DEPRECATED**                                                | Use `discovery.wallet` instead.                                                                                                                                         |\n| `discovery.authn.endpoint`           | `https://fcl-discovery.onflow.org/api/testnet/authn`          | Endpoint for alternative configurable Wallet Discovery mechanism.                                                                  |\n| `discovery.wallet` **(required)**    | `https://fcl-discovery.onflow.org/testnet/authn`              | Points FCL at the Wallet or Wallet Discovery mechanism.                                                                                                                 |\n| `discovery.wallet.method`            | `IFRAME/RPC`, `POP/RPC`, `TAB/RPC`, `HTTP/POST`, or `EXT/RPC` | Describes which service strategy a wallet should use.                                                                                                                   |\n| `fcl.limit`                          | `100`                                                         | Specifies fallback compute limit if not provided in transaction. Provided as integer.                                                                                   |\n| `flow.network` **(recommended)**     | `testnet`                                                     | Used in conjunction with stored interactions and provides FCLCryptoContract address for `testnet` and `mainnet`. Possible values: `local`, `testnet`, `mainnet`.        |\n| `walletconnect.projectId`            | `YOUR_PROJECT_ID`                                             | Your app's WalletConnect project ID. See [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) to obtain a project ID for your application.                    |\n| `walletconnect.disableNotifications` | `false`                                                       | Optional flag to disable pending WalletConnect request notifications within the application's UI.                                                                       |\n\n## Using Contracts in Scripts and Transactions\n\n### Address Replacement\n\nConfiguration keys that start with `0x` will be replaced in FCL scripts and transactions, this allows you to write your script or transaction Cadence code once and not have to change it when you point your application at a difference instance of the Flow Blockchain.\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl.config().put('0xFungibleToken', '0xf233dcee88fe0abe');\n\nasync function myScript() {\n  return fcl\n    .send([\n      fcl.script`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      access(all) fun main() { /* Rest of the script goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n\nasync function myTransaction() {\n  return fcl\n    .send([\n      fcl.transaction`\n      import FungibleToken from 0xFungibleToken // will be replaced with 0xf233dcee88fe0abe because of the configuration\n\n      transaction { /* Rest of the transaction goes here */ }\n    `,\n    ])\n    .then(fcl.decode);\n}\n```\n\n#### Example\n\n```javascript\nimport * as fcl from '@onflow/fcl';\n\nfcl\n  .config()\n  .put('flow.network', 'testnet')\n  .put('walletconnect.projectId', 'YOUR_PROJECT_ID')\n  .put('accessNode.api', 'https://rest-testnet.onflow.org')\n  .put('discovery.wallet', 'https://fcl-discovery.onflow.org/testnet/authn')\n  .put('app.detail.title', 'Test Harness')\n  .put('app.detail.icon', 'https://i.imgur.com/r23Zhvu.png')\n  .put('app.detail.description', 'A test harness for FCL')\n  .put('app.detail.url', 'https://myapp.com')\n  .put('service.OpenID.scopes', 'email email_verified name zoneinfo')\n  .put('0xFlowToken', '0x7e60df042a9c0868');\n```\n\n### Using `flow.json` for Contract Imports\n\nA simpler and more flexible way to manage contract imports in scripts and transactions is by using the `config.load` method in FCL. This lets you load contract configurations from a `flow.json` file, keeping your import syntax clean and allowing FCL to pick the correct contract addresses based on the network you're using.\n\n#### 1. Define Your Contracts in `flow.json`\n\nHere’s an example of a `flow.json` file with aliases for multiple networks:\n\n```json\n{\n  \"contracts\": {\n    \"HelloWorld\": {\n      \"source\": \"./cadence/contracts/HelloWorld.cdc\",\n      \"aliases\": {\n        \"testnet\": \"0x1cf0e2f2f715450\",\n        \"mainnet\": \"0xf8d6e0586b0a20c7\"\n      }\n    }\n  }\n}\n```\n\n- **`source`**: Points to the contract file in your project.\n- **`aliases`**: Maps each network to the correct contract address.\n\n#### 2. Configure FCL\n\nLoad the `flow.json` file and set up FCL to use it:\n\n```javascript\nimport { config } from '@onflow/fcl';\nimport flowJSON from '../flow.json';\n\nconfig({\n  'flow.network': 'testnet', // Choose your network, e.g., testnet or mainnet\n  'accessNode.api': 'https://rest-testnet.onflow.org', // Access node for the network\n  'discovery.wallet': `https://fcl-discovery.onflow.org/testnet/authn`, // Wallet discovery\n}).load({ flowJSON });\n```\n\nWith this setup, FCL will automatically use the correct contract address based on the selected network (e.g., `testnet` or `mainnet`).\n\n#### 3. Use Contract Names in Scripts and Transactions\n\nAfter setting up `flow.json`, you can import contracts by name in your Cadence scripts or transactions:\n\n```cadence\nimport \"HelloWorld\"\n\naccess(all) fun main(): String {\n    return HelloWorld.sayHello()\n}\n```\n\nFCL replaces `\"HelloWorld\"` with the correct address from the `flow.json` configuration.\n\n> **Note**: Don’t store private keys in your `flow.json`. Instead, keep sensitive keys in a separate, `.gitignore`-protected file."
  },
  {
    "path": "packages/fcl-react-native/docs-generator.config.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nmodule.exports = {\n  customData: {\n    extra: fs\n      .readFileSync(path.join(__dirname, \"docs\", \"extra.md\"), \"utf8\")\n      .trim(),\n  },\n}\n"
  },
  {
    "path": "packages/fcl-react-native/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-react-native\",\n  \"version\": \"1.22.1\",\n  \"description\": \"React Native JavaScript/TypeScript library for building mobile applications on the Flow blockchain.\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"jest\": {\n    \"testEnvironment\": \"jsdom\",\n    \"globals\": {\n      \"PACKAGE_CURRENT_VERSION\": \"TESTVERSION\"\n    }\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"1.8.0\",\n    \"@types/estree\": \"^1.0.6\",\n    \"@types/node\": \"^18.19.57\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/fcl-react-native.ts\",\n  \"main\": \"dist/fcl-react-native.js\",\n  \"module\": \"dist/fcl-react-native.module.js\",\n  \"unpkg\": \"dist/fcl-react-native.umd.min.js\",\n  \"types\": \"types/fcl-react-native.d.ts\",\n  \"scripts\": {\n    \"pain\": \"npm publish --tag pain\",\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"build:types\": \"tsc\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/config\": \"1.11.1\",\n    \"@onflow/fcl-core\": \"1.30.2\",\n    \"@onflow/interaction\": \"0.0.11\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/sdk\": \"1.13.7\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@onflow/util-actor\": \"1.3.5\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@onflow/util-semver\": \"1.0.4\",\n    \"@onflow/util-template\": \"1.2.4\",\n    \"@onflow/util-uid\": \"1.2.4\",\n    \"@walletconnect/sign-client\": \"^2.20.2\",\n    \"@walletconnect/types\": \"^2.20.2\",\n    \"@walletconnect/utils\": \"^2.20.2\",\n    \"cross-fetch\": \"^4.0.0\",\n    \"expo-linking\": \"^7.0.5 || ^8.0.0\"\n  },\n  \"peerDependencies\": {\n    \"@react-native-async-storage/async-storage\": \"^2.1.2\",\n    \"@walletconnect/react-native-compat\": \"^2.20.2\",\n    \"expo-image\": \"^3.0.0\",\n    \"expo-web-browser\": \"^14.0.2 || ^15.0.0\",\n    \"react\": \"^18.0.0 || ^19.0.0\",\n    \"react-native\": \">=0.60.0\",\n    \"react-native-get-random-values\": \"^1.8.0\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/VERSION.ts",
    "content": "declare const PACKAGE_CURRENT_VERSION: string | undefined\n\n// Use PACKAGE_CURRENT_VERSION if available (from build), otherwise use a default for development\n// NOTE: Discovery API requires a valid semver version for local testing\nexport const VERSION: string =\n  typeof PACKAGE_CURRENT_VERSION !== \"undefined\"\n    ? PACKAGE_CURRENT_VERSION\n    : \"1.13.5-TESTVERSION\"\n"
  },
  {
    "path": "packages/fcl-react-native/src/client.ts",
    "content": "import {\n  createFlowClientCore,\n  type FlowClientCoreConfig,\n  type StorageProvider,\n} from \"@onflow/fcl-core\"\nimport {getAsyncStorage} from \"./utils/react-native/storage\"\nimport {loadFclWc} from \"./walletconnect/loader\"\nimport {DISCOVERY_RN_METHOD} from \"./utils/react-native/constants\"\nimport {disconnectWalletConnect} from \"./walletconnect/client\"\n\nconst PLATFORM = \"react-native\"\n\n/**\n * Configuration for creating a Flow client on React Native.\n * Extends core configuration with mobile-specific features like WalletConnect.\n */\nexport interface FlowClientConfig\n  extends Omit<\n    FlowClientCoreConfig,\n    \"platform\" | \"discovery\" | \"computeLimit\" | \"storage\"\n  > {\n  // Override to make optional (defaults provided by implementation)\n  computeLimit?: number\n  storage?: StorageProvider\n\n  // WalletConnect configuration (mobile-specific)\n  walletconnectProjectId?: string\n  walletconnectDisableNotifications?: boolean\n}\n\n/**\n * Creates a Flow client instance with authentication, transaction, and query capabilities for React Native.\n *\n * @param params Configuration object for the Flow client\n * @returns A Flow client object with many methods for interacting with the Flow blockchain\n */\nexport function createFlowClient(params: FlowClientConfig) {\n  // TODO: Load into the global plugin registry for now. This should be\n  // refactored to use a plugin registry bound to the client instance in the future.\n  // Auto-load WalletConnect plugin when projectId is provided\n  loadFclWc({\n    walletConnectProjectId: params.walletconnectProjectId,\n    walletConnectDisableNotifications: params.walletconnectDisableNotifications,\n    appDetailTitle: params.appDetailTitle,\n    appDetailIcon: params.appDetailIcon,\n    appDetailDescription: params.appDetailDescription,\n    appDetailUrl: params.appDetailUrl,\n  })\n\n  // Get AsyncStorage for React Native\n  const storage = params.storage || getAsyncStorage()\n\n  const fclCore = createFlowClientCore({\n    flowNetwork: params.flowNetwork,\n    flowJson: params.flowJson,\n    accessNodeUrl: params.accessNodeUrl,\n    computeLimit: params.computeLimit || 9999,\n    transport: params.transport,\n    platform: PLATFORM,\n    storage,\n    discoveryWalletMethod: params.discoveryWalletMethod || DISCOVERY_RN_METHOD,\n    discoveryAuthnEndpoint: params.discoveryAuthnEndpoint,\n    discoveryAuthnInclude: params.discoveryAuthnInclude,\n    discoveryAuthnExclude: params.discoveryAuthnExclude,\n    customResolver: params.customResolver,\n    customDecoders: params.customDecoders,\n    discoveryWallet: params.discoveryWallet,\n    appDetailTitle: params.appDetailTitle,\n    appDetailIcon: params.appDetailIcon,\n    appDetailDescription: params.appDetailDescription,\n    appDetailUrl: params.appDetailUrl,\n    serviceOpenIdScopes: params.serviceOpenIdScopes,\n  })\n\n  // Create unauthenticate that also disconnects WalletConnect sessions\n  const unauthenticate = async () => {\n    fclCore.unauthenticate()\n    await disconnectWalletConnect()\n  }\n\n  return {\n    ...fclCore,\n    unauthenticate,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/fcl-react-native.ts",
    "content": "// Polyfill must be imported first\n// This provides crypto.getRandomValues for WalletConnect\nimport \"react-native-get-random-values\"\n\nexport {\n  VERSION,\n  query,\n  queryRaw,\n  verifyUserSignatures,\n  serialize,\n  tx,\n  events,\n  pluginRegistry,\n  discovery,\n  t,\n  WalletUtils,\n  AppUtils,\n  InteractionTemplateUtils,\n  getChainId,\n  TestUtils,\n  config,\n  flowMainnet,\n  flowTestnet,\n  flowEmulator,\n  send,\n  decode,\n  account,\n  block,\n  isOk,\n  isBad,\n  why,\n  pipe,\n  build,\n  withPrefix,\n  sansPrefix,\n  display,\n  cadence,\n  cdc,\n  createSignableVoucher,\n  voucherIntercept,\n  voucherToTxId,\n  transaction,\n  script,\n  ping,\n  atBlockHeight,\n  atBlockId,\n  getAccount,\n  getEvents,\n  getEventsAtBlockHeightRange,\n  getEventsAtBlockIds,\n  getBlock,\n  getBlockHeader,\n  getCollection,\n  getTransactionStatus,\n  getTransaction,\n  getNetworkParameters,\n  getNodeVersionInfo,\n  authorizations,\n  authorization,\n  args,\n  arg,\n  proposer,\n  payer,\n  limit,\n  ref,\n  params,\n  param,\n  validator,\n  invariant,\n  subscribeEvents,\n  nodeVersionInfo,\n  TransactionError,\n} from \"@onflow/fcl-core\"\n\nimport {\n  getMutate,\n  getCurrentUser,\n  initServiceRegistry,\n  getServiceRegistry,\n  setIsReactNative,\n} from \"@onflow/fcl-core\"\n\nimport {disconnectWalletConnect} from \"./walletconnect/client\"\n\n// Get AsyncStorage instance when module loads\n// This ensures storage is ready before any component subscribes to currentUser\nconst storageInstance = getAsyncStorage()\n\nexport const currentUser = getCurrentUser({\n  platform: \"react-native\",\n  getStorageProvider: async () => {\n    return (await config().get(\"fcl.storage\")) || storageInstance\n  },\n})\nexport const mutate = getMutate(currentUser)\n\nexport const authenticate = (opts = {}) => currentUser().authenticate(opts)\n\nexport const unauthenticate = async () => {\n  currentUser().unauthenticate()\n  await disconnectWalletConnect()\n}\n\nexport const reauthenticate = async (opts = {}) => {\n  await unauthenticate()\n  return currentUser().authenticate(opts)\n}\nexport const signUp = (opts = {}) => currentUser().authenticate(opts)\nexport const logIn = (opts = {}) => currentUser().authenticate(opts)\n\nexport const authz = currentUser().authorization\n\nimport {config} from \"@onflow/config\"\nimport {\n  coreStrategies,\n  getDefaultConfig,\n  useServiceDiscovery,\n  ConnectModal,\n  ConnectModalProvider,\n} from \"./utils/react-native\"\nimport {getAsyncStorage} from \"./utils/react-native/storage\"\nimport {initFclWcLoader} from \"./walletconnect/loader\"\n\nconfig(getDefaultConfig())\n\n// Set chain id default on access node change\ninitServiceRegistry({coreStrategies})\n\n// Set isReactNative flag\nsetIsReactNative(true)\n\n// Automatically load WalletConnect plugin based on config\ninitFclWcLoader()\n\nexport {\n  useServiceDiscovery,\n  ConnectModal,\n  ConnectModalProvider,\n  getServiceRegistry,\n}\n\n// Subscriptions\nexport {subscribe} from \"@onflow/fcl-core\"\nexport {subscribeRaw} from \"@onflow/fcl-core\"\n\n// WalletConnect\nexport * from \"./walletconnect\"\n\nexport * from \"@onflow/typedefs\"\n\nexport {createFlowClient, type FlowClientConfig} from \"./client\"\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/ConnectModal.js",
    "content": "import {Image} from \"expo-image\"\nimport {createElement, useEffect, useState} from \"react\"\nimport {\n  Modal,\n  Pressable,\n  SafeAreaView,\n  ScrollView,\n  StyleSheet,\n  Text,\n  TouchableOpacity,\n  View,\n} from \"react-native\"\nimport {useServiceDiscovery} from \"./ServiceDiscovery\"\n\nconst DefaultModalWrapper = ({children}) =>\n  createElement(\n    ScrollView,\n    {\n      style: styles.scrollView,\n      contentContainerStyle: styles.scrollViewContent,\n    },\n    ...children\n  )\n\nconst DefaultModalServiceCard = ({service, onPress}) => {\n  const walletIcon = service?.provider?.icon\n  const walletName =\n    service?.provider?.name || service?.name || \"Unknown Wallet\"\n  const walletDescription = service?.provider?.description\n\n  return createElement(\n    TouchableOpacity,\n    {\n      onPress,\n      style: styles.walletCard,\n      activeOpacity: 0.7,\n    },\n    // Wallet icon (if available)\n    walletIcon &&\n      createElement(Image, {\n        source: {uri: walletIcon},\n        style: styles.walletIcon,\n        contentFit: \"contain\",\n      }),\n    // Wallet info\n    createElement(\n      View,\n      {style: styles.walletCardContent},\n      createElement(Text, {style: styles.walletName}, walletName),\n      walletDescription &&\n        createElement(\n          Text,\n          {\n            style: styles.walletDescription,\n            numberOfLines: 1,\n            ellipsizeMode: \"tail\",\n          },\n          walletDescription\n        )\n    ),\n    // Arrow\n    createElement(Text, {style: styles.walletArrow}, \"→\")\n  )\n}\n\n/**\n * ConnectModal component that displays a modal for wallet selection.\n * Wraps the existing ServiceDiscovery component in a React Native Modal.\n *\n * @param {object} props - The component props.\n * @param {object} props.fcl - The fcl instance.\n * @param {boolean} props.visible - Controls modal visibility.\n * @param {Function} props.onClose - Called when modal should close.\n * @param {Function} props.onAuthenticate - Callback when user selects a wallet. Required.\n * @param {Function} [props.Loading] - Optional custom loading component.\n * @param {Function} [props.Empty] - Optional custom empty state component.\n * @param {Function} [props.ServiceCard] - Optional custom wallet card component.\n * @param {Function} [props.Wrapper] - Optional custom wrapper component.\n * @param {string} [props.title] - Modal title text (default: \"Connect Wallet\").\n * @returns {JSX.Element} - The connect modal component.\n */\nexport const ConnectModal = ({\n  fcl,\n  visible,\n  onClose,\n  onAuthenticate,\n  Loading,\n  Empty,\n  ServiceCard = DefaultModalServiceCard,\n  Wrapper = DefaultModalWrapper,\n  title = \"Connect Wallet\",\n}) => {\n  const {services, isLoading} = useServiceDiscovery({fcl})\n\n  // Double-click protection\n  const [isAuthenticating, setIsAuthenticating] = useState(false)\n\n  // Reset authentication state when modal opens\n  useEffect(() => {\n    if (visible) {\n      setIsAuthenticating(false)\n    }\n  }, [visible])\n\n  const handleServiceSelect = service => {\n    // Prevent double-click: ignore if already authenticating\n    if (isAuthenticating) return\n\n    setIsAuthenticating(true)\n    // onAuthenticate handles modal closing internally, don't call onClose()\n    onAuthenticate(service)\n  }\n\n  return createElement(\n    Modal,\n    {\n      visible,\n      transparent: true,\n      animationType: \"fade\",\n      onRequestClose: onClose,\n    },\n    createElement(\n      Pressable,\n      {style: styles.backdrop, onPress: onClose},\n      createElement(\n        Pressable,\n        {style: styles.modalContainer, onPress: e => e.stopPropagation()},\n        createElement(\n          SafeAreaView,\n          {style: styles.safeArea},\n          createElement(\n            View,\n            {style: styles.modalContent},\n            // Header\n            createElement(\n              View,\n              {style: styles.header},\n              createElement(Text, {style: styles.title}, title),\n              createElement(\n                TouchableOpacity,\n                {onPress: onClose, style: styles.closeButton},\n                createElement(Text, {style: styles.closeButtonText}, \"✕\")\n              )\n            ),\n            // Content\n            createElement(\n              Wrapper,\n              null,\n              isLoading &&\n                (Loading\n                  ? createElement(Loading)\n                  : createElement(\n                      View,\n                      {style: styles.loadingContainer},\n                      createElement(\n                        Text,\n                        {style: styles.loadingText},\n                        \"Loading wallets...\"\n                      )\n                    )),\n              !isLoading &&\n                services.length === 0 &&\n                (Empty\n                  ? createElement(Empty)\n                  : createElement(\n                      View,\n                      {style: styles.emptyContainer},\n                      createElement(\n                        Text,\n                        {style: styles.emptyText},\n                        \"No wallets found\"\n                      )\n                    )),\n              !isLoading &&\n                services.map((service, index) => {\n                  return createElement(ServiceCard, {\n                    key: service?.provider?.address ?? service?.uid ?? index,\n                    service,\n                    onPress: () => handleServiceSelect(service),\n                  })\n                })\n            )\n          )\n        )\n      )\n    )\n  )\n}\n\nconst styles = StyleSheet.create({\n  backdrop: {\n    flex: 1,\n    backgroundColor: \"rgba(0, 0, 0, 0.5)\",\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    padding: 16,\n  },\n  modalContainer: {\n    width: \"100%\",\n    maxWidth: 400,\n    maxHeight: \"80%\",\n  },\n  safeArea: {\n    width: \"100%\",\n  },\n  modalContent: {\n    backgroundColor: \"#ffffff\",\n    borderRadius: 20,\n    overflow: \"hidden\",\n    shadowColor: \"#000000\",\n    shadowOffset: {width: 0, height: 4},\n    shadowOpacity: 0.15,\n    shadowRadius: 12,\n    elevation: 8,\n  },\n  header: {\n    flexDirection: \"row\",\n    justifyContent: \"space-between\",\n    alignItems: \"center\",\n    paddingHorizontal: 20,\n    paddingVertical: 16,\n    backgroundColor: \"#ffffff\",\n  },\n  title: {\n    fontSize: 20,\n    fontWeight: \"600\",\n    color: \"#000000\",\n  },\n  closeButton: {\n    paddingHorizontal: 8,\n    paddingVertical: 4,\n  },\n  closeButtonText: {\n    fontSize: 20,\n    color: \"#000000\",\n    lineHeight: 20,\n  },\n  scrollView: {\n    flexGrow: 0,\n    flexShrink: 1,\n  },\n  scrollViewContent: {\n    paddingTop: 8,\n    paddingBottom: 16,\n  },\n  walletCard: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    justifyContent: \"space-between\",\n    backgroundColor: \"#F8F8F8\",\n    paddingHorizontal: 20,\n    paddingVertical: 16,\n    marginHorizontal: 16,\n    marginVertical: 6,\n    borderRadius: 12,\n  },\n  walletIcon: {\n    width: 40,\n    height: 40,\n    borderRadius: 8,\n    marginRight: 12,\n  },\n  walletCardContent: {\n    flex: 1,\n  },\n  walletName: {\n    fontSize: 16,\n    fontWeight: \"600\",\n    color: \"#000000\",\n    marginBottom: 4,\n  },\n  walletDescription: {\n    fontSize: 13,\n    color: \"#666666\",\n  },\n  walletArrow: {\n    fontSize: 20,\n    color: \"#000000\",\n    marginLeft: 12,\n  },\n  loadingContainer: {\n    paddingVertical: 34,\n    alignItems: \"center\",\n  },\n  loadingText: {\n    fontSize: 16,\n    color: \"#666666\",\n  },\n  emptyContainer: {\n    paddingVertical: 28,\n    alignItems: \"center\",\n  },\n  emptyText: {\n    fontSize: 16,\n    color: \"#666666\",\n  },\n})\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/ConnectModalProvider.js",
    "content": "import React, {useState, useEffect} from \"react\"\n\n// Module-level singleton that holds reference to the modal manager\n// This enables imperative API (showModal/hideModal) to work outside React components\nlet modalManager = null\n\nexport function showModal(ModalComponent, props) {\n  if (!modalManager) {\n    return null\n  }\n  return modalManager.show(ModalComponent, props)\n}\n\nexport function hideModal() {\n  if (modalManager) {\n    modalManager.hide()\n  }\n}\n\nexport function ConnectModalProvider({children}) {\n  const [currentModal, setCurrentModal] = useState(null)\n\n  // Show a modal (only one at a time)\n  const show = (ModalComponent, props) => {\n    setCurrentModal({ModalComponent, props})\n    return true\n  }\n\n  // Hide the current modal\n  const hide = () => {\n    setCurrentModal(null)\n  }\n\n  // Set module-level singleton for imperative API\n  modalManager = {show, hide}\n\n  // Cleanup on unmount\n  useEffect(() => {\n    return () => {\n      modalManager = null\n    }\n  }, [])\n\n  return React.createElement(\n    React.Fragment,\n    null,\n    children,\n    currentModal &&\n      React.createElement(currentModal.ModalComponent, {\n        visible: true,\n        ...currentModal.props,\n        onClose: hide,\n      })\n  )\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/ServiceDiscovery.js",
    "content": "import {useState, useEffect} from \"react\"\nimport {getServiceRegistry} from \"@onflow/fcl-core\"\nimport {VERSION} from \"../../VERSION\"\n\n/**\n * Custom hook for service discovery.\n *\n * @param {object} params - The hook parameters.\n * @param {object} params.fcl - The fcl instance.\n * @returns {object} - The service discovery result object.\n * @property {object[]} services - The discovered services.\n * @property {boolean} isLoading - A flag indicating whether the services are being loaded.\n * @property {Function} authenticateService - A function to authenticate a service.\n */\nexport const useServiceDiscovery = ({fcl}) => {\n  const [services, setServices] = useState([])\n  const [isLoading, setIsLoading] = useState(false)\n\n  const getServices = async () => {\n    setIsLoading(true)\n    const endpoint = await fcl.config.get(\"discovery.authn.endpoint\")\n\n    try {\n      const serviceRegistry = getServiceRegistry()\n\n      const requestBody = {\n        fclVersion: VERSION,\n        userAgent: \"ReactNative\",\n        supportedStrategies: [\"WC/RPC\", \"DEEPLINK/RPC\"],\n      }\n\n      // Fetch wallets from Discovery API\n      const response = await fetch(endpoint, {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify(requestBody),\n      })\n\n      if (!response.ok) {\n        throw new Error(`HTTP ${response.status}: ${response.statusText}`)\n      }\n\n      // Get discovery services from response\n      const discoveryServices = await response.json()\n      // Get plugin services to merge with Discovery services\n      const pluginServices = serviceRegistry.getServices()\n\n      // Merge discovery services + plugin services, deduplicate by UID\n      const mergedServices = [...discoveryServices]\n      const discoveryUids = new Set(\n        discoveryServices.map(s => s.uid).filter(Boolean)\n      )\n      // Add plugin services that aren't already in discovery services\n      for (const pluginService of pluginServices) {\n        if (!discoveryUids.has(pluginService.uid)) {\n          mergedServices.push(pluginService)\n        }\n      }\n\n      setServices(mergedServices)\n      setIsLoading(false)\n    } catch (error) {\n      // Fallback: use plugin services only\n      try {\n        const serviceRegistry = getServiceRegistry()\n        const fallbackServices = serviceRegistry.getServices()\n        setServices(fallbackServices)\n      } catch (pluginError) {\n        setServices([])\n      }\n      setIsLoading(false)\n    }\n  }\n\n  useEffect(() => {\n    getServices()\n  }, [])\n\n  /**\n   * Authenticates the provided service using the fcl instance.\n   *\n   * @param {object} service - The service object to authenticate.\n   */\n  const authenticateService = service => {\n    if (services.includes(service)) {\n      fcl.authenticate({service})\n    }\n  }\n\n  return {\n    services,\n    isLoading,\n    authenticateService,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/__tests__/default-config.test.js",
    "content": "import {getDefaultConfig} from \"../default-config\"\n\ndescribe(\"getDefaultConfig tests\", () => {\n  it(\"should return default config\", () => {\n    const defaultConfig = getDefaultConfig()\n    expect(defaultConfig[\"discovery.wallet.method.default\"]).toBe(\n      \"DISCOVERY/RN\"\n    )\n  })\n})\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/constants.js",
    "content": "// Service method identifier for React Native wallet discovery\nexport const DISCOVERY_RN_METHOD = \"DISCOVERY/RN\"\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/coreStrategies.js",
    "content": "import {CORE_STRATEGIES, getExecHttpPost} from \"@onflow/fcl-core\"\nimport {execLocal} from \"./exec-local\"\nimport {execDeeplinkRPC} from \"./strategies/deeplink-rpc\"\nimport {execDiscoveryRN} from \"./strategies/discovery-rn\"\nimport {DISCOVERY_RN_METHOD} from \"./constants\"\n\nexport const coreStrategies = {\n  [CORE_STRATEGIES[\"HTTP/RPC\"]]: getExecHttpPost(execLocal),\n  [CORE_STRATEGIES[\"HTTP/POST\"]]: getExecHttpPost(execLocal),\n  [CORE_STRATEGIES[\"DEEPLINK/RPC\"]]: execDeeplinkRPC,\n  [DISCOVERY_RN_METHOD]: execDiscoveryRN,\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/default-config.js",
    "content": "import {DISCOVERY_RN_METHOD} from \"./constants\"\n\nexport const getDefaultConfig = () => {\n  return {\n    \"discovery.wallet.method.default\": DISCOVERY_RN_METHOD,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/exec-local.js",
    "content": "import {renderBrowser} from \"./render-browser\"\nimport {renderDeeplink} from \"./render-deeplink\"\n\nconst NOT_IMPLEMENTED = strategy => () => {\n  throw new Error(\n    `${strategy} Strategy util has not been implemented on this platform`\n  )\n}\n\nconst VIEWS = {\n  // In React Native, VIEW/IFRAME, VIEW/POP, and VIEW/TAB all open in mobile browser\n  \"VIEW/IFRAME\": renderBrowser,\n  \"VIEW/POP\": renderBrowser,\n  \"VIEW/TAB\": renderBrowser,\n  \"VIEW/MOBILE_BROWSER\": renderBrowser,\n  \"VIEW/DEEPLINK\": renderDeeplink,\n}\n\nexport async function execLocal(\n  service,\n  opts = {serviceEndpoint: () => {}, onClose: () => {}}\n) {\n  const {serviceEndpoint} = opts\n  return VIEWS[service.method](serviceEndpoint(service), opts)\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/index.js",
    "content": "export {useServiceDiscovery} from \"./ServiceDiscovery\"\nexport {ConnectModal} from \"./ConnectModal\"\nexport {getDefaultConfig} from \"./default-config\"\nexport {coreStrategies} from \"./coreStrategies\"\nexport {\n  ConnectModalProvider,\n  showModal,\n  hideModal,\n} from \"./ConnectModalProvider\"\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/render-browser.js",
    "content": "import {FCL_REDIRECT_URL_PARAM_NAME, URL} from \"@onflow/fcl-core\"\nimport * as WebBrowser from \"expo-web-browser\"\nimport * as Linking from \"expo-linking\"\n\n/**\n *\n * @param {URL} src\n * @param {object} opts\n * @returns {[object, () => void]}\n */\nexport async function renderBrowser(src, opts = {}) {\n  const redirectUrl = Linking.createURL(\"$$fcl_auth_callback$$\", {\n    queryParams: {},\n  })\n\n  const url = new URL(src.toString())\n  url.searchParams.append(FCL_REDIRECT_URL_PARAM_NAME, redirectUrl)\n\n  const webbrowser = WebBrowser.openAuthSessionAsync(url.toString())\n\n  const unmount = () => {\n    try {\n      WebBrowser.dismissAuthSession()\n    } catch (error) {\n      // Ignore errors on dismissal\n    }\n  }\n\n  // Call onClose when the webbrowser is closed\n  webbrowser\n    .then(result => {\n      if (opts?.onClose) {\n        opts.onClose()\n      }\n    })\n    .catch(error => {\n      // Ignore errors\n    })\n\n  return [webbrowser, unmount]\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/render-deeplink.js",
    "content": "import {AppState} from \"react-native\"\nimport {URL} from \"@onflow/fcl-core\"\nimport * as Linking from \"expo-linking\"\n\n/**\n * Renders a deeplink view (i.e. deep links to a wallet app)\n *\n * @param {URL} src\n * @param {object} opts\n * @param {() => void} [opts.onClose]\n * @returns {[null, () => void]}\n */\nexport async function renderDeeplink(src, opts = {}) {\n  const url = new URL(src.toString())\n\n  // Custom schemes (i.e mywallet://) are not supported for\n  // security reasons. These schemes can be hijacked by malicious\n  // apps and impersonate the wallet.\n  //\n  // Wallet developers should register a universal link instead.\n  // (i.e https://mywallet.com/ or https://link.mywallet.com/)\n  //\n  // Additionally this allows the wallet to redirect to the app\n  // store/show custom web content if the wallet is not installed.\n  // In production, enforce HTTPS for security\n  const isDev = process.env.NODE_ENV !== \"production\"\n  if (!isDev && url.protocol !== \"https:\") {\n    throw new Error(\n      \"Deeplink must be https scheme.  Custom schemes are not supported, please use a universal link/app link instead.\"\n    )\n  }\n\n  // Link to the target url\n  await Linking.openURL(url.toString())\n\n  const onClose = opts.onClose || (() => {})\n\n  let subscription\n  const onAppStateChange = state => {\n    if (state === \"active\") {\n      unmount()\n      onClose()\n    }\n  }\n\n  // Use new AppState API (React Native 0.65+)\n  subscription = AppState.addEventListener(\"change\", onAppStateChange)\n\n  const unmount = () => {\n    subscription?.remove()\n  }\n\n  return [null, unmount]\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/storage.ts",
    "content": "// Use require() to avoid Rollup/Metro interop issues with peer dependencies\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst AsyncStorage =\n  require(\"@react-native-async-storage/async-storage\").default\n\nconst safeParseJSON = (str?: string | null) => {\n  if (str == null) return null\n  try {\n    return JSON.parse(str)\n  } catch (error) {\n    return null\n  }\n}\n\nexport const getAsyncStorage = () => {\n  try {\n    const ASYNC_STORAGE = {\n      can: true,\n      get: async (key: string) =>\n        safeParseJSON(await AsyncStorage.getItem(key)),\n      put: async (key: string, value: any) =>\n        await AsyncStorage.setItem(key, JSON.stringify(value)),\n      removeItem: async (key: string) => await AsyncStorage.removeItem(key),\n    }\n    return ASYNC_STORAGE\n  } catch (error) {\n    console.warn(\"AsyncStorage not available, using fallback storage\", error)\n    // Return a fallback storage that doesn't persist\n    return {\n      can: false,\n      get: async (key: string) => null,\n      put: async (key: string, value: any) => {},\n      removeItem: async (key: string) => {},\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/strategies/deeplink-rpc.js",
    "content": "import {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {browser} from \"./utils/browser\"\n\nexport function execDeeplinkRPC({service, config, body}) {\n  return new Promise((resolve, reject) => {\n    browser(service, config, body, {\n      onResponse: (e, {close}) => {\n        try {\n          if (typeof e.data !== \"object\") return\n          const resp = normalizePollingResponse(e.data)\n\n          switch (resp.status) {\n            case \"APPROVED\":\n              resolve(resp.data)\n              close()\n              break\n\n            case \"DECLINED\":\n              reject(`Declined: ${resp.reason || \"No reason supplied\"}`)\n              close()\n              break\n\n            case \"REDIRECT\":\n              resolve(resp)\n              close()\n              break\n\n            default:\n              reject(`Declined: No reason supplied`)\n              close()\n              break\n          }\n        } catch (error) {\n          reject(error)\n        }\n      },\n      onClose: () => {\n        reject(`Declined: Externally Halted`)\n      },\n    })\n  })\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/strategies/discovery-rn.js",
    "content": "import {ConnectModal} from \"../ConnectModal\"\nimport {hideModal, showModal} from \"../ConnectModalProvider\"\nimport {config} from \"@onflow/config\"\n\n/**\n * Execution strategy for React Native discovery services.\n *\n * This strategy shows the ConnectModal for wallet discovery,\n * then returns the selected wallet service for FCL to execute.\n *\n * This follows the same pattern as FCL IFRAME/RPC strategy\n * but adapted for React Native native modal UI.\n *\n * Flow:\n * 1. fcl.authenticate() called\n * 2. Discovery service created (type: \"authn\", method: \"DISCOVERY/RN\")\n * 3. execStrategy looks up \"DISCOVERY/RN\" in coreStrategies\n * 4. This function executes → shows ConnectModal with wallet list\n * 5. User selects wallet\n * 6. Returns {status: \"REDIRECT\", data: walletService}\n * 7. FCL core executes the wallet service (WC/RPC or DEEPLINK/RPC)\n *\n * @param {object} params - Strategy execution parameters\n * @param {object} params.service - The discovery service to execute\n * @param {object} params.body - Request body/message data\n * @param {object} params.config - FCL configuration\n * @param {AbortSignal} params.abortSignal - Abort signal for cancellation\n * @returns {Promise<object>} Promise resolving to strategy response\n */\nexport async function execDiscoveryRN({\n  service,\n  body,\n  config: execConfig,\n  abortSignal,\n}) {\n  return new Promise((resolve, reject) => {\n    // Check if already aborted before showing modal (prevents race condition)\n    if (abortSignal?.aborted) {\n      reject(new Error(\"Authentication aborted before modal shown\"))\n      return\n    }\n\n    // Store abort listener reference for cleanup\n    let abortListener = null\n\n    const handleAuthenticate = walletService => {\n      try {\n        hideModal()\n\n        // Clean up abort listener to prevent memory leak\n        if (abortListener && abortSignal) {\n          abortSignal.removeEventListener(\"abort\", abortListener)\n          abortListener = null\n        }\n\n        // Return REDIRECT to tell FCL core to execute the selected wallet service\n        resolve({\n          status: \"REDIRECT\",\n          data: walletService,\n        })\n      } catch (error) {\n        reject(\n          new Error(`Failed to authenticate with wallet: ${error.message}`)\n        )\n      }\n    }\n\n    const handleClose = () => {\n      try {\n        hideModal()\n\n        // Clean up abort listener to prevent memory leak\n        if (abortListener && abortSignal) {\n          abortSignal.removeEventListener(\"abort\", abortListener)\n          abortListener = null\n        }\n\n        reject(new Error(\"User cancelled wallet selection\"))\n      } catch (error) {\n        reject(new Error(`Failed to close modal: ${error.message}`))\n      }\n    }\n\n    // Use the global FCL config to give ConnectModal access to all config values including discovery.authn.endpoint\n    const fclContext = {\n      config: config(),\n    }\n\n    const result = showModal(ConnectModal, {\n      fcl: fclContext,\n      onAuthenticate: handleAuthenticate,\n      onClose: handleClose,\n    })\n\n    if (result === null) {\n      reject(\n        new Error(\n          \"ConnectModalProvider not found. Please wrap your app with <ConnectModalProvider>.\"\n        )\n      )\n      return\n    }\n\n    // Handle abort signal after modal shown\n    if (abortSignal) {\n      abortListener = () => {\n        try {\n          hideModal()\n          reject(new Error(\"Authentication aborted by user\"))\n        } catch (error) {\n          reject(new Error(`Failed to abort authentication: ${error.message}`))\n        }\n      }\n      abortSignal.addEventListener(\"abort\", abortListener)\n    }\n  })\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/strategies/utils/browser.js",
    "content": "import {renderBrowser} from \"../../render-browser\"\nimport {serviceEndpoint} from \"./service-endpoint\"\nimport {FCL_RESPONSE_PARAM_NAME, buildMessageHandler} from \"@onflow/fcl-core\"\nimport * as Linking from \"expo-linking\"\n\nconst noop = () => {}\n\nexport async function browser(service, config, body, opts = {}) {\n  if (service == null) return {send: noop, close: noop}\n\n  const onClose = opts.onClose || noop\n  const onMessage = noop\n  const onReady = noop\n  const onResponse = opts.onResponse || noop\n\n  const handler = buildMessageHandler({\n    close,\n    send: noop,\n    onReady,\n    onResponse,\n    onMessage,\n  })\n  const parseDeeplink = result => {\n    // Handle both deep link callback (with url) and browser result (with type)\n    const url = result?.url\n    if (!url) {\n      if (result?.type === \"dismiss\" || result?.type === \"cancel\") {\n        close()\n      }\n      return\n    }\n\n    const {queryParams} = Linking.parse(url)\n\n    const eventDataRaw = queryParams[FCL_RESPONSE_PARAM_NAME]\n    if (!eventDataRaw) {\n      return\n    }\n\n    try {\n      const eventData = JSON.parse(eventDataRaw)\n\n      handler({data: eventData})\n\n      // Auto-close browser after successful authentication\n      close()\n    } catch (error) {\n      // Ignore parse errors\n    }\n  }\n\n  const [browser, unmount] = await renderBrowser(\n    serviceEndpoint(service, config, body)\n  )\n  // Android deeplink parsing\n  Linking.addEventListener(\"url\", parseDeeplink)\n  // iOS deeplink parsing\n  browser.then(parseDeeplink).catch(() => {\n    // Ignore errors\n  })\n  return {send: noop, close}\n\n  function close() {\n    try {\n      unmount()\n      onClose()\n    } catch (error) {\n      // Ignore close errors\n    }\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/utils/react-native/strategies/utils/service-endpoint.js",
    "content": "import {URL} from \"@onflow/fcl-core\"\n\nconst isBodyEmpty = body => {\n  return (\n    !body ||\n    (body?.data !== undefined &&\n      Object.keys(body).filter(key => key !== \"data\").length === 0)\n  )\n}\n\nexport function serviceEndpoint(service, config, body) {\n  const url = new URL(service.endpoint)\n  if (!isBodyEmpty(body)) {\n    url.searchParams.append(\"fclMessageJson\", JSON.stringify({...body, config}))\n  } else {\n    url.searchParams.append(\"fclMessageJson\", JSON.stringify({config}))\n  }\n\n  if (service.params != null) {\n    for (let [key, value] of Object.entries(service.params || {})) {\n      url.searchParams.append(key, value)\n    }\n  }\n  return url\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/client.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {CoreTypes} from \"@walletconnect/types\"\nimport {SignClient} from \"@walletconnect/sign-client\"\nimport {makeServicePlugin} from \"./service\"\nimport * as Linking from \"expo-linking\"\n\nlet walletConnectInitialized = false\n\nasync function initializeWalletConnect() {\n  if (!walletConnectInitialized) {\n    // Verify crypto polyfill is available\n    if (typeof global.crypto?.getRandomValues !== \"function\") {\n      throw new Error(\n        \"crypto.getRandomValues is not available. Please import 'react-native-get-random-values' at the top of your app entry point (e.g., app/_layout.tsx or index.js) before any other imports.\"\n      )\n    }\n\n    // Import WalletConnect React Native compat\n    // This will show a warning about \"Application module is not available\" which is expected\n    try {\n      // Temporarily suppress console.error to hide the expected warning\n      const originalError = console.error\n      console.error = () => {}\n\n      // Use dynamic require with string variable to prevent bundler from analyzing it\n      // This avoids TypeScript/Rollup errors during build\n      // eslint-disable-next-line @typescript-eslint/no-var-requires\n      const compatModule = \"@walletconnect/react-native-compat\"\n      require(compatModule)\n\n      // Restore console.error\n      console.error = originalError\n    } catch (e) {\n      // Ignore errors - the polyfills we need are still loaded\n    }\n\n    walletConnectInitialized = true\n  }\n}\n\nexport interface FclWalletConnectConfig {\n  projectId: string\n  metadata?: CoreTypes.Metadata\n  wcRequestHook?: any\n  disableNotifications?: boolean\n  wallets?: any[] // Optional array of wallet services to add\n}\n\nconst DEFAULT_RELAY_URL = \"wss://relay.walletconnect.com\"\nconst DEFAULT_LOGGER = \"error\" // Use \"error\" for production, \"debug\" for development\n\nlet clientPromise: Promise<any> = Promise.resolve(null)\n\nconst initClient = async ({\n  projectId,\n  metadata,\n}: {\n  projectId: string\n  metadata?: CoreTypes.Metadata\n}) => {\n  invariant(\n    projectId != null,\n    \"FCL Wallet Connect Error: WalletConnect projectId is required\"\n  )\n\n  try {\n    // Initialize WalletConnect compat first\n    await initializeWalletConnect()\n\n    // Auto-detect redirect URI using expo-linking (always available as dependency)\n    // We use a unique path that apps can intercept\n    // This allows apps to handle the redirect however they want (e.g., stay on current screen)\n    const redirect = Linking.createURL(\"wc-redirect\")\n\n    // Build metadata\n    const clientMetadata = metadata || {\n      name: \"Flow dapp\",\n      description: \"Flow dapp powered by FCL\",\n      url: \"https://flow.com\",\n      icons: [\"https://avatars.githubusercontent.com/u/62387156?v=4\"],\n    }\n\n    // Add auto-detected redirect URI\n    clientMetadata.redirect = {\n      native: redirect,\n      universal: redirect,\n    } as any\n\n    // SignClient will automatically use @walletconnect/keyvaluestorage\n    // which has a React Native version that uses AsyncStorage internally\n    const client = await SignClient.init({\n      logger: DEFAULT_LOGGER,\n      relayUrl: DEFAULT_RELAY_URL,\n      projectId: projectId,\n      metadata: clientMetadata,\n      // NOTE: Don't pass storage parameter, let SignClient use default keyvaluestorage\n      // which will automatically use the React Native version with AsyncStorage\n    })\n    return client\n  } catch (error) {\n    throw error\n  }\n}\n\nexport const initLazy = (config: FclWalletConnectConfig) => {\n  // Lazy load the client\n  //  - Initialize the client if it doesn't exist\n  //  - If it does exist, return existing client\n  //  - If existing client fails to initialize, reinitialize\n\n  clientPromise = clientPromise\n    .catch(() => {\n      return null\n    })\n    .then(_client => {\n      if (_client) {\n        return _client\n      } else {\n        return initClient({\n          projectId: config.projectId,\n          metadata: config.metadata,\n        })\n      }\n    })\n    .catch(e => {\n      throw e\n    })\n\n  const FclWcServicePlugin = makeServicePlugin(clientPromise, config)\n  return {\n    FclWcServicePlugin,\n    clientPromise,\n  }\n}\n\nexport const init = async (config: FclWalletConnectConfig) => {\n  const {FclWcServicePlugin, clientPromise} = initLazy(config)\n  const client = await clientPromise\n\n  return {\n    FclWcServicePlugin,\n    client,\n  }\n}\n\n// Returns the SignClient instance used by this plugin if it has been initialized\nexport async function getClient() {\n  return clientPromise.then(client => {\n    if (!client) {\n      throw new Error(\"WalletConnect client not initialized\")\n    }\n\n    return client\n  })\n}\n\nexport async function disconnectWalletConnect(): Promise<void> {\n  try {\n    const client = await getClient()\n    if (!client) return\n\n    const sessions = client.session.getAll()\n    const pairings = client.core.pairing.pairings.getAll()\n\n    // Disconnect all in parallel\n    await Promise.allSettled([\n      ...sessions.map((session: any) =>\n        client.disconnect({\n          topic: session.topic,\n          reason: {code: 6000, message: \"User disconnected\"},\n        })\n      ),\n      ...pairings.map((pairing: any) =>\n        client.core.pairing.disconnect({topic: pairing.topic})\n      ),\n    ])\n  } catch {\n    // WC client not initialized or disconnect failed (safe to ignore)\n  }\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/constants.ts",
    "content": "export const SERVICE_PLUGIN_NAME = \"fcl-wc-plugin-react-native\"\n\nexport const WC_SERVICE_METHOD = \"WC/RPC\"\n\nexport const FLOW_METHODS = {\n  FLOW_AUTHN: \"flow_authn\",\n  FLOW_AUTHZ: \"flow_authz\",\n  FLOW_PRE_AUTHZ: \"flow_pre_authz\",\n  FLOW_USER_SIGN: \"flow_user_sign\",\n  // Additional methods returned by wallets in PreAuthzResponse\n  FLOW_SIGN_PAYER: \"flow_sign_payer\",\n  FLOW_SIGN_PROPOSER: \"flow_sign_proposer\",\n}\n\nexport const REQUEST_TYPES = {\n  SESSION_REQUEST: \"session_request\",\n  SIGNING_REQUEST: \"signing_request\",\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/index.ts",
    "content": "export {init, initLazy} from \"./client\"\nexport {createSessionProposal, request} from \"./session\"\nexport {\n  FLOW_METHODS,\n  SERVICE_PLUGIN_NAME,\n  WC_SERVICE_METHOD,\n  REQUEST_TYPES,\n} from \"./constants\"\nexport {makeServicePlugin} from \"./service\"\nexport type {FclWalletConnectConfig} from \"./client\"\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/loader.ts",
    "content": "import {config} from \"@onflow/config\"\nimport {pluginRegistry} from \"@onflow/fcl-core\"\nimport {initLazy} from \"./client\"\n\ninterface WalletConnectConfig {\n  walletConnectProjectId?: string\n  walletConnectDisableNotifications?: boolean\n  walletConnectWallets?: any[]\n  appDetailTitle?: string\n  appDetailIcon?: string\n  appDetailDescription?: string\n  appDetailUrl?: string\n}\n\nfunction getMetadata(wcConfig: WalletConnectConfig) {\n  return {\n    name: wcConfig.appDetailTitle || \"FCL App\",\n    description: wcConfig.appDetailDescription || \"An FCL App\",\n    url: wcConfig.appDetailUrl || \"\",\n    icons: wcConfig.appDetailIcon ? [wcConfig.appDetailIcon] : [],\n  }\n}\n\nlet isLoaded = false\n\nfunction loadFclWc(wcConfig: WalletConnectConfig) {\n  const projectId = wcConfig.walletConnectProjectId\n\n  if (!projectId) {\n    return\n  }\n\n  if (isLoaded) {\n    return\n  }\n\n  isLoaded = true\n\n  // Use custom wallets from config (if any)\n  // Flow Wallet is automatically provided by Discovery API\n  const wallets = wcConfig.walletConnectWallets || []\n\n  const {FclWcServicePlugin} = initLazy({\n    projectId,\n    metadata: getMetadata(wcConfig),\n    disableNotifications:\n      wcConfig.walletConnectDisableNotifications ?? undefined,\n    wallets: wallets,\n  })\n\n  pluginRegistry.add([FclWcServicePlugin])\n}\n\nexport function initFclWcLoader() {\n  config.subscribe(async (fullConfig: any) => {\n    const wcConfig: WalletConnectConfig = {\n      walletConnectProjectId: fullConfig[\"walletconnect.projectId\"],\n      walletConnectDisableNotifications:\n        fullConfig[\"walletconnect.disableNotifications\"],\n      walletConnectWallets: fullConfig[\"walletconnect.wallets\"],\n      appDetailTitle: fullConfig[\"app.detail.title\"],\n      appDetailIcon: fullConfig[\"app.detail.icon\"],\n      appDetailDescription: fullConfig[\"app.detail.description\"],\n      appDetailUrl: fullConfig[\"app.detail.url\"],\n    }\n\n    loadFclWc(wcConfig)\n  })\n}\n\nexport {loadFclWc}\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/service.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  FLOW_METHODS,\n  REQUEST_TYPES,\n  SERVICE_PLUGIN_NAME,\n  WC_SERVICE_METHOD,\n} from \"./constants\"\nimport {createSessionProposal, request} from \"./session\"\nimport {FclWalletConnectConfig} from \"./client\"\nimport {SessionTypes} from \"@walletconnect/types\"\nimport {Linking} from \"react-native\"\n\nasync function validateSession(\n  client: any,\n  session: SessionTypes.Struct\n): Promise<boolean> {\n  // Check if session is expired\n  if (session.expiry && session.expiry <= Date.now() / 1000) return false\n  // Check if session is acknowledged\n  if (!session.acknowledged) return false\n\n  // Verify session still exists in client\n  try {\n    const stillExists = client.session.get(session.topic)\n    if (!stillExists) return false\n  } catch {\n    return false\n  }\n\n  // Session passed all local checks\n  return true\n}\n\nasync function disconnectSession(\n  client: any,\n  topic: string,\n  reason: {code: number; message: string}\n): Promise<void> {\n  try {\n    await client.disconnect({topic, reason})\n  } catch {\n    // Session already disconnected or doesn't exist\n  }\n}\n\nasync function findValidSession(\n  client: any,\n  sessionTopic?: string\n): Promise<SessionTypes.Struct | null> {\n  // If a specific session topic is provided, try to use it\n  if (sessionTopic) {\n    try {\n      const session = client.session.get(sessionTopic)\n      if (await validateSession(client, session)) return session\n\n      // Session is invalid, disconnect it\n      await disconnectSession(client, session.topic, {\n        code: 6000,\n        message: \"Session not responsive\",\n      })\n      return null\n    } catch {\n      // Session not found\n      return null\n    }\n  }\n\n  // Otherwise, find the most recent valid session\n  const activeSessions = client.session.getAll()\n  if (activeSessions.length === 0) {\n    return null\n  }\n\n  const mostRecentSession = activeSessions[activeSessions.length - 1]\n  if (await validateSession(client, mostRecentSession)) {\n    return mostRecentSession\n  } else {\n    // Session is invalid, disconnect it\n    await disconnectSession(\n      client,\n      mostRecentSession.topic,\n      mostRecentSession.expiry && mostRecentSession.expiry <= Date.now() / 1000\n        ? {code: 6000, message: \"Session expired\"}\n        : {code: 6000, message: \"Session not responsive\"}\n    )\n    return null\n  }\n}\n\nfunction determineWalletAppLink(\n  method: string,\n  service: any,\n  storedWalletAppLink: string | null\n): string {\n  const uid =\n    method === FLOW_METHODS.FLOW_AUTHN\n      ? service.uid\n      : storedWalletAppLink || service.uid\n\n  // Transform uid format (e.g., \"frw#authz\") to deeplink URL (e.g., \"frw://authz\")\n  // Service UIDs use # as separator but mobile deeplinks need ://\n  if (uid && uid.includes(\"#\") && !uid.includes(\"://\")) {\n    return uid.replace(\"#\", \"://\")\n  }\n\n  return uid\n}\n\nfunction injectSessionIntoPreAuthz(\n  response: any,\n  session: SessionTypes.Struct,\n  service: any\n): any {\n  const injectSessionParams = (svc: any) => {\n    if (!svc) return svc\n\n    // Only modify WalletConnect services\n    if (svc.method === WC_SERVICE_METHOD) {\n      return {\n        ...svc,\n        uid: service.uid,\n        params: {\n          ...svc.params,\n          sessionTopic: session?.topic,\n        },\n      }\n    }\n    // Return non-WC services unchanged\n    return svc\n  }\n\n  return {\n    ...response,\n    proposer: injectSessionParams(response.proposer),\n    payer: response.payer?.map(injectSessionParams),\n    authorization: response.authorization?.map(injectSessionParams),\n  }\n}\n\nexport const makeServicePlugin = (\n  provider: Promise<any>,\n  config: FclWalletConnectConfig = {\n    projectId: \"\",\n    wcRequestHook: null,\n    disableNotifications: false,\n  }\n) => {\n  const services = (config.wallets || []).map((wallet: any) => ({\n    ...wallet,\n    type: \"authn\",\n    method: WC_SERVICE_METHOD,\n    endpoint: FLOW_METHODS.FLOW_AUTHN,\n    f_type: \"Service\",\n    f_vsn: \"1.0.0\",\n  }))\n\n  return {\n    name: SERVICE_PLUGIN_NAME,\n    f_type: \"ServicePlugin\",\n    type: \"discovery-service\",\n    serviceStrategy: {\n      method: WC_SERVICE_METHOD,\n      exec: makeExec(provider, config),\n    },\n    services,\n  }\n}\n\nconst makeExec = (\n  signerPromise: Promise<any>,\n  config: FclWalletConnectConfig\n) => {\n  // Store the wallet's deep link URL from the initial authn request for all subsequent WC/RPC requests (authz, pre-authz, user-sign)\n  let walletAppLink: string | null = null\n\n  return async ({\n    service,\n    body,\n    opts,\n    abortSignal,\n    user,\n    config: fclConfig,\n  }: {\n    service: any\n    body: any\n    opts: any\n    abortSignal?: AbortSignal\n    user: any\n    config: any\n  }) => {\n    const {wcRequestHook} = config\n\n    const client = await signerPromise\n    invariant(!!client, \"WalletConnect is not initialized\")\n\n    const redirect =\n      client.metadata?.redirect?.native || client.metadata?.redirect?.universal\n\n    const method = service.endpoint\n\n    // Determine wallet app link and store it for subsequent requests\n    const appLink = determineWalletAppLink(method, service, walletAppLink)\n    if (method === FLOW_METHODS.FLOW_AUTHN) {\n      walletAppLink = appLink\n    }\n\n    // Find or validate existing session\n    const sessionTopic = service.params?.sessionTopic\n    let session = await findValidSession(client, sessionTopic)\n    let isNewlyCreatedSession = false\n\n    // If this is an authn request and we already have a valid session, return user\n    if (\n      session &&\n      method === FLOW_METHODS.FLOW_AUTHN &&\n      session.topic === sessionTopic\n    ) {\n      return user\n    }\n\n    // Validate network matches between session and current config\n    if (session) {\n      try {\n        const sessionChain = session.namespaces.flow?.chains?.[0] || \"\"\n        const sessionNetwork = sessionChain.split(\":\")[1] || \"\"\n        const currentNetwork = fclConfig.client.network\n\n        if (\n          sessionNetwork &&\n          currentNetwork &&\n          sessionNetwork !== currentNetwork\n        ) {\n          // Network changed so disconnect old session and create new one\n          await disconnectSession(client, session.topic, {\n            code: 6000,\n            message: \"Network changed\",\n          })\n          session = null\n        }\n      } catch {\n        // Failed to validate network but continue anyway\n      }\n    }\n\n    // Create new session if needed\n    if (!session) {\n      session = await new Promise<SessionTypes.Struct>((resolve, reject) => {\n        connectWc({\n          service,\n          onClose: () => reject(`Declined: Externally Halted`),\n          appLink,\n          client,\n          method,\n          wcRequestHook,\n          abortSignal,\n          network: fclConfig.client.network,\n          redirect,\n        }).then(resolve, reject)\n      })\n      isNewlyCreatedSession = true\n    }\n\n    if (wcRequestHook && wcRequestHook instanceof Function) {\n      wcRequestHook({\n        type: REQUEST_TYPES.SIGNING_REQUEST,\n        method,\n        service,\n        session: session ?? null,\n        pairing: null,\n        uri: null,\n      })\n    }\n\n    // Send the request (don't await yet)\n    const requestPromise = request({\n      method,\n      body,\n      session,\n      client,\n      abortSignal,\n      disableNotifications: service.params?.disableNotifications,\n    }).then((response: any) => {\n      // Inject session topic into PreAuthzResponse services\n      if (\n        method === FLOW_METHODS.FLOW_PRE_AUTHZ &&\n        response?.f_type === \"PreAuthzResponse\"\n      ) {\n        return injectSessionIntoPreAuthz(response, session, service)\n      }\n      return response\n    })\n\n    // Deep link to wallet for all requests (mobile requirement)\n    // IMPORTANT: For newly created sessions, the wallet was already opened during connectWc()\n    // for session approval. The wallet remains open and can immediately handle the request,\n    // so we should NOT open it again. This applies to ALL methods (authn, authz, pre_authz, etc.)\n    // to prevent double-opening the wallet during reconnection flows.\n    const shouldOpenWallet = !isNewlyCreatedSession\n\n    if (shouldOpenWallet) {\n      // The WalletConnect client.request() posts to relay synchronously, then waits for response\n      // We open the wallet immediately after the request is sent\n      // The wallet should fetch pending requests for this session when opened via deep link\n\n      // Construct deep link with session topic and redirect URI for proper routing\n      const params = new URLSearchParams({topic: session.topic})\n      if (redirect) params.append(\"redirect\", redirect)\n      const deepLinkUrl = `${appLink}?${params.toString()}`\n      // Open wallet right away as the request is already on the relay\n      // Use setImmediate to avoid blocking the request promise\n      setImmediate(() => {\n        openDeeplink(deepLinkUrl)\n      })\n    }\n\n    // Now wait for the response\n    const finalResponse = await requestPromise\n    return finalResponse\n  }\n}\n\n// Connect to WalletConnect via deep link (React Native mobile-first approach)\nasync function connectWc({\n  service,\n  onClose,\n  appLink,\n  client,\n  method,\n  wcRequestHook,\n  abortSignal,\n  network,\n  redirect,\n}: {\n  service: any\n  onClose: any\n  appLink: string\n  client: any\n  method: string\n  wcRequestHook: any\n  abortSignal?: AbortSignal\n  network: string\n  redirect?: string\n}): Promise<SessionTypes.Struct> {\n  try {\n    const {uri, approval, cleanup} = await createSessionProposal({\n      client,\n      existingPairing: undefined,\n      network,\n    })\n\n    if (wcRequestHook && wcRequestHook instanceof Function) {\n      wcRequestHook({\n        type: REQUEST_TYPES.SESSION_REQUEST,\n        method,\n        service,\n        session: null,\n        pairing: null,\n        uri: uri ?? null,\n      })\n    }\n\n    // For React Native, always use deep linking with redirect parameter\n    const params = new URLSearchParams({uri: uri})\n    if (redirect) params.append(\"redirect\", redirect)\n    const url = appLink + \"?\" + params.toString()\n    openDeeplink(url)\n\n    // Set up abort handling with proper cleanup\n    let abortListener: (() => void) | null = null\n    const abortPromise = new Promise<never>((_, reject) => {\n      if (abortSignal?.aborted) {\n        reject(new Error(\"Session request aborted\"))\n        return\n      }\n\n      abortListener = () => {\n        if (cleanup) cleanup()\n        reject(new Error(\"Session request aborted\"))\n      }\n      abortSignal?.addEventListener(\"abort\", abortListener)\n    })\n\n    try {\n      const session = await Promise.race([approval(), abortPromise])\n      if (session == null) throw new Error(\"Session request failed\")\n\n      return session\n    } finally {\n      // Clean up abort listener after Promise.race resolves\n      if (abortListener && abortSignal) {\n        abortSignal.removeEventListener(\"abort\", abortListener)\n        abortListener = null\n      }\n    }\n  } catch (error) {\n    onClose()\n    throw error\n  }\n}\n\nasync function openDeeplink(url: string) {\n  // Just try opening directly and let the OS handle it\n  await Linking.openURL(url)\n}\n"
  },
  {
    "path": "packages/fcl-react-native/src/walletconnect/session.ts",
    "content": "import * as fclCore from \"@onflow/fcl-core\"\nimport {FLOW_METHODS} from \"./constants\"\nimport {SessionTypes} from \"@walletconnect/types\"\n\n// Create a new session proposal with the WalletConnect client\nexport async function createSessionProposal({\n  client,\n  existingPairing,\n  network,\n}: {\n  client: any\n  existingPairing?: string\n  network?: string\n}) {\n  const _network = network || (await fclCore.getChainId())\n\n  const requiredNamespaces = {\n    flow: {\n      methods: [\n        FLOW_METHODS.FLOW_AUTHN,\n        FLOW_METHODS.FLOW_PRE_AUTHZ,\n        FLOW_METHODS.FLOW_AUTHZ,\n        FLOW_METHODS.FLOW_USER_SIGN,\n      ],\n      chains: [`flow:${_network}`],\n      events: [\"chainChanged\", \"accountsChanged\"],\n    },\n  }\n\n  // Optional wallet-specific methods\n  const optionalNamespaces = {\n    flow: {\n      methods: [FLOW_METHODS.FLOW_SIGN_PAYER, FLOW_METHODS.FLOW_SIGN_PROPOSER],\n      chains: [`flow:${_network}`],\n      events: [\"chainChanged\", \"accountsChanged\"],\n    },\n  }\n\n  let displayUriListener: ((uri: string) => void) | null = null\n\n  // Set up display_uri listener to track the connection URI\n  const onDisplayUri = (_uri: string) => {\n    // URI is available via client.connect() return value, but we need\n    // to register a listener to prevent WalletConnect SDK warnings\n  }\n  displayUriListener = onDisplayUri\n  client.on(\"display_uri\", onDisplayUri)\n\n  try {\n    const {uri: connectionUri, approval} = await client.connect({\n      pairingTopic: existingPairing,\n      requiredNamespaces,\n      optionalNamespaces,\n    })\n\n    return {\n      uri: connectionUri,\n      approval: () => approval(),\n      cleanup: () => {\n        // Clean up display_uri listener (already handled by finally block above)\n        if (displayUriListener) {\n          client.removeListener(\"display_uri\", displayUriListener)\n          displayUriListener = null\n        }\n      },\n    }\n  } finally {\n    // Always remove listener after connect completes (success or error)\n    if (displayUriListener) {\n      client.removeListener(\"display_uri\", displayUriListener)\n      displayUriListener = null\n    }\n  }\n}\n\nexport const request = async ({\n  method,\n  body,\n  session,\n  client,\n  abortSignal,\n  disableNotifications,\n}: {\n  method: any\n  body: any\n  session: SessionTypes.Struct\n  client: any\n  abortSignal?: AbortSignal\n  disableNotifications?: boolean\n}) => {\n  const [chainId, addr, address] = makeSessionData(session)\n  const data = JSON.stringify({...body, addr, address})\n\n  let abortListener: (() => void) | null = null\n  const abortPromise = new Promise((_, reject) => {\n    if (abortSignal?.aborted) {\n      reject(new Error(\"WalletConnect Request aborted\"))\n      return\n    }\n    abortListener = () => {\n      reject(new Error(\"WalletConnect Request aborted\"))\n    }\n    abortSignal?.addEventListener(\"abort\", abortListener)\n  })\n\n  try {\n    const requestPayload = {\n      topic: session.topic,\n      chainId,\n      request: {\n        method,\n        params: [data],\n      },\n    }\n\n    // Note: WalletConnect SDK has built-in 5-minute timeout (wc_sessionRequest.req.ttl)\n    const result: any = await Promise.race([\n      client.request(requestPayload),\n      abortPromise,\n    ])\n\n    if (typeof result !== \"object\" || result == null) {\n      return\n    }\n\n    switch (result.status) {\n      case \"APPROVED\":\n        // Helper function to add session info to WC/RPC services\n        function addSessionInfo(service: any) {\n          if (service.method === \"WC/RPC\") {\n            return {\n              ...service,\n              params: {\n                ...service.params,\n                sessionTopic: session.topic,\n                ...(disableNotifications ? {disableNotifications} : {}),\n              },\n            }\n          }\n          return service\n        }\n\n        // Process authentication response\n        if (method === FLOW_METHODS.FLOW_AUTHN) {\n          const services = (result?.data?.services ?? []).map(addSessionInfo)\n          return {\n            ...(result.data ? result.data : {}),\n            services,\n          }\n        }\n\n        // Process pre-authz response\n        if (method === FLOW_METHODS.FLOW_PRE_AUTHZ) {\n          return {\n            ...result.data,\n            ...(result.data?.proposer\n              ? {proposer: addSessionInfo(result.data.proposer)}\n              : {}),\n            payer: [...(result.data?.payer?.map(addSessionInfo) ?? [])],\n            authorization: [\n              ...(result.data?.authorization?.map(addSessionInfo) ?? []),\n            ],\n          }\n        }\n\n        return result.data\n\n      case \"DECLINED\":\n        throw new Error(`Declined: ${result.reason || \"No reason supplied.\"}`)\n      default:\n        throw new Error(`Invalid Response: ${result.status}`)\n    }\n  } catch (error) {\n    throw error\n  } finally {\n    // Clean up abort listener after Promise.race resolves\n    if (abortListener && abortSignal) {\n      abortSignal.removeEventListener(\"abort\", abortListener)\n      abortListener = null\n    }\n  }\n}\n\nexport function makeSessionData(\n  session: SessionTypes.Struct\n): [string, string, string] {\n  const {namespaces} = session\n  const flowNamespace = namespaces[\"flow\"]\n\n  if (!flowNamespace) {\n    throw new Error(\"Flow namespace not found in session\")\n  }\n\n  const chainId = flowNamespace.chains?.[0] || \"\"\n  const account = flowNamespace.accounts?.[0] || \"\"\n\n  // account format: \"flow:testnet:0xADDRESS\"\n  const address = account.split(\":\")[2] || \"\"\n\n  return [chainId, address, address]\n}\n"
  },
  {
    "path": "packages/fcl-react-native/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/CHANGELOG.md",
    "content": "# @onflow/fcl-wagmi-adapter\n\n## 0.1.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.10\n  - @onflow/fcl-ethereum-provider@0.1.2\n\n## 0.1.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.9\n  - @onflow/fcl-ethereum-provider@0.1.1\n\n## 0.1.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/fcl-ethereum-provider@0.1.0\n  - @onflow/fcl@1.21.8\n\n## 0.0.21\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.7\n  - @onflow/fcl-ethereum-provider@0.0.21\n\n## 0.0.20\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.6\n  - @onflow/fcl-ethereum-provider@0.0.20\n\n## 0.0.19\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.5\n  - @onflow/fcl-ethereum-provider@0.0.19\n\n## 0.0.18\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.4\n  - @onflow/fcl-ethereum-provider@0.0.18\n\n## 0.0.17\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.3\n  - @onflow/fcl-ethereum-provider@0.0.17\n\n## 0.0.16\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.2\n  - @onflow/fcl-ethereum-provider@0.0.16\n\n## 0.0.15\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.21.1\n  - @onflow/fcl-ethereum-provider@0.0.15\n\n## 0.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl@1.21.0\n  - @onflow/fcl-ethereum-provider@0.0.14\n\n## 0.0.13\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.6\n  - @onflow/fcl-ethereum-provider@0.0.13\n\n## 0.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`a5e84666b0482547fe9411064f4821e8067e5238`](https://github.com/onflow/fcl-js/commit/a5e84666b0482547fe9411064f4821e8067e5238)]:\n  - @onflow/fcl@1.20.5\n  - @onflow/fcl-ethereum-provider@0.0.12\n\n## 0.0.11\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.4\n  - @onflow/fcl-ethereum-provider@0.0.11\n\n## 0.0.10\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.3\n  - @onflow/fcl-ethereum-provider@0.0.10\n\n## 0.0.9\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.2\n  - @onflow/fcl-ethereum-provider@0.0.9\n\n## 0.0.8\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/fcl@1.20.1\n  - @onflow/fcl-ethereum-provider@0.0.8\n  - @onflow/rlp@1.2.4\n\n## 0.0.7\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0\n  - @onflow/fcl-ethereum-provider@0.0.7\n\n## 0.0.7-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0-alpha.2\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.2\n\n## 0.0.7-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b)]:\n  - @onflow/fcl@1.20.0-alpha.1\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.1\n\n## 0.0.7-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc)]:\n  - @onflow/fcl@1.20.0-alpha.0\n  - @onflow/fcl-ethereum-provider@0.0.7-alpha.0\n\n## 0.0.6\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl@1.19.0\n  - @onflow/fcl-ethereum-provider@0.0.6\n\n## 0.0.5\n\n### Patch Changes\n\n- Updated dependencies [[`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0\n  - @onflow/fcl-ethereum-provider@0.0.5\n\n## 0.0.5-alpha.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.2\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.2\n\n## 0.0.5-alpha.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.1\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.1\n\n## 0.0.5-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0-alpha.0\n  - @onflow/fcl-ethereum-provider@0.0.5-alpha.0\n\n## 0.0.4\n\n### Patch Changes\n\n- [#2382](https://github.com/onflow/fcl-js/pull/2382) [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b) Thanks [@jribbink](https://github.com/jribbink)! - Remove unused WalletConnect dependencies\n\n- Updated dependencies [[`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b), [`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29)]:\n  - @onflow/fcl-ethereum-provider@0.0.4\n  - @onflow/fcl@1.17.0\n\n## 0.0.3\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.16.1\n  - @onflow/fcl-ethereum-provider@0.0.3\n\n## 0.0.2\n\n### Patch Changes\n\n- Updated dependencies [[`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d)]:\n  - @onflow/fcl@1.16.0\n  - @onflow/fcl-ethereum-provider@0.0.2\n\n## 0.0.1\n\nInitial release of the FCL Wagmi Adapter. This adapter allows you to use FCL wallets within Wagmi in a shared session with FCL-JS.\n\nRead more about this package in [FLIP-316](https://github.com/onflow/flips/pull/317) and the official [Flow Developer Documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/rainbowkit-adapter).\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/README.md",
    "content": "# @onflow/fcl-wagmi-adapter\n\nProvides a Wagmi connector that uses @onflow/fcl-ethereum-provider under the hood, allowing you to integrate Flow-based Cadence-Owned Accounts (COAs) seamlessly into Wagmi applications.\n\n## Installation\n\n```bash\nnpm install --save @onflow/fcl-wagmi-adapter\n```\n\n## Usage\n\nCheck out the [documentation](https://developers.flow.com/tools/clients/fcl-js/cross-vm/wagmi-adapter) for guides and examples on how to integrate and use this adapter in your project.\n\n## License\n\nApache-2.0"
  },
  {
    "path": "packages/fcl-wagmi-adapter/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-wagmi-adapter\",\n  \"version\": \"0.1.2\",\n  \"description\": \"Wagmi adapter for FCL-compatible wallets\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Dapper Labs <dev@dapperlabs.com>\",\n  \"homepage\": \"https://onflow.org\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@ethersproject/bytes\": \"^5.7.0\",\n    \"@ethersproject/hash\": \"^5.7.0\",\n    \"@onflow/fcl-ethereum-provider\": \"0.1.2\",\n    \"@onflow/rlp\": \"^1.2.4\",\n    \"viem\": \"^2.22.21\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl\": \"1.21.10\",\n    \"@wagmi/core\": \"^2.16.3\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/src/fcl-connector.ts",
    "content": "import {\n  ChainNotConfiguredError,\n  type Connector,\n  createConnector,\n} from \"@wagmi/core\"\nimport {\n  type Address,\n  type ProviderConnectInfo,\n  ProviderDisconnectedError,\n  SwitchChainError,\n  getAddress,\n  numberToHex,\n} from \"viem\"\nimport {createProvider} from \"@onflow/fcl-ethereum-provider\"\n\ntype FclWagmiAdapterParams = Parameters<typeof createProvider>[0] & {\n  rdns?: string\n}\n\nexport function fclWagmiAdapter(params: FclWagmiAdapterParams) {\n  type Provider = ReturnType<typeof createProvider>\n  type Properties = {\n    onConnect(connectInfo: ProviderConnectInfo): void\n    onDisplayUri(uri: string): void\n  }\n  let provider: Provider | undefined\n\n  let accountsChanged: Connector[\"onAccountsChanged\"] | undefined\n  let chainChanged: Connector[\"onChainChanged\"] | undefined\n  let connect: Connector[\"onConnect\"] | undefined\n  let disconnect: ((error: Error) => void) | undefined\n\n  // Parse and validate service parameters\n  const id = params.service?.uid || \"fcl\"\n  const name = params.service?.provider?.name || \"Cadence Wallet\"\n\n  return createConnector<Provider, Properties>(config => ({\n    id: id,\n    name: name,\n    type: \"fcl-wagmi-adapter\",\n    rdns: params.rdns,\n    async setup() {\n      const provider = await this.getProvider()\n\n      if (connect) provider.removeListener(\"connect\", connect)\n      connect = this.onConnect.bind(this)\n      provider.on(\"connect\", connect)\n\n      // We shouldn't need to listen for `'accountsChanged'` here since the `'connect'` event should suffice (and wallet shouldn't be connected yet).\n      // Some wallets, like MetaMask, do not implement the `'connect'` event and overload `'accountsChanged'` instead.\n      if (!accountsChanged) {\n        accountsChanged = this.onAccountsChanged.bind(this)\n        provider.on(\"accountsChanged\", accountsChanged)\n      }\n    },\n    async connect({isReconnecting}: any = {}) {\n      const provider = await this.getProvider()\n\n      let accounts: readonly Address[]\n      if (isReconnecting) {\n        accounts = await this.getAccounts()\n      } else {\n        accounts = (\n          (await provider.request({\n            method: \"eth_requestAccounts\",\n          })) as string[]\n        ).map(x => getAddress(x))\n      }\n\n      // Manage EIP-1193 event listeners\n      // https://eips.ethereum.org/EIPS/eip-1193#events\n      if (connect) provider.removeListener(\"connect\", connect)\n      connect = this.onConnect.bind(this)\n      provider.on(\"connect\", connect)\n\n      if (accountsChanged)\n        provider.removeListener(\"accountsChanged\", accountsChanged)\n      accountsChanged = this.onAccountsChanged.bind(this)\n      provider.on(\"accountsChanged\", accountsChanged)\n\n      if (chainChanged) provider.removeListener(\"chainChanged\", chainChanged)\n      chainChanged = this.onChainChanged.bind(this)\n      provider.on(\"chainChanged\", chainChanged)\n\n      if (disconnect) provider.removeListener(\"disconnect\", disconnect)\n      disconnect = (error: Error) => {\n        throw new ProviderDisconnectedError(error)\n      }\n      provider.on(\"disconnect\", disconnect)\n\n      return {accounts, chainId: await this.getChainId()}\n    },\n    async disconnect() {\n      const provider = await this.getProvider()\n\n      // Manage EIP-1193 event listeners\n      if (chainChanged) provider.removeListener(\"chainChanged\", chainChanged)\n      chainChanged = undefined\n\n      if (disconnect) provider.removeListener(\"disconnect\", disconnect)\n      disconnect = undefined\n\n      if (connect) provider.removeListener(\"connect\", connect)\n      connect = this.onConnect.bind(this)\n      provider.on(\"connect\", connect)\n\n      await provider.disconnect()\n    },\n    async getAccounts() {\n      const provider = await this.getProvider()\n      const accounts = (await provider.request({\n        method: \"eth_accounts\",\n      })) as string[]\n      return accounts.map(x => getAddress(x))\n    },\n    async getChainId() {\n      const provider = await this.getProvider()\n      const chainId = await provider.request({method: \"eth_chainId\"})\n      return Number(chainId)\n    },\n    async getProvider() {\n      return provider ?? (provider = createProvider(params))\n    },\n    async isAuthorized() {\n      // TODO: There may be an issue here if a user without a COA refreshes the page\n      // We should instead be checking whether FCL itself is authorized\n      const accounts = await this.getAccounts()\n      return accounts.length > 0\n    },\n    async switchChain({addEthereumChainParameter, chainId}: any) {\n      const provider = await this.getProvider()\n\n      const chain = config.chains.find(x => x.id === chainId)\n      if (!chain) throw new SwitchChainError(new ChainNotConfiguredError())\n\n      try {\n        await provider.request({\n          method: \"wallet_switchEthereumChain\",\n          params: [{chainId: numberToHex(chainId)}],\n        })\n\n        return chain\n      } catch (err) {\n        // TODO: Error handling\n        throw new SwitchChainError(err as Error)\n      }\n    },\n    onAccountsChanged(accounts) {\n      if (accounts.length === 0) this.onDisconnect()\n      else\n        config.emitter.emit(\"change\", {\n          accounts: accounts.map((x: any) => getAddress(x)),\n        })\n    },\n    onChainChanged(chain) {\n      const chainId = Number(chain)\n      config.emitter.emit(\"change\", {chainId})\n    },\n    async onConnect(connectInfo) {\n      const accounts = await this.getAccounts()\n\n      // TODO: What to do if accounts is empty? not sure this is accurate\n      if (accounts.length === 0) return\n\n      const chainId = Number(connectInfo.chainId)\n      config.emitter.emit(\"connect\", {accounts, chainId})\n\n      const provider = await this.getProvider()\n\n      if (connect) provider.removeListener(\"connect\", connect)\n      connect = undefined\n\n      if (accountsChanged)\n        provider.removeListener(\"accountsChanged\", accountsChanged)\n      accountsChanged = this.onAccountsChanged.bind(this)\n      provider.on(\"accountsChanged\", accountsChanged)\n\n      if (chainChanged) provider.removeListener(\"chainChanged\", chainChanged)\n      chainChanged = this.onChainChanged.bind(this)\n      provider.on(\"chainChanged\", chainChanged)\n\n      if (disconnect) provider.removeListener(\"disconnect\", disconnect)\n      disconnect = (error: Error) => {\n        throw new ProviderDisconnectedError(error)\n      }\n      provider.on(\"disconnect\", disconnect)\n    },\n    // TODO: waht to do with error?\n    async onDisconnect(error) {\n      const provider = await this.getProvider()\n\n      config.emitter.emit(\"disconnect\")\n\n      // Manage EIP-1193 event listeners\n      if (chainChanged) {\n        provider.removeListener(\"chainChanged\", chainChanged)\n        chainChanged = undefined\n      }\n      if (disconnect) {\n        provider.removeListener(\"disconnect\", disconnect)\n        disconnect = undefined\n      }\n      if (!connect) {\n        connect = this.onConnect.bind(this)\n        provider.on(\"connect\", connect)\n      }\n    },\n    onDisplayUri(uri: string) {\n      config.emitter.emit(\"message\", {type: \"display_uri\", data: uri})\n    },\n  }))\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/src/fcl-wagmi-adapter.test.ts",
    "content": "describe(\"fcl wagmi adapter\", () => {\n  it(\"should be tested\", () => {\n    expect(true).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/src/index.ts",
    "content": "export * from \"./wc-connector\"\nexport * from \"./fcl-connector\"\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/src/wc-connector.ts",
    "content": "/**\n * This file is a modified version of the original WalletConnect connector from wagmi.\n * The purpose is to substitute the original WalletConnect EthereumProvider with an extended\n * version that is able to be used in a cross-VM context (authenticating multiple VMs).\n *\n * See: https://github.com/wevm/wagmi/blob/2ca5742840f0c3be99cd61095650400aee514913/packages/connectors/src/walletConnect.ts\n */\n\n/*!\n * MIT License\n *\n * Copyright (c) 2022-present weth, LLC\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport {\n  ChainNotConfiguredError,\n  type Connector,\n  ProviderNotFoundError,\n  createConnector,\n  extractRpcUrls,\n} from \"@wagmi/core\"\nimport type {Compute, ExactPartial, Omit} from \"@wagmi/core/internal\"\nimport {WalletConnectEthereumProvider as EthereumProvider} from \"@onflow/fcl-ethereum-provider\"\nimport {\n  type AddEthereumChainParameter,\n  type Address,\n  type ProviderConnectInfo,\n  type ProviderRpcError,\n  type RpcError,\n  SwitchChainError,\n  UserRejectedRequestError,\n  getAddress,\n  numberToHex,\n} from \"viem\"\n\ntype WalletConnectConnector = Connector & {\n  onDisplayUri(uri: string): void\n  onSessionDelete(data: {topic: string}): void\n}\n\ntype EthereumProviderOptions = Parameters<(typeof EthereumProvider)[\"init\"]>[0]\n\nexport type WalletConnectParameters = Compute<\n  {\n    /**\n     * If a new chain is added to a previously existing configured connector `chains`, this flag\n     * will determine if that chain should be considered as stale. A stale chain is a chain that\n     * WalletConnect has yet to establish a relationship with (e.g. the user has not approved or\n     * rejected the chain).\n     *\n     * This flag mainly affects the behavior when a wallet does not support dynamic chain authorization\n     * with WalletConnect v2.\n     *\n     * If `true` (default), the new chain will be treated as a stale chain. If the user\n     * has yet to establish a relationship (approved/rejected) with this chain in their WalletConnect\n     * session, the connector will disconnect upon the dapp auto-connecting, and the user will have to\n     * reconnect to the dapp (revalidate the chain) in order to approve the newly added chain.\n     * This is the default behavior to avoid an unexpected error upon switching chains which may\n     * be a confusing user experience (e.g. the user will not know they have to reconnect\n     * unless the dapp handles these types of errors).\n     *\n     * If `false`, the new chain will be treated as a potentially valid chain. This means that if the user\n     * has yet to establish a relationship with the chain in their WalletConnect session, wagmi will successfully\n     * auto-connect the user. This comes with the trade-off that the connector will throw an error\n     * when attempting to switch to the unapproved chain if the wallet does not support dynamic session updates.\n     * This may be useful in cases where a dapp constantly\n     * modifies their configured chains, and they do not want to disconnect the user upon\n     * auto-connecting. If the user decides to switch to the unapproved chain, it is important that the\n     * dapp handles this error and prompts the user to reconnect to the dapp in order to approve\n     * the newly added chain.\n     *\n     * @default true\n     */\n    isNewChainsStale?: boolean\n  } & Omit<\n    EthereumProviderOptions,\n    | \"chains\"\n    | \"events\"\n    | \"optionalChains\"\n    | \"optionalEvents\"\n    | \"optionalMethods\"\n    | \"methods\"\n    | \"rpcMap\"\n    | \"showQrModal\"\n  > &\n    ExactPartial<Pick<EthereumProviderOptions, \"showQrModal\">>\n>\n\nwalletConnect.type = \"walletConnect\" as const\nexport function walletConnect(parameters: WalletConnectParameters) {\n  const isNewChainsStale = parameters.isNewChainsStale ?? true\n\n  type Provider = Awaited<ReturnType<(typeof EthereumProvider)[\"init\"]>>\n  type Properties = {\n    connect(parameters?: {\n      chainId?: number | undefined\n      isReconnecting?: boolean | undefined\n      pairingTopic?: string | undefined\n    }): Promise<{\n      accounts: readonly Address[]\n      chainId: number\n    }>\n    getNamespaceChainsIds(): number[]\n    getRequestedChainsIds(): Promise<number[]>\n    isChainsStale(): Promise<boolean>\n    onConnect(connectInfo: ProviderConnectInfo): void\n    onDisplayUri(uri: string): void\n    onSessionDelete(data: {topic: string}): void\n    setRequestedChainsIds(chains: number[]): void\n    requestedChainsStorageKey: `${string}.requestedChains`\n  }\n  type StorageItem = {\n    [_ in Properties[\"requestedChainsStorageKey\"]]: number[]\n  }\n\n  let provider_: Provider | undefined\n  let providerPromise: Promise<typeof provider_>\n  const NAMESPACE = \"eip155\"\n\n  let accountsChanged: WalletConnectConnector[\"onAccountsChanged\"] | undefined\n  let chainChanged: WalletConnectConnector[\"onChainChanged\"] | undefined\n  let connect: WalletConnectConnector[\"onConnect\"] | undefined\n  let displayUri: WalletConnectConnector[\"onDisplayUri\"] | undefined\n  let sessionDelete: WalletConnectConnector[\"onSessionDelete\"] | undefined\n  let disconnect: WalletConnectConnector[\"onDisconnect\"] | undefined\n\n  return createConnector<Provider, Properties, StorageItem>(config => ({\n    id: \"walletConnect\",\n    name: \"WalletConnect\",\n    type: walletConnect.type,\n    async setup() {\n      const provider = await this.getProvider().catch(() => null)\n      if (!provider) return\n      if (!connect) {\n        connect = this.onConnect.bind(this)\n        provider.on(\"connect\", connect)\n      }\n      if (!sessionDelete) {\n        sessionDelete = this.onSessionDelete.bind(this)\n        provider.on(\"session_delete\", sessionDelete)\n      }\n    },\n    async connect({chainId, ...rest} = {}) {\n      try {\n        const provider = await this.getProvider()\n        if (!provider) throw new ProviderNotFoundError()\n        if (!displayUri) {\n          displayUri = this.onDisplayUri\n          provider.on(\"display_uri\", displayUri)\n        }\n\n        let targetChainId = chainId\n        if (!targetChainId) {\n          const state = (await config.storage?.getItem(\"state\")) ?? {}\n          const isChainSupported = config.chains.some(\n            x => x.id === state.chainId\n          )\n          if (isChainSupported) targetChainId = state.chainId\n          else targetChainId = config.chains[0]?.id\n        }\n        if (!targetChainId) throw new Error(\"No chains found on connector.\")\n\n        const isChainsStale = await this.isChainsStale()\n        // If there is an active session with stale chains, disconnect current session.\n        if (provider.session && isChainsStale) await provider.disconnect()\n\n        // If there isn't an active session or chains are stale, connect.\n        if (!provider.session || isChainsStale) {\n          const optionalChains = config.chains\n            .filter(chain => chain.id !== targetChainId)\n            .map(optionalChain => optionalChain.id)\n          await provider.connect({\n            optionalChains: [targetChainId, ...optionalChains],\n            ...(\"pairingTopic\" in rest\n              ? {pairingTopic: rest.pairingTopic}\n              : {}),\n          })\n\n          this.setRequestedChainsIds(config.chains.map(x => x.id))\n        }\n\n        // If session exists and chains are authorized, enable provider for required chain\n        const accounts = (await provider.enable()).map(x => getAddress(x))\n        const currentChainId = await this.getChainId()\n\n        if (displayUri) {\n          provider.removeListener(\"display_uri\", displayUri)\n          displayUri = undefined\n        }\n        if (connect) {\n          provider.removeListener(\"connect\", connect)\n          connect = undefined\n        }\n        if (!accountsChanged) {\n          accountsChanged = this.onAccountsChanged.bind(this)\n          provider.on(\"accountsChanged\", accountsChanged)\n        }\n        if (!chainChanged) {\n          chainChanged = this.onChainChanged.bind(this)\n          provider.on(\"chainChanged\", chainChanged)\n        }\n        if (!disconnect) {\n          disconnect = this.onDisconnect.bind(this)\n          provider.on(\"disconnect\", disconnect)\n        }\n        if (!sessionDelete) {\n          sessionDelete = this.onSessionDelete.bind(this)\n          provider.on(\"session_delete\", sessionDelete)\n        }\n\n        return {accounts, chainId: currentChainId}\n      } catch (error) {\n        if (\n          /(user rejected|connection request reset)/i.test(\n            (error as ProviderRpcError)?.message\n          )\n        ) {\n          throw new UserRejectedRequestError(error as Error)\n        }\n        throw error\n      }\n    },\n    async disconnect() {\n      const provider = await this.getProvider()\n      try {\n        await provider?.disconnect()\n      } catch (error) {\n        if (!/No matching key/i.test((error as Error).message)) throw error\n      } finally {\n        if (chainChanged) {\n          provider?.removeListener(\"chainChanged\", chainChanged)\n          chainChanged = undefined\n        }\n        if (disconnect) {\n          provider?.removeListener(\"disconnect\", disconnect)\n          disconnect = undefined\n        }\n        if (!connect) {\n          connect = this.onConnect.bind(this)\n          provider?.on(\"connect\", connect)\n        }\n        if (accountsChanged) {\n          provider?.removeListener(\"accountsChanged\", accountsChanged)\n          accountsChanged = undefined\n        }\n        if (sessionDelete) {\n          provider?.removeListener(\"session_delete\", sessionDelete)\n          sessionDelete = undefined\n        }\n\n        this.setRequestedChainsIds([])\n      }\n    },\n    async getAccounts() {\n      const provider = await this.getProvider()\n      return provider.accounts.map(x => getAddress(x))\n    },\n    async getProvider({chainId} = {}) {\n      async function initProvider() {\n        const optionalChains = config.chains.map(x => x.id) as [number]\n        if (!optionalChains.length) return\n        return await EthereumProvider.init({\n          ...parameters,\n          disableProviderPing: true,\n          optionalChains,\n          projectId: parameters.projectId,\n          rpcMap: Object.fromEntries(\n            config.chains.map(chain => {\n              const [url] = extractRpcUrls({\n                chain,\n                transports: config.transports,\n              })\n              return [chain.id, url]\n            })\n          ),\n          showQrModal: parameters.showQrModal ?? true,\n          customStoragePrefix: \"cross-vm-walletconnect\",\n        })\n      }\n\n      if (!provider_) {\n        if (!providerPromise) providerPromise = initProvider() as any\n        provider_ = await providerPromise\n        provider_?.events.setMaxListeners(Number.POSITIVE_INFINITY)\n      }\n      if (chainId) await this.switchChain?.({chainId})\n      return provider_!\n    },\n    async getChainId() {\n      const provider = await this.getProvider()\n      return provider.chainId\n    },\n    async isAuthorized() {\n      try {\n        const [accounts, provider] = await Promise.all([\n          this.getAccounts(),\n          this.getProvider(),\n        ])\n\n        // If an account does not exist on the session, then the connector is unauthorized.\n        if (!accounts.length) return false\n\n        // If the chains are stale on the session, then the connector is unauthorized.\n        const isChainsStale = await this.isChainsStale()\n        if (isChainsStale && provider.session) {\n          await provider.disconnect().catch(() => {})\n          return false\n        }\n        return true\n      } catch {\n        return false\n      }\n    },\n    async switchChain({addEthereumChainParameter, chainId}) {\n      const provider = await this.getProvider()\n      if (!provider) throw new ProviderNotFoundError()\n\n      const chain = config.chains.find(x => x.id === chainId)\n      if (!chain) throw new SwitchChainError(new ChainNotConfiguredError())\n\n      try {\n        await Promise.all([\n          new Promise<void>(resolve => {\n            const listener = ({\n              chainId: currentChainId,\n            }: {\n              chainId?: number | undefined\n            }) => {\n              if (currentChainId === chainId) {\n                config.emitter.off(\"change\", listener)\n                resolve()\n              }\n            }\n            config.emitter.on(\"change\", listener)\n          }),\n          provider.request({\n            method: \"wallet_switchEthereumChain\",\n            params: [{chainId: numberToHex(chainId)}],\n          }),\n        ])\n\n        const requestedChains = await this.getRequestedChainsIds()\n        this.setRequestedChainsIds([...requestedChains, chainId])\n\n        return chain\n      } catch (err) {\n        const error = err as RpcError\n\n        if (/(user rejected)/i.test(error.message))\n          throw new UserRejectedRequestError(error)\n\n        // Indicates chain is not added to provider\n        try {\n          let blockExplorerUrls: string[] | undefined\n          if (addEthereumChainParameter?.blockExplorerUrls)\n            blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls\n          else\n            blockExplorerUrls = chain.blockExplorers?.default.url\n              ? [chain.blockExplorers?.default.url]\n              : []\n\n          let rpcUrls: readonly string[]\n          if (addEthereumChainParameter?.rpcUrls?.length)\n            rpcUrls = addEthereumChainParameter.rpcUrls\n          else rpcUrls = [...chain.rpcUrls.default.http]\n\n          const addEthereumChain = {\n            blockExplorerUrls,\n            chainId: numberToHex(chainId),\n            chainName: addEthereumChainParameter?.chainName ?? chain.name,\n            iconUrls: addEthereumChainParameter?.iconUrls,\n            nativeCurrency:\n              addEthereumChainParameter?.nativeCurrency ?? chain.nativeCurrency,\n            rpcUrls,\n          } satisfies AddEthereumChainParameter\n\n          await provider.request({\n            method: \"wallet_addEthereumChain\",\n            params: [addEthereumChain],\n          })\n\n          const requestedChains = await this.getRequestedChainsIds()\n          this.setRequestedChainsIds([...requestedChains, chainId])\n          return chain\n        } catch (error) {\n          throw new UserRejectedRequestError(error as Error)\n        }\n      }\n    },\n    onAccountsChanged(accounts) {\n      if (accounts.length === 0) this.onDisconnect()\n      else\n        config.emitter.emit(\"change\", {\n          accounts: accounts.map(x => getAddress(x)),\n        })\n    },\n    onChainChanged(chain) {\n      const chainId = Number(chain)\n      config.emitter.emit(\"change\", {chainId})\n    },\n    async onConnect(connectInfo) {\n      const chainId = Number(connectInfo.chainId)\n      const accounts = await this.getAccounts()\n      config.emitter.emit(\"connect\", {accounts, chainId})\n    },\n    async onDisconnect(_error) {\n      this.setRequestedChainsIds([])\n      config.emitter.emit(\"disconnect\")\n\n      const provider = await this.getProvider()\n      if (accountsChanged) {\n        provider.removeListener(\"accountsChanged\", accountsChanged)\n        accountsChanged = undefined\n      }\n      if (chainChanged) {\n        provider.removeListener(\"chainChanged\", chainChanged)\n        chainChanged = undefined\n      }\n      if (disconnect) {\n        provider.removeListener(\"disconnect\", disconnect)\n        disconnect = undefined\n      }\n      if (sessionDelete) {\n        provider.removeListener(\"session_delete\", sessionDelete)\n        sessionDelete = undefined\n      }\n      if (!connect) {\n        connect = this.onConnect.bind(this)\n        provider.on(\"connect\", connect)\n      }\n    },\n    onDisplayUri(uri) {\n      config.emitter.emit(\"message\", {type: \"display_uri\", data: uri})\n    },\n    onSessionDelete() {\n      this.onDisconnect()\n    },\n    getNamespaceChainsIds() {\n      if (!provider_) return []\n      const chainIds = provider_.session?.namespaces[NAMESPACE]?.accounts?.map(\n        account => Number.parseInt(account.split(\":\")[1] || \"\")\n      )\n      return chainIds ?? []\n    },\n    async getRequestedChainsIds() {\n      return (\n        (await config.storage?.getItem(this.requestedChainsStorageKey)) ?? []\n      )\n    },\n    /**\n     * Checks if the target chains match the chains that were\n     * initially requested by the connector for the WalletConnect session.\n     * If there is a mismatch, this means that the chains on the connector\n     * are considered stale, and need to be revalidated at a later point (via\n     * connection).\n     *\n     * There may be a scenario where a dapp adds a chain to the\n     * connector later on, however, this chain will not have been approved or rejected\n     * by the wallet. In this case, the chain is considered stale.\n     */\n    async isChainsStale() {\n      if (!isNewChainsStale) return false\n\n      const connectorChains = config.chains.map(x => x.id)\n      const namespaceChains = this.getNamespaceChainsIds()\n      if (\n        namespaceChains.length &&\n        !namespaceChains.some(id => connectorChains.includes(id))\n      )\n        return false\n\n      const requestedChains = await this.getRequestedChainsIds()\n      return !connectorChains.every(id => requestedChains.includes(id))\n    },\n    async setRequestedChainsIds(chains) {\n      await config.storage?.setItem(this.requestedChainsStorageKey, chains)\n    },\n    get requestedChainsStorageKey() {\n      return `${this.id}.requestedChains` as Properties[\"requestedChainsStorageKey\"]\n    },\n  }))\n}\n"
  },
  {
    "path": "packages/fcl-wagmi-adapter/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wc/.babelrc",
    "content": "{\n  \"presets\": [\n    [\"@babel/preset-env\"],\n    [\n      \"@babel/preset-typescript\",\n      {\n        \"allowDeclareFields\": true\n      }\n    ]\n  ],\n  \"plugins\": [\n    [\n      \"@babel/plugin-transform-react-jsx\",\n      {\n        \"importSource\": \"preact\",\n        \"runtime\": \"automatic\"\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": "packages/fcl-wc/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/fcl-wc/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"globals\": {\n    \"JSX\": \"readonly\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/tag-lines\": 0,\n    \"jsdoc/require-param-description\": 0,\n    \"jsdoc/valid-types\": 0,\n    \"jsdoc/require-returns-description\": 0,\n    \"no-undef\": 1\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wc/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/fcl-wc/CHANGELOG.md",
    "content": "# @onflow/fcl-wc\n\n## 6.0.22\n\n### Patch Changes\n\n- Updated dependencies [[`b438549005eba70ab18089abe117ed6816cc1b7f`](https://github.com/onflow/fcl-js/commit/b438549005eba70ab18089abe117ed6816cc1b7f)]:\n  - @onflow/fcl-core@1.30.2\n\n## 6.0.21\n\n### Patch Changes\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/config@1.11.1\n  - @onflow/fcl-core@1.30.1\n\n## 6.0.20\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/config@1.11.0\n  - @onflow/fcl-core@1.30.0\n\n## 6.0.19\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/config@1.10.0\n  - @onflow/fcl-core@1.29.0\n\n## 6.0.18\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/config@1.9.0\n  - @onflow/fcl-core@1.28.0\n\n## 6.0.17\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/config@1.8.0\n  - @onflow/fcl-core@1.27.0\n\n## 6.0.16\n\n### Patch Changes\n\n- Updated dependencies [[`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6)]:\n  - @onflow/fcl-core@1.26.0\n\n## 6.0.15\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/config@1.7.0\n  - @onflow/fcl-core@1.25.0\n\n## 6.0.14\n\n### Patch Changes\n\n- Updated dependencies [[`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd)]:\n  - @onflow/fcl-core@1.24.0\n\n## 6.0.13\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.23.1\n\n## 6.0.12\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl-core@1.23.0\n\n## 6.0.11\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.22.3\n\n## 6.0.10\n\n### Patch Changes\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e)]:\n  - @onflow/fcl-core@1.22.2\n  - @onflow/config@1.6.3\n\n## 6.0.9\n\n### Patch Changes\n\n- Updated dependencies [[`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557)]:\n  - @onflow/config@1.6.2\n  - @onflow/fcl-core@1.22.1\n\n## 6.0.8\n\n### Patch Changes\n\n- Updated dependencies [[`81d21f98ab2838885ad32217de42b85481f5595c`](https://github.com/onflow/fcl-js/commit/81d21f98ab2838885ad32217de42b85481f5595c), [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960)]:\n  - @onflow/fcl-core@1.22.0\n\n## 6.0.7\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.21.2\n\n## 6.0.6\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/config@1.6.1\n  - @onflow/fcl-core@1.21.1\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n\n## 6.0.5\n\n### Minor Changes\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Add support for manually passing a `network` to `createSessionProposal`\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76), [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350)]:\n  - @onflow/fcl-core@1.21.0\n  - @onflow/config@1.6.0\n\n## 6.0.5-alpha.2\n\n### Minor Changes\n\n- [#2614](https://github.com/onflow/fcl-js/pull/2614) [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff) Thanks [@jribbink](https://github.com/jribbink)! - Add support for manually passing a `network` to `createSessionProposal`\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl-core@1.21.0-alpha.2\n\n## 6.0.5-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8), [`5fb8498a5578cf21096560e316f33e92a5660350`](https://github.com/onflow/fcl-js/commit/5fb8498a5578cf21096560e316f33e92a5660350)]:\n  - @onflow/config@1.6.0-alpha.0\n  - @onflow/fcl-core@1.21.0-alpha.1\n\n## 6.0.5-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76)]:\n  - @onflow/fcl-core@1.21.0-alpha.0\n\n## 6.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl-core@1.20.0\n\n## 6.0.3\n\n### Patch Changes\n\n- Updated dependencies [[`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12)]:\n  - @onflow/fcl-core@1.19.0\n\n## 6.0.3-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`2637889fdb47a2294ad2db9d06a16fac1d805a12`](https://github.com/onflow/fcl-js/commit/2637889fdb47a2294ad2db9d06a16fac1d805a12)]:\n  - @onflow/fcl-core@1.19.0-alpha.2\n\n## 6.0.3-alpha.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.19.0-alpha.1\n\n## 6.0.3-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl-core@1.19.0-alpha.0\n\n## 6.0.2\n\n### Patch Changes\n\n- [#2382](https://github.com/onflow/fcl-js/pull/2382) [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b) Thanks [@jribbink](https://github.com/jribbink)! - Remove unused WalletConnect dependencies\n\n- [#2382](https://github.com/onflow/fcl-js/pull/2382) [`0feeae00d1ef089df36b381109802bb0b14bf89b`](https://github.com/onflow/fcl-js/commit/0feeae00d1ef089df36b381109802bb0b14bf89b) Thanks [@jribbink](https://github.com/jribbink)! - Update WalletConnect packages\n\n- Updated dependencies [[`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29), [`094ed6dd38cae9ae39183f5ead8d59f9276f8f5d`](https://github.com/onflow/fcl-js/commit/094ed6dd38cae9ae39183f5ead8d59f9276f8f5d)]:\n  - @onflow/fcl-core@1.18.0\n\n## 6.0.1\n\n### Patch Changes\n\n- [#2356](https://github.com/onflow/fcl-js/pull/2356) [`f4d8bc53c9902f74c1751206ddbece497017683d`](https://github.com/onflow/fcl-js/commit/f4d8bc53c9902f74c1751206ddbece497017683d) Thanks [@jribbink](https://github.com/jribbink)! - Fix npm publish bug for v6.0.0\n\n## 6.0.0\n\n### Major Changes\n\n- [#2076](https://github.com/onflow/fcl-js/pull/2076) [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b) Thanks [@jribbink](https://github.com/jribbink)! - Switch from @walletconnect/sign-client to @walletconnect/universal-provider\n\n### Minor Changes\n\n- [#2076](https://github.com/onflow/fcl-js/pull/2076) [`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b) Thanks [@jribbink](https://github.com/jribbink)! - Add `disableNotifications` param for FCL-WC service\n\n### Patch Changes\n\n- [#2228](https://github.com/onflow/fcl-js/pull/2228) [`837fdf7f019c3f154ff007c50959b90b9b603297`](https://github.com/onflow/fcl-js/commit/837fdf7f019c3f154ff007c50959b90b9b603297) Thanks [@jribbink](https://github.com/jribbink)! - Update react\n\n- Updated dependencies [[`ade292589a0355891f8d684103849c52305b2a8b`](https://github.com/onflow/fcl-js/commit/ade292589a0355891f8d684103849c52305b2a8b), [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d), [`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01)]:\n  - @onflow/fcl-core@1.17.0\n  - @onflow/config@1.5.2\n\n## 5.6.4\n\n### Patch Changes\n\n- Updated dependencies [[`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714)]:\n  - @onflow/fcl-core@1.16.0\n\n## 5.6.3\n\n### Patch Changes\n\n- Updated dependencies [[`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac)]:\n  - @onflow/fcl-core@1.15.1\n\n## 5.6.2\n\n### Patch Changes\n\n- Updated dependencies [[`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8), [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8)]:\n  - @onflow/fcl-core@1.15.0\n\n## 5.6.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.14.1\n\n## 5.6.0\n\n### Patch Changes\n\n- Updated dependencies [[`68cf725a4d618cc963f31a758998ad14a7a43716`](https://github.com/onflow/fcl-js/commit/68cf725a4d618cc963f31a758998ad14a7a43716)]:\n  - @onflow/fcl-core@1.14.0\n\n## 5.5.5\n\n### Patch Changes\n\n- Updated dependencies [[`3fccbef7bbf985f19d9a9bae2638e538f126f754`](https://github.com/onflow/fcl-js/commit/3fccbef7bbf985f19d9a9bae2638e538f126f754)]:\n  - @onflow/fcl-core@1.13.5\n\n## 5.5.4\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.13.4\n\n## 5.5.3\n\n### Patch Changes\n\n- Updated dependencies [[`c88f170ab2342f5382dead9a2270e72ce9c6d68a`](https://github.com/onflow/fcl-js/commit/c88f170ab2342f5382dead9a2270e72ce9c6d68a)]:\n  - @onflow/fcl-core@1.13.3\n\n## 5.5.2\n\n### Patch Changes\n\n- Updated dependencies [[`c0fceb12e3108265e4442ad81817a4cb12f79b0f`](https://github.com/onflow/fcl-js/commit/c0fceb12e3108265e4442ad81817a4cb12f79b0f)]:\n  - @onflow/fcl-core@1.13.2\n\n## 5.5.1\n\n### Patch Changes\n\n- Updated dependencies [[`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d)]:\n  - @onflow/fcl-core@1.13.1\n\n## 5.5.0\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add UI notifications for pending requests\n\n### Patch Changes\n\n- [#1994](https://github.com/onflow/fcl-js/pull/1994) [`a7df42ff4609aa8a1f381fd447d3f94606f71a17`](https://github.com/onflow/fcl-js/commit/a7df42ff4609aa8a1f381fd447d3f94606f71a17) Thanks [@jribbink](https://github.com/jribbink)! - Fix WalletConnectModal close detection\n\n- [#1999](https://github.com/onflow/fcl-js/pull/1999) [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1) Thanks [@jribbink](https://github.com/jribbink)! - Improve deeplinking for WC/RPC wallets using non-WC/RPC pre-authz services\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7), [`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1), [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7), [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21)]:\n  - @onflow/fcl-core@1.13.0\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-logger@1.3.3\n  - @onflow/config@1.5.1\n\n## 5.5.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.13.0-alpha.6\n\n## 5.5.0-alpha.5\n\n### Minor Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add UI notifications for pending requests\n\n### Patch Changes\n\n- Updated dependencies [[`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26)]:\n  - @onflow/fcl-core@1.13.0-alpha.5\n\n## 5.4.1-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`bac8c54db1b6821a2158923544aa537885d5a0e7`](https://github.com/onflow/fcl-js/commit/bac8c54db1b6821a2158923544aa537885d5a0e7)]:\n  - @onflow/fcl-core@1.13.0-alpha.4\n\n## 5.4.1-alpha.3\n\n### Patch Changes\n\n- [#1999](https://github.com/onflow/fcl-js/pull/1999) [`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1) Thanks [@jribbink](https://github.com/jribbink)! - Improve deeplinking for WC/RPC wallets using non-WC/RPC pre-authz services\n\n- Updated dependencies [[`c14746a9e4dbde10d6204697a68e6f2de6e83dd1`](https://github.com/onflow/fcl-js/commit/c14746a9e4dbde10d6204697a68e6f2de6e83dd1)]:\n  - @onflow/fcl-core@1.13.0-alpha.3\n\n## 5.4.1-alpha.2\n\n### Patch Changes\n\n- [#1994](https://github.com/onflow/fcl-js/pull/1994) [`a7df42ff4609aa8a1f381fd447d3f94606f71a17`](https://github.com/onflow/fcl-js/commit/a7df42ff4609aa8a1f381fd447d3f94606f71a17) Thanks [@jribbink](https://github.com/jribbink)! - Fix WalletConnectModal close detection\n\n## 5.4.1-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`8a5f8e9874980c40c1feb3eac915c6e8570abbf3`](https://github.com/onflow/fcl-js/commit/8a5f8e9874980c40c1feb3eac915c6e8570abbf3)]:\n  - @onflow/fcl-core@1.13.0-alpha.2\n\n## 5.4.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/fcl-core@1.12.1-alpha.0\n  - @onflow/config@1.5.1-alpha.0\n\n## 5.4.0\n\n### Minor Changes\n\n- [#1966](https://github.com/onflow/fcl-js/pull/1966) [`f2831107`](https://github.com/onflow/fcl-js/commit/f283110707d5edc166bbe05e5482d38fa29de29e) Thanks [@jribbink](https://github.com/jribbink)! - Fix deep linking issues with mobile wallets\n\n### Patch Changes\n\n- Updated dependencies [[`f2831107`](https://github.com/onflow/fcl-js/commit/f283110707d5edc166bbe05e5482d38fa29de29e)]:\n  - @onflow/fcl-core@1.12.0\n\n## 5.3.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.11.1\n\n## 5.3.0\n\n### Minor Changes\n\n- [#1961](https://github.com/onflow/fcl-js/pull/1961) [`77f66e94`](https://github.com/onflow/fcl-js/commit/77f66e94ecce98c681449eeaf74e1b29c4ddc4cb) Thanks [@jribbink](https://github.com/jribbink)! - Bump version to 5.3.0\n\n## 5.2.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Add new functions (`request` and `createSessionProposal`) for custom interaction with WC-compatibile wallets outside of service plugin\n\n### Patch Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Update @walletconnect/sign-client\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`e97e8d2f`](https://github.com/onflow/fcl-js/commit/e97e8d2f5197aecf793f26ba82771fd4f7ebc757), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c), [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7)]:\n  - @onflow/fcl-core@1.11.0\n  - @onflow/config@1.5.0\n\n## 5.2.0-alpha.4\n\n### Patch Changes\n\n- Updated dependencies [[`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/config@1.5.0-alpha.0\n  - @onflow/fcl-core@1.11.0-alpha.4\n\n## 5.2.0-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`b8a2a26e`](https://github.com/onflow/fcl-js/commit/b8a2a26e382d543e5058cc1a628b437c3305b13c)]:\n  - @onflow/fcl-core@1.11.0-alpha.3\n\n## 5.2.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`e70a215c`](https://github.com/onflow/fcl-js/commit/e70a215c47d7db6f4e1ddab747be3968abc09c05), [`3a89c39c`](https://github.com/onflow/fcl-js/commit/3a89c39ca5033af6b0ff4e606095507753e17de7)]:\n  - @onflow/fcl-core@1.11.0-alpha.2\n\n## 5.2.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl-core@1.11.0-alpha.1\n\n## 5.2.0-alpha.0\n\n### Minor Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Add new functions (`request` and `createSessionProposal`) for custom interaction with WC-compatibile wallets outside of service plugin\n\n### Patch Changes\n\n- [#1922](https://github.com/onflow/fcl-js/pull/1922) [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99) Thanks [@jribbink](https://github.com/jribbink)! - Update @walletconnect/sign-client\n\n- Updated dependencies [[`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`266fda58`](https://github.com/onflow/fcl-js/commit/266fda5817900a943925f9a4cbfc69dbcdb98d99), [`6ca1353e`](https://github.com/onflow/fcl-js/commit/6ca1353e2d0c6ad760b7a03da99c8b2b56b48807)]:\n  - @onflow/fcl-core@1.11.0-alpha.0\n\n## 5.2.0\n\n### Minor Changes\n\n- [#1888](https://github.com/onflow/fcl-js/pull/1888) [`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b) Thanks [@jribbink](https://github.com/jribbink)! - Convert to TypeScript\n\n### Patch Changes\n\n- [#1888](https://github.com/onflow/fcl-js/pull/1888) [`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b) Thanks [@jribbink](https://github.com/jribbink)! - Remove better-sqlite3 dependency\n\n- Updated dependencies [[`90aa24d2`](https://github.com/onflow/fcl-js/commit/90aa24d237e0003bd62b53dd26fcf29ab743595b)]:\n  - @onflow/fcl-core@1.10.0\n\n## 5.1.1\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/config@1.4.1\n  - @onflow/fcl@1.10.2\n\n## 5.1.0\n\n### Minor Changes\n\n- [#1876](https://github.com/onflow/fcl-js/pull/1876) [`96336424`](https://github.com/onflow/fcl-js/commit/96336424033c87b2256981f130700ada2ea9118b) Thanks [@jribbink](https://github.com/jribbink)! - Remove unnecessary client services from FCL-WC plugin\n\n### Patch Changes\n\n- Updated dependencies [[`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]:\n  - @onflow/util-invariant@1.2.3\n  - @onflow/config@1.4.0\n  - @onflow/fcl@1.10.1\n\n## 5.0.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/fcl@1.10.0\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/config@1.3.0\n\n## 5.0.2-alpha.7\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.10.0-alpha.9\n\n## 5.0.2-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/config@1.3.0-alpha.3\n  - @onflow/fcl@1.10.0-alpha.8\n\n## 5.0.2-alpha.5\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.10.0-alpha.7\n\n## 5.0.2-alpha.4\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.10.0-alpha.6\n\n## 5.0.2-alpha.3\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.10.0-alpha.5\n\n## 5.0.2-alpha.2\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.10.0-alpha.4\n\n## 5.0.2-alpha.1\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/config@1.2.2-alpha.2\n  - @onflow/fcl@1.10.0-alpha.3\n\n## 5.0.2-alpha.0\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/fcl@1.10.0-alpha.2\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-logger@1.3.2-alpha.1\n  - @onflow/config@1.2.2-alpha.1\n\n## 5.0.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/config@1.2.1\n  - @onflow/fcl@1.8.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-logger@1.3.1\n\n## 5.0.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-logger@1.3.0\n  - @onflow/config@1.2.0\n  - @onflow/fcl@1.8.0\n\n## 4.0.0\n\n### Patch Changes\n\n- Updated dependencies [[`3c99c856`](https://github.com/onflow/fcl-js/commit/3c99c8560f61b5b38238cbd0e93814936aee282e), [`5edbd823`](https://github.com/onflow/fcl-js/commit/5edbd823b1a6d25eb7bb52dc55338f95beae73b1)]:\n  - @onflow/fcl@1.6.0\n  - @onflow/util-logger@1.2.2\n  - @onflow/config@1.1.2\n\n## 3.0.0\n\n### Patch Changes\n\n- [#1688](https://github.com/onflow/fcl-js/pull/1688) [`ec80946d`](https://github.com/onflow/fcl-js/commit/ec80946db5b72a258b7307d48fd85697db7935d3) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated WalletConnect integration\n\n- Updated dependencies [[`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd), [`1308f522`](https://github.com/onflow/fcl-js/commit/1308f522e56cef517a60be465789815281bab6d8), [`f7986d9b`](https://github.com/onflow/fcl-js/commit/f7986d9b4e7bba3abc4acbfb036072336d0651cf), [`53d1f607`](https://github.com/onflow/fcl-js/commit/53d1f607fd15535a29cbbb1c809f0fc4d7a6be7b), [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6), [`51436ccd`](https://github.com/onflow/fcl-js/commit/51436ccd5ceb774b4846c44474914cad2208fe37)]:\n  - @onflow/fcl@1.5.0\n  - @onflow/config@1.1.1\n  - @onflow/util-logger@1.2.1\n\n## 3.0.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6)]:\n  - @onflow/config@1.1.1-alpha.0\n  - @onflow/fcl@1.5.0-alpha.3\n  - @onflow/util-logger@1.2.1-alpha.0\n\n## 3.0.0-alpha.1\n\n### Patch Changes\n\n- [#1688](https://github.com/onflow/fcl-js/pull/1688) [`ec80946d`](https://github.com/onflow/fcl-js/commit/ec80946db5b72a258b7307d48fd85697db7935d3) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated WalletConnect integration\n\n- Updated dependencies [[`53d1f607`](https://github.com/onflow/fcl-js/commit/53d1f607fd15535a29cbbb1c809f0fc4d7a6be7b)]:\n  - @onflow/fcl@1.5.0-alpha.2\n\n## 3.0.0-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd)]:\n  - @onflow/fcl@1.5.0-alpha.0\n\n## 2.0.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n- [#1497](https://github.com/onflow/fcl-js/pull/1497) [`60b4c351`](https://github.com/onflow/fcl-js/commit/60b4c351ca84fa1fc88607fa9c58d0a6ed43b017) Thanks [@gregsantos](https://github.com/gregsantos)! - Add support for pre-authz method\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355), [`6051030f`](https://github.com/onflow/fcl-js/commit/6051030f81fb102447bec40c758657ec20f43129), [`a46a6650`](https://github.com/onflow/fcl-js/commit/a46a6650b643e8545a7d58f96a1fe55a3ab0d414), [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242), [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19), [`06655aee`](https://github.com/onflow/fcl-js/commit/06655aee2039f3e88741a5ee3b041ecfabb813c9), [`b9b957c0`](https://github.com/onflow/fcl-js/commit/b9b957c0fa8829ae0f40d31225a524ddf0d56340), [`2f10082e`](https://github.com/onflow/fcl-js/commit/2f10082e7bd2d174c1b88c782756097c415289b3), [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25), [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4), [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72), [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020), [`b2881f74`](https://github.com/onflow/fcl-js/commit/b2881f74f024aeca52d534d2ca6081fb57efd06d), [`be73c297`](https://github.com/onflow/fcl-js/commit/be73c2975330b3a8a33e8fa3edfdc25a7dc1a2b0), [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645), [`31140ef0`](https://github.com/onflow/fcl-js/commit/31140ef07b9c830759deb5545875dcc89e6f2e81), [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b)]:\n  - @onflow/config@1.1.0\n  - @onflow/fcl@1.4.0\n  - @onflow/util-invariant@1.1.0\n  - @onflow/util-logger@1.2.0\n\n## 2.0.0-alpha.8\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/config@1.1.0-alpha.8\n  - @onflow/fcl@1.4.0-alpha.11\n  - @onflow/util-invariant@1.1.0-alpha.2\n  - @onflow/util-logger@1.2.0-alpha.3\n\n## 2.0.0-alpha.7\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/util-logger@1.2.0-alpha.2\n  - @onflow/config@1.1.0-alpha.7\n  - @onflow/fcl@1.4.0-alpha.10\n\n## 2.0.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`06655aee`](https://github.com/onflow/fcl-js/commit/06655aee2039f3e88741a5ee3b041ecfabb813c9), [`b9b957c0`](https://github.com/onflow/fcl-js/commit/b9b957c0fa8829ae0f40d31225a524ddf0d56340), [`2f10082e`](https://github.com/onflow/fcl-js/commit/2f10082e7bd2d174c1b88c782756097c415289b3), [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065)]:\n  - @onflow/fcl@1.4.0-alpha.9\n\n## 2.0.0-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72)]:\n  - @onflow/fcl@1.4.0-alpha.5\n\n## 2.0.0-alpha.4\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/config@1.1.0-alpha.4\n  - @onflow/util-invariant@1.1.0-alpha.0\n  - @onflow/util-logger@1.2.0-alpha.1\n  - @onflow/fcl@1.4.0-alpha.4\n\n## 2.0.0-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb)]:\n  - @onflow/config@1.1.0-alpha.3\n  - @onflow/fcl@1.4.0-alpha.3\n\n## 2.0.0-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020), [`be73c297`](https://github.com/onflow/fcl-js/commit/be73c2975330b3a8a33e8fa3edfdc25a7dc1a2b0)]:\n  - @onflow/config@1.1.0-alpha.2\n  - @onflow/fcl@1.4.0-alpha.2\n\n## 2.0.0-alpha.1\n\n### Minor Changes\n\n- [#1497](https://github.com/onflow/fcl-js/pull/1497) [`60b4c351`](https://github.com/onflow/fcl-js/commit/60b4c351ca84fa1fc88607fa9c58d0a6ed43b017) Thanks [@gregsantos](https://github.com/gregsantos)! - Add support for pre-authz method\n\n### Patch Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- Updated dependencies [[`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355)]:\n  - @onflow/fcl@1.4.0-alpha.1\n\n## 1.0.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9), [`6051030f`](https://github.com/onflow/fcl-js/commit/6051030f81fb102447bec40c758657ec20f43129), [`b2881f74`](https://github.com/onflow/fcl-js/commit/b2881f74f024aeca52d534d2ca6081fb57efd06d)]:\n  - @onflow/config@1.1.0-alpha.0\n  - @onflow/fcl@1.3.3-alpha.0\n  - @onflow/util-logger@1.1.3-alpha.0\n\n## 1.0.0\n\n### Minor Changes\n\n- [#1352](https://github.com/onflow/fcl-js/pull/1352) [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d) Thanks [@gregsantos](https://github.com/gregsantos)! - 0.1.0 Release\n\n  Initial alpha release of WalletConnect Adapter package for FCL.\n\n  **EXPECT BREAKING CHANGES**\n\n  ## Usage\n\n  The package exports `initFclWc` and `getSdkError` util.\n  Currently, a WalletConnect `projectId` is required and can be obtained @ https://cloud.walletconnect.com. Metadata is optional.\n\n  Initialization returns `FclConnectServicePlugin` and `client`. The `client` can be used to subscribe to events, disconnect, and query session and pairing status.\n  Passing `FclConnectServicePlugin` to `fcl.pluginRegistry.add()` will enable `\"WC/RPC\"` service strategy and add new and existing services to FCL Discovery UI/API.\n\n  **Note**\n  Setting `flow.network` in FCL config is required to enable `\"WC/RPC\"` service strategy to request correct chain permissions.\n\n  ```javascript\n  import {config} from '@onflow/config'\n\n  config({\n      flow.network: 'testnet'\n  })\n  ```\n\n  ```javascript\n  import * as fcl from \"@onflow/fcl\"\n  import {initFclWc} from \"@onflow/fcl-wc\"\n  \n  const {FclConnectServicePlugin, client} = await initFclWc({\n    projectId: PROJECT_ID,\n    metadata: {\n      name: \"FCL Connect\",\n      description: \"FCL DApp with support for WalletConnect\",\n      url: \"https://flow.com/\",\n      icons: [\"https://avatars.githubusercontent.com/u/62387156?s=280&v=4\"],\n    },\n  })\n  \n  fcl.pluginRegistry.add(FclConnectServicePlugin)\n  ```\n\n  ### Using the client\n\n  ```javascript\n  import {getSdkError} from \"@onflow/fcl-wc\"\n  \n  client.on(\"session_update\", ({topic, params}) => {\n    const session = client.session.get(topic)\n    console.log(\"EVENT\", \"session_update\", {topic, params, session})\n  })\n  \n  await client.disconnect({\n    topic: session.topic,\n    reason: getSdkError(\"USER_DISCONNECTED\"),\n  })\n  ```\n\n  -\n\n### Patch Changes\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - ### fcl\n\n  - Added sending `supportedStrategies` to Discovery (UI/API) on client.config\n\n  ***\n\n  ### fcl-wc\n\n  - updated `initFclWC` export/name to `init`\n  - Added `sessionRequestHook` and `injectedWallets` opts, updated pairing match to use service.uid.\n\n* [#1427](https://github.com/onflow/fcl-js/pull/1427) [`27bc599c`](https://github.com/onflow/fcl-js/commit/27bc599cdc79be9246dbbeb5e69afa60174f0577) Thanks [@gregsantos](https://github.com/gregsantos)! - Update request types and make wallets from WalletConnect API opt-in\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates ServicePlugin spec to include serviceStrategy\n\n* [#1411](https://github.com/onflow/fcl-js/pull/1411) [`3c7a1bd6`](https://github.com/onflow/fcl-js/commit/3c7a1bd6686ff41dcd4953b471c54c1256a599a0) Thanks [@gregsantos](https://github.com/gregsantos)! - Adds additional options to `init` for `pairingModalOverride` and `wcRequestHook`\n\n  ```js\n  import * as fcl from \"@onflow/fcl\"\n  import {init} from \"@onflow/fcl-wc\"\n  // example using pairing data from wcRequestHook and providing a custom pairing modal\n  const {FclWcServicePlugin, client} = await init({\n    projectId: PROJECT_ID,\n    metadata: PROJECT_METADATA,\n    includeBaseWC: false,\n    wallets: [],\n    wcRequestHook: (data: WcRequestData) => {\n      const peerMetadata = data?.pairing?.peerMetadata\n      setSessionRequestData(peerMetadata)\n      setShowRequestModal(true)\n    },\n    pairingModalOverride: (\n      uri: string = \"\",\n      rejectPairingRequest: () => void\n    ) => {\n      openCustomPairingModal(uri)\n      // call rejectPairingRequest() to manually reject pairing request from client\n    },\n  })\n\n  fcl.pluginRegistry.add(FclWcServicePlugin)\n  ```\n\n  ```ts\n  interface WcRequestData {\n    type: string // 'session_request' | 'pairing_request'\n    session: SessionTypes.Struct | undefined // https://www.npmjs.com/package/@walletconnect/types\n    pairing: PairingTypes.Struct | undefined // https://www.npmjs.com/package/@walletconnect/types\n    method: string // \"flow_authn\" | \"flow_authz\" | \"flow_user_sign\"\n    uri: string | undefined\n  }\n  ```\n\n* Updated dependencies [[`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79), [`2a5fa910`](https://github.com/onflow/fcl-js/commit/2a5fa910009501c7c789efc9b1c1731668578361), [`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6), [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d), [`3fdcc3be`](https://github.com/onflow/fcl-js/commit/3fdcc3be2d206c0df3f3b250012db5c18cac3bed), [`6708494d`](https://github.com/onflow/fcl-js/commit/6708494df236dc8c7375a2f91dc04fbcc03235c8), [`15d77220`](https://github.com/onflow/fcl-js/commit/15d77220a90be66b440129b73ffe889fe20335ab), [`f14b730c`](https://github.com/onflow/fcl-js/commit/f14b730c52bec664bda7bf222e3f0c0ab9c70f40), [`0a9c9677`](https://github.com/onflow/fcl-js/commit/0a9c96770933df4e0ed685b0ee4575533e345ecb), [`17a7f1e4`](https://github.com/onflow/fcl-js/commit/17a7f1e413340f72f45350075e8ea79ce1c2b711), [`5e6d114a`](https://github.com/onflow/fcl-js/commit/5e6d114a8fb0489c6bc70df8ec02d7ec4bb9ea1d), [`ecbd77b2`](https://github.com/onflow/fcl-js/commit/ecbd77b2acfbe4a28793baca3db47c1d5347247d), [`75d06938`](https://github.com/onflow/fcl-js/commit/75d069380c2dbb2040af57ce39a9847fb33a7db4), [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79), [`1982c00b`](https://github.com/onflow/fcl-js/commit/1982c00bc334403bb603762a7f921bbe1887ee2b), [`f9f1dab7`](https://github.com/onflow/fcl-js/commit/f9f1dab70a6014b68ce5197544fae396340b6670)]:\n  - @onflow/fcl@1.3.0\n\n## 1.0.0-alpha.3\n\n### Patch Changes\n\n- [#1411](https://github.com/onflow/fcl-js/pull/1411) [`3c7a1bd6`](https://github.com/onflow/fcl-js/commit/3c7a1bd6686ff41dcd4953b471c54c1256a599a0) Thanks [@gregsantos](https://github.com/gregsantos)! - Adds additional options to `init` for `pairingModalOverride` and `wcRequestHook`\n\n  ```js\n  import * as fcl from \"@onflow/fcl\"\n  import {init} from \"@onflow/fcl-wc\"\n  // example using pairing data from wcRequestHook and providing a custom pairing modal\n  const {FclWcServicePlugin, client} = await init({\n    projectId: PROJECT_ID,\n    metadata: PROJECT_METADATA,\n    includeBaseWC: false,\n    wallets: [],\n    wcRequestHook: (data: WcRequestData) => {\n      const peerMetadata = data?.pairing?.peerMetadata\n      setSessionRequestData(peerMetadata)\n      setShowRequestModal(true)\n    },\n    pairingModalOverride: (\n      uri: string = \"\",\n      rejectPairingRequest: () => void\n    ) => {\n      openCustomPairingModal(uri)\n      // call rejectPairingRequest() to manually reject pairing request from client\n    },\n  })\n\n  fcl.pluginRegistry.add(FclWcServicePlugin)\n  ```\n\n  ```ts\n  interface WcRequestData {\n    type: string // 'session_request' | 'pairing_request'\n    session: SessionTypes.Struct | undefined // https://www.npmjs.com/package/@walletconnect/types\n    pairing: PairingTypes.Struct | undefined // https://www.npmjs.com/package/@walletconnect/types\n    method: string // \"flow_authn\" | \"flow_authz\" | \"flow_user_sign\"\n    uri: string | undefined\n  }\n  ```\n\n- Updated dependencies [[`15d77220`](https://github.com/onflow/fcl-js/commit/15d77220a90be66b440129b73ffe889fe20335ab), [`75d06938`](https://github.com/onflow/fcl-js/commit/75d069380c2dbb2040af57ce39a9847fb33a7db4)]:\n  - @onflow/fcl@1.3.0-alpha.9\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - ### fcl\n\n  - Added sending `supportedStrategies` to Discovery (UI/API) on client.config\n\n  ***\n\n  ### fcl-wc\n\n  - updated `initFclWC` export/name to `init`\n  - Added `sessionRequestHook` and `injectedWallets` opts, updated pairing match to use service.uid.\n\n* [#1396](https://github.com/onflow/fcl-js/pull/1396) [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79) Thanks [@gregsantos](https://github.com/gregsantos)! - Updates ServicePlugin spec to include serviceStrategy\n\n* Updated dependencies [[`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79), [`8475d5a4`](https://github.com/onflow/fcl-js/commit/8475d5a49e07a678da35a1b8f45751f599256e79)]:\n  - @onflow/fcl@1.3.0-alpha.6\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`2a5fa910`](https://github.com/onflow/fcl-js/commit/2a5fa910009501c7c789efc9b1c1731668578361), [`1982c00b`](https://github.com/onflow/fcl-js/commit/1982c00bc334403bb603762a7f921bbe1887ee2b)]:\n  - @onflow/fcl@1.3.0-alpha.4\n\n## 0.1.0-alpha.0\n\n### Minor Changes\n\n- [#1352](https://github.com/onflow/fcl-js/pull/1352) [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d) Thanks [@gregsantos](https://github.com/gregsantos)! - 0.1.0 Release\n\n  Initial alpha release of WalletConnect Adapter package for FCL.\n\n  **EXPECT BREAKING CHANGES**\n\n  ## Usage\n\n  The package exports `initFclWc` and `getSdkError` util.\n  Currently, a WalletConnect `projectId` is required and can be obtained @ https://cloud.walletconnect.com. Metadata is optional.\n\n  Initialization returns `FclConnectServicePlugin` and `client`. The `client` can be used to subscribe to events, disconnect, and query session and pairing status.\n  Passing `FclConnectServicePlugin` to `fcl.pluginRegistry.add()` will enable `\"WC/RPC\"` service strategy and add new and existing services to FCL Discovery UI/API.\n\n  **Note**\n  Setting `flow.network` in FCL config is required to enable `\"WC/RPC\"` service strategy to request correct chain permissions.\n\n  ```javascript\n  import {config} from '@onflow/config'\n\n  config({\n      flow.network: 'testnet'\n  })\n  ```\n\n  ```javascript\n  import * as fcl from \"@onflow/fcl\"\n  import {initFclWc} from \"@onflow/fcl-wc\"\n  \n  const {FclConnectServicePlugin, client} = await initFclWc({\n    projectId: PROJECT_ID,\n    metadata: {\n      name: \"FCL Connect\",\n      description: \"FCL DApp with support for WalletConnect\",\n      url: \"https://flow.com/\",\n      icons: [\"https://avatars.githubusercontent.com/u/62387156?s=280&v=4\"],\n    },\n  })\n  \n  fcl.pluginRegistry.add(FclConnectServicePlugin)\n  ```\n\n  ### Using the client\n\n  ```javascript\n  import {getSdkError} from \"@onflow/fcl-wc\"\n  \n  client.on(\"session_update\", ({topic, params}) => {\n    const session = client.session.get(topic)\n    console.log(\"EVENT\", \"session_update\", {topic, params, session})\n  })\n  \n  await client.disconnect({\n    topic: session.topic,\n    reason: getSdkError(\"USER_DISCONNECTED\"),\n  })\n  ```\n\n  -\n\n### Patch Changes\n\n- Updated dependencies [[`9ea98850`](https://github.com/onflow/fcl-js/commit/9ea988503bbf4760bdee2a8bd8098be1cd95acb6), [`e33fa8df`](https://github.com/onflow/fcl-js/commit/e33fa8df764ec4f10696eedf520cc92ee402623d)]:\n  - @onflow/fcl@1.3.0-alpha.2\n"
  },
  {
    "path": "packages/fcl-wc/README.md",
    "content": "# @onflow/fcl-wc\n\nWalletConnect adapter for FCL-JS.\n\n## Status\n\n- **Last Updated:** Aug 2022\n- **Stable:** No\n- **Risk of Breaking Change:** Yes\n\n## Install\n\n```bash\nnpm install --save @onflow/fcl-wc\n```\n\n## Usage\n\nThe package exports `init` and utils.\nCurrently, a WalletConnect `projectId` is required and can be obtained @ https://cloud.walletconnect.com. Metadata is optional.\n\nInitialization returns `FclWcServicePlugin` and a Walletconnect `client`. The `client` can be used to subscribe to events, disconnect from a wallet, and query session and pairing status.\nPassing `FclWcServicePlugin` to `fcl.pluginRegistry.add()` will enable use of the `\"WC/RPC\"` service strategy and add new and existing WalletConnect services to FCL Discovery.\n\n```javascript\nimport * as fcl from '@onflow/fcl'\nimport { init } from '@onflow/fcl-wc'\n\nconst { FclWcServicePlugin, client } = await init({\n  projectId: PROJECT_ID,\n  metadata: {\n    name: 'FCL WC DApp',\n    description: 'FCL DApp with support for WalletConnect',\n    url: 'https://flow.com/',\n    icons: ['https://avatars.githubusercontent.com/u/62387156?s=280&v=4']\n  }\n})\n\nfcl.pluginRegistry.add(FclWcServicePlugin)\n```\n"
  },
  {
    "path": "packages/fcl-wc/jest.config.js",
    "content": "const config = {\n  preset: \"jest-preset-preact\",\n  moduleNameMapper: {\n    \"\\\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$\":\n      \"<rootDir>/src/mocks/file-mock.ts\",\n    \"\\\\.(css|less)$\": \"<rootDir>/src/mocks/file-mock.ts\",\n  },\n  setupFilesAfterEnv: [\"<rootDir>/jest.setup.ts\"],\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "packages/fcl-wc/jest.setup.ts",
    "content": "// Polyfill TextEncoder / TextDecoder for Jest\nimport {TextEncoder, TextDecoder} from \"util\"\n\nglobal.TextEncoder = TextEncoder\nglobal.TextDecoder = TextDecoder as any\n"
  },
  {
    "path": "packages/fcl-wc/package.json",
    "content": "{\n  \"name\": \"@onflow/fcl-wc\",\n  \"version\": \"6.0.22\",\n  \"description\": \"WalletConnect adapter for FCL\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.mjs\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"devDependencies\": {\n    \"@babel/plugin-transform-react-jsx\": \"^7.25.9\",\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"1.8.0\",\n    \"autoprefixer\": \"^10.4.20\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-preset-preact\": \"^4.1.1\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/config\": \"1.11.1\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@walletconnect/modal\": \"^2.7.0\",\n    \"@walletconnect/types\": \"^2.20.2\",\n    \"@walletconnect/universal-provider\": \"^2.20.2\",\n    \"@walletconnect/utils\": \"^2.20.2\",\n    \"postcss-cli\": \"^11.0.0\",\n    \"preact\": \"^10.24.3\",\n    \"tailwindcss\": \"^3.4.14\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl-core\": \"1.30.2\"\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wc/postcss.config.js",
    "content": "const tailwindcss = require(\"tailwindcss\")\nconst tailwindConfig = require(\"./tailwind.config.js\")\nconst autoprefixer = require(\"autoprefixer\")\n\nmodule.exports = {\n  plugins: [tailwindcss(tailwindConfig), autoprefixer],\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/constants.ts",
    "content": "export enum FLOW_METHODS {\n  FLOW_AUTHN = \"flow_authn\",\n  FLOW_PRE_AUTHZ = \"flow_pre_authz\",\n  FLOW_AUTHZ = \"flow_authz\",\n  FLOW_USER_SIGN = \"flow_user_sign\",\n}\n\nexport enum REQUEST_TYPES {\n  SESSION_REQUEST = \"session_proposal\",\n  SIGNING_REQUEST = \"signing_request\",\n}\n\nexport const SERVICE_PLUGIN_NAME = \"fcl-plugin-service-walletconnect\"\nexport const WC_SERVICE_METHOD = \"WC/RPC\"\n"
  },
  {
    "path": "packages/fcl-wc/src/fcl-wc.test.ts",
    "content": "import {init} from \"./fcl-wc\"\nimport * as fcl from \"@onflow/fcl\"\n\njest.mock(\"@walletconnect/modal\", () => {})\njest.mock(\"@walletconnect/utils\", () => {})\n\njest.mock(\"@onflow/fcl\", () => {\n  return {\n    __esModule: true,\n    ...jest.requireActual(\"@onflow/fcl\"),\n  }\n})\n\ndescribe(\"Init Client\", () => {\n  let chainIdSpy\n  beforeEach(() => {\n    chainIdSpy = jest.spyOn(fcl, \"getChainId\")\n    chainIdSpy.mockImplementation(async () => \"testnet\")\n  })\n\n  afterEach(() => {\n    chainIdSpy.mockRestore()\n  })\n\n  it(\"should throw without projectId\", async () => {\n    expect.assertions(1)\n    await expect(init).rejects.toThrow(Error)\n  })\n})\n"
  },
  {
    "path": "packages/fcl-wc/src/fcl-wc.ts",
    "content": "import * as fclCore from \"@onflow/fcl-core\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {LEVELS, log} from \"@onflow/util-logger\"\nexport {getSdkError} from \"@walletconnect/utils\"\nimport {makeServicePlugin} from \"./service\"\nimport {CoreTypes} from \"@walletconnect/types\"\nimport {\n  UniversalProvider,\n  UniversalProviderOpts,\n} from \"@walletconnect/universal-provider\"\n\nexport interface FclWalletConnectConfig {\n  projectId: string\n  metadata?: CoreTypes.Metadata\n  includeBaseWC?: boolean\n  wcRequestHook?: any\n  pairingModalOverride?: any\n  wallets?: any[]\n  disableNotifications?: boolean\n}\n\nconst DEFAULT_RELAY_URL = \"wss://relay.walletconnect.com\"\nconst DEFAULT_LOGGER = \"debug\"\nlet providerPromise: Promise<InstanceType<typeof UniversalProvider> | null> =\n  Promise.resolve(null)\n\nconst initClient = async ({\n  projectId,\n  metadata,\n}: {\n  projectId: string\n  metadata?: CoreTypes.Metadata\n}) => {\n  invariant(\n    projectId != null,\n    \"FCL Wallet Connect Error: WalletConnect projectId is required\"\n  )\n  try {\n    return UniversalProvider.init({\n      logger: DEFAULT_LOGGER,\n      relayUrl: DEFAULT_RELAY_URL,\n      projectId: projectId,\n      metadata: metadata,\n    })\n  } catch (error) {\n    if (error instanceof Error) {\n      log({\n        title: `${error.name} fcl-wc Init Client`,\n        message: error.message,\n        level: LEVELS.error,\n      })\n    }\n    throw error\n  }\n}\n\nconst initUniversalProvider = async (opts: UniversalProviderOpts) => {\n  return UniversalProvider.init({})\n}\n\nexport const initLazy = (config: FclWalletConnectConfig) => {\n  const {FclWcServicePlugin, providerPromise} = initHelper(config)\n  fclCore.discovery.authn.update()\n\n  return {\n    FclWcServicePlugin,\n    providerPromise,\n  }\n}\n\nexport const init = async (config: FclWalletConnectConfig) => {\n  const {FclWcServicePlugin, providerPromise} = initLazy(config)\n  const client = await providerPromise\n  fclCore.discovery.authn.update()\n\n  return {\n    FclWcServicePlugin,\n    client,\n  }\n}\n\nconst initHelper = (config: FclWalletConnectConfig) => {\n  if (typeof window === \"undefined\") {\n    throw new Error(\n      \"FCL Wallet Connect Plugin can only be initialized in the browser\"\n    )\n  }\n\n  // Lazy load the SignClient\n  //  - Initialize the client if it doesn't exist\n  //  - If it does exist, return existing client\n  //  - If existing client fails to initialize, reinitialize\n  providerPromise = providerPromise\n    .catch(() => null)\n    .then(_client => {\n      if (_client) {\n        return _client\n      } else {\n        return initClient({\n          projectId: config.projectId,\n          metadata: config.metadata,\n        })\n      }\n    })\n    .catch(e => {\n      log({\n        title: `WalletConnect Client Initialization Error`,\n        message: e.message ? e.message : e,\n        level: LEVELS.error,\n      })\n      throw e\n    })\n\n  const FclWcServicePlugin = makeServicePlugin(providerPromise, config)\n\n  return {\n    FclWcServicePlugin,\n    providerPromise,\n  }\n}\n\n// Returns the SignClient instance used by this plugin if it has been initialized\nexport async function getProvider() {\n  return providerPromise.then(provider => {\n    if (!provider) {\n      throw new Error(\"WalletConnect client not initialized\")\n    }\n\n    return provider\n  })\n}\n\nexport {SERVICE_PLUGIN_NAME} from \"./constants\"\n"
  },
  {
    "path": "packages/fcl-wc/src/index.ts",
    "content": "export {init, initLazy, getProvider} from \"./fcl-wc\"\nexport {createSessionProposal, request} from \"./session\"\nexport {FLOW_METHODS, SERVICE_PLUGIN_NAME, WC_SERVICE_METHOD} from \"./constants\"\n"
  },
  {
    "path": "packages/fcl-wc/src/mocks/file-mock.ts",
    "content": "export default \"mocked-file\"\n"
  },
  {
    "path": "packages/fcl-wc/src/service.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {log, LEVELS} from \"@onflow/util-logger\"\nimport {isMobile, openDeeplink, preloadImage, shouldDeepLink} from \"./utils\"\nimport {\n  FLOW_METHODS,\n  REQUEST_TYPES,\n  SERVICE_PLUGIN_NAME,\n  WC_SERVICE_METHOD,\n} from \"./constants\"\nimport {createSessionProposal, request} from \"./session\"\nimport {showNotification} from \"./ui/notifications\"\nimport type {FclWalletConnectConfig} from \"./fcl-wc\"\nimport mobileIcon from \"./ui/assets/mobile.svg\"\nimport {CurrentUser, Service} from \"@onflow/typedefs\"\nimport {SessionTypes} from \"@walletconnect/types\"\nimport {UniversalProvider} from \"@walletconnect/universal-provider\"\nimport {createStore} from \"./store\"\n\ntype WalletConnectModalType = import(\"@walletconnect/modal\").WalletConnectModal\n\ntype Constructor<T> = new (...args: any[]) => T\n\nlet providerStore = createStore<{\n  [key: string]: InstanceType<typeof UniversalProvider>\n}>({})\n\nexport const makeServicePlugin = (\n  provider: Promise<InstanceType<typeof UniversalProvider> | null>,\n  config: FclWalletConnectConfig = {\n    projectId: \"\",\n    includeBaseWC: false,\n    wallets: [],\n    wcRequestHook: null,\n    pairingModalOverride: null,\n    disableNotifications: false,\n  }\n) => ({\n  name: SERVICE_PLUGIN_NAME,\n  f_type: \"ServicePlugin\",\n  type: \"discovery-service\",\n  serviceStrategy: {\n    method: WC_SERVICE_METHOD,\n    exec: makeExec(\n      provider,\n      config,\n      import(\"@walletconnect/modal\").then(m => m.WalletConnectModal)\n    ),\n  },\n  services: [],\n})\n\nconst makeExec = (\n  signerPromise: Promise<InstanceType<typeof UniversalProvider> | null>,\n  config: FclWalletConnectConfig,\n  WalletConnectModal: Promise<Constructor<WalletConnectModalType>>\n) => {\n  return async ({\n    service,\n    body,\n    opts,\n    abortSignal,\n    user,\n    config,\n  }: {\n    service: any\n    body: any\n    opts: any\n    abortSignal?: AbortSignal\n    user: any\n    config: any\n  }) => {\n    // Preload provider image\n    preloadImage(service.provider?.icon)\n\n    const {\n      wcRequestHook,\n      pairingModalOverride,\n      disableNotifications: _appDisabledNotifications,\n    } = config\n\n    const appDisabledNotifications =\n      service.params?.disableNotifications ?? _appDisabledNotifications\n\n    const resolvedProvider = await resolveProvider({\n      provider: signerPromise,\n      externalProviderOrTopic: service.params?.externalProvider,\n    })\n    invariant(!!resolvedProvider, \"WalletConnect is not initialized\")\n\n    const {provider: provider, isExternal} = resolvedProvider\n\n    let session: SessionTypes.Struct | null = provider.session ?? null,\n      pairing: any\n    const method = service.endpoint\n    const appLink = validateAppLink(service)\n\n    // If the user is already connected to this session, use it\n    if (\n      !!session?.topic &&\n      session?.topic === service.params?.externalProvider &&\n      method === FLOW_METHODS.FLOW_AUTHN\n    ) {\n      return user\n    }\n\n    if (session == null) {\n      session = await new Promise<SessionTypes.Struct>((resolve, reject) => {\n        function onClose() {\n          reject(`Declined: Externally Halted`)\n        }\n\n        connectWc(WalletConnectModal)({\n          service,\n          onClose,\n          appLink,\n          provider,\n          method,\n          pairing,\n          wcRequestHook,\n          pairingModalOverride,\n          abortSignal,\n          network: config.client.network,\n        }).then(resolve, reject)\n      })\n    }\n\n    if (wcRequestHook && wcRequestHook instanceof Function) {\n      wcRequestHook({\n        type: REQUEST_TYPES.SIGNING_REQUEST,\n        method,\n        service,\n        session: session ?? null,\n        pairing: pairing ?? null,\n        uri: null,\n      })\n    }\n\n    // Deeplink to the wallet app if necessary\n    if (shouldDeepLink({service, user})) {\n      openDeeplink(appLink)\n    }\n\n    // Show notification to the user if not disabled by app developer or wallet\n    const walletDisabledNotifications =\n      session?.sessionProperties?.[\"fclWc.disableNotificationsOnMobile\"] ===\n      \"true\"\n\n    const notification =\n      !appDisabledNotifications && !walletDisabledNotifications\n        ? showWcRequestNotification({\n            user,\n            service,\n          })\n        : null\n\n    // Make request to the WalletConnect client and return the result\n    return await request({\n      method,\n      body,\n      session,\n      provider,\n      abortSignal,\n      isExternal,\n      disableNotifications: service.params?.disableNotifications,\n    }).finally(() => notification?.dismiss())\n\n    function validateAppLink({uid}: {uid: string}) {\n      if (!(uid && /^(ftp|http|https):\\/\\/[^ \"]+$/.test(uid))) {\n        log({\n          title: \"WalletConnect Service Warning\",\n          message: `service.uid should be a valid universal link url. Found: ${uid}`,\n          level: LEVELS.warn,\n        })\n      }\n      return uid\n    }\n  }\n}\n\n// Connect to WalletConnect directly from the browser via deep link or WalletConnectModal\nfunction connectWc(\n  WalletConnectModal: Promise<Constructor<WalletConnectModalType>>\n) {\n  return async ({\n    service,\n    onClose,\n    appLink,\n    provider,\n    method,\n    pairing,\n    wcRequestHook,\n    pairingModalOverride,\n    abortSignal,\n    network,\n  }: {\n    service: any\n    onClose: any\n    appLink: string\n    provider: InstanceType<typeof UniversalProvider>\n    method: string\n    pairing: any\n    wcRequestHook: any\n    pairingModalOverride: any\n    abortSignal?: AbortSignal\n    network: string\n  }): Promise<SessionTypes.Struct> => {\n    const projectId = provider.providerOpts.projectId\n    invariant(\n      !!projectId,\n      \"Cannot establish connection, WalletConnect projectId is undefined\"\n    )\n\n    let _uri: string | null = null,\n      walletConnectModal: WalletConnectModalType | null = null\n\n    try {\n      const {uri, approval} = await createSessionProposal({\n        provider,\n        existingPairing: pairing,\n        network,\n      })\n\n      if (wcRequestHook && wcRequestHook instanceof Function) {\n        wcRequestHook({\n          type: REQUEST_TYPES.SESSION_REQUEST,\n          method,\n          service,\n          session: null,\n          pairing: pairing ?? null,\n          uri: uri ?? null,\n        })\n      }\n\n      if (isMobile()) {\n        const queryString = new URLSearchParams({uri: uri}).toString()\n        let url = pairing == null ? appLink + \"?\" + queryString : appLink\n        openDeeplink(url)\n      } else if (!pairing) {\n        if (!pairingModalOverride) {\n          walletConnectModal = new (await WalletConnectModal)({\n            projectId,\n          })\n\n          // Open WalletConnectModal\n          walletConnectModal.openModal({\n            uri,\n            onClose,\n          })\n\n          // Subscribe to modal state changes\n          const unsubscribeModal = walletConnectModal.subscribeModal(\n            (state: {open: boolean}) => {\n              if (state.open === false) {\n                onClose?.()\n                unsubscribeModal()\n              }\n            }\n          )\n        } else {\n          pairingModalOverride(uri, onClose)\n        }\n      }\n\n      const session = await Promise.race([\n        approval(),\n        new Promise<never>((_, reject) => {\n          if (abortSignal?.aborted) {\n            reject(new Error(\"Session request aborted\"))\n          }\n          abortSignal?.addEventListener(\"abort\", () => {\n            reject(new Error(\"Session request aborted\"))\n          })\n        }),\n      ])\n\n      if (session == null) {\n        throw new Error(\"Session request failed\")\n      }\n\n      return session\n    } catch (error) {\n      if (error instanceof Error) {\n        log({\n          title: `${error.name} Error establishing WalletConnect session`,\n          message: `\n          ${error.message}\n          uri: ${_uri}\n        `,\n          level: LEVELS.error,\n        })\n      }\n      onClose()\n      throw error\n    } finally {\n      walletConnectModal?.closeModal()\n    }\n  }\n}\n\n/**\n * Show a notification for a WalletConnect request.\n * @param service - The service that is requesting the user's attention.\n * @param user - The user that is being requested to sign a transaction.\n * @returns A close function to dismiss the notification.\n */\nexport function showWcRequestNotification({\n  service,\n  user,\n}: {\n  service: Service\n  user: CurrentUser\n}) {\n  const authnService = user?.services?.find((s: any) => s.type === \"authn\")\n  const walletProvider = authnService?.provider || service.provider\n\n  return showNotification({\n    title: walletProvider?.name || \"Mobile Wallet\",\n    message: isMobile()\n      ? \"Tap to view request in app\"\n      : \"Pending request on your mobile device\",\n    icon: walletProvider?.icon || mobileIcon,\n    onClick:\n      isMobile() && service.uid ? () => openDeeplink(service.uid!) : undefined,\n    debounceDelay: service.type === \"pre-authz\" ? 500 : 0,\n  })\n}\n\nasync function resolveProvider({\n  provider,\n  externalProviderOrTopic,\n}: {\n  provider: Promise<InstanceType<typeof UniversalProvider> | null>\n  externalProviderOrTopic?: string | InstanceType<typeof UniversalProvider>\n}): Promise<{\n  provider: InstanceType<typeof UniversalProvider>\n  isExternal: boolean\n} | null> {\n  if (!externalProviderOrTopic) {\n    const resolved = await provider\n    return resolved ? {provider: resolved, isExternal: false} : null\n  }\n\n  // If it's a UniversalProvider instance, use it directly and store it.\n  if (typeof externalProviderOrTopic !== \"string\") {\n    const topic = externalProviderOrTopic.session?.topic\n    if (!topic) {\n      throw new Error(\n        \"Cannot resolve provider: UniversalProvider is not initialized\"\n      )\n    }\n    providerStore.setState({\n      [topic]: externalProviderOrTopic,\n    })\n    return {provider: externalProviderOrTopic, isExternal: true}\n  }\n\n  const externalTopic = externalProviderOrTopic\n  if (externalTopic) {\n    // Check if an external provider was passed in the options.\n    let storedProvider = providerStore.getState()[externalTopic]\n    if (!storedProvider) {\n      // No provider from opts and nothing in store yet—wait for it.\n      let unsubStore: () => void\n      let timeout: NodeJS.Timeout\n\n      storedProvider = await new Promise<any>((resolve, reject) => {\n        unsubStore = providerStore.subscribe(() => {\n          const provider = providerStore.getState()[externalTopic]\n          if (provider) {\n            resolve(provider)\n          }\n        })\n\n        // If the provider is not defined after 5 seconds, reject the promise.\n        timeout = setTimeout(() => {\n          reject(\n            new Error(\n              `Provider for external topic ${externalTopic} not found after 5 seconds`\n            )\n          )\n        }, 5000)\n      }).finally(() => {\n        clearTimeout(timeout)\n        unsubStore()\n      })\n    }\n\n    return {provider: storedProvider, isExternal: true}\n  }\n\n  const resolved = await provider\n  return resolved ? {provider: resolved, isExternal: false} : null\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/session.ts",
    "content": "import * as fclCore from \"@onflow/fcl-core\"\nimport {FLOW_METHODS} from \"./constants\"\nimport {PairingTypes, SessionTypes} from \"@walletconnect/types\"\nimport {UniversalProvider} from \"@walletconnect/universal-provider\"\nimport {Service} from \"@onflow/typedefs\"\n\n// Create a new session proposal with the WalletConnect client\nexport async function createSessionProposal({\n  provider,\n  existingPairing,\n  network,\n}: {\n  provider: InstanceType<typeof UniversalProvider>\n  existingPairing?: PairingTypes.Struct\n  network?: string\n}) {\n  const _network = network || (await fclCore.getChainId())\n\n  const requiredNamespaces = {\n    flow: {\n      methods: [\n        FLOW_METHODS.FLOW_AUTHN,\n        FLOW_METHODS.FLOW_PRE_AUTHZ,\n        FLOW_METHODS.FLOW_AUTHZ,\n        FLOW_METHODS.FLOW_USER_SIGN,\n      ],\n      chains: [`flow:${_network}`],\n      events: [\"chainChanged\", \"accountsChanged\"],\n    },\n  }\n\n  let cleanup: () => void\n  const uri = new Promise<string>((resolve, reject) => {\n    const onDisplayUri = (uri: string) => {\n      resolve(uri)\n    }\n    provider.on(\"display_uri\", onDisplayUri)\n    cleanup = () => {\n      provider.removeListener(\"display_uri\", onDisplayUri)\n      reject(new Error(\"WalletConnect Session Request aborted\"))\n    }\n  })\n\n  const sessionPromise = provider\n    .connect({\n      pairingTopic: existingPairing?.topic,\n      namespaces: requiredNamespaces,\n    })\n    .finally(() => {\n      cleanup()\n    })\n\n  return {\n    uri: await uri,\n    approval: () => sessionPromise,\n  }\n}\n\nexport const request = async ({\n  method,\n  body,\n  session,\n  provider,\n  isExternal,\n  abortSignal,\n  disableNotifications,\n}: {\n  method: any\n  body: any\n  session: SessionTypes.Struct\n  provider: InstanceType<typeof UniversalProvider>\n  isExternal?: boolean\n  abortSignal?: AbortSignal\n  disableNotifications?: boolean\n}) => {\n  const [chainId, addr, address] = makeSessionData(session)\n  const data = JSON.stringify({...body, addr, address})\n\n  const result: any = await Promise.race([\n    provider.client.request({\n      request: {\n        method,\n        params: [data],\n      },\n      chainId,\n      topic: provider.session?.topic!,\n    }),\n    new Promise((_, reject) => {\n      if (abortSignal?.aborted) {\n        reject(new Error(\"WalletConnect Request aborted\"))\n      }\n      abortSignal?.addEventListener(\"abort\", () => {\n        reject(new Error(\"WalletConnect Request aborted\"))\n      })\n    }),\n  ])\n\n  if (typeof result !== \"object\" || result == null) return\n\n  switch (result.status) {\n    case \"APPROVED\":\n      function addSessionInfo(service: Service) {\n        if (service.method === \"WC/RPC\") {\n          return {\n            ...service,\n            params: {\n              ...service.params,\n              ...(isExternal ? {externalProvider: session.topic} : {}),\n              ...(disableNotifications ? {disableNotifications} : {}),\n            },\n          }\n        }\n        return service\n      }\n\n      if (method === FLOW_METHODS.FLOW_AUTHN) {\n        const services = (result?.data?.services ?? []).map(addSessionInfo)\n\n        return {\n          ...(result.data ? result.data : {}),\n          services,\n        }\n      }\n\n      if (method === FLOW_METHODS.FLOW_PRE_AUTHZ) {\n        return {\n          ...result.data,\n          ...(result.data?.proposer\n            ? {proposer: addSessionInfo(result.data.proposer)}\n            : {}),\n          payer: [...result.data?.payer?.map(addSessionInfo)],\n          authorization: [...result.data?.authorization?.map(addSessionInfo)],\n        }\n      }\n\n      return result.data\n\n    case \"DECLINED\":\n      throw new Error(`Declined: ${result.reason || \"No reason supplied\"}`)\n\n    case \"REDIRECT\":\n      return result.data\n\n    default:\n      throw new Error(`Declined: No reason supplied`)\n  }\n}\n\nexport function makeSessionData(session: SessionTypes.Struct) {\n  const [namespace, reference, address] = Object.values<any>(session.namespaces)\n    .map(namespace => namespace.accounts)\n    .flat()\n    .filter(account => account.startsWith(\"flow:\"))[0]\n    .split(\":\")\n\n  const chainId = `${namespace}:${reference}`\n  const addr = address\n  return [chainId, addr, address]\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/store.ts",
    "content": "export function createStore<T>(initialState: T) {\n  const subscribers = new Set<(state: T) => void>()\n  let state = initialState\n\n  const subscribe = (subscriber: (state: T) => void) => {\n    subscribers.add(subscriber)\n    return () => {\n      subscribers.delete(subscriber)\n    }\n  }\n\n  const setState = (newState: T) => {\n    state = newState\n    subscribers.forEach(subscriber => subscriber(state))\n  }\n\n  const getState = () => state\n\n  return {\n    subscribe,\n    setState,\n    getState,\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/types/declarations.d.ts",
    "content": "declare module \"*.svg\" {\n  const value: string\n  export default value\n}\n\ndeclare module \"*.css\" {\n  const value: string\n  export default value\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/types/types.ts",
    "content": "export type NotificationInfo = {\n  title: string\n  message: string\n  icon?: string\n  onClick?: () => void\n  onDismiss?: () => void\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/ui/components/Notification.tsx",
    "content": "import {NotificationInfo} from \"../../types/types\"\nimport {isMobile} from \"../../utils\"\n\nexport function Notification({\n  title,\n  message,\n  icon,\n  onClick,\n  onDismiss,\n  animate,\n}: NotificationInfo & {animate?: boolean}) {\n  return (\n    <div\n      className={`fixed bottom-3 left-3 right-3 mx-auto z-[2147483647] flex max-w-sm\n        overflow-hidden rounded-lg border border-gray-200 bg-white p-4 shadow-lg\n        md:bottom-4 md:left-auto md:right-4 dark:bg-gray-700 dark:border-gray-600\n        ${animate ? \"animate-slideUp\" : \"\"}`}\n      role=\"alert\"\n      onClick={e => {\n        if (onClick) {\n          e.stopPropagation()\n          onClick?.()\n        }\n      }}\n    >\n      {icon && (\n        <img\n          className=\"h-10 w-10 self-center rounded-md md:self-start\"\n          src={icon}\n          alt={title}\n        />\n      )}\n      <div className=\"ml-3 grow\">\n        <p className=\"text-sm font-medium text-gray-900 dark:text-gray-100\">\n          {title}\n        </p>\n        <p className=\"mt-1 text-sm text-gray-500 dark:text-gray-300\">\n          {message}\n        </p>\n      </div>\n\n      <button\n        className={`ml-2 inline-flex rounded-full text-gray-400 hover:text-gray-500 focus:ring-0\n          dark:text-gray-200 dark:hover:text-gray-300 ${\n          isMobile()\n              ? \"self-center p-2\"\n              : \"self-start p-0 bg-transparent border-transparent focus:border-transparent\"\n          }`}\n        onClick={e => {\n          e.stopPropagation()\n          onDismiss?.()\n        }}\n      >\n        <span className=\"sr-only\">Close</span>\n        <svg\n          className={\"h-5 w-5\"}\n          xmlns=\"http://www.w3.org/2000/svg\"\n          viewBox=\"0 0 20 20\"\n          fill=\"currentColor\"\n          aria-hidden=\"true\"\n        >\n          <path\n            fillRule=\"evenodd\"\n            d=\"M14.354 5.646a.5.5 0 00-.708 0L10 9.293 5.354 4.646a.5.5 0 00-.708.708L9.293 10l-4.647 4.646a.5.5 0 00.708.708L10 10.707l4.646 4.647a.5.5 0 00.708-.708L10.707 10l4.647-4.646a.5.5 0 000-.708z\"\n          />\n        </svg>\n      </button>\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/ui/notifications.tsx",
    "content": "import {render} from \"preact\"\nimport styles from \"./styles.css\"\nimport {Notification} from \"./components/Notification\"\nimport {NotificationInfo} from \"../types/types\"\n\nlet renderRoot: HTMLElement | null = null\nlet id = 0\nlet dismissTimeout: NodeJS.Timeout | null = null\n\nfunction createRenderRoot() {\n  const shadowHost = document.createElement(\"div\")\n  const shadowRoot = shadowHost.attachShadow({mode: \"open\"})\n  const container = document.createElement(\"div\")\n\n  shadowRoot.appendChild(container)\n  document.body.appendChild(shadowHost)\n\n  const style = document.createElement(\"style\")\n  style.textContent = styles\n  shadowRoot.appendChild(style)\n\n  // Subscribe to root dark mode changes to inherit the theme\n  const mediaQuery = window.matchMedia(\"(prefers-color-scheme: dark)\")\n  const listener = () => {\n    container.classList.toggle(\"dark\", mediaQuery.matches)\n  }\n  mediaQuery.addEventListener(\"change\", listener)\n  listener()\n\n  return container\n}\n\n/**\n * Show a notification to the user.  Only one notification can be shown at a time and will replace any existing notification.\n */\nexport function showNotification({\n  title,\n  message,\n  icon,\n  onClick,\n  onDismiss,\n  debounceDelay = 0,\n}: NotificationInfo & {debounceDelay?: number}): {dismiss: () => void} {\n  if (!renderRoot) {\n    renderRoot = createRenderRoot()\n  }\n\n  // Don't animate if we are replacing an existing notification\n  const animate = !dismissTimeout\n  if (dismissTimeout) {\n    clearTimeout(dismissTimeout)\n    dismissTimeout = null\n  }\n\n  render(\n    <Notification\n      key={id++}\n      title={title}\n      message={message}\n      icon={icon}\n      onClick={onClick}\n      onDismiss={() => {\n        onDismiss?.()\n        dismissUi()\n      }}\n      animate={animate}\n    />,\n    renderRoot\n  )\n\n  function dismissUi() {\n    if (renderRoot) {\n      render(null, renderRoot)\n    }\n  }\n\n  return {\n    dismiss: () => {\n      // We need to delay the dismiss to debounce any subsequent notifications\n      // This is important when there is both a FCL/WC authz and pre-authz service\n      dismissTimeout = setTimeout(() => {\n        dismissTimeout = null\n        dismissUi()\n      }, debounceDelay)\n    },\n  }\n}\n"
  },
  {
    "path": "packages/fcl-wc/src/ui/styles.css",
    "content": "@import \"tailwindcss/base\";\n@import \"tailwindcss/components\";\n@import \"tailwindcss/utilities\";\n"
  },
  {
    "path": "packages/fcl-wc/src/utils.ts",
    "content": "import {log, LEVELS} from \"@onflow/util-logger\"\nimport * as fclCore from \"@onflow/fcl-core\"\nimport {FLOW_METHODS, WC_SERVICE_METHOD} from \"./constants\"\nimport {Service} from \"@onflow/typedefs\"\n\nconst PRE_AUTHZ_SERVICE_TYPE = \"pre-authz\"\n\nconst makeFlowServicesFromWallets = (wallets: any[]) => {\n  return Object.values(wallets)\n    .filter(w => w.app_type === \"wallet\")\n    .map(wallet => {\n      return {\n        f_type: \"Service\",\n        f_vsn: \"1.0.0\",\n        type: \"authn\",\n        method: \"WC/RPC\",\n        uid: wallet.mobile?.universal,\n        endpoint: \"flow_authn\",\n        optIn: true,\n        provider: {\n          address: null,\n          name: wallet.name,\n          icon: wallet.image_url?.sm,\n          description: wallet.description,\n          website: wallet.homepage,\n          color: wallet.metadata?.colors?.primary,\n          supportEmail: null,\n        },\n      }\n    })\n}\n\nexport const fetchFlowWallets = async (projectId: string) => {\n  try {\n    const network = await fclCore.getChainId()\n    const wcApiWallets = await fetch(\n      `https://explorer-api.walletconnect.com/v3/wallets?projectId=${projectId}&chains=flow:${network}&entries=5&page=1`\n    ).then(res => res.json())\n\n    if (wcApiWallets?.count > 0) {\n      return makeFlowServicesFromWallets(wcApiWallets.listings)\n    }\n\n    return []\n  } catch (error) {\n    if (error instanceof Error) {\n      log({\n        title: `${error.name} Error fetching wallets from WalletConnect API`,\n        message: error.message,\n        level: LEVELS.error,\n      })\n    }\n  }\n}\n\nexport function isAndroid() {\n  return (\n    typeof navigator !== \"undefined\" && /android/i.test(navigator.userAgent)\n  )\n}\n\nexport function isSmallIOS() {\n  return (\n    typeof navigator !== \"undefined\" && /iPhone|iPod/.test(navigator.userAgent)\n  )\n}\n\nexport function isLargeIOS() {\n  return typeof navigator !== \"undefined\" && /iPad/.test(navigator.userAgent)\n}\n\nexport function isIOS() {\n  return isSmallIOS() || isLargeIOS()\n}\n\nexport function isMobile() {\n  return isAndroid() || isIOS()\n}\n\nexport function openDeeplink(url: string) {\n  if (url.startsWith(\"http\")) {\n    // Workaround for https://github.com/rainbow-me/rainbowkit/issues/524.\n    // Using 'window.open' causes issues on iOS in non-Safari browsers and\n    // WebViews where a blank tab is left behind after connecting.\n    // This is especially bad in some WebView scenarios (e.g. following a\n    // link from Twitter) where the user doesn't have any mechanism for\n    // closing the blank tab.\n    // For whatever reason, links with a target of \"_blank\" don't suffer\n    // from this problem, and programmatically clicking a detached link\n    // element with the same attributes also avoids the issue.\n    const link = document.createElement(\"a\")\n    link.href = url\n    link.target = \"_blank\"\n    link.rel = \"noreferrer noopener\"\n    link.click()\n  } else {\n    window.open(url, \"_blank\")\n  }\n}\n\nexport function shouldDeepLink({service, user}: {service: Service; user: any}) {\n  // Only deeplink on mobile\n  if (!isMobile()) return false\n\n  // If this is an authn request, the user has already been deeplinked by connectWc\n  if (service.endpoint === FLOW_METHODS.FLOW_AUTHN) return false\n\n  // If there was a pre-authz WC request, the user has already been deeplinked\n  if (\n    service.endpoint === FLOW_METHODS.FLOW_AUTHZ &&\n    user?.services?.find(\n      (s: Service) =>\n        s.method === WC_SERVICE_METHOD && s.type === PRE_AUTHZ_SERVICE_TYPE\n    )\n  )\n    return false\n\n  return true\n}\n\nexport function preloadImage(url?: string | null) {\n  if (!url) return\n  const img = new Image()\n  img.src = url\n}\n"
  },
  {
    "path": "packages/fcl-wc/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  content: [\"./src/**/*.{js,jsx,ts,tsx}\"],\n  theme: {\n    extend: {\n      keyframes: {\n        slideUp: {\n          \"0%\": {\n            transform: \"translateY(100%)\",\n          },\n          \"100%\": {\n            transform: \"translateY(0)\",\n          },\n        },\n      },\n      animation: {\n        slideUp: \"slideUp 0.2s ease-out forwards\",\n      },\n    },\n  },\n  darkMode: \"class\",\n  plugins: [],\n}\n"
  },
  {
    "path": "packages/fcl-wc/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"preact\"\n  }\n}\n"
  },
  {
    "path": "packages/protobuf/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/protobuf/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/protobuf/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/protobuf/CHANGELOG.md",
    "content": "# @onflow/protobuf\n\n## 1.3.2\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Update to latest protobufs\n\n## 1.3.0-alpha.0\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Update to latest protobufs\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n## 1.2.1-alpha.0\n\n### Patch Changes\n\n- [#1680](https://github.com/onflow/fcl-js/pull/1680) [`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated dependencies\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.2.0-alpha.2\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.2.0-alpha.1\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.2.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1206](https://github.com/onflow/fcl-js/pull/1206) [`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845) Thanks [@jribbink](https://github.com/jribbink)! - Updated & regenerated protobuf definitions to match current access node specification\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1206](https://github.com/onflow/fcl-js/pull/1206) [`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845) Thanks [@jribbink](https://github.com/jribbink)! - Updated & regenerated protobuf definitions to match current access node specification\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n### 0.1.8 -- 2020-12-11\n\n- 2020-12-11 _non-breaking_ -- Update protobufs according to latest changes to support multi contract and deleted keys\n\n### 0.1.7 -- 2020-09-21\n\n- 2020-09-21 _non-breaking_ -- Update protobuf: BlockEvents now include block timestamp\n\n### 0.1.6 -- 2020-07-27\n\n- 2020-07-27 **BREAKING** -- Update protobufs according to latest changes to support latest get account apis\n\n### 0.1.5 -- 2020-07-21\n\n- 2020-07-21 **BREAKING** -- Update protobufs according to latest changes to support latest get account apis\n\n### 0.1.4 -- 2020-07-13\n\n- 2020-06-10 **BREAKING** -- Update protobufs according to latest changes to support script arguments\n\n### 0.1.3 -- 2020-06-03\n\n- 2020-05-19 **BREAKING** -- Update protobufs according to latest changes to support transaction arguments\n- 2020-04-18 -- VSN jest 25.1.0 -> 25.3.0\n\n### 0.1.2 -- 2020-04-17\n\n- Pre Changelog\n"
  },
  {
    "path": "packages/protobuf/README.md",
    "content": "# @onflow/protobuf\n\nThis package contains the protobuf files used by the Flow JS SDK to communicate with the Access API.\n\n# Status\n\n- **Last Updated:** July 27th 2020\n- **Stable:** Yes\n- **Risk of Breaking Change:** High\n\nThese change when the access nodes need different data. If the access nodes introduce a breaking change this package will proxy that breaking change into the SDK and FCL.\nThis risk is what lead us to the interaction abstraction and our send functions acting as a translation layer between the interaction and these.\n\n# Install\n\n```bash\nnpm install --save @onflow/protobuf\n```\n\n## Versioning\n\nThe version of this package reflects the version of the AccessAPI spec for which it supports.\n\n## Generating Protobuf Files\n\nFirst, ensure you have `protoc` installed on your machine. `protoc` is a tool that will allow us to generate js-protobuf files. To install `protoc`, follow the guide available here https://grpc.io/docs/quickstart/go/#protocol-buffers (note: MacOS users can install `protoc` using homebrew: `brew install protoc`)\n\nTo generate the js-protobuf files, run the generate script in package json:\n\n```\nnpm run generate\n```\n"
  },
  {
    "path": "packages/protobuf/package.json",
    "content": "{\n  \"name\": \"@onflow/protobuf\",\n  \"version\": \"1.3.2\",\n  \"description\": \"Access Node Protobuf\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"ajv-keywords\": \"^3.5.2\",\n    \"colorette\": \"^2.0.20\",\n    \"jest\": \"^29.7.0\",\n    \"path\": \"0.12.7\",\n    \"rechoir\": \"^0.8.0\",\n    \"ts-protoc-gen\": \"0.12.0\",\n    \"typescript\": \"3.8.3\",\n    \"webpack\": \"^5.95.0\",\n    \"webpack-cli\": \"^5.1.4\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"webpack --mode=production\",\n    \"generate\": \"protoc --plugin='protoc-gen-ts=../../node_modules/.bin/protoc-gen-ts' --js_out='import_style=commonjs,binary:src/generated' --ts_out='service=grpc-web:src/generated' -I ./src/proto ./src/proto/flow/**/*.proto;\"\n  },\n  \"dependencies\": {\n    \"@improbable-eng/grpc-web\": \"^0.12.0\",\n    \"elliptic\": \"^6.5.4\",\n    \"google-protobuf\": \"3.11.4\"\n  }\n}\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/access/access_pb.d.ts",
    "content": "// package: flow.access\n// file: flow/access/access.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as flow_entities_account_pb from \"../../flow/entities/account_pb\";\nimport * as flow_entities_block_header_pb from \"../../flow/entities/block_header_pb\";\nimport * as flow_entities_block_pb from \"../../flow/entities/block_pb\";\nimport * as flow_entities_collection_pb from \"../../flow/entities/collection_pb\";\nimport * as flow_entities_event_pb from \"../../flow/entities/event_pb\";\nimport * as flow_entities_execution_result_pb from \"../../flow/entities/execution_result_pb\";\nimport * as flow_entities_metadata_pb from \"../../flow/entities/metadata_pb\";\nimport * as flow_entities_node_version_info_pb from \"../../flow/entities/node_version_info_pb\";\nimport * as flow_entities_transaction_pb from \"../../flow/entities/transaction_pb\";\nimport * as google_protobuf_timestamp_pb from \"google-protobuf/google/protobuf/timestamp_pb\";\n\nexport class PingRequest extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): PingRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: PingRequest): PingRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: PingRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): PingRequest;\n  static deserializeBinaryFromReader(message: PingRequest, reader: jspb.BinaryReader): PingRequest;\n}\n\nexport namespace PingRequest {\n  export type AsObject = {\n  }\n}\n\nexport class PingResponse extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): PingResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: PingResponse): PingResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: PingResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): PingResponse;\n  static deserializeBinaryFromReader(message: PingResponse, reader: jspb.BinaryReader): PingResponse;\n}\n\nexport namespace PingResponse {\n  export type AsObject = {\n  }\n}\n\nexport class GetNodeVersionInfoRequest extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetNodeVersionInfoRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetNodeVersionInfoRequest): GetNodeVersionInfoRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetNodeVersionInfoRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetNodeVersionInfoRequest;\n  static deserializeBinaryFromReader(message: GetNodeVersionInfoRequest, reader: jspb.BinaryReader): GetNodeVersionInfoRequest;\n}\n\nexport namespace GetNodeVersionInfoRequest {\n  export type AsObject = {\n  }\n}\n\nexport class GetNodeVersionInfoResponse extends jspb.Message {\n  hasInfo(): boolean;\n  clearInfo(): void;\n  getInfo(): flow_entities_node_version_info_pb.NodeVersionInfo | undefined;\n  setInfo(value?: flow_entities_node_version_info_pb.NodeVersionInfo): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetNodeVersionInfoResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetNodeVersionInfoResponse): GetNodeVersionInfoResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetNodeVersionInfoResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetNodeVersionInfoResponse;\n  static deserializeBinaryFromReader(message: GetNodeVersionInfoResponse, reader: jspb.BinaryReader): GetNodeVersionInfoResponse;\n}\n\nexport namespace GetNodeVersionInfoResponse {\n  export type AsObject = {\n    info?: flow_entities_node_version_info_pb.NodeVersionInfo.AsObject,\n  }\n}\n\nexport class GetLatestBlockHeaderRequest extends jspb.Message {\n  getIsSealed(): boolean;\n  setIsSealed(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetLatestBlockHeaderRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetLatestBlockHeaderRequest): GetLatestBlockHeaderRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetLatestBlockHeaderRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetLatestBlockHeaderRequest;\n  static deserializeBinaryFromReader(message: GetLatestBlockHeaderRequest, reader: jspb.BinaryReader): GetLatestBlockHeaderRequest;\n}\n\nexport namespace GetLatestBlockHeaderRequest {\n  export type AsObject = {\n    isSealed: boolean,\n  }\n}\n\nexport class GetBlockHeaderByIDRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetBlockHeaderByIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetBlockHeaderByIDRequest): GetBlockHeaderByIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetBlockHeaderByIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetBlockHeaderByIDRequest;\n  static deserializeBinaryFromReader(message: GetBlockHeaderByIDRequest, reader: jspb.BinaryReader): GetBlockHeaderByIDRequest;\n}\n\nexport namespace GetBlockHeaderByIDRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n  }\n}\n\nexport class GetBlockHeaderByHeightRequest extends jspb.Message {\n  getHeight(): number;\n  setHeight(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetBlockHeaderByHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetBlockHeaderByHeightRequest): GetBlockHeaderByHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetBlockHeaderByHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetBlockHeaderByHeightRequest;\n  static deserializeBinaryFromReader(message: GetBlockHeaderByHeightRequest, reader: jspb.BinaryReader): GetBlockHeaderByHeightRequest;\n}\n\nexport namespace GetBlockHeaderByHeightRequest {\n  export type AsObject = {\n    height: number,\n  }\n}\n\nexport class BlockHeaderResponse extends jspb.Message {\n  hasBlock(): boolean;\n  clearBlock(): void;\n  getBlock(): flow_entities_block_header_pb.BlockHeader | undefined;\n  setBlock(value?: flow_entities_block_header_pb.BlockHeader): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockHeaderResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockHeaderResponse): BlockHeaderResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockHeaderResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockHeaderResponse;\n  static deserializeBinaryFromReader(message: BlockHeaderResponse, reader: jspb.BinaryReader): BlockHeaderResponse;\n}\n\nexport namespace BlockHeaderResponse {\n  export type AsObject = {\n    block?: flow_entities_block_header_pb.BlockHeader.AsObject,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetLatestBlockRequest extends jspb.Message {\n  getIsSealed(): boolean;\n  setIsSealed(value: boolean): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetLatestBlockRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetLatestBlockRequest): GetLatestBlockRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetLatestBlockRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetLatestBlockRequest;\n  static deserializeBinaryFromReader(message: GetLatestBlockRequest, reader: jspb.BinaryReader): GetLatestBlockRequest;\n}\n\nexport namespace GetLatestBlockRequest {\n  export type AsObject = {\n    isSealed: boolean,\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class GetBlockByIDRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetBlockByIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetBlockByIDRequest): GetBlockByIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetBlockByIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetBlockByIDRequest;\n  static deserializeBinaryFromReader(message: GetBlockByIDRequest, reader: jspb.BinaryReader): GetBlockByIDRequest;\n}\n\nexport namespace GetBlockByIDRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class GetBlockByHeightRequest extends jspb.Message {\n  getHeight(): number;\n  setHeight(value: number): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetBlockByHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetBlockByHeightRequest): GetBlockByHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetBlockByHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetBlockByHeightRequest;\n  static deserializeBinaryFromReader(message: GetBlockByHeightRequest, reader: jspb.BinaryReader): GetBlockByHeightRequest;\n}\n\nexport namespace GetBlockByHeightRequest {\n  export type AsObject = {\n    height: number,\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class BlockResponse extends jspb.Message {\n  hasBlock(): boolean;\n  clearBlock(): void;\n  getBlock(): flow_entities_block_pb.Block | undefined;\n  setBlock(value?: flow_entities_block_pb.Block): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockResponse): BlockResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockResponse;\n  static deserializeBinaryFromReader(message: BlockResponse, reader: jspb.BinaryReader): BlockResponse;\n}\n\nexport namespace BlockResponse {\n  export type AsObject = {\n    block?: flow_entities_block_pb.Block.AsObject,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetCollectionByIDRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetCollectionByIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetCollectionByIDRequest): GetCollectionByIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetCollectionByIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetCollectionByIDRequest;\n  static deserializeBinaryFromReader(message: GetCollectionByIDRequest, reader: jspb.BinaryReader): GetCollectionByIDRequest;\n}\n\nexport namespace GetCollectionByIDRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n  }\n}\n\nexport class CollectionResponse extends jspb.Message {\n  hasCollection(): boolean;\n  clearCollection(): void;\n  getCollection(): flow_entities_collection_pb.Collection | undefined;\n  setCollection(value?: flow_entities_collection_pb.Collection): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): CollectionResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: CollectionResponse): CollectionResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: CollectionResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): CollectionResponse;\n  static deserializeBinaryFromReader(message: CollectionResponse, reader: jspb.BinaryReader): CollectionResponse;\n}\n\nexport namespace CollectionResponse {\n  export type AsObject = {\n    collection?: flow_entities_collection_pb.Collection.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class SendTransactionRequest extends jspb.Message {\n  hasTransaction(): boolean;\n  clearTransaction(): void;\n  getTransaction(): flow_entities_transaction_pb.Transaction | undefined;\n  setTransaction(value?: flow_entities_transaction_pb.Transaction): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SendTransactionRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SendTransactionRequest): SendTransactionRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SendTransactionRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SendTransactionRequest;\n  static deserializeBinaryFromReader(message: SendTransactionRequest, reader: jspb.BinaryReader): SendTransactionRequest;\n}\n\nexport namespace SendTransactionRequest {\n  export type AsObject = {\n    transaction?: flow_entities_transaction_pb.Transaction.AsObject,\n  }\n}\n\nexport class SendTransactionResponse extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SendTransactionResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SendTransactionResponse): SendTransactionResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SendTransactionResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SendTransactionResponse;\n  static deserializeBinaryFromReader(message: SendTransactionResponse, reader: jspb.BinaryReader): SendTransactionResponse;\n}\n\nexport namespace SendTransactionResponse {\n  export type AsObject = {\n    id: Uint8Array | string,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetTransactionRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getCollectionId(): Uint8Array | string;\n  getCollectionId_asU8(): Uint8Array;\n  getCollectionId_asB64(): string;\n  setCollectionId(value: Uint8Array | string): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionRequest): GetTransactionRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionRequest;\n  static deserializeBinaryFromReader(message: GetTransactionRequest, reader: jspb.BinaryReader): GetTransactionRequest;\n}\n\nexport namespace GetTransactionRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n    blockId: Uint8Array | string,\n    collectionId: Uint8Array | string,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetSystemTransactionRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetSystemTransactionRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetSystemTransactionRequest): GetSystemTransactionRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetSystemTransactionRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetSystemTransactionRequest;\n  static deserializeBinaryFromReader(message: GetSystemTransactionRequest, reader: jspb.BinaryReader): GetSystemTransactionRequest;\n}\n\nexport namespace GetSystemTransactionRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n  }\n}\n\nexport class GetSystemTransactionResultRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetSystemTransactionResultRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetSystemTransactionResultRequest): GetSystemTransactionResultRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetSystemTransactionResultRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetSystemTransactionResultRequest;\n  static deserializeBinaryFromReader(message: GetSystemTransactionResultRequest, reader: jspb.BinaryReader): GetSystemTransactionResultRequest;\n}\n\nexport namespace GetSystemTransactionResultRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetTransactionByIndexRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getIndex(): number;\n  setIndex(value: number): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionByIndexRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionByIndexRequest): GetTransactionByIndexRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionByIndexRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionByIndexRequest;\n  static deserializeBinaryFromReader(message: GetTransactionByIndexRequest, reader: jspb.BinaryReader): GetTransactionByIndexRequest;\n}\n\nexport namespace GetTransactionByIndexRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    index: number,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetTransactionsByBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionsByBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionsByBlockIDRequest): GetTransactionsByBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionsByBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionsByBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetTransactionsByBlockIDRequest, reader: jspb.BinaryReader): GetTransactionsByBlockIDRequest;\n}\n\nexport namespace GetTransactionsByBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class TransactionResultsResponse extends jspb.Message {\n  clearTransactionResultsList(): void;\n  getTransactionResultsList(): Array<TransactionResultResponse>;\n  setTransactionResultsList(value: Array<TransactionResultResponse>): void;\n  addTransactionResults(value?: TransactionResultResponse, index?: number): TransactionResultResponse;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TransactionResultsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: TransactionResultsResponse): TransactionResultsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TransactionResultsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TransactionResultsResponse;\n  static deserializeBinaryFromReader(message: TransactionResultsResponse, reader: jspb.BinaryReader): TransactionResultsResponse;\n}\n\nexport namespace TransactionResultsResponse {\n  export type AsObject = {\n    transactionResultsList: Array<TransactionResultResponse.AsObject>,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class TransactionsResponse extends jspb.Message {\n  clearTransactionsList(): void;\n  getTransactionsList(): Array<flow_entities_transaction_pb.Transaction>;\n  setTransactionsList(value: Array<flow_entities_transaction_pb.Transaction>): void;\n  addTransactions(value?: flow_entities_transaction_pb.Transaction, index?: number): flow_entities_transaction_pb.Transaction;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TransactionsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: TransactionsResponse): TransactionsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TransactionsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TransactionsResponse;\n  static deserializeBinaryFromReader(message: TransactionsResponse, reader: jspb.BinaryReader): TransactionsResponse;\n}\n\nexport namespace TransactionsResponse {\n  export type AsObject = {\n    transactionsList: Array<flow_entities_transaction_pb.Transaction.AsObject>,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class TransactionResponse extends jspb.Message {\n  hasTransaction(): boolean;\n  clearTransaction(): void;\n  getTransaction(): flow_entities_transaction_pb.Transaction | undefined;\n  setTransaction(value?: flow_entities_transaction_pb.Transaction): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TransactionResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: TransactionResponse): TransactionResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TransactionResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TransactionResponse;\n  static deserializeBinaryFromReader(message: TransactionResponse, reader: jspb.BinaryReader): TransactionResponse;\n}\n\nexport namespace TransactionResponse {\n  export type AsObject = {\n    transaction?: flow_entities_transaction_pb.Transaction.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class TransactionResultResponse extends jspb.Message {\n  getStatus(): flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap];\n  setStatus(value: flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap]): void;\n\n  getStatusCode(): number;\n  setStatusCode(value: number): void;\n\n  getErrorMessage(): string;\n  setErrorMessage(value: string): void;\n\n  clearEventsList(): void;\n  getEventsList(): Array<flow_entities_event_pb.Event>;\n  setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n  addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  getCollectionId(): Uint8Array | string;\n  getCollectionId_asU8(): Uint8Array;\n  getCollectionId_asB64(): string;\n  setCollectionId(value: Uint8Array | string): void;\n\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  getComputationUsage(): number;\n  setComputationUsage(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TransactionResultResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: TransactionResultResponse): TransactionResultResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TransactionResultResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TransactionResultResponse;\n  static deserializeBinaryFromReader(message: TransactionResultResponse, reader: jspb.BinaryReader): TransactionResultResponse;\n}\n\nexport namespace TransactionResultResponse {\n  export type AsObject = {\n    status: flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap],\n    statusCode: number,\n    errorMessage: string,\n    eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n    blockId: Uint8Array | string,\n    transactionId: Uint8Array | string,\n    collectionId: Uint8Array | string,\n    blockHeight: number,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n    computationUsage: number,\n  }\n}\n\nexport class GetAccountRequest extends jspb.Message {\n  getAddress(): Uint8Array | string;\n  getAddress_asU8(): Uint8Array;\n  getAddress_asB64(): string;\n  setAddress(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountRequest): GetAccountRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountRequest;\n  static deserializeBinaryFromReader(message: GetAccountRequest, reader: jspb.BinaryReader): GetAccountRequest;\n}\n\nexport namespace GetAccountRequest {\n  export type AsObject = {\n    address: Uint8Array | string,\n  }\n}\n\nexport class GetAccountResponse extends jspb.Message {\n  hasAccount(): boolean;\n  clearAccount(): void;\n  getAccount(): flow_entities_account_pb.Account | undefined;\n  setAccount(value?: flow_entities_account_pb.Account): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountResponse): GetAccountResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountResponse;\n  static deserializeBinaryFromReader(message: GetAccountResponse, reader: jspb.BinaryReader): GetAccountResponse;\n}\n\nexport namespace GetAccountResponse {\n  export type AsObject = {\n    account?: flow_entities_account_pb.Account.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetAccountAtLatestBlockRequest extends jspb.Message {\n  getAddress(): Uint8Array | string;\n  getAddress_asU8(): Uint8Array;\n  getAddress_asB64(): string;\n  setAddress(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountAtLatestBlockRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountAtLatestBlockRequest): GetAccountAtLatestBlockRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountAtLatestBlockRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountAtLatestBlockRequest;\n  static deserializeBinaryFromReader(message: GetAccountAtLatestBlockRequest, reader: jspb.BinaryReader): GetAccountAtLatestBlockRequest;\n}\n\nexport namespace GetAccountAtLatestBlockRequest {\n  export type AsObject = {\n    address: Uint8Array | string,\n  }\n}\n\nexport class AccountResponse extends jspb.Message {\n  hasAccount(): boolean;\n  clearAccount(): void;\n  getAccount(): flow_entities_account_pb.Account | undefined;\n  setAccount(value?: flow_entities_account_pb.Account): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): AccountResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: AccountResponse): AccountResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: AccountResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): AccountResponse;\n  static deserializeBinaryFromReader(message: AccountResponse, reader: jspb.BinaryReader): AccountResponse;\n}\n\nexport namespace AccountResponse {\n  export type AsObject = {\n    account?: flow_entities_account_pb.Account.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetAccountAtBlockHeightRequest extends jspb.Message {\n  getAddress(): Uint8Array | string;\n  getAddress_asU8(): Uint8Array;\n  getAddress_asB64(): string;\n  setAddress(value: Uint8Array | string): void;\n\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountAtBlockHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountAtBlockHeightRequest): GetAccountAtBlockHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountAtBlockHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountAtBlockHeightRequest;\n  static deserializeBinaryFromReader(message: GetAccountAtBlockHeightRequest, reader: jspb.BinaryReader): GetAccountAtBlockHeightRequest;\n}\n\nexport namespace GetAccountAtBlockHeightRequest {\n  export type AsObject = {\n    address: Uint8Array | string,\n    blockHeight: number,\n  }\n}\n\nexport class ExecuteScriptAtLatestBlockRequest extends jspb.Message {\n  getScript(): Uint8Array | string;\n  getScript_asU8(): Uint8Array;\n  getScript_asB64(): string;\n  setScript(value: Uint8Array | string): void;\n\n  clearArgumentsList(): void;\n  getArgumentsList(): Array<Uint8Array | string>;\n  getArgumentsList_asU8(): Array<Uint8Array>;\n  getArgumentsList_asB64(): Array<string>;\n  setArgumentsList(value: Array<Uint8Array | string>): void;\n  addArguments(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptAtLatestBlockRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptAtLatestBlockRequest): ExecuteScriptAtLatestBlockRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptAtLatestBlockRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptAtLatestBlockRequest;\n  static deserializeBinaryFromReader(message: ExecuteScriptAtLatestBlockRequest, reader: jspb.BinaryReader): ExecuteScriptAtLatestBlockRequest;\n}\n\nexport namespace ExecuteScriptAtLatestBlockRequest {\n  export type AsObject = {\n    script: Uint8Array | string,\n    argumentsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class ExecuteScriptAtBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getScript(): Uint8Array | string;\n  getScript_asU8(): Uint8Array;\n  getScript_asB64(): string;\n  setScript(value: Uint8Array | string): void;\n\n  clearArgumentsList(): void;\n  getArgumentsList(): Array<Uint8Array | string>;\n  getArgumentsList_asU8(): Array<Uint8Array>;\n  getArgumentsList_asB64(): Array<string>;\n  setArgumentsList(value: Array<Uint8Array | string>): void;\n  addArguments(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptAtBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptAtBlockIDRequest): ExecuteScriptAtBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptAtBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptAtBlockIDRequest;\n  static deserializeBinaryFromReader(message: ExecuteScriptAtBlockIDRequest, reader: jspb.BinaryReader): ExecuteScriptAtBlockIDRequest;\n}\n\nexport namespace ExecuteScriptAtBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    script: Uint8Array | string,\n    argumentsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class ExecuteScriptAtBlockHeightRequest extends jspb.Message {\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  getScript(): Uint8Array | string;\n  getScript_asU8(): Uint8Array;\n  getScript_asB64(): string;\n  setScript(value: Uint8Array | string): void;\n\n  clearArgumentsList(): void;\n  getArgumentsList(): Array<Uint8Array | string>;\n  getArgumentsList_asU8(): Array<Uint8Array>;\n  getArgumentsList_asB64(): Array<string>;\n  setArgumentsList(value: Array<Uint8Array | string>): void;\n  addArguments(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptAtBlockHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptAtBlockHeightRequest): ExecuteScriptAtBlockHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptAtBlockHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptAtBlockHeightRequest;\n  static deserializeBinaryFromReader(message: ExecuteScriptAtBlockHeightRequest, reader: jspb.BinaryReader): ExecuteScriptAtBlockHeightRequest;\n}\n\nexport namespace ExecuteScriptAtBlockHeightRequest {\n  export type AsObject = {\n    blockHeight: number,\n    script: Uint8Array | string,\n    argumentsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class ExecuteScriptResponse extends jspb.Message {\n  getValue(): Uint8Array | string;\n  getValue_asU8(): Uint8Array;\n  getValue_asB64(): string;\n  setValue(value: Uint8Array | string): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  getComputationUsage(): number;\n  setComputationUsage(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptResponse): ExecuteScriptResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptResponse;\n  static deserializeBinaryFromReader(message: ExecuteScriptResponse, reader: jspb.BinaryReader): ExecuteScriptResponse;\n}\n\nexport namespace ExecuteScriptResponse {\n  export type AsObject = {\n    value: Uint8Array | string,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n    computationUsage: number,\n  }\n}\n\nexport class GetEventsForHeightRangeRequest extends jspb.Message {\n  getType(): string;\n  setType(value: string): void;\n\n  getStartHeight(): number;\n  setStartHeight(value: number): void;\n\n  getEndHeight(): number;\n  setEndHeight(value: number): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetEventsForHeightRangeRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetEventsForHeightRangeRequest): GetEventsForHeightRangeRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetEventsForHeightRangeRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetEventsForHeightRangeRequest;\n  static deserializeBinaryFromReader(message: GetEventsForHeightRangeRequest, reader: jspb.BinaryReader): GetEventsForHeightRangeRequest;\n}\n\nexport namespace GetEventsForHeightRangeRequest {\n  export type AsObject = {\n    type: string,\n    startHeight: number,\n    endHeight: number,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetEventsForBlockIDsRequest extends jspb.Message {\n  getType(): string;\n  setType(value: string): void;\n\n  clearBlockIdsList(): void;\n  getBlockIdsList(): Array<Uint8Array | string>;\n  getBlockIdsList_asU8(): Array<Uint8Array>;\n  getBlockIdsList_asB64(): Array<string>;\n  setBlockIdsList(value: Array<Uint8Array | string>): void;\n  addBlockIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetEventsForBlockIDsRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetEventsForBlockIDsRequest): GetEventsForBlockIDsRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetEventsForBlockIDsRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetEventsForBlockIDsRequest;\n  static deserializeBinaryFromReader(message: GetEventsForBlockIDsRequest, reader: jspb.BinaryReader): GetEventsForBlockIDsRequest;\n}\n\nexport namespace GetEventsForBlockIDsRequest {\n  export type AsObject = {\n    type: string,\n    blockIdsList: Array<Uint8Array | string>,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class EventsResponse extends jspb.Message {\n  clearResultsList(): void;\n  getResultsList(): Array<EventsResponse.Result>;\n  setResultsList(value: Array<EventsResponse.Result>): void;\n  addResults(value?: EventsResponse.Result, index?: number): EventsResponse.Result;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): EventsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: EventsResponse): EventsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: EventsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): EventsResponse;\n  static deserializeBinaryFromReader(message: EventsResponse, reader: jspb.BinaryReader): EventsResponse;\n}\n\nexport namespace EventsResponse {\n  export type AsObject = {\n    resultsList: Array<EventsResponse.Result.AsObject>,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n\n  export class Result extends jspb.Message {\n    getBlockId(): Uint8Array | string;\n    getBlockId_asU8(): Uint8Array;\n    getBlockId_asB64(): string;\n    setBlockId(value: Uint8Array | string): void;\n\n    getBlockHeight(): number;\n    setBlockHeight(value: number): void;\n\n    clearEventsList(): void;\n    getEventsList(): Array<flow_entities_event_pb.Event>;\n    setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n    addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n    hasBlockTimestamp(): boolean;\n    clearBlockTimestamp(): void;\n    getBlockTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n    setBlockTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): Result.AsObject;\n    static toObject(includeInstance: boolean, msg: Result): Result.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n    static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): Result;\n    static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;\n  }\n\n  export namespace Result {\n    export type AsObject = {\n      blockId: Uint8Array | string,\n      blockHeight: number,\n      eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n      blockTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n    }\n  }\n}\n\nexport class GetNetworkParametersRequest extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetNetworkParametersRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetNetworkParametersRequest): GetNetworkParametersRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetNetworkParametersRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetNetworkParametersRequest;\n  static deserializeBinaryFromReader(message: GetNetworkParametersRequest, reader: jspb.BinaryReader): GetNetworkParametersRequest;\n}\n\nexport namespace GetNetworkParametersRequest {\n  export type AsObject = {\n  }\n}\n\nexport class GetNetworkParametersResponse extends jspb.Message {\n  getChainId(): string;\n  setChainId(value: string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetNetworkParametersResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetNetworkParametersResponse): GetNetworkParametersResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetNetworkParametersResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetNetworkParametersResponse;\n  static deserializeBinaryFromReader(message: GetNetworkParametersResponse, reader: jspb.BinaryReader): GetNetworkParametersResponse;\n}\n\nexport namespace GetNetworkParametersResponse {\n  export type AsObject = {\n    chainId: string,\n  }\n}\n\nexport class GetLatestProtocolStateSnapshotRequest extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetLatestProtocolStateSnapshotRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetLatestProtocolStateSnapshotRequest): GetLatestProtocolStateSnapshotRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetLatestProtocolStateSnapshotRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetLatestProtocolStateSnapshotRequest;\n  static deserializeBinaryFromReader(message: GetLatestProtocolStateSnapshotRequest, reader: jspb.BinaryReader): GetLatestProtocolStateSnapshotRequest;\n}\n\nexport namespace GetLatestProtocolStateSnapshotRequest {\n  export type AsObject = {\n  }\n}\n\nexport class GetProtocolStateSnapshotByBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetProtocolStateSnapshotByBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetProtocolStateSnapshotByBlockIDRequest): GetProtocolStateSnapshotByBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetProtocolStateSnapshotByBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetProtocolStateSnapshotByBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetProtocolStateSnapshotByBlockIDRequest, reader: jspb.BinaryReader): GetProtocolStateSnapshotByBlockIDRequest;\n}\n\nexport namespace GetProtocolStateSnapshotByBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n  }\n}\n\nexport class GetProtocolStateSnapshotByHeightRequest extends jspb.Message {\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetProtocolStateSnapshotByHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetProtocolStateSnapshotByHeightRequest): GetProtocolStateSnapshotByHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetProtocolStateSnapshotByHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetProtocolStateSnapshotByHeightRequest;\n  static deserializeBinaryFromReader(message: GetProtocolStateSnapshotByHeightRequest, reader: jspb.BinaryReader): GetProtocolStateSnapshotByHeightRequest;\n}\n\nexport namespace GetProtocolStateSnapshotByHeightRequest {\n  export type AsObject = {\n    blockHeight: number,\n  }\n}\n\nexport class ProtocolStateSnapshotResponse extends jspb.Message {\n  getSerializedsnapshot(): Uint8Array | string;\n  getSerializedsnapshot_asU8(): Uint8Array;\n  getSerializedsnapshot_asB64(): string;\n  setSerializedsnapshot(value: Uint8Array | string): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ProtocolStateSnapshotResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: ProtocolStateSnapshotResponse): ProtocolStateSnapshotResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ProtocolStateSnapshotResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ProtocolStateSnapshotResponse;\n  static deserializeBinaryFromReader(message: ProtocolStateSnapshotResponse, reader: jspb.BinaryReader): ProtocolStateSnapshotResponse;\n}\n\nexport namespace ProtocolStateSnapshotResponse {\n  export type AsObject = {\n    serializedsnapshot: Uint8Array | string,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetExecutionResultForBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetExecutionResultForBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetExecutionResultForBlockIDRequest): GetExecutionResultForBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetExecutionResultForBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetExecutionResultForBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetExecutionResultForBlockIDRequest, reader: jspb.BinaryReader): GetExecutionResultForBlockIDRequest;\n}\n\nexport namespace GetExecutionResultForBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n  }\n}\n\nexport class ExecutionResultForBlockIDResponse extends jspb.Message {\n  hasExecutionResult(): boolean;\n  clearExecutionResult(): void;\n  getExecutionResult(): flow_entities_execution_result_pb.ExecutionResult | undefined;\n  setExecutionResult(value?: flow_entities_execution_result_pb.ExecutionResult): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionResultForBlockIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionResultForBlockIDResponse): ExecutionResultForBlockIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionResultForBlockIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionResultForBlockIDResponse;\n  static deserializeBinaryFromReader(message: ExecutionResultForBlockIDResponse, reader: jspb.BinaryReader): ExecutionResultForBlockIDResponse;\n}\n\nexport namespace ExecutionResultForBlockIDResponse {\n  export type AsObject = {\n    executionResult?: flow_entities_execution_result_pb.ExecutionResult.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class GetExecutionResultByIDRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetExecutionResultByIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetExecutionResultByIDRequest): GetExecutionResultByIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetExecutionResultByIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetExecutionResultByIDRequest;\n  static deserializeBinaryFromReader(message: GetExecutionResultByIDRequest, reader: jspb.BinaryReader): GetExecutionResultByIDRequest;\n}\n\nexport namespace GetExecutionResultByIDRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n  }\n}\n\nexport class ExecutionResultByIDResponse extends jspb.Message {\n  hasExecutionResult(): boolean;\n  clearExecutionResult(): void;\n  getExecutionResult(): flow_entities_execution_result_pb.ExecutionResult | undefined;\n  setExecutionResult(value?: flow_entities_execution_result_pb.ExecutionResult): void;\n\n  hasMetadata(): boolean;\n  clearMetadata(): void;\n  getMetadata(): flow_entities_metadata_pb.Metadata | undefined;\n  setMetadata(value?: flow_entities_metadata_pb.Metadata): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionResultByIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionResultByIDResponse): ExecutionResultByIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionResultByIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionResultByIDResponse;\n  static deserializeBinaryFromReader(message: ExecutionResultByIDResponse, reader: jspb.BinaryReader): ExecutionResultByIDResponse;\n}\n\nexport namespace ExecutionResultByIDResponse {\n  export type AsObject = {\n    executionResult?: flow_entities_execution_result_pb.ExecutionResult.AsObject,\n    metadata?: flow_entities_metadata_pb.Metadata.AsObject,\n  }\n}\n\nexport class SubscribeBlocksFromStartBlockIDRequest extends jspb.Message {\n  getStartBlockId(): Uint8Array | string;\n  getStartBlockId_asU8(): Uint8Array;\n  getStartBlockId_asB64(): string;\n  setStartBlockId(value: Uint8Array | string): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlocksFromStartBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlocksFromStartBlockIDRequest): SubscribeBlocksFromStartBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlocksFromStartBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlocksFromStartBlockIDRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlocksFromStartBlockIDRequest, reader: jspb.BinaryReader): SubscribeBlocksFromStartBlockIDRequest;\n}\n\nexport namespace SubscribeBlocksFromStartBlockIDRequest {\n  export type AsObject = {\n    startBlockId: Uint8Array | string,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class SubscribeBlocksFromStartHeightRequest extends jspb.Message {\n  getStartBlockHeight(): number;\n  setStartBlockHeight(value: number): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlocksFromStartHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlocksFromStartHeightRequest): SubscribeBlocksFromStartHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlocksFromStartHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlocksFromStartHeightRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlocksFromStartHeightRequest, reader: jspb.BinaryReader): SubscribeBlocksFromStartHeightRequest;\n}\n\nexport namespace SubscribeBlocksFromStartHeightRequest {\n  export type AsObject = {\n    startBlockHeight: number,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class SubscribeBlocksFromLatestRequest extends jspb.Message {\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  getFullBlockResponse(): boolean;\n  setFullBlockResponse(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlocksFromLatestRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlocksFromLatestRequest): SubscribeBlocksFromLatestRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlocksFromLatestRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlocksFromLatestRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlocksFromLatestRequest, reader: jspb.BinaryReader): SubscribeBlocksFromLatestRequest;\n}\n\nexport namespace SubscribeBlocksFromLatestRequest {\n  export type AsObject = {\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n    fullBlockResponse: boolean,\n  }\n}\n\nexport class SubscribeBlocksResponse extends jspb.Message {\n  hasBlock(): boolean;\n  clearBlock(): void;\n  getBlock(): flow_entities_block_pb.Block | undefined;\n  setBlock(value?: flow_entities_block_pb.Block): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlocksResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlocksResponse): SubscribeBlocksResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlocksResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlocksResponse;\n  static deserializeBinaryFromReader(message: SubscribeBlocksResponse, reader: jspb.BinaryReader): SubscribeBlocksResponse;\n}\n\nexport namespace SubscribeBlocksResponse {\n  export type AsObject = {\n    block?: flow_entities_block_pb.Block.AsObject,\n  }\n}\n\nexport class SubscribeBlockHeadersFromStartBlockIDRequest extends jspb.Message {\n  getStartBlockId(): Uint8Array | string;\n  getStartBlockId_asU8(): Uint8Array;\n  getStartBlockId_asB64(): string;\n  setStartBlockId(value: Uint8Array | string): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockHeadersFromStartBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockHeadersFromStartBlockIDRequest): SubscribeBlockHeadersFromStartBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockHeadersFromStartBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockHeadersFromStartBlockIDRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockHeadersFromStartBlockIDRequest, reader: jspb.BinaryReader): SubscribeBlockHeadersFromStartBlockIDRequest;\n}\n\nexport namespace SubscribeBlockHeadersFromStartBlockIDRequest {\n  export type AsObject = {\n    startBlockId: Uint8Array | string,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockHeadersFromStartHeightRequest extends jspb.Message {\n  getStartBlockHeight(): number;\n  setStartBlockHeight(value: number): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockHeadersFromStartHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockHeadersFromStartHeightRequest): SubscribeBlockHeadersFromStartHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockHeadersFromStartHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockHeadersFromStartHeightRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockHeadersFromStartHeightRequest, reader: jspb.BinaryReader): SubscribeBlockHeadersFromStartHeightRequest;\n}\n\nexport namespace SubscribeBlockHeadersFromStartHeightRequest {\n  export type AsObject = {\n    startBlockHeight: number,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockHeadersFromLatestRequest extends jspb.Message {\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockHeadersFromLatestRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockHeadersFromLatestRequest): SubscribeBlockHeadersFromLatestRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockHeadersFromLatestRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockHeadersFromLatestRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockHeadersFromLatestRequest, reader: jspb.BinaryReader): SubscribeBlockHeadersFromLatestRequest;\n}\n\nexport namespace SubscribeBlockHeadersFromLatestRequest {\n  export type AsObject = {\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockHeadersResponse extends jspb.Message {\n  hasHeader(): boolean;\n  clearHeader(): void;\n  getHeader(): flow_entities_block_header_pb.BlockHeader | undefined;\n  setHeader(value?: flow_entities_block_header_pb.BlockHeader): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockHeadersResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockHeadersResponse): SubscribeBlockHeadersResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockHeadersResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockHeadersResponse;\n  static deserializeBinaryFromReader(message: SubscribeBlockHeadersResponse, reader: jspb.BinaryReader): SubscribeBlockHeadersResponse;\n}\n\nexport namespace SubscribeBlockHeadersResponse {\n  export type AsObject = {\n    header?: flow_entities_block_header_pb.BlockHeader.AsObject,\n  }\n}\n\nexport class SubscribeBlockDigestsFromStartBlockIDRequest extends jspb.Message {\n  getStartBlockId(): Uint8Array | string;\n  getStartBlockId_asU8(): Uint8Array;\n  getStartBlockId_asB64(): string;\n  setStartBlockId(value: Uint8Array | string): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockDigestsFromStartBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockDigestsFromStartBlockIDRequest): SubscribeBlockDigestsFromStartBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockDigestsFromStartBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockDigestsFromStartBlockIDRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockDigestsFromStartBlockIDRequest, reader: jspb.BinaryReader): SubscribeBlockDigestsFromStartBlockIDRequest;\n}\n\nexport namespace SubscribeBlockDigestsFromStartBlockIDRequest {\n  export type AsObject = {\n    startBlockId: Uint8Array | string,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockDigestsFromStartHeightRequest extends jspb.Message {\n  getStartBlockHeight(): number;\n  setStartBlockHeight(value: number): void;\n\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockDigestsFromStartHeightRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockDigestsFromStartHeightRequest): SubscribeBlockDigestsFromStartHeightRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockDigestsFromStartHeightRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockDigestsFromStartHeightRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockDigestsFromStartHeightRequest, reader: jspb.BinaryReader): SubscribeBlockDigestsFromStartHeightRequest;\n}\n\nexport namespace SubscribeBlockDigestsFromStartHeightRequest {\n  export type AsObject = {\n    startBlockHeight: number,\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockDigestsFromLatestRequest extends jspb.Message {\n  getBlockStatus(): flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap];\n  setBlockStatus(value: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockDigestsFromLatestRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockDigestsFromLatestRequest): SubscribeBlockDigestsFromLatestRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockDigestsFromLatestRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockDigestsFromLatestRequest;\n  static deserializeBinaryFromReader(message: SubscribeBlockDigestsFromLatestRequest, reader: jspb.BinaryReader): SubscribeBlockDigestsFromLatestRequest;\n}\n\nexport namespace SubscribeBlockDigestsFromLatestRequest {\n  export type AsObject = {\n    blockStatus: flow_entities_block_pb.BlockStatusMap[keyof flow_entities_block_pb.BlockStatusMap],\n  }\n}\n\nexport class SubscribeBlockDigestsResponse extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  hasBlockTimestamp(): boolean;\n  clearBlockTimestamp(): void;\n  getBlockTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n  setBlockTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeBlockDigestsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeBlockDigestsResponse): SubscribeBlockDigestsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeBlockDigestsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeBlockDigestsResponse;\n  static deserializeBinaryFromReader(message: SubscribeBlockDigestsResponse, reader: jspb.BinaryReader): SubscribeBlockDigestsResponse;\n}\n\nexport namespace SubscribeBlockDigestsResponse {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    blockHeight: number,\n    blockTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n  }\n}\n\nexport class SendAndSubscribeTransactionStatusesRequest extends jspb.Message {\n  hasTransaction(): boolean;\n  clearTransaction(): void;\n  getTransaction(): flow_entities_transaction_pb.Transaction | undefined;\n  setTransaction(value?: flow_entities_transaction_pb.Transaction): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SendAndSubscribeTransactionStatusesRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SendAndSubscribeTransactionStatusesRequest): SendAndSubscribeTransactionStatusesRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SendAndSubscribeTransactionStatusesRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SendAndSubscribeTransactionStatusesRequest;\n  static deserializeBinaryFromReader(message: SendAndSubscribeTransactionStatusesRequest, reader: jspb.BinaryReader): SendAndSubscribeTransactionStatusesRequest;\n}\n\nexport namespace SendAndSubscribeTransactionStatusesRequest {\n  export type AsObject = {\n    transaction?: flow_entities_transaction_pb.Transaction.AsObject,\n  }\n}\n\nexport class SendAndSubscribeTransactionStatusesResponse extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  getStatus(): flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap];\n  setStatus(value: flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap]): void;\n\n  getMessageIndex(): number;\n  setMessageIndex(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SendAndSubscribeTransactionStatusesResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SendAndSubscribeTransactionStatusesResponse): SendAndSubscribeTransactionStatusesResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SendAndSubscribeTransactionStatusesResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SendAndSubscribeTransactionStatusesResponse;\n  static deserializeBinaryFromReader(message: SendAndSubscribeTransactionStatusesResponse, reader: jspb.BinaryReader): SendAndSubscribeTransactionStatusesResponse;\n}\n\nexport namespace SendAndSubscribeTransactionStatusesResponse {\n  export type AsObject = {\n    id: Uint8Array | string,\n    status: flow_entities_transaction_pb.TransactionStatusMap[keyof flow_entities_transaction_pb.TransactionStatusMap],\n    messageIndex: number,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/access/access_pb.js",
    "content": "// source: flow/access/access.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar flow_entities_account_pb = require('../../flow/entities/account_pb.js');\ngoog.object.extend(proto, flow_entities_account_pb);\nvar flow_entities_block_header_pb = require('../../flow/entities/block_header_pb.js');\ngoog.object.extend(proto, flow_entities_block_header_pb);\nvar flow_entities_block_pb = require('../../flow/entities/block_pb.js');\ngoog.object.extend(proto, flow_entities_block_pb);\nvar flow_entities_collection_pb = require('../../flow/entities/collection_pb.js');\ngoog.object.extend(proto, flow_entities_collection_pb);\nvar flow_entities_event_pb = require('../../flow/entities/event_pb.js');\ngoog.object.extend(proto, flow_entities_event_pb);\nvar flow_entities_execution_result_pb = require('../../flow/entities/execution_result_pb.js');\ngoog.object.extend(proto, flow_entities_execution_result_pb);\nvar flow_entities_metadata_pb = require('../../flow/entities/metadata_pb.js');\ngoog.object.extend(proto, flow_entities_metadata_pb);\nvar flow_entities_node_version_info_pb = require('../../flow/entities/node_version_info_pb.js');\ngoog.object.extend(proto, flow_entities_node_version_info_pb);\nvar flow_entities_transaction_pb = require('../../flow/entities/transaction_pb.js');\ngoog.object.extend(proto, flow_entities_transaction_pb);\nvar google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');\ngoog.object.extend(proto, google_protobuf_timestamp_pb);\ngoog.exportSymbol('proto.flow.access.AccountResponse', null, global);\ngoog.exportSymbol('proto.flow.access.BlockHeaderResponse', null, global);\ngoog.exportSymbol('proto.flow.access.BlockResponse', null, global);\ngoog.exportSymbol('proto.flow.access.CollectionResponse', null, global);\ngoog.exportSymbol('proto.flow.access.EventsResponse', null, global);\ngoog.exportSymbol('proto.flow.access.EventsResponse.Result', null, global);\ngoog.exportSymbol('proto.flow.access.ExecuteScriptAtBlockHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.ExecuteScriptAtBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.ExecuteScriptAtLatestBlockRequest', null, global);\ngoog.exportSymbol('proto.flow.access.ExecuteScriptResponse', null, global);\ngoog.exportSymbol('proto.flow.access.ExecutionResultByIDResponse', null, global);\ngoog.exportSymbol('proto.flow.access.ExecutionResultForBlockIDResponse', null, global);\ngoog.exportSymbol('proto.flow.access.GetAccountAtBlockHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetAccountAtLatestBlockRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetAccountRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetAccountResponse', null, global);\ngoog.exportSymbol('proto.flow.access.GetBlockByHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetBlockByIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetBlockHeaderByHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetBlockHeaderByIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetCollectionByIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetEventsForBlockIDsRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetEventsForHeightRangeRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetExecutionResultByIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetExecutionResultForBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetLatestBlockHeaderRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetLatestBlockRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetLatestProtocolStateSnapshotRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetNetworkParametersRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetNetworkParametersResponse', null, global);\ngoog.exportSymbol('proto.flow.access.GetNodeVersionInfoRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetNodeVersionInfoResponse', null, global);\ngoog.exportSymbol('proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetProtocolStateSnapshotByHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetSystemTransactionRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetSystemTransactionResultRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetTransactionByIndexRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetTransactionRequest', null, global);\ngoog.exportSymbol('proto.flow.access.GetTransactionsByBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.PingRequest', null, global);\ngoog.exportSymbol('proto.flow.access.PingResponse', null, global);\ngoog.exportSymbol('proto.flow.access.ProtocolStateSnapshotResponse', null, global);\ngoog.exportSymbol('proto.flow.access.SendAndSubscribeTransactionStatusesRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SendAndSubscribeTransactionStatusesResponse', null, global);\ngoog.exportSymbol('proto.flow.access.SendTransactionRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SendTransactionResponse', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockDigestsFromLatestRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockDigestsResponse', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockHeadersFromLatestRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlockHeadersResponse', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlocksFromLatestRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlocksFromStartBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlocksFromStartHeightRequest', null, global);\ngoog.exportSymbol('proto.flow.access.SubscribeBlocksResponse', null, global);\ngoog.exportSymbol('proto.flow.access.TransactionResponse', null, global);\ngoog.exportSymbol('proto.flow.access.TransactionResultResponse', null, global);\ngoog.exportSymbol('proto.flow.access.TransactionResultsResponse', null, global);\ngoog.exportSymbol('proto.flow.access.TransactionsResponse', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.PingRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.PingRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.PingRequest.displayName = 'proto.flow.access.PingRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.PingResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.PingResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.PingResponse.displayName = 'proto.flow.access.PingResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetNodeVersionInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetNodeVersionInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetNodeVersionInfoRequest.displayName = 'proto.flow.access.GetNodeVersionInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetNodeVersionInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetNodeVersionInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetNodeVersionInfoResponse.displayName = 'proto.flow.access.GetNodeVersionInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetLatestBlockHeaderRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetLatestBlockHeaderRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetLatestBlockHeaderRequest.displayName = 'proto.flow.access.GetLatestBlockHeaderRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetBlockHeaderByIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetBlockHeaderByIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetBlockHeaderByIDRequest.displayName = 'proto.flow.access.GetBlockHeaderByIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetBlockHeaderByHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetBlockHeaderByHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetBlockHeaderByHeightRequest.displayName = 'proto.flow.access.GetBlockHeaderByHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.BlockHeaderResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.BlockHeaderResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.BlockHeaderResponse.displayName = 'proto.flow.access.BlockHeaderResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetLatestBlockRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetLatestBlockRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetLatestBlockRequest.displayName = 'proto.flow.access.GetLatestBlockRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetBlockByIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetBlockByIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetBlockByIDRequest.displayName = 'proto.flow.access.GetBlockByIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetBlockByHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetBlockByHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetBlockByHeightRequest.displayName = 'proto.flow.access.GetBlockByHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.BlockResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.BlockResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.BlockResponse.displayName = 'proto.flow.access.BlockResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetCollectionByIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetCollectionByIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetCollectionByIDRequest.displayName = 'proto.flow.access.GetCollectionByIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.CollectionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.CollectionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.CollectionResponse.displayName = 'proto.flow.access.CollectionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SendTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SendTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SendTransactionRequest.displayName = 'proto.flow.access.SendTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SendTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SendTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SendTransactionResponse.displayName = 'proto.flow.access.SendTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetTransactionRequest.displayName = 'proto.flow.access.GetTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetSystemTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetSystemTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetSystemTransactionRequest.displayName = 'proto.flow.access.GetSystemTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetSystemTransactionResultRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetSystemTransactionResultRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetSystemTransactionResultRequest.displayName = 'proto.flow.access.GetSystemTransactionResultRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetTransactionByIndexRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetTransactionByIndexRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetTransactionByIndexRequest.displayName = 'proto.flow.access.GetTransactionByIndexRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetTransactionsByBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetTransactionsByBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetTransactionsByBlockIDRequest.displayName = 'proto.flow.access.GetTransactionsByBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.TransactionResultsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.TransactionResultsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.TransactionResultsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.TransactionResultsResponse.displayName = 'proto.flow.access.TransactionResultsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.TransactionsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.TransactionsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.TransactionsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.TransactionsResponse.displayName = 'proto.flow.access.TransactionsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.TransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.TransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.TransactionResponse.displayName = 'proto.flow.access.TransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.TransactionResultResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.TransactionResultResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.TransactionResultResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.TransactionResultResponse.displayName = 'proto.flow.access.TransactionResultResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetAccountRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetAccountRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetAccountRequest.displayName = 'proto.flow.access.GetAccountRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetAccountResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetAccountResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetAccountResponse.displayName = 'proto.flow.access.GetAccountResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetAccountAtLatestBlockRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetAccountAtLatestBlockRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetAccountAtLatestBlockRequest.displayName = 'proto.flow.access.GetAccountAtLatestBlockRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.AccountResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.AccountResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.AccountResponse.displayName = 'proto.flow.access.AccountResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetAccountAtBlockHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetAccountAtBlockHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetAccountAtBlockHeightRequest.displayName = 'proto.flow.access.GetAccountAtBlockHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.ExecuteScriptAtLatestBlockRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.ExecuteScriptAtLatestBlockRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecuteScriptAtLatestBlockRequest.displayName = 'proto.flow.access.ExecuteScriptAtLatestBlockRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.ExecuteScriptAtBlockIDRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.ExecuteScriptAtBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecuteScriptAtBlockIDRequest.displayName = 'proto.flow.access.ExecuteScriptAtBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.ExecuteScriptAtBlockHeightRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.ExecuteScriptAtBlockHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecuteScriptAtBlockHeightRequest.displayName = 'proto.flow.access.ExecuteScriptAtBlockHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecuteScriptResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.ExecuteScriptResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecuteScriptResponse.displayName = 'proto.flow.access.ExecuteScriptResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetEventsForHeightRangeRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetEventsForHeightRangeRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetEventsForHeightRangeRequest.displayName = 'proto.flow.access.GetEventsForHeightRangeRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetEventsForBlockIDsRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.GetEventsForBlockIDsRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.GetEventsForBlockIDsRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetEventsForBlockIDsRequest.displayName = 'proto.flow.access.GetEventsForBlockIDsRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.EventsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.EventsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.EventsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.EventsResponse.displayName = 'proto.flow.access.EventsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.EventsResponse.Result = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.access.EventsResponse.Result.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.access.EventsResponse.Result, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.EventsResponse.Result.displayName = 'proto.flow.access.EventsResponse.Result';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetNetworkParametersRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetNetworkParametersRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetNetworkParametersRequest.displayName = 'proto.flow.access.GetNetworkParametersRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetNetworkParametersResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetNetworkParametersResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetNetworkParametersResponse.displayName = 'proto.flow.access.GetNetworkParametersResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetLatestProtocolStateSnapshotRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetLatestProtocolStateSnapshotRequest.displayName = 'proto.flow.access.GetLatestProtocolStateSnapshotRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.displayName = 'proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetProtocolStateSnapshotByHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetProtocolStateSnapshotByHeightRequest.displayName = 'proto.flow.access.GetProtocolStateSnapshotByHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ProtocolStateSnapshotResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.ProtocolStateSnapshotResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ProtocolStateSnapshotResponse.displayName = 'proto.flow.access.ProtocolStateSnapshotResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetExecutionResultForBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetExecutionResultForBlockIDRequest.displayName = 'proto.flow.access.GetExecutionResultForBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecutionResultForBlockIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.ExecutionResultForBlockIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecutionResultForBlockIDResponse.displayName = 'proto.flow.access.ExecutionResultForBlockIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.GetExecutionResultByIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.GetExecutionResultByIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.GetExecutionResultByIDRequest.displayName = 'proto.flow.access.GetExecutionResultByIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.ExecutionResultByIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.ExecutionResultByIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.ExecutionResultByIDResponse.displayName = 'proto.flow.access.ExecutionResultByIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlocksFromStartBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlocksFromStartBlockIDRequest.displayName = 'proto.flow.access.SubscribeBlocksFromStartBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlocksFromStartHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlocksFromStartHeightRequest.displayName = 'proto.flow.access.SubscribeBlocksFromStartHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlocksFromLatestRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlocksFromLatestRequest.displayName = 'proto.flow.access.SubscribeBlocksFromLatestRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlocksResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlocksResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlocksResponse.displayName = 'proto.flow.access.SubscribeBlocksResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.displayName = 'proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.displayName = 'proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockHeadersFromLatestRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockHeadersFromLatestRequest.displayName = 'proto.flow.access.SubscribeBlockHeadersFromLatestRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockHeadersResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockHeadersResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockHeadersResponse.displayName = 'proto.flow.access.SubscribeBlockHeadersResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.displayName = 'proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.displayName = 'proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockDigestsFromLatestRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockDigestsFromLatestRequest.displayName = 'proto.flow.access.SubscribeBlockDigestsFromLatestRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SubscribeBlockDigestsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SubscribeBlockDigestsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SubscribeBlockDigestsResponse.displayName = 'proto.flow.access.SubscribeBlockDigestsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SendAndSubscribeTransactionStatusesRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SendAndSubscribeTransactionStatusesRequest.displayName = 'proto.flow.access.SendAndSubscribeTransactionStatusesRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.access.SendAndSubscribeTransactionStatusesResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.access.SendAndSubscribeTransactionStatusesResponse.displayName = 'proto.flow.access.SendAndSubscribeTransactionStatusesResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.PingRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.PingRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.PingRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.PingRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.PingRequest}\n */\nproto.flow.access.PingRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.PingRequest;\n  return proto.flow.access.PingRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.PingRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.PingRequest}\n */\nproto.flow.access.PingRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.PingRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.PingRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.PingRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.PingRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.PingResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.PingResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.PingResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.PingResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.PingResponse}\n */\nproto.flow.access.PingResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.PingResponse;\n  return proto.flow.access.PingResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.PingResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.PingResponse}\n */\nproto.flow.access.PingResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.PingResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.PingResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.PingResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.PingResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetNodeVersionInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetNodeVersionInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetNodeVersionInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNodeVersionInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetNodeVersionInfoRequest}\n */\nproto.flow.access.GetNodeVersionInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetNodeVersionInfoRequest;\n  return proto.flow.access.GetNodeVersionInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetNodeVersionInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetNodeVersionInfoRequest}\n */\nproto.flow.access.GetNodeVersionInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetNodeVersionInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetNodeVersionInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetNodeVersionInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNodeVersionInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetNodeVersionInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetNodeVersionInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetNodeVersionInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNodeVersionInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    info: (f = msg.getInfo()) && flow_entities_node_version_info_pb.NodeVersionInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetNodeVersionInfoResponse}\n */\nproto.flow.access.GetNodeVersionInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetNodeVersionInfoResponse;\n  return proto.flow.access.GetNodeVersionInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetNodeVersionInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetNodeVersionInfoResponse}\n */\nproto.flow.access.GetNodeVersionInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_node_version_info_pb.NodeVersionInfo;\n      reader.readMessage(value,flow_entities_node_version_info_pb.NodeVersionInfo.deserializeBinaryFromReader);\n      msg.setInfo(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetNodeVersionInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetNodeVersionInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetNodeVersionInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNodeVersionInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getInfo();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_node_version_info_pb.NodeVersionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.NodeVersionInfo info = 1;\n * @return {?proto.flow.entities.NodeVersionInfo}\n */\nproto.flow.access.GetNodeVersionInfoResponse.prototype.getInfo = function() {\n  return /** @type{?proto.flow.entities.NodeVersionInfo} */ (\n    jspb.Message.getWrapperField(this, flow_entities_node_version_info_pb.NodeVersionInfo, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.NodeVersionInfo|undefined} value\n * @return {!proto.flow.access.GetNodeVersionInfoResponse} returns this\n*/\nproto.flow.access.GetNodeVersionInfoResponse.prototype.setInfo = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.GetNodeVersionInfoResponse} returns this\n */\nproto.flow.access.GetNodeVersionInfoResponse.prototype.clearInfo = function() {\n  return this.setInfo(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.GetNodeVersionInfoResponse.prototype.hasInfo = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetLatestBlockHeaderRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetLatestBlockHeaderRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetLatestBlockHeaderRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestBlockHeaderRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetLatestBlockHeaderRequest}\n */\nproto.flow.access.GetLatestBlockHeaderRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetLatestBlockHeaderRequest;\n  return proto.flow.access.GetLatestBlockHeaderRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetLatestBlockHeaderRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetLatestBlockHeaderRequest}\n */\nproto.flow.access.GetLatestBlockHeaderRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsSealed(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetLatestBlockHeaderRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetLatestBlockHeaderRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetLatestBlockHeaderRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestBlockHeaderRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIsSealed();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool is_sealed = 1;\n * @return {boolean}\n */\nproto.flow.access.GetLatestBlockHeaderRequest.prototype.getIsSealed = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.GetLatestBlockHeaderRequest} returns this\n */\nproto.flow.access.GetLatestBlockHeaderRequest.prototype.setIsSealed = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetBlockHeaderByIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetBlockHeaderByIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockHeaderByIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetBlockHeaderByIDRequest}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetBlockHeaderByIDRequest;\n  return proto.flow.access.GetBlockHeaderByIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetBlockHeaderByIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetBlockHeaderByIDRequest}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetBlockHeaderByIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetBlockHeaderByIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockHeaderByIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetBlockHeaderByIDRequest} returns this\n */\nproto.flow.access.GetBlockHeaderByIDRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetBlockHeaderByHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetBlockHeaderByHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    height: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetBlockHeaderByHeightRequest}\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetBlockHeaderByHeightRequest;\n  return proto.flow.access.GetBlockHeaderByHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetBlockHeaderByHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetBlockHeaderByHeightRequest}\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetBlockHeaderByHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetBlockHeaderByHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 height = 1;\n * @return {number}\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetBlockHeaderByHeightRequest} returns this\n */\nproto.flow.access.GetBlockHeaderByHeightRequest.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.BlockHeaderResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.BlockHeaderResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.BlockHeaderResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.BlockHeaderResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    block: (f = msg.getBlock()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.BlockHeaderResponse}\n */\nproto.flow.access.BlockHeaderResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.BlockHeaderResponse;\n  return proto.flow.access.BlockHeaderResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.BlockHeaderResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.BlockHeaderResponse}\n */\nproto.flow.access.BlockHeaderResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_header_pb.BlockHeader;\n      reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader);\n      msg.setBlock(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    case 3:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.BlockHeaderResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.BlockHeaderResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.BlockHeaderResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.BlockHeaderResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlock();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockHeader block = 1;\n * @return {?proto.flow.entities.BlockHeader}\n */\nproto.flow.access.BlockHeaderResponse.prototype.getBlock = function() {\n  return /** @type{?proto.flow.entities.BlockHeader} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockHeader|undefined} value\n * @return {!proto.flow.access.BlockHeaderResponse} returns this\n*/\nproto.flow.access.BlockHeaderResponse.prototype.setBlock = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.BlockHeaderResponse} returns this\n */\nproto.flow.access.BlockHeaderResponse.prototype.clearBlock = function() {\n  return this.setBlock(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.BlockHeaderResponse.prototype.hasBlock = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.BlockHeaderResponse.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.BlockHeaderResponse} returns this\n */\nproto.flow.access.BlockHeaderResponse.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 3;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.BlockHeaderResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 3));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.BlockHeaderResponse} returns this\n*/\nproto.flow.access.BlockHeaderResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.BlockHeaderResponse} returns this\n */\nproto.flow.access.BlockHeaderResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.BlockHeaderResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetLatestBlockRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetLatestBlockRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetLatestBlockRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestBlockRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetLatestBlockRequest}\n */\nproto.flow.access.GetLatestBlockRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetLatestBlockRequest;\n  return proto.flow.access.GetLatestBlockRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetLatestBlockRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetLatestBlockRequest}\n */\nproto.flow.access.GetLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsSealed(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetLatestBlockRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetLatestBlockRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetLatestBlockRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestBlockRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIsSealed();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool is_sealed = 1;\n * @return {boolean}\n */\nproto.flow.access.GetLatestBlockRequest.prototype.getIsSealed = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.GetLatestBlockRequest} returns this\n */\nproto.flow.access.GetLatestBlockRequest.prototype.setIsSealed = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n/**\n * optional bool full_block_response = 2;\n * @return {boolean}\n */\nproto.flow.access.GetLatestBlockRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.GetLatestBlockRequest} returns this\n */\nproto.flow.access.GetLatestBlockRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetBlockByIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetBlockByIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockByIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetBlockByIDRequest}\n */\nproto.flow.access.GetBlockByIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetBlockByIDRequest;\n  return proto.flow.access.GetBlockByIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetBlockByIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetBlockByIDRequest}\n */\nproto.flow.access.GetBlockByIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetBlockByIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetBlockByIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockByIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetBlockByIDRequest} returns this\n */\nproto.flow.access.GetBlockByIDRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bool full_block_response = 2;\n * @return {boolean}\n */\nproto.flow.access.GetBlockByIDRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.GetBlockByIDRequest} returns this\n */\nproto.flow.access.GetBlockByIDRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetBlockByHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetBlockByHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockByHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    height: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetBlockByHeightRequest}\n */\nproto.flow.access.GetBlockByHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetBlockByHeightRequest;\n  return proto.flow.access.GetBlockByHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetBlockByHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetBlockByHeightRequest}\n */\nproto.flow.access.GetBlockByHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setHeight(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetBlockByHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetBlockByHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetBlockByHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 height = 1;\n * @return {number}\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetBlockByHeightRequest} returns this\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bool full_block_response = 2;\n * @return {boolean}\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.GetBlockByHeightRequest} returns this\n */\nproto.flow.access.GetBlockByHeightRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.BlockResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.BlockResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.BlockResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.BlockResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    block: (f = msg.getBlock()) && flow_entities_block_pb.Block.toObject(includeInstance, f),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.BlockResponse}\n */\nproto.flow.access.BlockResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.BlockResponse;\n  return proto.flow.access.BlockResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.BlockResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.BlockResponse}\n */\nproto.flow.access.BlockResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_pb.Block;\n      reader.readMessage(value,flow_entities_block_pb.Block.deserializeBinaryFromReader);\n      msg.setBlock(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    case 3:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.BlockResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.BlockResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.BlockResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.BlockResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlock();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_pb.Block.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Block block = 1;\n * @return {?proto.flow.entities.Block}\n */\nproto.flow.access.BlockResponse.prototype.getBlock = function() {\n  return /** @type{?proto.flow.entities.Block} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_pb.Block, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Block|undefined} value\n * @return {!proto.flow.access.BlockResponse} returns this\n*/\nproto.flow.access.BlockResponse.prototype.setBlock = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.BlockResponse} returns this\n */\nproto.flow.access.BlockResponse.prototype.clearBlock = function() {\n  return this.setBlock(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.BlockResponse.prototype.hasBlock = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.BlockResponse.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.BlockResponse} returns this\n */\nproto.flow.access.BlockResponse.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 3;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.BlockResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 3));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.BlockResponse} returns this\n*/\nproto.flow.access.BlockResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.BlockResponse} returns this\n */\nproto.flow.access.BlockResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.BlockResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetCollectionByIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetCollectionByIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetCollectionByIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetCollectionByIDRequest}\n */\nproto.flow.access.GetCollectionByIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetCollectionByIDRequest;\n  return proto.flow.access.GetCollectionByIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetCollectionByIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetCollectionByIDRequest}\n */\nproto.flow.access.GetCollectionByIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetCollectionByIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetCollectionByIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetCollectionByIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetCollectionByIDRequest} returns this\n */\nproto.flow.access.GetCollectionByIDRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.CollectionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.CollectionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.CollectionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.CollectionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    collection: (f = msg.getCollection()) && flow_entities_collection_pb.Collection.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.CollectionResponse}\n */\nproto.flow.access.CollectionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.CollectionResponse;\n  return proto.flow.access.CollectionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.CollectionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.CollectionResponse}\n */\nproto.flow.access.CollectionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_collection_pb.Collection;\n      reader.readMessage(value,flow_entities_collection_pb.Collection.deserializeBinaryFromReader);\n      msg.setCollection(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.CollectionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.CollectionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.CollectionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.CollectionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getCollection();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_collection_pb.Collection.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Collection collection = 1;\n * @return {?proto.flow.entities.Collection}\n */\nproto.flow.access.CollectionResponse.prototype.getCollection = function() {\n  return /** @type{?proto.flow.entities.Collection} */ (\n    jspb.Message.getWrapperField(this, flow_entities_collection_pb.Collection, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Collection|undefined} value\n * @return {!proto.flow.access.CollectionResponse} returns this\n*/\nproto.flow.access.CollectionResponse.prototype.setCollection = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.CollectionResponse} returns this\n */\nproto.flow.access.CollectionResponse.prototype.clearCollection = function() {\n  return this.setCollection(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.CollectionResponse.prototype.hasCollection = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.CollectionResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.CollectionResponse} returns this\n*/\nproto.flow.access.CollectionResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.CollectionResponse} returns this\n */\nproto.flow.access.CollectionResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.CollectionResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SendTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SendTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SendTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transaction: (f = msg.getTransaction()) && flow_entities_transaction_pb.Transaction.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SendTransactionRequest}\n */\nproto.flow.access.SendTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SendTransactionRequest;\n  return proto.flow.access.SendTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SendTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SendTransactionRequest}\n */\nproto.flow.access.SendTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_transaction_pb.Transaction;\n      reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader);\n      msg.setTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SendTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SendTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SendTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransaction();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_transaction_pb.Transaction.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Transaction transaction = 1;\n * @return {?proto.flow.entities.Transaction}\n */\nproto.flow.access.SendTransactionRequest.prototype.getTransaction = function() {\n  return /** @type{?proto.flow.entities.Transaction} */ (\n    jspb.Message.getWrapperField(this, flow_entities_transaction_pb.Transaction, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Transaction|undefined} value\n * @return {!proto.flow.access.SendTransactionRequest} returns this\n*/\nproto.flow.access.SendTransactionRequest.prototype.setTransaction = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SendTransactionRequest} returns this\n */\nproto.flow.access.SendTransactionRequest.prototype.clearTransaction = function() {\n  return this.setTransaction(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SendTransactionRequest.prototype.hasTransaction = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SendTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SendTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SendTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SendTransactionResponse}\n */\nproto.flow.access.SendTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SendTransactionResponse;\n  return proto.flow.access.SendTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SendTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SendTransactionResponse}\n */\nproto.flow.access.SendTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SendTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SendTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SendTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SendTransactionResponse.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.SendTransactionResponse.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SendTransactionResponse.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SendTransactionResponse} returns this\n */\nproto.flow.access.SendTransactionResponse.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.SendTransactionResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.SendTransactionResponse} returns this\n*/\nproto.flow.access.SendTransactionResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SendTransactionResponse} returns this\n */\nproto.flow.access.SendTransactionResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SendTransactionResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    blockId: msg.getBlockId_asB64(),\n    collectionId: msg.getCollectionId_asB64(),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 4, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetTransactionRequest}\n */\nproto.flow.access.GetTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetTransactionRequest;\n  return proto.flow.access.GetTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetTransactionRequest}\n */\nproto.flow.access.GetTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setCollectionId(value);\n      break;\n    case 4:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getCollectionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetTransactionRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.GetTransactionRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetTransactionRequest} returns this\n */\nproto.flow.access.GetTransactionRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes block_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetTransactionRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetTransactionRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetTransactionRequest} returns this\n */\nproto.flow.access.GetTransactionRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional bytes collection_id = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetTransactionRequest.prototype.getCollectionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes collection_id = 3;\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {string}\n */\nproto.flow.access.GetTransactionRequest.prototype.getCollectionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getCollectionId()));\n};\n\n\n/**\n * optional bytes collection_id = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionRequest.prototype.getCollectionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getCollectionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetTransactionRequest} returns this\n */\nproto.flow.access.GetTransactionRequest.prototype.setCollectionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 4;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetTransactionRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetTransactionRequest} returns this\n */\nproto.flow.access.GetTransactionRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetSystemTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetSystemTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetSystemTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetSystemTransactionRequest}\n */\nproto.flow.access.GetSystemTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetSystemTransactionRequest;\n  return proto.flow.access.GetSystemTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetSystemTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetSystemTransactionRequest}\n */\nproto.flow.access.GetSystemTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetSystemTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetSystemTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetSystemTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetSystemTransactionRequest} returns this\n */\nproto.flow.access.GetSystemTransactionRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetSystemTransactionResultRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetSystemTransactionResultRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetSystemTransactionResultRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetSystemTransactionResultRequest}\n */\nproto.flow.access.GetSystemTransactionResultRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetSystemTransactionResultRequest;\n  return proto.flow.access.GetSystemTransactionResultRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetSystemTransactionResultRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetSystemTransactionResultRequest}\n */\nproto.flow.access.GetSystemTransactionResultRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetSystemTransactionResultRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetSystemTransactionResultRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetSystemTransactionResultRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetSystemTransactionResultRequest} returns this\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 2;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetSystemTransactionResultRequest} returns this\n */\nproto.flow.access.GetSystemTransactionResultRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetTransactionByIndexRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetTransactionByIndexRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionByIndexRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    index: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetTransactionByIndexRequest}\n */\nproto.flow.access.GetTransactionByIndexRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetTransactionByIndexRequest;\n  return proto.flow.access.GetTransactionByIndexRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetTransactionByIndexRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetTransactionByIndexRequest}\n */\nproto.flow.access.GetTransactionByIndexRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setIndex(value);\n      break;\n    case 3:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetTransactionByIndexRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetTransactionByIndexRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionByIndexRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetTransactionByIndexRequest} returns this\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 index = 2;\n * @return {number}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetTransactionByIndexRequest} returns this\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 3;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetTransactionByIndexRequest} returns this\n */\nproto.flow.access.GetTransactionByIndexRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetTransactionsByBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetTransactionsByBlockIDRequest}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetTransactionsByBlockIDRequest;\n  return proto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetTransactionsByBlockIDRequest}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetTransactionsByBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetTransactionsByBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetTransactionsByBlockIDRequest} returns this\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 2;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetTransactionsByBlockIDRequest} returns this\n */\nproto.flow.access.GetTransactionsByBlockIDRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.TransactionResultsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.TransactionResultsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.TransactionResultsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.TransactionResultsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResultsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionResultsList: jspb.Message.toObjectList(msg.getTransactionResultsList(),\n    proto.flow.access.TransactionResultResponse.toObject, includeInstance),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.TransactionResultsResponse}\n */\nproto.flow.access.TransactionResultsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.TransactionResultsResponse;\n  return proto.flow.access.TransactionResultsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.TransactionResultsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.TransactionResultsResponse}\n */\nproto.flow.access.TransactionResultsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.access.TransactionResultResponse;\n      reader.readMessage(value,proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader);\n      msg.addTransactionResults(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResultsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.TransactionResultsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.TransactionResultsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResultsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.access.TransactionResultResponse.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * repeated TransactionResultResponse transaction_results = 1;\n * @return {!Array<!proto.flow.access.TransactionResultResponse>}\n */\nproto.flow.access.TransactionResultsResponse.prototype.getTransactionResultsList = function() {\n  return /** @type{!Array<!proto.flow.access.TransactionResultResponse>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.access.TransactionResultResponse, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.access.TransactionResultResponse>} value\n * @return {!proto.flow.access.TransactionResultsResponse} returns this\n*/\nproto.flow.access.TransactionResultsResponse.prototype.setTransactionResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.access.TransactionResultResponse=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.access.TransactionResultResponse}\n */\nproto.flow.access.TransactionResultsResponse.prototype.addTransactionResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.access.TransactionResultResponse, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.TransactionResultsResponse} returns this\n */\nproto.flow.access.TransactionResultsResponse.prototype.clearTransactionResultsList = function() {\n  return this.setTransactionResultsList([]);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.TransactionResultsResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.TransactionResultsResponse} returns this\n*/\nproto.flow.access.TransactionResultsResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.TransactionResultsResponse} returns this\n */\nproto.flow.access.TransactionResultsResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.TransactionResultsResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.TransactionsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.TransactionsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.TransactionsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.TransactionsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(),\n    flow_entities_transaction_pb.Transaction.toObject, includeInstance),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.TransactionsResponse}\n */\nproto.flow.access.TransactionsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.TransactionsResponse;\n  return proto.flow.access.TransactionsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.TransactionsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.TransactionsResponse}\n */\nproto.flow.access.TransactionsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_transaction_pb.Transaction;\n      reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader);\n      msg.addTransactions(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.TransactionsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.TransactionsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      flow_entities_transaction_pb.Transaction.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * repeated flow.entities.Transaction transactions = 1;\n * @return {!Array<!proto.flow.entities.Transaction>}\n */\nproto.flow.access.TransactionsResponse.prototype.getTransactionsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Transaction>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_transaction_pb.Transaction, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Transaction>} value\n * @return {!proto.flow.access.TransactionsResponse} returns this\n*/\nproto.flow.access.TransactionsResponse.prototype.setTransactionsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Transaction=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction}\n */\nproto.flow.access.TransactionsResponse.prototype.addTransactions = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.entities.Transaction, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.TransactionsResponse} returns this\n */\nproto.flow.access.TransactionsResponse.prototype.clearTransactionsList = function() {\n  return this.setTransactionsList([]);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.TransactionsResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.TransactionsResponse} returns this\n*/\nproto.flow.access.TransactionsResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.TransactionsResponse} returns this\n */\nproto.flow.access.TransactionsResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.TransactionsResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.TransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.TransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.TransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transaction: (f = msg.getTransaction()) && flow_entities_transaction_pb.Transaction.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.TransactionResponse}\n */\nproto.flow.access.TransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.TransactionResponse;\n  return proto.flow.access.TransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.TransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.TransactionResponse}\n */\nproto.flow.access.TransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_transaction_pb.Transaction;\n      reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader);\n      msg.setTransaction(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.TransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.TransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransaction();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_transaction_pb.Transaction.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Transaction transaction = 1;\n * @return {?proto.flow.entities.Transaction}\n */\nproto.flow.access.TransactionResponse.prototype.getTransaction = function() {\n  return /** @type{?proto.flow.entities.Transaction} */ (\n    jspb.Message.getWrapperField(this, flow_entities_transaction_pb.Transaction, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Transaction|undefined} value\n * @return {!proto.flow.access.TransactionResponse} returns this\n*/\nproto.flow.access.TransactionResponse.prototype.setTransaction = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.TransactionResponse} returns this\n */\nproto.flow.access.TransactionResponse.prototype.clearTransaction = function() {\n  return this.setTransaction(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.TransactionResponse.prototype.hasTransaction = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.TransactionResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.TransactionResponse} returns this\n*/\nproto.flow.access.TransactionResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.TransactionResponse} returns this\n */\nproto.flow.access.TransactionResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.TransactionResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.TransactionResultResponse.repeatedFields_ = [4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.TransactionResultResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.TransactionResultResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.TransactionResultResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResultResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    status: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    statusCode: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    errorMessage: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance),\n    blockId: msg.getBlockId_asB64(),\n    transactionId: msg.getTransactionId_asB64(),\n    collectionId: msg.getCollectionId_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 8, 0),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f),\n    computationUsage: jspb.Message.getFieldWithDefault(msg, 10, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.TransactionResultResponse}\n */\nproto.flow.access.TransactionResultResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.TransactionResultResponse;\n  return proto.flow.access.TransactionResultResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.TransactionResultResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.TransactionResultResponse}\n */\nproto.flow.access.TransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.flow.entities.TransactionStatus} */ (reader.readEnum());\n      msg.setStatus(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setStatusCode(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setErrorMessage(value);\n      break;\n    case 4:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 6:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    case 7:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setCollectionId(value);\n      break;\n    case 8:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 9:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setComputationUsage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResultResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.TransactionResultResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.TransactionResultResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.TransactionResultResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n  f = message.getStatusCode();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getErrorMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      4,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      6,\n      f\n    );\n  }\n  f = message.getCollectionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      7,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      8,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      9,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n  f = message.getComputationUsage();\n  if (f !== 0) {\n    writer.writeUint64(\n      10,\n      f\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.TransactionStatus status = 1;\n * @return {!proto.flow.entities.TransactionStatus}\n */\nproto.flow.access.TransactionResultResponse.prototype.getStatus = function() {\n  return /** @type {!proto.flow.entities.TransactionStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.TransactionStatus} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n/**\n * optional uint32 status_code = 2;\n * @return {number}\n */\nproto.flow.access.TransactionResultResponse.prototype.getStatusCode = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setStatusCode = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional string error_message = 3;\n * @return {string}\n */\nproto.flow.access.TransactionResultResponse.prototype.getErrorMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setErrorMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * repeated flow.entities.Event events = 4;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.access.TransactionResultResponse.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 4));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n*/\nproto.flow.access.TransactionResultResponse.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 4, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.access.TransactionResultResponse.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * optional bytes block_id = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.TransactionResultResponse.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 5;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.TransactionResultResponse.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResultResponse.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n/**\n * optional bytes transaction_id = 6;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.TransactionResultResponse.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 6;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.access.TransactionResultResponse.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 6;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResultResponse.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 6, value);\n};\n\n\n/**\n * optional bytes collection_id = 7;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.TransactionResultResponse.prototype.getCollectionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, \"\"));\n};\n\n\n/**\n * optional bytes collection_id = 7;\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {string}\n */\nproto.flow.access.TransactionResultResponse.prototype.getCollectionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getCollectionId()));\n};\n\n\n/**\n * optional bytes collection_id = 7;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.TransactionResultResponse.prototype.getCollectionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getCollectionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setCollectionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 7, value);\n};\n\n\n/**\n * optional uint64 block_height = 8;\n * @return {number}\n */\nproto.flow.access.TransactionResultResponse.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 8, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 9;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.TransactionResultResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 9));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n*/\nproto.flow.access.TransactionResultResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 9, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.TransactionResultResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 9) != null;\n};\n\n\n/**\n * optional uint64 computation_usage = 10;\n * @return {number}\n */\nproto.flow.access.TransactionResultResponse.prototype.getComputationUsage = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.TransactionResultResponse} returns this\n */\nproto.flow.access.TransactionResultResponse.prototype.setComputationUsage = function(value) {\n  return jspb.Message.setProto3IntField(this, 10, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetAccountRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetAccountRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetAccountRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetAccountRequest}\n */\nproto.flow.access.GetAccountRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetAccountRequest;\n  return proto.flow.access.GetAccountRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetAccountRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetAccountRequest}\n */\nproto.flow.access.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetAccountRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetAccountRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetAccountRequest.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.access.GetAccountRequest.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountRequest.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetAccountRequest} returns this\n */\nproto.flow.access.GetAccountRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetAccountResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetAccountResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetAccountResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetAccountResponse}\n */\nproto.flow.access.GetAccountResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetAccountResponse;\n  return proto.flow.access.GetAccountResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetAccountResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetAccountResponse}\n */\nproto.flow.access.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_account_pb.Account;\n      reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader);\n      msg.setAccount(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetAccountResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetAccountResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAccount();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_account_pb.Account.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Account account = 1;\n * @return {?proto.flow.entities.Account}\n */\nproto.flow.access.GetAccountResponse.prototype.getAccount = function() {\n  return /** @type{?proto.flow.entities.Account} */ (\n    jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Account|undefined} value\n * @return {!proto.flow.access.GetAccountResponse} returns this\n*/\nproto.flow.access.GetAccountResponse.prototype.setAccount = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.GetAccountResponse} returns this\n */\nproto.flow.access.GetAccountResponse.prototype.clearAccount = function() {\n  return this.setAccount(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.GetAccountResponse.prototype.hasAccount = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.GetAccountResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.GetAccountResponse} returns this\n*/\nproto.flow.access.GetAccountResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.GetAccountResponse} returns this\n */\nproto.flow.access.GetAccountResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.GetAccountResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetAccountAtLatestBlockRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetAccountAtLatestBlockRequest}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetAccountAtLatestBlockRequest;\n  return proto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetAccountAtLatestBlockRequest}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetAccountAtLatestBlockRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetAccountAtLatestBlockRequest} returns this\n */\nproto.flow.access.GetAccountAtLatestBlockRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.AccountResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.AccountResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.AccountResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.AccountResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.AccountResponse}\n */\nproto.flow.access.AccountResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.AccountResponse;\n  return proto.flow.access.AccountResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.AccountResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.AccountResponse}\n */\nproto.flow.access.AccountResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_account_pb.Account;\n      reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader);\n      msg.setAccount(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.AccountResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.AccountResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.AccountResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.AccountResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAccount();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_account_pb.Account.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Account account = 1;\n * @return {?proto.flow.entities.Account}\n */\nproto.flow.access.AccountResponse.prototype.getAccount = function() {\n  return /** @type{?proto.flow.entities.Account} */ (\n    jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Account|undefined} value\n * @return {!proto.flow.access.AccountResponse} returns this\n*/\nproto.flow.access.AccountResponse.prototype.setAccount = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.AccountResponse} returns this\n */\nproto.flow.access.AccountResponse.prototype.clearAccount = function() {\n  return this.setAccount(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.AccountResponse.prototype.hasAccount = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.AccountResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.AccountResponse} returns this\n*/\nproto.flow.access.AccountResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.AccountResponse} returns this\n */\nproto.flow.access.AccountResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.AccountResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetAccountAtBlockHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetAccountAtBlockHeightRequest}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetAccountAtBlockHeightRequest;\n  return proto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetAccountAtBlockHeightRequest}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetAccountAtBlockHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 block_height = 2;\n * @return {number}\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetAccountAtBlockHeightRequest} returns this\n */\nproto.flow.access.GetAccountAtBlockHeightRequest.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    script: msg.getScript_asB64(),\n    argumentsList: msg.getArgumentsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecuteScriptAtLatestBlockRequest;\n  return proto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setScript(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addArguments(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getScript_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getArgumentsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes script = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes script = 1;\n * This is a type-conversion wrapper around `getScript()`\n * @return {string}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getScript()));\n};\n\n\n/**\n * optional bytes script = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getScript()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getScript_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getScript()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setScript = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<string>}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getArgumentsList()));\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.getArgumentsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getArgumentsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.setArgumentsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.addArguments = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.ExecuteScriptAtLatestBlockRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtLatestBlockRequest.prototype.clearArgumentsList = function() {\n  return this.setArgumentsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecuteScriptAtBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    script: msg.getScript_asB64(),\n    argumentsList: msg.getArgumentsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecuteScriptAtBlockIDRequest;\n  return proto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setScript(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addArguments(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecuteScriptAtBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getScript_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getArgumentsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes script = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes script = 2;\n * This is a type-conversion wrapper around `getScript()`\n * @return {string}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getScript()));\n};\n\n\n/**\n * optional bytes script = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getScript()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getScript_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getScript()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setScript = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<string>}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getArgumentsList()));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getArgumentsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.setArgumentsList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.addArguments = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockIDRequest.prototype.clearArgumentsList = function() {\n  return this.setArgumentsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    script: msg.getScript_asB64(),\n    argumentsList: msg.getArgumentsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecuteScriptAtBlockHeightRequest;\n  return proto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setScript(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addArguments(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getScript_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getArgumentsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 block_height = 1;\n * @return {number}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bytes script = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes script = 2;\n * This is a type-conversion wrapper around `getScript()`\n * @return {string}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getScript()));\n};\n\n\n/**\n * optional bytes script = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getScript()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getScript_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getScript()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setScript = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<string>}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getArgumentsList()));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.getArgumentsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getArgumentsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.setArgumentsList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.addArguments = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.ExecuteScriptAtBlockHeightRequest} returns this\n */\nproto.flow.access.ExecuteScriptAtBlockHeightRequest.prototype.clearArgumentsList = function() {\n  return this.setArgumentsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecuteScriptResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecuteScriptResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    value: msg.getValue_asB64(),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f),\n    computationUsage: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecuteScriptResponse}\n */\nproto.flow.access.ExecuteScriptResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecuteScriptResponse;\n  return proto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecuteScriptResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecuteScriptResponse}\n */\nproto.flow.access.ExecuteScriptResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setValue(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setComputationUsage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecuteScriptResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecuteScriptResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValue_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n  f = message.getComputationUsage();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes value = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.getValue = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes value = 1;\n * This is a type-conversion wrapper around `getValue()`\n * @return {string}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.getValue_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getValue()));\n};\n\n\n/**\n * optional bytes value = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValue()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.getValue_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getValue()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ExecuteScriptResponse} returns this\n */\nproto.flow.access.ExecuteScriptResponse.prototype.setValue = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.ExecuteScriptResponse} returns this\n*/\nproto.flow.access.ExecuteScriptResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ExecuteScriptResponse} returns this\n */\nproto.flow.access.ExecuteScriptResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n/**\n * optional uint64 computation_usage = 3;\n * @return {number}\n */\nproto.flow.access.ExecuteScriptResponse.prototype.getComputationUsage = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.ExecuteScriptResponse} returns this\n */\nproto.flow.access.ExecuteScriptResponse.prototype.setComputationUsage = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetEventsForHeightRangeRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetEventsForHeightRangeRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    startHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    endHeight: jspb.Message.getFieldWithDefault(msg, 3, 0),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 4, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetEventsForHeightRangeRequest;\n  return proto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetEventsForHeightRangeRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartHeight(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setEndHeight(value);\n      break;\n    case 4:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetEventsForHeightRangeRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetEventsForHeightRangeRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getStartHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getEndHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string type = 1;\n * @return {string}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.getType = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.setType = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional uint64 start_height = 2;\n * @return {number}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.getStartHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.setStartHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional uint64 end_height = 3;\n * @return {number}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.getEndHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.setEndHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 4;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetEventsForHeightRangeRequest} returns this\n */\nproto.flow.access.GetEventsForHeightRangeRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 4, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.GetEventsForBlockIDsRequest.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetEventsForBlockIDsRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetEventsForBlockIDsRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    blockIdsList: msg.getBlockIdsList_asB64(),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetEventsForBlockIDsRequest;\n  return proto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetEventsForBlockIDsRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addBlockIds(value);\n      break;\n    case 3:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetEventsForBlockIDsRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetEventsForBlockIDsRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getBlockIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string type = 1;\n * @return {string}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.getType = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.setType = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * This is a type-conversion wrapper around `getBlockIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getBlockIdsList()));\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getBlockIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.setBlockIdsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.addBlockIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.clearBlockIdsList = function() {\n  return this.setBlockIdsList([]);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 3;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.access.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.access.GetEventsForBlockIDsRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 3, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.EventsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.EventsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.EventsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.EventsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.EventsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    resultsList: jspb.Message.toObjectList(msg.getResultsList(),\n    proto.flow.access.EventsResponse.Result.toObject, includeInstance),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.EventsResponse}\n */\nproto.flow.access.EventsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.EventsResponse;\n  return proto.flow.access.EventsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.EventsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.EventsResponse}\n */\nproto.flow.access.EventsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.access.EventsResponse.Result;\n      reader.readMessage(value,proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader);\n      msg.addResults(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.EventsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.EventsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.EventsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.EventsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.access.EventsResponse.Result.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.access.EventsResponse.Result.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.EventsResponse.Result.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.EventsResponse.Result.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.EventsResponse.Result} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.EventsResponse.Result.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance),\n    blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.EventsResponse.Result}\n */\nproto.flow.access.EventsResponse.Result.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.EventsResponse.Result;\n  return proto.flow.access.EventsResponse.Result.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.EventsResponse.Result} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.EventsResponse.Result}\n */\nproto.flow.access.EventsResponse.Result.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 3:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    case 4:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setBlockTimestamp(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.EventsResponse.Result.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.EventsResponse.Result.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.EventsResponse.Result} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.EventsResponse.Result.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      4,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.EventsResponse.Result.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.EventsResponse.Result.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.EventsResponse.Result.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n */\nproto.flow.access.EventsResponse.Result.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 block_height = 2;\n * @return {number}\n */\nproto.flow.access.EventsResponse.Result.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n */\nproto.flow.access.EventsResponse.Result.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * repeated flow.entities.Event events = 3;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.access.EventsResponse.Result.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n*/\nproto.flow.access.EventsResponse.Result.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.access.EventsResponse.Result.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n */\nproto.flow.access.EventsResponse.Result.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * optional google.protobuf.Timestamp block_timestamp = 4;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.access.EventsResponse.Result.prototype.getBlockTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n*/\nproto.flow.access.EventsResponse.Result.prototype.setBlockTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 4, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.EventsResponse.Result} returns this\n */\nproto.flow.access.EventsResponse.Result.prototype.clearBlockTimestamp = function() {\n  return this.setBlockTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.EventsResponse.Result.prototype.hasBlockTimestamp = function() {\n  return jspb.Message.getField(this, 4) != null;\n};\n\n\n/**\n * repeated Result results = 1;\n * @return {!Array<!proto.flow.access.EventsResponse.Result>}\n */\nproto.flow.access.EventsResponse.prototype.getResultsList = function() {\n  return /** @type{!Array<!proto.flow.access.EventsResponse.Result>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.access.EventsResponse.Result, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.access.EventsResponse.Result>} value\n * @return {!proto.flow.access.EventsResponse} returns this\n*/\nproto.flow.access.EventsResponse.prototype.setResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.access.EventsResponse.Result=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.access.EventsResponse.Result}\n */\nproto.flow.access.EventsResponse.prototype.addResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.access.EventsResponse.Result, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.access.EventsResponse} returns this\n */\nproto.flow.access.EventsResponse.prototype.clearResultsList = function() {\n  return this.setResultsList([]);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.EventsResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.EventsResponse} returns this\n*/\nproto.flow.access.EventsResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.EventsResponse} returns this\n */\nproto.flow.access.EventsResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.EventsResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetNetworkParametersRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetNetworkParametersRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetNetworkParametersRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNetworkParametersRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetNetworkParametersRequest}\n */\nproto.flow.access.GetNetworkParametersRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetNetworkParametersRequest;\n  return proto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetNetworkParametersRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetNetworkParametersRequest}\n */\nproto.flow.access.GetNetworkParametersRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetNetworkParametersRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetNetworkParametersRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNetworkParametersRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetNetworkParametersResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetNetworkParametersResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetNetworkParametersResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNetworkParametersResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    chainId: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetNetworkParametersResponse}\n */\nproto.flow.access.GetNetworkParametersResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetNetworkParametersResponse;\n  return proto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetNetworkParametersResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetNetworkParametersResponse}\n */\nproto.flow.access.GetNetworkParametersResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setChainId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetNetworkParametersResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetNetworkParametersResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetNetworkParametersResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getChainId();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string chain_id = 1;\n * @return {string}\n */\nproto.flow.access.GetNetworkParametersResponse.prototype.getChainId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.access.GetNetworkParametersResponse} returns this\n */\nproto.flow.access.GetNetworkParametersResponse.prototype.setChainId = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetLatestProtocolStateSnapshotRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetLatestProtocolStateSnapshotRequest}\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetLatestProtocolStateSnapshotRequest;\n  return proto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetLatestProtocolStateSnapshotRequest}\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetLatestProtocolStateSnapshotRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetLatestProtocolStateSnapshotRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetLatestProtocolStateSnapshotRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest;\n  return proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetProtocolStateSnapshotByBlockIDRequest} returns this\n */\nproto.flow.access.GetProtocolStateSnapshotByBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetProtocolStateSnapshotByHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest}\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetProtocolStateSnapshotByHeightRequest;\n  return proto.flow.access.GetProtocolStateSnapshotByHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest}\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetProtocolStateSnapshotByHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 block_height = 1;\n * @return {number}\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.GetProtocolStateSnapshotByHeightRequest} returns this\n */\nproto.flow.access.GetProtocolStateSnapshotByHeightRequest.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ProtocolStateSnapshotResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ProtocolStateSnapshotResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ProtocolStateSnapshotResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    serializedsnapshot: msg.getSerializedsnapshot_asB64(),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ProtocolStateSnapshotResponse}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ProtocolStateSnapshotResponse;\n  return proto.flow.access.ProtocolStateSnapshotResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ProtocolStateSnapshotResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ProtocolStateSnapshotResponse}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSerializedsnapshot(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ProtocolStateSnapshotResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ProtocolStateSnapshotResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ProtocolStateSnapshotResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSerializedsnapshot_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes serializedSnapshot = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes serializedSnapshot = 1;\n * This is a type-conversion wrapper around `getSerializedsnapshot()`\n * @return {string}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSerializedsnapshot()));\n};\n\n\n/**\n * optional bytes serializedSnapshot = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSerializedsnapshot()`\n * @return {!Uint8Array}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.getSerializedsnapshot_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSerializedsnapshot()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.ProtocolStateSnapshotResponse} returns this\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.setSerializedsnapshot = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.ProtocolStateSnapshotResponse} returns this\n*/\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ProtocolStateSnapshotResponse} returns this\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ProtocolStateSnapshotResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetExecutionResultForBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetExecutionResultForBlockIDRequest;\n  return proto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetExecutionResultForBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetExecutionResultForBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetExecutionResultForBlockIDRequest} returns this\n */\nproto.flow.access.GetExecutionResultForBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecutionResultForBlockIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    executionResult: (f = msg.getExecutionResult()) && flow_entities_execution_result_pb.ExecutionResult.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecutionResultForBlockIDResponse;\n  return proto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_execution_result_pb.ExecutionResult;\n      reader.readMessage(value,flow_entities_execution_result_pb.ExecutionResult.deserializeBinaryFromReader);\n      msg.setExecutionResult(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecutionResultForBlockIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecutionResultForBlockIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getExecutionResult();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_execution_result_pb.ExecutionResult.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.ExecutionResult execution_result = 1;\n * @return {?proto.flow.entities.ExecutionResult}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.getExecutionResult = function() {\n  return /** @type{?proto.flow.entities.ExecutionResult} */ (\n    jspb.Message.getWrapperField(this, flow_entities_execution_result_pb.ExecutionResult, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.ExecutionResult|undefined} value\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this\n*/\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.setExecutionResult = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.clearExecutionResult = function() {\n  return this.setExecutionResult(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.hasExecutionResult = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this\n*/\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ExecutionResultForBlockIDResponse} returns this\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ExecutionResultForBlockIDResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.GetExecutionResultByIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.GetExecutionResultByIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetExecutionResultByIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.GetExecutionResultByIDRequest}\n */\nproto.flow.access.GetExecutionResultByIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.GetExecutionResultByIDRequest;\n  return proto.flow.access.GetExecutionResultByIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.GetExecutionResultByIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.GetExecutionResultByIDRequest}\n */\nproto.flow.access.GetExecutionResultByIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.GetExecutionResultByIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.GetExecutionResultByIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.GetExecutionResultByIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.GetExecutionResultByIDRequest} returns this\n */\nproto.flow.access.GetExecutionResultByIDRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.ExecutionResultByIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.ExecutionResultByIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecutionResultByIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    executionResult: (f = msg.getExecutionResult()) && flow_entities_execution_result_pb.ExecutionResult.toObject(includeInstance, f),\n    metadata: (f = msg.getMetadata()) && flow_entities_metadata_pb.Metadata.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.ExecutionResultByIDResponse}\n */\nproto.flow.access.ExecutionResultByIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.ExecutionResultByIDResponse;\n  return proto.flow.access.ExecutionResultByIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.ExecutionResultByIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.ExecutionResultByIDResponse}\n */\nproto.flow.access.ExecutionResultByIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_execution_result_pb.ExecutionResult;\n      reader.readMessage(value,flow_entities_execution_result_pb.ExecutionResult.deserializeBinaryFromReader);\n      msg.setExecutionResult(value);\n      break;\n    case 2:\n      var value = new flow_entities_metadata_pb.Metadata;\n      reader.readMessage(value,flow_entities_metadata_pb.Metadata.deserializeBinaryFromReader);\n      msg.setMetadata(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.ExecutionResultByIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.ExecutionResultByIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.ExecutionResultByIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getExecutionResult();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_execution_result_pb.ExecutionResult.serializeBinaryToWriter\n    );\n  }\n  f = message.getMetadata();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_metadata_pb.Metadata.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.ExecutionResult execution_result = 1;\n * @return {?proto.flow.entities.ExecutionResult}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.getExecutionResult = function() {\n  return /** @type{?proto.flow.entities.ExecutionResult} */ (\n    jspb.Message.getWrapperField(this, flow_entities_execution_result_pb.ExecutionResult, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.ExecutionResult|undefined} value\n * @return {!proto.flow.access.ExecutionResultByIDResponse} returns this\n*/\nproto.flow.access.ExecutionResultByIDResponse.prototype.setExecutionResult = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ExecutionResultByIDResponse} returns this\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.clearExecutionResult = function() {\n  return this.setExecutionResult(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.hasExecutionResult = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional flow.entities.Metadata metadata = 2;\n * @return {?proto.flow.entities.Metadata}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.getMetadata = function() {\n  return /** @type{?proto.flow.entities.Metadata} */ (\n    jspb.Message.getWrapperField(this, flow_entities_metadata_pb.Metadata, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.Metadata|undefined} value\n * @return {!proto.flow.access.ExecutionResultByIDResponse} returns this\n*/\nproto.flow.access.ExecutionResultByIDResponse.prototype.setMetadata = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.ExecutionResultByIDResponse} returns this\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.clearMetadata = function() {\n  return this.setMetadata(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.ExecutionResultByIDResponse.prototype.hasMetadata = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlocksFromStartBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockId: msg.getStartBlockId_asB64(),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlocksFromStartBlockIDRequest;\n  return proto.flow.access.SubscribeBlocksFromStartBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    case 3:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlocksFromStartBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.getStartBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {string}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.getStartBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartBlockId()));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.getStartBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.setStartBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional bool full_block_response = 3;\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartBlockIDRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlocksFromStartHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlocksFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlocksFromStartHeightRequest;\n  return proto.flow.access.SubscribeBlocksFromStartHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlocksFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    case 3:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlocksFromStartHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 start_block_height = 1;\n * @return {number}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.getStartBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.setStartBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional bool full_block_response = 3;\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.SubscribeBlocksFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromStartHeightRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlocksFromLatestRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlocksFromLatestRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    fullBlockResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlocksFromLatestRequest}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlocksFromLatestRequest;\n  return proto.flow.access.SubscribeBlocksFromLatestRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlocksFromLatestRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlocksFromLatestRequest}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFullBlockResponse(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlocksFromLatestRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlocksFromLatestRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n  f = message.getFullBlockResponse();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 1;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlocksFromLatestRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n/**\n * optional bool full_block_response = 2;\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.getFullBlockResponse = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.access.SubscribeBlocksFromLatestRequest} returns this\n */\nproto.flow.access.SubscribeBlocksFromLatestRequest.prototype.setFullBlockResponse = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlocksResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlocksResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlocksResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    block: (f = msg.getBlock()) && flow_entities_block_pb.Block.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlocksResponse}\n */\nproto.flow.access.SubscribeBlocksResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlocksResponse;\n  return proto.flow.access.SubscribeBlocksResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlocksResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlocksResponse}\n */\nproto.flow.access.SubscribeBlocksResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_pb.Block;\n      reader.readMessage(value,flow_entities_block_pb.Block.deserializeBinaryFromReader);\n      msg.setBlock(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlocksResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlocksResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlocksResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlocksResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlock();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_pb.Block.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Block block = 1;\n * @return {?proto.flow.entities.Block}\n */\nproto.flow.access.SubscribeBlocksResponse.prototype.getBlock = function() {\n  return /** @type{?proto.flow.entities.Block} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_pb.Block, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Block|undefined} value\n * @return {!proto.flow.access.SubscribeBlocksResponse} returns this\n*/\nproto.flow.access.SubscribeBlocksResponse.prototype.setBlock = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SubscribeBlocksResponse} returns this\n */\nproto.flow.access.SubscribeBlocksResponse.prototype.clearBlock = function() {\n  return this.setBlock(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlocksResponse.prototype.hasBlock = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockId: msg.getStartBlockId_asB64(),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest;\n  return proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.getStartBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {string}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.getStartBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartBlockId()));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.getStartBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.setStartBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlockHeadersFromStartBlockIDRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest;\n  return proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 start_block_height = 1;\n * @return {number}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.getStartBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.setStartBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockHeadersFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlockHeadersFromStartHeightRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockHeadersFromLatestRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockHeadersFromLatestRequest;\n  return proto.flow.access.SubscribeBlockHeadersFromLatestRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest}\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockHeadersFromLatestRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 1;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockHeadersFromLatestRequest} returns this\n */\nproto.flow.access.SubscribeBlockHeadersFromLatestRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockHeadersResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockHeadersResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    header: (f = msg.getHeader()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockHeadersResponse}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockHeadersResponse;\n  return proto.flow.access.SubscribeBlockHeadersResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockHeadersResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockHeadersResponse}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_header_pb.BlockHeader;\n      reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader);\n      msg.setHeader(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockHeadersResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockHeadersResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockHeadersResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeader();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockHeader header = 1;\n * @return {?proto.flow.entities.BlockHeader}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.getHeader = function() {\n  return /** @type{?proto.flow.entities.BlockHeader} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockHeader|undefined} value\n * @return {!proto.flow.access.SubscribeBlockHeadersResponse} returns this\n*/\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.setHeader = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SubscribeBlockHeadersResponse} returns this\n */\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.clearHeader = function() {\n  return this.setHeader(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlockHeadersResponse.prototype.hasHeader = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockId: msg.getStartBlockId_asB64(),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest;\n  return proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.getStartBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {string}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.getStartBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartBlockId()));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.getStartBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.setStartBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest} returns this\n */\nproto.flow.access.SubscribeBlockDigestsFromStartBlockIDRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest;\n  return proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 start_block_height = 1;\n * @return {number}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.getStartBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.setStartBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 2;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockDigestsFromStartHeightRequest} returns this\n */\nproto.flow.access.SubscribeBlockDigestsFromStartHeightRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockDigestsFromLatestRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockStatus: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockDigestsFromLatestRequest;\n  return proto.flow.access.SubscribeBlockDigestsFromLatestRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest}\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.flow.entities.BlockStatus} */ (reader.readEnum());\n      msg.setBlockStatus(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockDigestsFromLatestRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockStatus block_status = 1;\n * @return {!proto.flow.entities.BlockStatus}\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.prototype.getBlockStatus = function() {\n  return /** @type {!proto.flow.entities.BlockStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockStatus} value\n * @return {!proto.flow.access.SubscribeBlockDigestsFromLatestRequest} returns this\n */\nproto.flow.access.SubscribeBlockDigestsFromLatestRequest.prototype.setBlockStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SubscribeBlockDigestsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SubscribeBlockDigestsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SubscribeBlockDigestsResponse;\n  return proto.flow.access.SubscribeBlockDigestsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SubscribeBlockDigestsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 3:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setBlockTimestamp(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SubscribeBlockDigestsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SubscribeBlockDigestsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SubscribeBlockDigestsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getBlockTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse} returns this\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 block_height = 2;\n * @return {number}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse} returns this\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional google.protobuf.Timestamp block_timestamp = 3;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.getBlockTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse} returns this\n*/\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.setBlockTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SubscribeBlockDigestsResponse} returns this\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.clearBlockTimestamp = function() {\n  return this.setBlockTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SubscribeBlockDigestsResponse.prototype.hasBlockTimestamp = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SendAndSubscribeTransactionStatusesRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transaction: (f = msg.getTransaction()) && flow_entities_transaction_pb.Transaction.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SendAndSubscribeTransactionStatusesRequest;\n  return proto.flow.access.SendAndSubscribeTransactionStatusesRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_transaction_pb.Transaction;\n      reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader);\n      msg.setTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SendAndSubscribeTransactionStatusesRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransaction();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_transaction_pb.Transaction.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Transaction transaction = 1;\n * @return {?proto.flow.entities.Transaction}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.getTransaction = function() {\n  return /** @type{?proto.flow.entities.Transaction} */ (\n    jspb.Message.getWrapperField(this, flow_entities_transaction_pb.Transaction, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Transaction|undefined} value\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest} returns this\n*/\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.setTransaction = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesRequest} returns this\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.clearTransaction = function() {\n  return this.setTransaction(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesRequest.prototype.hasTransaction = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.access.SendAndSubscribeTransactionStatusesResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    status: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    messageIndex: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.access.SendAndSubscribeTransactionStatusesResponse;\n  return proto.flow.access.SendAndSubscribeTransactionStatusesResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.TransactionStatus} */ (reader.readEnum());\n      msg.setStatus(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setMessageIndex(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.access.SendAndSubscribeTransactionStatusesResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getMessageIndex();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} returns this\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.TransactionStatus status = 2;\n * @return {!proto.flow.entities.TransactionStatus}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.getStatus = function() {\n  return /** @type {!proto.flow.entities.TransactionStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.TransactionStatus} value\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} returns this\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.setStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional uint64 message_index = 3;\n * @return {number}\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.getMessageIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.access.SendAndSubscribeTransactionStatusesResponse} returns this\n */\nproto.flow.access.SendAndSubscribeTransactionStatusesResponse.prototype.setMessageIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.access);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/access/access_pb_service.d.ts",
    "content": "// package: flow.access\n// file: flow/access/access.proto\n\nimport * as flow_access_access_pb from \"../../flow/access/access_pb\";\nimport {grpc} from \"@improbable-eng/grpc-web\";\n\ntype AccessAPIPing = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.PingRequest;\n  readonly responseType: typeof flow_access_access_pb.PingResponse;\n};\n\ntype AccessAPIGetNodeVersionInfo = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetNodeVersionInfoRequest;\n  readonly responseType: typeof flow_access_access_pb.GetNodeVersionInfoResponse;\n};\n\ntype AccessAPIGetLatestBlockHeader = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetLatestBlockHeaderRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockHeaderResponse;\n};\n\ntype AccessAPIGetBlockHeaderByID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetBlockHeaderByIDRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockHeaderResponse;\n};\n\ntype AccessAPIGetBlockHeaderByHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetBlockHeaderByHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockHeaderResponse;\n};\n\ntype AccessAPIGetLatestBlock = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetLatestBlockRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockResponse;\n};\n\ntype AccessAPIGetBlockByID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetBlockByIDRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockResponse;\n};\n\ntype AccessAPIGetBlockByHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetBlockByHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.BlockResponse;\n};\n\ntype AccessAPIGetCollectionByID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetCollectionByIDRequest;\n  readonly responseType: typeof flow_access_access_pb.CollectionResponse;\n};\n\ntype AccessAPISendTransaction = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.SendTransactionRequest;\n  readonly responseType: typeof flow_access_access_pb.SendTransactionResponse;\n};\n\ntype AccessAPIGetTransaction = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetTransactionRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResponse;\n};\n\ntype AccessAPIGetTransactionResult = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetTransactionRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResultResponse;\n};\n\ntype AccessAPIGetTransactionResultByIndex = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetTransactionByIndexRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResultResponse;\n};\n\ntype AccessAPIGetTransactionResultsByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetTransactionsByBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResultsResponse;\n};\n\ntype AccessAPIGetTransactionsByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetTransactionsByBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionsResponse;\n};\n\ntype AccessAPIGetSystemTransaction = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetSystemTransactionRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResponse;\n};\n\ntype AccessAPIGetSystemTransactionResult = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetSystemTransactionResultRequest;\n  readonly responseType: typeof flow_access_access_pb.TransactionResultResponse;\n};\n\ntype AccessAPIGetAccount = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetAccountRequest;\n  readonly responseType: typeof flow_access_access_pb.GetAccountResponse;\n};\n\ntype AccessAPIGetAccountAtLatestBlock = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetAccountAtLatestBlockRequest;\n  readonly responseType: typeof flow_access_access_pb.AccountResponse;\n};\n\ntype AccessAPIGetAccountAtBlockHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetAccountAtBlockHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.AccountResponse;\n};\n\ntype AccessAPIExecuteScriptAtLatestBlock = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.ExecuteScriptAtLatestBlockRequest;\n  readonly responseType: typeof flow_access_access_pb.ExecuteScriptResponse;\n};\n\ntype AccessAPIExecuteScriptAtBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.ExecuteScriptAtBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.ExecuteScriptResponse;\n};\n\ntype AccessAPIExecuteScriptAtBlockHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.ExecuteScriptAtBlockHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.ExecuteScriptResponse;\n};\n\ntype AccessAPIGetEventsForHeightRange = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetEventsForHeightRangeRequest;\n  readonly responseType: typeof flow_access_access_pb.EventsResponse;\n};\n\ntype AccessAPIGetEventsForBlockIDs = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetEventsForBlockIDsRequest;\n  readonly responseType: typeof flow_access_access_pb.EventsResponse;\n};\n\ntype AccessAPIGetNetworkParameters = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetNetworkParametersRequest;\n  readonly responseType: typeof flow_access_access_pb.GetNetworkParametersResponse;\n};\n\ntype AccessAPIGetLatestProtocolStateSnapshot = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetLatestProtocolStateSnapshotRequest;\n  readonly responseType: typeof flow_access_access_pb.ProtocolStateSnapshotResponse;\n};\n\ntype AccessAPIGetProtocolStateSnapshotByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetProtocolStateSnapshotByBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.ProtocolStateSnapshotResponse;\n};\n\ntype AccessAPIGetProtocolStateSnapshotByHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetProtocolStateSnapshotByHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.ProtocolStateSnapshotResponse;\n};\n\ntype AccessAPIGetExecutionResultForBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetExecutionResultForBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.ExecutionResultForBlockIDResponse;\n};\n\ntype AccessAPIGetExecutionResultByID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_access_access_pb.GetExecutionResultByIDRequest;\n  readonly responseType: typeof flow_access_access_pb.ExecutionResultByIDResponse;\n};\n\ntype AccessAPISubscribeBlocksFromStartBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlocksFromStartBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlocksResponse;\n};\n\ntype AccessAPISubscribeBlocksFromStartHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlocksFromStartHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlocksResponse;\n};\n\ntype AccessAPISubscribeBlocksFromLatest = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlocksFromLatestRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlocksResponse;\n};\n\ntype AccessAPISubscribeBlockHeadersFromStartBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockHeadersFromStartBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockHeadersResponse;\n};\n\ntype AccessAPISubscribeBlockHeadersFromStartHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockHeadersFromStartHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockHeadersResponse;\n};\n\ntype AccessAPISubscribeBlockHeadersFromLatest = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockHeadersFromLatestRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockHeadersResponse;\n};\n\ntype AccessAPISubscribeBlockDigestsFromStartBlockID = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockDigestsFromStartBlockIDRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockDigestsResponse;\n};\n\ntype AccessAPISubscribeBlockDigestsFromStartHeight = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockDigestsFromStartHeightRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockDigestsResponse;\n};\n\ntype AccessAPISubscribeBlockDigestsFromLatest = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SubscribeBlockDigestsFromLatestRequest;\n  readonly responseType: typeof flow_access_access_pb.SubscribeBlockDigestsResponse;\n};\n\ntype AccessAPISendAndSubscribeTransactionStatuses = {\n  readonly methodName: string;\n  readonly service: typeof AccessAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_access_access_pb.SendAndSubscribeTransactionStatusesRequest;\n  readonly responseType: typeof flow_access_access_pb.SendAndSubscribeTransactionStatusesResponse;\n};\n\nexport class AccessAPI {\n  static readonly serviceName: string;\n  static readonly Ping: AccessAPIPing;\n  static readonly GetNodeVersionInfo: AccessAPIGetNodeVersionInfo;\n  static readonly GetLatestBlockHeader: AccessAPIGetLatestBlockHeader;\n  static readonly GetBlockHeaderByID: AccessAPIGetBlockHeaderByID;\n  static readonly GetBlockHeaderByHeight: AccessAPIGetBlockHeaderByHeight;\n  static readonly GetLatestBlock: AccessAPIGetLatestBlock;\n  static readonly GetBlockByID: AccessAPIGetBlockByID;\n  static readonly GetBlockByHeight: AccessAPIGetBlockByHeight;\n  static readonly GetCollectionByID: AccessAPIGetCollectionByID;\n  static readonly SendTransaction: AccessAPISendTransaction;\n  static readonly GetTransaction: AccessAPIGetTransaction;\n  static readonly GetTransactionResult: AccessAPIGetTransactionResult;\n  static readonly GetTransactionResultByIndex: AccessAPIGetTransactionResultByIndex;\n  static readonly GetTransactionResultsByBlockID: AccessAPIGetTransactionResultsByBlockID;\n  static readonly GetTransactionsByBlockID: AccessAPIGetTransactionsByBlockID;\n  static readonly GetSystemTransaction: AccessAPIGetSystemTransaction;\n  static readonly GetSystemTransactionResult: AccessAPIGetSystemTransactionResult;\n  static readonly GetAccount: AccessAPIGetAccount;\n  static readonly GetAccountAtLatestBlock: AccessAPIGetAccountAtLatestBlock;\n  static readonly GetAccountAtBlockHeight: AccessAPIGetAccountAtBlockHeight;\n  static readonly ExecuteScriptAtLatestBlock: AccessAPIExecuteScriptAtLatestBlock;\n  static readonly ExecuteScriptAtBlockID: AccessAPIExecuteScriptAtBlockID;\n  static readonly ExecuteScriptAtBlockHeight: AccessAPIExecuteScriptAtBlockHeight;\n  static readonly GetEventsForHeightRange: AccessAPIGetEventsForHeightRange;\n  static readonly GetEventsForBlockIDs: AccessAPIGetEventsForBlockIDs;\n  static readonly GetNetworkParameters: AccessAPIGetNetworkParameters;\n  static readonly GetLatestProtocolStateSnapshot: AccessAPIGetLatestProtocolStateSnapshot;\n  static readonly GetProtocolStateSnapshotByBlockID: AccessAPIGetProtocolStateSnapshotByBlockID;\n  static readonly GetProtocolStateSnapshotByHeight: AccessAPIGetProtocolStateSnapshotByHeight;\n  static readonly GetExecutionResultForBlockID: AccessAPIGetExecutionResultForBlockID;\n  static readonly GetExecutionResultByID: AccessAPIGetExecutionResultByID;\n  static readonly SubscribeBlocksFromStartBlockID: AccessAPISubscribeBlocksFromStartBlockID;\n  static readonly SubscribeBlocksFromStartHeight: AccessAPISubscribeBlocksFromStartHeight;\n  static readonly SubscribeBlocksFromLatest: AccessAPISubscribeBlocksFromLatest;\n  static readonly SubscribeBlockHeadersFromStartBlockID: AccessAPISubscribeBlockHeadersFromStartBlockID;\n  static readonly SubscribeBlockHeadersFromStartHeight: AccessAPISubscribeBlockHeadersFromStartHeight;\n  static readonly SubscribeBlockHeadersFromLatest: AccessAPISubscribeBlockHeadersFromLatest;\n  static readonly SubscribeBlockDigestsFromStartBlockID: AccessAPISubscribeBlockDigestsFromStartBlockID;\n  static readonly SubscribeBlockDigestsFromStartHeight: AccessAPISubscribeBlockDigestsFromStartHeight;\n  static readonly SubscribeBlockDigestsFromLatest: AccessAPISubscribeBlockDigestsFromLatest;\n  static readonly SendAndSubscribeTransactionStatuses: AccessAPISendAndSubscribeTransactionStatuses;\n}\n\nexport type ServiceError = { message: string, code: number; metadata: grpc.Metadata }\nexport type Status = { details: string, code: number; metadata: grpc.Metadata }\n\ninterface UnaryResponse {\n  cancel(): void;\n}\ninterface ResponseStream<T> {\n  cancel(): void;\n  on(type: 'data', handler: (message: T) => void): ResponseStream<T>;\n  on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;\n  on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;\n}\ninterface RequestStream<T> {\n  write(message: T): RequestStream<T>;\n  end(): void;\n  cancel(): void;\n  on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;\n  on(type: 'status', handler: (status: Status) => void): RequestStream<T>;\n}\ninterface BidirectionalStream<ReqT, ResT> {\n  write(message: ReqT): BidirectionalStream<ReqT, ResT>;\n  end(): void;\n  cancel(): void;\n  on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;\n}\n\nexport class AccessAPIClient {\n  readonly serviceHost: string;\n\n  constructor(serviceHost: string, options?: grpc.RpcOptions);\n  ping(\n    requestMessage: flow_access_access_pb.PingRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.PingResponse|null) => void\n  ): UnaryResponse;\n  ping(\n    requestMessage: flow_access_access_pb.PingRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.PingResponse|null) => void\n  ): UnaryResponse;\n  getNodeVersionInfo(\n    requestMessage: flow_access_access_pb.GetNodeVersionInfoRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetNodeVersionInfoResponse|null) => void\n  ): UnaryResponse;\n  getNodeVersionInfo(\n    requestMessage: flow_access_access_pb.GetNodeVersionInfoRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetNodeVersionInfoResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlockHeader(\n    requestMessage: flow_access_access_pb.GetLatestBlockHeaderRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlockHeader(\n    requestMessage: flow_access_access_pb.GetLatestBlockHeaderRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByID(\n    requestMessage: flow_access_access_pb.GetBlockHeaderByIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByID(\n    requestMessage: flow_access_access_pb.GetBlockHeaderByIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByHeight(\n    requestMessage: flow_access_access_pb.GetBlockHeaderByHeightRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByHeight(\n    requestMessage: flow_access_access_pb.GetBlockHeaderByHeightRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlock(\n    requestMessage: flow_access_access_pb.GetLatestBlockRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlock(\n    requestMessage: flow_access_access_pb.GetLatestBlockRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getBlockByID(\n    requestMessage: flow_access_access_pb.GetBlockByIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getBlockByID(\n    requestMessage: flow_access_access_pb.GetBlockByIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getBlockByHeight(\n    requestMessage: flow_access_access_pb.GetBlockByHeightRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getBlockByHeight(\n    requestMessage: flow_access_access_pb.GetBlockByHeightRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.BlockResponse|null) => void\n  ): UnaryResponse;\n  getCollectionByID(\n    requestMessage: flow_access_access_pb.GetCollectionByIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.CollectionResponse|null) => void\n  ): UnaryResponse;\n  getCollectionByID(\n    requestMessage: flow_access_access_pb.GetCollectionByIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.CollectionResponse|null) => void\n  ): UnaryResponse;\n  sendTransaction(\n    requestMessage: flow_access_access_pb.SendTransactionRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.SendTransactionResponse|null) => void\n  ): UnaryResponse;\n  sendTransaction(\n    requestMessage: flow_access_access_pb.SendTransactionRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.SendTransactionResponse|null) => void\n  ): UnaryResponse;\n  getTransaction(\n    requestMessage: flow_access_access_pb.GetTransactionRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResponse|null) => void\n  ): UnaryResponse;\n  getTransaction(\n    requestMessage: flow_access_access_pb.GetTransactionRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResult(\n    requestMessage: flow_access_access_pb.GetTransactionRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResult(\n    requestMessage: flow_access_access_pb.GetTransactionRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultByIndex(\n    requestMessage: flow_access_access_pb.GetTransactionByIndexRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultByIndex(\n    requestMessage: flow_access_access_pb.GetTransactionByIndexRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultsByBlockID(\n    requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultsByBlockID(\n    requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionsByBlockID(\n    requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionsByBlockID(\n    requestMessage: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionsResponse|null) => void\n  ): UnaryResponse;\n  getSystemTransaction(\n    requestMessage: flow_access_access_pb.GetSystemTransactionRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResponse|null) => void\n  ): UnaryResponse;\n  getSystemTransaction(\n    requestMessage: flow_access_access_pb.GetSystemTransactionRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResponse|null) => void\n  ): UnaryResponse;\n  getSystemTransactionResult(\n    requestMessage: flow_access_access_pb.GetSystemTransactionResultRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getSystemTransactionResult(\n    requestMessage: flow_access_access_pb.GetSystemTransactionResultRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.TransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getAccount(\n    requestMessage: flow_access_access_pb.GetAccountRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetAccountResponse|null) => void\n  ): UnaryResponse;\n  getAccount(\n    requestMessage: flow_access_access_pb.GetAccountRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetAccountResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtLatestBlock(\n    requestMessage: flow_access_access_pb.GetAccountAtLatestBlockRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.AccountResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtLatestBlock(\n    requestMessage: flow_access_access_pb.GetAccountAtLatestBlockRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.AccountResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtBlockHeight(\n    requestMessage: flow_access_access_pb.GetAccountAtBlockHeightRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.AccountResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtBlockHeight(\n    requestMessage: flow_access_access_pb.GetAccountAtBlockHeightRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.AccountResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtLatestBlock(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtLatestBlockRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtLatestBlock(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtLatestBlockRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockID(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockID(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockHeight(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtBlockHeightRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockHeight(\n    requestMessage: flow_access_access_pb.ExecuteScriptAtBlockHeightRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecuteScriptResponse|null) => void\n  ): UnaryResponse;\n  getEventsForHeightRange(\n    requestMessage: flow_access_access_pb.GetEventsForHeightRangeRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.EventsResponse|null) => void\n  ): UnaryResponse;\n  getEventsForHeightRange(\n    requestMessage: flow_access_access_pb.GetEventsForHeightRangeRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.EventsResponse|null) => void\n  ): UnaryResponse;\n  getEventsForBlockIDs(\n    requestMessage: flow_access_access_pb.GetEventsForBlockIDsRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.EventsResponse|null) => void\n  ): UnaryResponse;\n  getEventsForBlockIDs(\n    requestMessage: flow_access_access_pb.GetEventsForBlockIDsRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.EventsResponse|null) => void\n  ): UnaryResponse;\n  getNetworkParameters(\n    requestMessage: flow_access_access_pb.GetNetworkParametersRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetNetworkParametersResponse|null) => void\n  ): UnaryResponse;\n  getNetworkParameters(\n    requestMessage: flow_access_access_pb.GetNetworkParametersRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.GetNetworkParametersResponse|null) => void\n  ): UnaryResponse;\n  getLatestProtocolStateSnapshot(\n    requestMessage: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getLatestProtocolStateSnapshot(\n    requestMessage: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getProtocolStateSnapshotByBlockID(\n    requestMessage: flow_access_access_pb.GetProtocolStateSnapshotByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getProtocolStateSnapshotByBlockID(\n    requestMessage: flow_access_access_pb.GetProtocolStateSnapshotByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getProtocolStateSnapshotByHeight(\n    requestMessage: flow_access_access_pb.GetProtocolStateSnapshotByHeightRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getProtocolStateSnapshotByHeight(\n    requestMessage: flow_access_access_pb.GetProtocolStateSnapshotByHeightRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ProtocolStateSnapshotResponse|null) => void\n  ): UnaryResponse;\n  getExecutionResultForBlockID(\n    requestMessage: flow_access_access_pb.GetExecutionResultForBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultForBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getExecutionResultForBlockID(\n    requestMessage: flow_access_access_pb.GetExecutionResultForBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultForBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getExecutionResultByID(\n    requestMessage: flow_access_access_pb.GetExecutionResultByIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultByIDResponse|null) => void\n  ): UnaryResponse;\n  getExecutionResultByID(\n    requestMessage: flow_access_access_pb.GetExecutionResultByIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_access_access_pb.ExecutionResultByIDResponse|null) => void\n  ): UnaryResponse;\n  subscribeBlocksFromStartBlockID(requestMessage: flow_access_access_pb.SubscribeBlocksFromStartBlockIDRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlocksResponse>;\n  subscribeBlocksFromStartHeight(requestMessage: flow_access_access_pb.SubscribeBlocksFromStartHeightRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlocksResponse>;\n  subscribeBlocksFromLatest(requestMessage: flow_access_access_pb.SubscribeBlocksFromLatestRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlocksResponse>;\n  subscribeBlockHeadersFromStartBlockID(requestMessage: flow_access_access_pb.SubscribeBlockHeadersFromStartBlockIDRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockHeadersResponse>;\n  subscribeBlockHeadersFromStartHeight(requestMessage: flow_access_access_pb.SubscribeBlockHeadersFromStartHeightRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockHeadersResponse>;\n  subscribeBlockHeadersFromLatest(requestMessage: flow_access_access_pb.SubscribeBlockHeadersFromLatestRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockHeadersResponse>;\n  subscribeBlockDigestsFromStartBlockID(requestMessage: flow_access_access_pb.SubscribeBlockDigestsFromStartBlockIDRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockDigestsResponse>;\n  subscribeBlockDigestsFromStartHeight(requestMessage: flow_access_access_pb.SubscribeBlockDigestsFromStartHeightRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockDigestsResponse>;\n  subscribeBlockDigestsFromLatest(requestMessage: flow_access_access_pb.SubscribeBlockDigestsFromLatestRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SubscribeBlockDigestsResponse>;\n  sendAndSubscribeTransactionStatuses(requestMessage: flow_access_access_pb.SendAndSubscribeTransactionStatusesRequest, metadata?: grpc.Metadata): ResponseStream<flow_access_access_pb.SendAndSubscribeTransactionStatusesResponse>;\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/access/access_pb_service.js",
    "content": "// package: flow.access\n// file: flow/access/access.proto\n\nvar flow_access_access_pb = require(\"../../flow/access/access_pb\");\nvar grpc = require(\"@improbable-eng/grpc-web\").grpc;\n\nvar AccessAPI = (function () {\n  function AccessAPI() {}\n  AccessAPI.serviceName = \"flow.access.AccessAPI\";\n  return AccessAPI;\n}());\n\nAccessAPI.Ping = {\n  methodName: \"Ping\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.PingRequest,\n  responseType: flow_access_access_pb.PingResponse\n};\n\nAccessAPI.GetNodeVersionInfo = {\n  methodName: \"GetNodeVersionInfo\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetNodeVersionInfoRequest,\n  responseType: flow_access_access_pb.GetNodeVersionInfoResponse\n};\n\nAccessAPI.GetLatestBlockHeader = {\n  methodName: \"GetLatestBlockHeader\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetLatestBlockHeaderRequest,\n  responseType: flow_access_access_pb.BlockHeaderResponse\n};\n\nAccessAPI.GetBlockHeaderByID = {\n  methodName: \"GetBlockHeaderByID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetBlockHeaderByIDRequest,\n  responseType: flow_access_access_pb.BlockHeaderResponse\n};\n\nAccessAPI.GetBlockHeaderByHeight = {\n  methodName: \"GetBlockHeaderByHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetBlockHeaderByHeightRequest,\n  responseType: flow_access_access_pb.BlockHeaderResponse\n};\n\nAccessAPI.GetLatestBlock = {\n  methodName: \"GetLatestBlock\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetLatestBlockRequest,\n  responseType: flow_access_access_pb.BlockResponse\n};\n\nAccessAPI.GetBlockByID = {\n  methodName: \"GetBlockByID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetBlockByIDRequest,\n  responseType: flow_access_access_pb.BlockResponse\n};\n\nAccessAPI.GetBlockByHeight = {\n  methodName: \"GetBlockByHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetBlockByHeightRequest,\n  responseType: flow_access_access_pb.BlockResponse\n};\n\nAccessAPI.GetCollectionByID = {\n  methodName: \"GetCollectionByID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetCollectionByIDRequest,\n  responseType: flow_access_access_pb.CollectionResponse\n};\n\nAccessAPI.SendTransaction = {\n  methodName: \"SendTransaction\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.SendTransactionRequest,\n  responseType: flow_access_access_pb.SendTransactionResponse\n};\n\nAccessAPI.GetTransaction = {\n  methodName: \"GetTransaction\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetTransactionRequest,\n  responseType: flow_access_access_pb.TransactionResponse\n};\n\nAccessAPI.GetTransactionResult = {\n  methodName: \"GetTransactionResult\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetTransactionRequest,\n  responseType: flow_access_access_pb.TransactionResultResponse\n};\n\nAccessAPI.GetTransactionResultByIndex = {\n  methodName: \"GetTransactionResultByIndex\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetTransactionByIndexRequest,\n  responseType: flow_access_access_pb.TransactionResultResponse\n};\n\nAccessAPI.GetTransactionResultsByBlockID = {\n  methodName: \"GetTransactionResultsByBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n  responseType: flow_access_access_pb.TransactionResultsResponse\n};\n\nAccessAPI.GetTransactionsByBlockID = {\n  methodName: \"GetTransactionsByBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetTransactionsByBlockIDRequest,\n  responseType: flow_access_access_pb.TransactionsResponse\n};\n\nAccessAPI.GetSystemTransaction = {\n  methodName: \"GetSystemTransaction\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetSystemTransactionRequest,\n  responseType: flow_access_access_pb.TransactionResponse\n};\n\nAccessAPI.GetSystemTransactionResult = {\n  methodName: \"GetSystemTransactionResult\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetSystemTransactionResultRequest,\n  responseType: flow_access_access_pb.TransactionResultResponse\n};\n\nAccessAPI.GetAccount = {\n  methodName: \"GetAccount\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetAccountRequest,\n  responseType: flow_access_access_pb.GetAccountResponse\n};\n\nAccessAPI.GetAccountAtLatestBlock = {\n  methodName: \"GetAccountAtLatestBlock\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetAccountAtLatestBlockRequest,\n  responseType: flow_access_access_pb.AccountResponse\n};\n\nAccessAPI.GetAccountAtBlockHeight = {\n  methodName: \"GetAccountAtBlockHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetAccountAtBlockHeightRequest,\n  responseType: flow_access_access_pb.AccountResponse\n};\n\nAccessAPI.ExecuteScriptAtLatestBlock = {\n  methodName: \"ExecuteScriptAtLatestBlock\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.ExecuteScriptAtLatestBlockRequest,\n  responseType: flow_access_access_pb.ExecuteScriptResponse\n};\n\nAccessAPI.ExecuteScriptAtBlockID = {\n  methodName: \"ExecuteScriptAtBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.ExecuteScriptAtBlockIDRequest,\n  responseType: flow_access_access_pb.ExecuteScriptResponse\n};\n\nAccessAPI.ExecuteScriptAtBlockHeight = {\n  methodName: \"ExecuteScriptAtBlockHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.ExecuteScriptAtBlockHeightRequest,\n  responseType: flow_access_access_pb.ExecuteScriptResponse\n};\n\nAccessAPI.GetEventsForHeightRange = {\n  methodName: \"GetEventsForHeightRange\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetEventsForHeightRangeRequest,\n  responseType: flow_access_access_pb.EventsResponse\n};\n\nAccessAPI.GetEventsForBlockIDs = {\n  methodName: \"GetEventsForBlockIDs\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetEventsForBlockIDsRequest,\n  responseType: flow_access_access_pb.EventsResponse\n};\n\nAccessAPI.GetNetworkParameters = {\n  methodName: \"GetNetworkParameters\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetNetworkParametersRequest,\n  responseType: flow_access_access_pb.GetNetworkParametersResponse\n};\n\nAccessAPI.GetLatestProtocolStateSnapshot = {\n  methodName: \"GetLatestProtocolStateSnapshot\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetLatestProtocolStateSnapshotRequest,\n  responseType: flow_access_access_pb.ProtocolStateSnapshotResponse\n};\n\nAccessAPI.GetProtocolStateSnapshotByBlockID = {\n  methodName: \"GetProtocolStateSnapshotByBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetProtocolStateSnapshotByBlockIDRequest,\n  responseType: flow_access_access_pb.ProtocolStateSnapshotResponse\n};\n\nAccessAPI.GetProtocolStateSnapshotByHeight = {\n  methodName: \"GetProtocolStateSnapshotByHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetProtocolStateSnapshotByHeightRequest,\n  responseType: flow_access_access_pb.ProtocolStateSnapshotResponse\n};\n\nAccessAPI.GetExecutionResultForBlockID = {\n  methodName: \"GetExecutionResultForBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetExecutionResultForBlockIDRequest,\n  responseType: flow_access_access_pb.ExecutionResultForBlockIDResponse\n};\n\nAccessAPI.GetExecutionResultByID = {\n  methodName: \"GetExecutionResultByID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_access_access_pb.GetExecutionResultByIDRequest,\n  responseType: flow_access_access_pb.ExecutionResultByIDResponse\n};\n\nAccessAPI.SubscribeBlocksFromStartBlockID = {\n  methodName: \"SubscribeBlocksFromStartBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlocksFromStartBlockIDRequest,\n  responseType: flow_access_access_pb.SubscribeBlocksResponse\n};\n\nAccessAPI.SubscribeBlocksFromStartHeight = {\n  methodName: \"SubscribeBlocksFromStartHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlocksFromStartHeightRequest,\n  responseType: flow_access_access_pb.SubscribeBlocksResponse\n};\n\nAccessAPI.SubscribeBlocksFromLatest = {\n  methodName: \"SubscribeBlocksFromLatest\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlocksFromLatestRequest,\n  responseType: flow_access_access_pb.SubscribeBlocksResponse\n};\n\nAccessAPI.SubscribeBlockHeadersFromStartBlockID = {\n  methodName: \"SubscribeBlockHeadersFromStartBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockHeadersFromStartBlockIDRequest,\n  responseType: flow_access_access_pb.SubscribeBlockHeadersResponse\n};\n\nAccessAPI.SubscribeBlockHeadersFromStartHeight = {\n  methodName: \"SubscribeBlockHeadersFromStartHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockHeadersFromStartHeightRequest,\n  responseType: flow_access_access_pb.SubscribeBlockHeadersResponse\n};\n\nAccessAPI.SubscribeBlockHeadersFromLatest = {\n  methodName: \"SubscribeBlockHeadersFromLatest\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockHeadersFromLatestRequest,\n  responseType: flow_access_access_pb.SubscribeBlockHeadersResponse\n};\n\nAccessAPI.SubscribeBlockDigestsFromStartBlockID = {\n  methodName: \"SubscribeBlockDigestsFromStartBlockID\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockDigestsFromStartBlockIDRequest,\n  responseType: flow_access_access_pb.SubscribeBlockDigestsResponse\n};\n\nAccessAPI.SubscribeBlockDigestsFromStartHeight = {\n  methodName: \"SubscribeBlockDigestsFromStartHeight\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockDigestsFromStartHeightRequest,\n  responseType: flow_access_access_pb.SubscribeBlockDigestsResponse\n};\n\nAccessAPI.SubscribeBlockDigestsFromLatest = {\n  methodName: \"SubscribeBlockDigestsFromLatest\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SubscribeBlockDigestsFromLatestRequest,\n  responseType: flow_access_access_pb.SubscribeBlockDigestsResponse\n};\n\nAccessAPI.SendAndSubscribeTransactionStatuses = {\n  methodName: \"SendAndSubscribeTransactionStatuses\",\n  service: AccessAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_access_access_pb.SendAndSubscribeTransactionStatusesRequest,\n  responseType: flow_access_access_pb.SendAndSubscribeTransactionStatusesResponse\n};\n\nexports.AccessAPI = AccessAPI;\n\nfunction AccessAPIClient(serviceHost, options) {\n  this.serviceHost = serviceHost;\n  this.options = options || {};\n}\n\nAccessAPIClient.prototype.ping = function ping(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.Ping, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getNodeVersionInfo = function getNodeVersionInfo(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetNodeVersionInfo, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getLatestBlockHeader = function getLatestBlockHeader(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetLatestBlockHeader, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getBlockHeaderByID = function getBlockHeaderByID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetBlockHeaderByID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getBlockHeaderByHeight = function getBlockHeaderByHeight(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetBlockHeaderByHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getLatestBlock = function getLatestBlock(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetLatestBlock, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getBlockByID = function getBlockByID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetBlockByID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getBlockByHeight = function getBlockByHeight(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetBlockByHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getCollectionByID = function getCollectionByID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetCollectionByID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.sendTransaction = function sendTransaction(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.SendTransaction, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getTransaction = function getTransaction(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetTransaction, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getTransactionResult = function getTransactionResult(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetTransactionResult, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getTransactionResultByIndex = function getTransactionResultByIndex(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetTransactionResultByIndex, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getTransactionResultsByBlockID = function getTransactionResultsByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetTransactionResultsByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getTransactionsByBlockID = function getTransactionsByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetTransactionsByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getSystemTransaction = function getSystemTransaction(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetSystemTransaction, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getSystemTransactionResult = function getSystemTransactionResult(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetSystemTransactionResult, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getAccount = function getAccount(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetAccount, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getAccountAtLatestBlock = function getAccountAtLatestBlock(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetAccountAtLatestBlock, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getAccountAtBlockHeight = function getAccountAtBlockHeight(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetAccountAtBlockHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.executeScriptAtLatestBlock = function executeScriptAtLatestBlock(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.ExecuteScriptAtLatestBlock, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.executeScriptAtBlockID = function executeScriptAtBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.ExecuteScriptAtBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.executeScriptAtBlockHeight = function executeScriptAtBlockHeight(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.ExecuteScriptAtBlockHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getEventsForHeightRange = function getEventsForHeightRange(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetEventsForHeightRange, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getEventsForBlockIDs = function getEventsForBlockIDs(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetEventsForBlockIDs, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getNetworkParameters = function getNetworkParameters(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetNetworkParameters, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getLatestProtocolStateSnapshot = function getLatestProtocolStateSnapshot(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetLatestProtocolStateSnapshot, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getProtocolStateSnapshotByBlockID = function getProtocolStateSnapshotByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetProtocolStateSnapshotByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getProtocolStateSnapshotByHeight = function getProtocolStateSnapshotByHeight(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetProtocolStateSnapshotByHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getExecutionResultForBlockID = function getExecutionResultForBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetExecutionResultForBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.getExecutionResultByID = function getExecutionResultByID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(AccessAPI.GetExecutionResultByID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlocksFromStartBlockID = function subscribeBlocksFromStartBlockID(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlocksFromStartBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlocksFromStartHeight = function subscribeBlocksFromStartHeight(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlocksFromStartHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlocksFromLatest = function subscribeBlocksFromLatest(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlocksFromLatest, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockHeadersFromStartBlockID = function subscribeBlockHeadersFromStartBlockID(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockHeadersFromStartBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockHeadersFromStartHeight = function subscribeBlockHeadersFromStartHeight(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockHeadersFromStartHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockHeadersFromLatest = function subscribeBlockHeadersFromLatest(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockHeadersFromLatest, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockDigestsFromStartBlockID = function subscribeBlockDigestsFromStartBlockID(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockDigestsFromStartBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockDigestsFromStartHeight = function subscribeBlockDigestsFromStartHeight(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockDigestsFromStartHeight, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.subscribeBlockDigestsFromLatest = function subscribeBlockDigestsFromLatest(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SubscribeBlockDigestsFromLatest, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nAccessAPIClient.prototype.sendAndSubscribeTransactionStatuses = function sendAndSubscribeTransactionStatuses(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(AccessAPI.SendAndSubscribeTransactionStatuses, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nexports.AccessAPIClient = AccessAPIClient;\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/account_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/account.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class Account extends jspb.Message {\n  getAddress(): Uint8Array | string;\n  getAddress_asU8(): Uint8Array;\n  getAddress_asB64(): string;\n  setAddress(value: Uint8Array | string): void;\n\n  getBalance(): number;\n  setBalance(value: number): void;\n\n  getCode(): Uint8Array | string;\n  getCode_asU8(): Uint8Array;\n  getCode_asB64(): string;\n  setCode(value: Uint8Array | string): void;\n\n  clearKeysList(): void;\n  getKeysList(): Array<AccountKey>;\n  setKeysList(value: Array<AccountKey>): void;\n  addKeys(value?: AccountKey, index?: number): AccountKey;\n\n  getContractsMap(): jspb.Map<string, Uint8Array | string>;\n  clearContractsMap(): void;\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Account.AsObject;\n  static toObject(includeInstance: boolean, msg: Account): Account.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Account, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Account;\n  static deserializeBinaryFromReader(message: Account, reader: jspb.BinaryReader): Account;\n}\n\nexport namespace Account {\n  export type AsObject = {\n    address: Uint8Array | string,\n    balance: number,\n    code: Uint8Array | string,\n    keysList: Array<AccountKey.AsObject>,\n    contractsMap: Array<[string, Uint8Array | string]>,\n  }\n}\n\nexport class AccountKey extends jspb.Message {\n  getIndex(): number;\n  setIndex(value: number): void;\n\n  getPublicKey(): Uint8Array | string;\n  getPublicKey_asU8(): Uint8Array;\n  getPublicKey_asB64(): string;\n  setPublicKey(value: Uint8Array | string): void;\n\n  getSignAlgo(): number;\n  setSignAlgo(value: number): void;\n\n  getHashAlgo(): number;\n  setHashAlgo(value: number): void;\n\n  getWeight(): number;\n  setWeight(value: number): void;\n\n  getSequenceNumber(): number;\n  setSequenceNumber(value: number): void;\n\n  getRevoked(): boolean;\n  setRevoked(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): AccountKey.AsObject;\n  static toObject(includeInstance: boolean, msg: AccountKey): AccountKey.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: AccountKey, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): AccountKey;\n  static deserializeBinaryFromReader(message: AccountKey, reader: jspb.BinaryReader): AccountKey;\n}\n\nexport namespace AccountKey {\n  export type AsObject = {\n    index: number,\n    publicKey: Uint8Array | string,\n    signAlgo: number,\n    hashAlgo: number,\n    weight: number,\n    sequenceNumber: number,\n    revoked: boolean,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/account_pb.js",
    "content": "// source: flow/entities/account.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.Account', null, global);\ngoog.exportSymbol('proto.flow.entities.AccountKey', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Account = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.Account.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.Account, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Account.displayName = 'proto.flow.entities.Account';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.AccountKey = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.AccountKey, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.AccountKey.displayName = 'proto.flow.entities.AccountKey';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.Account.repeatedFields_ = [4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Account.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Account.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Account} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Account.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64(),\n    balance: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    code: msg.getCode_asB64(),\n    keysList: jspb.Message.toObjectList(msg.getKeysList(),\n    proto.flow.entities.AccountKey.toObject, includeInstance),\n    contractsMap: (f = msg.getContractsMap()) ? f.toObject(includeInstance, undefined) : []\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Account}\n */\nproto.flow.entities.Account.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Account;\n  return proto.flow.entities.Account.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Account} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Account}\n */\nproto.flow.entities.Account.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBalance(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setCode(value);\n      break;\n    case 4:\n      var value = new proto.flow.entities.AccountKey;\n      reader.readMessage(value,proto.flow.entities.AccountKey.deserializeBinaryFromReader);\n      msg.addKeys(value);\n      break;\n    case 5:\n      var value = msg.getContractsMap();\n      reader.readMessage(value, function(message, reader) {\n        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, \"\", \"\");\n         });\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Account.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Account.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Account} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Account.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBalance();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getCode_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getKeysList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      4,\n      f,\n      proto.flow.entities.AccountKey.serializeBinaryToWriter\n    );\n  }\n  f = message.getContractsMap(true);\n  if (f && f.getLength() > 0) {\n    f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes);\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Account.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.entities.Account.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Account.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Account} returns this\n */\nproto.flow.entities.Account.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 balance = 2;\n * @return {number}\n */\nproto.flow.entities.Account.prototype.getBalance = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Account} returns this\n */\nproto.flow.entities.Account.prototype.setBalance = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional bytes code = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Account.prototype.getCode = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes code = 3;\n * This is a type-conversion wrapper around `getCode()`\n * @return {string}\n */\nproto.flow.entities.Account.prototype.getCode_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getCode()));\n};\n\n\n/**\n * optional bytes code = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getCode()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Account.prototype.getCode_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getCode()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Account} returns this\n */\nproto.flow.entities.Account.prototype.setCode = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * repeated AccountKey keys = 4;\n * @return {!Array<!proto.flow.entities.AccountKey>}\n */\nproto.flow.entities.Account.prototype.getKeysList = function() {\n  return /** @type{!Array<!proto.flow.entities.AccountKey>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.AccountKey, 4));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.AccountKey>} value\n * @return {!proto.flow.entities.Account} returns this\n*/\nproto.flow.entities.Account.prototype.setKeysList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 4, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.AccountKey=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.AccountKey}\n */\nproto.flow.entities.Account.prototype.addKeys = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.AccountKey, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Account} returns this\n */\nproto.flow.entities.Account.prototype.clearKeysList = function() {\n  return this.setKeysList([]);\n};\n\n\n/**\n * map<string, bytes> contracts = 5;\n * @param {boolean=} opt_noLazyCreate Do not create the map if\n * empty, instead returning `undefined`\n * @return {!jspb.Map<string,!(string|Uint8Array)>}\n */\nproto.flow.entities.Account.prototype.getContractsMap = function(opt_noLazyCreate) {\n  return /** @type {!jspb.Map<string,!(string|Uint8Array)>} */ (\n      jspb.Message.getMapField(this, 5, opt_noLazyCreate,\n      null));\n};\n\n\n/**\n * Clears values from the map. The map will be non-null.\n * @return {!proto.flow.entities.Account} returns this\n */\nproto.flow.entities.Account.prototype.clearContractsMap = function() {\n  this.getContractsMap().clear();\n  return this;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.AccountKey.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.AccountKey.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.AccountKey} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.AccountKey.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    index: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    publicKey: msg.getPublicKey_asB64(),\n    signAlgo: jspb.Message.getFieldWithDefault(msg, 3, 0),\n    hashAlgo: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    weight: jspb.Message.getFieldWithDefault(msg, 5, 0),\n    sequenceNumber: jspb.Message.getFieldWithDefault(msg, 6, 0),\n    revoked: jspb.Message.getBooleanFieldWithDefault(msg, 7, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.AccountKey}\n */\nproto.flow.entities.AccountKey.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.AccountKey;\n  return proto.flow.entities.AccountKey.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.AccountKey} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.AccountKey}\n */\nproto.flow.entities.AccountKey.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setIndex(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPublicKey(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setSignAlgo(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHashAlgo(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setWeight(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setSequenceNumber(value);\n      break;\n    case 7:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setRevoked(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.AccountKey.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.AccountKey.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.AccountKey} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.AccountKey.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getPublicKey_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getSignAlgo();\n  if (f !== 0) {\n    writer.writeUint32(\n      3,\n      f\n    );\n  }\n  f = message.getHashAlgo();\n  if (f !== 0) {\n    writer.writeUint32(\n      4,\n      f\n    );\n  }\n  f = message.getWeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      5,\n      f\n    );\n  }\n  f = message.getSequenceNumber();\n  if (f !== 0) {\n    writer.writeUint32(\n      6,\n      f\n    );\n  }\n  f = message.getRevoked();\n  if (f) {\n    writer.writeBool(\n      7,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 index = 1;\n * @return {number}\n */\nproto.flow.entities.AccountKey.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bytes public_key = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.AccountKey.prototype.getPublicKey = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes public_key = 2;\n * This is a type-conversion wrapper around `getPublicKey()`\n * @return {string}\n */\nproto.flow.entities.AccountKey.prototype.getPublicKey_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPublicKey()));\n};\n\n\n/**\n * optional bytes public_key = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPublicKey()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.AccountKey.prototype.getPublicKey_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPublicKey()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional uint32 sign_algo = 3;\n * @return {number}\n */\nproto.flow.entities.AccountKey.prototype.getSignAlgo = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setSignAlgo = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional uint32 hash_algo = 4;\n * @return {number}\n */\nproto.flow.entities.AccountKey.prototype.getHashAlgo = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setHashAlgo = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional uint32 weight = 5;\n * @return {number}\n */\nproto.flow.entities.AccountKey.prototype.getWeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setWeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional uint32 sequence_number = 6;\n * @return {number}\n */\nproto.flow.entities.AccountKey.prototype.getSequenceNumber = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setSequenceNumber = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional bool revoked = 7;\n * @return {boolean}\n */\nproto.flow.entities.AccountKey.prototype.getRevoked = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.entities.AccountKey} returns this\n */\nproto.flow.entities.AccountKey.prototype.setRevoked = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 7, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/account_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/account.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/account_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/account.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_execution_data_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_execution_data.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as flow_entities_event_pb from \"../../flow/entities/event_pb\";\nimport * as flow_entities_transaction_pb from \"../../flow/entities/transaction_pb\";\n\nexport class BlockExecutionData extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  clearChunkExecutionDataList(): void;\n  getChunkExecutionDataList(): Array<ChunkExecutionData>;\n  setChunkExecutionDataList(value: Array<ChunkExecutionData>): void;\n  addChunkExecutionData(value?: ChunkExecutionData, index?: number): ChunkExecutionData;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockExecutionData.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockExecutionData): BlockExecutionData.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockExecutionData, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockExecutionData;\n  static deserializeBinaryFromReader(message: BlockExecutionData, reader: jspb.BinaryReader): BlockExecutionData;\n}\n\nexport namespace BlockExecutionData {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    chunkExecutionDataList: Array<ChunkExecutionData.AsObject>,\n  }\n}\n\nexport class ChunkExecutionData extends jspb.Message {\n  hasCollection(): boolean;\n  clearCollection(): void;\n  getCollection(): ExecutionDataCollection | undefined;\n  setCollection(value?: ExecutionDataCollection): void;\n\n  clearEventsList(): void;\n  getEventsList(): Array<flow_entities_event_pb.Event>;\n  setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n  addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n  hasTrieupdate(): boolean;\n  clearTrieupdate(): void;\n  getTrieupdate(): TrieUpdate | undefined;\n  setTrieupdate(value?: TrieUpdate): void;\n\n  clearTransactionResultsList(): void;\n  getTransactionResultsList(): Array<ExecutionDataTransactionResult>;\n  setTransactionResultsList(value: Array<ExecutionDataTransactionResult>): void;\n  addTransactionResults(value?: ExecutionDataTransactionResult, index?: number): ExecutionDataTransactionResult;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ChunkExecutionData.AsObject;\n  static toObject(includeInstance: boolean, msg: ChunkExecutionData): ChunkExecutionData.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ChunkExecutionData, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ChunkExecutionData;\n  static deserializeBinaryFromReader(message: ChunkExecutionData, reader: jspb.BinaryReader): ChunkExecutionData;\n}\n\nexport namespace ChunkExecutionData {\n  export type AsObject = {\n    collection?: ExecutionDataCollection.AsObject,\n    eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n    trieupdate?: TrieUpdate.AsObject,\n    transactionResultsList: Array<ExecutionDataTransactionResult.AsObject>,\n  }\n}\n\nexport class ExecutionDataCollection extends jspb.Message {\n  clearTransactionsList(): void;\n  getTransactionsList(): Array<flow_entities_transaction_pb.Transaction>;\n  setTransactionsList(value: Array<flow_entities_transaction_pb.Transaction>): void;\n  addTransactions(value?: flow_entities_transaction_pb.Transaction, index?: number): flow_entities_transaction_pb.Transaction;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionDataCollection.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionDataCollection): ExecutionDataCollection.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionDataCollection, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionDataCollection;\n  static deserializeBinaryFromReader(message: ExecutionDataCollection, reader: jspb.BinaryReader): ExecutionDataCollection;\n}\n\nexport namespace ExecutionDataCollection {\n  export type AsObject = {\n    transactionsList: Array<flow_entities_transaction_pb.Transaction.AsObject>,\n  }\n}\n\nexport class TrieUpdate extends jspb.Message {\n  getRootHash(): Uint8Array | string;\n  getRootHash_asU8(): Uint8Array;\n  getRootHash_asB64(): string;\n  setRootHash(value: Uint8Array | string): void;\n\n  clearPathsList(): void;\n  getPathsList(): Array<Uint8Array | string>;\n  getPathsList_asU8(): Array<Uint8Array>;\n  getPathsList_asB64(): Array<string>;\n  setPathsList(value: Array<Uint8Array | string>): void;\n  addPaths(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  clearPayloadsList(): void;\n  getPayloadsList(): Array<Payload>;\n  setPayloadsList(value: Array<Payload>): void;\n  addPayloads(value?: Payload, index?: number): Payload;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TrieUpdate.AsObject;\n  static toObject(includeInstance: boolean, msg: TrieUpdate): TrieUpdate.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TrieUpdate, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TrieUpdate;\n  static deserializeBinaryFromReader(message: TrieUpdate, reader: jspb.BinaryReader): TrieUpdate;\n}\n\nexport namespace TrieUpdate {\n  export type AsObject = {\n    rootHash: Uint8Array | string,\n    pathsList: Array<Uint8Array | string>,\n    payloadsList: Array<Payload.AsObject>,\n  }\n}\n\nexport class Payload extends jspb.Message {\n  clearKeypartList(): void;\n  getKeypartList(): Array<KeyPart>;\n  setKeypartList(value: Array<KeyPart>): void;\n  addKeypart(value?: KeyPart, index?: number): KeyPart;\n\n  getValue(): Uint8Array | string;\n  getValue_asU8(): Uint8Array;\n  getValue_asB64(): string;\n  setValue(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Payload.AsObject;\n  static toObject(includeInstance: boolean, msg: Payload): Payload.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Payload, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Payload;\n  static deserializeBinaryFromReader(message: Payload, reader: jspb.BinaryReader): Payload;\n}\n\nexport namespace Payload {\n  export type AsObject = {\n    keypartList: Array<KeyPart.AsObject>,\n    value: Uint8Array | string,\n  }\n}\n\nexport class KeyPart extends jspb.Message {\n  getType(): number;\n  setType(value: number): void;\n\n  getValue(): Uint8Array | string;\n  getValue_asU8(): Uint8Array;\n  getValue_asB64(): string;\n  setValue(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): KeyPart.AsObject;\n  static toObject(includeInstance: boolean, msg: KeyPart): KeyPart.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: KeyPart, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): KeyPart;\n  static deserializeBinaryFromReader(message: KeyPart, reader: jspb.BinaryReader): KeyPart;\n}\n\nexport namespace KeyPart {\n  export type AsObject = {\n    type: number,\n    value: Uint8Array | string,\n  }\n}\n\nexport class ExecutionDataTransactionResult extends jspb.Message {\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  getFailed(): boolean;\n  setFailed(value: boolean): void;\n\n  getComputationUsed(): number;\n  setComputationUsed(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionDataTransactionResult.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionDataTransactionResult): ExecutionDataTransactionResult.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionDataTransactionResult, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionDataTransactionResult;\n  static deserializeBinaryFromReader(message: ExecutionDataTransactionResult, reader: jspb.BinaryReader): ExecutionDataTransactionResult;\n}\n\nexport namespace ExecutionDataTransactionResult {\n  export type AsObject = {\n    transactionId: Uint8Array | string,\n    failed: boolean,\n    computationUsed: number,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_execution_data_pb.js",
    "content": "// source: flow/entities/block_execution_data.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar flow_entities_event_pb = require('../../flow/entities/event_pb.js');\ngoog.object.extend(proto, flow_entities_event_pb);\nvar flow_entities_transaction_pb = require('../../flow/entities/transaction_pb.js');\ngoog.object.extend(proto, flow_entities_transaction_pb);\ngoog.exportSymbol('proto.flow.entities.BlockExecutionData', null, global);\ngoog.exportSymbol('proto.flow.entities.ChunkExecutionData', null, global);\ngoog.exportSymbol('proto.flow.entities.ExecutionDataCollection', null, global);\ngoog.exportSymbol('proto.flow.entities.ExecutionDataTransactionResult', null, global);\ngoog.exportSymbol('proto.flow.entities.KeyPart', null, global);\ngoog.exportSymbol('proto.flow.entities.Payload', null, global);\ngoog.exportSymbol('proto.flow.entities.TrieUpdate', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.BlockExecutionData = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.BlockExecutionData.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.BlockExecutionData, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.BlockExecutionData.displayName = 'proto.flow.entities.BlockExecutionData';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ChunkExecutionData = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ChunkExecutionData.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.ChunkExecutionData, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ChunkExecutionData.displayName = 'proto.flow.entities.ChunkExecutionData';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ExecutionDataCollection = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ExecutionDataCollection.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.ExecutionDataCollection, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ExecutionDataCollection.displayName = 'proto.flow.entities.ExecutionDataCollection';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.TrieUpdate = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.TrieUpdate.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.TrieUpdate, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.TrieUpdate.displayName = 'proto.flow.entities.TrieUpdate';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Payload = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.Payload.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.Payload, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Payload.displayName = 'proto.flow.entities.Payload';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.KeyPart = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.KeyPart, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.KeyPart.displayName = 'proto.flow.entities.KeyPart';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ExecutionDataTransactionResult = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.ExecutionDataTransactionResult, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ExecutionDataTransactionResult.displayName = 'proto.flow.entities.ExecutionDataTransactionResult';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.BlockExecutionData.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.BlockExecutionData.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.BlockExecutionData.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.BlockExecutionData} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockExecutionData.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    chunkExecutionDataList: jspb.Message.toObjectList(msg.getChunkExecutionDataList(),\n    proto.flow.entities.ChunkExecutionData.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.BlockExecutionData}\n */\nproto.flow.entities.BlockExecutionData.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.BlockExecutionData;\n  return proto.flow.entities.BlockExecutionData.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.BlockExecutionData} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.BlockExecutionData}\n */\nproto.flow.entities.BlockExecutionData.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = new proto.flow.entities.ChunkExecutionData;\n      reader.readMessage(value,proto.flow.entities.ChunkExecutionData.deserializeBinaryFromReader);\n      msg.addChunkExecutionData(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockExecutionData.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.BlockExecutionData.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.BlockExecutionData} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockExecutionData.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getChunkExecutionDataList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      proto.flow.entities.ChunkExecutionData.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockExecutionData.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.entities.BlockExecutionData.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockExecutionData.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockExecutionData} returns this\n */\nproto.flow.entities.BlockExecutionData.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated ChunkExecutionData chunk_execution_data = 2;\n * @return {!Array<!proto.flow.entities.ChunkExecutionData>}\n */\nproto.flow.entities.BlockExecutionData.prototype.getChunkExecutionDataList = function() {\n  return /** @type{!Array<!proto.flow.entities.ChunkExecutionData>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.ChunkExecutionData, 2));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.ChunkExecutionData>} value\n * @return {!proto.flow.entities.BlockExecutionData} returns this\n*/\nproto.flow.entities.BlockExecutionData.prototype.setChunkExecutionDataList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.ChunkExecutionData=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ChunkExecutionData}\n */\nproto.flow.entities.BlockExecutionData.prototype.addChunkExecutionData = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.flow.entities.ChunkExecutionData, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.BlockExecutionData} returns this\n */\nproto.flow.entities.BlockExecutionData.prototype.clearChunkExecutionDataList = function() {\n  return this.setChunkExecutionDataList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.ChunkExecutionData.repeatedFields_ = [2,4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ChunkExecutionData.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ChunkExecutionData.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ChunkExecutionData} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ChunkExecutionData.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    collection: (f = msg.getCollection()) && proto.flow.entities.ExecutionDataCollection.toObject(includeInstance, f),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance),\n    trieupdate: (f = msg.getTrieupdate()) && proto.flow.entities.TrieUpdate.toObject(includeInstance, f),\n    transactionResultsList: jspb.Message.toObjectList(msg.getTransactionResultsList(),\n    proto.flow.entities.ExecutionDataTransactionResult.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ChunkExecutionData}\n */\nproto.flow.entities.ChunkExecutionData.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ChunkExecutionData;\n  return proto.flow.entities.ChunkExecutionData.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ChunkExecutionData} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ChunkExecutionData}\n */\nproto.flow.entities.ChunkExecutionData.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.entities.ExecutionDataCollection;\n      reader.readMessage(value,proto.flow.entities.ExecutionDataCollection.deserializeBinaryFromReader);\n      msg.setCollection(value);\n      break;\n    case 2:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    case 3:\n      var value = new proto.flow.entities.TrieUpdate;\n      reader.readMessage(value,proto.flow.entities.TrieUpdate.deserializeBinaryFromReader);\n      msg.setTrieupdate(value);\n      break;\n    case 4:\n      var value = new proto.flow.entities.ExecutionDataTransactionResult;\n      reader.readMessage(value,proto.flow.entities.ExecutionDataTransactionResult.deserializeBinaryFromReader);\n      msg.addTransactionResults(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ChunkExecutionData.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ChunkExecutionData.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ChunkExecutionData} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ChunkExecutionData.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getCollection();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.flow.entities.ExecutionDataCollection.serializeBinaryToWriter\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n  f = message.getTrieupdate();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      proto.flow.entities.TrieUpdate.serializeBinaryToWriter\n    );\n  }\n  f = message.getTransactionResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      4,\n      f,\n      proto.flow.entities.ExecutionDataTransactionResult.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional ExecutionDataCollection collection = 1;\n * @return {?proto.flow.entities.ExecutionDataCollection}\n */\nproto.flow.entities.ChunkExecutionData.prototype.getCollection = function() {\n  return /** @type{?proto.flow.entities.ExecutionDataCollection} */ (\n    jspb.Message.getWrapperField(this, proto.flow.entities.ExecutionDataCollection, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.ExecutionDataCollection|undefined} value\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n*/\nproto.flow.entities.ChunkExecutionData.prototype.setCollection = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n */\nproto.flow.entities.ChunkExecutionData.prototype.clearCollection = function() {\n  return this.setCollection(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.ChunkExecutionData.prototype.hasCollection = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * repeated Event events = 2;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.entities.ChunkExecutionData.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 2));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n*/\nproto.flow.entities.ChunkExecutionData.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.entities.ChunkExecutionData.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n */\nproto.flow.entities.ChunkExecutionData.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * optional TrieUpdate trieUpdate = 3;\n * @return {?proto.flow.entities.TrieUpdate}\n */\nproto.flow.entities.ChunkExecutionData.prototype.getTrieupdate = function() {\n  return /** @type{?proto.flow.entities.TrieUpdate} */ (\n    jspb.Message.getWrapperField(this, proto.flow.entities.TrieUpdate, 3));\n};\n\n\n/**\n * @param {?proto.flow.entities.TrieUpdate|undefined} value\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n*/\nproto.flow.entities.ChunkExecutionData.prototype.setTrieupdate = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n */\nproto.flow.entities.ChunkExecutionData.prototype.clearTrieupdate = function() {\n  return this.setTrieupdate(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.ChunkExecutionData.prototype.hasTrieupdate = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n/**\n * repeated ExecutionDataTransactionResult transaction_results = 4;\n * @return {!Array<!proto.flow.entities.ExecutionDataTransactionResult>}\n */\nproto.flow.entities.ChunkExecutionData.prototype.getTransactionResultsList = function() {\n  return /** @type{!Array<!proto.flow.entities.ExecutionDataTransactionResult>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.ExecutionDataTransactionResult, 4));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.ExecutionDataTransactionResult>} value\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n*/\nproto.flow.entities.ChunkExecutionData.prototype.setTransactionResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 4, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.ExecutionDataTransactionResult=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ExecutionDataTransactionResult}\n */\nproto.flow.entities.ChunkExecutionData.prototype.addTransactionResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.ExecutionDataTransactionResult, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ChunkExecutionData} returns this\n */\nproto.flow.entities.ChunkExecutionData.prototype.clearTransactionResultsList = function() {\n  return this.setTransactionResultsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.ExecutionDataCollection.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ExecutionDataCollection.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ExecutionDataCollection.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ExecutionDataCollection} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionDataCollection.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(),\n    flow_entities_transaction_pb.Transaction.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ExecutionDataCollection}\n */\nproto.flow.entities.ExecutionDataCollection.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ExecutionDataCollection;\n  return proto.flow.entities.ExecutionDataCollection.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ExecutionDataCollection} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ExecutionDataCollection}\n */\nproto.flow.entities.ExecutionDataCollection.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_transaction_pb.Transaction;\n      reader.readMessage(value,flow_entities_transaction_pb.Transaction.deserializeBinaryFromReader);\n      msg.addTransactions(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionDataCollection.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ExecutionDataCollection.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ExecutionDataCollection} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionDataCollection.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      flow_entities_transaction_pb.Transaction.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * repeated Transaction transactions = 1;\n * @return {!Array<!proto.flow.entities.Transaction>}\n */\nproto.flow.entities.ExecutionDataCollection.prototype.getTransactionsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Transaction>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_transaction_pb.Transaction, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Transaction>} value\n * @return {!proto.flow.entities.ExecutionDataCollection} returns this\n*/\nproto.flow.entities.ExecutionDataCollection.prototype.setTransactionsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Transaction=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction}\n */\nproto.flow.entities.ExecutionDataCollection.prototype.addTransactions = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.entities.Transaction, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ExecutionDataCollection} returns this\n */\nproto.flow.entities.ExecutionDataCollection.prototype.clearTransactionsList = function() {\n  return this.setTransactionsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.TrieUpdate.repeatedFields_ = [2,3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.TrieUpdate.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.TrieUpdate.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.TrieUpdate} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.TrieUpdate.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    rootHash: msg.getRootHash_asB64(),\n    pathsList: msg.getPathsList_asB64(),\n    payloadsList: jspb.Message.toObjectList(msg.getPayloadsList(),\n    proto.flow.entities.Payload.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.TrieUpdate}\n */\nproto.flow.entities.TrieUpdate.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.TrieUpdate;\n  return proto.flow.entities.TrieUpdate.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.TrieUpdate} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.TrieUpdate}\n */\nproto.flow.entities.TrieUpdate.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setRootHash(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addPaths(value);\n      break;\n    case 3:\n      var value = new proto.flow.entities.Payload;\n      reader.readMessage(value,proto.flow.entities.Payload.deserializeBinaryFromReader);\n      msg.addPayloads(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.TrieUpdate.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.TrieUpdate.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.TrieUpdate} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.TrieUpdate.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getRootHash_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getPathsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n  f = message.getPayloadsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      proto.flow.entities.Payload.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes root_hash = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.TrieUpdate.prototype.getRootHash = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes root_hash = 1;\n * This is a type-conversion wrapper around `getRootHash()`\n * @return {string}\n */\nproto.flow.entities.TrieUpdate.prototype.getRootHash_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getRootHash()));\n};\n\n\n/**\n * optional bytes root_hash = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getRootHash()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.TrieUpdate.prototype.getRootHash_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getRootHash()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.TrieUpdate} returns this\n */\nproto.flow.entities.TrieUpdate.prototype.setRootHash = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated bytes paths = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.TrieUpdate.prototype.getPathsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes paths = 2;\n * This is a type-conversion wrapper around `getPathsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.TrieUpdate.prototype.getPathsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getPathsList()));\n};\n\n\n/**\n * repeated bytes paths = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPathsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.TrieUpdate.prototype.getPathsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getPathsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.TrieUpdate} returns this\n */\nproto.flow.entities.TrieUpdate.prototype.setPathsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.TrieUpdate} returns this\n */\nproto.flow.entities.TrieUpdate.prototype.addPaths = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.TrieUpdate} returns this\n */\nproto.flow.entities.TrieUpdate.prototype.clearPathsList = function() {\n  return this.setPathsList([]);\n};\n\n\n/**\n * repeated Payload payloads = 3;\n * @return {!Array<!proto.flow.entities.Payload>}\n */\nproto.flow.entities.TrieUpdate.prototype.getPayloadsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Payload>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.Payload, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Payload>} value\n * @return {!proto.flow.entities.TrieUpdate} returns this\n*/\nproto.flow.entities.TrieUpdate.prototype.setPayloadsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Payload=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Payload}\n */\nproto.flow.entities.TrieUpdate.prototype.addPayloads = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Payload, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.TrieUpdate} returns this\n */\nproto.flow.entities.TrieUpdate.prototype.clearPayloadsList = function() {\n  return this.setPayloadsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.Payload.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Payload.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Payload.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Payload} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Payload.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    keypartList: jspb.Message.toObjectList(msg.getKeypartList(),\n    proto.flow.entities.KeyPart.toObject, includeInstance),\n    value: msg.getValue_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Payload}\n */\nproto.flow.entities.Payload.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Payload;\n  return proto.flow.entities.Payload.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Payload} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Payload}\n */\nproto.flow.entities.Payload.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.entities.KeyPart;\n      reader.readMessage(value,proto.flow.entities.KeyPart.deserializeBinaryFromReader);\n      msg.addKeypart(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setValue(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Payload.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Payload.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Payload} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Payload.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getKeypartList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.entities.KeyPart.serializeBinaryToWriter\n    );\n  }\n  f = message.getValue_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated KeyPart keyPart = 1;\n * @return {!Array<!proto.flow.entities.KeyPart>}\n */\nproto.flow.entities.Payload.prototype.getKeypartList = function() {\n  return /** @type{!Array<!proto.flow.entities.KeyPart>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.KeyPart, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.KeyPart>} value\n * @return {!proto.flow.entities.Payload} returns this\n*/\nproto.flow.entities.Payload.prototype.setKeypartList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.KeyPart=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.KeyPart}\n */\nproto.flow.entities.Payload.prototype.addKeypart = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.entities.KeyPart, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Payload} returns this\n */\nproto.flow.entities.Payload.prototype.clearKeypartList = function() {\n  return this.setKeypartList([]);\n};\n\n\n/**\n * optional bytes value = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Payload.prototype.getValue = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes value = 2;\n * This is a type-conversion wrapper around `getValue()`\n * @return {string}\n */\nproto.flow.entities.Payload.prototype.getValue_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getValue()));\n};\n\n\n/**\n * optional bytes value = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValue()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Payload.prototype.getValue_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getValue()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Payload} returns this\n */\nproto.flow.entities.Payload.prototype.setValue = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.KeyPart.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.KeyPart.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.KeyPart} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.KeyPart.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    value: msg.getValue_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.KeyPart}\n */\nproto.flow.entities.KeyPart.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.KeyPart;\n  return proto.flow.entities.KeyPart.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.KeyPart} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.KeyPart}\n */\nproto.flow.entities.KeyPart.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setValue(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.KeyPart.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.KeyPart.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.KeyPart} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.KeyPart.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getValue_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 type = 1;\n * @return {number}\n */\nproto.flow.entities.KeyPart.prototype.getType = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.KeyPart} returns this\n */\nproto.flow.entities.KeyPart.prototype.setType = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bytes value = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.KeyPart.prototype.getValue = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes value = 2;\n * This is a type-conversion wrapper around `getValue()`\n * @return {string}\n */\nproto.flow.entities.KeyPart.prototype.getValue_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getValue()));\n};\n\n\n/**\n * optional bytes value = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValue()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.KeyPart.prototype.getValue_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getValue()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.KeyPart} returns this\n */\nproto.flow.entities.KeyPart.prototype.setValue = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ExecutionDataTransactionResult.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ExecutionDataTransactionResult} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionDataTransactionResult.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionId: msg.getTransactionId_asB64(),\n    failed: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),\n    computationUsed: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ExecutionDataTransactionResult}\n */\nproto.flow.entities.ExecutionDataTransactionResult.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ExecutionDataTransactionResult;\n  return proto.flow.entities.ExecutionDataTransactionResult.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ExecutionDataTransactionResult} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ExecutionDataTransactionResult}\n */\nproto.flow.entities.ExecutionDataTransactionResult.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFailed(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setComputationUsed(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ExecutionDataTransactionResult.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ExecutionDataTransactionResult} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionDataTransactionResult.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getFailed();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n  f = message.getComputationUsed();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionDataTransactionResult} returns this\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bool failed = 2;\n * @return {boolean}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.getFailed = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.entities.ExecutionDataTransactionResult} returns this\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.setFailed = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n/**\n * optional uint64 computation_used = 3;\n * @return {number}\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.getComputationUsed = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.ExecutionDataTransactionResult} returns this\n */\nproto.flow.entities.ExecutionDataTransactionResult.prototype.setComputationUsed = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_execution_data_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_execution_data.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_execution_data_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/block_execution_data.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_header.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as google_protobuf_timestamp_pb from \"google-protobuf/google/protobuf/timestamp_pb\";\n\nexport class BlockHeader extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  getParentId(): Uint8Array | string;\n  getParentId_asU8(): Uint8Array;\n  getParentId_asB64(): string;\n  setParentId(value: Uint8Array | string): void;\n\n  getHeight(): number;\n  setHeight(value: number): void;\n\n  hasTimestamp(): boolean;\n  clearTimestamp(): void;\n  getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n  setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n  getPayloadHash(): Uint8Array | string;\n  getPayloadHash_asU8(): Uint8Array;\n  getPayloadHash_asB64(): string;\n  setPayloadHash(value: Uint8Array | string): void;\n\n  getView(): number;\n  setView(value: number): void;\n\n  clearParentVoterIdsList(): void;\n  getParentVoterIdsList(): Array<Uint8Array | string>;\n  getParentVoterIdsList_asU8(): Array<Uint8Array>;\n  getParentVoterIdsList_asB64(): Array<string>;\n  setParentVoterIdsList(value: Array<Uint8Array | string>): void;\n  addParentVoterIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getParentVoterSigData(): Uint8Array | string;\n  getParentVoterSigData_asU8(): Uint8Array;\n  getParentVoterSigData_asB64(): string;\n  setParentVoterSigData(value: Uint8Array | string): void;\n\n  getProposerId(): Uint8Array | string;\n  getProposerId_asU8(): Uint8Array;\n  getProposerId_asB64(): string;\n  setProposerId(value: Uint8Array | string): void;\n\n  getProposerSigData(): Uint8Array | string;\n  getProposerSigData_asU8(): Uint8Array;\n  getProposerSigData_asB64(): string;\n  setProposerSigData(value: Uint8Array | string): void;\n\n  getChainId(): string;\n  setChainId(value: string): void;\n\n  getParentVoterIndices(): Uint8Array | string;\n  getParentVoterIndices_asU8(): Uint8Array;\n  getParentVoterIndices_asB64(): string;\n  setParentVoterIndices(value: Uint8Array | string): void;\n\n  hasLastViewTc(): boolean;\n  clearLastViewTc(): void;\n  getLastViewTc(): TimeoutCertificate | undefined;\n  setLastViewTc(value?: TimeoutCertificate): void;\n\n  getParentView(): number;\n  setParentView(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockHeader.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockHeader): BlockHeader.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockHeader, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockHeader;\n  static deserializeBinaryFromReader(message: BlockHeader, reader: jspb.BinaryReader): BlockHeader;\n}\n\nexport namespace BlockHeader {\n  export type AsObject = {\n    id: Uint8Array | string,\n    parentId: Uint8Array | string,\n    height: number,\n    timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n    payloadHash: Uint8Array | string,\n    view: number,\n    parentVoterIdsList: Array<Uint8Array | string>,\n    parentVoterSigData: Uint8Array | string,\n    proposerId: Uint8Array | string,\n    proposerSigData: Uint8Array | string,\n    chainId: string,\n    parentVoterIndices: Uint8Array | string,\n    lastViewTc?: TimeoutCertificate.AsObject,\n    parentView: number,\n  }\n}\n\nexport class TimeoutCertificate extends jspb.Message {\n  getView(): number;\n  setView(value: number): void;\n\n  clearHighQcViewsList(): void;\n  getHighQcViewsList(): Array<number>;\n  setHighQcViewsList(value: Array<number>): void;\n  addHighQcViews(value: number, index?: number): number;\n\n  hasHighestQc(): boolean;\n  clearHighestQc(): void;\n  getHighestQc(): QuorumCertificate | undefined;\n  setHighestQc(value?: QuorumCertificate): void;\n\n  getSignerIndices(): Uint8Array | string;\n  getSignerIndices_asU8(): Uint8Array;\n  getSignerIndices_asB64(): string;\n  setSignerIndices(value: Uint8Array | string): void;\n\n  getSigData(): Uint8Array | string;\n  getSigData_asU8(): Uint8Array;\n  getSigData_asB64(): string;\n  setSigData(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): TimeoutCertificate.AsObject;\n  static toObject(includeInstance: boolean, msg: TimeoutCertificate): TimeoutCertificate.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: TimeoutCertificate, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): TimeoutCertificate;\n  static deserializeBinaryFromReader(message: TimeoutCertificate, reader: jspb.BinaryReader): TimeoutCertificate;\n}\n\nexport namespace TimeoutCertificate {\n  export type AsObject = {\n    view: number,\n    highQcViewsList: Array<number>,\n    highestQc?: QuorumCertificate.AsObject,\n    signerIndices: Uint8Array | string,\n    sigData: Uint8Array | string,\n  }\n}\n\nexport class QuorumCertificate extends jspb.Message {\n  getView(): number;\n  setView(value: number): void;\n\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getSignerIndices(): Uint8Array | string;\n  getSignerIndices_asU8(): Uint8Array;\n  getSignerIndices_asB64(): string;\n  setSignerIndices(value: Uint8Array | string): void;\n\n  getSigData(): Uint8Array | string;\n  getSigData_asU8(): Uint8Array;\n  getSigData_asB64(): string;\n  setSigData(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): QuorumCertificate.AsObject;\n  static toObject(includeInstance: boolean, msg: QuorumCertificate): QuorumCertificate.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: QuorumCertificate, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): QuorumCertificate;\n  static deserializeBinaryFromReader(message: QuorumCertificate, reader: jspb.BinaryReader): QuorumCertificate;\n}\n\nexport namespace QuorumCertificate {\n  export type AsObject = {\n    view: number,\n    blockId: Uint8Array | string,\n    signerIndices: Uint8Array | string,\n    sigData: Uint8Array | string,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_header_pb.js",
    "content": "// source: flow/entities/block_header.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');\ngoog.object.extend(proto, google_protobuf_timestamp_pb);\ngoog.exportSymbol('proto.flow.entities.BlockHeader', null, global);\ngoog.exportSymbol('proto.flow.entities.QuorumCertificate', null, global);\ngoog.exportSymbol('proto.flow.entities.TimeoutCertificate', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.BlockHeader = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.BlockHeader.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.BlockHeader, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.BlockHeader.displayName = 'proto.flow.entities.BlockHeader';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.TimeoutCertificate = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.TimeoutCertificate.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.TimeoutCertificate, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.TimeoutCertificate.displayName = 'proto.flow.entities.TimeoutCertificate';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.QuorumCertificate = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.QuorumCertificate, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.QuorumCertificate.displayName = 'proto.flow.entities.QuorumCertificate';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.BlockHeader.repeatedFields_ = [7];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.BlockHeader.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.BlockHeader.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.BlockHeader} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockHeader.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    parentId: msg.getParentId_asB64(),\n    height: jspb.Message.getFieldWithDefault(msg, 3, 0),\n    timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),\n    payloadHash: msg.getPayloadHash_asB64(),\n    view: jspb.Message.getFieldWithDefault(msg, 6, 0),\n    parentVoterIdsList: msg.getParentVoterIdsList_asB64(),\n    parentVoterSigData: msg.getParentVoterSigData_asB64(),\n    proposerId: msg.getProposerId_asB64(),\n    proposerSigData: msg.getProposerSigData_asB64(),\n    chainId: jspb.Message.getFieldWithDefault(msg, 11, \"\"),\n    parentVoterIndices: msg.getParentVoterIndices_asB64(),\n    lastViewTc: (f = msg.getLastViewTc()) && proto.flow.entities.TimeoutCertificate.toObject(includeInstance, f),\n    parentView: jspb.Message.getFieldWithDefault(msg, 14, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.BlockHeader}\n */\nproto.flow.entities.BlockHeader.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.BlockHeader;\n  return proto.flow.entities.BlockHeader.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.BlockHeader} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.BlockHeader}\n */\nproto.flow.entities.BlockHeader.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setParentId(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setHeight(value);\n      break;\n    case 4:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setTimestamp(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPayloadHash(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setView(value);\n      break;\n    case 7:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addParentVoterIds(value);\n      break;\n    case 8:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setParentVoterSigData(value);\n      break;\n    case 9:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setProposerId(value);\n      break;\n    case 10:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setProposerSigData(value);\n      break;\n    case 11:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setChainId(value);\n      break;\n    case 12:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setParentVoterIndices(value);\n      break;\n    case 13:\n      var value = new proto.flow.entities.TimeoutCertificate;\n      reader.readMessage(value,proto.flow.entities.TimeoutCertificate.deserializeBinaryFromReader);\n      msg.setLastViewTc(value);\n      break;\n    case 14:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setParentView(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.BlockHeader.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.BlockHeader} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockHeader.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getParentId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n  f = message.getTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      4,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n  f = message.getPayloadHash_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n  f = message.getView();\n  if (f !== 0) {\n    writer.writeUint64(\n      6,\n      f\n    );\n  }\n  f = message.getParentVoterIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      7,\n      f\n    );\n  }\n  f = message.getParentVoterSigData_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      8,\n      f\n    );\n  }\n  f = message.getProposerId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      9,\n      f\n    );\n  }\n  f = message.getProposerSigData_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      10,\n      f\n    );\n  }\n  f = message.getChainId();\n  if (f.length > 0) {\n    writer.writeString(\n      11,\n      f\n    );\n  }\n  f = message.getParentVoterIndices_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      12,\n      f\n    );\n  }\n  f = message.getLastViewTc();\n  if (f != null) {\n    writer.writeMessage(\n      13,\n      f,\n      proto.flow.entities.TimeoutCertificate.serializeBinaryToWriter\n    );\n  }\n  f = message.getParentView();\n  if (f !== 0) {\n    writer.writeUint64(\n      14,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getParentId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * This is a type-conversion wrapper around `getParentId()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getParentId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getParentId()));\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getParentId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getParentId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getParentId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setParentId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional uint64 height = 3;\n * @return {number}\n */\nproto.flow.entities.BlockHeader.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional google.protobuf.Timestamp timestamp = 4;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.entities.BlockHeader.prototype.getTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n*/\nproto.flow.entities.BlockHeader.prototype.setTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 4, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.clearTimestamp = function() {\n  return this.setTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.BlockHeader.prototype.hasTimestamp = function() {\n  return jspb.Message.getField(this, 4) != null;\n};\n\n\n/**\n * optional bytes payload_hash = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getPayloadHash = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes payload_hash = 5;\n * This is a type-conversion wrapper around `getPayloadHash()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getPayloadHash_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPayloadHash()));\n};\n\n\n/**\n * optional bytes payload_hash = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPayloadHash()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getPayloadHash_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPayloadHash()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setPayloadHash = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n/**\n * optional uint64 view = 6;\n * @return {number}\n */\nproto.flow.entities.BlockHeader.prototype.getView = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setView = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * repeated bytes parent_voter_ids = 7;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 7));\n};\n\n\n/**\n * repeated bytes parent_voter_ids = 7;\n * This is a type-conversion wrapper around `getParentVoterIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getParentVoterIdsList()));\n};\n\n\n/**\n * repeated bytes parent_voter_ids = 7;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getParentVoterIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getParentVoterIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setParentVoterIdsList = function(value) {\n  return jspb.Message.setField(this, 7, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.addParentVoterIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 7, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.clearParentVoterIdsList = function() {\n  return this.setParentVoterIdsList([]);\n};\n\n\n/**\n * optional bytes parent_voter_sig_data = 8;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterSigData = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * optional bytes parent_voter_sig_data = 8;\n * This is a type-conversion wrapper around `getParentVoterSigData()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterSigData_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getParentVoterSigData()));\n};\n\n\n/**\n * optional bytes parent_voter_sig_data = 8;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getParentVoterSigData()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterSigData_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getParentVoterSigData()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setParentVoterSigData = function(value) {\n  return jspb.Message.setProto3BytesField(this, 8, value);\n};\n\n\n/**\n * optional bytes proposer_id = 9;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, \"\"));\n};\n\n\n/**\n * optional bytes proposer_id = 9;\n * This is a type-conversion wrapper around `getProposerId()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getProposerId()));\n};\n\n\n/**\n * optional bytes proposer_id = 9;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getProposerId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getProposerId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setProposerId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 9, value);\n};\n\n\n/**\n * optional bytes proposer_sig_data = 10;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerSigData = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, \"\"));\n};\n\n\n/**\n * optional bytes proposer_sig_data = 10;\n * This is a type-conversion wrapper around `getProposerSigData()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerSigData_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getProposerSigData()));\n};\n\n\n/**\n * optional bytes proposer_sig_data = 10;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getProposerSigData()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getProposerSigData_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getProposerSigData()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setProposerSigData = function(value) {\n  return jspb.Message.setProto3BytesField(this, 10, value);\n};\n\n\n/**\n * optional string chain_id = 11;\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getChainId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setChainId = function(value) {\n  return jspb.Message.setProto3StringField(this, 11, value);\n};\n\n\n/**\n * optional bytes parent_voter_indices = 12;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIndices = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, \"\"));\n};\n\n\n/**\n * optional bytes parent_voter_indices = 12;\n * This is a type-conversion wrapper around `getParentVoterIndices()`\n * @return {string}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIndices_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getParentVoterIndices()));\n};\n\n\n/**\n * optional bytes parent_voter_indices = 12;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getParentVoterIndices()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockHeader.prototype.getParentVoterIndices_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getParentVoterIndices()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setParentVoterIndices = function(value) {\n  return jspb.Message.setProto3BytesField(this, 12, value);\n};\n\n\n/**\n * optional TimeoutCertificate last_view_tc = 13;\n * @return {?proto.flow.entities.TimeoutCertificate}\n */\nproto.flow.entities.BlockHeader.prototype.getLastViewTc = function() {\n  return /** @type{?proto.flow.entities.TimeoutCertificate} */ (\n    jspb.Message.getWrapperField(this, proto.flow.entities.TimeoutCertificate, 13));\n};\n\n\n/**\n * @param {?proto.flow.entities.TimeoutCertificate|undefined} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n*/\nproto.flow.entities.BlockHeader.prototype.setLastViewTc = function(value) {\n  return jspb.Message.setWrapperField(this, 13, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.clearLastViewTc = function() {\n  return this.setLastViewTc(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.BlockHeader.prototype.hasLastViewTc = function() {\n  return jspb.Message.getField(this, 13) != null;\n};\n\n\n/**\n * optional uint64 parent_view = 14;\n * @return {number}\n */\nproto.flow.entities.BlockHeader.prototype.getParentView = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.BlockHeader} returns this\n */\nproto.flow.entities.BlockHeader.prototype.setParentView = function(value) {\n  return jspb.Message.setProto3IntField(this, 14, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.TimeoutCertificate.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.TimeoutCertificate.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.TimeoutCertificate.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.TimeoutCertificate} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.TimeoutCertificate.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    view: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    highQcViewsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,\n    highestQc: (f = msg.getHighestQc()) && proto.flow.entities.QuorumCertificate.toObject(includeInstance, f),\n    signerIndices: msg.getSignerIndices_asB64(),\n    sigData: msg.getSigData_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.TimeoutCertificate}\n */\nproto.flow.entities.TimeoutCertificate.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.TimeoutCertificate;\n  return proto.flow.entities.TimeoutCertificate.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.TimeoutCertificate} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.TimeoutCertificate}\n */\nproto.flow.entities.TimeoutCertificate.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setView(value);\n      break;\n    case 2:\n      var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]);\n      for (var i = 0; i < values.length; i++) {\n        msg.addHighQcViews(values[i]);\n      }\n      break;\n    case 3:\n      var value = new proto.flow.entities.QuorumCertificate;\n      reader.readMessage(value,proto.flow.entities.QuorumCertificate.deserializeBinaryFromReader);\n      msg.setHighestQc(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSignerIndices(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSigData(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.TimeoutCertificate.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.TimeoutCertificate.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.TimeoutCertificate} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.TimeoutCertificate.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getView();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getHighQcViewsList();\n  if (f.length > 0) {\n    writer.writePackedUint64(\n      2,\n      f\n    );\n  }\n  f = message.getHighestQc();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      proto.flow.entities.QuorumCertificate.serializeBinaryToWriter\n    );\n  }\n  f = message.getSignerIndices_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n  f = message.getSigData_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 view = 1;\n * @return {number}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getView = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.setView = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * repeated uint64 high_qc_views = 2;\n * @return {!Array<number>}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getHighQcViewsList = function() {\n  return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * @param {!Array<number>} value\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.setHighQcViewsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {number} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.addHighQcViews = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.clearHighQcViewsList = function() {\n  return this.setHighQcViewsList([]);\n};\n\n\n/**\n * optional QuorumCertificate highest_qc = 3;\n * @return {?proto.flow.entities.QuorumCertificate}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getHighestQc = function() {\n  return /** @type{?proto.flow.entities.QuorumCertificate} */ (\n    jspb.Message.getWrapperField(this, proto.flow.entities.QuorumCertificate, 3));\n};\n\n\n/**\n * @param {?proto.flow.entities.QuorumCertificate|undefined} value\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n*/\nproto.flow.entities.TimeoutCertificate.prototype.setHighestQc = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.clearHighestQc = function() {\n  return this.setHighestQc(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.TimeoutCertificate.prototype.hasHighestQc = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n/**\n * optional bytes signer_indices = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSignerIndices = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes signer_indices = 4;\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {string}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSignerIndices_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSignerIndices()));\n};\n\n\n/**\n * optional bytes signer_indices = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSignerIndices_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSignerIndices()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.setSignerIndices = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\n/**\n * optional bytes sig_data = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSigData = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes sig_data = 5;\n * This is a type-conversion wrapper around `getSigData()`\n * @return {string}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSigData_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSigData()));\n};\n\n\n/**\n * optional bytes sig_data = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSigData()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.TimeoutCertificate.prototype.getSigData_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSigData()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.TimeoutCertificate} returns this\n */\nproto.flow.entities.TimeoutCertificate.prototype.setSigData = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.QuorumCertificate.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.QuorumCertificate.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.QuorumCertificate} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.QuorumCertificate.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    view: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    blockId: msg.getBlockId_asB64(),\n    signerIndices: msg.getSignerIndices_asB64(),\n    sigData: msg.getSigData_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.QuorumCertificate}\n */\nproto.flow.entities.QuorumCertificate.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.QuorumCertificate;\n  return proto.flow.entities.QuorumCertificate.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.QuorumCertificate} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.QuorumCertificate}\n */\nproto.flow.entities.QuorumCertificate.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setView(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSignerIndices(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSigData(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.QuorumCertificate.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.QuorumCertificate.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.QuorumCertificate} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.QuorumCertificate.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getView();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getSignerIndices_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getSigData_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 view = 1;\n * @return {number}\n */\nproto.flow.entities.QuorumCertificate.prototype.getView = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.QuorumCertificate} returns this\n */\nproto.flow.entities.QuorumCertificate.prototype.setView = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bytes block_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.QuorumCertificate.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.entities.QuorumCertificate.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.QuorumCertificate.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.QuorumCertificate} returns this\n */\nproto.flow.entities.QuorumCertificate.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional bytes signer_indices = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSignerIndices = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes signer_indices = 3;\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {string}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSignerIndices_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSignerIndices()));\n};\n\n\n/**\n * optional bytes signer_indices = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSignerIndices_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSignerIndices()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.QuorumCertificate} returns this\n */\nproto.flow.entities.QuorumCertificate.prototype.setSignerIndices = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional bytes sig_data = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSigData = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes sig_data = 4;\n * This is a type-conversion wrapper around `getSigData()`\n * @return {string}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSigData_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSigData()));\n};\n\n\n/**\n * optional bytes sig_data = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSigData()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.QuorumCertificate.prototype.getSigData_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSigData()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.QuorumCertificate} returns this\n */\nproto.flow.entities.QuorumCertificate.prototype.setSigData = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_header_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_header.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_header_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/block_header.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as google_protobuf_timestamp_pb from \"google-protobuf/google/protobuf/timestamp_pb\";\nimport * as flow_entities_collection_pb from \"../../flow/entities/collection_pb\";\nimport * as flow_entities_block_seal_pb from \"../../flow/entities/block_seal_pb\";\nimport * as flow_entities_execution_result_pb from \"../../flow/entities/execution_result_pb\";\nimport * as flow_entities_block_header_pb from \"../../flow/entities/block_header_pb\";\n\nexport class Block extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  getParentId(): Uint8Array | string;\n  getParentId_asU8(): Uint8Array;\n  getParentId_asB64(): string;\n  setParentId(value: Uint8Array | string): void;\n\n  getHeight(): number;\n  setHeight(value: number): void;\n\n  hasTimestamp(): boolean;\n  clearTimestamp(): void;\n  getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n  setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n  clearCollectionGuaranteesList(): void;\n  getCollectionGuaranteesList(): Array<flow_entities_collection_pb.CollectionGuarantee>;\n  setCollectionGuaranteesList(value: Array<flow_entities_collection_pb.CollectionGuarantee>): void;\n  addCollectionGuarantees(value?: flow_entities_collection_pb.CollectionGuarantee, index?: number): flow_entities_collection_pb.CollectionGuarantee;\n\n  clearBlockSealsList(): void;\n  getBlockSealsList(): Array<flow_entities_block_seal_pb.BlockSeal>;\n  setBlockSealsList(value: Array<flow_entities_block_seal_pb.BlockSeal>): void;\n  addBlockSeals(value?: flow_entities_block_seal_pb.BlockSeal, index?: number): flow_entities_block_seal_pb.BlockSeal;\n\n  clearSignaturesList(): void;\n  getSignaturesList(): Array<Uint8Array | string>;\n  getSignaturesList_asU8(): Array<Uint8Array>;\n  getSignaturesList_asB64(): Array<string>;\n  setSignaturesList(value: Array<Uint8Array | string>): void;\n  addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  clearExecutionReceiptMetalistList(): void;\n  getExecutionReceiptMetalistList(): Array<flow_entities_execution_result_pb.ExecutionReceiptMeta>;\n  setExecutionReceiptMetalistList(value: Array<flow_entities_execution_result_pb.ExecutionReceiptMeta>): void;\n  addExecutionReceiptMetalist(value?: flow_entities_execution_result_pb.ExecutionReceiptMeta, index?: number): flow_entities_execution_result_pb.ExecutionReceiptMeta;\n\n  clearExecutionResultListList(): void;\n  getExecutionResultListList(): Array<flow_entities_execution_result_pb.ExecutionResult>;\n  setExecutionResultListList(value: Array<flow_entities_execution_result_pb.ExecutionResult>): void;\n  addExecutionResultList(value?: flow_entities_execution_result_pb.ExecutionResult, index?: number): flow_entities_execution_result_pb.ExecutionResult;\n\n  hasBlockHeader(): boolean;\n  clearBlockHeader(): void;\n  getBlockHeader(): flow_entities_block_header_pb.BlockHeader | undefined;\n  setBlockHeader(value?: flow_entities_block_header_pb.BlockHeader): void;\n\n  getProtocolStateId(): Uint8Array | string;\n  getProtocolStateId_asU8(): Uint8Array;\n  getProtocolStateId_asB64(): string;\n  setProtocolStateId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Block.AsObject;\n  static toObject(includeInstance: boolean, msg: Block): Block.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Block, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Block;\n  static deserializeBinaryFromReader(message: Block, reader: jspb.BinaryReader): Block;\n}\n\nexport namespace Block {\n  export type AsObject = {\n    id: Uint8Array | string,\n    parentId: Uint8Array | string,\n    height: number,\n    timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n    collectionGuaranteesList: Array<flow_entities_collection_pb.CollectionGuarantee.AsObject>,\n    blockSealsList: Array<flow_entities_block_seal_pb.BlockSeal.AsObject>,\n    signaturesList: Array<Uint8Array | string>,\n    executionReceiptMetalistList: Array<flow_entities_execution_result_pb.ExecutionReceiptMeta.AsObject>,\n    executionResultListList: Array<flow_entities_execution_result_pb.ExecutionResult.AsObject>,\n    blockHeader?: flow_entities_block_header_pb.BlockHeader.AsObject,\n    protocolStateId: Uint8Array | string,\n  }\n}\n\nexport interface BlockStatusMap {\n  BLOCK_UNKNOWN: 0;\n  BLOCK_FINALIZED: 1;\n  BLOCK_SEALED: 2;\n}\n\nexport const BlockStatus: BlockStatusMap;\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_pb.js",
    "content": "// source: flow/entities/block.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');\ngoog.object.extend(proto, google_protobuf_timestamp_pb);\nvar flow_entities_collection_pb = require('../../flow/entities/collection_pb.js');\ngoog.object.extend(proto, flow_entities_collection_pb);\nvar flow_entities_block_seal_pb = require('../../flow/entities/block_seal_pb.js');\ngoog.object.extend(proto, flow_entities_block_seal_pb);\nvar flow_entities_execution_result_pb = require('../../flow/entities/execution_result_pb.js');\ngoog.object.extend(proto, flow_entities_execution_result_pb);\nvar flow_entities_block_header_pb = require('../../flow/entities/block_header_pb.js');\ngoog.object.extend(proto, flow_entities_block_header_pb);\ngoog.exportSymbol('proto.flow.entities.Block', null, global);\ngoog.exportSymbol('proto.flow.entities.BlockStatus', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Block = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.Block.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.Block, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Block.displayName = 'proto.flow.entities.Block';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.Block.repeatedFields_ = [5,6,7,8,9];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Block.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Block.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Block} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Block.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    parentId: msg.getParentId_asB64(),\n    height: jspb.Message.getFieldWithDefault(msg, 3, 0),\n    timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),\n    collectionGuaranteesList: jspb.Message.toObjectList(msg.getCollectionGuaranteesList(),\n    flow_entities_collection_pb.CollectionGuarantee.toObject, includeInstance),\n    blockSealsList: jspb.Message.toObjectList(msg.getBlockSealsList(),\n    flow_entities_block_seal_pb.BlockSeal.toObject, includeInstance),\n    signaturesList: msg.getSignaturesList_asB64(),\n    executionReceiptMetalistList: jspb.Message.toObjectList(msg.getExecutionReceiptMetalistList(),\n    flow_entities_execution_result_pb.ExecutionReceiptMeta.toObject, includeInstance),\n    executionResultListList: jspb.Message.toObjectList(msg.getExecutionResultListList(),\n    flow_entities_execution_result_pb.ExecutionResult.toObject, includeInstance),\n    blockHeader: (f = msg.getBlockHeader()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f),\n    protocolStateId: msg.getProtocolStateId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Block}\n */\nproto.flow.entities.Block.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Block;\n  return proto.flow.entities.Block.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Block} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Block}\n */\nproto.flow.entities.Block.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setParentId(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setHeight(value);\n      break;\n    case 4:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setTimestamp(value);\n      break;\n    case 5:\n      var value = new flow_entities_collection_pb.CollectionGuarantee;\n      reader.readMessage(value,flow_entities_collection_pb.CollectionGuarantee.deserializeBinaryFromReader);\n      msg.addCollectionGuarantees(value);\n      break;\n    case 6:\n      var value = new flow_entities_block_seal_pb.BlockSeal;\n      reader.readMessage(value,flow_entities_block_seal_pb.BlockSeal.deserializeBinaryFromReader);\n      msg.addBlockSeals(value);\n      break;\n    case 7:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addSignatures(value);\n      break;\n    case 8:\n      var value = new flow_entities_execution_result_pb.ExecutionReceiptMeta;\n      reader.readMessage(value,flow_entities_execution_result_pb.ExecutionReceiptMeta.deserializeBinaryFromReader);\n      msg.addExecutionReceiptMetalist(value);\n      break;\n    case 9:\n      var value = new flow_entities_execution_result_pb.ExecutionResult;\n      reader.readMessage(value,flow_entities_execution_result_pb.ExecutionResult.deserializeBinaryFromReader);\n      msg.addExecutionResultList(value);\n      break;\n    case 10:\n      var value = new flow_entities_block_header_pb.BlockHeader;\n      reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader);\n      msg.setBlockHeader(value);\n      break;\n    case 11:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setProtocolStateId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Block.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Block.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Block} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Block.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getParentId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n  f = message.getTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      4,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n  f = message.getCollectionGuaranteesList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      5,\n      f,\n      flow_entities_collection_pb.CollectionGuarantee.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockSealsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      6,\n      f,\n      flow_entities_block_seal_pb.BlockSeal.serializeBinaryToWriter\n    );\n  }\n  f = message.getSignaturesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      7,\n      f\n    );\n  }\n  f = message.getExecutionReceiptMetalistList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      8,\n      f,\n      flow_entities_execution_result_pb.ExecutionReceiptMeta.serializeBinaryToWriter\n    );\n  }\n  f = message.getExecutionResultListList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      9,\n      f,\n      flow_entities_execution_result_pb.ExecutionResult.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockHeader();\n  if (f != null) {\n    writer.writeMessage(\n      10,\n      f,\n      flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter\n    );\n  }\n  f = message.getProtocolStateId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      11,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Block.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.entities.Block.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Block.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Block.prototype.getParentId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * This is a type-conversion wrapper around `getParentId()`\n * @return {string}\n */\nproto.flow.entities.Block.prototype.getParentId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getParentId()));\n};\n\n\n/**\n * optional bytes parent_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getParentId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Block.prototype.getParentId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getParentId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.setParentId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional uint64 height = 3;\n * @return {number}\n */\nproto.flow.entities.Block.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional google.protobuf.Timestamp timestamp = 4;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.entities.Block.prototype.getTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 4, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearTimestamp = function() {\n  return this.setTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.Block.prototype.hasTimestamp = function() {\n  return jspb.Message.getField(this, 4) != null;\n};\n\n\n/**\n * repeated CollectionGuarantee collection_guarantees = 5;\n * @return {!Array<!proto.flow.entities.CollectionGuarantee>}\n */\nproto.flow.entities.Block.prototype.getCollectionGuaranteesList = function() {\n  return /** @type{!Array<!proto.flow.entities.CollectionGuarantee>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_collection_pb.CollectionGuarantee, 5));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.CollectionGuarantee>} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setCollectionGuaranteesList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 5, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.CollectionGuarantee=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.CollectionGuarantee}\n */\nproto.flow.entities.Block.prototype.addCollectionGuarantees = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.flow.entities.CollectionGuarantee, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearCollectionGuaranteesList = function() {\n  return this.setCollectionGuaranteesList([]);\n};\n\n\n/**\n * repeated BlockSeal block_seals = 6;\n * @return {!Array<!proto.flow.entities.BlockSeal>}\n */\nproto.flow.entities.Block.prototype.getBlockSealsList = function() {\n  return /** @type{!Array<!proto.flow.entities.BlockSeal>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_block_seal_pb.BlockSeal, 6));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.BlockSeal>} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setBlockSealsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 6, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.BlockSeal=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.BlockSeal}\n */\nproto.flow.entities.Block.prototype.addBlockSeals = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.flow.entities.BlockSeal, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearBlockSealsList = function() {\n  return this.setBlockSealsList([]);\n};\n\n\n/**\n * repeated bytes signatures = 7;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.Block.prototype.getSignaturesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 7));\n};\n\n\n/**\n * repeated bytes signatures = 7;\n * This is a type-conversion wrapper around `getSignaturesList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.Block.prototype.getSignaturesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getSignaturesList()));\n};\n\n\n/**\n * repeated bytes signatures = 7;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignaturesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.Block.prototype.getSignaturesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getSignaturesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.setSignaturesList = function(value) {\n  return jspb.Message.setField(this, 7, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.addSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 7, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearSignaturesList = function() {\n  return this.setSignaturesList([]);\n};\n\n\n/**\n * repeated ExecutionReceiptMeta execution_receipt_metaList = 8;\n * @return {!Array<!proto.flow.entities.ExecutionReceiptMeta>}\n */\nproto.flow.entities.Block.prototype.getExecutionReceiptMetalistList = function() {\n  return /** @type{!Array<!proto.flow.entities.ExecutionReceiptMeta>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_execution_result_pb.ExecutionReceiptMeta, 8));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.ExecutionReceiptMeta>} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setExecutionReceiptMetalistList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 8, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.ExecutionReceiptMeta=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ExecutionReceiptMeta}\n */\nproto.flow.entities.Block.prototype.addExecutionReceiptMetalist = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.flow.entities.ExecutionReceiptMeta, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearExecutionReceiptMetalistList = function() {\n  return this.setExecutionReceiptMetalistList([]);\n};\n\n\n/**\n * repeated ExecutionResult execution_result_list = 9;\n * @return {!Array<!proto.flow.entities.ExecutionResult>}\n */\nproto.flow.entities.Block.prototype.getExecutionResultListList = function() {\n  return /** @type{!Array<!proto.flow.entities.ExecutionResult>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_execution_result_pb.ExecutionResult, 9));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.ExecutionResult>} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setExecutionResultListList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 9, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.ExecutionResult=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ExecutionResult}\n */\nproto.flow.entities.Block.prototype.addExecutionResultList = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.flow.entities.ExecutionResult, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearExecutionResultListList = function() {\n  return this.setExecutionResultListList([]);\n};\n\n\n/**\n * optional BlockHeader block_header = 10;\n * @return {?proto.flow.entities.BlockHeader}\n */\nproto.flow.entities.Block.prototype.getBlockHeader = function() {\n  return /** @type{?proto.flow.entities.BlockHeader} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 10));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockHeader|undefined} value\n * @return {!proto.flow.entities.Block} returns this\n*/\nproto.flow.entities.Block.prototype.setBlockHeader = function(value) {\n  return jspb.Message.setWrapperField(this, 10, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.clearBlockHeader = function() {\n  return this.setBlockHeader(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.Block.prototype.hasBlockHeader = function() {\n  return jspb.Message.getField(this, 10) != null;\n};\n\n\n/**\n * optional bytes protocol_state_id = 11;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Block.prototype.getProtocolStateId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, \"\"));\n};\n\n\n/**\n * optional bytes protocol_state_id = 11;\n * This is a type-conversion wrapper around `getProtocolStateId()`\n * @return {string}\n */\nproto.flow.entities.Block.prototype.getProtocolStateId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getProtocolStateId()));\n};\n\n\n/**\n * optional bytes protocol_state_id = 11;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getProtocolStateId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Block.prototype.getProtocolStateId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getProtocolStateId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Block} returns this\n */\nproto.flow.entities.Block.prototype.setProtocolStateId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 11, value);\n};\n\n\n/**\n * @enum {number}\n */\nproto.flow.entities.BlockStatus = {\n  BLOCK_UNKNOWN: 0,\n  BLOCK_FINALIZED: 1,\n  BLOCK_SEALED: 2\n};\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/block.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_seal.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class BlockSeal extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getExecutionReceiptId(): Uint8Array | string;\n  getExecutionReceiptId_asU8(): Uint8Array;\n  getExecutionReceiptId_asB64(): string;\n  setExecutionReceiptId(value: Uint8Array | string): void;\n\n  clearExecutionReceiptSignaturesList(): void;\n  getExecutionReceiptSignaturesList(): Array<Uint8Array | string>;\n  getExecutionReceiptSignaturesList_asU8(): Array<Uint8Array>;\n  getExecutionReceiptSignaturesList_asB64(): Array<string>;\n  setExecutionReceiptSignaturesList(value: Array<Uint8Array | string>): void;\n  addExecutionReceiptSignatures(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  clearResultApprovalSignaturesList(): void;\n  getResultApprovalSignaturesList(): Array<Uint8Array | string>;\n  getResultApprovalSignaturesList_asU8(): Array<Uint8Array>;\n  getResultApprovalSignaturesList_asB64(): Array<string>;\n  setResultApprovalSignaturesList(value: Array<Uint8Array | string>): void;\n  addResultApprovalSignatures(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getFinalState(): Uint8Array | string;\n  getFinalState_asU8(): Uint8Array;\n  getFinalState_asB64(): string;\n  setFinalState(value: Uint8Array | string): void;\n\n  getResultId(): Uint8Array | string;\n  getResultId_asU8(): Uint8Array;\n  getResultId_asB64(): string;\n  setResultId(value: Uint8Array | string): void;\n\n  clearAggregatedApprovalSigsList(): void;\n  getAggregatedApprovalSigsList(): Array<AggregatedSignature>;\n  setAggregatedApprovalSigsList(value: Array<AggregatedSignature>): void;\n  addAggregatedApprovalSigs(value?: AggregatedSignature, index?: number): AggregatedSignature;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockSeal.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockSeal): BlockSeal.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockSeal, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockSeal;\n  static deserializeBinaryFromReader(message: BlockSeal, reader: jspb.BinaryReader): BlockSeal;\n}\n\nexport namespace BlockSeal {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    executionReceiptId: Uint8Array | string,\n    executionReceiptSignaturesList: Array<Uint8Array | string>,\n    resultApprovalSignaturesList: Array<Uint8Array | string>,\n    finalState: Uint8Array | string,\n    resultId: Uint8Array | string,\n    aggregatedApprovalSigsList: Array<AggregatedSignature.AsObject>,\n  }\n}\n\nexport class AggregatedSignature extends jspb.Message {\n  clearVerifierSignaturesList(): void;\n  getVerifierSignaturesList(): Array<Uint8Array | string>;\n  getVerifierSignaturesList_asU8(): Array<Uint8Array>;\n  getVerifierSignaturesList_asB64(): Array<string>;\n  setVerifierSignaturesList(value: Array<Uint8Array | string>): void;\n  addVerifierSignatures(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  clearSignerIdsList(): void;\n  getSignerIdsList(): Array<Uint8Array | string>;\n  getSignerIdsList_asU8(): Array<Uint8Array>;\n  getSignerIdsList_asB64(): Array<string>;\n  setSignerIdsList(value: Array<Uint8Array | string>): void;\n  addSignerIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): AggregatedSignature.AsObject;\n  static toObject(includeInstance: boolean, msg: AggregatedSignature): AggregatedSignature.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: AggregatedSignature, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): AggregatedSignature;\n  static deserializeBinaryFromReader(message: AggregatedSignature, reader: jspb.BinaryReader): AggregatedSignature;\n}\n\nexport namespace AggregatedSignature {\n  export type AsObject = {\n    verifierSignaturesList: Array<Uint8Array | string>,\n    signerIdsList: Array<Uint8Array | string>,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_seal_pb.js",
    "content": "// source: flow/entities/block_seal.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.AggregatedSignature', null, global);\ngoog.exportSymbol('proto.flow.entities.BlockSeal', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.BlockSeal = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.BlockSeal.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.BlockSeal, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.BlockSeal.displayName = 'proto.flow.entities.BlockSeal';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.AggregatedSignature = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.AggregatedSignature.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.AggregatedSignature, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.AggregatedSignature.displayName = 'proto.flow.entities.AggregatedSignature';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.BlockSeal.repeatedFields_ = [3,4,7];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.BlockSeal.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.BlockSeal.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.BlockSeal} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockSeal.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    executionReceiptId: msg.getExecutionReceiptId_asB64(),\n    executionReceiptSignaturesList: msg.getExecutionReceiptSignaturesList_asB64(),\n    resultApprovalSignaturesList: msg.getResultApprovalSignaturesList_asB64(),\n    finalState: msg.getFinalState_asB64(),\n    resultId: msg.getResultId_asB64(),\n    aggregatedApprovalSigsList: jspb.Message.toObjectList(msg.getAggregatedApprovalSigsList(),\n    proto.flow.entities.AggregatedSignature.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.BlockSeal}\n */\nproto.flow.entities.BlockSeal.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.BlockSeal;\n  return proto.flow.entities.BlockSeal.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.BlockSeal} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.BlockSeal}\n */\nproto.flow.entities.BlockSeal.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setExecutionReceiptId(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addExecutionReceiptSignatures(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addResultApprovalSignatures(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setFinalState(value);\n      break;\n    case 6:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setResultId(value);\n      break;\n    case 7:\n      var value = new proto.flow.entities.AggregatedSignature;\n      reader.readMessage(value,proto.flow.entities.AggregatedSignature.deserializeBinaryFromReader);\n      msg.addAggregatedApprovalSigs(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockSeal.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.BlockSeal.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.BlockSeal} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.BlockSeal.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getExecutionReceiptId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getExecutionReceiptSignaturesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      3,\n      f\n    );\n  }\n  f = message.getResultApprovalSignaturesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      4,\n      f\n    );\n  }\n  f = message.getFinalState_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n  f = message.getResultId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      6,\n      f\n    );\n  }\n  f = message.getAggregatedApprovalSigsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      7,\n      f,\n      proto.flow.entities.AggregatedSignature.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockSeal.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.entities.BlockSeal.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockSeal.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes execution_receipt_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes execution_receipt_id = 2;\n * This is a type-conversion wrapper around `getExecutionReceiptId()`\n * @return {string}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getExecutionReceiptId()));\n};\n\n\n/**\n * optional bytes execution_receipt_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutionReceiptId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getExecutionReceiptId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setExecutionReceiptId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated bytes execution_receipt_signatures = 3;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptSignaturesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * repeated bytes execution_receipt_signatures = 3;\n * This is a type-conversion wrapper around `getExecutionReceiptSignaturesList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptSignaturesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getExecutionReceiptSignaturesList()));\n};\n\n\n/**\n * repeated bytes execution_receipt_signatures = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutionReceiptSignaturesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.BlockSeal.prototype.getExecutionReceiptSignaturesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getExecutionReceiptSignaturesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setExecutionReceiptSignaturesList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.addExecutionReceiptSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.clearExecutionReceiptSignaturesList = function() {\n  return this.setExecutionReceiptSignaturesList([]);\n};\n\n\n/**\n * repeated bytes result_approval_signatures = 4;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.BlockSeal.prototype.getResultApprovalSignaturesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 4));\n};\n\n\n/**\n * repeated bytes result_approval_signatures = 4;\n * This is a type-conversion wrapper around `getResultApprovalSignaturesList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.BlockSeal.prototype.getResultApprovalSignaturesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getResultApprovalSignaturesList()));\n};\n\n\n/**\n * repeated bytes result_approval_signatures = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getResultApprovalSignaturesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.BlockSeal.prototype.getResultApprovalSignaturesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getResultApprovalSignaturesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setResultApprovalSignaturesList = function(value) {\n  return jspb.Message.setField(this, 4, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.addResultApprovalSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 4, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.clearResultApprovalSignaturesList = function() {\n  return this.setResultApprovalSignaturesList([]);\n};\n\n\n/**\n * optional bytes final_state = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockSeal.prototype.getFinalState = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes final_state = 5;\n * This is a type-conversion wrapper around `getFinalState()`\n * @return {string}\n */\nproto.flow.entities.BlockSeal.prototype.getFinalState_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getFinalState()));\n};\n\n\n/**\n * optional bytes final_state = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getFinalState()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockSeal.prototype.getFinalState_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getFinalState()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setFinalState = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n/**\n * optional bytes result_id = 6;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.BlockSeal.prototype.getResultId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * optional bytes result_id = 6;\n * This is a type-conversion wrapper around `getResultId()`\n * @return {string}\n */\nproto.flow.entities.BlockSeal.prototype.getResultId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getResultId()));\n};\n\n\n/**\n * optional bytes result_id = 6;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getResultId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.BlockSeal.prototype.getResultId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getResultId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.setResultId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 6, value);\n};\n\n\n/**\n * repeated AggregatedSignature aggregated_approval_sigs = 7;\n * @return {!Array<!proto.flow.entities.AggregatedSignature>}\n */\nproto.flow.entities.BlockSeal.prototype.getAggregatedApprovalSigsList = function() {\n  return /** @type{!Array<!proto.flow.entities.AggregatedSignature>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.AggregatedSignature, 7));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.AggregatedSignature>} value\n * @return {!proto.flow.entities.BlockSeal} returns this\n*/\nproto.flow.entities.BlockSeal.prototype.setAggregatedApprovalSigsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 7, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.AggregatedSignature=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.AggregatedSignature}\n */\nproto.flow.entities.BlockSeal.prototype.addAggregatedApprovalSigs = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.flow.entities.AggregatedSignature, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.BlockSeal} returns this\n */\nproto.flow.entities.BlockSeal.prototype.clearAggregatedApprovalSigsList = function() {\n  return this.setAggregatedApprovalSigsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.AggregatedSignature.repeatedFields_ = [1,2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.AggregatedSignature.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.AggregatedSignature.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.AggregatedSignature} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.AggregatedSignature.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    verifierSignaturesList: msg.getVerifierSignaturesList_asB64(),\n    signerIdsList: msg.getSignerIdsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.AggregatedSignature}\n */\nproto.flow.entities.AggregatedSignature.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.AggregatedSignature;\n  return proto.flow.entities.AggregatedSignature.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.AggregatedSignature} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.AggregatedSignature}\n */\nproto.flow.entities.AggregatedSignature.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addVerifierSignatures(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addSignerIds(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.AggregatedSignature.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.AggregatedSignature.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.AggregatedSignature} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.AggregatedSignature.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getVerifierSignaturesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      1,\n      f\n    );\n  }\n  f = message.getSignerIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated bytes verifier_signatures = 1;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * repeated bytes verifier_signatures = 1;\n * This is a type-conversion wrapper around `getVerifierSignaturesList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getVerifierSignaturesList()));\n};\n\n\n/**\n * repeated bytes verifier_signatures = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getVerifierSignaturesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.AggregatedSignature.prototype.getVerifierSignaturesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getVerifierSignaturesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.setVerifierSignaturesList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.addVerifierSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.clearVerifierSignaturesList = function() {\n  return this.setVerifierSignaturesList([]);\n};\n\n\n/**\n * repeated bytes signer_ids = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.AggregatedSignature.prototype.getSignerIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes signer_ids = 2;\n * This is a type-conversion wrapper around `getSignerIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.AggregatedSignature.prototype.getSignerIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getSignerIdsList()));\n};\n\n\n/**\n * repeated bytes signer_ids = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignerIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.AggregatedSignature.prototype.getSignerIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getSignerIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.setSignerIdsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.addSignerIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.AggregatedSignature} returns this\n */\nproto.flow.entities.AggregatedSignature.prototype.clearSignerIdsList = function() {\n  return this.setSignerIdsList([]);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_seal_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/block_seal.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/block_seal_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/block_seal.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/collection_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/collection.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class Collection extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  clearTransactionIdsList(): void;\n  getTransactionIdsList(): Array<Uint8Array | string>;\n  getTransactionIdsList_asU8(): Array<Uint8Array>;\n  getTransactionIdsList_asB64(): Array<string>;\n  setTransactionIdsList(value: Array<Uint8Array | string>): void;\n  addTransactionIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Collection.AsObject;\n  static toObject(includeInstance: boolean, msg: Collection): Collection.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Collection, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Collection;\n  static deserializeBinaryFromReader(message: Collection, reader: jspb.BinaryReader): Collection;\n}\n\nexport namespace Collection {\n  export type AsObject = {\n    id: Uint8Array | string,\n    transactionIdsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class CollectionGuarantee extends jspb.Message {\n  getCollectionId(): Uint8Array | string;\n  getCollectionId_asU8(): Uint8Array;\n  getCollectionId_asB64(): string;\n  setCollectionId(value: Uint8Array | string): void;\n\n  clearSignaturesList(): void;\n  getSignaturesList(): Array<Uint8Array | string>;\n  getSignaturesList_asU8(): Array<Uint8Array>;\n  getSignaturesList_asB64(): Array<string>;\n  setSignaturesList(value: Array<Uint8Array | string>): void;\n  addSignatures(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getReferenceBlockId(): Uint8Array | string;\n  getReferenceBlockId_asU8(): Uint8Array;\n  getReferenceBlockId_asB64(): string;\n  setReferenceBlockId(value: Uint8Array | string): void;\n\n  getSignature(): Uint8Array | string;\n  getSignature_asU8(): Uint8Array;\n  getSignature_asB64(): string;\n  setSignature(value: Uint8Array | string): void;\n\n  clearSignerIdsList(): void;\n  getSignerIdsList(): Array<Uint8Array | string>;\n  getSignerIdsList_asU8(): Array<Uint8Array>;\n  getSignerIdsList_asB64(): Array<string>;\n  setSignerIdsList(value: Array<Uint8Array | string>): void;\n  addSignerIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getSignerIndices(): Uint8Array | string;\n  getSignerIndices_asU8(): Uint8Array;\n  getSignerIndices_asB64(): string;\n  setSignerIndices(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): CollectionGuarantee.AsObject;\n  static toObject(includeInstance: boolean, msg: CollectionGuarantee): CollectionGuarantee.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: CollectionGuarantee, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): CollectionGuarantee;\n  static deserializeBinaryFromReader(message: CollectionGuarantee, reader: jspb.BinaryReader): CollectionGuarantee;\n}\n\nexport namespace CollectionGuarantee {\n  export type AsObject = {\n    collectionId: Uint8Array | string,\n    signaturesList: Array<Uint8Array | string>,\n    referenceBlockId: Uint8Array | string,\n    signature: Uint8Array | string,\n    signerIdsList: Array<Uint8Array | string>,\n    signerIndices: Uint8Array | string,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/collection_pb.js",
    "content": "// source: flow/entities/collection.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.Collection', null, global);\ngoog.exportSymbol('proto.flow.entities.CollectionGuarantee', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Collection = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.Collection.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.Collection, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Collection.displayName = 'proto.flow.entities.Collection';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.CollectionGuarantee = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.CollectionGuarantee.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.CollectionGuarantee, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.CollectionGuarantee.displayName = 'proto.flow.entities.CollectionGuarantee';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.Collection.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Collection.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Collection.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Collection} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Collection.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64(),\n    transactionIdsList: msg.getTransactionIdsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Collection}\n */\nproto.flow.entities.Collection.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Collection;\n  return proto.flow.entities.Collection.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Collection} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Collection}\n */\nproto.flow.entities.Collection.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addTransactionIds(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Collection.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Collection.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Collection} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Collection.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getTransactionIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Collection.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.entities.Collection.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Collection.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Collection} returns this\n */\nproto.flow.entities.Collection.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated bytes transaction_ids = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.Collection.prototype.getTransactionIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes transaction_ids = 2;\n * This is a type-conversion wrapper around `getTransactionIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.Collection.prototype.getTransactionIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getTransactionIdsList()));\n};\n\n\n/**\n * repeated bytes transaction_ids = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.Collection.prototype.getTransactionIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getTransactionIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.Collection} returns this\n */\nproto.flow.entities.Collection.prototype.setTransactionIdsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Collection} returns this\n */\nproto.flow.entities.Collection.prototype.addTransactionIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Collection} returns this\n */\nproto.flow.entities.Collection.prototype.clearTransactionIdsList = function() {\n  return this.setTransactionIdsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.CollectionGuarantee.repeatedFields_ = [2,5];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.CollectionGuarantee.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.CollectionGuarantee.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.CollectionGuarantee} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.CollectionGuarantee.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    collectionId: msg.getCollectionId_asB64(),\n    signaturesList: msg.getSignaturesList_asB64(),\n    referenceBlockId: msg.getReferenceBlockId_asB64(),\n    signature: msg.getSignature_asB64(),\n    signerIdsList: msg.getSignerIdsList_asB64(),\n    signerIndices: msg.getSignerIndices_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.CollectionGuarantee}\n */\nproto.flow.entities.CollectionGuarantee.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.CollectionGuarantee;\n  return proto.flow.entities.CollectionGuarantee.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.CollectionGuarantee} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.CollectionGuarantee}\n */\nproto.flow.entities.CollectionGuarantee.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setCollectionId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addSignatures(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setReferenceBlockId(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSignature(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addSignerIds(value);\n      break;\n    case 6:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSignerIndices(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.CollectionGuarantee.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.CollectionGuarantee.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.CollectionGuarantee} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.CollectionGuarantee.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getCollectionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getSignaturesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n  f = message.getReferenceBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getSignature_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n  f = message.getSignerIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      5,\n      f\n    );\n  }\n  f = message.getSignerIndices_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      6,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes collection_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getCollectionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes collection_id = 1;\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {string}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getCollectionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getCollectionId()));\n};\n\n\n/**\n * optional bytes collection_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getCollectionId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getCollectionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getCollectionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setCollectionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated bytes signatures = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignaturesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes signatures = 2;\n * This is a type-conversion wrapper around `getSignaturesList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignaturesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getSignaturesList()));\n};\n\n\n/**\n * repeated bytes signatures = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignaturesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignaturesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getSignaturesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setSignaturesList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.addSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.clearSignaturesList = function() {\n  return this.setSignaturesList([]);\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * This is a type-conversion wrapper around `getReferenceBlockId()`\n * @return {string}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getReferenceBlockId()));\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getReferenceBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getReferenceBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getReferenceBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setReferenceBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional bytes signature = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignature = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes signature = 4;\n * This is a type-conversion wrapper around `getSignature()`\n * @return {string}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignature_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSignature()));\n};\n\n\n/**\n * optional bytes signature = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignature()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignature_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSignature()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\n/**\n * repeated bytes signer_ids = 5;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 5));\n};\n\n\n/**\n * repeated bytes signer_ids = 5;\n * This is a type-conversion wrapper around `getSignerIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getSignerIdsList()));\n};\n\n\n/**\n * repeated bytes signer_ids = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignerIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getSignerIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setSignerIdsList = function(value) {\n  return jspb.Message.setField(this, 5, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.addSignerIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 5, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.clearSignerIdsList = function() {\n  return this.setSignerIdsList([]);\n};\n\n\n/**\n * optional bytes signer_indices = 6;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIndices = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * optional bytes signer_indices = 6;\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {string}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIndices_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSignerIndices()));\n};\n\n\n/**\n * optional bytes signer_indices = 6;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignerIndices()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.CollectionGuarantee.prototype.getSignerIndices_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSignerIndices()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.CollectionGuarantee} returns this\n */\nproto.flow.entities.CollectionGuarantee.prototype.setSignerIndices = function(value) {\n  return jspb.Message.setProto3BytesField(this, 6, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/collection_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/collection.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/collection_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/collection.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/event_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/event.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class Event extends jspb.Message {\n  getType(): string;\n  setType(value: string): void;\n\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  getTransactionIndex(): number;\n  setTransactionIndex(value: number): void;\n\n  getEventIndex(): number;\n  setEventIndex(value: number): void;\n\n  getPayload(): Uint8Array | string;\n  getPayload_asU8(): Uint8Array;\n  getPayload_asB64(): string;\n  setPayload(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Event.AsObject;\n  static toObject(includeInstance: boolean, msg: Event): Event.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Event;\n  static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event;\n}\n\nexport namespace Event {\n  export type AsObject = {\n    type: string,\n    transactionId: Uint8Array | string,\n    transactionIndex: number,\n    eventIndex: number,\n    payload: Uint8Array | string,\n  }\n}\n\nexport interface EventEncodingVersionMap {\n  JSON_CDC_V0: 0;\n  CCF_V0: 1;\n}\n\nexport const EventEncodingVersion: EventEncodingVersionMap;\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/event_pb.js",
    "content": "// source: flow/entities/event.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.Event', null, global);\ngoog.exportSymbol('proto.flow.entities.EventEncodingVersion', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Event = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.Event, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Event.displayName = 'proto.flow.entities.Event';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Event.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Event.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Event} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Event.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    transactionId: msg.getTransactionId_asB64(),\n    transactionIndex: jspb.Message.getFieldWithDefault(msg, 3, 0),\n    eventIndex: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    payload: msg.getPayload_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.entities.Event.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Event;\n  return proto.flow.entities.Event.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Event} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.entities.Event.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setTransactionIndex(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setEventIndex(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPayload(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Event.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Event.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Event} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Event.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getTransactionIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      3,\n      f\n    );\n  }\n  f = message.getEventIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      4,\n      f\n    );\n  }\n  f = message.getPayload_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string type = 1;\n * @return {string}\n */\nproto.flow.entities.Event.prototype.getType = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.entities.Event} returns this\n */\nproto.flow.entities.Event.prototype.setType = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Event.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.entities.Event.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Event.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Event} returns this\n */\nproto.flow.entities.Event.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional uint32 transaction_index = 3;\n * @return {number}\n */\nproto.flow.entities.Event.prototype.getTransactionIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Event} returns this\n */\nproto.flow.entities.Event.prototype.setTransactionIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional uint32 event_index = 4;\n * @return {number}\n */\nproto.flow.entities.Event.prototype.getEventIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Event} returns this\n */\nproto.flow.entities.Event.prototype.setEventIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional bytes payload = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Event.prototype.getPayload = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes payload = 5;\n * This is a type-conversion wrapper around `getPayload()`\n * @return {string}\n */\nproto.flow.entities.Event.prototype.getPayload_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPayload()));\n};\n\n\n/**\n * optional bytes payload = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPayload()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Event.prototype.getPayload_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPayload()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Event} returns this\n */\nproto.flow.entities.Event.prototype.setPayload = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n/**\n * @enum {number}\n */\nproto.flow.entities.EventEncodingVersion = {\n  JSON_CDC_V0: 0,\n  CCF_V0: 1\n};\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/event_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/event.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/event_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/event.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/execution_result_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/execution_result.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class ExecutionResult extends jspb.Message {\n  getPreviousResultId(): Uint8Array | string;\n  getPreviousResultId_asU8(): Uint8Array;\n  getPreviousResultId_asB64(): string;\n  setPreviousResultId(value: Uint8Array | string): void;\n\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  clearChunksList(): void;\n  getChunksList(): Array<Chunk>;\n  setChunksList(value: Array<Chunk>): void;\n  addChunks(value?: Chunk, index?: number): Chunk;\n\n  clearServiceEventsList(): void;\n  getServiceEventsList(): Array<ServiceEvent>;\n  setServiceEventsList(value: Array<ServiceEvent>): void;\n  addServiceEvents(value?: ServiceEvent, index?: number): ServiceEvent;\n\n  getExecutionDataId(): Uint8Array | string;\n  getExecutionDataId_asU8(): Uint8Array;\n  getExecutionDataId_asB64(): string;\n  setExecutionDataId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionResult.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionResult): ExecutionResult.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionResult, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionResult;\n  static deserializeBinaryFromReader(message: ExecutionResult, reader: jspb.BinaryReader): ExecutionResult;\n}\n\nexport namespace ExecutionResult {\n  export type AsObject = {\n    previousResultId: Uint8Array | string,\n    blockId: Uint8Array | string,\n    chunksList: Array<Chunk.AsObject>,\n    serviceEventsList: Array<ServiceEvent.AsObject>,\n    executionDataId: Uint8Array | string,\n  }\n}\n\nexport class Chunk extends jspb.Message {\n  getCollectionindex(): number;\n  setCollectionindex(value: number): void;\n\n  getStartState(): Uint8Array | string;\n  getStartState_asU8(): Uint8Array;\n  getStartState_asB64(): string;\n  setStartState(value: Uint8Array | string): void;\n\n  getEventCollection(): Uint8Array | string;\n  getEventCollection_asU8(): Uint8Array;\n  getEventCollection_asB64(): string;\n  setEventCollection(value: Uint8Array | string): void;\n\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getTotalComputationUsed(): number;\n  setTotalComputationUsed(value: number): void;\n\n  getNumberOfTransactions(): number;\n  setNumberOfTransactions(value: number): void;\n\n  getIndex(): number;\n  setIndex(value: number): void;\n\n  getEndState(): Uint8Array | string;\n  getEndState_asU8(): Uint8Array;\n  getEndState_asB64(): string;\n  setEndState(value: Uint8Array | string): void;\n\n  getExecutionDataId(): Uint8Array | string;\n  getExecutionDataId_asU8(): Uint8Array;\n  getExecutionDataId_asB64(): string;\n  setExecutionDataId(value: Uint8Array | string): void;\n\n  getStateDeltaCommitment(): Uint8Array | string;\n  getStateDeltaCommitment_asU8(): Uint8Array;\n  getStateDeltaCommitment_asB64(): string;\n  setStateDeltaCommitment(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Chunk.AsObject;\n  static toObject(includeInstance: boolean, msg: Chunk): Chunk.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Chunk, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Chunk;\n  static deserializeBinaryFromReader(message: Chunk, reader: jspb.BinaryReader): Chunk;\n}\n\nexport namespace Chunk {\n  export type AsObject = {\n    collectionindex: number,\n    startState: Uint8Array | string,\n    eventCollection: Uint8Array | string,\n    blockId: Uint8Array | string,\n    totalComputationUsed: number,\n    numberOfTransactions: number,\n    index: number,\n    endState: Uint8Array | string,\n    executionDataId: Uint8Array | string,\n    stateDeltaCommitment: Uint8Array | string,\n  }\n}\n\nexport class ServiceEvent extends jspb.Message {\n  getType(): string;\n  setType(value: string): void;\n\n  getPayload(): Uint8Array | string;\n  getPayload_asU8(): Uint8Array;\n  getPayload_asB64(): string;\n  setPayload(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ServiceEvent.AsObject;\n  static toObject(includeInstance: boolean, msg: ServiceEvent): ServiceEvent.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ServiceEvent, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ServiceEvent;\n  static deserializeBinaryFromReader(message: ServiceEvent, reader: jspb.BinaryReader): ServiceEvent;\n}\n\nexport namespace ServiceEvent {\n  export type AsObject = {\n    type: string,\n    payload: Uint8Array | string,\n  }\n}\n\nexport class ExecutionReceiptMeta extends jspb.Message {\n  getExecutorId(): Uint8Array | string;\n  getExecutorId_asU8(): Uint8Array;\n  getExecutorId_asB64(): string;\n  setExecutorId(value: Uint8Array | string): void;\n\n  getResultId(): Uint8Array | string;\n  getResultId_asU8(): Uint8Array;\n  getResultId_asB64(): string;\n  setResultId(value: Uint8Array | string): void;\n\n  clearSpocksList(): void;\n  getSpocksList(): Array<Uint8Array | string>;\n  getSpocksList_asU8(): Array<Uint8Array>;\n  getSpocksList_asB64(): Array<string>;\n  setSpocksList(value: Array<Uint8Array | string>): void;\n  addSpocks(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getExecutorSignature(): Uint8Array | string;\n  getExecutorSignature_asU8(): Uint8Array;\n  getExecutorSignature_asB64(): string;\n  setExecutorSignature(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecutionReceiptMeta.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecutionReceiptMeta): ExecutionReceiptMeta.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecutionReceiptMeta, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecutionReceiptMeta;\n  static deserializeBinaryFromReader(message: ExecutionReceiptMeta, reader: jspb.BinaryReader): ExecutionReceiptMeta;\n}\n\nexport namespace ExecutionReceiptMeta {\n  export type AsObject = {\n    executorId: Uint8Array | string,\n    resultId: Uint8Array | string,\n    spocksList: Array<Uint8Array | string>,\n    executorSignature: Uint8Array | string,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/execution_result_pb.js",
    "content": "// source: flow/entities/execution_result.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.Chunk', null, global);\ngoog.exportSymbol('proto.flow.entities.ExecutionReceiptMeta', null, global);\ngoog.exportSymbol('proto.flow.entities.ExecutionResult', null, global);\ngoog.exportSymbol('proto.flow.entities.ServiceEvent', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ExecutionResult = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ExecutionResult.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.ExecutionResult, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ExecutionResult.displayName = 'proto.flow.entities.ExecutionResult';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Chunk = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.Chunk, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Chunk.displayName = 'proto.flow.entities.Chunk';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ServiceEvent = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.ServiceEvent, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ServiceEvent.displayName = 'proto.flow.entities.ServiceEvent';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.ExecutionReceiptMeta = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.ExecutionReceiptMeta.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.ExecutionReceiptMeta, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.ExecutionReceiptMeta.displayName = 'proto.flow.entities.ExecutionReceiptMeta';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.ExecutionResult.repeatedFields_ = [3,4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ExecutionResult.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ExecutionResult.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ExecutionResult} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionResult.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    previousResultId: msg.getPreviousResultId_asB64(),\n    blockId: msg.getBlockId_asB64(),\n    chunksList: jspb.Message.toObjectList(msg.getChunksList(),\n    proto.flow.entities.Chunk.toObject, includeInstance),\n    serviceEventsList: jspb.Message.toObjectList(msg.getServiceEventsList(),\n    proto.flow.entities.ServiceEvent.toObject, includeInstance),\n    executionDataId: msg.getExecutionDataId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ExecutionResult}\n */\nproto.flow.entities.ExecutionResult.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ExecutionResult;\n  return proto.flow.entities.ExecutionResult.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ExecutionResult} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ExecutionResult}\n */\nproto.flow.entities.ExecutionResult.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPreviousResultId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 3:\n      var value = new proto.flow.entities.Chunk;\n      reader.readMessage(value,proto.flow.entities.Chunk.deserializeBinaryFromReader);\n      msg.addChunks(value);\n      break;\n    case 4:\n      var value = new proto.flow.entities.ServiceEvent;\n      reader.readMessage(value,proto.flow.entities.ServiceEvent.deserializeBinaryFromReader);\n      msg.addServiceEvents(value);\n      break;\n    case 5:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setExecutionDataId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionResult.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ExecutionResult.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ExecutionResult} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionResult.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPreviousResultId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getChunksList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      proto.flow.entities.Chunk.serializeBinaryToWriter\n    );\n  }\n  f = message.getServiceEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      4,\n      f,\n      proto.flow.entities.ServiceEvent.serializeBinaryToWriter\n    );\n  }\n  f = message.getExecutionDataId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes previous_result_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionResult.prototype.getPreviousResultId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes previous_result_id = 1;\n * This is a type-conversion wrapper around `getPreviousResultId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionResult.prototype.getPreviousResultId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPreviousResultId()));\n};\n\n\n/**\n * optional bytes previous_result_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPreviousResultId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionResult.prototype.getPreviousResultId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPreviousResultId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionResult} returns this\n */\nproto.flow.entities.ExecutionResult.prototype.setPreviousResultId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes block_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionResult.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionResult.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionResult.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionResult} returns this\n */\nproto.flow.entities.ExecutionResult.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated Chunk chunks = 3;\n * @return {!Array<!proto.flow.entities.Chunk>}\n */\nproto.flow.entities.ExecutionResult.prototype.getChunksList = function() {\n  return /** @type{!Array<!proto.flow.entities.Chunk>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.Chunk, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Chunk>} value\n * @return {!proto.flow.entities.ExecutionResult} returns this\n*/\nproto.flow.entities.ExecutionResult.prototype.setChunksList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Chunk=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Chunk}\n */\nproto.flow.entities.ExecutionResult.prototype.addChunks = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Chunk, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ExecutionResult} returns this\n */\nproto.flow.entities.ExecutionResult.prototype.clearChunksList = function() {\n  return this.setChunksList([]);\n};\n\n\n/**\n * repeated ServiceEvent service_events = 4;\n * @return {!Array<!proto.flow.entities.ServiceEvent>}\n */\nproto.flow.entities.ExecutionResult.prototype.getServiceEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.ServiceEvent>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.ServiceEvent, 4));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.ServiceEvent>} value\n * @return {!proto.flow.entities.ExecutionResult} returns this\n*/\nproto.flow.entities.ExecutionResult.prototype.setServiceEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 4, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.ServiceEvent=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ServiceEvent}\n */\nproto.flow.entities.ExecutionResult.prototype.addServiceEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.flow.entities.ServiceEvent, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ExecutionResult} returns this\n */\nproto.flow.entities.ExecutionResult.prototype.clearServiceEventsList = function() {\n  return this.setServiceEventsList([]);\n};\n\n\n/**\n * optional bytes execution_data_id = 5;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionResult.prototype.getExecutionDataId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * optional bytes execution_data_id = 5;\n * This is a type-conversion wrapper around `getExecutionDataId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionResult.prototype.getExecutionDataId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getExecutionDataId()));\n};\n\n\n/**\n * optional bytes execution_data_id = 5;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutionDataId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionResult.prototype.getExecutionDataId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getExecutionDataId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionResult} returns this\n */\nproto.flow.entities.ExecutionResult.prototype.setExecutionDataId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Chunk.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Chunk.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Chunk} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Chunk.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    collectionindex: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    startState: msg.getStartState_asB64(),\n    eventCollection: msg.getEventCollection_asB64(),\n    blockId: msg.getBlockId_asB64(),\n    totalComputationUsed: jspb.Message.getFieldWithDefault(msg, 5, 0),\n    numberOfTransactions: jspb.Message.getFieldWithDefault(msg, 6, 0),\n    index: jspb.Message.getFieldWithDefault(msg, 7, 0),\n    endState: msg.getEndState_asB64(),\n    executionDataId: msg.getExecutionDataId_asB64(),\n    stateDeltaCommitment: msg.getStateDeltaCommitment_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Chunk}\n */\nproto.flow.entities.Chunk.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Chunk;\n  return proto.flow.entities.Chunk.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Chunk} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Chunk}\n */\nproto.flow.entities.Chunk.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setCollectionindex(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartState(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setEventCollection(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setTotalComputationUsed(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setNumberOfTransactions(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setIndex(value);\n      break;\n    case 8:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setEndState(value);\n      break;\n    case 9:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setExecutionDataId(value);\n      break;\n    case 10:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStateDeltaCommitment(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Chunk.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Chunk} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Chunk.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getCollectionindex();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getStartState_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getEventCollection_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n  f = message.getTotalComputationUsed();\n  if (f !== 0) {\n    writer.writeUint64(\n      5,\n      f\n    );\n  }\n  f = message.getNumberOfTransactions();\n  if (f !== 0) {\n    writer.writeUint32(\n      6,\n      f\n    );\n  }\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint64(\n      7,\n      f\n    );\n  }\n  f = message.getEndState_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      8,\n      f\n    );\n  }\n  f = message.getExecutionDataId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      9,\n      f\n    );\n  }\n  f = message.getStateDeltaCommitment_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      10,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 CollectionIndex = 1;\n * @return {number}\n */\nproto.flow.entities.Chunk.prototype.getCollectionindex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setCollectionindex = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional bytes start_state = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getStartState = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes start_state = 2;\n * This is a type-conversion wrapper around `getStartState()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getStartState_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartState()));\n};\n\n\n/**\n * optional bytes start_state = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartState()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getStartState_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartState()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setStartState = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional bytes event_collection = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getEventCollection = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes event_collection = 3;\n * This is a type-conversion wrapper around `getEventCollection()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getEventCollection_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getEventCollection()));\n};\n\n\n/**\n * optional bytes event_collection = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getEventCollection()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getEventCollection_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getEventCollection()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setEventCollection = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional bytes block_id = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 4;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\n/**\n * optional uint64 total_computation_used = 5;\n * @return {number}\n */\nproto.flow.entities.Chunk.prototype.getTotalComputationUsed = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setTotalComputationUsed = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional uint32 number_of_transactions = 6;\n * @return {number}\n */\nproto.flow.entities.Chunk.prototype.getNumberOfTransactions = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setNumberOfTransactions = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional uint64 index = 7;\n * @return {number}\n */\nproto.flow.entities.Chunk.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional bytes end_state = 8;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getEndState = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * optional bytes end_state = 8;\n * This is a type-conversion wrapper around `getEndState()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getEndState_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getEndState()));\n};\n\n\n/**\n * optional bytes end_state = 8;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getEndState()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getEndState_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getEndState()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setEndState = function(value) {\n  return jspb.Message.setProto3BytesField(this, 8, value);\n};\n\n\n/**\n * optional bytes execution_data_id = 9;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getExecutionDataId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, \"\"));\n};\n\n\n/**\n * optional bytes execution_data_id = 9;\n * This is a type-conversion wrapper around `getExecutionDataId()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getExecutionDataId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getExecutionDataId()));\n};\n\n\n/**\n * optional bytes execution_data_id = 9;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutionDataId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getExecutionDataId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getExecutionDataId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setExecutionDataId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 9, value);\n};\n\n\n/**\n * optional bytes state_delta_commitment = 10;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Chunk.prototype.getStateDeltaCommitment = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, \"\"));\n};\n\n\n/**\n * optional bytes state_delta_commitment = 10;\n * This is a type-conversion wrapper around `getStateDeltaCommitment()`\n * @return {string}\n */\nproto.flow.entities.Chunk.prototype.getStateDeltaCommitment_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStateDeltaCommitment()));\n};\n\n\n/**\n * optional bytes state_delta_commitment = 10;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStateDeltaCommitment()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Chunk.prototype.getStateDeltaCommitment_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStateDeltaCommitment()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Chunk} returns this\n */\nproto.flow.entities.Chunk.prototype.setStateDeltaCommitment = function(value) {\n  return jspb.Message.setProto3BytesField(this, 10, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ServiceEvent.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ServiceEvent.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ServiceEvent} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ServiceEvent.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    payload: msg.getPayload_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ServiceEvent}\n */\nproto.flow.entities.ServiceEvent.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ServiceEvent;\n  return proto.flow.entities.ServiceEvent.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ServiceEvent} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ServiceEvent}\n */\nproto.flow.entities.ServiceEvent.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPayload(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ServiceEvent.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ServiceEvent.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ServiceEvent} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ServiceEvent.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPayload_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string type = 1;\n * @return {string}\n */\nproto.flow.entities.ServiceEvent.prototype.getType = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.entities.ServiceEvent} returns this\n */\nproto.flow.entities.ServiceEvent.prototype.setType = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional bytes payload = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ServiceEvent.prototype.getPayload = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes payload = 2;\n * This is a type-conversion wrapper around `getPayload()`\n * @return {string}\n */\nproto.flow.entities.ServiceEvent.prototype.getPayload_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPayload()));\n};\n\n\n/**\n * optional bytes payload = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPayload()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ServiceEvent.prototype.getPayload_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPayload()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ServiceEvent} returns this\n */\nproto.flow.entities.ServiceEvent.prototype.setPayload = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.ExecutionReceiptMeta.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.ExecutionReceiptMeta.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.ExecutionReceiptMeta} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionReceiptMeta.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    executorId: msg.getExecutorId_asB64(),\n    resultId: msg.getResultId_asB64(),\n    spocksList: msg.getSpocksList_asB64(),\n    executorSignature: msg.getExecutorSignature_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.ExecutionReceiptMeta}\n */\nproto.flow.entities.ExecutionReceiptMeta.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.ExecutionReceiptMeta;\n  return proto.flow.entities.ExecutionReceiptMeta.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.ExecutionReceiptMeta} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.ExecutionReceiptMeta}\n */\nproto.flow.entities.ExecutionReceiptMeta.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setExecutorId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setResultId(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addSpocks(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setExecutorSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.ExecutionReceiptMeta.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.ExecutionReceiptMeta} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.ExecutionReceiptMeta.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getExecutorId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getResultId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getSpocksList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      3,\n      f\n    );\n  }\n  f = message.getExecutorSignature_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes executor_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes executor_id = 1;\n * This is a type-conversion wrapper around `getExecutorId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getExecutorId()));\n};\n\n\n/**\n * optional bytes executor_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutorId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getExecutorId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.setExecutorId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes result_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getResultId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes result_id = 2;\n * This is a type-conversion wrapper around `getResultId()`\n * @return {string}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getResultId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getResultId()));\n};\n\n\n/**\n * optional bytes result_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getResultId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getResultId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getResultId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.setResultId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated bytes spocks = 3;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * repeated bytes spocks = 3;\n * This is a type-conversion wrapper around `getSpocksList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getSpocksList()));\n};\n\n\n/**\n * repeated bytes spocks = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSpocksList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getSpocksList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getSpocksList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.setSpocksList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.addSpocks = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.clearSpocksList = function() {\n  return this.setSpocksList([]);\n};\n\n\n/**\n * optional bytes executor_signature = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes executor_signature = 4;\n * This is a type-conversion wrapper around `getExecutorSignature()`\n * @return {string}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getExecutorSignature()));\n};\n\n\n/**\n * optional bytes executor_signature = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getExecutorSignature()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.getExecutorSignature_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getExecutorSignature()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.ExecutionReceiptMeta} returns this\n */\nproto.flow.entities.ExecutionReceiptMeta.prototype.setExecutorSignature = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/execution_result_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/execution_result.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/execution_result_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/execution_result.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/metadata_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/metadata.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class Metadata extends jspb.Message {\n  getLatestFinalizedBlockId(): Uint8Array | string;\n  getLatestFinalizedBlockId_asU8(): Uint8Array;\n  getLatestFinalizedBlockId_asB64(): string;\n  setLatestFinalizedBlockId(value: Uint8Array | string): void;\n\n  getLatestFinalizedHeight(): number;\n  setLatestFinalizedHeight(value: number): void;\n\n  getNodeId(): Uint8Array | string;\n  getNodeId_asU8(): Uint8Array;\n  getNodeId_asB64(): string;\n  setNodeId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Metadata.AsObject;\n  static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Metadata;\n  static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata;\n}\n\nexport namespace Metadata {\n  export type AsObject = {\n    latestFinalizedBlockId: Uint8Array | string,\n    latestFinalizedHeight: number,\n    nodeId: Uint8Array | string,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/metadata_pb.js",
    "content": "// source: flow/entities/metadata.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.Metadata', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Metadata = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.Metadata, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Metadata.displayName = 'proto.flow.entities.Metadata';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Metadata.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Metadata.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Metadata} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Metadata.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    latestFinalizedBlockId: msg.getLatestFinalizedBlockId_asB64(),\n    latestFinalizedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    nodeId: msg.getNodeId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Metadata}\n */\nproto.flow.entities.Metadata.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Metadata;\n  return proto.flow.entities.Metadata.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Metadata} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Metadata}\n */\nproto.flow.entities.Metadata.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setLatestFinalizedBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setLatestFinalizedHeight(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setNodeId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Metadata.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Metadata.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Metadata} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Metadata.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLatestFinalizedBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getLatestFinalizedHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getNodeId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes latest_finalized_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Metadata.prototype.getLatestFinalizedBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes latest_finalized_block_id = 1;\n * This is a type-conversion wrapper around `getLatestFinalizedBlockId()`\n * @return {string}\n */\nproto.flow.entities.Metadata.prototype.getLatestFinalizedBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getLatestFinalizedBlockId()));\n};\n\n\n/**\n * optional bytes latest_finalized_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getLatestFinalizedBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Metadata.prototype.getLatestFinalizedBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getLatestFinalizedBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Metadata} returns this\n */\nproto.flow.entities.Metadata.prototype.setLatestFinalizedBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 latest_finalized_height = 2;\n * @return {number}\n */\nproto.flow.entities.Metadata.prototype.getLatestFinalizedHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Metadata} returns this\n */\nproto.flow.entities.Metadata.prototype.setLatestFinalizedHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional bytes node_id = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Metadata.prototype.getNodeId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes node_id = 3;\n * This is a type-conversion wrapper around `getNodeId()`\n * @return {string}\n */\nproto.flow.entities.Metadata.prototype.getNodeId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getNodeId()));\n};\n\n\n/**\n * optional bytes node_id = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getNodeId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Metadata.prototype.getNodeId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getNodeId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Metadata} returns this\n */\nproto.flow.entities.Metadata.prototype.setNodeId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/metadata_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/metadata.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/metadata_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/metadata.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/node_version_info_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/node_version_info.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class NodeVersionInfo extends jspb.Message {\n  getSemver(): string;\n  setSemver(value: string): void;\n\n  getCommit(): string;\n  setCommit(value: string): void;\n\n  getSporkId(): Uint8Array | string;\n  getSporkId_asU8(): Uint8Array;\n  getSporkId_asB64(): string;\n  setSporkId(value: Uint8Array | string): void;\n\n  getProtocolVersion(): number;\n  setProtocolVersion(value: number): void;\n\n  getSporkRootBlockHeight(): number;\n  setSporkRootBlockHeight(value: number): void;\n\n  getNodeRootBlockHeight(): number;\n  setNodeRootBlockHeight(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): NodeVersionInfo.AsObject;\n  static toObject(includeInstance: boolean, msg: NodeVersionInfo): NodeVersionInfo.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: NodeVersionInfo, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): NodeVersionInfo;\n  static deserializeBinaryFromReader(message: NodeVersionInfo, reader: jspb.BinaryReader): NodeVersionInfo;\n}\n\nexport namespace NodeVersionInfo {\n  export type AsObject = {\n    semver: string,\n    commit: string,\n    sporkId: Uint8Array | string,\n    protocolVersion: number,\n    sporkRootBlockHeight: number,\n    nodeRootBlockHeight: number,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/node_version_info_pb.js",
    "content": "// source: flow/entities/node_version_info.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.NodeVersionInfo', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.NodeVersionInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.NodeVersionInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.NodeVersionInfo.displayName = 'proto.flow.entities.NodeVersionInfo';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.NodeVersionInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.NodeVersionInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.NodeVersionInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.NodeVersionInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    semver: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    commit: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n    sporkId: msg.getSporkId_asB64(),\n    protocolVersion: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    sporkRootBlockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0),\n    nodeRootBlockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.NodeVersionInfo}\n */\nproto.flow.entities.NodeVersionInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.NodeVersionInfo;\n  return proto.flow.entities.NodeVersionInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.NodeVersionInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.NodeVersionInfo}\n */\nproto.flow.entities.NodeVersionInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setSemver(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setCommit(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSporkId(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setProtocolVersion(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setSporkRootBlockHeight(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setNodeRootBlockHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.NodeVersionInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.NodeVersionInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.NodeVersionInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.NodeVersionInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSemver();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getCommit();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getSporkId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getProtocolVersion();\n  if (f !== 0) {\n    writer.writeUint64(\n      4,\n      f\n    );\n  }\n  f = message.getSporkRootBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      5,\n      f\n    );\n  }\n  f = message.getNodeRootBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      6,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string semver = 1;\n * @return {string}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getSemver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setSemver = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string commit = 2;\n * @return {string}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getCommit = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setCommit = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional bytes spork_id = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getSporkId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes spork_id = 3;\n * This is a type-conversion wrapper around `getSporkId()`\n * @return {string}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getSporkId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSporkId()));\n};\n\n\n/**\n * optional bytes spork_id = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSporkId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getSporkId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSporkId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setSporkId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional uint64 protocol_version = 4;\n * @return {number}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getProtocolVersion = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setProtocolVersion = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional uint64 spork_root_block_height = 5;\n * @return {number}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getSporkRootBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setSporkRootBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional uint64 node_root_block_height = 6;\n * @return {number}\n */\nproto.flow.entities.NodeVersionInfo.prototype.getNodeRootBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.NodeVersionInfo} returns this\n */\nproto.flow.entities.NodeVersionInfo.prototype.setNodeRootBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/node_version_info_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/node_version_info.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/node_version_info_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/node_version_info.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/register_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/register.proto\n\nimport * as jspb from \"google-protobuf\";\n\nexport class RegisterID extends jspb.Message {\n  getOwner(): Uint8Array | string;\n  getOwner_asU8(): Uint8Array;\n  getOwner_asB64(): string;\n  setOwner(value: Uint8Array | string): void;\n\n  getKey(): Uint8Array | string;\n  getKey_asU8(): Uint8Array;\n  getKey_asB64(): string;\n  setKey(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): RegisterID.AsObject;\n  static toObject(includeInstance: boolean, msg: RegisterID): RegisterID.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: RegisterID, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): RegisterID;\n  static deserializeBinaryFromReader(message: RegisterID, reader: jspb.BinaryReader): RegisterID;\n}\n\nexport namespace RegisterID {\n  export type AsObject = {\n    owner: Uint8Array | string,\n    key: Uint8Array | string,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/register_pb.js",
    "content": "// source: flow/entities/register.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\ngoog.exportSymbol('proto.flow.entities.RegisterID', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.RegisterID = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.RegisterID, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.RegisterID.displayName = 'proto.flow.entities.RegisterID';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.RegisterID.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.RegisterID.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.RegisterID} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.RegisterID.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    owner: msg.getOwner_asB64(),\n    key: msg.getKey_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.RegisterID}\n */\nproto.flow.entities.RegisterID.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.RegisterID;\n  return proto.flow.entities.RegisterID.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.RegisterID} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.RegisterID}\n */\nproto.flow.entities.RegisterID.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setOwner(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.RegisterID.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.RegisterID.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.RegisterID} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.RegisterID.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getOwner_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getKey_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes owner = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.RegisterID.prototype.getOwner = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes owner = 1;\n * This is a type-conversion wrapper around `getOwner()`\n * @return {string}\n */\nproto.flow.entities.RegisterID.prototype.getOwner_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getOwner()));\n};\n\n\n/**\n * optional bytes owner = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getOwner()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.RegisterID.prototype.getOwner_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getOwner()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.RegisterID} returns this\n */\nproto.flow.entities.RegisterID.prototype.setOwner = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes key = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.RegisterID.prototype.getKey = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes key = 2;\n * This is a type-conversion wrapper around `getKey()`\n * @return {string}\n */\nproto.flow.entities.RegisterID.prototype.getKey_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getKey()));\n};\n\n\n/**\n * optional bytes key = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getKey()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.RegisterID.prototype.getKey_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getKey()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.RegisterID} returns this\n */\nproto.flow.entities.RegisterID.prototype.setKey = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/register_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/register.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/register_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/register.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/transaction.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as flow_entities_event_pb from \"../../flow/entities/event_pb\";\n\nexport class Transaction extends jspb.Message {\n  getScript(): Uint8Array | string;\n  getScript_asU8(): Uint8Array;\n  getScript_asB64(): string;\n  setScript(value: Uint8Array | string): void;\n\n  clearArgumentsList(): void;\n  getArgumentsList(): Array<Uint8Array | string>;\n  getArgumentsList_asU8(): Array<Uint8Array>;\n  getArgumentsList_asB64(): Array<string>;\n  setArgumentsList(value: Array<Uint8Array | string>): void;\n  addArguments(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  getReferenceBlockId(): Uint8Array | string;\n  getReferenceBlockId_asU8(): Uint8Array;\n  getReferenceBlockId_asB64(): string;\n  setReferenceBlockId(value: Uint8Array | string): void;\n\n  getGasLimit(): number;\n  setGasLimit(value: number): void;\n\n  hasProposalKey(): boolean;\n  clearProposalKey(): void;\n  getProposalKey(): Transaction.ProposalKey | undefined;\n  setProposalKey(value?: Transaction.ProposalKey): void;\n\n  getPayer(): Uint8Array | string;\n  getPayer_asU8(): Uint8Array;\n  getPayer_asB64(): string;\n  setPayer(value: Uint8Array | string): void;\n\n  clearAuthorizersList(): void;\n  getAuthorizersList(): Array<Uint8Array | string>;\n  getAuthorizersList_asU8(): Array<Uint8Array>;\n  getAuthorizersList_asB64(): Array<string>;\n  setAuthorizersList(value: Array<Uint8Array | string>): void;\n  addAuthorizers(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  clearPayloadSignaturesList(): void;\n  getPayloadSignaturesList(): Array<Transaction.Signature>;\n  setPayloadSignaturesList(value: Array<Transaction.Signature>): void;\n  addPayloadSignatures(value?: Transaction.Signature, index?: number): Transaction.Signature;\n\n  clearEnvelopeSignaturesList(): void;\n  getEnvelopeSignaturesList(): Array<Transaction.Signature>;\n  setEnvelopeSignaturesList(value: Array<Transaction.Signature>): void;\n  addEnvelopeSignatures(value?: Transaction.Signature, index?: number): Transaction.Signature;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): Transaction.AsObject;\n  static toObject(includeInstance: boolean, msg: Transaction): Transaction.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: Transaction, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): Transaction;\n  static deserializeBinaryFromReader(message: Transaction, reader: jspb.BinaryReader): Transaction;\n}\n\nexport namespace Transaction {\n  export type AsObject = {\n    script: Uint8Array | string,\n    argumentsList: Array<Uint8Array | string>,\n    referenceBlockId: Uint8Array | string,\n    gasLimit: number,\n    proposalKey?: Transaction.ProposalKey.AsObject,\n    payer: Uint8Array | string,\n    authorizersList: Array<Uint8Array | string>,\n    payloadSignaturesList: Array<Transaction.Signature.AsObject>,\n    envelopeSignaturesList: Array<Transaction.Signature.AsObject>,\n  }\n\n  export class ProposalKey extends jspb.Message {\n    getAddress(): Uint8Array | string;\n    getAddress_asU8(): Uint8Array;\n    getAddress_asB64(): string;\n    setAddress(value: Uint8Array | string): void;\n\n    getKeyId(): number;\n    setKeyId(value: number): void;\n\n    getSequenceNumber(): number;\n    setSequenceNumber(value: number): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): ProposalKey.AsObject;\n    static toObject(includeInstance: boolean, msg: ProposalKey): ProposalKey.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n    static serializeBinaryToWriter(message: ProposalKey, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): ProposalKey;\n    static deserializeBinaryFromReader(message: ProposalKey, reader: jspb.BinaryReader): ProposalKey;\n  }\n\n  export namespace ProposalKey {\n    export type AsObject = {\n      address: Uint8Array | string,\n      keyId: number,\n      sequenceNumber: number,\n    }\n  }\n\n  export class Signature extends jspb.Message {\n    getAddress(): Uint8Array | string;\n    getAddress_asU8(): Uint8Array;\n    getAddress_asB64(): string;\n    setAddress(value: Uint8Array | string): void;\n\n    getKeyId(): number;\n    setKeyId(value: number): void;\n\n    getSignature(): Uint8Array | string;\n    getSignature_asU8(): Uint8Array;\n    getSignature_asB64(): string;\n    setSignature(value: Uint8Array | string): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): Signature.AsObject;\n    static toObject(includeInstance: boolean, msg: Signature): Signature.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n    static serializeBinaryToWriter(message: Signature, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): Signature;\n    static deserializeBinaryFromReader(message: Signature, reader: jspb.BinaryReader): Signature;\n  }\n\n  export namespace Signature {\n    export type AsObject = {\n      address: Uint8Array | string,\n      keyId: number,\n      signature: Uint8Array | string,\n    }\n  }\n}\n\nexport interface TransactionStatusMap {\n  UNKNOWN: 0;\n  PENDING: 1;\n  FINALIZED: 2;\n  EXECUTED: 3;\n  SEALED: 4;\n  EXPIRED: 5;\n}\n\nexport const TransactionStatus: TransactionStatusMap;\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/transaction_pb.js",
    "content": "// source: flow/entities/transaction.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar flow_entities_event_pb = require('../../flow/entities/event_pb.js');\ngoog.object.extend(proto, flow_entities_event_pb);\ngoog.exportSymbol('proto.flow.entities.Transaction', null, global);\ngoog.exportSymbol('proto.flow.entities.Transaction.ProposalKey', null, global);\ngoog.exportSymbol('proto.flow.entities.Transaction.Signature', null, global);\ngoog.exportSymbol('proto.flow.entities.TransactionStatus', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Transaction = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.entities.Transaction.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.entities.Transaction, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Transaction.displayName = 'proto.flow.entities.Transaction';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Transaction.ProposalKey = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.Transaction.ProposalKey, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Transaction.ProposalKey.displayName = 'proto.flow.entities.Transaction.ProposalKey';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.entities.Transaction.Signature = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.entities.Transaction.Signature, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.entities.Transaction.Signature.displayName = 'proto.flow.entities.Transaction.Signature';\n}\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.entities.Transaction.repeatedFields_ = [2,7,8,9];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Transaction.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Transaction.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Transaction} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    script: msg.getScript_asB64(),\n    argumentsList: msg.getArgumentsList_asB64(),\n    referenceBlockId: msg.getReferenceBlockId_asB64(),\n    gasLimit: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    proposalKey: (f = msg.getProposalKey()) && proto.flow.entities.Transaction.ProposalKey.toObject(includeInstance, f),\n    payer: msg.getPayer_asB64(),\n    authorizersList: msg.getAuthorizersList_asB64(),\n    payloadSignaturesList: jspb.Message.toObjectList(msg.getPayloadSignaturesList(),\n    proto.flow.entities.Transaction.Signature.toObject, includeInstance),\n    envelopeSignaturesList: jspb.Message.toObjectList(msg.getEnvelopeSignaturesList(),\n    proto.flow.entities.Transaction.Signature.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Transaction}\n */\nproto.flow.entities.Transaction.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Transaction;\n  return proto.flow.entities.Transaction.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Transaction} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Transaction}\n */\nproto.flow.entities.Transaction.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setScript(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addArguments(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setReferenceBlockId(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setGasLimit(value);\n      break;\n    case 5:\n      var value = new proto.flow.entities.Transaction.ProposalKey;\n      reader.readMessage(value,proto.flow.entities.Transaction.ProposalKey.deserializeBinaryFromReader);\n      msg.setProposalKey(value);\n      break;\n    case 6:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setPayer(value);\n      break;\n    case 7:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addAuthorizers(value);\n      break;\n    case 8:\n      var value = new proto.flow.entities.Transaction.Signature;\n      reader.readMessage(value,proto.flow.entities.Transaction.Signature.deserializeBinaryFromReader);\n      msg.addPayloadSignatures(value);\n      break;\n    case 9:\n      var value = new proto.flow.entities.Transaction.Signature;\n      reader.readMessage(value,proto.flow.entities.Transaction.Signature.deserializeBinaryFromReader);\n      msg.addEnvelopeSignatures(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Transaction.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Transaction} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getScript_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getArgumentsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n  f = message.getReferenceBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n  f = message.getGasLimit();\n  if (f !== 0) {\n    writer.writeUint64(\n      4,\n      f\n    );\n  }\n  f = message.getProposalKey();\n  if (f != null) {\n    writer.writeMessage(\n      5,\n      f,\n      proto.flow.entities.Transaction.ProposalKey.serializeBinaryToWriter\n    );\n  }\n  f = message.getPayer_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      6,\n      f\n    );\n  }\n  f = message.getAuthorizersList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      7,\n      f\n    );\n  }\n  f = message.getPayloadSignaturesList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      8,\n      f,\n      proto.flow.entities.Transaction.Signature.serializeBinaryToWriter\n    );\n  }\n  f = message.getEnvelopeSignaturesList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      9,\n      f,\n      proto.flow.entities.Transaction.Signature.serializeBinaryToWriter\n    );\n  }\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Transaction.ProposalKey.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Transaction.ProposalKey} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.ProposalKey.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64(),\n    keyId: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    sequenceNumber: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Transaction.ProposalKey}\n */\nproto.flow.entities.Transaction.ProposalKey.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Transaction.ProposalKey;\n  return proto.flow.entities.Transaction.ProposalKey.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Transaction.ProposalKey} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Transaction.ProposalKey}\n */\nproto.flow.entities.Transaction.ProposalKey.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setKeyId(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setSequenceNumber(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Transaction.ProposalKey.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Transaction.ProposalKey} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.ProposalKey.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getKeyId();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getSequenceNumber();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction.ProposalKey} returns this\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 key_id = 2;\n * @return {number}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.getKeyId = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Transaction.ProposalKey} returns this\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.setKeyId = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional uint64 sequence_number = 3;\n * @return {number}\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.getSequenceNumber = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Transaction.ProposalKey} returns this\n */\nproto.flow.entities.Transaction.ProposalKey.prototype.setSequenceNumber = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.entities.Transaction.Signature.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.entities.Transaction.Signature.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.entities.Transaction.Signature} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.Signature.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    address: msg.getAddress_asB64(),\n    keyId: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    signature: msg.getSignature_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.entities.Transaction.Signature}\n */\nproto.flow.entities.Transaction.Signature.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.entities.Transaction.Signature;\n  return proto.flow.entities.Transaction.Signature.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.entities.Transaction.Signature} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.entities.Transaction.Signature}\n */\nproto.flow.entities.Transaction.Signature.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setKeyId(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.Signature.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.entities.Transaction.Signature.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.entities.Transaction.Signature} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.entities.Transaction.Signature.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getKeyId();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getSignature_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes address = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.Signature.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes address = 1;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.entities.Transaction.Signature.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.Signature.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction.Signature} returns this\n */\nproto.flow.entities.Transaction.Signature.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 key_id = 2;\n * @return {number}\n */\nproto.flow.entities.Transaction.Signature.prototype.getKeyId = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Transaction.Signature} returns this\n */\nproto.flow.entities.Transaction.Signature.prototype.setKeyId = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional bytes signature = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.Signature.prototype.getSignature = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes signature = 3;\n * This is a type-conversion wrapper around `getSignature()`\n * @return {string}\n */\nproto.flow.entities.Transaction.Signature.prototype.getSignature_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getSignature()));\n};\n\n\n/**\n * optional bytes signature = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getSignature()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.Signature.prototype.getSignature_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getSignature()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction.Signature} returns this\n */\nproto.flow.entities.Transaction.Signature.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional bytes script = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.prototype.getScript = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes script = 1;\n * This is a type-conversion wrapper around `getScript()`\n * @return {string}\n */\nproto.flow.entities.Transaction.prototype.getScript_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getScript()));\n};\n\n\n/**\n * optional bytes script = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getScript()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.prototype.getScript_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getScript()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setScript = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.Transaction.prototype.getArgumentsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.Transaction.prototype.getArgumentsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getArgumentsList()));\n};\n\n\n/**\n * repeated bytes arguments = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.Transaction.prototype.getArgumentsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getArgumentsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setArgumentsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.addArguments = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.clearArgumentsList = function() {\n  return this.setArgumentsList([]);\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.prototype.getReferenceBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * This is a type-conversion wrapper around `getReferenceBlockId()`\n * @return {string}\n */\nproto.flow.entities.Transaction.prototype.getReferenceBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getReferenceBlockId()));\n};\n\n\n/**\n * optional bytes reference_block_id = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getReferenceBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.prototype.getReferenceBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getReferenceBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setReferenceBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 3, value);\n};\n\n\n/**\n * optional uint64 gas_limit = 4;\n * @return {number}\n */\nproto.flow.entities.Transaction.prototype.getGasLimit = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setGasLimit = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional ProposalKey proposal_key = 5;\n * @return {?proto.flow.entities.Transaction.ProposalKey}\n */\nproto.flow.entities.Transaction.prototype.getProposalKey = function() {\n  return /** @type{?proto.flow.entities.Transaction.ProposalKey} */ (\n    jspb.Message.getWrapperField(this, proto.flow.entities.Transaction.ProposalKey, 5));\n};\n\n\n/**\n * @param {?proto.flow.entities.Transaction.ProposalKey|undefined} value\n * @return {!proto.flow.entities.Transaction} returns this\n*/\nproto.flow.entities.Transaction.prototype.setProposalKey = function(value) {\n  return jspb.Message.setWrapperField(this, 5, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.clearProposalKey = function() {\n  return this.setProposalKey(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.entities.Transaction.prototype.hasProposalKey = function() {\n  return jspb.Message.getField(this, 5) != null;\n};\n\n\n/**\n * optional bytes payer = 6;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.entities.Transaction.prototype.getPayer = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * optional bytes payer = 6;\n * This is a type-conversion wrapper around `getPayer()`\n * @return {string}\n */\nproto.flow.entities.Transaction.prototype.getPayer_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getPayer()));\n};\n\n\n/**\n * optional bytes payer = 6;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getPayer()`\n * @return {!Uint8Array}\n */\nproto.flow.entities.Transaction.prototype.getPayer_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getPayer()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setPayer = function(value) {\n  return jspb.Message.setProto3BytesField(this, 6, value);\n};\n\n\n/**\n * repeated bytes authorizers = 7;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.entities.Transaction.prototype.getAuthorizersList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 7));\n};\n\n\n/**\n * repeated bytes authorizers = 7;\n * This is a type-conversion wrapper around `getAuthorizersList()`\n * @return {!Array<string>}\n */\nproto.flow.entities.Transaction.prototype.getAuthorizersList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getAuthorizersList()));\n};\n\n\n/**\n * repeated bytes authorizers = 7;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAuthorizersList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.entities.Transaction.prototype.getAuthorizersList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getAuthorizersList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.setAuthorizersList = function(value) {\n  return jspb.Message.setField(this, 7, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.addAuthorizers = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 7, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.clearAuthorizersList = function() {\n  return this.setAuthorizersList([]);\n};\n\n\n/**\n * repeated Signature payload_signatures = 8;\n * @return {!Array<!proto.flow.entities.Transaction.Signature>}\n */\nproto.flow.entities.Transaction.prototype.getPayloadSignaturesList = function() {\n  return /** @type{!Array<!proto.flow.entities.Transaction.Signature>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.Transaction.Signature, 8));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Transaction.Signature>} value\n * @return {!proto.flow.entities.Transaction} returns this\n*/\nproto.flow.entities.Transaction.prototype.setPayloadSignaturesList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 8, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Transaction.Signature=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction.Signature}\n */\nproto.flow.entities.Transaction.prototype.addPayloadSignatures = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.flow.entities.Transaction.Signature, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.clearPayloadSignaturesList = function() {\n  return this.setPayloadSignaturesList([]);\n};\n\n\n/**\n * repeated Signature envelope_signatures = 9;\n * @return {!Array<!proto.flow.entities.Transaction.Signature>}\n */\nproto.flow.entities.Transaction.prototype.getEnvelopeSignaturesList = function() {\n  return /** @type{!Array<!proto.flow.entities.Transaction.Signature>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.entities.Transaction.Signature, 9));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Transaction.Signature>} value\n * @return {!proto.flow.entities.Transaction} returns this\n*/\nproto.flow.entities.Transaction.prototype.setEnvelopeSignaturesList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 9, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Transaction.Signature=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Transaction.Signature}\n */\nproto.flow.entities.Transaction.prototype.addEnvelopeSignatures = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.flow.entities.Transaction.Signature, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.entities.Transaction} returns this\n */\nproto.flow.entities.Transaction.prototype.clearEnvelopeSignaturesList = function() {\n  return this.setEnvelopeSignaturesList([]);\n};\n\n\n/**\n * @enum {number}\n */\nproto.flow.entities.TransactionStatus = {\n  UNKNOWN: 0,\n  PENDING: 1,\n  FINALIZED: 2,\n  EXECUTED: 3,\n  SEALED: 4,\n  EXPIRED: 5\n};\n\ngoog.object.extend(exports, proto.flow.entities);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/transaction_pb_service.d.ts",
    "content": "// package: flow.entities\n// file: flow/entities/transaction.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/entities/transaction_pb_service.js",
    "content": "// package: flow.entities\n// file: flow/entities/transaction.proto\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/execution/execution_pb.d.ts",
    "content": "// package: flow.execution\n// file: flow/execution/execution.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as flow_entities_account_pb from \"../../flow/entities/account_pb\";\nimport * as flow_entities_block_header_pb from \"../../flow/entities/block_header_pb\";\nimport * as flow_entities_event_pb from \"../../flow/entities/event_pb\";\nimport * as flow_entities_transaction_pb from \"../../flow/entities/transaction_pb\";\n\nexport class PingRequest extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): PingRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: PingRequest): PingRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: PingRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): PingRequest;\n  static deserializeBinaryFromReader(message: PingRequest, reader: jspb.BinaryReader): PingRequest;\n}\n\nexport namespace PingRequest {\n  export type AsObject = {\n  }\n}\n\nexport class PingResponse extends jspb.Message {\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): PingResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: PingResponse): PingResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: PingResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): PingResponse;\n  static deserializeBinaryFromReader(message: PingResponse, reader: jspb.BinaryReader): PingResponse;\n}\n\nexport namespace PingResponse {\n  export type AsObject = {\n  }\n}\n\nexport class GetAccountAtBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getAddress(): Uint8Array | string;\n  getAddress_asU8(): Uint8Array;\n  getAddress_asB64(): string;\n  setAddress(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountAtBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountAtBlockIDRequest): GetAccountAtBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountAtBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountAtBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetAccountAtBlockIDRequest, reader: jspb.BinaryReader): GetAccountAtBlockIDRequest;\n}\n\nexport namespace GetAccountAtBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    address: Uint8Array | string,\n  }\n}\n\nexport class GetAccountAtBlockIDResponse extends jspb.Message {\n  hasAccount(): boolean;\n  clearAccount(): void;\n  getAccount(): flow_entities_account_pb.Account | undefined;\n  setAccount(value?: flow_entities_account_pb.Account): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetAccountAtBlockIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetAccountAtBlockIDResponse): GetAccountAtBlockIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetAccountAtBlockIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetAccountAtBlockIDResponse;\n  static deserializeBinaryFromReader(message: GetAccountAtBlockIDResponse, reader: jspb.BinaryReader): GetAccountAtBlockIDResponse;\n}\n\nexport namespace GetAccountAtBlockIDResponse {\n  export type AsObject = {\n    account?: flow_entities_account_pb.Account.AsObject,\n  }\n}\n\nexport class ExecuteScriptAtBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getScript(): Uint8Array | string;\n  getScript_asU8(): Uint8Array;\n  getScript_asB64(): string;\n  setScript(value: Uint8Array | string): void;\n\n  clearArgumentsList(): void;\n  getArgumentsList(): Array<Uint8Array | string>;\n  getArgumentsList_asU8(): Array<Uint8Array>;\n  getArgumentsList_asB64(): Array<string>;\n  setArgumentsList(value: Array<Uint8Array | string>): void;\n  addArguments(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptAtBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptAtBlockIDRequest): ExecuteScriptAtBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptAtBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptAtBlockIDRequest;\n  static deserializeBinaryFromReader(message: ExecuteScriptAtBlockIDRequest, reader: jspb.BinaryReader): ExecuteScriptAtBlockIDRequest;\n}\n\nexport namespace ExecuteScriptAtBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    script: Uint8Array | string,\n    argumentsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class ExecuteScriptAtBlockIDResponse extends jspb.Message {\n  getValue(): Uint8Array | string;\n  getValue_asU8(): Uint8Array;\n  getValue_asB64(): string;\n  setValue(value: Uint8Array | string): void;\n\n  getComputationUsage(): number;\n  setComputationUsage(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): ExecuteScriptAtBlockIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: ExecuteScriptAtBlockIDResponse): ExecuteScriptAtBlockIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: ExecuteScriptAtBlockIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): ExecuteScriptAtBlockIDResponse;\n  static deserializeBinaryFromReader(message: ExecuteScriptAtBlockIDResponse, reader: jspb.BinaryReader): ExecuteScriptAtBlockIDResponse;\n}\n\nexport namespace ExecuteScriptAtBlockIDResponse {\n  export type AsObject = {\n    value: Uint8Array | string,\n    computationUsage: number,\n  }\n}\n\nexport class GetEventsForBlockIDsResponse extends jspb.Message {\n  clearResultsList(): void;\n  getResultsList(): Array<GetEventsForBlockIDsResponse.Result>;\n  setResultsList(value: Array<GetEventsForBlockIDsResponse.Result>): void;\n  addResults(value?: GetEventsForBlockIDsResponse.Result, index?: number): GetEventsForBlockIDsResponse.Result;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetEventsForBlockIDsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetEventsForBlockIDsResponse): GetEventsForBlockIDsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetEventsForBlockIDsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetEventsForBlockIDsResponse;\n  static deserializeBinaryFromReader(message: GetEventsForBlockIDsResponse, reader: jspb.BinaryReader): GetEventsForBlockIDsResponse;\n}\n\nexport namespace GetEventsForBlockIDsResponse {\n  export type AsObject = {\n    resultsList: Array<GetEventsForBlockIDsResponse.Result.AsObject>,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n\n  export class Result extends jspb.Message {\n    getBlockId(): Uint8Array | string;\n    getBlockId_asU8(): Uint8Array;\n    getBlockId_asB64(): string;\n    setBlockId(value: Uint8Array | string): void;\n\n    getBlockHeight(): number;\n    setBlockHeight(value: number): void;\n\n    clearEventsList(): void;\n    getEventsList(): Array<flow_entities_event_pb.Event>;\n    setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n    addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): Result.AsObject;\n    static toObject(includeInstance: boolean, msg: Result): Result.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n    static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): Result;\n    static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;\n  }\n\n  export namespace Result {\n    export type AsObject = {\n      blockId: Uint8Array | string,\n      blockHeight: number,\n      eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n    }\n  }\n}\n\nexport class GetEventsForBlockIDsRequest extends jspb.Message {\n  getType(): string;\n  setType(value: string): void;\n\n  clearBlockIdsList(): void;\n  getBlockIdsList(): Array<Uint8Array | string>;\n  getBlockIdsList_asU8(): Array<Uint8Array>;\n  getBlockIdsList_asB64(): Array<string>;\n  setBlockIdsList(value: Array<Uint8Array | string>): void;\n  addBlockIds(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetEventsForBlockIDsRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetEventsForBlockIDsRequest): GetEventsForBlockIDsRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetEventsForBlockIDsRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetEventsForBlockIDsRequest;\n  static deserializeBinaryFromReader(message: GetEventsForBlockIDsRequest, reader: jspb.BinaryReader): GetEventsForBlockIDsRequest;\n}\n\nexport namespace GetEventsForBlockIDsRequest {\n  export type AsObject = {\n    type: string,\n    blockIdsList: Array<Uint8Array | string>,\n  }\n}\n\nexport class GetTransactionResultRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionResultRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionResultRequest): GetTransactionResultRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionResultRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionResultRequest;\n  static deserializeBinaryFromReader(message: GetTransactionResultRequest, reader: jspb.BinaryReader): GetTransactionResultRequest;\n}\n\nexport namespace GetTransactionResultRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    transactionId: Uint8Array | string,\n  }\n}\n\nexport class GetTransactionByIndexRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getIndex(): number;\n  setIndex(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionByIndexRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionByIndexRequest): GetTransactionByIndexRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionByIndexRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionByIndexRequest;\n  static deserializeBinaryFromReader(message: GetTransactionByIndexRequest, reader: jspb.BinaryReader): GetTransactionByIndexRequest;\n}\n\nexport namespace GetTransactionByIndexRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    index: number,\n  }\n}\n\nexport class GetTransactionResultResponse extends jspb.Message {\n  getStatusCode(): number;\n  setStatusCode(value: number): void;\n\n  getErrorMessage(): string;\n  setErrorMessage(value: string): void;\n\n  clearEventsList(): void;\n  getEventsList(): Array<flow_entities_event_pb.Event>;\n  setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n  addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  getComputationUsage(): number;\n  setComputationUsage(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionResultResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionResultResponse): GetTransactionResultResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionResultResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionResultResponse;\n  static deserializeBinaryFromReader(message: GetTransactionResultResponse, reader: jspb.BinaryReader): GetTransactionResultResponse;\n}\n\nexport namespace GetTransactionResultResponse {\n  export type AsObject = {\n    statusCode: number,\n    errorMessage: string,\n    eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n    computationUsage: number,\n  }\n}\n\nexport class GetTransactionsByBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionsByBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionsByBlockIDRequest): GetTransactionsByBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionsByBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionsByBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetTransactionsByBlockIDRequest, reader: jspb.BinaryReader): GetTransactionsByBlockIDRequest;\n}\n\nexport namespace GetTransactionsByBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n  }\n}\n\nexport class GetTransactionResultsResponse extends jspb.Message {\n  clearTransactionResultsList(): void;\n  getTransactionResultsList(): Array<GetTransactionResultResponse>;\n  setTransactionResultsList(value: Array<GetTransactionResultResponse>): void;\n  addTransactionResults(value?: GetTransactionResultResponse, index?: number): GetTransactionResultResponse;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionResultsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionResultsResponse): GetTransactionResultsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionResultsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionResultsResponse;\n  static deserializeBinaryFromReader(message: GetTransactionResultsResponse, reader: jspb.BinaryReader): GetTransactionResultsResponse;\n}\n\nexport namespace GetTransactionResultsResponse {\n  export type AsObject = {\n    transactionResultsList: Array<GetTransactionResultResponse.AsObject>,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetTransactionErrorMessageRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionErrorMessageRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionErrorMessageRequest): GetTransactionErrorMessageRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionErrorMessageRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionErrorMessageRequest;\n  static deserializeBinaryFromReader(message: GetTransactionErrorMessageRequest, reader: jspb.BinaryReader): GetTransactionErrorMessageRequest;\n}\n\nexport namespace GetTransactionErrorMessageRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    transactionId: Uint8Array | string,\n  }\n}\n\nexport class GetTransactionErrorMessageByIndexRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getIndex(): number;\n  setIndex(value: number): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionErrorMessageByIndexRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionErrorMessageByIndexRequest): GetTransactionErrorMessageByIndexRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionErrorMessageByIndexRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionErrorMessageByIndexRequest;\n  static deserializeBinaryFromReader(message: GetTransactionErrorMessageByIndexRequest, reader: jspb.BinaryReader): GetTransactionErrorMessageByIndexRequest;\n}\n\nexport namespace GetTransactionErrorMessageByIndexRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    index: number,\n  }\n}\n\nexport class GetTransactionErrorMessageResponse extends jspb.Message {\n  getTransactionId(): Uint8Array | string;\n  getTransactionId_asU8(): Uint8Array;\n  getTransactionId_asB64(): string;\n  setTransactionId(value: Uint8Array | string): void;\n\n  getErrorMessage(): string;\n  setErrorMessage(value: string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionErrorMessageResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionErrorMessageResponse): GetTransactionErrorMessageResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionErrorMessageResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionErrorMessageResponse;\n  static deserializeBinaryFromReader(message: GetTransactionErrorMessageResponse, reader: jspb.BinaryReader): GetTransactionErrorMessageResponse;\n}\n\nexport namespace GetTransactionErrorMessageResponse {\n  export type AsObject = {\n    transactionId: Uint8Array | string,\n    errorMessage: string,\n  }\n}\n\nexport class GetTransactionErrorMessagesByBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionErrorMessagesByBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionErrorMessagesByBlockIDRequest): GetTransactionErrorMessagesByBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionErrorMessagesByBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionErrorMessagesByBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetTransactionErrorMessagesByBlockIDRequest, reader: jspb.BinaryReader): GetTransactionErrorMessagesByBlockIDRequest;\n}\n\nexport namespace GetTransactionErrorMessagesByBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n  }\n}\n\nexport class GetTransactionErrorMessagesResponse extends jspb.Message {\n  clearResultsList(): void;\n  getResultsList(): Array<GetTransactionErrorMessagesResponse.Result>;\n  setResultsList(value: Array<GetTransactionErrorMessagesResponse.Result>): void;\n  addResults(value?: GetTransactionErrorMessagesResponse.Result, index?: number): GetTransactionErrorMessagesResponse.Result;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetTransactionErrorMessagesResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetTransactionErrorMessagesResponse): GetTransactionErrorMessagesResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetTransactionErrorMessagesResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetTransactionErrorMessagesResponse;\n  static deserializeBinaryFromReader(message: GetTransactionErrorMessagesResponse, reader: jspb.BinaryReader): GetTransactionErrorMessagesResponse;\n}\n\nexport namespace GetTransactionErrorMessagesResponse {\n  export type AsObject = {\n    resultsList: Array<GetTransactionErrorMessagesResponse.Result.AsObject>,\n  }\n\n  export class Result extends jspb.Message {\n    getTransactionId(): Uint8Array | string;\n    getTransactionId_asU8(): Uint8Array;\n    getTransactionId_asB64(): string;\n    setTransactionId(value: Uint8Array | string): void;\n\n    getIndex(): number;\n    setIndex(value: number): void;\n\n    getErrorMessage(): string;\n    setErrorMessage(value: string): void;\n\n    serializeBinary(): Uint8Array;\n    toObject(includeInstance?: boolean): Result.AsObject;\n    static toObject(includeInstance: boolean, msg: Result): Result.AsObject;\n    static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n    static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n    static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;\n    static deserializeBinary(bytes: Uint8Array): Result;\n    static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;\n  }\n\n  export namespace Result {\n    export type AsObject = {\n      transactionId: Uint8Array | string,\n      index: number,\n      errorMessage: string,\n    }\n  }\n}\n\nexport class GetRegisterAtBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getRegisterOwner(): Uint8Array | string;\n  getRegisterOwner_asU8(): Uint8Array;\n  getRegisterOwner_asB64(): string;\n  setRegisterOwner(value: Uint8Array | string): void;\n\n  getRegisterKey(): Uint8Array | string;\n  getRegisterKey_asU8(): Uint8Array;\n  getRegisterKey_asB64(): string;\n  setRegisterKey(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetRegisterAtBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetRegisterAtBlockIDRequest): GetRegisterAtBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetRegisterAtBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetRegisterAtBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetRegisterAtBlockIDRequest, reader: jspb.BinaryReader): GetRegisterAtBlockIDRequest;\n}\n\nexport namespace GetRegisterAtBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    registerOwner: Uint8Array | string,\n    registerKey: Uint8Array | string,\n  }\n}\n\nexport class GetRegisterAtBlockIDResponse extends jspb.Message {\n  getValue(): Uint8Array | string;\n  getValue_asU8(): Uint8Array;\n  getValue_asB64(): string;\n  setValue(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetRegisterAtBlockIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetRegisterAtBlockIDResponse): GetRegisterAtBlockIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetRegisterAtBlockIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetRegisterAtBlockIDResponse;\n  static deserializeBinaryFromReader(message: GetRegisterAtBlockIDResponse, reader: jspb.BinaryReader): GetRegisterAtBlockIDResponse;\n}\n\nexport namespace GetRegisterAtBlockIDResponse {\n  export type AsObject = {\n    value: Uint8Array | string,\n  }\n}\n\nexport class GetLatestBlockHeaderRequest extends jspb.Message {\n  getIsSealed(): boolean;\n  setIsSealed(value: boolean): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetLatestBlockHeaderRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetLatestBlockHeaderRequest): GetLatestBlockHeaderRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetLatestBlockHeaderRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetLatestBlockHeaderRequest;\n  static deserializeBinaryFromReader(message: GetLatestBlockHeaderRequest, reader: jspb.BinaryReader): GetLatestBlockHeaderRequest;\n}\n\nexport namespace GetLatestBlockHeaderRequest {\n  export type AsObject = {\n    isSealed: boolean,\n  }\n}\n\nexport class GetBlockHeaderByIDRequest extends jspb.Message {\n  getId(): Uint8Array | string;\n  getId_asU8(): Uint8Array;\n  getId_asB64(): string;\n  setId(value: Uint8Array | string): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetBlockHeaderByIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetBlockHeaderByIDRequest): GetBlockHeaderByIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetBlockHeaderByIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetBlockHeaderByIDRequest;\n  static deserializeBinaryFromReader(message: GetBlockHeaderByIDRequest, reader: jspb.BinaryReader): GetBlockHeaderByIDRequest;\n}\n\nexport namespace GetBlockHeaderByIDRequest {\n  export type AsObject = {\n    id: Uint8Array | string,\n  }\n}\n\nexport class BlockHeaderResponse extends jspb.Message {\n  hasBlock(): boolean;\n  clearBlock(): void;\n  getBlock(): flow_entities_block_header_pb.BlockHeader | undefined;\n  setBlock(value?: flow_entities_block_header_pb.BlockHeader): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): BlockHeaderResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: BlockHeaderResponse): BlockHeaderResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: BlockHeaderResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): BlockHeaderResponse;\n  static deserializeBinaryFromReader(message: BlockHeaderResponse, reader: jspb.BinaryReader): BlockHeaderResponse;\n}\n\nexport namespace BlockHeaderResponse {\n  export type AsObject = {\n    block?: flow_entities_block_header_pb.BlockHeader.AsObject,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/execution/execution_pb.js",
    "content": "// source: flow/execution/execution.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar flow_entities_account_pb = require('../../flow/entities/account_pb.js');\ngoog.object.extend(proto, flow_entities_account_pb);\nvar flow_entities_block_header_pb = require('../../flow/entities/block_header_pb.js');\ngoog.object.extend(proto, flow_entities_block_header_pb);\nvar flow_entities_event_pb = require('../../flow/entities/event_pb.js');\ngoog.object.extend(proto, flow_entities_event_pb);\nvar flow_entities_transaction_pb = require('../../flow/entities/transaction_pb.js');\ngoog.object.extend(proto, flow_entities_transaction_pb);\ngoog.exportSymbol('proto.flow.execution.BlockHeaderResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.ExecuteScriptAtBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.ExecuteScriptAtBlockIDResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetAccountAtBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetAccountAtBlockIDResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetBlockHeaderByIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetEventsForBlockIDsResponse.Result', null, global);\ngoog.exportSymbol('proto.flow.execution.GetLatestBlockHeaderRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetRegisterAtBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetRegisterAtBlockIDResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionByIndexRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessageByIndexRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessageRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessageResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessagesResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionErrorMessagesResponse.Result', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionResultRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionResultResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionResultsResponse', null, global);\ngoog.exportSymbol('proto.flow.execution.GetTransactionsByBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.PingRequest', null, global);\ngoog.exportSymbol('proto.flow.execution.PingResponse', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.PingRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.PingRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.PingRequest.displayName = 'proto.flow.execution.PingRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.PingResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.PingResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.PingResponse.displayName = 'proto.flow.execution.PingResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetAccountAtBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetAccountAtBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetAccountAtBlockIDRequest.displayName = 'proto.flow.execution.GetAccountAtBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetAccountAtBlockIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetAccountAtBlockIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetAccountAtBlockIDResponse.displayName = 'proto.flow.execution.GetAccountAtBlockIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.ExecuteScriptAtBlockIDRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.ExecuteScriptAtBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.ExecuteScriptAtBlockIDRequest.displayName = 'proto.flow.execution.ExecuteScriptAtBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.ExecuteScriptAtBlockIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.ExecuteScriptAtBlockIDResponse.displayName = 'proto.flow.execution.ExecuteScriptAtBlockIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetEventsForBlockIDsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetEventsForBlockIDsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetEventsForBlockIDsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetEventsForBlockIDsResponse.displayName = 'proto.flow.execution.GetEventsForBlockIDsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetEventsForBlockIDsResponse.Result.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetEventsForBlockIDsResponse.Result, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetEventsForBlockIDsResponse.Result.displayName = 'proto.flow.execution.GetEventsForBlockIDsResponse.Result';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetEventsForBlockIDsRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetEventsForBlockIDsRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetEventsForBlockIDsRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetEventsForBlockIDsRequest.displayName = 'proto.flow.execution.GetEventsForBlockIDsRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionResultRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionResultRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionResultRequest.displayName = 'proto.flow.execution.GetTransactionResultRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionByIndexRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionByIndexRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionByIndexRequest.displayName = 'proto.flow.execution.GetTransactionByIndexRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionResultResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetTransactionResultResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionResultResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionResultResponse.displayName = 'proto.flow.execution.GetTransactionResultResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionsByBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionsByBlockIDRequest.displayName = 'proto.flow.execution.GetTransactionsByBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionResultsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetTransactionResultsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionResultsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionResultsResponse.displayName = 'proto.flow.execution.GetTransactionResultsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessageRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessageRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessageRequest.displayName = 'proto.flow.execution.GetTransactionErrorMessageRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessageByIndexRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessageByIndexRequest.displayName = 'proto.flow.execution.GetTransactionErrorMessageByIndexRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessageResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessageResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessageResponse.displayName = 'proto.flow.execution.GetTransactionErrorMessageResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.displayName = 'proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.execution.GetTransactionErrorMessagesResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessagesResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessagesResponse.displayName = 'proto.flow.execution.GetTransactionErrorMessagesResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetTransactionErrorMessagesResponse.Result, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetTransactionErrorMessagesResponse.Result.displayName = 'proto.flow.execution.GetTransactionErrorMessagesResponse.Result';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetRegisterAtBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetRegisterAtBlockIDRequest.displayName = 'proto.flow.execution.GetRegisterAtBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetRegisterAtBlockIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetRegisterAtBlockIDResponse.displayName = 'proto.flow.execution.GetRegisterAtBlockIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetLatestBlockHeaderRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetLatestBlockHeaderRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetLatestBlockHeaderRequest.displayName = 'proto.flow.execution.GetLatestBlockHeaderRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.GetBlockHeaderByIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.GetBlockHeaderByIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.GetBlockHeaderByIDRequest.displayName = 'proto.flow.execution.GetBlockHeaderByIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.execution.BlockHeaderResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.execution.BlockHeaderResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.execution.BlockHeaderResponse.displayName = 'proto.flow.execution.BlockHeaderResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.PingRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.PingRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.PingRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.PingRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.PingRequest}\n */\nproto.flow.execution.PingRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.PingRequest;\n  return proto.flow.execution.PingRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.PingRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.PingRequest}\n */\nproto.flow.execution.PingRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.PingRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.PingRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.PingRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.PingRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.PingResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.PingResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.PingResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.PingResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.PingResponse}\n */\nproto.flow.execution.PingResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.PingResponse;\n  return proto.flow.execution.PingResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.PingResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.PingResponse}\n */\nproto.flow.execution.PingResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.PingResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.PingResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.PingResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.PingResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetAccountAtBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetAccountAtBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    address: msg.getAddress_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetAccountAtBlockIDRequest}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetAccountAtBlockIDRequest;\n  return proto.flow.execution.GetAccountAtBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetAccountAtBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetAccountAtBlockIDRequest}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetAccountAtBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetAccountAtBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getAddress_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetAccountAtBlockIDRequest} returns this\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes address = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getAddress = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes address = 2;\n * This is a type-conversion wrapper around `getAddress()`\n * @return {string}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getAddress_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getAddress()));\n};\n\n\n/**\n * optional bytes address = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getAddress()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.getAddress_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getAddress()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetAccountAtBlockIDRequest} returns this\n */\nproto.flow.execution.GetAccountAtBlockIDRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetAccountAtBlockIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetAccountAtBlockIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    account: (f = msg.getAccount()) && flow_entities_account_pb.Account.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetAccountAtBlockIDResponse}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetAccountAtBlockIDResponse;\n  return proto.flow.execution.GetAccountAtBlockIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetAccountAtBlockIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetAccountAtBlockIDResponse}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_account_pb.Account;\n      reader.readMessage(value,flow_entities_account_pb.Account.deserializeBinaryFromReader);\n      msg.setAccount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetAccountAtBlockIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetAccountAtBlockIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAccount();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_account_pb.Account.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.Account account = 1;\n * @return {?proto.flow.entities.Account}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.getAccount = function() {\n  return /** @type{?proto.flow.entities.Account} */ (\n    jspb.Message.getWrapperField(this, flow_entities_account_pb.Account, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.Account|undefined} value\n * @return {!proto.flow.execution.GetAccountAtBlockIDResponse} returns this\n*/\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.setAccount = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.execution.GetAccountAtBlockIDResponse} returns this\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.clearAccount = function() {\n  return this.setAccount(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.execution.GetAccountAtBlockIDResponse.prototype.hasAccount = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.ExecuteScriptAtBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    script: msg.getScript_asB64(),\n    argumentsList: msg.getArgumentsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.ExecuteScriptAtBlockIDRequest;\n  return proto.flow.execution.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setScript(value);\n      break;\n    case 3:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addArguments(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getScript_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getArgumentsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes script = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getScript = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes script = 2;\n * This is a type-conversion wrapper around `getScript()`\n * @return {string}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getScript_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getScript()));\n};\n\n\n/**\n * optional bytes script = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getScript()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getScript_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getScript()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.setScript = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<string>}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getArgumentsList()));\n};\n\n\n/**\n * repeated bytes arguments = 3;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getArgumentsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.getArgumentsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getArgumentsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.setArgumentsList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.addArguments = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDRequest} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDRequest.prototype.clearArgumentsList = function() {\n  return this.setArgumentsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.ExecuteScriptAtBlockIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    value: msg.getValue_asB64(),\n    computationUsage: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDResponse}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.ExecuteScriptAtBlockIDResponse;\n  return proto.flow.execution.ExecuteScriptAtBlockIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDResponse}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setValue(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setComputationUsage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.ExecuteScriptAtBlockIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.ExecuteScriptAtBlockIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValue_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getComputationUsage();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes value = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.getValue = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes value = 1;\n * This is a type-conversion wrapper around `getValue()`\n * @return {string}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.getValue_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getValue()));\n};\n\n\n/**\n * optional bytes value = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValue()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.getValue_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getValue()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDResponse} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.setValue = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 computation_usage = 2;\n * @return {number}\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.getComputationUsage = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.ExecuteScriptAtBlockIDResponse} returns this\n */\nproto.flow.execution.ExecuteScriptAtBlockIDResponse.prototype.setComputationUsage = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetEventsForBlockIDsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    resultsList: jspb.Message.toObjectList(msg.getResultsList(),\n    proto.flow.execution.GetEventsForBlockIDsResponse.Result.toObject, includeInstance),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetEventsForBlockIDsResponse;\n  return proto.flow.execution.GetEventsForBlockIDsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.execution.GetEventsForBlockIDsResponse.Result;\n      reader.readMessage(value,proto.flow.execution.GetEventsForBlockIDsResponse.Result.deserializeBinaryFromReader);\n      msg.addResults(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetEventsForBlockIDsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.execution.GetEventsForBlockIDsResponse.Result.serializeBinaryToWriter\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetEventsForBlockIDsResponse.Result.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetEventsForBlockIDsResponse.Result;\n  return proto.flow.execution.GetEventsForBlockIDsResponse.Result.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 3:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetEventsForBlockIDsResponse.Result.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 block_height = 2;\n * @return {number}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * repeated flow.entities.Event events = 3;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} returns this\n*/\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.Result.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * repeated Result results = 1;\n * @return {!Array<!proto.flow.execution.GetEventsForBlockIDsResponse.Result>}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.getResultsList = function() {\n  return /** @type{!Array<!proto.flow.execution.GetEventsForBlockIDsResponse.Result>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.execution.GetEventsForBlockIDsResponse.Result, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.execution.GetEventsForBlockIDsResponse.Result>} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse} returns this\n*/\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.setResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.execution.GetEventsForBlockIDsResponse.Result=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse.Result}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.addResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.execution.GetEventsForBlockIDsResponse.Result, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.clearResultsList = function() {\n  return this.setResultsList([]);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 2;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsResponse} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsResponse.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetEventsForBlockIDsRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetEventsForBlockIDsRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    type: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n    blockIdsList: msg.getBlockIdsList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetEventsForBlockIDsRequest;\n  return proto.flow.execution.GetEventsForBlockIDsRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetEventsForBlockIDsRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addBlockIds(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetEventsForBlockIDsRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetEventsForBlockIDsRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getBlockIdsList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string type = 1;\n * @return {string}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.getType = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.setType = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.getBlockIdsList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * This is a type-conversion wrapper around `getBlockIdsList()`\n * @return {!Array<string>}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getBlockIdsList()));\n};\n\n\n/**\n * repeated bytes block_ids = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockIdsList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.getBlockIdsList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getBlockIdsList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.setBlockIdsList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.addBlockIds = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetEventsForBlockIDsRequest} returns this\n */\nproto.flow.execution.GetEventsForBlockIDsRequest.prototype.clearBlockIdsList = function() {\n  return this.setBlockIdsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionResultRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionResultRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    transactionId: msg.getTransactionId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionResultRequest}\n */\nproto.flow.execution.GetTransactionResultRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionResultRequest;\n  return proto.flow.execution.GetTransactionResultRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionResultRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionResultRequest}\n */\nproto.flow.execution.GetTransactionResultRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionResultRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionResultRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionResultRequest} returns this\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionResultRequest} returns this\n */\nproto.flow.execution.GetTransactionResultRequest.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionByIndexRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionByIndexRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionByIndexRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    index: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionByIndexRequest}\n */\nproto.flow.execution.GetTransactionByIndexRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionByIndexRequest;\n  return proto.flow.execution.GetTransactionByIndexRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionByIndexRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionByIndexRequest}\n */\nproto.flow.execution.GetTransactionByIndexRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setIndex(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionByIndexRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionByIndexRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionByIndexRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionByIndexRequest} returns this\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 index = 2;\n * @return {number}\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetTransactionByIndexRequest} returns this\n */\nproto.flow.execution.GetTransactionByIndexRequest.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetTransactionResultResponse.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionResultResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionResultResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    statusCode: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    errorMessage: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    computationUsage: jspb.Message.getFieldWithDefault(msg, 5, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionResultResponse}\n */\nproto.flow.execution.GetTransactionResultResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionResultResponse;\n  return proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionResultResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionResultResponse}\n */\nproto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setStatusCode(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setErrorMessage(value);\n      break;\n    case 3:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    case 4:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setComputationUsage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionResultResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStatusCode();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getErrorMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      4,\n      f\n    );\n  }\n  f = message.getComputationUsage();\n  if (f !== 0) {\n    writer.writeUint64(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 status_code = 1;\n * @return {number}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.getStatusCode = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.setStatusCode = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string error_message = 2;\n * @return {string}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.getErrorMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.setErrorMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * repeated flow.entities.Event events = 3;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n*/\nproto.flow.execution.GetTransactionResultResponse.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 4;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 4, value);\n};\n\n\n/**\n * optional uint64 computation_usage = 5;\n * @return {number}\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.getComputationUsage = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetTransactionResultResponse} returns this\n */\nproto.flow.execution.GetTransactionResultResponse.prototype.setComputationUsage = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionsByBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionsByBlockIDRequest;\n  return proto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionsByBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionsByBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionsByBlockIDRequest} returns this\n */\nproto.flow.execution.GetTransactionsByBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetTransactionResultsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionResultsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionResultsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionResultsList: jspb.Message.toObjectList(msg.getTransactionResultsList(),\n    proto.flow.execution.GetTransactionResultResponse.toObject, includeInstance),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionResultsResponse}\n */\nproto.flow.execution.GetTransactionResultsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionResultsResponse;\n  return proto.flow.execution.GetTransactionResultsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionResultsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionResultsResponse}\n */\nproto.flow.execution.GetTransactionResultsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.execution.GetTransactionResultResponse;\n      reader.readMessage(value,proto.flow.execution.GetTransactionResultResponse.deserializeBinaryFromReader);\n      msg.addTransactionResults(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionResultsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionResultsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionResultsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.execution.GetTransactionResultResponse.serializeBinaryToWriter\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated GetTransactionResultResponse transaction_results = 1;\n * @return {!Array<!proto.flow.execution.GetTransactionResultResponse>}\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.getTransactionResultsList = function() {\n  return /** @type{!Array<!proto.flow.execution.GetTransactionResultResponse>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.execution.GetTransactionResultResponse, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.execution.GetTransactionResultResponse>} value\n * @return {!proto.flow.execution.GetTransactionResultsResponse} returns this\n*/\nproto.flow.execution.GetTransactionResultsResponse.prototype.setTransactionResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.execution.GetTransactionResultResponse=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.execution.GetTransactionResultResponse}\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.addTransactionResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.execution.GetTransactionResultResponse, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetTransactionResultsResponse} returns this\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.clearTransactionResultsList = function() {\n  return this.setTransactionResultsList([]);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 2;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.execution.GetTransactionResultsResponse} returns this\n */\nproto.flow.execution.GetTransactionResultsResponse.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessageRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessageRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    transactionId: msg.getTransactionId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessageRequest}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessageRequest;\n  return proto.flow.execution.GetTransactionErrorMessageRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessageRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessageRequest}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessageRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessageRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageRequest} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageRequest} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageRequest.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessageByIndexRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    index: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessageByIndexRequest;\n  return proto.flow.execution.GetTransactionErrorMessageByIndexRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setIndex(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessageByIndexRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 index = 2;\n * @return {number}\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageByIndexRequest} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageByIndexRequest.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessageResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessageResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionId: msg.getTransactionId_asB64(),\n    errorMessage: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessageResponse}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessageResponse;\n  return proto.flow.execution.GetTransactionErrorMessageResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessageResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessageResponse}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setErrorMessage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessageResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessageResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getErrorMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageResponse} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional string error_message = 2;\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.getErrorMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.execution.GetTransactionErrorMessageResponse} returns this\n */\nproto.flow.execution.GetTransactionErrorMessageResponse.prototype.setErrorMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest;\n  return proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest} returns this\n */\nproto.flow.execution.GetTransactionErrorMessagesByBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessagesResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    resultsList: jspb.Message.toObjectList(msg.getResultsList(),\n    proto.flow.execution.GetTransactionErrorMessagesResponse.Result.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessagesResponse;\n  return proto.flow.execution.GetTransactionErrorMessagesResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.flow.execution.GetTransactionErrorMessagesResponse.Result;\n      reader.readMessage(value,proto.flow.execution.GetTransactionErrorMessagesResponse.Result.deserializeBinaryFromReader);\n      msg.addResults(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessagesResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getResultsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.flow.execution.GetTransactionErrorMessagesResponse.Result.serializeBinaryToWriter\n    );\n  }\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetTransactionErrorMessagesResponse.Result.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    transactionId: msg.getTransactionId_asB64(),\n    index: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    errorMessage: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetTransactionErrorMessagesResponse.Result;\n  return proto.flow.execution.GetTransactionErrorMessagesResponse.Result.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setTransactionId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setIndex(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readString());\n      msg.setErrorMessage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetTransactionErrorMessagesResponse.Result.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getIndex();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getErrorMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.getTransactionId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.getTransactionId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getTransactionId()));\n};\n\n\n/**\n * optional bytes transaction_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getTransactionId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.getTransactionId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getTransactionId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} returns this\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint32 index = 2;\n * @return {number}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.getIndex = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} returns this\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.setIndex = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional string error_message = 3;\n * @return {string}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.getErrorMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result} returns this\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.Result.prototype.setErrorMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * repeated Result results = 1;\n * @return {!Array<!proto.flow.execution.GetTransactionErrorMessagesResponse.Result>}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.getResultsList = function() {\n  return /** @type{!Array<!proto.flow.execution.GetTransactionErrorMessagesResponse.Result>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.flow.execution.GetTransactionErrorMessagesResponse.Result, 1));\n};\n\n\n/**\n * @param {!Array<!proto.flow.execution.GetTransactionErrorMessagesResponse.Result>} value\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse} returns this\n*/\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.setResultsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse.Result}\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.addResults = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.flow.execution.GetTransactionErrorMessagesResponse.Result, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.execution.GetTransactionErrorMessagesResponse} returns this\n */\nproto.flow.execution.GetTransactionErrorMessagesResponse.prototype.clearResultsList = function() {\n  return this.setResultsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetRegisterAtBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    registerOwner: msg.getRegisterOwner_asB64(),\n    registerKey: msg.getRegisterKey_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetRegisterAtBlockIDRequest;\n  return proto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setRegisterOwner(value);\n      break;\n    case 4:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setRegisterKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetRegisterAtBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetRegisterAtBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getRegisterOwner_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      2,\n      f\n    );\n  }\n  f = message.getRegisterKey_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional bytes register_owner = 2;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * optional bytes register_owner = 2;\n * This is a type-conversion wrapper around `getRegisterOwner()`\n * @return {string}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getRegisterOwner()));\n};\n\n\n/**\n * optional bytes register_owner = 2;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getRegisterOwner()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterOwner_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getRegisterOwner()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setRegisterOwner = function(value) {\n  return jspb.Message.setProto3BytesField(this, 2, value);\n};\n\n\n/**\n * optional bytes register_key = 4;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * optional bytes register_key = 4;\n * This is a type-conversion wrapper around `getRegisterKey()`\n * @return {string}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getRegisterKey()));\n};\n\n\n/**\n * optional bytes register_key = 4;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getRegisterKey()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.getRegisterKey_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getRegisterKey()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetRegisterAtBlockIDRequest} returns this\n */\nproto.flow.execution.GetRegisterAtBlockIDRequest.prototype.setRegisterKey = function(value) {\n  return jspb.Message.setProto3BytesField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetRegisterAtBlockIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    value: msg.getValue_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetRegisterAtBlockIDResponse;\n  return proto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setValue(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetRegisterAtBlockIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetRegisterAtBlockIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValue_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes value = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes value = 1;\n * This is a type-conversion wrapper around `getValue()`\n * @return {string}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getValue()));\n};\n\n\n/**\n * optional bytes value = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValue()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.getValue_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getValue()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetRegisterAtBlockIDResponse} returns this\n */\nproto.flow.execution.GetRegisterAtBlockIDResponse.prototype.setValue = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetLatestBlockHeaderRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    isSealed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetLatestBlockHeaderRequest}\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetLatestBlockHeaderRequest;\n  return proto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetLatestBlockHeaderRequest}\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsSealed(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetLatestBlockHeaderRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetLatestBlockHeaderRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIsSealed();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool is_sealed = 1;\n * @return {boolean}\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.prototype.getIsSealed = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.flow.execution.GetLatestBlockHeaderRequest} returns this\n */\nproto.flow.execution.GetLatestBlockHeaderRequest.prototype.setIsSealed = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.GetBlockHeaderByIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    id: msg.getId_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.GetBlockHeaderByIDRequest}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.GetBlockHeaderByIDRequest;\n  return proto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.GetBlockHeaderByIDRequest}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.GetBlockHeaderByIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.GetBlockHeaderByIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes id = 1;\n * This is a type-conversion wrapper around `getId()`\n * @return {string}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getId()));\n};\n\n\n/**\n * optional bytes id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getId()`\n * @return {!Uint8Array}\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.getId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.execution.GetBlockHeaderByIDRequest} returns this\n */\nproto.flow.execution.GetBlockHeaderByIDRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.execution.BlockHeaderResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.execution.BlockHeaderResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.execution.BlockHeaderResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.BlockHeaderResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    block: (f = msg.getBlock()) && flow_entities_block_header_pb.BlockHeader.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.execution.BlockHeaderResponse}\n */\nproto.flow.execution.BlockHeaderResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.execution.BlockHeaderResponse;\n  return proto.flow.execution.BlockHeaderResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.execution.BlockHeaderResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.execution.BlockHeaderResponse}\n */\nproto.flow.execution.BlockHeaderResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_header_pb.BlockHeader;\n      reader.readMessage(value,flow_entities_block_header_pb.BlockHeader.deserializeBinaryFromReader);\n      msg.setBlock(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.execution.BlockHeaderResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.execution.BlockHeaderResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.execution.BlockHeaderResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.execution.BlockHeaderResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlock();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_header_pb.BlockHeader.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockHeader block = 1;\n * @return {?proto.flow.entities.BlockHeader}\n */\nproto.flow.execution.BlockHeaderResponse.prototype.getBlock = function() {\n  return /** @type{?proto.flow.entities.BlockHeader} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_header_pb.BlockHeader, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockHeader|undefined} value\n * @return {!proto.flow.execution.BlockHeaderResponse} returns this\n*/\nproto.flow.execution.BlockHeaderResponse.prototype.setBlock = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.execution.BlockHeaderResponse} returns this\n */\nproto.flow.execution.BlockHeaderResponse.prototype.clearBlock = function() {\n  return this.setBlock(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.execution.BlockHeaderResponse.prototype.hasBlock = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\ngoog.object.extend(exports, proto.flow.execution);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts",
    "content": "// package: flow.execution\n// file: flow/execution/execution.proto\n\nimport * as flow_execution_execution_pb from \"../../flow/execution/execution_pb\";\nimport {grpc} from \"@improbable-eng/grpc-web\";\n\ntype ExecutionAPIPing = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.PingRequest;\n  readonly responseType: typeof flow_execution_execution_pb.PingResponse;\n};\n\ntype ExecutionAPIGetAccountAtBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetAccountAtBlockIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetAccountAtBlockIDResponse;\n};\n\ntype ExecutionAPIExecuteScriptAtBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.ExecuteScriptAtBlockIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.ExecuteScriptAtBlockIDResponse;\n};\n\ntype ExecutionAPIGetEventsForBlockIDs = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetEventsForBlockIDsRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetEventsForBlockIDsResponse;\n};\n\ntype ExecutionAPIGetTransactionResult = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionResultRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultResponse;\n};\n\ntype ExecutionAPIGetTransactionResultByIndex = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionByIndexRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultResponse;\n};\n\ntype ExecutionAPIGetTransactionResultsByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionsByBlockIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionResultsResponse;\n};\n\ntype ExecutionAPIGetTransactionErrorMessage = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionErrorMessageRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionErrorMessageResponse;\n};\n\ntype ExecutionAPIGetTransactionErrorMessageByIndex = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionErrorMessageByIndexRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionErrorMessageResponse;\n};\n\ntype ExecutionAPIGetTransactionErrorMessagesByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetTransactionErrorMessagesByBlockIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetTransactionErrorMessagesResponse;\n};\n\ntype ExecutionAPIGetRegisterAtBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetRegisterAtBlockIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.GetRegisterAtBlockIDResponse;\n};\n\ntype ExecutionAPIGetLatestBlockHeader = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetLatestBlockHeaderRequest;\n  readonly responseType: typeof flow_execution_execution_pb.BlockHeaderResponse;\n};\n\ntype ExecutionAPIGetBlockHeaderByID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_execution_execution_pb.GetBlockHeaderByIDRequest;\n  readonly responseType: typeof flow_execution_execution_pb.BlockHeaderResponse;\n};\n\nexport class ExecutionAPI {\n  static readonly serviceName: string;\n  static readonly Ping: ExecutionAPIPing;\n  static readonly GetAccountAtBlockID: ExecutionAPIGetAccountAtBlockID;\n  static readonly ExecuteScriptAtBlockID: ExecutionAPIExecuteScriptAtBlockID;\n  static readonly GetEventsForBlockIDs: ExecutionAPIGetEventsForBlockIDs;\n  static readonly GetTransactionResult: ExecutionAPIGetTransactionResult;\n  static readonly GetTransactionResultByIndex: ExecutionAPIGetTransactionResultByIndex;\n  static readonly GetTransactionResultsByBlockID: ExecutionAPIGetTransactionResultsByBlockID;\n  static readonly GetTransactionErrorMessage: ExecutionAPIGetTransactionErrorMessage;\n  static readonly GetTransactionErrorMessageByIndex: ExecutionAPIGetTransactionErrorMessageByIndex;\n  static readonly GetTransactionErrorMessagesByBlockID: ExecutionAPIGetTransactionErrorMessagesByBlockID;\n  static readonly GetRegisterAtBlockID: ExecutionAPIGetRegisterAtBlockID;\n  static readonly GetLatestBlockHeader: ExecutionAPIGetLatestBlockHeader;\n  static readonly GetBlockHeaderByID: ExecutionAPIGetBlockHeaderByID;\n}\n\nexport type ServiceError = { message: string, code: number; metadata: grpc.Metadata }\nexport type Status = { details: string, code: number; metadata: grpc.Metadata }\n\ninterface UnaryResponse {\n  cancel(): void;\n}\ninterface ResponseStream<T> {\n  cancel(): void;\n  on(type: 'data', handler: (message: T) => void): ResponseStream<T>;\n  on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;\n  on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;\n}\ninterface RequestStream<T> {\n  write(message: T): RequestStream<T>;\n  end(): void;\n  cancel(): void;\n  on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;\n  on(type: 'status', handler: (status: Status) => void): RequestStream<T>;\n}\ninterface BidirectionalStream<ReqT, ResT> {\n  write(message: ReqT): BidirectionalStream<ReqT, ResT>;\n  end(): void;\n  cancel(): void;\n  on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;\n}\n\nexport class ExecutionAPIClient {\n  readonly serviceHost: string;\n\n  constructor(serviceHost: string, options?: grpc.RpcOptions);\n  ping(\n    requestMessage: flow_execution_execution_pb.PingRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.PingResponse|null) => void\n  ): UnaryResponse;\n  ping(\n    requestMessage: flow_execution_execution_pb.PingRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.PingResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtBlockID(\n    requestMessage: flow_execution_execution_pb.GetAccountAtBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetAccountAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getAccountAtBlockID(\n    requestMessage: flow_execution_execution_pb.GetAccountAtBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetAccountAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockID(\n    requestMessage: flow_execution_execution_pb.ExecuteScriptAtBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.ExecuteScriptAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  executeScriptAtBlockID(\n    requestMessage: flow_execution_execution_pb.ExecuteScriptAtBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.ExecuteScriptAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getEventsForBlockIDs(\n    requestMessage: flow_execution_execution_pb.GetEventsForBlockIDsRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetEventsForBlockIDsResponse|null) => void\n  ): UnaryResponse;\n  getEventsForBlockIDs(\n    requestMessage: flow_execution_execution_pb.GetEventsForBlockIDsRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetEventsForBlockIDsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResult(\n    requestMessage: flow_execution_execution_pb.GetTransactionResultRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResult(\n    requestMessage: flow_execution_execution_pb.GetTransactionResultRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultByIndex(\n    requestMessage: flow_execution_execution_pb.GetTransactionByIndexRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultByIndex(\n    requestMessage: flow_execution_execution_pb.GetTransactionByIndexRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultsByBlockID(\n    requestMessage: flow_execution_execution_pb.GetTransactionsByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionResultsByBlockID(\n    requestMessage: flow_execution_execution_pb.GetTransactionsByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionResultsResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessage(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessageRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessageResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessage(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessageRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessageResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessageByIndex(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessageByIndexRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessageResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessageByIndex(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessageByIndexRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessageResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessagesByBlockID(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessagesByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessagesResponse|null) => void\n  ): UnaryResponse;\n  getTransactionErrorMessagesByBlockID(\n    requestMessage: flow_execution_execution_pb.GetTransactionErrorMessagesByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetTransactionErrorMessagesResponse|null) => void\n  ): UnaryResponse;\n  getRegisterAtBlockID(\n    requestMessage: flow_execution_execution_pb.GetRegisterAtBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetRegisterAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getRegisterAtBlockID(\n    requestMessage: flow_execution_execution_pb.GetRegisterAtBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.GetRegisterAtBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlockHeader(\n    requestMessage: flow_execution_execution_pb.GetLatestBlockHeaderRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getLatestBlockHeader(\n    requestMessage: flow_execution_execution_pb.GetLatestBlockHeaderRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByID(\n    requestMessage: flow_execution_execution_pb.GetBlockHeaderByIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n  getBlockHeaderByID(\n    requestMessage: flow_execution_execution_pb.GetBlockHeaderByIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_execution_execution_pb.BlockHeaderResponse|null) => void\n  ): UnaryResponse;\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/execution/execution_pb_service.js",
    "content": "// package: flow.execution\n// file: flow/execution/execution.proto\n\nvar flow_execution_execution_pb = require(\"../../flow/execution/execution_pb\");\nvar grpc = require(\"@improbable-eng/grpc-web\").grpc;\n\nvar ExecutionAPI = (function () {\n  function ExecutionAPI() {}\n  ExecutionAPI.serviceName = \"flow.execution.ExecutionAPI\";\n  return ExecutionAPI;\n}());\n\nExecutionAPI.Ping = {\n  methodName: \"Ping\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.PingRequest,\n  responseType: flow_execution_execution_pb.PingResponse\n};\n\nExecutionAPI.GetAccountAtBlockID = {\n  methodName: \"GetAccountAtBlockID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetAccountAtBlockIDRequest,\n  responseType: flow_execution_execution_pb.GetAccountAtBlockIDResponse\n};\n\nExecutionAPI.ExecuteScriptAtBlockID = {\n  methodName: \"ExecuteScriptAtBlockID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.ExecuteScriptAtBlockIDRequest,\n  responseType: flow_execution_execution_pb.ExecuteScriptAtBlockIDResponse\n};\n\nExecutionAPI.GetEventsForBlockIDs = {\n  methodName: \"GetEventsForBlockIDs\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetEventsForBlockIDsRequest,\n  responseType: flow_execution_execution_pb.GetEventsForBlockIDsResponse\n};\n\nExecutionAPI.GetTransactionResult = {\n  methodName: \"GetTransactionResult\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionResultRequest,\n  responseType: flow_execution_execution_pb.GetTransactionResultResponse\n};\n\nExecutionAPI.GetTransactionResultByIndex = {\n  methodName: \"GetTransactionResultByIndex\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionByIndexRequest,\n  responseType: flow_execution_execution_pb.GetTransactionResultResponse\n};\n\nExecutionAPI.GetTransactionResultsByBlockID = {\n  methodName: \"GetTransactionResultsByBlockID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionsByBlockIDRequest,\n  responseType: flow_execution_execution_pb.GetTransactionResultsResponse\n};\n\nExecutionAPI.GetTransactionErrorMessage = {\n  methodName: \"GetTransactionErrorMessage\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionErrorMessageRequest,\n  responseType: flow_execution_execution_pb.GetTransactionErrorMessageResponse\n};\n\nExecutionAPI.GetTransactionErrorMessageByIndex = {\n  methodName: \"GetTransactionErrorMessageByIndex\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionErrorMessageByIndexRequest,\n  responseType: flow_execution_execution_pb.GetTransactionErrorMessageResponse\n};\n\nExecutionAPI.GetTransactionErrorMessagesByBlockID = {\n  methodName: \"GetTransactionErrorMessagesByBlockID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetTransactionErrorMessagesByBlockIDRequest,\n  responseType: flow_execution_execution_pb.GetTransactionErrorMessagesResponse\n};\n\nExecutionAPI.GetRegisterAtBlockID = {\n  methodName: \"GetRegisterAtBlockID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetRegisterAtBlockIDRequest,\n  responseType: flow_execution_execution_pb.GetRegisterAtBlockIDResponse\n};\n\nExecutionAPI.GetLatestBlockHeader = {\n  methodName: \"GetLatestBlockHeader\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetLatestBlockHeaderRequest,\n  responseType: flow_execution_execution_pb.BlockHeaderResponse\n};\n\nExecutionAPI.GetBlockHeaderByID = {\n  methodName: \"GetBlockHeaderByID\",\n  service: ExecutionAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_execution_execution_pb.GetBlockHeaderByIDRequest,\n  responseType: flow_execution_execution_pb.BlockHeaderResponse\n};\n\nexports.ExecutionAPI = ExecutionAPI;\n\nfunction ExecutionAPIClient(serviceHost, options) {\n  this.serviceHost = serviceHost;\n  this.options = options || {};\n}\n\nExecutionAPIClient.prototype.ping = function ping(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.Ping, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getAccountAtBlockID = function getAccountAtBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetAccountAtBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.executeScriptAtBlockID = function executeScriptAtBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.ExecuteScriptAtBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getEventsForBlockIDs = function getEventsForBlockIDs(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetEventsForBlockIDs, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionResult = function getTransactionResult(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionResult, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionResultByIndex = function getTransactionResultByIndex(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionResultByIndex, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionResultsByBlockID = function getTransactionResultsByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionResultsByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionErrorMessage = function getTransactionErrorMessage(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionErrorMessage, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionErrorMessageByIndex = function getTransactionErrorMessageByIndex(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionErrorMessageByIndex, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getTransactionErrorMessagesByBlockID = function getTransactionErrorMessagesByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetTransactionErrorMessagesByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getRegisterAtBlockID = function getRegisterAtBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetRegisterAtBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getLatestBlockHeader = function getLatestBlockHeader(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetLatestBlockHeader, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionAPIClient.prototype.getBlockHeaderByID = function getBlockHeaderByID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionAPI.GetBlockHeaderByID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nexports.ExecutionAPIClient = ExecutionAPIClient;\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/executiondata/executiondata_pb.d.ts",
    "content": "// package: flow.executiondata\n// file: flow/executiondata/executiondata.proto\n\nimport * as jspb from \"google-protobuf\";\nimport * as flow_entities_block_execution_data_pb from \"../../flow/entities/block_execution_data_pb\";\nimport * as flow_entities_event_pb from \"../../flow/entities/event_pb\";\nimport * as flow_entities_register_pb from \"../../flow/entities/register_pb\";\nimport * as google_protobuf_timestamp_pb from \"google-protobuf/google/protobuf/timestamp_pb\";\n\nexport class GetExecutionDataByBlockIDRequest extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetExecutionDataByBlockIDRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetExecutionDataByBlockIDRequest): GetExecutionDataByBlockIDRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetExecutionDataByBlockIDRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetExecutionDataByBlockIDRequest;\n  static deserializeBinaryFromReader(message: GetExecutionDataByBlockIDRequest, reader: jspb.BinaryReader): GetExecutionDataByBlockIDRequest;\n}\n\nexport namespace GetExecutionDataByBlockIDRequest {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class GetExecutionDataByBlockIDResponse extends jspb.Message {\n  hasBlockExecutionData(): boolean;\n  clearBlockExecutionData(): void;\n  getBlockExecutionData(): flow_entities_block_execution_data_pb.BlockExecutionData | undefined;\n  setBlockExecutionData(value?: flow_entities_block_execution_data_pb.BlockExecutionData): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetExecutionDataByBlockIDResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetExecutionDataByBlockIDResponse): GetExecutionDataByBlockIDResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetExecutionDataByBlockIDResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetExecutionDataByBlockIDResponse;\n  static deserializeBinaryFromReader(message: GetExecutionDataByBlockIDResponse, reader: jspb.BinaryReader): GetExecutionDataByBlockIDResponse;\n}\n\nexport namespace GetExecutionDataByBlockIDResponse {\n  export type AsObject = {\n    blockExecutionData?: flow_entities_block_execution_data_pb.BlockExecutionData.AsObject,\n  }\n}\n\nexport class SubscribeExecutionDataRequest extends jspb.Message {\n  getStartBlockId(): Uint8Array | string;\n  getStartBlockId_asU8(): Uint8Array;\n  getStartBlockId_asB64(): string;\n  setStartBlockId(value: Uint8Array | string): void;\n\n  getStartBlockHeight(): number;\n  setStartBlockHeight(value: number): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeExecutionDataRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeExecutionDataRequest): SubscribeExecutionDataRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeExecutionDataRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeExecutionDataRequest;\n  static deserializeBinaryFromReader(message: SubscribeExecutionDataRequest, reader: jspb.BinaryReader): SubscribeExecutionDataRequest;\n}\n\nexport namespace SubscribeExecutionDataRequest {\n  export type AsObject = {\n    startBlockId: Uint8Array | string,\n    startBlockHeight: number,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class SubscribeExecutionDataResponse extends jspb.Message {\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  hasBlockExecutionData(): boolean;\n  clearBlockExecutionData(): void;\n  getBlockExecutionData(): flow_entities_block_execution_data_pb.BlockExecutionData | undefined;\n  setBlockExecutionData(value?: flow_entities_block_execution_data_pb.BlockExecutionData): void;\n\n  hasBlockTimestamp(): boolean;\n  clearBlockTimestamp(): void;\n  getBlockTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n  setBlockTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeExecutionDataResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeExecutionDataResponse): SubscribeExecutionDataResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeExecutionDataResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeExecutionDataResponse;\n  static deserializeBinaryFromReader(message: SubscribeExecutionDataResponse, reader: jspb.BinaryReader): SubscribeExecutionDataResponse;\n}\n\nexport namespace SubscribeExecutionDataResponse {\n  export type AsObject = {\n    blockHeight: number,\n    blockExecutionData?: flow_entities_block_execution_data_pb.BlockExecutionData.AsObject,\n    blockTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n  }\n}\n\nexport class SubscribeEventsRequest extends jspb.Message {\n  getStartBlockId(): Uint8Array | string;\n  getStartBlockId_asU8(): Uint8Array;\n  getStartBlockId_asB64(): string;\n  setStartBlockId(value: Uint8Array | string): void;\n\n  getStartBlockHeight(): number;\n  setStartBlockHeight(value: number): void;\n\n  hasFilter(): boolean;\n  clearFilter(): void;\n  getFilter(): EventFilter | undefined;\n  setFilter(value?: EventFilter): void;\n\n  getHeartbeatInterval(): number;\n  setHeartbeatInterval(value: number): void;\n\n  getEventEncodingVersion(): flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap];\n  setEventEncodingVersion(value: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap]): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeEventsRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeEventsRequest): SubscribeEventsRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeEventsRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeEventsRequest;\n  static deserializeBinaryFromReader(message: SubscribeEventsRequest, reader: jspb.BinaryReader): SubscribeEventsRequest;\n}\n\nexport namespace SubscribeEventsRequest {\n  export type AsObject = {\n    startBlockId: Uint8Array | string,\n    startBlockHeight: number,\n    filter?: EventFilter.AsObject,\n    heartbeatInterval: number,\n    eventEncodingVersion: flow_entities_event_pb.EventEncodingVersionMap[keyof flow_entities_event_pb.EventEncodingVersionMap],\n  }\n}\n\nexport class SubscribeEventsResponse extends jspb.Message {\n  getBlockId(): Uint8Array | string;\n  getBlockId_asU8(): Uint8Array;\n  getBlockId_asB64(): string;\n  setBlockId(value: Uint8Array | string): void;\n\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  clearEventsList(): void;\n  getEventsList(): Array<flow_entities_event_pb.Event>;\n  setEventsList(value: Array<flow_entities_event_pb.Event>): void;\n  addEvents(value?: flow_entities_event_pb.Event, index?: number): flow_entities_event_pb.Event;\n\n  hasBlockTimestamp(): boolean;\n  clearBlockTimestamp(): void;\n  getBlockTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;\n  setBlockTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): SubscribeEventsResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: SubscribeEventsResponse): SubscribeEventsResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: SubscribeEventsResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): SubscribeEventsResponse;\n  static deserializeBinaryFromReader(message: SubscribeEventsResponse, reader: jspb.BinaryReader): SubscribeEventsResponse;\n}\n\nexport namespace SubscribeEventsResponse {\n  export type AsObject = {\n    blockId: Uint8Array | string,\n    blockHeight: number,\n    eventsList: Array<flow_entities_event_pb.Event.AsObject>,\n    blockTimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,\n  }\n}\n\nexport class EventFilter extends jspb.Message {\n  clearEventTypeList(): void;\n  getEventTypeList(): Array<string>;\n  setEventTypeList(value: Array<string>): void;\n  addEventType(value: string, index?: number): string;\n\n  clearContractList(): void;\n  getContractList(): Array<string>;\n  setContractList(value: Array<string>): void;\n  addContract(value: string, index?: number): string;\n\n  clearAddressList(): void;\n  getAddressList(): Array<string>;\n  setAddressList(value: Array<string>): void;\n  addAddress(value: string, index?: number): string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): EventFilter.AsObject;\n  static toObject(includeInstance: boolean, msg: EventFilter): EventFilter.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: EventFilter, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): EventFilter;\n  static deserializeBinaryFromReader(message: EventFilter, reader: jspb.BinaryReader): EventFilter;\n}\n\nexport namespace EventFilter {\n  export type AsObject = {\n    eventTypeList: Array<string>,\n    contractList: Array<string>,\n    addressList: Array<string>,\n  }\n}\n\nexport class GetRegisterValuesRequest extends jspb.Message {\n  getBlockHeight(): number;\n  setBlockHeight(value: number): void;\n\n  clearRegisterIdsList(): void;\n  getRegisterIdsList(): Array<flow_entities_register_pb.RegisterID>;\n  setRegisterIdsList(value: Array<flow_entities_register_pb.RegisterID>): void;\n  addRegisterIds(value?: flow_entities_register_pb.RegisterID, index?: number): flow_entities_register_pb.RegisterID;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetRegisterValuesRequest.AsObject;\n  static toObject(includeInstance: boolean, msg: GetRegisterValuesRequest): GetRegisterValuesRequest.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetRegisterValuesRequest, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetRegisterValuesRequest;\n  static deserializeBinaryFromReader(message: GetRegisterValuesRequest, reader: jspb.BinaryReader): GetRegisterValuesRequest;\n}\n\nexport namespace GetRegisterValuesRequest {\n  export type AsObject = {\n    blockHeight: number,\n    registerIdsList: Array<flow_entities_register_pb.RegisterID.AsObject>,\n  }\n}\n\nexport class GetRegisterValuesResponse extends jspb.Message {\n  clearValuesList(): void;\n  getValuesList(): Array<Uint8Array | string>;\n  getValuesList_asU8(): Array<Uint8Array>;\n  getValuesList_asB64(): Array<string>;\n  setValuesList(value: Array<Uint8Array | string>): void;\n  addValues(value: Uint8Array | string, index?: number): Uint8Array | string;\n\n  serializeBinary(): Uint8Array;\n  toObject(includeInstance?: boolean): GetRegisterValuesResponse.AsObject;\n  static toObject(includeInstance: boolean, msg: GetRegisterValuesResponse): GetRegisterValuesResponse.AsObject;\n  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n  static serializeBinaryToWriter(message: GetRegisterValuesResponse, writer: jspb.BinaryWriter): void;\n  static deserializeBinary(bytes: Uint8Array): GetRegisterValuesResponse;\n  static deserializeBinaryFromReader(message: GetRegisterValuesResponse, reader: jspb.BinaryReader): GetRegisterValuesResponse;\n}\n\nexport namespace GetRegisterValuesResponse {\n  export type AsObject = {\n    valuesList: Array<Uint8Array | string>,\n  }\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/executiondata/executiondata_pb.js",
    "content": "// source: flow/executiondata/executiondata.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global =\n    (typeof globalThis !== 'undefined' && globalThis) ||\n    (typeof window !== 'undefined' && window) ||\n    (typeof global !== 'undefined' && global) ||\n    (typeof self !== 'undefined' && self) ||\n    (function () { return this; }).call(null) ||\n    Function('return this')();\n\nvar flow_entities_block_execution_data_pb = require('../../flow/entities/block_execution_data_pb.js');\ngoog.object.extend(proto, flow_entities_block_execution_data_pb);\nvar flow_entities_event_pb = require('../../flow/entities/event_pb.js');\ngoog.object.extend(proto, flow_entities_event_pb);\nvar flow_entities_register_pb = require('../../flow/entities/register_pb.js');\ngoog.object.extend(proto, flow_entities_register_pb);\nvar google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');\ngoog.object.extend(proto, google_protobuf_timestamp_pb);\ngoog.exportSymbol('proto.flow.executiondata.EventFilter', null, global);\ngoog.exportSymbol('proto.flow.executiondata.GetExecutionDataByBlockIDRequest', null, global);\ngoog.exportSymbol('proto.flow.executiondata.GetExecutionDataByBlockIDResponse', null, global);\ngoog.exportSymbol('proto.flow.executiondata.GetRegisterValuesRequest', null, global);\ngoog.exportSymbol('proto.flow.executiondata.GetRegisterValuesResponse', null, global);\ngoog.exportSymbol('proto.flow.executiondata.SubscribeEventsRequest', null, global);\ngoog.exportSymbol('proto.flow.executiondata.SubscribeEventsResponse', null, global);\ngoog.exportSymbol('proto.flow.executiondata.SubscribeExecutionDataRequest', null, global);\ngoog.exportSymbol('proto.flow.executiondata.SubscribeExecutionDataResponse', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.executiondata.GetExecutionDataByBlockIDRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.GetExecutionDataByBlockIDRequest.displayName = 'proto.flow.executiondata.GetExecutionDataByBlockIDRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.executiondata.GetExecutionDataByBlockIDResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.GetExecutionDataByBlockIDResponse.displayName = 'proto.flow.executiondata.GetExecutionDataByBlockIDResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.executiondata.SubscribeExecutionDataRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.SubscribeExecutionDataRequest.displayName = 'proto.flow.executiondata.SubscribeExecutionDataRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.executiondata.SubscribeExecutionDataResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.SubscribeExecutionDataResponse.displayName = 'proto.flow.executiondata.SubscribeExecutionDataResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.SubscribeEventsRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.flow.executiondata.SubscribeEventsRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.SubscribeEventsRequest.displayName = 'proto.flow.executiondata.SubscribeEventsRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.SubscribeEventsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.executiondata.SubscribeEventsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.executiondata.SubscribeEventsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.SubscribeEventsResponse.displayName = 'proto.flow.executiondata.SubscribeEventsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.EventFilter = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.executiondata.EventFilter.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.executiondata.EventFilter, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.EventFilter.displayName = 'proto.flow.executiondata.EventFilter';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.GetRegisterValuesRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.executiondata.GetRegisterValuesRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.executiondata.GetRegisterValuesRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.GetRegisterValuesRequest.displayName = 'proto.flow.executiondata.GetRegisterValuesRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.flow.executiondata.GetRegisterValuesResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.flow.executiondata.GetRegisterValuesResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.flow.executiondata.GetRegisterValuesResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.flow.executiondata.GetRegisterValuesResponse.displayName = 'proto.flow.executiondata.GetRegisterValuesResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.GetExecutionDataByBlockIDRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.GetExecutionDataByBlockIDRequest;\n  return proto.flow.executiondata.GetExecutionDataByBlockIDRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.GetExecutionDataByBlockIDRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest} returns this\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 2;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDRequest} returns this\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.GetExecutionDataByBlockIDResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockExecutionData: (f = msg.getBlockExecutionData()) && flow_entities_block_execution_data_pb.BlockExecutionData.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.GetExecutionDataByBlockIDResponse;\n  return proto.flow.executiondata.GetExecutionDataByBlockIDResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new flow_entities_block_execution_data_pb.BlockExecutionData;\n      reader.readMessage(value,flow_entities_block_execution_data_pb.BlockExecutionData.deserializeBinaryFromReader);\n      msg.setBlockExecutionData(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.GetExecutionDataByBlockIDResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockExecutionData();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      flow_entities_block_execution_data_pb.BlockExecutionData.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional flow.entities.BlockExecutionData block_execution_data = 1;\n * @return {?proto.flow.entities.BlockExecutionData}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.getBlockExecutionData = function() {\n  return /** @type{?proto.flow.entities.BlockExecutionData} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_execution_data_pb.BlockExecutionData, 1));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockExecutionData|undefined} value\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse} returns this\n*/\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.setBlockExecutionData = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.executiondata.GetExecutionDataByBlockIDResponse} returns this\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.clearBlockExecutionData = function() {\n  return this.setBlockExecutionData(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.executiondata.GetExecutionDataByBlockIDResponse.prototype.hasBlockExecutionData = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.SubscribeExecutionDataRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.SubscribeExecutionDataRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockId: msg.getStartBlockId_asB64(),\n    startBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataRequest}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.SubscribeExecutionDataRequest;\n  return proto.flow.executiondata.SubscribeExecutionDataRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.SubscribeExecutionDataRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataRequest}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartBlockHeight(value);\n      break;\n    case 3:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.SubscribeExecutionDataRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.SubscribeExecutionDataRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getStartBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.getStartBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {string}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.getStartBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartBlockId()));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.getStartBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataRequest} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.setStartBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 start_block_height = 2;\n * @return {number}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.getStartBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataRequest} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.setStartBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 3;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataRequest} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.SubscribeExecutionDataResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.SubscribeExecutionDataResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    blockExecutionData: (f = msg.getBlockExecutionData()) && flow_entities_block_execution_data_pb.BlockExecutionData.toObject(includeInstance, f),\n    blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.SubscribeExecutionDataResponse;\n  return proto.flow.executiondata.SubscribeExecutionDataResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.SubscribeExecutionDataResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 2:\n      var value = new flow_entities_block_execution_data_pb.BlockExecutionData;\n      reader.readMessage(value,flow_entities_block_execution_data_pb.BlockExecutionData.deserializeBinaryFromReader);\n      msg.setBlockExecutionData(value);\n      break;\n    case 3:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setBlockTimestamp(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.SubscribeExecutionDataResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.SubscribeExecutionDataResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBlockExecutionData();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      flow_entities_block_execution_data_pb.BlockExecutionData.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional uint64 block_height = 1;\n * @return {number}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional flow.entities.BlockExecutionData block_execution_data = 2;\n * @return {?proto.flow.entities.BlockExecutionData}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.getBlockExecutionData = function() {\n  return /** @type{?proto.flow.entities.BlockExecutionData} */ (\n    jspb.Message.getWrapperField(this, flow_entities_block_execution_data_pb.BlockExecutionData, 2));\n};\n\n\n/**\n * @param {?proto.flow.entities.BlockExecutionData|undefined} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse} returns this\n*/\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.setBlockExecutionData = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.clearBlockExecutionData = function() {\n  return this.setBlockExecutionData(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.hasBlockExecutionData = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n/**\n * optional google.protobuf.Timestamp block_timestamp = 3;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.getBlockTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse} returns this\n*/\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.setBlockTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.executiondata.SubscribeExecutionDataResponse} returns this\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.clearBlockTimestamp = function() {\n  return this.setBlockTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.executiondata.SubscribeExecutionDataResponse.prototype.hasBlockTimestamp = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.SubscribeEventsRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.SubscribeEventsRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeEventsRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    startBlockId: msg.getStartBlockId_asB64(),\n    startBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    filter: (f = msg.getFilter()) && proto.flow.executiondata.EventFilter.toObject(includeInstance, f),\n    heartbeatInterval: jspb.Message.getFieldWithDefault(msg, 4, 0),\n    eventEncodingVersion: jspb.Message.getFieldWithDefault(msg, 5, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.SubscribeEventsRequest}\n */\nproto.flow.executiondata.SubscribeEventsRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.SubscribeEventsRequest;\n  return proto.flow.executiondata.SubscribeEventsRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.SubscribeEventsRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.SubscribeEventsRequest}\n */\nproto.flow.executiondata.SubscribeEventsRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setStartBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartBlockHeight(value);\n      break;\n    case 3:\n      var value = new proto.flow.executiondata.EventFilter;\n      reader.readMessage(value,proto.flow.executiondata.EventFilter.deserializeBinaryFromReader);\n      msg.setFilter(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setHeartbeatInterval(value);\n      break;\n    case 5:\n      var value = /** @type {!proto.flow.entities.EventEncodingVersion} */ (reader.readEnum());\n      msg.setEventEncodingVersion(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.SubscribeEventsRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.SubscribeEventsRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeEventsRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStartBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getStartBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getFilter();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      proto.flow.executiondata.EventFilter.serializeBinaryToWriter\n    );\n  }\n  f = message.getHeartbeatInterval();\n  if (f !== 0) {\n    writer.writeUint64(\n      4,\n      f\n    );\n  }\n  f = message.getEventEncodingVersion();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getStartBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {string}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getStartBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getStartBlockId()));\n};\n\n\n/**\n * optional bytes start_block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getStartBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getStartBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getStartBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.setStartBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 start_block_height = 2;\n * @return {number}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getStartBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.setStartBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional EventFilter filter = 3;\n * @return {?proto.flow.executiondata.EventFilter}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getFilter = function() {\n  return /** @type{?proto.flow.executiondata.EventFilter} */ (\n    jspb.Message.getWrapperField(this, proto.flow.executiondata.EventFilter, 3));\n};\n\n\n/**\n * @param {?proto.flow.executiondata.EventFilter|undefined} value\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n*/\nproto.flow.executiondata.SubscribeEventsRequest.prototype.setFilter = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.clearFilter = function() {\n  return this.setFilter(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.hasFilter = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n/**\n * optional uint64 heartbeat_interval = 4;\n * @return {number}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getHeartbeatInterval = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.setHeartbeatInterval = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional flow.entities.EventEncodingVersion event_encoding_version = 5;\n * @return {!proto.flow.entities.EventEncodingVersion}\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.getEventEncodingVersion = function() {\n  return /** @type {!proto.flow.entities.EventEncodingVersion} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {!proto.flow.entities.EventEncodingVersion} value\n * @return {!proto.flow.executiondata.SubscribeEventsRequest} returns this\n */\nproto.flow.executiondata.SubscribeEventsRequest.prototype.setEventEncodingVersion = function(value) {\n  return jspb.Message.setProto3EnumField(this, 5, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.executiondata.SubscribeEventsResponse.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.SubscribeEventsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.SubscribeEventsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeEventsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockId: msg.getBlockId_asB64(),\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),\n    eventsList: jspb.Message.toObjectList(msg.getEventsList(),\n    flow_entities_event_pb.Event.toObject, includeInstance),\n    blockTimestamp: (f = msg.getBlockTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.SubscribeEventsResponse}\n */\nproto.flow.executiondata.SubscribeEventsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.SubscribeEventsResponse;\n  return proto.flow.executiondata.SubscribeEventsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.SubscribeEventsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.SubscribeEventsResponse}\n */\nproto.flow.executiondata.SubscribeEventsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setBlockId(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 3:\n      var value = new flow_entities_event_pb.Event;\n      reader.readMessage(value,flow_entities_event_pb.Event.deserializeBinaryFromReader);\n      msg.addEvents(value);\n      break;\n    case 4:\n      var value = new google_protobuf_timestamp_pb.Timestamp;\n      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);\n      msg.setBlockTimestamp(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.SubscribeEventsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.SubscribeEventsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.SubscribeEventsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockId_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      1,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getEventsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      flow_entities_event_pb.Event.serializeBinaryToWriter\n    );\n  }\n  f = message.getBlockTimestamp();\n  if (f != null) {\n    writer.writeMessage(\n      4,\n      f,\n      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional bytes block_id = 1;\n * @return {!(string|Uint8Array)}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getBlockId = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {string}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getBlockId_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getBlockId()));\n};\n\n\n/**\n * optional bytes block_id = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getBlockId()`\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getBlockId_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getBlockId()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.setBlockId = function(value) {\n  return jspb.Message.setProto3BytesField(this, 1, value);\n};\n\n\n/**\n * optional uint64 block_height = 2;\n * @return {number}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * repeated flow.entities.Event events = 3;\n * @return {!Array<!proto.flow.entities.Event>}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getEventsList = function() {\n  return /** @type{!Array<!proto.flow.entities.Event>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_event_pb.Event, 3));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.Event>} value\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n*/\nproto.flow.executiondata.SubscribeEventsResponse.prototype.setEventsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.Event=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.Event}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.addEvents = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.flow.entities.Event, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.clearEventsList = function() {\n  return this.setEventsList([]);\n};\n\n\n/**\n * optional google.protobuf.Timestamp block_timestamp = 4;\n * @return {?proto.google.protobuf.Timestamp}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.getBlockTimestamp = function() {\n  return /** @type{?proto.google.protobuf.Timestamp} */ (\n    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));\n};\n\n\n/**\n * @param {?proto.google.protobuf.Timestamp|undefined} value\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n*/\nproto.flow.executiondata.SubscribeEventsResponse.prototype.setBlockTimestamp = function(value) {\n  return jspb.Message.setWrapperField(this, 4, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.flow.executiondata.SubscribeEventsResponse} returns this\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.clearBlockTimestamp = function() {\n  return this.setBlockTimestamp(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.flow.executiondata.SubscribeEventsResponse.prototype.hasBlockTimestamp = function() {\n  return jspb.Message.getField(this, 4) != null;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.executiondata.EventFilter.repeatedFields_ = [1,2,3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.EventFilter.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.EventFilter.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.EventFilter} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.EventFilter.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    eventTypeList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,\n    contractList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,\n    addressList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.EventFilter}\n */\nproto.flow.executiondata.EventFilter.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.EventFilter;\n  return proto.flow.executiondata.EventFilter.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.EventFilter} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.EventFilter}\n */\nproto.flow.executiondata.EventFilter.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readString());\n      msg.addEventType(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readString());\n      msg.addContract(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readString());\n      msg.addAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.EventFilter.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.EventFilter.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.EventFilter} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.EventFilter.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getEventTypeList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      1,\n      f\n    );\n  }\n  f = message.getContractList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      2,\n      f\n    );\n  }\n  f = message.getAddressList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated string event_type = 1;\n * @return {!Array<string>}\n */\nproto.flow.executiondata.EventFilter.prototype.getEventTypeList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.setEventTypeList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.addEventType = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.clearEventTypeList = function() {\n  return this.setEventTypeList([]);\n};\n\n\n/**\n * repeated string contract = 2;\n * @return {!Array<string>}\n */\nproto.flow.executiondata.EventFilter.prototype.getContractList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.setContractList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.addContract = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.clearContractList = function() {\n  return this.setContractList([]);\n};\n\n\n/**\n * repeated string address = 3;\n * @return {!Array<string>}\n */\nproto.flow.executiondata.EventFilter.prototype.getAddressList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.setAddressList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.addAddress = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.EventFilter} returns this\n */\nproto.flow.executiondata.EventFilter.prototype.clearAddressList = function() {\n  return this.setAddressList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.executiondata.GetRegisterValuesRequest.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.GetRegisterValuesRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.GetRegisterValuesRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetRegisterValuesRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\n    registerIdsList: jspb.Message.toObjectList(msg.getRegisterIdsList(),\n    flow_entities_register_pb.RegisterID.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.GetRegisterValuesRequest}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.GetRegisterValuesRequest;\n  return proto.flow.executiondata.GetRegisterValuesRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.GetRegisterValuesRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.GetRegisterValuesRequest}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBlockHeight(value);\n      break;\n    case 2:\n      var value = new flow_entities_register_pb.RegisterID;\n      reader.readMessage(value,flow_entities_register_pb.RegisterID.deserializeBinaryFromReader);\n      msg.addRegisterIds(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.GetRegisterValuesRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.GetRegisterValuesRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetRegisterValuesRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getRegisterIdsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      flow_entities_register_pb.RegisterID.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional uint64 block_height = 1;\n * @return {number}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.flow.executiondata.GetRegisterValuesRequest} returns this\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * repeated flow.entities.RegisterID register_ids = 2;\n * @return {!Array<!proto.flow.entities.RegisterID>}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.getRegisterIdsList = function() {\n  return /** @type{!Array<!proto.flow.entities.RegisterID>} */ (\n    jspb.Message.getRepeatedWrapperField(this, flow_entities_register_pb.RegisterID, 2));\n};\n\n\n/**\n * @param {!Array<!proto.flow.entities.RegisterID>} value\n * @return {!proto.flow.executiondata.GetRegisterValuesRequest} returns this\n*/\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.setRegisterIdsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.flow.entities.RegisterID=} opt_value\n * @param {number=} opt_index\n * @return {!proto.flow.entities.RegisterID}\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.addRegisterIds = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.flow.entities.RegisterID, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.GetRegisterValuesRequest} returns this\n */\nproto.flow.executiondata.GetRegisterValuesRequest.prototype.clearRegisterIdsList = function() {\n  return this.setRegisterIdsList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.flow.executiondata.GetRegisterValuesResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.flow.executiondata.GetRegisterValuesResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.flow.executiondata.GetRegisterValuesResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetRegisterValuesResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n    valuesList: msg.getValuesList_asB64()\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.flow.executiondata.GetRegisterValuesResponse}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.flow.executiondata.GetRegisterValuesResponse;\n  return proto.flow.executiondata.GetRegisterValuesResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.flow.executiondata.GetRegisterValuesResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.flow.executiondata.GetRegisterValuesResponse}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.addValues(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.flow.executiondata.GetRegisterValuesResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.flow.executiondata.GetRegisterValuesResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.flow.executiondata.GetRegisterValuesResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValuesList_asU8();\n  if (f.length > 0) {\n    writer.writeRepeatedBytes(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated bytes values = 1;\n * @return {!(Array<!Uint8Array>|Array<string>)}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.getValuesList = function() {\n  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * repeated bytes values = 1;\n * This is a type-conversion wrapper around `getValuesList()`\n * @return {!Array<string>}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.getValuesList_asB64 = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(\n      this.getValuesList()));\n};\n\n\n/**\n * repeated bytes values = 1;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getValuesList()`\n * @return {!Array<!Uint8Array>}\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.getValuesList_asU8 = function() {\n  return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(\n      this.getValuesList()));\n};\n\n\n/**\n * @param {!(Array<!Uint8Array>|Array<string>)} value\n * @return {!proto.flow.executiondata.GetRegisterValuesResponse} returns this\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.setValuesList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @param {number=} opt_index\n * @return {!proto.flow.executiondata.GetRegisterValuesResponse} returns this\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.addValues = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.flow.executiondata.GetRegisterValuesResponse} returns this\n */\nproto.flow.executiondata.GetRegisterValuesResponse.prototype.clearValuesList = function() {\n  return this.setValuesList([]);\n};\n\n\ngoog.object.extend(exports, proto.flow.executiondata);\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/executiondata/executiondata_pb_service.d.ts",
    "content": "// package: flow.executiondata\n// file: flow/executiondata/executiondata.proto\n\nimport * as flow_executiondata_executiondata_pb from \"../../flow/executiondata/executiondata_pb\";\nimport {grpc} from \"@improbable-eng/grpc-web\";\n\ntype ExecutionDataAPIGetExecutionDataByBlockID = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionDataAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDRequest;\n  readonly responseType: typeof flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDResponse;\n};\n\ntype ExecutionDataAPISubscribeExecutionData = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionDataAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_executiondata_executiondata_pb.SubscribeExecutionDataRequest;\n  readonly responseType: typeof flow_executiondata_executiondata_pb.SubscribeExecutionDataResponse;\n};\n\ntype ExecutionDataAPISubscribeEvents = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionDataAPI;\n  readonly requestStream: false;\n  readonly responseStream: true;\n  readonly requestType: typeof flow_executiondata_executiondata_pb.SubscribeEventsRequest;\n  readonly responseType: typeof flow_executiondata_executiondata_pb.SubscribeEventsResponse;\n};\n\ntype ExecutionDataAPIGetRegisterValues = {\n  readonly methodName: string;\n  readonly service: typeof ExecutionDataAPI;\n  readonly requestStream: false;\n  readonly responseStream: false;\n  readonly requestType: typeof flow_executiondata_executiondata_pb.GetRegisterValuesRequest;\n  readonly responseType: typeof flow_executiondata_executiondata_pb.GetRegisterValuesResponse;\n};\n\nexport class ExecutionDataAPI {\n  static readonly serviceName: string;\n  static readonly GetExecutionDataByBlockID: ExecutionDataAPIGetExecutionDataByBlockID;\n  static readonly SubscribeExecutionData: ExecutionDataAPISubscribeExecutionData;\n  static readonly SubscribeEvents: ExecutionDataAPISubscribeEvents;\n  static readonly GetRegisterValues: ExecutionDataAPIGetRegisterValues;\n}\n\nexport type ServiceError = { message: string, code: number; metadata: grpc.Metadata }\nexport type Status = { details: string, code: number; metadata: grpc.Metadata }\n\ninterface UnaryResponse {\n  cancel(): void;\n}\ninterface ResponseStream<T> {\n  cancel(): void;\n  on(type: 'data', handler: (message: T) => void): ResponseStream<T>;\n  on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;\n  on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;\n}\ninterface RequestStream<T> {\n  write(message: T): RequestStream<T>;\n  end(): void;\n  cancel(): void;\n  on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;\n  on(type: 'status', handler: (status: Status) => void): RequestStream<T>;\n}\ninterface BidirectionalStream<ReqT, ResT> {\n  write(message: ReqT): BidirectionalStream<ReqT, ResT>;\n  end(): void;\n  cancel(): void;\n  on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;\n  on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;\n}\n\nexport class ExecutionDataAPIClient {\n  readonly serviceHost: string;\n\n  constructor(serviceHost: string, options?: grpc.RpcOptions);\n  getExecutionDataByBlockID(\n    requestMessage: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDResponse|null) => void\n  ): UnaryResponse;\n  getExecutionDataByBlockID(\n    requestMessage: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDResponse|null) => void\n  ): UnaryResponse;\n  subscribeExecutionData(requestMessage: flow_executiondata_executiondata_pb.SubscribeExecutionDataRequest, metadata?: grpc.Metadata): ResponseStream<flow_executiondata_executiondata_pb.SubscribeExecutionDataResponse>;\n  subscribeEvents(requestMessage: flow_executiondata_executiondata_pb.SubscribeEventsRequest, metadata?: grpc.Metadata): ResponseStream<flow_executiondata_executiondata_pb.SubscribeEventsResponse>;\n  getRegisterValues(\n    requestMessage: flow_executiondata_executiondata_pb.GetRegisterValuesRequest,\n    metadata: grpc.Metadata,\n    callback: (error: ServiceError|null, responseMessage: flow_executiondata_executiondata_pb.GetRegisterValuesResponse|null) => void\n  ): UnaryResponse;\n  getRegisterValues(\n    requestMessage: flow_executiondata_executiondata_pb.GetRegisterValuesRequest,\n    callback: (error: ServiceError|null, responseMessage: flow_executiondata_executiondata_pb.GetRegisterValuesResponse|null) => void\n  ): UnaryResponse;\n}\n\n"
  },
  {
    "path": "packages/protobuf/src/generated/flow/executiondata/executiondata_pb_service.js",
    "content": "// package: flow.executiondata\n// file: flow/executiondata/executiondata.proto\n\nvar flow_executiondata_executiondata_pb = require(\"../../flow/executiondata/executiondata_pb\");\nvar grpc = require(\"@improbable-eng/grpc-web\").grpc;\n\nvar ExecutionDataAPI = (function () {\n  function ExecutionDataAPI() {}\n  ExecutionDataAPI.serviceName = \"flow.executiondata.ExecutionDataAPI\";\n  return ExecutionDataAPI;\n}());\n\nExecutionDataAPI.GetExecutionDataByBlockID = {\n  methodName: \"GetExecutionDataByBlockID\",\n  service: ExecutionDataAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDRequest,\n  responseType: flow_executiondata_executiondata_pb.GetExecutionDataByBlockIDResponse\n};\n\nExecutionDataAPI.SubscribeExecutionData = {\n  methodName: \"SubscribeExecutionData\",\n  service: ExecutionDataAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_executiondata_executiondata_pb.SubscribeExecutionDataRequest,\n  responseType: flow_executiondata_executiondata_pb.SubscribeExecutionDataResponse\n};\n\nExecutionDataAPI.SubscribeEvents = {\n  methodName: \"SubscribeEvents\",\n  service: ExecutionDataAPI,\n  requestStream: false,\n  responseStream: true,\n  requestType: flow_executiondata_executiondata_pb.SubscribeEventsRequest,\n  responseType: flow_executiondata_executiondata_pb.SubscribeEventsResponse\n};\n\nExecutionDataAPI.GetRegisterValues = {\n  methodName: \"GetRegisterValues\",\n  service: ExecutionDataAPI,\n  requestStream: false,\n  responseStream: false,\n  requestType: flow_executiondata_executiondata_pb.GetRegisterValuesRequest,\n  responseType: flow_executiondata_executiondata_pb.GetRegisterValuesResponse\n};\n\nexports.ExecutionDataAPI = ExecutionDataAPI;\n\nfunction ExecutionDataAPIClient(serviceHost, options) {\n  this.serviceHost = serviceHost;\n  this.options = options || {};\n}\n\nExecutionDataAPIClient.prototype.getExecutionDataByBlockID = function getExecutionDataByBlockID(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionDataAPI.GetExecutionDataByBlockID, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nExecutionDataAPIClient.prototype.subscribeExecutionData = function subscribeExecutionData(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(ExecutionDataAPI.SubscribeExecutionData, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nExecutionDataAPIClient.prototype.subscribeEvents = function subscribeEvents(requestMessage, metadata) {\n  var listeners = {\n    data: [],\n    end: [],\n    status: []\n  };\n  var client = grpc.invoke(ExecutionDataAPI.SubscribeEvents, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onMessage: function (responseMessage) {\n      listeners.data.forEach(function (handler) {\n        handler(responseMessage);\n      });\n    },\n    onEnd: function (status, statusMessage, trailers) {\n      listeners.status.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners.end.forEach(function (handler) {\n        handler({ code: status, details: statusMessage, metadata: trailers });\n      });\n      listeners = null;\n    }\n  });\n  return {\n    on: function (type, handler) {\n      listeners[type].push(handler);\n      return this;\n    },\n    cancel: function () {\n      listeners = null;\n      client.close();\n    }\n  };\n};\n\nExecutionDataAPIClient.prototype.getRegisterValues = function getRegisterValues(requestMessage, metadata, callback) {\n  if (arguments.length === 2) {\n    callback = arguments[1];\n  }\n  var client = grpc.unary(ExecutionDataAPI.GetRegisterValues, {\n    request: requestMessage,\n    host: this.serviceHost,\n    metadata: metadata,\n    transport: this.options.transport,\n    debug: this.options.debug,\n    onEnd: function (response) {\n      if (callback) {\n        if (response.status !== grpc.Code.OK) {\n          var err = new Error(response.statusMessage);\n          err.code = response.status;\n          err.metadata = response.trailers;\n          callback(err, null);\n        } else {\n          callback(null, response.message);\n        }\n      }\n    }\n  });\n  return {\n    cancel: function () {\n      callback = null;\n      client.close();\n    }\n  };\n};\n\nexports.ExecutionDataAPIClient = ExecutionDataAPIClient;\n\n"
  },
  {
    "path": "packages/protobuf/src/index.js",
    "content": "export * from \"./generated/flow/access/access_pb_service.js\"\nexport * from \"./generated/flow/access/access_pb.js\"\n\nexport * from \"./generated/flow/entities/account_pb_service.js\"\nexport * from \"./generated/flow/entities/account_pb.js\"\nexport * from \"./generated/flow/entities/block_header_pb_service.js\"\nexport * from \"./generated/flow/entities/block_header_pb.js\"\nexport * from \"./generated/flow/entities/block_pb_service.js\"\nexport * from \"./generated/flow/entities/block_pb.js\"\nexport * from \"./generated/flow/entities/block_seal_pb_service.js\"\nexport * from \"./generated/flow/entities/block_seal_pb.js\"\nexport * from \"./generated/flow/entities/collection_pb_service.js\"\nexport * from \"./generated/flow/entities/collection_pb.js\"\nexport * from \"./generated/flow/entities/event_pb_service.js\"\nexport * from \"./generated/flow/entities/event_pb.js\"\nexport * from \"./generated/flow/entities/transaction_pb_service.js\"\nexport * from \"./generated/flow/entities/transaction_pb.js\"\n\nexport * from \"./generated/flow/execution/execution_pb_service.js\"\nexport * from \"./generated/flow/execution/execution_pb.js\"\n"
  },
  {
    "path": "packages/protobuf/src/index.test.js",
    "content": "test(\"placeholder\", () => {\n  expect(1).toBe(1)\n})\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/access/access.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.access;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/access\";\noption java_package = \"org.onflow.protobuf.access\";\n\nimport \"flow/entities/account.proto\";\nimport \"flow/entities/block_header.proto\";\nimport \"flow/entities/block.proto\";\nimport \"flow/entities/collection.proto\";\nimport \"flow/entities/event.proto\";\nimport \"flow/entities/execution_result.proto\";\nimport \"flow/entities/metadata.proto\";\nimport \"flow/entities/node_version_info.proto\";\nimport \"flow/entities/transaction.proto\";\nimport \"google/protobuf/timestamp.proto\";\n\n// AccessAPI is the public-facing API provided by access nodes.\nservice AccessAPI {\n  // Ping is used to check if the access node is alive and healthy.\n  rpc Ping(PingRequest) returns (PingResponse);\n\n  // GetNodeVersionInfo return node version information, such as semver,\n  // commit, sporkID and protocol version.\n  rpc GetNodeVersionInfo(GetNodeVersionInfoRequest) returns (GetNodeVersionInfoResponse);\n\n  // Block Headers\n\n  // GetLatestBlockHeader gets the latest sealed or unsealed block header.\n  rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest)\n      returns (BlockHeaderResponse);\n  // GetBlockHeaderByID gets a block header by ID.\n  rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest)\n      returns (BlockHeaderResponse);\n  // GetBlockHeaderByHeight gets a block header by height.\n  rpc GetBlockHeaderByHeight(GetBlockHeaderByHeightRequest)\n      returns (BlockHeaderResponse);\n\n  // Blocks\n\n  // GetLatestBlock gets the full payload of the latest sealed or unsealed\n  // block.\n  rpc GetLatestBlock(GetLatestBlockRequest) returns (BlockResponse);\n  // GetBlockByID gets a full block by ID.\n  rpc GetBlockByID(GetBlockByIDRequest) returns (BlockResponse);\n  // GetBlockByHeight gets a full block by height.\n  rpc GetBlockByHeight(GetBlockByHeightRequest) returns (BlockResponse);\n\n  // Collections\n\n  // GetCollectionByID gets a collection by ID.\n  rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse);\n\n  // Transactions\n\n  // SendTransaction submits a transaction to the network.\n  rpc SendTransaction(SendTransactionRequest) returns (SendTransactionResponse);\n  // GetTransaction gets a transaction by ID.\n  rpc GetTransaction(GetTransactionRequest) returns (TransactionResponse);\n  // GetTransactionResult gets the result of a transaction.\n  rpc GetTransactionResult(GetTransactionRequest)\n      returns (TransactionResultResponse);\n  // GetTransactionResultByIndex gets the result of a transaction at a specified\n  // block and index\n  rpc GetTransactionResultByIndex(GetTransactionByIndexRequest)\n      returns (TransactionResultResponse);\n  // GetTransactionResultsByBlockID gets all the transaction results for a\n  // specified block\n  rpc GetTransactionResultsByBlockID(GetTransactionsByBlockIDRequest)\n      returns (TransactionResultsResponse);\n  // GetTransactionsByBlockID gets all the transactions for a specified block\n  rpc GetTransactionsByBlockID(GetTransactionsByBlockIDRequest)\n      returns (TransactionsResponse);\n  // GetSystemTransaction gets a system transaction\n  rpc GetSystemTransaction(GetSystemTransactionRequest) returns (TransactionResponse);\n  // GetSystemTransactionResult gets a system transaction result for a\n  // specified block\n  rpc GetSystemTransactionResult(GetSystemTransactionResultRequest) returns (TransactionResultResponse);\n\n\n  // Accounts\n\n  // GetAccount is an alias for GetAccountAtLatestBlock.\n  //\n  // Warning: this function is deprecated. It behaves identically to\n  // GetAccountAtLatestBlock and will be removed in a future version.\n  rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);\n  // GetAccountAtLatestBlock gets an account by address from the latest sealed\n  // execution state.\n  rpc GetAccountAtLatestBlock(GetAccountAtLatestBlockRequest)\n      returns (AccountResponse);\n  // GetAccountAtBlockHeight gets an account by address at the given block\n  // height\n  rpc GetAccountAtBlockHeight(GetAccountAtBlockHeightRequest)\n      returns (AccountResponse);\n\n  // Scripts\n\n  // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the\n  // latest sealed execution state.\n  rpc ExecuteScriptAtLatestBlock(ExecuteScriptAtLatestBlockRequest)\n      returns (ExecuteScriptResponse);\n  // ExecuteScriptAtBlockID executes a ready-only Cadence script against the\n  // execution state at the block with the given ID.\n  rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest)\n      returns (ExecuteScriptResponse);\n  // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the\n  // execution state at the given block height.\n  rpc ExecuteScriptAtBlockHeight(ExecuteScriptAtBlockHeightRequest)\n      returns (ExecuteScriptResponse);\n\n  // Events\n\n  // GetEventsForHeightRange retrieves events emitted within the specified block\n  // range.\n  rpc GetEventsForHeightRange(GetEventsForHeightRangeRequest)\n      returns (EventsResponse);\n\n  // GetEventsForBlockIDs retrieves events for the specified block IDs and event\n  // type.\n  rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest)\n      returns (EventsResponse);\n\n  // NetworkParameters\n\n  // GetNetworkParameters retrieves the Flow network details\n  rpc GetNetworkParameters(GetNetworkParametersRequest)\n      returns (GetNetworkParametersResponse);\n\n  // ProtocolState\n\n  // GetLatestProtocolStateSnapshot retrieves the latest sealed protocol state\n  // snapshot. Used by Flow nodes joining the network to bootstrap a\n  // space-efficient local state.\n  rpc GetLatestProtocolStateSnapshot(GetLatestProtocolStateSnapshotRequest)\n      returns (ProtocolStateSnapshotResponse);\n\n  // GetProtocolStateSnapshotByBlockID retrieves the latest sealed protocol state\n  // snapshot by block ID. Used by Flow nodes joining the network to bootstrap a\n  // space-efficient local state.\n  rpc GetProtocolStateSnapshotByBlockID(GetProtocolStateSnapshotByBlockIDRequest)\n      returns (ProtocolStateSnapshotResponse);\n\n  // GetProtocolStateSnapshotByHeight retrieves the latest sealed protocol state\n  // snapshot by block height. Used by Flow nodes joining the network to bootstrap a\n  // space-efficient local state.\n  rpc GetProtocolStateSnapshotByHeight(GetProtocolStateSnapshotByHeightRequest)\n      returns (ProtocolStateSnapshotResponse);\n\n  // GetExecutionResultForBlockID returns Execution Result for a given block.\n  // At present, Access Node might not have execution results for every block\n  // and as usual, until sealed, this data can change\n  rpc GetExecutionResultForBlockID(GetExecutionResultForBlockIDRequest)\n      returns (ExecutionResultForBlockIDResponse);\n\n  // GetExecutionResultByID returns Execution Result by its ID.\n  rpc GetExecutionResultByID(GetExecutionResultByIDRequest)\n      returns (ExecutionResultByIDResponse);\n\n  // Subscriptions\n\n  // Subscribe blocks\n\n  // SubscribeBlocksFromStartBlockID streams finalized or sealed blocks starting at the requested\n  // start block id, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // block as it becomes available.\n  //\n  // Blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed blocks will be returned.\n  rpc SubscribeBlocksFromStartBlockID(SubscribeBlocksFromStartBlockIDRequest)\n      returns (stream SubscribeBlocksResponse);\n\n  // SubscribeBlocksFromStartHeight streams finalized or sealed blocks starting at the requested\n  // start block height, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // block as it becomes available.\n  //\n  // Blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed blocks will be returned.\n  rpc SubscribeBlocksFromStartHeight(SubscribeBlocksFromStartHeightRequest)\n      returns (stream SubscribeBlocksResponse);\n\n  // SubscribeBlocksFromLatest streams finalized or sealed blocks starting from the latest finalized or sealed\n  // block. The stream will remain open and responses are sent for each new block as it becomes available.\n  //\n  // Blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed blocks will be returned.\n  rpc SubscribeBlocksFromLatest(SubscribeBlocksFromLatestRequest)\n      returns (stream SubscribeBlocksResponse);\n  \n  // Subscribe block headers\n\n  // SubscribeBlockHeadersFromStartBlockID streams finalized or sealed block headers starting at the requested\n  // start block id, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // block header as it becomes available.\n  //\n  // Block headers are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed block headers will be returned.\n  rpc SubscribeBlockHeadersFromStartBlockID(SubscribeBlockHeadersFromStartBlockIDRequest)\n      returns (stream SubscribeBlockHeadersResponse);\n\n  // SubscribeBlockHeadersFromStartHeight streams finalized or sealed block headers starting at the requested\n  // start block height, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // block header as it becomes available.\n  //\n  // Block headers are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed block headers will be returned.\n  rpc SubscribeBlockHeadersFromStartHeight(SubscribeBlockHeadersFromStartHeightRequest)\n      returns (stream SubscribeBlockHeadersResponse);\n\n  // SubscribeBlockHeadersFromLatest streams finalized or sealed block headers starting from the latest finalized or sealed\n  // block. The stream will remain open and responses are sent for each new block header as it becomes available.\n  //\n  // Block headers are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed block headers will be returned.\n  rpc SubscribeBlockHeadersFromLatest(SubscribeBlockHeadersFromLatestRequest)\n      returns (stream SubscribeBlockHeadersResponse);\n\n  // Subscribe block digests\n\n  // SubscribeBlockDigestsFromStartBlockID streams finalized or sealed lightweight block starting at the requested\n  // start block id, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // lightweight block as it becomes available.\n  //\n  // Lightweight blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed lightweight blocks will be returned.\n  rpc SubscribeBlockDigestsFromStartBlockID(SubscribeBlockDigestsFromStartBlockIDRequest)\n      returns (stream SubscribeBlockDigestsResponse);\n\n  // SubscribeBlockDigestsFromStartHeight streams finalized or sealed lightweight block starting at the requested\n  // start block height, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // lightweight block as it becomes available.\n  //\n  // Lightweight blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed lightweight blocks will be returned.\n  rpc SubscribeBlockDigestsFromStartHeight(SubscribeBlockDigestsFromStartHeightRequest)\n      returns (stream SubscribeBlockDigestsResponse);\n\n  // SubscribeBlockDigestsFromLatest streams finalized or sealed lightweight block headers starting of the latest finalized or sealed\n  // block. The stream will remain open and responses are sent for each new lightweight block as it becomes available.\n  //\n  // Lightweight blocks are only returned when they have reached the provided block status. For example,\n  // if the status is \"sealed\", only sealed lightweight blocks will be returned.\n  rpc SubscribeBlockDigestsFromLatest(SubscribeBlockDigestsFromLatestRequest)\n      returns (stream SubscribeBlockDigestsResponse);\n\n  // Subscribe transaction statuses\n\n  // SendAndSubscribeTransactionStatuses send a transaction and immediately subscribe to its status changes. The status\n  // is streamed back until the block containing the transaction becomes sealed.\n  rpc SendAndSubscribeTransactionStatuses(SendAndSubscribeTransactionStatusesRequest)\n        returns (stream SendAndSubscribeTransactionStatusesResponse);\n}\n\nmessage PingRequest {}\n\nmessage PingResponse {}\n\nmessage GetNodeVersionInfoRequest {}\n\nmessage GetNodeVersionInfoResponse {\n  entities.NodeVersionInfo info = 1;\n}\n\n// Block Headers\n\nmessage GetLatestBlockHeaderRequest {\n  bool is_sealed = 1;\n}\n\nmessage GetBlockHeaderByIDRequest {\n  bytes id = 1;\n}\n\nmessage GetBlockHeaderByHeightRequest {\n  uint64 height = 1;\n}\n\nmessage BlockHeaderResponse {\n  entities.BlockHeader block = 1;\n  entities.BlockStatus block_status = 2;\n  entities.Metadata metadata = 3;\n}\n\n// Blocks\n\nmessage GetLatestBlockRequest {\n  bool is_sealed = 1;\n  bool full_block_response = 2;\n}\n\nmessage GetBlockByIDRequest {\n  bytes id = 1;\n  bool full_block_response = 2;\n}\n\nmessage GetBlockByHeightRequest {\n  uint64 height = 1;\n  bool full_block_response = 2;\n}\n\nmessage BlockResponse {\n  entities.Block block = 1;\n  entities.BlockStatus block_status = 2;\n  entities.Metadata metadata = 3;\n}\n\n// Collections\n\nmessage GetCollectionByIDRequest {\n  bytes id = 1;\n}\n\nmessage CollectionResponse {\n  entities.Collection collection = 1;\n  entities.Metadata metadata = 2;\n}\n\n// Transactions\n\nmessage SendTransactionRequest {\n  entities.Transaction transaction = 1;\n}\n\nmessage SendTransactionResponse {\n  bytes id = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage GetTransactionRequest {\n  bytes id = 1;\n  bytes block_id = 2;\n  bytes collection_id = 3;\n  entities.EventEncodingVersion event_encoding_version = 4;\n}\n\nmessage GetSystemTransactionRequest {\n  bytes block_id = 1;\n}\n\nmessage GetSystemTransactionResultRequest {\n  bytes block_id = 1;\n  entities.EventEncodingVersion event_encoding_version = 2;\n}\n\nmessage GetTransactionByIndexRequest {\n  bytes block_id = 1;\n  uint32 index = 2;\n  entities.EventEncodingVersion event_encoding_version = 3;\n}\n\nmessage GetTransactionsByBlockIDRequest {\n  bytes block_id = 1;\n  entities.EventEncodingVersion event_encoding_version = 2;\n}\n\nmessage TransactionResultsResponse {\n  repeated TransactionResultResponse transaction_results = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage TransactionsResponse {\n  repeated entities.Transaction transactions = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage TransactionResponse {\n  entities.Transaction transaction = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage TransactionResultResponse {\n  entities.TransactionStatus status = 1;\n  uint32 status_code = 2;\n  string error_message = 3;\n  repeated entities.Event events = 4;\n  bytes block_id = 5;\n  bytes transaction_id = 6;\n  bytes collection_id = 7;\n  uint64 block_height = 8;\n  entities.Metadata metadata = 9;\n  uint64 computation_usage = 10;\n}\n\n// Accounts\n\nmessage GetAccountRequest {\n  bytes address = 1;\n}\n\nmessage GetAccountResponse {\n  entities.Account account = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage GetAccountAtLatestBlockRequest {\n  bytes address = 1;\n}\n\nmessage AccountResponse {\n  entities.Account account = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage GetAccountAtBlockHeightRequest {\n  bytes address = 1;\n  uint64 block_height = 2;\n}\n\n// Scripts\n\nmessage ExecuteScriptAtLatestBlockRequest {\n  bytes script = 1;\n  repeated bytes arguments = 2;\n}\n\nmessage ExecuteScriptAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptAtBlockHeightRequest {\n  uint64 block_height = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptResponse {\n  bytes value = 1;\n  entities.Metadata metadata = 2;\n  uint64 computation_usage = 3;\n}\n\n// Events\n\nmessage GetEventsForHeightRangeRequest {\n  string type = 1;\n  uint64 start_height = 2;\n  uint64 end_height = 3;\n  entities.EventEncodingVersion event_encoding_version = 4;\n}\n\nmessage GetEventsForBlockIDsRequest {\n  string type = 1;\n  repeated bytes block_ids = 2;\n  entities.EventEncodingVersion event_encoding_version = 3;\n}\n\nmessage EventsResponse {\n  message Result {\n    bytes block_id = 1;\n    uint64 block_height = 2;\n    repeated entities.Event events = 3;\n    google.protobuf.Timestamp block_timestamp = 4;\n  }\n  repeated Result results = 1;\n  entities.Metadata metadata = 2;\n}\n\n// Network Parameters\n\nmessage GetNetworkParametersRequest {}\n\nmessage GetNetworkParametersResponse {\n  string chain_id = 1;\n}\n\n// Protocol State\n\nmessage GetLatestProtocolStateSnapshotRequest {}\n\nmessage GetProtocolStateSnapshotByBlockIDRequest {\n  bytes block_id = 1;\n}\n\nmessage GetProtocolStateSnapshotByHeightRequest {\n  uint64 block_height = 1;\n}\n\nmessage ProtocolStateSnapshotResponse {\n  bytes serializedSnapshot = 1;\n  entities.Metadata metadata = 2;\n}\n\n// Execution Results\n\nmessage GetExecutionResultForBlockIDRequest {\n  bytes block_id = 1;\n}\n\nmessage ExecutionResultForBlockIDResponse {\n  entities.ExecutionResult execution_result = 1;\n  entities.Metadata metadata = 2;\n}\n\nmessage GetExecutionResultByIDRequest {\n  bytes id = 1;\n}\n\nmessage ExecutionResultByIDResponse {\n  entities.ExecutionResult execution_result = 1;\n  entities.Metadata metadata = 2;\n}\n\n// Subscriptions\n\n// Subscribe blocks\n\n// The request for SubscribeBlocksFromStartBlockID\nmessage SubscribeBlocksFromStartBlockIDRequest {\n  // Block ID of the first block to subscribe.\n  bytes start_block_id = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n\n  // Boolean value determining the response: 'full' if `true`, 'light' otherwise.\n  bool full_block_response = 3;\n}\n\n// The request for SubscribeBlocksFromStartHeight\nmessage SubscribeBlocksFromStartHeightRequest {\n  // Block height of the first block to subscribe.\n  uint64 start_block_height = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n\n  // Boolean value determining the response: 'full' if `true`, 'light' otherwise.\n  bool full_block_response = 3;\n}\n\n// The request for SubscribeBlocksFromLatest\nmessage SubscribeBlocksFromLatestRequest {\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 1;\n\n  // Boolean value determining the response: 'full' if `true`, 'light' otherwise.\n  bool full_block_response = 2;\n}\n\n// The response for SubscribeBlocksFromStartBlockID, SubscribeBlocksFromStartHeight, SubscribeBlocksFromLatest\nmessage SubscribeBlocksResponse {\n  // The sealed or finalized blocks according to the block status\n  // in the request.\n  entities.Block block = 1;\n}\n\n// Subscribe block headers\n\n// The request for SubscribeBlockHeadersFromStartBlockID\nmessage SubscribeBlockHeadersFromStartBlockIDRequest {\n  // Block ID of the first block header to subscribe.\n  bytes start_block_id = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n}\n\n// The request for SubscribeBlockHeadersFromStartHeight\nmessage SubscribeBlockHeadersFromStartHeightRequest {\n  // Block height of the first block header to subscribe.\n  uint64 start_block_height = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n}\n\n// The request for SubscribeBlockHeadersFromLatest\nmessage SubscribeBlockHeadersFromLatestRequest {\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 1;\n}\n\n// The response for SubscribeBlockHeadersFromStartBlockID, SubscribeBlockHeadersFromStartHeight, SubscribeBlockHeadersFromLatest\nmessage SubscribeBlockHeadersResponse {\n  // The sealed or finalized block headers according to the block status\n  // in the request.\n  entities.BlockHeader header = 1;\n}\n\n// Subscribe block digests\n\n// The request for SubscribeBlockDigestsFromStartBlockID\nmessage SubscribeBlockDigestsFromStartBlockIDRequest {\n  // Block ID of the first block to subscribe.\n  bytes start_block_id = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n}\n\n// The request for SubscribeBlockDigestsFromStartHeight\nmessage SubscribeBlockDigestsFromStartHeightRequest {\n  // Block height of the first block to subscribe.\n  uint64 start_block_height = 1;\n\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 2;\n}\n\n// The request for SubscribeBlockDigestsFromLatest\nmessage SubscribeBlockDigestsFromLatestRequest {\n  // Required block status of the block payload.\n  // Possible variants:\n  // 1. BLOCK_FINALIZED\n  // 2. BLOCK_SEALED\n  entities.BlockStatus block_status = 1;\n}\n\n// The response for SubscribeBlockDigestsFromStartBlockID, SubscribeBlockDigestsFromStartHeight, SubscribeBlockDigestsFromLatest\nmessage SubscribeBlockDigestsResponse {\n  // The block ID of the new sealed or finalized block according to the block status\n  // in the request.\n  bytes block_id = 1;\n  // The block height of the new sealed or finalized block according to the block status\n  // in the request.\n  uint64 block_height = 2;\n  // The timestamp of the new sealed or finalized block according to the block status\n  // in the request.\n  google.protobuf.Timestamp block_timestamp = 3;\n}\n\n// Request message for sending a transaction and subscribing to its status changes.\nmessage SendAndSubscribeTransactionStatusesRequest {\n    // The transaction to be sent and tracked for status changes.\n    entities.Transaction transaction = 1;\n}\n\n// Response message for transaction status changes.\nmessage SendAndSubscribeTransactionStatusesResponse {\n    // The ID of the tracked transaction.\n    bytes id = 1;\n    // The status of the tracked transaction\n    // Possible transaction statuses are:\n    // - TransactionStatusPending\n    // - TransactionStatusFinalized\n    // - TransactionStatusExecuted\n    // - TransactionStatusSealed\n    // - `TransactionStatusExpired\n    entities.TransactionStatus status = 2;\n    // The message index of the response message. Used by the client to ensure they received all messages. Starts from \"0\".\n    uint64 message_index = 3;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/account.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage Account {\n  bytes address = 1;\n  uint64 balance = 2;\n  bytes code = 3;\n  repeated AccountKey keys = 4;\n  map<string, bytes> contracts = 5;\n}\n\nmessage AccountKey {\n  uint32 index = 1;\n  bytes public_key = 2;\n  uint32 sign_algo = 3;\n  uint32 hash_algo = 4;\n  uint32 weight = 5;\n  uint32 sequence_number = 6;\n  bool revoked = 7;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/block.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nimport \"google/protobuf/timestamp.proto\";\n\nimport \"flow/entities/collection.proto\";\nimport \"flow/entities/block_seal.proto\";\nimport \"flow/entities/execution_result.proto\";\nimport \"flow/entities/block_header.proto\";\n\nenum BlockStatus {\n  BLOCK_UNKNOWN = 0;\n  BLOCK_FINALIZED = 1;\n  BLOCK_SEALED = 2;\n}\n\nmessage Block {\n  bytes id = 1;\n  bytes parent_id = 2;\n  uint64 height = 3;\n  google.protobuf.Timestamp timestamp = 4;\n  repeated CollectionGuarantee collection_guarantees = 5;\n  repeated BlockSeal block_seals = 6;\n  repeated bytes signatures = 7;\n  repeated ExecutionReceiptMeta execution_receipt_metaList = 8;\n  repeated ExecutionResult execution_result_list = 9;\n  BlockHeader block_header = 10;\n  bytes protocol_state_id = 11;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/block_execution_data.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nimport \"flow/entities/event.proto\";\nimport \"flow/entities/transaction.proto\";\n\n// BlockExecutionData represents the collection of data produced while execiting the block.\nmessage BlockExecutionData {\n  // Block ID of the block that was executed.\n  bytes block_id = 1;\n\n  // Ordered list of ChunkExecutionData produced while executing the block.\n  //\n  // Note: there will be one ChunkExecutionData per collection in the block, plus one for the\n  // service chunk. The service chunk is executed last and is always the last chunk in the list.\n  repeated ChunkExecutionData chunk_execution_data = 2;\n}\n\n// ChunkExecutionData represents the collection of data produced while executing a chunk.\nmessage ChunkExecutionData {\n  // Ordered list of transactions included in the collection that was executed in the chunk.\n  ExecutionDataCollection collection = 1;\n\n  // Events emitted by transactions in the collection.\n  //\n  // Note: events listed in the last ChunkExecutionData in the BlockExecutionData were emitted by\n  // the service transaction. Some, but not all, of these events are service events.\n  repeated Event events = 2;\n\n  // TrieUpdate produced by executing the collection.\n  //\n  // TrieUpdates contain a list of registers that were modified during chunk execution. The value\n  // included is the new value of the register.\n  TrieUpdate trieUpdate = 3;\n\n  // Transaction results produced by executing the collection.\n  //\n  // Note: these are not the same type of results returned by other RPCs. These results are sepcific\n  // to execution data. The most notable difference is they only include a boolean value to indicate\n  // whether or not an error was encountered during execution, not the error itself.\n  repeated ExecutionDataTransactionResult transaction_results = 4;\n}\n\n// ExecutionDataCollection represents the collection of transactions that were executed within a chunk.\n//\n// Note: this is not the same type as the entities.Collection.\nmessage ExecutionDataCollection {\n  // List of transactions included in the collection.\n  repeated Transaction transactions = 1;\n}\n\n// TrieUpdate produced by executing the collection.\n//\n// TrieUpdates contain a list of registers that were modified during chunk execution. The value\n// included is the new value of the register.\nmessage TrieUpdate {\n  // RootHash is the root hash of the trie before the update is applied.\n  bytes root_hash = 1;\n\n  // List of register paths updated.\n  //\n  // Note: paths and payloads map 1:1 with eachother. i.e. for each element in path, the value in\n  // payloads at the same index is the value of the register at that path.\n  repeated bytes paths = 2;\n\n  // List of register values updated.\n  //\n  // Note: paths and payloads map 1:1 with eachother. i.e. for each element in path, the value in\n  // payloads at the same index is the value of the register at that path.\n  repeated Payload payloads = 3;\n}\n\n// Payload represents the key-value pair of a register.\nmessage Payload {\n  // List of key parts that make up the register key.\n  // Can be converted into register id.\n  repeated KeyPart keyPart = 1;\n\n  // Value of the register.\n  bytes value = 2;\n}\n\n// KeyPart represents a part of a register key.\nmessage KeyPart {\n  // Type of the key part.\n  uint32 type = 1;\n\n  // Value of the key part.\n  bytes value = 2;\n}\n\n// ExecutionDataTransactionResult represents the result of executing a transaction.\nmessage ExecutionDataTransactionResult {\n  // Transaction ID of the transaction that was executed.\n  bytes transaction_id = 1;\n\n  // Boolean indicating whether or not the transaction's execution failed with an error.\n  bool failed = 2;\n\n  // Amount of computation used during execution.\n  uint64 computation_used = 3;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/block_header.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nimport \"google/protobuf/timestamp.proto\";\n\nmessage BlockHeader {\n  bytes id = 1;\n  bytes parent_id = 2;\n  uint64 height = 3;\n  google.protobuf.Timestamp timestamp = 4;\n  bytes payload_hash = 5;\n  uint64 view = 6;\n  repeated bytes parent_voter_ids = 7; // deprecated!! value will be empty. replaced by parent_vote_indices\n  bytes parent_voter_sig_data = 8;\n  bytes proposer_id = 9;\n  bytes proposer_sig_data = 10;\n  string chain_id = 11;\n  bytes parent_voter_indices = 12;\n  TimeoutCertificate last_view_tc = 13;\n  uint64 parent_view = 14;\n}\n\nmessage TimeoutCertificate {\n  uint64 view = 1;\n  repeated uint64 high_qc_views = 2;\n  QuorumCertificate highest_qc = 3;\n  bytes signer_indices = 4;\n  bytes sig_data = 5;\n}\n\nmessage QuorumCertificate {\n  uint64 view = 1;\n  bytes block_id = 2;\n  bytes signer_indices = 3;\n  bytes sig_data = 4;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/block_seal.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage BlockSeal {\n  bytes block_id = 1;\n  bytes execution_receipt_id = 2;\n  repeated bytes execution_receipt_signatures = 3;\n  repeated bytes result_approval_signatures = 4;\n  bytes final_state = 5;\n  bytes result_id = 6;\n  repeated AggregatedSignature aggregated_approval_sigs = 7;\n}\n\nmessage AggregatedSignature {\n  repeated bytes verifier_signatures = 1;\n  repeated bytes signer_ids = 2;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/collection.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage Collection {\n  bytes id = 1;\n  repeated bytes transaction_ids = 2;\n}\n\nmessage CollectionGuarantee {\n  bytes collection_id = 1;\n  repeated bytes signatures = 2;\n  bytes reference_block_id = 3;\n  bytes signature = 4;\n  repeated bytes signer_ids = 5; // deprecated!! value will be empty. replaced by signer_indices\n  bytes signer_indices = 6;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/event.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nenum EventEncodingVersion {\n    JSON_CDC_V0 = 0;\n    CCF_V0 = 1;\n}\n\nmessage Event {\n  string type = 1;\n  bytes transaction_id = 2;\n  uint32 transaction_index = 3;\n  uint32 event_index = 4;\n  bytes payload = 5;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/execution_result.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage ExecutionResult {\n  bytes previous_result_id = 1;\n  bytes block_id = 2;\n  repeated Chunk chunks = 3;\n  repeated ServiceEvent service_events = 4;\n  bytes execution_data_id = 5 [deprecated = true];\n}\n\nmessage Chunk {\n  uint32 CollectionIndex = 1;\n  bytes start_state = 2;       // state when starting executing this chunk\n  bytes event_collection = 3;  // Events generated by executing results\n  bytes block_id = 4;  // Block id of the execution result this chunk belongs to\n  uint64 total_computation_used =\n      5;  // total amount of computation used by running all txs in this chunk\n  uint32 number_of_transactions =\n      6;                // number of transactions inside the collection\n  uint64 index = 7;     // chunk index inside the ER (starts from zero)\n  bytes end_state = 8;  // EndState inferred from next chunk or from the ER\n  bytes execution_data_id = 9;\n  bytes state_delta_commitment = 10; // a commitment over sorted list of register changes\n}\n\nmessage ServiceEvent {\n  string type = 1;\n  bytes payload = 2;\n}\n\nmessage ExecutionReceiptMeta {\n  bytes executor_id = 1;\n  bytes result_id = 2;\n  repeated bytes spocks = 3;\n  bytes executor_signature = 4;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/metadata.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage Metadata {\n  bytes latest_finalized_block_id = 1;\n  uint64 latest_finalized_height = 2;\n  bytes node_id = 3;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/node_version_info.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage NodeVersionInfo {\n    // The currently running node software version.\n    string semver = 1;\n    // The git commit hash of the currently running node software.\n    string commit = 2;\n    // The unique identifier for the node's network within the current spork.\n    bytes spork_id = 3;\n    // The protocol version of the currently running node software.\n    uint64 protocol_version = 4;\n    // The spork root block height. This is the height of the first sealed block in the spork network.\n    uint64 spork_root_block_height = 5;\n    // The node's root block height. This is the first sealed block in the node's protocol database.\n    // If the node started at the beginning of the spork, it is the same as the spork root block height.\n    // If the node started after the beginning of the spork, it is the height of the first sealed block\n    // indexed.\n    uint64 node_root_block_height = 6;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/register.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nmessage RegisterID {\n  bytes owner = 1;\n  bytes key = 2;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/entities/transaction.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/entities\";\noption java_package = \"org.onflow.protobuf.entities\";\n\nimport \"flow/entities/event.proto\";\n\nenum TransactionStatus {\n  UNKNOWN = 0;\n  PENDING = 1;\n  FINALIZED = 2;\n  EXECUTED = 3;\n  SEALED = 4;\n  EXPIRED = 5;\n}\n\nmessage Transaction {\n  message ProposalKey {\n    bytes address = 1;\n    uint32 key_id = 2;\n    uint64 sequence_number = 3;\n  }\n\n  message Signature {\n    bytes address = 1;\n    uint32 key_id = 2;\n    bytes signature = 3;\n  }\n\n  bytes script = 1;\n  repeated bytes arguments = 2;\n  bytes reference_block_id = 3;\n  uint64 gas_limit = 4;\n  ProposalKey proposal_key = 5;\n  bytes payer = 6;\n  repeated bytes authorizers = 7;\n  repeated Signature payload_signatures = 8;\n  repeated Signature envelope_signatures = 9;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/execution/execution.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.execution;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/execution\";\noption java_package = \"org.onflow.protobuf.execution\";\n\nimport \"flow/entities/account.proto\";\nimport \"flow/entities/block_header.proto\";\nimport \"flow/entities/event.proto\";\nimport \"flow/entities/transaction.proto\";\n\n// ExecutionAPI is the API provided by the execution nodes.\nservice ExecutionAPI {\n  // Ping is used to check if the access node is alive and healthy.\n  rpc Ping(PingRequest) returns (PingResponse);\n\n  // Accounts\n\n  // GetAccountAtBlockID gets an account by address at the given block ID\n  rpc GetAccountAtBlockID(GetAccountAtBlockIDRequest)\n      returns (GetAccountAtBlockIDResponse);\n\n  // Scripts\n\n  // ExecuteScriptAtBlockID executes a ready-only Cadence script against the\n  // execution state at the block with the given ID.\n  rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest)\n      returns (ExecuteScriptAtBlockIDResponse);\n\n  // Events\n\n  // GetEventsForBlockIDs retrieves events for all the specified block IDs that\n  // have the given type\n  rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest)\n      returns (GetEventsForBlockIDsResponse);\n\n  // Transaction\n\n  // GetTransactionResult gets the result of a transaction.\n  rpc GetTransactionResult(GetTransactionResultRequest)\n      returns (GetTransactionResultResponse);\n\n  // GetTransactionResultByIndex gets the result of a transaction at the index.\n  rpc GetTransactionResultByIndex(GetTransactionByIndexRequest)\n      returns (GetTransactionResultResponse);\n\n  // GetTransactionResultByIndex gets the results of all transactions in the\n  // block ordered by transaction index.\n  rpc GetTransactionResultsByBlockID(GetTransactionsByBlockIDRequest)\n      returns (GetTransactionResultsResponse);\n\n  // GetTransactionErrorMessage gets the error messages of a failed transaction by id.\n  rpc GetTransactionErrorMessage(GetTransactionErrorMessageRequest)\n    returns (GetTransactionErrorMessageResponse);\n\n  // GetTransactionErrorMessageByIndex gets the error messages of a failed transaction at the index.\n  rpc GetTransactionErrorMessageByIndex(GetTransactionErrorMessageByIndexRequest)\n    returns (GetTransactionErrorMessageResponse);\n\n  // GetTransactionErrorMessagesByBlockID gets the error messages of all failed transactions in the\n  // block ordered by transaction index.\n  rpc GetTransactionErrorMessagesByBlockID(GetTransactionErrorMessagesByBlockIDRequest)\n    returns (GetTransactionErrorMessagesResponse);\n\n  // Registers\n\n  // GetRegisterAtBlockID collects a register at the block with the given ID (if\n  // available).\n  rpc GetRegisterAtBlockID(GetRegisterAtBlockIDRequest)\n      returns (GetRegisterAtBlockIDResponse);\n\n  // Block headers\n\n  // GetLatestBlockHeader gets the latest sealed or unsealed block header.\n  rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest)\n      returns (BlockHeaderResponse);\n  // GetBlockHeaderByID gets a block header by ID.\n  rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest)\n      returns (BlockHeaderResponse);\n}\n\n// Ping\n\nmessage PingRequest {}\n\nmessage PingResponse {}\n\n// Accounts\n\nmessage GetAccountAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes address = 2;\n}\n\nmessage GetAccountAtBlockIDResponse {\n  entities.Account account = 1;\n}\n\n// Scripts\n\nmessage ExecuteScriptAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptAtBlockIDResponse {\n  bytes value = 1;\n  uint64 computation_usage = 2;\n}\n\n// Events\n\nmessage GetEventsForBlockIDsResponse {\n  message Result {\n    bytes block_id = 1;\n    uint64 block_height = 2;\n    repeated entities.Event events = 3;\n  }\n  repeated Result results = 1;\n  entities.EventEncodingVersion event_encoding_version = 2;\n}\n\nmessage GetEventsForBlockIDsRequest {\n  string type = 1;\n  repeated bytes block_ids = 2;\n}\n\n// Transactions\n\nmessage GetTransactionResultRequest {\n  bytes block_id = 1;\n  bytes transaction_id = 2;\n}\n\nmessage GetTransactionByIndexRequest {\n  bytes block_id = 1;\n  uint32 index = 2;\n}\n\nmessage GetTransactionResultResponse {\n  uint32 status_code = 1;\n  string error_message = 2;\n  repeated entities.Event events = 3;\n  entities.EventEncodingVersion event_encoding_version = 4;\n  uint64 computation_usage = 5;\n}\n\nmessage GetTransactionsByBlockIDRequest {\n  bytes block_id = 1;\n}\n\nmessage GetTransactionResultsResponse {\n  repeated GetTransactionResultResponse transaction_results = 1;\n  entities.EventEncodingVersion event_encoding_version = 2;\n}\n\nmessage GetTransactionErrorMessageRequest {\n  bytes block_id = 1;\n  bytes transaction_id = 2;\n}\n\nmessage GetTransactionErrorMessageByIndexRequest {\n  bytes block_id = 1;\n  uint32 index = 2;\n}\n\nmessage GetTransactionErrorMessageResponse {\n  bytes transaction_id = 1;\n  string error_message = 2;\n}\n\nmessage GetTransactionErrorMessagesByBlockIDRequest {\n  bytes block_id = 1;\n}\n\nmessage GetTransactionErrorMessagesResponse {\n  message Result {\n    bytes transaction_id = 1;\n    uint32 index = 2;\n    string error_message = 3;\n  }\n  repeated Result results = 1;\n}\n\n// Registers\n\nmessage GetRegisterAtBlockIDRequest {\n  reserved 3;\n  bytes block_id = 1;\n  bytes register_owner = 2;\n  // bytes register_controller = 3; @deprecated\n  bytes register_key = 4;\n}\n\nmessage GetRegisterAtBlockIDResponse {\n  bytes value = 1;\n}\n\n// Block Headers\n\nmessage GetLatestBlockHeaderRequest {\n  bool is_sealed = 1;\n}\n\nmessage GetBlockHeaderByIDRequest {\n  bytes id = 1;\n}\n\nmessage BlockHeaderResponse {\n  entities.BlockHeader block = 1;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/executiondata/executiondata.proto",
    "content": "syntax = \"proto3\";\n\npackage flow.executiondata;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/executiondata\";\noption java_package = \"org.onflow.protobuf.executiondata\";\n\nimport \"flow/entities/block_execution_data.proto\";\nimport \"flow/entities/event.proto\";\nimport \"flow/entities/register.proto\";\nimport \"google/protobuf/timestamp.proto\";\n\n// Execution Data API provides access to execution data from the Flow network\nservice ExecutionDataAPI {\n  // GetExecutionDataByBlockID returns execution data for a specific block ID.\n  //\n  // Errors:\n  // - InvalidArgument is returned if the request contains an invalid block ID.\n  // - NotFound is returned if the start block or execution data are not\n  // currently available on the\n  //   node. This may happen if the block was from a previous spork, or if the\n  //   block has yet not been received.\n  rpc GetExecutionDataByBlockID(GetExecutionDataByBlockIDRequest)\n      returns (GetExecutionDataByBlockIDResponse);\n\n  // SubscribeExecutionData streams execution data for all blocks starting at\n  // the requested start block, up until the latest available block. Once the\n  // latest is reached, the stream will remain open and responses are sent for\n  // each new execution data as it becomes available.\n  //\n  // Errors:\n  // - InvalidArgument is returned if the request contains an invalid start\n  // block.\n  // - NotFound is returned if the start block is not currently available on the\n  // node. This may\n  //   happen if the block was from a previous spork, or if the block has yet\n  //   not been received.\n  rpc SubscribeExecutionData(SubscribeExecutionDataRequest)\n      returns (stream SubscribeExecutionDataResponse);\n\n  // SubscribeEvents streams events for all blocks starting at the requested\n  // start block, up until the latest available block. Once the latest is\n  // reached, the stream will remain open and responses are sent for each new\n  // block as it becomes available.\n  //\n  // Events within each block are filtered by the provided EventFilter, and only\n  // those events that match the filter are returned. If no filter is provided,\n  // all events are returned.\n  //\n  // Responses are returned for each block containing at least one event that\n  // matches the filter. Additionally, heatbeat responses\n  // (SubscribeEventsResponse with no events) are returned periodically to allow\n  // clients to track which blocks were searched. Clients can use this\n  // information to determine which block to start from when reconnecting.\n  //\n  // Errors:\n  // - InvalidArgument is returned if the request contains an invalid\n  // EventFilter or start block.\n  // - NotFound is returned if the start block is not currently available on the\n  // node. This may\n  //   happen if the block was from a previous spork, or if the block has yet\n  //   not been received.\n  rpc SubscribeEvents(SubscribeEventsRequest)\n      returns (stream SubscribeEventsResponse);\n\n  // GetRegisterValues gets the values for the given register IDs as of the given block height\n  rpc GetRegisterValues(GetRegisterValuesRequest)\n      returns (GetRegisterValuesResponse);\n}\n\n// The request for GetExecutionDataByBlockID\nmessage GetExecutionDataByBlockIDRequest {\n  // Block ID of the block to get execution data for.\n  bytes block_id = 1;\n  // Preferred event encoding version of the block events payload.\n  // Possible variants:\n  // 1. CCF\n  // 2. JSON-CDC\n  entities.EventEncodingVersion event_encoding_version = 2;\n}\n\n// The response for GetExecutionDataByBlockID\nmessage GetExecutionDataByBlockIDResponse {\n  // BlockExecutionData for the block.\n  entities.BlockExecutionData block_execution_data = 1;\n}\n\n// The request for SubscribeExecutionData\nmessage SubscribeExecutionDataRequest {\n  // Block ID of the first block to get execution data for.\n  // Only one of start_block_id and start_block_height may be provided,\n  // otherwise an InvalidArgument error is returned. If neither are provided,\n  // the latest sealed block is used.\n  bytes start_block_id = 1;\n\n  // Block height of the first block to get execution data for.\n  // Only one of start_block_id and start_block_height may be provided,\n  // otherwise an InvalidArgument error is returned. If neither are provided,\n  // the latest sealed block is used.\n  uint64 start_block_height = 2;\n\n  // Preferred event encoding version of the block events payload.\n  // Possible variants:\n  // 1. CCF\n  // 2. JSON-CDC\n  entities.EventEncodingVersion event_encoding_version = 3;\n}\n\n// The response for SubscribeExecutionData\nmessage SubscribeExecutionDataResponse {\n  // Block height of the block containing the execution data.\n  uint64 block_height = 1;\n\n  // BlockExecutionData for the block.\n  // Note: The block's ID is included within the BlockExecutionData.\n  entities.BlockExecutionData block_execution_data = 2;\n\n  // Timestamp from the block containing the execution data.\n  google.protobuf.Timestamp block_timestamp = 3;\n}\n\n// The request for SubscribeEvents\nmessage SubscribeEventsRequest {\n  // Block ID of the first block to search for events.\n  // Only one of start_block_id and start_block_height may be provided,\n  // otherwise an InvalidArgument error is returned. If neither are provided,\n  // the latest sealed block is used.\n  bytes start_block_id = 1;\n\n  // Block height of the first block to search for events.\n  // Only one of start_block_id and start_block_height may be provided,\n  // otherwise an InvalidArgument error is returned. If neither are provided,\n  // the latest sealed block is used.\n  uint64 start_block_height = 2;\n\n  // Filter to apply to events for each block searched.\n  // If no filter is provided, all events are returned.\n  EventFilter filter = 3;\n\n  // Interval in block heights at which the server should return a heartbeat\n  // message to the client. The heartbeat is a normal SubscribeEventsResponse\n  // with no events, and allows clients to track which blocks were searched.\n  // Clients can use this information to determine which block to start from\n  // when reconnecting.\n  //\n  // The interval is calculated from the last response returned, which could be\n  // either another heartbeat or a response containing events.\n  uint64 heartbeat_interval = 4;\n\n  // Preferred event encoding version of the block events payload.\n  // Possible variants:\n  // 1. CCF\n  // 2. JSON-CDC\n  entities.EventEncodingVersion event_encoding_version = 5;\n\n}\n\n// The response for SubscribeEvents\nmessage SubscribeEventsResponse {\n  // Block ID of the block containing the events.\n  bytes block_id = 1;\n\n  // Block height of the block containing the events.\n  uint64 block_height = 2;\n\n  // Events matching the EventFilter in the request.\n  // The API may return no events which signals a periodic heartbeat. This\n  // allows clients to track which blocks were searched. Client can use this\n  // information to determine which block to start from when reconnecting.\n  repeated entities.Event events = 3;\n\n  // Timestamp from the block containing the events.\n  google.protobuf.Timestamp block_timestamp = 4;\n}\n\n// EventFilter defines the filter to apply to block events.\n// Filters are applied as an OR operation, i.e. any event matching any of the\n// filters is returned. If no filters are provided, all events are returned. If\n// there are any invalid filters, the API will return an InvalidArgument error.\nmessage EventFilter {\n  // A list of full event types to include.\n  //\n  // All events exactly matching any of the provided event types will be\n  // returned.\n  //\n  // Event types have 2 formats:\n  // - Protocol events:\n  //     flow.[event name]\n  // - Smart contract events:\n  //     A.[contract address].[contract name].[event name]\n  repeated string event_type = 1;\n\n  // A list of contracts who's events should be included.\n  //\n  // All events emitted by any of the provided contracts will be returned.\n  //\n  // Contracts have the following name formats:\n  // - Protocol events:\n  //     flow\n  // - Smart contract events:\n  //     A.[contract address].[contract name]\n  //\n  // This filter matches on the full contract including its address, not just\n  // the contract's name.\n  repeated string contract = 2;\n\n  // A list of addresses who's events should be included.\n  //\n  // All events emitted by any contract held by any of the provided addresses\n  // will be returned.\n  //\n  // Addresses must be Flow account addresses in hex format and valid for the\n  // network the node is connected to. i.e. only a mainnet address is valid for\n  // a mainnet node. Addresses may optionally include the 0x prefix.\n  repeated string address = 3;\n}\n\n// request for GetRegisterValues\nmessage GetRegisterValuesRequest {\n\n  // Block height of the execution state being queried.\n  uint64 block_height = 1;\n\n  // Register IDs of the Ledger.RegisterID format with an owner and key.\n  repeated entities.RegisterID register_ids = 2;\n}\n\n// response for GetRegisterValues\nmessage GetRegisterValuesResponse {\n\n  // raw register values at the given height.\n  repeated bytes values = 1;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/access/access.proto",
    "content": "syntax = \"proto3\";\n\npackage access;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/access\";\noption java_package = \"org.onflow.protobuf.legacy.access\";\n\nimport \"flow/legacy/entities/account.proto\";\nimport \"flow/legacy/entities/block_header.proto\";\nimport \"flow/legacy/entities/block.proto\";\nimport \"flow/legacy/entities/collection.proto\";\nimport \"flow/legacy/entities/event.proto\";\nimport \"flow/legacy/entities/transaction.proto\";\n\n// AccessAPI is the public-facing API provided by access nodes.\nservice AccessAPI {\n  // Ping is used to check if the access node is alive and healthy.\n  rpc Ping(PingRequest) returns (PingResponse);\n\n  // Block Headers\n\n  // GetLatestBlockHeader gets the latest sealed or unsealed block header.\n  rpc GetLatestBlockHeader(GetLatestBlockHeaderRequest)\n      returns (BlockHeaderResponse);\n  // GetBlockHeaderByID gets a block header by ID.\n  rpc GetBlockHeaderByID(GetBlockHeaderByIDRequest)\n      returns (BlockHeaderResponse);\n  // GetBlockHeaderByHeight gets a block header by height.\n  rpc GetBlockHeaderByHeight(GetBlockHeaderByHeightRequest)\n      returns (BlockHeaderResponse);\n\n  // Blocks\n\n  // GetLatestBlock gets the full payload of the latest sealed or unsealed\n  // block.\n  rpc GetLatestBlock(GetLatestBlockRequest) returns (BlockResponse);\n  // GetBlockByID gets a full block by ID.\n  rpc GetBlockByID(GetBlockByIDRequest) returns (BlockResponse);\n  // GetBlockByHeight gets a full block by height.\n  rpc GetBlockByHeight(GetBlockByHeightRequest) returns (BlockResponse);\n\n  // Collections\n\n  // GetCollectionByID gets a collection by ID.\n  rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse);\n\n  // Transactions\n\n  // SendTransaction submits a transaction to the network.\n  rpc SendTransaction(SendTransactionRequest) returns (SendTransactionResponse);\n  // GetTransaction gets a transaction by ID.\n  rpc GetTransaction(GetTransactionRequest) returns (TransactionResponse);\n  // GetTransactionResult gets the result of a transaction.\n  rpc GetTransactionResult(GetTransactionRequest)\n      returns (TransactionResultResponse);\n\n  // Accounts\n\n  // GetAccount is an alias for GetAccountAtLatestBlock.\n  //\n  // Warning: this function is deprecated. It behaves identically to\n  // GetAccountAtLatestBlock and will be removed in a future version.\n  rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);\n  // GetAccountAtLatestBlock gets an account by address from the latest sealed\n  // execution state.\n  rpc GetAccountAtLatestBlock(GetAccountAtLatestBlockRequest)\n      returns (AccountResponse);\n  // GetAccountAtBlockHeight gets an account by address at the given block\n  // height\n  rpc GetAccountAtBlockHeight(GetAccountAtBlockHeightRequest)\n      returns (AccountResponse);\n\n  // Scripts\n\n  // ExecuteScriptAtLatestBlock executes a read-only Cadence script against the\n  // latest sealed execution state.\n  rpc ExecuteScriptAtLatestBlock(ExecuteScriptAtLatestBlockRequest)\n      returns (ExecuteScriptResponse);\n  // ExecuteScriptAtBlockID executes a ready-only Cadence script against the\n  // execution state at the block with the given ID.\n  rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest)\n      returns (ExecuteScriptResponse);\n  // ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the\n  // execution state at the given block height.\n  rpc ExecuteScriptAtBlockHeight(ExecuteScriptAtBlockHeightRequest)\n      returns (ExecuteScriptResponse);\n\n  // Events\n\n  // GetEventsForHeightRange retrieves events emitted within the specified block\n  // range.\n  rpc GetEventsForHeightRange(GetEventsForHeightRangeRequest)\n      returns (EventsResponse);\n\n  // GetEventsForBlockIDs retrieves events for the specified block IDs and event\n  // type.\n  rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest)\n      returns (EventsResponse);\n\n  // NetworkParameters\n\n  // GetNetworkParameters retrieves the Flow network details\n  rpc GetNetworkParameters(GetNetworkParametersRequest)\n      returns (GetNetworkParametersResponse);\n}\n\nmessage PingRequest {}\n\nmessage PingResponse {}\n\n// Block Headers\n\nmessage GetLatestBlockHeaderRequest {\n  bool is_sealed = 1;\n}\n\nmessage GetBlockHeaderByIDRequest {\n  bytes id = 1;\n}\n\nmessage GetBlockHeaderByHeightRequest {\n  uint64 height = 1;\n}\n\nmessage BlockHeaderResponse {\n  entities.BlockHeader block = 1;\n}\n\n// Blocks\n\nmessage GetLatestBlockRequest {\n  bool is_sealed = 1;\n}\n\nmessage GetBlockByIDRequest {\n  bytes id = 1;\n}\n\nmessage GetBlockByHeightRequest {\n  uint64 height = 1;\n}\n\nmessage BlockResponse {\n  entities.Block block = 1;\n}\n\n// Collections\n\nmessage GetCollectionByIDRequest {\n  bytes id = 1;\n}\n\nmessage CollectionResponse {\n  entities.Collection collection = 1;\n}\n\n// Transactions\n\nmessage SendTransactionRequest {\n  entities.Transaction transaction = 1;\n}\n\nmessage SendTransactionResponse {\n  bytes id = 1;\n}\n\nmessage GetTransactionRequest {\n  bytes id = 1;\n}\n\nmessage TransactionResponse {\n  entities.Transaction transaction = 1;\n}\n\nmessage TransactionResultResponse {\n  entities.TransactionStatus status = 1;\n  uint32 status_code = 2;\n  string error_message = 3;\n  repeated entities.Event events = 4;\n}\n\n// Accounts\n\nmessage GetAccountRequest {\n  bytes address = 1;\n}\n\nmessage GetAccountResponse {\n  entities.Account account = 1;\n}\n\nmessage GetAccountAtLatestBlockRequest {\n  bytes address = 1;\n}\n\nmessage AccountResponse {\n  entities.Account account = 1;\n}\n\nmessage GetAccountAtBlockHeightRequest {\n  bytes address = 1;\n  uint64 block_height = 2;\n}\n\n// Scripts\n\nmessage ExecuteScriptAtLatestBlockRequest {\n  bytes script = 1;\n  repeated bytes arguments = 2;\n}\n\nmessage ExecuteScriptAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptAtBlockHeightRequest {\n  uint64 block_height = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptResponse {\n  bytes value = 1;\n}\n\n// Events\n\nmessage GetEventsForHeightRangeRequest {\n  string type = 1;\n  uint64 start_height = 2;\n  uint64 end_height = 3;\n}\n\nmessage GetEventsForBlockIDsRequest {\n  string type = 1;\n  repeated bytes block_ids = 2;\n}\n\nmessage EventsResponse {\n  message Result {\n    bytes block_id = 1;\n    uint64 block_height = 2;\n    repeated entities.Event events = 3;\n  }\n  repeated Result results = 1;\n}\n\n// Network Parameters\n\nmessage GetNetworkParametersRequest {}\n\nmessage GetNetworkParametersResponse {\n  string chain_id = 1;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/account.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nmessage Account {\n  bytes address = 1;\n  uint64 balance = 2;\n  bytes code = 3;\n  repeated AccountKey keys = 4;\n}\n\nmessage AccountKey {\n  uint32 index = 1;\n  bytes public_key = 2;\n  uint32 sign_algo = 3;\n  uint32 hash_algo = 4;\n  uint32 weight = 5;\n  uint32 sequence_number = 6;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/block.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nimport \"google/protobuf/timestamp.proto\";\n\nimport \"flow/legacy/entities/collection.proto\";\nimport \"flow/legacy/entities/block_seal.proto\";\n\nmessage Block {\n  bytes id = 1;\n  bytes parent_id = 2;\n  uint64 height = 3;\n  google.protobuf.Timestamp timestamp = 4;\n  repeated CollectionGuarantee collection_guarantees = 5;\n  repeated BlockSeal block_seals = 6;\n  repeated bytes signatures = 7;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/block_header.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nimport \"google/protobuf/timestamp.proto\";\n\nmessage BlockHeader {\n  bytes id = 1;\n  bytes parent_id = 2;\n  uint64 height = 3;\n  google.protobuf.Timestamp timestamp = 4;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/block_seal.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nmessage BlockSeal {\n  bytes block_id = 1;\n  bytes execution_receipt_id = 2;\n  repeated bytes execution_receipt_signatures = 3;\n  repeated bytes result_approval_signatures = 4;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/collection.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nmessage Collection {\n  bytes id = 1;\n  repeated bytes transaction_ids = 2;\n}\n\nmessage CollectionGuarantee {\n  bytes collection_id = 1;\n  repeated bytes signatures = 2;\n}"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/event.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nmessage Event {\n  string type = 1;\n  bytes transaction_id = 2;\n  uint32 transaction_index = 3;\n  uint32 event_index = 4;\n  bytes payload = 5;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/entities/transaction.proto",
    "content": "syntax = \"proto3\";\n\npackage entities;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/entities\";\noption java_package = \"org.onflow.protobuf.legacy.entities\";\n\nenum TransactionStatus {\n  UNKNOWN = 0;\n  PENDING = 1;\n  FINALIZED = 2;\n  EXECUTED = 3;\n  SEALED = 4;\n  EXPIRED = 5;\n}\n\nmessage Transaction {\n  message ProposalKey {\n    bytes address = 1;\n    uint32 key_id = 2;\n    uint64 sequence_number = 3;\n  }\n\n  message Signature {\n    bytes address = 1;\n    uint32 key_id = 2;\n    bytes signature = 3;\n  }\n\n  bytes script = 1;\n  repeated bytes arguments = 2;\n  bytes reference_block_id = 3;\n  uint64 gas_limit = 4;\n  ProposalKey proposal_key = 5;\n  bytes payer = 6;\n  repeated bytes authorizers = 7;\n  repeated Signature payload_signatures = 8;\n  repeated Signature envelope_signatures = 9;\n}\n"
  },
  {
    "path": "packages/protobuf/src/proto/flow/legacy/execution/execution.proto",
    "content": "syntax = \"proto3\";\n\npackage execution;\n\noption go_package = \"github.com/onflow/flow/protobuf/go/flow/legacy/execution\";\noption java_package = \"org.onflow.protobuf.legacy.execution\";\n\nimport \"flow/legacy/entities/account.proto\";\nimport \"flow/legacy/entities/event.proto\";\n\n// ExecutionAPI is the API provided by the execution nodes.\nservice ExecutionAPI {\n  // Ping is used to check if the access node is alive and healthy.\n  rpc Ping(PingRequest) returns (PingResponse);\n\n  // Accounts\n\n  // GetAccountAtBlockID gets an account by address at the given block ID\n  rpc GetAccountAtBlockID(GetAccountAtBlockIDRequest)\n      returns (GetAccountAtBlockIDResponse);\n\n  // Scripts\n\n  // ExecuteScriptAtBlockID executes a ready-only Cadence script against the\n  // execution state at the block with the given ID.\n  rpc ExecuteScriptAtBlockID(ExecuteScriptAtBlockIDRequest)\n      returns (ExecuteScriptAtBlockIDResponse);\n\n  // Events\n\n  // GetEventsForBlockIDs retrieves events for all the specified block IDs that\n  // have the given type\n  rpc GetEventsForBlockIDs(GetEventsForBlockIDsRequest)\n      returns (GetEventsForBlockIDsResponse);\n\n  // Transaction\n\n  // GetTransactionResult gets the result of a transaction.\n  rpc GetTransactionResult(GetTransactionResultRequest)\n      returns (GetTransactionResultResponse);\n}\n\n// Ping\n\nmessage PingRequest {}\n\nmessage PingResponse {}\n\n// Accounts\n\nmessage GetAccountAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes address = 2;\n}\n\nmessage GetAccountAtBlockIDResponse {\n  entities.Account account = 1;\n}\n\n// Scripts\n\nmessage ExecuteScriptAtBlockIDRequest {\n  bytes block_id = 1;\n  bytes script = 2;\n  repeated bytes arguments = 3;\n}\n\nmessage ExecuteScriptAtBlockIDResponse {\n  bytes value = 1;\n}\n\n// Events\n\nmessage GetEventsForBlockIDsResponse {\n  message Result {\n    bytes block_id = 1;\n    uint64 block_height = 2;\n    repeated entities.Event events = 3;\n  }\n  repeated Result results = 1;\n}\n\nmessage GetEventsForBlockIDsRequest {\n  string type = 1;\n  repeated bytes block_ids = 2;\n}\n\n// Transactions\n\nmessage GetTransactionResultRequest {\n  bytes block_id = 1;\n  bytes transaction_id = 2;\n}\n\nmessage GetTransactionResultResponse {\n  uint32 status_code = 1;\n  string error_message = 2;\n  repeated entities.Event events = 3;\n}\n"
  },
  {
    "path": "packages/protobuf/webpack.config.js",
    "content": "const path = require(\"path\")\n\nmodule.exports = {\n  entry: \"./src/index.js\",\n  target: \"node\",\n  devtool: \"source-map\",\n  output: {\n    path: path.resolve(__dirname, \"dist\"),\n    filename: \"index.js\",\n    libraryTarget: \"commonjs-module\",\n  },\n}\n"
  },
  {
    "path": "packages/react-core/.npmignore",
    "content": "src/\n*.test.ts\n*.test.tsx\n__tests__/\n__mocks__/\ntsconfig.json\n.eslintrc.js\njest.config.js\n"
  },
  {
    "path": "packages/react-core/CHANGELOG.md",
    "content": "# @onflow/react-core\n\n## 0.9.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338) Thanks [@mfbz](https://github.com/mfbz)! - Added react-native-sdk package, similar to react-sdk but for react-native applications. It fully supports all the same hooks available in react-sdk, plus the connect and profile components. It leverages fcl-react-native for managing blockchain interactions and it's compatible to both react-native and expo applications.\n\n## 0.8.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/fcl-core@1.30.1\n\n## 0.8.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/fcl-core@1.30.0\n\n## 0.7.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/fcl-core@1.29.0\n\n## 0.6.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/fcl-core@1.28.0\n\n## 0.5.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/fcl-core@1.27.0\n\n## 0.4.0\n\n### Minor Changes\n\n- [#2756](https://github.com/onflow/fcl-js/pull/2756) [`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6) Thanks [@mfbz](https://github.com/mfbz)! - Packages re-released after lerna update.\n\n### Patch Changes\n\n- Updated dependencies [[`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6)]:\n  - @onflow/fcl-core@1.26.0\n\n## 0.3.0\n\n### Minor Changes\n\n- [#2747](https://github.com/onflow/fcl-js/pull/2747) [`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65) Thanks [@jribbink](https://github.com/jribbink)! - Add support for fork networks (mainnet-fork, testnet-fork) to enable testing against forked emulator with automatic contract alias inheritance from parent networks. Fork networks allow developers to run their dapps and E2E tests against a local emulator that mirrors mainnet or testnet state, while supporting contract-specific overrides.\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/fcl-core@1.25.0\n\n## 0.2.0\n\n### Minor Changes\n\n- [#2733](https://github.com/onflow/fcl-js/pull/2733) [`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd) Thanks [@mfbz](https://github.com/mfbz)! - Add react-core package with platform-agnostic hooks with common utils and types extracted from react-sdk. Refactored react-sdk to use react-core package.\n\n### Patch Changes\n\n- Updated dependencies [[`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd)]:\n  - @onflow/fcl-core@1.24.0\n"
  },
  {
    "path": "packages/react-core/README.md",
    "content": "# @onflow/react-core\n\n**Internal private package** - Platform-agnostic React hooks and utilities for Flow blockchain.\n\nThis package provides shared functionality for:\n\n- `@onflow/react-sdk` (Web)\n- `@onflow/react-native-sdk` (React Native)\n\n## Not Published\n\nThis package is **private** and used only within the monorepo. It is never published to npm.\n\n## Contents\n\n- **Hooks**: All Flow blockchain React hooks (useFlowClient, useFlowMutate, etc.)\n- **Core**: Contexts, types, and interfaces\n- **Utils**: Helper functions (deepEqual, flowscan)\n- **Constants**: Contract addresses and configuration\n\n## Usage\n\nDo not import directly from this package. Import from the platform SDK:\n\n```typescript\n// Web\nimport {useFlowClient} from \"@onflow/react-sdk\"\n\n// React Native\nimport {useFlowClient} from \"@onflow/react-native-sdk\"\n```\n"
  },
  {
    "path": "packages/react-core/babel.config.js",
    "content": "module.exports = {\n  presets: [\n    [\"@babel/preset-env\", {targets: {node: \"current\"}}],\n    \"@babel/preset-typescript\",\n    \"@babel/preset-react\",\n  ],\n}\n"
  },
  {
    "path": "packages/react-core/jest.config.js",
    "content": "module.exports = {\n  testEnvironment: \"jsdom\",\n  // This is a workaround with Jest v29 issues related to BigInt serialization\n  // It can be removed once Jest v30 is released and upgraded\n  // https://github.com/jestjs/jest/issues/11617\n  workerThreads: true,\n  setupFiles: [\"<rootDir>/src/jest-setup.ts\"],\n}\n"
  },
  {
    "path": "packages/react-core/package.json",
    "content": "{\n  \"name\": \"@onflow/react-core\",\n  \"version\": \"0.9.0\",\n  \"description\": \"Platform-agnostic React hooks and utilities for Flow blockchain\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"sideEffects\": false,\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"types\": \"types/index.d.ts\",\n  \"source\": \"src/index.ts\",\n  \"files\": [\n    \"dist\",\n    \"types\"\n  ],\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"build:types\": \"tsc\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@onflow/fcl-core\": \"^1.30.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@tanstack/react-query\": \"^5.67.3\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"^18.0.0 || ^19.0.0\",\n    \"viem\": \"^2.29.2\"\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@babel/preset-env\": \"^7.26.9\",\n    \"@babel/preset-react\": \"^7.26.3\",\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@testing-library/react\": \"^16.2.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/react\": \"^19.0.10\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/__mocks__/TestProvider.tsx",
    "content": "import React, {PropsWithChildren} from \"react\"\nimport {QueryClient, QueryClientProvider} from \"@tanstack/react-query\"\nimport {FlowClientContext} from \"../core/context\"\nimport {FlowQueryClientContext} from \"../provider\"\nimport {createMockFclInstance} from \"./flow-client\"\n\nexport const queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      retry: false,\n      staleTime: 0,\n      refetchOnWindowFocus: false,\n      refetchOnReconnect: false,\n      refetchIntervalInBackground: false,\n    },\n  },\n})\n\n// Shared mock instance that tests can control\nlet sharedMockInstance: any = null\n\n/**\n * Set the mock FlowClient instance to be used by TestProvider\n * Call this in your test's beforeEach to inject your configured mock\n */\nexport function setMockFlowClient(mockInstance: any) {\n  sharedMockInstance = mockInstance\n}\n\n/**\n * Get the current mock FlowClient instance\n */\nexport function getMockFlowClient() {\n  return sharedMockInstance\n}\n\n/**\n * Test-only Provider for react-core hooks\n * Provides both QueryClient and FlowClient context for testing\n */\nexport function TestProvider({children}: PropsWithChildren<{}>) {\n  // Use shared instance if available, otherwise create a new one\n  const mockFclInstance =\n    sharedMockInstance || createMockFclInstance().mockFclInstance\n\n  return (\n    <QueryClientProvider client={queryClient}>\n      <FlowQueryClientContext.Provider value={queryClient}>\n        <FlowClientContext.Provider value={mockFclInstance}>\n          {children}\n        </FlowClientContext.Provider>\n      </FlowQueryClientContext.Provider>\n    </QueryClientProvider>\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/__mocks__/flow-client.ts",
    "content": "import {authenticatedUser, defaultUser} from \"./user\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {tx as realTx} from \"@onflow/fcl-core\"\n\nconst sharedSubscribe = jest.fn(callback => {\n  callback({\n    \"accessNode.api\": \"http://localhost:8080\",\n    \"app.detail.title\": \"Test App\",\n  })\n  return () => {}\n})\n\nlet currentUserState = defaultUser\n\nexport const createMockFclInstance = () => {\n  // Store the response that will be returned by send/decode\n  let mockSendResponse: any = {}\n\n  let mockTxResponse = {\n    snapshot: jest.fn(),\n    subscribe: jest.fn(),\n    onceFinalized: jest.fn(),\n    onceExecuted: jest.fn(),\n    onceSealed: jest.fn(),\n  }\n  const mockTx = Object.assign(jest.fn().mockReturnValue(mockTxResponse), {\n    // Use real transaction status helpers from fcl-core\n    isUnknown: jest.fn().mockImplementation(realTx.isUnknown),\n    isPending: jest.fn().mockImplementation(realTx.isPending),\n    isFinalized: jest.fn().mockImplementation(realTx.isFinalized),\n    isExecuted: jest.fn().mockImplementation(realTx.isExecuted),\n    isSealed: jest.fn().mockImplementation(realTx.isSealed),\n    isExpired: jest.fn().mockImplementation(realTx.isExpired),\n  })\n\n  const mockCurrentUser = {\n    subscribe: jest.fn().mockImplementation((callback: any) => {\n      callback(currentUserState)\n      return () => {}\n    }),\n    snapshot: async () => currentUserState,\n    authenticate: jest.fn().mockImplementation(() => {\n      currentUserState = authenticatedUser\n      return Promise.resolve(authenticatedUser)\n    }),\n    unauthenticate: jest.fn().mockImplementation(() => {\n      currentUserState = defaultUser\n    }),\n    authorization: jest.fn(),\n    signUserMessage: jest.fn().mockImplementation(() => {\n      return Promise.resolve(\"signedMessage\")\n    }),\n    resolveArgument: jest.fn(),\n  }\n\n  const mockFclInstance: jest.Mocked<FlowClientCore> = {\n    account: jest.fn(),\n    block: jest.fn(),\n    events: jest.fn(),\n    mutate: jest.fn(),\n    query: jest.fn(),\n    queryRaw: jest.fn(),\n    tx: mockTx,\n    send: jest.fn().mockImplementation(args => {\n      // The real FCL returns a promise that can be chained with .then(fcl.decode)\n      return Promise.resolve(mockSendResponse)\n    }),\n    decode: jest.fn().mockImplementation(result => {\n      return Promise.resolve(result)\n    }),\n\n    currentUser: mockCurrentUser,\n    authenticate: jest.fn().mockImplementation(() => {\n      currentUserState = authenticatedUser\n      return Promise.resolve(authenticatedUser)\n    }),\n    unauthenticate: jest.fn().mockImplementation(() => {\n      currentUserState = defaultUser\n    }),\n    getChainId: jest.fn().mockResolvedValue(\"mainnet\"),\n    getTransaction: jest.fn().mockImplementation((txId: string) => {\n      // Make getTransaction set the response that send/decode will return\n      return Promise.resolve(mockSendResponse)\n    }),\n    subscribe: jest.fn(),\n    subscribeRaw: jest.fn(),\n    resolve: jest.fn(),\n    verifyUserSignatures: jest\n      .fn()\n      .mockRejectedValue(new Error(\"Not implemented\")),\n    signUserMessage: mockCurrentUser.signUserMessage,\n    serialize: jest.fn(),\n  }\n\n  return {\n    mockFclInstance,\n    mockTx,\n    // Helper to set what send/decode should return\n    setMockSendResponse: (response: any) => {\n      mockSendResponse = response\n    },\n  }\n}\n\nexport type MockFclInstance = ReturnType<typeof createMockFclInstance>\n"
  },
  {
    "path": "packages/react-core/src/__mocks__/tx.ts",
    "content": "import {TransactionStatus} from \"@onflow/typedefs\"\n\nexport const defaultTxStatus: TransactionStatus = {\n  blockId: \"\",\n  status: 0,\n  statusString: \"UNKNOWN\",\n  statusCode: 0,\n  errorMessage: \"\",\n  events: [],\n}\n\nexport const errorTxStatus: TransactionStatus = {\n  blockId: \"block123\",\n  status: 2,\n  statusString: \"ERROR\",\n  statusCode: 1,\n  errorMessage: \"Test error occurred\",\n  events: [],\n}\n"
  },
  {
    "path": "packages/react-core/src/__mocks__/user.ts",
    "content": "import {CurrentUser} from \"@onflow/typedefs\"\n\nexport const defaultUser: CurrentUser = {\n  f_type: \"USER\",\n  f_vsn: \"1.0.0\",\n  loggedIn: false,\n  services: [],\n}\n\nexport const authenticatedUser: CurrentUser = {\n  f_type: \"USER\",\n  f_vsn: \"1.0.0\",\n  loggedIn: true,\n  addr: \"0x1234\",\n  services: [],\n}\n"
  },
  {
    "path": "packages/react-core/src/constants.ts",
    "content": "export const CONTRACT_ADDRESSES = {\n  testnet: {\n    EVM: \"0x8c5303eaa26202d6\",\n    FungibleToken: \"0x9a0766d93b6608b7\",\n    NonFungibleToken: \"0x631e88ae7f1d7c20\",\n    ViewResolver: \"0x631e88ae7f1d7c20\",\n    MetadataViews: \"0x631e88ae7f1d7c20\",\n    FlowToken: \"0x7e60df042a9c0868\",\n    ScopedFTProviders: \"0xdfc20aee650fcbdf\",\n    FlowEVMBridge: \"0xdfc20aee650fcbdf\",\n    FlowEVMBridgeUtils: \"0xdfc20aee650fcbdf\",\n    FlowEVMBridgeConfig: \"0xdfc20aee650fcbdf\",\n    FungibleTokenMetadataViews: \"0x9a0766d93b6608b7\",\n    FlowTransactionScheduler: \"0x8c5303eaa26202d6\",\n    FlowTransactionSchedulerUtils: \"0x8c5303eaa26202d6\",\n  },\n  mainnet: {\n    EVM: \"0xe467b9dd11fa00df\",\n    FungibleToken: \"0xf233dcee88fe0abe\",\n    NonFungibleToken: \"0x1d7e57aa55817448\",\n    ViewResolver: \"0x1d7e57aa55817448\",\n    MetadataViews: \"0x1d7e57aa55817448\",\n    FlowToken: \"0x1654653399040a61\",\n    ScopedFTProviders: \"0x1e4aa0b87d10b141\",\n    FlowEVMBridge: \"0x1e4aa0b87d10b141\",\n    FlowEVMBridgeUtils: \"0x1e4aa0b87d10b141\",\n    FlowEVMBridgeConfig: \"0x1e4aa0b87d10b141\",\n    FungibleTokenMetadataViews: \"0xf233dcee88fe0abe\",\n    FlowTransactionScheduler: \"0xe467b9dd11fa00df\",\n    FlowTransactionSchedulerUtils: \"0xe467b9dd11fa00df\",\n  },\n  local: {\n    EVM: \"0xf8d6e0586b0a20c7\",\n    FungibleToken: \"0xee82856bf20e2aa6\",\n    NonFungibleToken: \"0xf8d6e0586b0a20c7\",\n    ViewResolver: \"0xf8d6e0586b0a20c7\",\n    MetadataViews: \"0xf8d6e0586b0a20c7\",\n    FlowToken: \"0x0ae53cb6e3f42a79\",\n    ScopedFTProviders: \"0xf8d6e0586b0a20c7\",\n    FlowEVMBridge: \"0xf8d6e0586b0a20c7\",\n    FlowEVMBridgeUtils: \"0xf8d6e0586b0a20c7\",\n    FlowEVMBridgeConfig: \"0xf8d6e0586b0a20c7\",\n    FungibleTokenMetadataViews: \"0xee82856bf20e2aa6\",\n    FlowTransactionScheduler: \"0xf8d6e0586b0a20c7\",\n    FlowTransactionSchedulerUtils: \"0xf8d6e0586b0a20c7\",\n  },\n}\n\nexport const CADENCE_UFIX64_PRECISION = 8\n\nexport const DEFAULT_EVM_GAS_LIMIT = \"15000000\"\n"
  },
  {
    "path": "packages/react-core/src/core/context.ts",
    "content": "import {createContext} from \"react\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport type {FlowNetwork} from \"./types\"\n\n// FlowConfig based on @onflow/fcl-core's FlowClientCoreConfig\n// This matches the config structure used by both @onflow/fcl and @onflow/fcl-react-native\n// All fields are optional since not all config is required for every use case\nexport type FlowConfig = {\n  // Core network configuration\n  accessNodeUrl?: string\n  flowNetwork?: FlowNetwork\n  flowJson?: Record<string, any>\n\n  // Wallet/Discovery configuration\n  discoveryWallet?: string\n  discoveryWalletMethod?: string\n  discoveryAuthnEndpoint?: string\n  discoveryAuthnInclude?: string[]\n  discoveryAuthnExclude?: string[]\n\n  // Compute limit for transactions\n  computeLimit?: number\n\n  // App detail properties\n  appDetailTitle?: string\n  appDetailIcon?: string\n  appDetailDescription?: string\n  appDetailUrl?: string\n\n  // Service configuration\n  serviceOpenIdScopes?: string[]\n\n  // WalletConnect configuration (web-specific)\n  walletconnectProjectId?: string\n  walletconnectDisableNotifications?: boolean\n}\n\nexport const FlowConfigContext = createContext<FlowConfig>({})\n\nexport const FlowClientContext = createContext<FlowClientCore | null>(null)\n"
  },
  {
    "path": "packages/react-core/src/core/index.ts",
    "content": "export * from \"./types\"\nexport * from \"./context\"\n"
  },
  {
    "path": "packages/react-core/src/core/types.ts",
    "content": "/**\n * Flow network identifier\n *\n * Standard networks: \"emulator\", \"testnet\", \"mainnet\"\n * Custom networks: Any string (e.g., \"mainnet-fork\", \"testnet-fork\")\n */\nexport type FlowNetwork = \"emulator\" | \"testnet\" | \"mainnet\" | (string & {})\n"
  },
  {
    "path": "packages/react-core/src/hooks/index.ts",
    "content": "export * from \"./useFlowCurrentUser\"\nexport * from \"./useFlowAuthz\"\nexport * from \"./useFlowAccount\"\nexport * from \"./useFlowBlock\"\nexport * from \"./useFlowChainId\"\nexport * from \"./useFlowClient\"\nexport * from \"./useFlowConfig\"\nexport * from \"./useFlowEvents\"\nexport * from \"./useFlowMutate\"\nexport * from \"./useFlowQuery\"\nexport * from \"./useFlowQueryRaw\"\nexport * from \"./useFlowRevertibleRandom\"\nexport * from \"./useCrossVmBatchTransaction\"\nexport * from \"./useCrossVmTokenBalance\"\nexport * from \"./useFlowTransaction\"\nexport * from \"./useFlowTransactionStatus\"\nexport * from \"./useCrossVmSpendNft\"\nexport * from \"./useCrossVmSpendToken\"\nexport * from \"./useCrossVmBridgeNftFromEvm\"\nexport * from \"./useCrossVmBridgeNftToEvm\"\nexport * from \"./useCrossVmBridgeTokenFromEvm\"\nexport * from \"./useCrossVmBridgeTokenToEvm\"\nexport * from \"./useCrossVmTransactionStatus\"\nexport * from \"./useFlowNftMetadata\"\nexport * from \"./useFlowScheduledTransactionList\"\nexport * from \"./useFlowScheduledTransaction\"\nexport * from \"./useFlowScheduledTransactionSetup\"\nexport * from \"./useFlowScheduledTransactionCancel\"\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBatchTransaction.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  encodeCalls,\n  getCadenceBatchTransaction,\n  useCrossVmBatchTransaction,\n} from \"./useCrossVmBatchTransaction\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"viem\", () => ({\n  encodeFunctionData: jest.fn(),\n  bytesToHex: jest.fn(x => `0x${x}`),\n}))\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useBatchEvmTransaction\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockCalls = [\n    {\n      address: \"0x123\",\n      abi: [{type: \"function\", name: \"test\"} as any],\n      functionName: \"test\",\n      args: [1, 2],\n      gasLimit: BigInt(100000),\n      value: BigInt(0),\n    },\n  ]\n\n  const mockTxId = \"0x123\"\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n\n    const {encodeFunctionData} = require(\"viem\")\n    jest.mocked(encodeFunctionData).mockReturnValue(\"0x\")\n\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"encodeCalls\", () => {\n    it(\"should encode calls correctly\", () => {\n      const {encodeFunctionData} = require(\"viem\")\n      jest.mocked(encodeFunctionData).mockReturnValue(\"0xabcdef123456\")\n\n      const result = encodeCalls(mockCalls)\n\n      expect(result).toEqual([\n        {\n          to: \"0x123\",\n          data: \"abcdef123456\",\n          gasLimit: \"100000\",\n          value: \"0\",\n        },\n      ])\n\n      expect(encodeFunctionData).toHaveBeenCalledWith({\n        abi: mockCalls[0].abi,\n        functionName: mockCalls[0].functionName,\n        args: mockCalls[0].args,\n      })\n    })\n  })\n\n  describe(\"getCadenceBatchTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCadenceBatchTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCadenceBatchTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should return correct cadence for local\", () => {\n      const result = getCadenceBatchTransaction(\"local\")\n      expect(result).toContain(\"import EVM from 0xf8d6e0586b0a20c7\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() => getCadenceBatchTransaction(\"unsupported\")).toThrow(\n        \"Unsupported chain: unsupported\"\n      )\n    })\n  })\n\n  describe(\"useCrossVmBatchTransaction\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmBatchTransaction, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.sendBatchTransaction({calls: mockCalls})\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    test(\"should handle error transaction\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Transaction failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(useCrossVmBatchTransaction, {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.sendBatchTransaction({calls: mockCalls})\n      })\n\n      await waitFor(() => expect(hookResult.current.isPending).toBe(false))\n\n      expect(hookResult.current.isError).toBe(true)\n      expect(hookResult.current.error?.message).toBe(\"Transaction failed\")\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: false,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBatchTransaction(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.sendBatchTransaction({calls: mockCalls})\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBatchTransaction(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.sendBatchTransaction(mockCalls)\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBatchTransaction(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.sendBatchTransaction({calls: mockCalls})\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBatchTransaction.ts",
    "content": "import {Abi, encodeFunctionData} from \"viem\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {CONTRACT_ADDRESSES, DEFAULT_EVM_GAS_LIMIT} from \"../constants\"\nimport {sansPrefix} from \"@onflow/fcl-core\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\ninterface UseCrossVmBatchTransactionMutateArgs {\n  calls: EvmBatchCall[]\n  mustPass?: boolean\n}\n\nexport interface UseCrossVmBatchTransactionArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmBatchTransactionMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmBatchTransactionResult\n  extends Omit<\n    UseMutationResult<string, Error, UseCrossVmBatchTransactionMutateArgs>,\n    \"mutate\" | \"mutateAsync\"\n  > {\n  sendBatchTransaction: UseMutateFunction<\n    string,\n    Error,\n    UseCrossVmBatchTransactionMutateArgs\n  >\n  sendBatchTransactionAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmBatchTransactionMutateArgs\n  >\n}\n\nexport interface EvmBatchCall {\n  // The target EVM contract address (as a string)\n  address: string\n  // The contract ABI fragment\n  abi: Abi\n  // The name of the function to call\n  functionName: string\n  // The function arguments\n  args?: readonly unknown[]\n  // The gas limit for the call\n  gasLimit?: bigint\n  // The value to send with the call\n  value?: bigint\n}\n\nexport function encodeCalls(\n  calls: EvmBatchCall[]\n): Array<{to: string; data: string; gasLimit: string; value: string}> {\n  return calls.map(call => {\n    const encodedData = encodeFunctionData({\n      abi: call.abi,\n      functionName: call.functionName,\n      args: call.args,\n    })\n\n    return {\n      to: call.address,\n      data: sansPrefix(encodedData) ?? \"\",\n      gasLimit: call.gasLimit?.toString() ?? DEFAULT_EVM_GAS_LIMIT,\n      value: call.value?.toString() ?? \"0\",\n    }\n  })\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCadenceBatchTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport EVM from ${contractAddresses.EVM}\n\ntransaction(calls: [{String: AnyStruct}], mustPass: Bool) {\n\n    let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount\n\n    prepare(signer: auth(BorrowValue) & Account) {\n        let storagePath = /storage/evm\n        self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: storagePath)\n            ?? panic(\"No CadenceOwnedAccount (COA) found at \".concat(storagePath.toString()))\n    }\n\n    execute {\n        for i, call in calls {\n            let to = call[\"to\"] as! String\n            let data = call[\"data\"] as! String\n            let gasLimit = call[\"gasLimit\"] as! UInt64\n            let value = call[\"value\"] as! UInt\n\n            let result = self.coa.call(\n                to: EVM.addressFromString(to),\n                data: data.decodeHex(),\n                gasLimit: gasLimit,\n                value: EVM.Balance(attoflow: value)\n            )\n            \n            if mustPass {\n                assert(\n                  result.status == EVM.Status.successful,\n                  message: \"Call index \".concat(i.toString()).concat(\" to \").concat(to)\n                    .concat(\" with calldata \").concat(data).concat(\" failed: \")\n                    .concat(result.errorMessage)\n                )\n            }\n        }\n    }\n}\n`\n}\n\n/**\n * Hook to send an EVM batch transaction using a Cadence-compatible wallet.  This function will\n * bundle multiple EVM calls into one atomic Cadence transaction and return both the Cadence\n * transaction ID as well as the result of each EVM call.\n *\n * @returns The query mutation object used to send the transaction and get the result.\n */\nexport function useCrossVmBatchTransaction({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmBatchTransactionArgs = {}): UseCrossVmBatchTransactionResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCadenceBatchTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        calls,\n        mustPass = true,\n      }: {\n        calls: EvmBatchCall[]\n        mustPass?: boolean\n      }) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n        const encodedCalls = encodeCalls(calls)\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(\n              encodedCalls.map(call => [\n                {key: \"to\", value: call.to},\n                {key: \"data\", value: call.data},\n                {\n                  key: \"gasLimit\",\n                  value: call.gasLimit,\n                },\n                {key: \"value\", value: call.value},\n              ]),\n              t.Array(\n                t.Dictionary([\n                  {key: t.String, value: t.String},\n                  {key: t.String, value: t.String},\n                  {key: t.String, value: t.UInt64},\n                  {key: t.String, value: t.UInt},\n                ] as any)\n              )\n            ),\n            arg(mustPass, t.Bool),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: sendBatchTransaction,\n    mutateAsync: sendBatchTransactionAsync,\n    ...rest\n  } = mutation\n\n  return {\n    sendBatchTransaction,\n    sendBatchTransactionAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeNftFromEvm.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmBridgeNftFromEvmTransaction,\n  useCrossVmBridgeNftFromEvm,\n} from \"./useCrossVmBridgeNftFromEvm\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useCrossVmBridgeNftFromEvm\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n  })\n\n  describe(\"getCrossVmBridgeNftFromEvmTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmBridgeNftFromEvmTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmBridgeNftFromEvmTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() =>\n        getCrossVmBridgeNftFromEvmTransaction(\"unsupported\")\n      ).toThrow(\"Unsupported chain: unsupported\")\n    })\n  })\n\n  describe(\"useCrossVmBridgeNftFromEvmTx\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n      jest.mocked(mockFcl.mockFclInstance.tx).mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmBridgeNftFromEvm, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.crossVmBridgeNftFromEvm({\n          nftIdentifier: \"A.dfc20aee650fcbdf.ExampleNFT.NFT\",\n          nftId: \"123\",\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: false,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftFromEvm({\n          nftIdentifier: \"A.dfc20aee650fcbdf.ExampleNFT.NFT\",\n          nftId: \"123\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftFromEvm({\n          nftIdentifier: \"A.dfc20aee650fcbdf.ExampleNFT.NFT\",\n          nftId: \"123\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftFromEvm({\n          nftIdentifier: \"A.dfc20aee650fcbdf.ExampleNFT.NFT\",\n          nftId: \"123\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeNftFromEvm.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmBridgeNftFromEvmTxArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmBridgeNftFromEvmTxMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmBridgeNftFromEvmTxMutateArgs {\n  nftIdentifier: string\n  /** The EVM NFT ID to bridge to Cadence as a string representation of a UInt256 (e.g., \"123\", \"0x7b\") */\n  nftId: string\n}\n\nexport interface UseCrossVmBridgeNftFromEvmTxResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  crossVmBridgeNftFromEvm: UseMutateFunction<\n    string,\n    Error,\n    UseCrossVmBridgeNftFromEvmTxMutateArgs\n  >\n  crossVmBridgeNftFromEvmAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmBridgeNftFromEvmTxMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmBridgeNftFromEvmTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport NonFungibleToken from ${contractAddresses.NonFungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport MetadataViews from ${contractAddresses.MetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// Bridges an NFT from the signer's COA in FlowEVM to their collection in Cadence\n///\n/// @param nftIdentifier: The Cadence type identifier of the NFT to bridge - e.g. nft.getType().identifier\n/// @param id: The EVM NFT ID to bridge to Cadence\n///\ntransaction(nftIdentifier: String, id: UInt256) {\n    let nftType: Type\n    let collection: &{NonFungibleToken.Collection}\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n    let coa: auth(EVM.Bridge) &EVM.CadenceOwnedAccount\n    \n    prepare(signer: auth(BorrowValue, CopyValue, IssueStorageCapabilityController, PublishCapability, SaveValue, UnpublishCapability) &Account) {\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n\n        /* --- Construct the NFT type --- */\n        //\n        // Construct the NFT type from the provided identifier\n        self.nftType = CompositeType(nftIdentifier)\n            ?? panic(\"Could not construct NFT type from identifier: \".concat(nftIdentifier))\n        // Parse the NFT identifier into its components\n        let nftContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: self.nftType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(nftIdentifier))\n        let nftContractName = FlowEVMBridgeUtils.getContractName(fromType: self.nftType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(nftIdentifier))\n\n        /* --- Configure the NFT Collection --- */\n        //\n        // Borrow a reference to the NFT collection, configuring if necessary\n        let viewResolver = getAccount(nftContractAddress).contracts.borrow<&{ViewResolver}>(name: nftContractName)\n            ?? panic(\"Could not borrow ViewResolver from NFT contract with name \"\n                .concat(nftContractName).concat(\" and address \")\n                .concat(nftContractAddress.toString()))\n        let collectionData = viewResolver.resolveContractView(\n                resourceType: self.nftType,\n                viewType: Type<MetadataViews.NFTCollectionData>()\n            ) as! MetadataViews.NFTCollectionData?\n            ?? panic(\"Could not resolve NFTCollectionData view for NFT type \".concat(self.nftType.identifier))\n        \n        // Configure collection if it doesn't exist\n        if signer.storage.borrow<&{NonFungibleToken.Collection}>(from: collectionData.storagePath) == nil {\n            signer.storage.save(<-collectionData.createEmptyCollection(), to: collectionData.storagePath)\n\n            signer.capabilities.unpublish(collectionData.publicPath)\n\n            let collectionCap = signer.capabilities.storage.issue<&{NonFungibleToken.Collection}>(collectionData.storagePath)\n            signer.capabilities.publish(collectionCap, at: collectionData.publicPath)\n        }\n        \n        self.collection = signer.storage.borrow<&{NonFungibleToken.Collection}>(from: collectionData.storagePath)\n            ?? panic(\"Could not borrow a NonFungibleToken Collection from the signer's storage path \"\n                .concat(collectionData.storagePath.toString()))\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Set a cap on the withdrawable bridge fee\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            )\n\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    execute {\n        // Execute the bridge request\n        let nft: @{NonFungibleToken.NFT} <- self.coa.withdrawNFT(\n            type: self.nftType,\n            id: id,\n            feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n        )\n        // Ensure the bridged NFT is the correct type\n        assert(\n            nft.getType() == self.nftType,\n            message: \"Bridged NFT type mismatch - requested: \".concat(self.nftType.identifier)\n                .concat(\", received: \").concat(nft.getType().identifier)\n        )\n        // Deposit the bridged NFT into the signer's collection\n        self.collection.deposit(token: <-nft)\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n    }\n}\n`\n}\n\n/**\n * Hook to receive a cross-VM NFT transaction from EVM to Cadence. This function will\n * withdraw an NFT from the signer's COA in EVM and deposit it into their Cadence collection.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmBridgeNftFromEvm({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmBridgeNftFromEvmTxArgs = {}): UseCrossVmBridgeNftFromEvmTxResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmBridgeNftFromEvmTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        nftIdentifier,\n        nftId,\n      }: UseCrossVmBridgeNftFromEvmTxMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(nftIdentifier, t.String),\n            arg(nftId, t.UInt256),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: crossVmBridgeNftFromEvm,\n    mutateAsync: crossVmBridgeNftFromEvmAsync,\n    ...rest\n  } = mutation\n\n  return {\n    crossVmBridgeNftFromEvm,\n    crossVmBridgeNftFromEvmAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeNftToEvm.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmBridgeNftToEvmTransaction,\n  useCrossVmBridgeNftToEvm,\n} from \"./useCrossVmBridgeNftToEvm\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useCrossVmBridgeNftToEvm\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockCalls = [\n    {\n      address: \"0x123\",\n      abi: [{type: \"function\", name: \"test\"}],\n      functionName: \"test\",\n      args: [1, 2],\n      gasLimit: BigInt(100000),\n      value: BigInt(0),\n    },\n  ]\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"getCrossVmBridgeNftToEvmTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmBridgeNftToEvmTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmBridgeNftToEvmTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() => getCrossVmBridgeNftToEvmTransaction(\"unsupported\")).toThrow(\n        \"Unsupported chain: unsupported\"\n      )\n    })\n  })\n\n  describe(\"useCrossVmBridgeNftToEvmTx\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n      jest.mocked(mockFcl.mockFclInstance.tx).mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmBridgeNftToEvm, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.crossVmBridgeNftToEvm({\n          calls: mockCalls,\n          nftIdentifier: \"nft123\",\n          nftIds: [\"1\", \"2\"],\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      jest.mocked(useFlowChainId).mockReturnValue({\n        data: null,\n        isLoading: false,\n      } as any)\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftToEvm({calls: mockCalls})\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftToEvm(mockCalls)\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeNftToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeNftToEvm({\n          calls: mockCalls,\n          nftIdentifier: \"nft123\",\n          nftIds: [\"1\", \"2\"],\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeNftToEvm.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {encodeCalls, EvmBatchCall} from \"./useCrossVmBatchTransaction\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmBridgeNftToEvmTxArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmBridgeNftToEvmTxMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmBridgeNftToEvmTxMutateArgs {\n  nftIdentifier: string\n  nftIds: string[]\n  calls: EvmBatchCall[]\n}\n\nexport interface UseCrossVmBridgeNftToEvmTxResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  crossVmBridgeNftToEvm: UseMutateFunction<\n    string,\n    Error,\n    UseCrossVmBridgeNftToEvmTxMutateArgs\n  >\n  crossVmBridgeNftToEvmAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmBridgeNftToEvmTxMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmBridgeNftToEvmTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport NonFungibleToken from ${contractAddresses.NonFungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport MetadataViews from ${contractAddresses.MetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// Bridges NFTs (from the same collection) from the signer's collection in Cadence to the signer's COA in FlowEVM\n/// and then performs an arbitrary number of calls afterwards to potentially do things\n/// with the bridged NFTs\n///\n/// NOTE: This transaction also onboards the NFT to the bridge if necessary which may incur additional fees\n///     than bridging an asset that has already been onboarded.\n///\n/// @param nftIdentifier: The Cadence type identifier of the NFT to bridge - e.g. nft.getType().identifier\n/// @param ids: The Cadence NFT.id of the NFTs to bridge to EVM\n/// @params evmContractAddressHexes, calldatas, gasLimits, values: Arrays of calldata\n///         to be included in transaction calls to Flow EVM from the signer's COA.\n///         The arrays are all expected to be of the same length\n///\ntransaction(\n    nftIdentifier: String,\n    ids: [UInt64],\n    evmContractAddressHexes: [String],\n    calldatas: [String],\n    gasLimits: [UInt64],\n    values: [UInt]\n) {\n    let nftType: Type\n    let collection: auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}\n    let coa: auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount\n    let requiresOnboarding: Bool\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n    \n    prepare(signer: auth(CopyValue, BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue) &Account) {\n        pre {\n            (evmContractAddressHexes.length == calldatas.length)\n            && (calldatas.length == gasLimits.length)\n            && (gasLimits.length == values.length):\n                \"Calldata array lengths must all be the same!\"\n        }\n\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n        \n        /* --- Construct the NFT type --- */\n        //\n        // Construct the NFT type from the provided identifier\n        self.nftType = CompositeType(nftIdentifier)\n            ?? panic(\"Could not construct NFT type from identifier: \".concat(nftIdentifier))\n        // Parse the NFT identifier into its components\n        let nftContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: self.nftType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(nftIdentifier))\n        let nftContractName = FlowEVMBridgeUtils.getContractName(fromType: self.nftType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(nftIdentifier))\n\n        /* --- Retrieve the NFT --- */\n        //\n        // Borrow a reference to the NFT collection, configuring if necessary\n        let viewResolver = getAccount(nftContractAddress).contracts.borrow<&{ViewResolver}>(name: nftContractName)\n            ?? panic(\"Could not borrow ViewResolver from NFT contract with name \"\n                .concat(nftContractName).concat(\" and address \")\n                .concat(nftContractAddress.toString()))\n        let collectionData = viewResolver.resolveContractView(\n                resourceType: self.nftType,\n                viewType: Type<MetadataViews.NFTCollectionData>()\n            ) as! MetadataViews.NFTCollectionData?\n            ?? panic(\"Could not resolve NFTCollectionData view for NFT type \".concat(self.nftType.identifier))\n        self.collection = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>(\n                from: collectionData.storagePath\n            ) ?? panic(\"Could not borrow a NonFungibleToken Collection from the signer's storage path \"\n                .concat(collectionData.storagePath.toString()))\n\n        // Withdraw the requested NFT & set a cap on the withdrawable bridge fee\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            ) + (FlowEVMBridgeConfig.baseFee * UFix64(ids.length))\n        // Determine if the NFT requires onboarding - this impacts the fee required\n        self.requiresOnboarding = FlowEVMBridge.typeRequiresOnboarding(self.nftType)\n            ?? panic(\"Bridge does not support the requested asset type \".concat(nftIdentifier))\n        // Add the onboarding fee if onboarding is necessary\n        if self.requiresOnboarding {\n            approxFee = approxFee + FlowEVMBridgeConfig.onboardFee\n        }\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    execute {\n        if self.requiresOnboarding {\n            // Onboard the NFT to the bridge\n            FlowEVMBridge.onboardByType(\n                self.nftType,\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n\n        // Iterate over requested IDs and bridge each NFT to the signer's COA in EVM\n        for id in ids {\n            // Withdraw the NFT & ensure it's the correct type\n            let nft <-self.collection.withdraw(withdrawID: id)\n            assert(\n                nft.getType() == self.nftType,\n                message: \"Bridged nft type mismatch - requested: \".concat(self.nftType.identifier)\n                    .concat(\", received: \").concat(nft.getType().identifier)\n            )\n            // Execute the bridge to EVM for the current ID\n            self.coa.depositNFT(\n                nft: <-nft,\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n\n        // Perform all the calls\n        for index, evmAddressHex in evmContractAddressHexes { \n            let evmAddress = EVM.addressFromString(evmAddressHex)\n\n            let valueBalance = EVM.Balance(attoflow: values[index])\n            let callResult = self.coa.call(\n                to: evmAddress,\n                data: calldatas[index].decodeHex(),\n                gasLimit: gasLimits[index],\n                value: valueBalance\n            )\n            assert(\n                callResult.status == EVM.Status.successful,\n                message: \"Call failed with address \\(evmAddressHex) and calldata \\(calldatas[index]) with error \\(callResult.errorMessage)\"\n            )\n        }\n    }\n}\n`\n}\n\n/**\n * Hook to send a cross-VM NFT bridge transaction from Cadence to EVM. This function will\n * bundle multiple EVM calls into one atomic Cadence transaction and return the transaction ID.\n *\n * Use `useCrossVmTransactionStatus` to watch the status of the transaction and get the transaction id + result of each EVM call.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmBridgeNftToEvm({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmBridgeNftToEvmTxArgs = {}): UseCrossVmBridgeNftToEvmTxResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmBridgeNftToEvmTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        nftIdentifier,\n        nftIds,\n        calls,\n      }: UseCrossVmBridgeNftToEvmTxMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n        const encodedCalls = encodeCalls(calls)\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(nftIdentifier, t.String),\n            arg(nftIds, t.Array(t.UInt64)),\n            arg(\n              encodedCalls.map(call => call.to),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.data),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.gasLimit),\n              t.Array(t.UInt64)\n            ),\n            arg(\n              encodedCalls.map(call => call.value),\n              t.Array(t.UInt)\n            ),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: crossVmBridgeNftToEvm,\n    mutateAsync: crossVmBridgeNftToEvmAsync,\n    ...rest\n  } = mutation\n\n  return {\n    crossVmBridgeNftToEvm,\n    crossVmBridgeNftToEvmAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeTokenFromEvm.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmBridgeTokenFromEvmTransaction,\n  useCrossVmBridgeTokenFromEvm,\n} from \"./useCrossVmBridgeTokenFromEvm\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useCrossVmBridgeTokenFromEvm\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"getCrossVmBridgeTokenFromEvmTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmBridgeTokenFromEvmTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmBridgeTokenFromEvmTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() =>\n        getCrossVmBridgeTokenFromEvmTransaction(\"unsupported\")\n      ).toThrow(\"Unsupported chain: unsupported\")\n    })\n  })\n\n  describe(\"useCrossVmBridgeTokenFromEvmTx\", () => {\n    test(\"should handle successful transaction\", async () => {\n      mockFcl.mockFclInstance.mutate.mockResolvedValue(mockTxId)\n      mockFcl.mockTx.mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmBridgeTokenFromEvm, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.crossVmBridgeTokenFromEvm({\n          vaultIdentifier: \"A.dfc20aee650fcbdf.ClickToken.Vault\",\n          amount: \"1000000000000000000\",\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: false,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenFromEvm({\n          vaultIdentifier: \"A.dfc20aee650fcbdf.ClickToken.Vault\",\n          amount: \"1000000000000000000\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenFromEvm({\n          vaultIdentifier: \"A.dfc20aee650fcbdf.ClickToken.Vault\",\n          amount: \"1000000000000000000\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      mockFcl.mockFclInstance.mutate.mockRejectedValue(\n        new Error(\"Mutation failed\")\n      )\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenFromEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenFromEvm({\n          vaultIdentifier: \"A.dfc20aee650fcbdf.ClickToken.Vault\",\n          amount: \"1000000000000000000\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeTokenFromEvm.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmBridgeTokenFromEvmArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmBridgeTokenFromEvmMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmBridgeTokenFromEvmMutateArgs {\n  vaultIdentifier: string\n  amount: string\n}\n\nexport interface UseCrossVmBridgeTokenFromEvmResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  crossVmBridgeTokenFromEvm: UseMutateFunction<\n    string,\n    Error,\n    UseCrossVmBridgeTokenFromEvmMutateArgs\n  >\n  crossVmBridgeTokenFromEvmAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmBridgeTokenFromEvmMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmBridgeTokenFromEvmTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport FungibleTokenMetadataViews from ${contractAddresses.FungibleTokenMetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// This transaction bridges fungible tokens from EVM to Cadence assuming it has already been onboarded to the\n/// FlowEVMBridge.\n///\n/// NOTE: The ERC20 must have first been onboarded to the bridge. This can be checked via the method\n///     FlowEVMBridge.evmAddressRequiresOnboarding(address: self.evmContractAddress)\n///\n/// @param vaultIdentifier: The Cadence type identifier of the FungibleToken Vault to bridge\n///     - e.g. vault.getType().identifier\n/// @param amount: The amount of tokens to bridge from EVM\n///\ntransaction(vaultIdentifier: String, amount: UInt256) {\n\n    let vaultType: Type\n    let receiver: &{FungibleToken.Vault}\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n    let coa: auth(EVM.Bridge) &EVM.CadenceOwnedAccount\n\n    prepare(signer: auth(BorrowValue, CopyValue, IssueStorageCapabilityController, PublishCapability, SaveValue, UnpublishCapability) &Account) {\n\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n\n        /* --- Construct the Vault type --- */\n        //\n        // Construct the Vault type from the provided identifier\n        self.vaultType = CompositeType(vaultIdentifier)\n            ?? panic(\"Could not construct Vault type from identifier: \".concat(vaultIdentifier))\n        // Parse the Vault identifier into its components\n        let tokenContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: self.vaultType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(vaultIdentifier))\n        let tokenContractName = FlowEVMBridgeUtils.getContractName(fromType: self.vaultType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(vaultIdentifier))\n\n        /* --- Reference the signer's Vault --- */\n        //\n        // Borrow a reference to the FungibleToken Vault, configuring if necessary\n        let viewResolver = getAccount(tokenContractAddress).contracts.borrow<&{ViewResolver}>(name: tokenContractName)\n            ?? panic(\"Could not borrow ViewResolver from FungibleToken contract with name\"\n                .concat(tokenContractName).concat(\" and address \")\n                .concat(tokenContractAddress.toString()))\n        let vaultData = viewResolver.resolveContractView(\n                resourceType: self.vaultType,\n                viewType: Type<FungibleTokenMetadataViews.FTVaultData>()\n            ) as! FungibleTokenMetadataViews.FTVaultData?\n            ?? panic(\"Could not resolve FTVaultData view for Vault type \".concat(self.vaultType.identifier))\n        // If the vault does not exist, create it and publish according to the contract's defined configuration\n        if signer.storage.borrow<&{FungibleToken.Vault}>(from: vaultData.storagePath) == nil {\n            signer.storage.save(<-vaultData.createEmptyVault(), to: vaultData.storagePath)\n\n            signer.capabilities.unpublish(vaultData.receiverPath)\n            signer.capabilities.unpublish(vaultData.metadataPath)\n\n            let receiverCap = signer.capabilities.storage.issue<&{FungibleToken.Vault}>(vaultData.storagePath)\n            let metadataCap = signer.capabilities.storage.issue<&{FungibleToken.Vault}>(vaultData.storagePath)\n\n            signer.capabilities.publish(receiverCap, at: vaultData.receiverPath)\n            signer.capabilities.publish(metadataCap, at: vaultData.metadataPath)\n        }\n        self.receiver = signer.storage.borrow<&{FungibleToken.Vault}>(from: vaultData.storagePath)\n            ?? panic(\"Could not borrow FungibleToken Vault from storage path \".concat(vaultData.storagePath.toString()))\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Set a cap on the withdrawable bridge fee\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            )\n\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    execute {\n        // Execute the bridge request\n        let vault: @{FungibleToken.Vault} <- self.coa.withdrawTokens(\n            type: self.vaultType,\n            amount: amount,\n            feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n        )\n        // Ensure the bridged vault is the correct type\n        assert(\n            vault.getType() == self.vaultType,\n            message: \"Bridged vault type mismatch - requested: \".concat(self.vaultType.identifier)\n                .concat(\", received: \").concat(vault.getType().identifier)\n        )\n        // Deposit the bridged token into the signer's vault\n        self.receiver.deposit(from: <-vault)\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n    }\n}\n`\n}\n\n/**\n * Hook to bridge fungible tokens from Flow EVM to Cadence. This function will\n * withdraw tokens from the signer's COA in EVM and deposit them into their Cadence vault.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmBridgeTokenFromEvm({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmBridgeTokenFromEvmArgs = {}): UseCrossVmBridgeTokenFromEvmResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmBridgeTokenFromEvmTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        vaultIdentifier,\n        amount,\n      }: UseCrossVmBridgeTokenFromEvmMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(vaultIdentifier, t.String),\n            arg(amount, t.UInt256),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: crossVmBridgeTokenFromEvm,\n    mutateAsync: crossVmBridgeTokenFromEvmAsync,\n    ...rest\n  } = mutation\n\n  return {\n    crossVmBridgeTokenFromEvm,\n    crossVmBridgeTokenFromEvmAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeTokenToEvm.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmBridgeTokenToEvmTransaction,\n  useCrossVmBridgeTokenToEvm,\n} from \"./useCrossVmBridgeTokenToEvm\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useCrossVmBridgeTokenToEvm\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockCalls = [\n    {\n      address: \"0x123\",\n      abi: [{type: \"function\", name: \"test\"}],\n      functionName: \"test\",\n      args: [1, 2],\n      gasLimit: BigInt(100000),\n      value: BigInt(0),\n    },\n  ]\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"getCrossVmBridgeTokenToEvmTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmBridgeTokenToEvmTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmBridgeTokenToEvmTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() =>\n        getCrossVmBridgeTokenToEvmTransaction(\"unsupported\")\n      ).toThrow(\"Unsupported chain: unsupported\")\n    })\n  })\n\n  describe(\"useCrossVmBatchTransaction\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n      jest.mocked(mockFcl.mockFclInstance.tx).mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmBridgeTokenToEvm, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.crossVmBridgeTokenToEvm({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: false,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenToEvm({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenToEvm({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmBridgeTokenToEvm(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.crossVmBridgeTokenToEvm({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmBridgeTokenToEvm.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {encodeCalls, EvmBatchCall} from \"./useCrossVmBatchTransaction\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmBridgeTokenToEvmArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmBridgeTokenToEvmMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmBridgeTokenToEvmMutateArgs {\n  vaultIdentifier: string\n  amount: string\n  calls: EvmBatchCall[]\n}\n\nexport interface UseCrossVmBridgeTokenToEvmResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  crossVmBridgeTokenToEvm: UseMutateFunction<\n    string,\n    Error,\n    UseCrossVmBridgeTokenToEvmMutateArgs\n  >\n  crossVmBridgeTokenToEvmAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmBridgeTokenToEvmMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmBridgeTokenToEvmTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport FungibleTokenMetadataViews from ${contractAddresses.FungibleTokenMetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// Bridges a Vault from the signer's storage to the signer's COA in EVM.Account\n/// and then executes an arbitrary number of EVM transactions.\n///\n/// NOTE: This transaction also onboards the Vault to the bridge if necessary which may incur additional fees\n///     than bridging an asset that has already been onboarded.\n///\n/// @param vaultIdentifier: The Cadence type identifier of the FungibleToken Vault to bridge\n///     - e.g. vault.getType().identifier\n/// @param amount: The amount of tokens to bridge from EVM\n/// @params evmContractAddressHexes, calldatas, gasLimits, values: Arrays of calldata\n///         to be included in transaction calls to Flow EVM from the signer's COA.\n///         The arrays are all expected to be of the same length\n///\n///\ntransaction(\n    vaultIdentifier: String,\n    amount: UFix64,\n    evmContractAddressHexes: [String],\n    calldatas: [String],\n    gasLimits: [UInt64],\n    values: [UInt]\n) {\n\n    let sentVault: @{FungibleToken.Vault}\n    let coa: auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount\n    let requiresOnboarding: Bool\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n\n    prepare(signer: auth(CopyValue, BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue) &Account) {\n        pre {\n            (evmContractAddressHexes.length == calldatas.length)\n            && (calldatas.length == gasLimits.length)\n            && (gasLimits.length == values.length):\n                \"Calldata array lengths must all be the same!\"\n        }\n\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n\n        /* --- Construct the Vault type --- */\n        //\n        // Construct the Vault type from the provided identifier\n        let vaultType = CompositeType(vaultIdentifier)\n            ?? panic(\"Could not construct Vault type from identifier: \".concat(vaultIdentifier))\n        // Parse the Vault identifier into its components\n        let tokenContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: vaultType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(vaultIdentifier))\n        let tokenContractName = FlowEVMBridgeUtils.getContractName(fromType: vaultType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(vaultIdentifier))\n\n        /* --- Retrieve the funds --- */\n        //\n        // Borrow a reference to the FungibleToken Vault\n        let viewResolver = getAccount(tokenContractAddress).contracts.borrow<&{ViewResolver}>(name: tokenContractName)\n            ?? panic(\"Could not borrow ViewResolver from FungibleToken contract with name\"\n                .concat(tokenContractName).concat(\" and address \")\n                .concat(tokenContractAddress.toString()))\n        let vaultData = viewResolver.resolveContractView(\n                resourceType: vaultType,\n                viewType: Type<FungibleTokenMetadataViews.FTVaultData>()\n            ) as! FungibleTokenMetadataViews.FTVaultData?\n            ?? panic(\"Could not resolve FTVaultData view for Vault type \".concat(vaultType.identifier))\n        let vault = signer.storage.borrow<auth(FungibleToken.Withdraw) &{FungibleToken.Vault}>(\n                from: vaultData.storagePath\n            ) ?? panic(\"Could not borrow FungibleToken Vault from storage path \".concat(vaultData.storagePath.toString()))\n\n        // Withdraw the requested balance & set a cap on the withdrawable bridge fee\n        self.sentVault <- vault.withdraw(amount: amount)\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            )\n        // Determine if the Vault requires onboarding - this impacts the fee required\n        self.requiresOnboarding = FlowEVMBridge.typeRequiresOnboarding(self.sentVault.getType())\n            ?? panic(\"Bridge does not support the requested asset type \".concat(vaultIdentifier))\n        if self.requiresOnboarding {\n            approxFee = approxFee + FlowEVMBridgeConfig.onboardFee\n        }\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    pre {\n        self.sentVault.getType().identifier == vaultIdentifier:\n            \"Attempting to send invalid vault type - requested: \".concat(vaultIdentifier)\n            .concat(\", sending: \").concat(self.sentVault.getType().identifier)\n    }\n\n    execute {\n        if self.requiresOnboarding {\n            // Onboard the Vault to the bridge\n            FlowEVMBridge.onboardByType(\n                self.sentVault.getType(),\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n        // Execute the bridge\n        self.coa.depositTokens(\n            vault: <-self.sentVault,\n            feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n        )\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n\n        // Perform all the calls\n        for index, evmAddressHex in evmContractAddressHexes { \n            let evmAddress = EVM.addressFromString(evmAddressHex)\n\n            let valueBalance = EVM.Balance(attoflow: values[index])\n            let callResult = self.coa.call(\n                to: evmAddress,\n                data: calldatas[index].decodeHex(),\n                gasLimit: gasLimits[index],\n                value: valueBalance\n            )\n            assert(\n                callResult.status == EVM.Status.successful,\n                message: \"Call failed with address \\(evmAddressHex) and calldata \\(calldatas[index]) with error \\(callResult.errorMessage)\"\n            )\n        }\n    }\n}\n`\n}\n\n/**\n * Hook to send a cross-VM FT spend transaction. This function will\n * bundle multiple EVM calls into one atomic Cadence transaction and return the transaction ID.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmBridgeTokenToEvm({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmBridgeTokenToEvmArgs = {}): UseCrossVmBridgeTokenToEvmResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmBridgeTokenToEvmTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        vaultIdentifier,\n        amount,\n        calls,\n      }: UseCrossVmBridgeTokenToEvmMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n        const encodedCalls = encodeCalls(calls)\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(vaultIdentifier, t.String),\n            arg(amount, t.UFix64),\n            arg(\n              encodedCalls.map(call => call.to),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.data),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.gasLimit),\n              t.Array(t.UInt64)\n            ),\n            arg(\n              encodedCalls.map(call => call.value),\n              t.Array(t.UInt)\n            ),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: crossVmBridgeTokenToEvm,\n    mutateAsync: crossVmBridgeTokenToEvmAsync,\n    ...rest\n  } = mutation\n\n  return {\n    crossVmBridgeTokenToEvm,\n    crossVmBridgeTokenToEvmAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmSpendNft.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmSpendNftransaction,\n  useCrossVmSpendNft,\n} from \"./useCrossVmSpendNft\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useBatchEvmTransaction\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockCalls = [\n    {\n      address: \"0x123\",\n      abi: [{type: \"function\", name: \"test\"}],\n      functionName: \"test\",\n      args: [1, 2],\n      gasLimit: BigInt(100000),\n      value: BigInt(0),\n    },\n  ]\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"getCrossVmSpendNftTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmSpendNftransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmSpendNftransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() => getCrossVmSpendNftransaction(\"unsupported\")).toThrow(\n        \"Unsupported chain: unsupported\"\n      )\n    })\n  })\n\n  describe(\"useCrossVmBatchTransaction\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n      jest.mocked(mockFcl.mockFclInstance.tx).mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmSpendNft, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.spendNft({\n          calls: mockCalls,\n          nftIdentifier: \"nft123\",\n          nftIds: [\"1\", \"2\"],\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      jest.mocked(useFlowChainId).mockReturnValue({\n        data: null,\n        isLoading: false,\n      } as any)\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendNft(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendNft({calls: mockCalls})\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendNft(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendNft(mockCalls)\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendNft(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendNft({\n          calls: mockCalls,\n          nftIdentifier: \"nft123\",\n          nftIds: [\"1\", \"2\"],\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmSpendNft.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {encodeCalls, EvmBatchCall} from \"./useCrossVmBatchTransaction\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmSpendNftTxArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmSpendNftTxMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmSpendNftTxMutateArgs {\n  nftIdentifier: string\n  nftIds: string[]\n  calls: EvmBatchCall[]\n}\n\nexport interface UseCrossVmSpendNftTxResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  spendNft: UseMutateFunction<string, Error, UseCrossVmSpendNftTxMutateArgs>\n  spendNftAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmSpendNftTxMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmSpendNftransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport NonFungibleToken from ${contractAddresses.NonFungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport MetadataViews from ${contractAddresses.MetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// Bridges NFTs (from the same collection) from the signer's collection in Cadence to the signer's COA in FlowEVM\n/// and then performs an arbitrary number of calls afterwards to potentially do things\n/// with the bridged NFTs\n///\n/// NOTE: This transaction also onboards the NFT to the bridge if necessary which may incur additional fees\n///     than bridging an asset that has already been onboarded.\n///\n/// @param nftIdentifier: The Cadence type identifier of the NFT to bridge - e.g. nft.getType().identifier\n/// @param ids: The Cadence NFT.id of the NFTs to bridge to EVM\n/// @params evmContractAddressHexes, calldatas, gasLimits, values: Arrays of calldata\n///         to be included in transaction calls to Flow EVM from the signer's COA.\n///         The arrays are all expected to be of the same length\n///\ntransaction(\n    nftIdentifier: String,\n    ids: [UInt64],\n    evmContractAddressHexes: [String],\n    calldatas: [String],\n    gasLimits: [UInt64],\n    values: [UInt]\n) {\n    let nftType: Type\n    let collection: auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}\n    let coa: auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount\n    let requiresOnboarding: Bool\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n    \n    prepare(signer: auth(CopyValue, BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue) &Account) {\n        pre {\n            (evmContractAddressHexes.length == calldatas.length)\n            && (calldatas.length == gasLimits.length)\n            && (gasLimits.length == values.length):\n                \"Calldata array lengths must all be the same!\"\n        }\n\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n        \n        /* --- Construct the NFT type --- */\n        //\n        // Construct the NFT type from the provided identifier\n        self.nftType = CompositeType(nftIdentifier)\n            ?? panic(\"Could not construct NFT type from identifier: \".concat(nftIdentifier))\n        // Parse the NFT identifier into its components\n        let nftContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: self.nftType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(nftIdentifier))\n        let nftContractName = FlowEVMBridgeUtils.getContractName(fromType: self.nftType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(nftIdentifier))\n\n        /* --- Retrieve the NFT --- */\n        //\n        // Borrow a reference to the NFT collection, configuring if necessary\n        let viewResolver = getAccount(nftContractAddress).contracts.borrow<&{ViewResolver}>(name: nftContractName)\n            ?? panic(\"Could not borrow ViewResolver from NFT contract with name \"\n                .concat(nftContractName).concat(\" and address \")\n                .concat(nftContractAddress.toString()))\n        let collectionData = viewResolver.resolveContractView(\n                resourceType: self.nftType,\n                viewType: Type<MetadataViews.NFTCollectionData>()\n            ) as! MetadataViews.NFTCollectionData?\n            ?? panic(\"Could not resolve NFTCollectionData view for NFT type \".concat(self.nftType.identifier))\n        self.collection = signer.storage.borrow<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>(\n                from: collectionData.storagePath\n            ) ?? panic(\"Could not borrow a NonFungibleToken Collection from the signer's storage path \"\n                .concat(collectionData.storagePath.toString()))\n\n        // Withdraw the requested NFT & set a cap on the withdrawable bridge fee\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            ) + (FlowEVMBridgeConfig.baseFee * UFix64(ids.length))\n        // Determine if the NFT requires onboarding - this impacts the fee required\n        self.requiresOnboarding = FlowEVMBridge.typeRequiresOnboarding(self.nftType)\n            ?? panic(\"Bridge does not support the requested asset type \".concat(nftIdentifier))\n        // Add the onboarding fee if onboarding is necessary\n        if self.requiresOnboarding {\n            approxFee = approxFee + FlowEVMBridgeConfig.onboardFee\n        }\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    execute {\n        if self.requiresOnboarding {\n            // Onboard the NFT to the bridge\n            FlowEVMBridge.onboardByType(\n                self.nftType,\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n\n        // Iterate over requested IDs and bridge each NFT to the signer's COA in EVM\n        for id in ids {\n            // Withdraw the NFT & ensure it's the correct type\n            let nft <-self.collection.withdraw(withdrawID: id)\n            assert(\n                nft.getType() == self.nftType,\n                message: \"Bridged nft type mismatch - requested: \".concat(self.nftType.identifier)\n                    .concat(\", received: \").concat(nft.getType().identifier)\n            )\n            // Execute the bridge to EVM for the current ID\n            self.coa.depositNFT(\n                nft: <-nft,\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n\n        // Perform all the calls\n        for index, evmAddressHex in evmContractAddressHexes { \n            let evmAddress = EVM.addressFromString(evmAddressHex)\n\n            let valueBalance = EVM.Balance(attoflow: values[index])\n            let callResult = self.coa.call(\n                to: evmAddress,\n                data: calldatas[index].decodeHex(),\n                gasLimit: gasLimits[index],\n                value: valueBalance\n            )\n            assert(\n                callResult.status == EVM.Status.successful,\n                message: \"Call failed with address \\(evmAddressHex) and calldata \\(calldatas[index]) with error \\(callResult.errorMessage)\"\n            )\n        }\n    }\n}\n`\n}\n\n/**\n * Hook to send a cross-VM NFT spend transaction. This function will\n * bundle multiple EVM calls into one atomic Cadence transaction and return the transaction ID.\n *\n * Use `useCrossVmSpendNftStatus` to watch the status of the transaction and get the transaction id + result of each EVM call.\n *\n * @deprecated This hook has been renamed to `useCrossVmBridgeNftToEvm` for better clarity.\n * Please use `useCrossVmBridgeNftToEvm` instead. This hook will be removed in a future version.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmSpendNft({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmSpendNftTxArgs = {}): UseCrossVmSpendNftTxResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmSpendNftransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        nftIdentifier,\n        nftIds,\n        calls,\n      }: UseCrossVmSpendNftTxMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n        const encodedCalls = encodeCalls(calls)\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(nftIdentifier, t.String),\n            arg(nftIds, t.Array(t.UInt64)),\n            arg(\n              encodedCalls.map(call => call.to),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.data),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.gasLimit),\n              t.Array(t.UInt64)\n            ),\n            arg(\n              encodedCalls.map(call => call.value),\n              t.Array(t.UInt)\n            ),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {mutate: spendNft, mutateAsync: spendNftAsync, ...rest} = mutation\n\n  return {\n    spendNft,\n    spendNftAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmSpendToken.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {\n  getCrossVmSpendTokenTransaction,\n  useCrossVmSpendToken,\n} from \"./useCrossVmSpendToken\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useCrossVmSpendToken\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockCalls = [\n    {\n      address: \"0x123\",\n      abi: [{type: \"function\", name: \"test\"}],\n      functionName: \"test\",\n      args: [1, 2],\n      gasLimit: BigInt(100000),\n      value: BigInt(0),\n    },\n  ]\n\n  const mockTxId = \"0x123\"\n  const mockTxResult = {\n    events: [\n      {\n        type: \"TransactionExecuted\",\n        data: {\n          hash: [\"1\", \"2\", \"3\"],\n          errorCode: \"0\",\n          errorMessage: \"\",\n        },\n      },\n    ],\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  describe(\"getCrossVmSpendTokenTransaction\", () => {\n    it(\"should return correct cadence for mainnet\", () => {\n      const result = getCrossVmSpendTokenTransaction(\"mainnet\")\n      expect(result).toContain(\"import EVM from 0xe467b9dd11fa00df\")\n    })\n\n    it(\"should return correct cadence for testnet\", () => {\n      const result = getCrossVmSpendTokenTransaction(\"testnet\")\n      expect(result).toContain(\"import EVM from 0x8c5303eaa26202d6\")\n    })\n\n    it(\"should throw error for unsupported chain\", () => {\n      expect(() => getCrossVmSpendTokenTransaction(\"unsupported\")).toThrow(\n        \"Unsupported chain: unsupported\"\n      )\n    })\n  })\n\n  describe(\"useCrossVmBatchTransaction\", () => {\n    test(\"should handle successful transaction\", async () => {\n      jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValue(mockTxId)\n      jest.mocked(mockFcl.mockFclInstance.tx).mockReturnValue({\n        onceExecuted: jest.fn().mockResolvedValue(mockTxResult),\n      } as any)\n\n      let result: any\n      let rerender: any\n      await act(async () => {\n        ;({result, rerender} = renderHook(useCrossVmSpendToken, {\n          wrapper: TestProvider,\n        }))\n      })\n\n      await act(async () => {\n        await result.current.spendToken({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n        rerender()\n      })\n\n      await waitFor(() => result.current.isPending === false)\n\n      expect(result.current.isError).toBe(false)\n      expect(result.current.data).toBe(mockTxId)\n    })\n\n    it(\"should handle missing chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: false,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendToken(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendToken({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle loading chain ID\", async () => {\n      ;(useFlowChainId as jest.Mock).mockReturnValue({\n        data: null,\n        isLoading: true,\n      })\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendToken(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendToken({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"No current chain found\")\n    })\n\n    it(\"should handle mutation error\", async () => {\n      jest\n        .mocked(mockFcl.mockFclInstance.mutate)\n        .mockRejectedValue(new Error(\"Mutation failed\"))\n\n      let hookResult: any\n\n      await act(async () => {\n        const {result} = renderHook(() => useCrossVmSpendToken(), {\n          wrapper: TestProvider,\n        })\n        hookResult = result\n      })\n\n      await act(async () => {\n        await hookResult.current.spendToken({\n          calls: mockCalls,\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          amount: \"100.0\",\n        })\n      })\n\n      await waitFor(() => expect(hookResult.current.isError).toBe(true))\n      expect(hookResult.current.error?.message).toBe(\"Mutation failed\")\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmSpendToken.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {encodeCalls, EvmBatchCall} from \"./useCrossVmBatchTransaction\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseCrossVmSpendTokenArgs {\n  mutation?: Omit<\n    UseMutationOptions<string, Error, UseCrossVmSpendTokenMutateArgs>,\n    \"mutationFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmSpendTokenMutateArgs {\n  vaultIdentifier: string\n  amount: string\n  calls: EvmBatchCall[]\n}\n\nexport interface UseCrossVmSpendTokenResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  spendToken: UseMutateFunction<string, Error, UseCrossVmSpendTokenMutateArgs>\n  spendTokenAsync: UseMutateAsyncFunction<\n    string,\n    Error,\n    UseCrossVmSpendTokenMutateArgs\n  >\n}\n\n// Takes a chain id and returns the cadence tx with addresses set\nexport const getCrossVmSpendTokenTransaction = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FungibleToken from ${contractAddresses.FungibleToken}\nimport ViewResolver from ${contractAddresses.ViewResolver}\nimport FungibleTokenMetadataViews from ${contractAddresses.FungibleTokenMetadataViews}\nimport FlowToken from ${contractAddresses.FlowToken}\n\nimport ScopedFTProviders from ${contractAddresses.ScopedFTProviders}\n\nimport EVM from ${contractAddresses.EVM}\n\nimport FlowEVMBridge from ${contractAddresses.FlowEVMBridge}\nimport FlowEVMBridgeConfig from ${contractAddresses.FlowEVMBridgeConfig}\nimport FlowEVMBridgeUtils from ${contractAddresses.FlowEVMBridgeUtils}\n\n/// Bridges a Vault from the signer's storage to the signer's COA in EVM.Account\n/// and then executes an arbitrary number of EVM transactions.\n///\n/// NOTE: This transaction also onboards the Vault to the bridge if necessary which may incur additional fees\n///     than bridging an asset that has already been onboarded.\n///\n/// @param vaultIdentifier: The Cadence type identifier of the FungibleToken Vault to bridge\n///     - e.g. vault.getType().identifier\n/// @param amount: The amount of tokens to bridge from EVM\n/// @params evmContractAddressHexes, calldatas, gasLimits, values: Arrays of calldata\n///         to be included in transaction calls to Flow EVM from the signer's COA.\n///         The arrays are all expected to be of the same length\n///\n///\ntransaction(\n    vaultIdentifier: String,\n    amount: UFix64,\n    evmContractAddressHexes: [String],\n    calldatas: [String],\n    gasLimits: [UInt64],\n    values: [UInt]\n) {\n\n    let sentVault: @{FungibleToken.Vault}\n    let coa: auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount\n    let requiresOnboarding: Bool\n    let scopedProvider: @ScopedFTProviders.ScopedFTProvider\n\n    prepare(signer: auth(CopyValue, BorrowValue, IssueStorageCapabilityController, PublishCapability, SaveValue) &Account) {\n        pre {\n            (evmContractAddressHexes.length == calldatas.length)\n            && (calldatas.length == gasLimits.length)\n            && (gasLimits.length == values.length):\n                \"Calldata array lengths must all be the same!\"\n        }\n\n        /* --- Reference the signer's CadenceOwnedAccount --- */\n        //\n        // Borrow a reference to the signer's COA\n        self.coa = signer.storage.borrow<auth(EVM.Bridge, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)\n            ?? panic(\"Could not borrow COA signer's account at path /storage/evm\")\n\n        /* --- Construct the Vault type --- */\n        //\n        // Construct the Vault type from the provided identifier\n        let vaultType = CompositeType(vaultIdentifier)\n            ?? panic(\"Could not construct Vault type from identifier: \".concat(vaultIdentifier))\n        // Parse the Vault identifier into its components\n        let tokenContractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: vaultType)\n            ?? panic(\"Could not get contract address from identifier: \".concat(vaultIdentifier))\n        let tokenContractName = FlowEVMBridgeUtils.getContractName(fromType: vaultType)\n            ?? panic(\"Could not get contract name from identifier: \".concat(vaultIdentifier))\n\n        /* --- Retrieve the funds --- */\n        //\n        // Borrow a reference to the FungibleToken Vault\n        let viewResolver = getAccount(tokenContractAddress).contracts.borrow<&{ViewResolver}>(name: tokenContractName)\n            ?? panic(\"Could not borrow ViewResolver from FungibleToken contract with name\"\n                .concat(tokenContractName).concat(\" and address \")\n                .concat(tokenContractAddress.toString()))\n        let vaultData = viewResolver.resolveContractView(\n                resourceType: vaultType,\n                viewType: Type<FungibleTokenMetadataViews.FTVaultData>()\n            ) as! FungibleTokenMetadataViews.FTVaultData?\n            ?? panic(\"Could not resolve FTVaultData view for Vault type \".concat(vaultType.identifier))\n        let vault = signer.storage.borrow<auth(FungibleToken.Withdraw) &{FungibleToken.Vault}>(\n                from: vaultData.storagePath\n            ) ?? panic(\"Could not borrow FungibleToken Vault from storage path \".concat(vaultData.storagePath.toString()))\n\n        // Withdraw the requested balance & set a cap on the withdrawable bridge fee\n        self.sentVault <- vault.withdraw(amount: amount)\n        var approxFee = FlowEVMBridgeUtils.calculateBridgeFee(\n                bytes: 400_000 // 400 kB as upper bound on movable storage used in a single transaction\n            )\n        // Determine if the Vault requires onboarding - this impacts the fee required\n        self.requiresOnboarding = FlowEVMBridge.typeRequiresOnboarding(self.sentVault.getType())\n            ?? panic(\"Bridge does not support the requested asset type \".concat(vaultIdentifier))\n        if self.requiresOnboarding {\n            approxFee = approxFee + FlowEVMBridgeConfig.onboardFee\n        }\n\n        /* --- Configure a ScopedFTProvider --- */\n        //\n        // Issue and store bridge-dedicated Provider Capability in storage if necessary\n        if signer.storage.type(at: FlowEVMBridgeConfig.providerCapabilityStoragePath) == nil {\n            let providerCap = signer.capabilities.storage.issue<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>(\n                /storage/flowTokenVault\n            )\n            signer.storage.save(providerCap, to: FlowEVMBridgeConfig.providerCapabilityStoragePath)\n        }\n        // Copy the stored Provider capability and create a ScopedFTProvider\n        let providerCapCopy = signer.storage.copy<Capability<auth(FungibleToken.Withdraw) &{FungibleToken.Provider}>>(\n                from: FlowEVMBridgeConfig.providerCapabilityStoragePath\n            ) ?? panic(\"Invalid FungibleToken Provider Capability found in storage at path \"\n                .concat(FlowEVMBridgeConfig.providerCapabilityStoragePath.toString()))\n        let providerFilter = ScopedFTProviders.AllowanceFilter(approxFee)\n        self.scopedProvider <- ScopedFTProviders.createScopedFTProvider(\n                provider: providerCapCopy,\n                filters: [ providerFilter ],\n                expiration: getCurrentBlock().timestamp + 1.0\n            )\n    }\n\n    pre {\n        self.sentVault.getType().identifier == vaultIdentifier:\n            \"Attempting to send invalid vault type - requested: \".concat(vaultIdentifier)\n            .concat(\", sending: \").concat(self.sentVault.getType().identifier)\n    }\n\n    execute {\n        if self.requiresOnboarding {\n            // Onboard the Vault to the bridge\n            FlowEVMBridge.onboardByType(\n                self.sentVault.getType(),\n                feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n            )\n        }\n        // Execute the bridge\n        self.coa.depositTokens(\n            vault: <-self.sentVault,\n            feeProvider: &self.scopedProvider as auth(FungibleToken.Withdraw) &{FungibleToken.Provider}\n        )\n        // Destroy the ScopedFTProvider\n        destroy self.scopedProvider\n\n        // Perform all the calls\n        for index, evmAddressHex in evmContractAddressHexes { \n            let evmAddress = EVM.addressFromString(evmAddressHex)\n\n            let valueBalance = EVM.Balance(attoflow: values[index])\n            let callResult = self.coa.call(\n                to: evmAddress,\n                data: calldatas[index].decodeHex(),\n                gasLimit: gasLimits[index],\n                value: valueBalance\n            )\n            assert(\n                callResult.status == EVM.Status.successful,\n                message: \"Call failed with address \\(evmAddressHex) and calldata \\(calldatas[index]) with error \\(callResult.errorMessage)\"\n            )\n        }\n    }\n}\n`\n}\n\n/**\n * Hook to send a cross-VM FT spend transaction. This function will\n * bundle multiple EVM calls into one atomic Cadence transaction and return the transaction ID.\n *\n * @deprecated This hook has been renamed to `useCrossVmBridgeTokenToEvm` for better clarity.\n * Please use `useCrossVmBridgeTokenToEvm` instead. This hook will be removed in a future version.\n *\n * @returns The mutation object used to send the transaction.\n */\nexport function useCrossVmSpendToken({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseCrossVmSpendTokenArgs = {}): UseCrossVmSpendTokenResult {\n  const chainId = useFlowChainId()\n  const cadenceTx = chainId.data\n    ? getCrossVmSpendTokenTransaction(chainId.data)\n    : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const mutation = useMutation(\n    {\n      mutationFn: async ({\n        vaultIdentifier,\n        amount,\n        calls,\n      }: UseCrossVmSpendTokenMutateArgs) => {\n        if (!cadenceTx) {\n          throw new Error(\"No current chain found\")\n        }\n        const encodedCalls = encodeCalls(calls)\n\n        const txId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [\n            arg(vaultIdentifier, t.String),\n            arg(amount, t.UFix64),\n            arg(\n              encodedCalls.map(call => call.to),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.data),\n              t.Array(t.String)\n            ),\n            arg(\n              encodedCalls.map(call => call.gasLimit),\n              t.Array(t.UInt64)\n            ),\n            arg(\n              encodedCalls.map(call => call.value),\n              t.Array(t.UInt)\n            ),\n          ],\n          limit: 9999,\n        })\n\n        return txId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {mutate: spendToken, mutateAsync: spendTokenAsync, ...rest} = mutation\n\n  return {\n    spendToken,\n    spendTokenAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmTokenBalance.test.ts",
    "content": "import {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQuery} from \"./useFlowQuery\"\nimport {useCrossVmTokenBalance} from \"./useCrossVmTokenBalance\"\nimport {act, renderHook, waitFor} from \"@testing-library/react\"\nimport {createMockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowQuery\")\njest.mock(\"./useFlowChainId\")\n\ndescribe(\"useCrossVmTokenBalance\", () => {\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n  })\n\n  test(\"should return null when data is undefined\", async () => {\n    const mockQueryResult = {\n      data: undefined,\n      isLoading: false,\n      isError: false,\n      error: null,\n    } as unknown as ReturnType<typeof useFlowQuery>\n\n    jest.mocked(useFlowQuery).mockReturnValue(mockQueryResult)\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n      isError: false,\n      error: null,\n      isSuccess: true,\n    } as unknown as ReturnType<typeof useFlowChainId>)\n\n    let result: ReturnType<typeof renderHook<any, any>>\n    act(() => {\n      result = renderHook(useCrossVmTokenBalance, {\n        wrapper: TestProvider,\n        initialProps: {\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          owner: \"0x5678\",\n        },\n      })\n    })\n\n    await waitFor(() => expect(result.result.current).toBeDefined())\n\n    expect(jest.mocked(useFlowQuery)).toHaveBeenCalledWith(\n      expect.objectContaining({\n        cadence: expect.any(String),\n        args: expect.any(Function),\n        query: {\n          enabled: true,\n        },\n      })\n    )\n\n    expect(result!.result.current).toEqual({\n      ...mockQueryResult,\n      data: null,\n    })\n  })\n\n  test(\"should return formatted balance when data is defined\", async () => {\n    const mockQueryResult = {\n      data: [\"4\", \"10.001\", \"200001\"],\n      isLoading: false,\n      isError: false,\n      error: null,\n    } as unknown as ReturnType<typeof useFlowQuery>\n\n    jest.mocked(useFlowQuery).mockReturnValue(mockQueryResult)\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n      isError: false,\n      error: null,\n      isSuccess: true,\n    } as unknown as ReturnType<typeof useFlowChainId>)\n\n    let result: ReturnType<typeof renderHook<any, any>>\n    act(() => {\n      result = renderHook(useCrossVmTokenBalance, {\n        wrapper: TestProvider,\n        initialProps: {\n          vaultIdentifier: \"A.1234.Token.Vault\",\n          owner: \"0x5678\",\n        },\n      })\n    })\n\n    await waitFor(() => expect(result.result.current).toBeDefined())\n\n    expect(jest.mocked(useFlowQuery)).toHaveBeenCalledWith(\n      expect.objectContaining({\n        cadence: expect.any(String),\n        args: expect.any(Function),\n        query: {\n          enabled: true,\n        },\n      })\n    )\n\n    expect(result!.result.current).toEqual({\n      ...mockQueryResult,\n      data: {\n        cadence: {\n          formatted: \"10.001\",\n          value: BigInt(\"1000100000\"),\n          precision: 8,\n        },\n        evm: {\n          formatted: \"20.0001\",\n          value: BigInt(\"200001\"),\n          precision: 4,\n        },\n        combined: {\n          formatted: \"30.0011\",\n          value: BigInt(\"3000110000\"),\n          precision: 8,\n        },\n      },\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmTokenBalance.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {useFlowQuery} from \"./useFlowQuery\"\nimport {CADENCE_UFIX64_PRECISION, CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {parseUnits, formatUnits} from \"viem/utils\"\n\ninterface UseCrossVmTokenBalanceArgs {\n  owner?: string\n  erc20Address?: string\n  vaultIdentifier?: string\n  query?: Omit<UseQueryOptions<unknown, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\ninterface TokenBalance {\n  value: bigint\n  formatted: string\n  precision: number\n}\n\nexport interface UseCrossVmTokenBalanceData {\n  cadence: TokenBalance\n  evm: TokenBalance\n  combined: TokenBalance\n}\n\nconst getCrossVmTokenBalance = (network: \"testnet\" | \"mainnet\") => `\nimport EVM from ${CONTRACT_ADDRESSES[network].EVM}\nimport FlowToken from ${CONTRACT_ADDRESSES[network].FlowToken}\nimport FungibleToken from ${CONTRACT_ADDRESSES[network].FungibleToken}\nimport FlowEVMBridgeUtils from ${CONTRACT_ADDRESSES[network].FlowEVMBridgeUtils}\nimport FlowEVMBridgeConfig from ${CONTRACT_ADDRESSES[network].FlowEVMBridgeConfig}\nimport FungibleTokenMetadataViews from ${CONTRACT_ADDRESSES[network].FungibleTokenMetadataViews}\n\n/// Returns the balance of the owner of a given Fungible Token\n/// from their Cadence account and their COA\n/// Accepts multiple optional arguments, so the caller can query\n/// the token by its EVM ERC20 address or by its Cadence contract address and name\n///\n/// @param owner: The Flow address of the owner\n/// @param contractAddressArg: The optional address of the FT contract in Cadence\n/// @param contractNameArg: The optional name of the FT contract in Cadence\n/// @param erc20AddressHex: The optional ERC20 address of the FT to query\n///\n/// @return An array that contains the balance information for the user's accounts\n///         in this order:\n///         decimals (UInt256), cadence Balance (UFix64), EVM Balance (UInt256), Total Balance (UInt256)\n///\n\naccess(all) fun main(\n        owner: Address,\n        vaultIdentifier: String?,\n        erc20AddressHexArg: String?\n): [AnyStruct] {\n    pre {\n        vaultIdentifier == nil ? erc20AddressHexArg != nil : true:\n            \"If the Cadence contract information is not provided, the ERC20 contract address must be provided.\"\n    }\n\n    var typeIdentifier: String = \"\"\n    var compType: Type? = nil\n    var contractAddress: Address? = nil\n    var contractName: String? = nil\n    var tokenEVMAddress: String? = nil\n    var cadenceBalance: UFix64 = 0.0\n    var coaBalance: UInt256 = 0\n    var decimals: UInt8 = 0\n    \n    // If the caller provided the Cadence information,\n    // Construct the composite type\n    if vaultIdentifier != nil {\n        typeIdentifier = vaultIdentifier!\n        compType = CompositeType(typeIdentifier)\n            ?? panic(\"Could not construct Cadence type with \\(typeIdentifier)\")\n        \n        // Get the EVM address of the bridged version of the Cadence FT contract\n        if let evmAddress = FlowEVMBridgeConfig.getEVMAddressAssociated(with: compType!) {\n            tokenEVMAddress = evmAddress.toString()\n        }\n    } else {\n        // If the caller provided the EVM information,\n        // get the Cadence type from the bridge\n        // If getting the Cadence type doesn't work, then we'll just return the EVM balance\n        tokenEVMAddress = erc20AddressHexArg!\n        let address = EVM.addressFromString(tokenEVMAddress!)\n        compType = FlowEVMBridgeConfig.getTypeAssociated(with: address)\n    }\n\n    // Parse the FT identifier into its components if necessary\n    if compType != nil {\n        contractAddress = FlowEVMBridgeUtils.getContractAddress(fromType: compType!)\n        contractName = FlowEVMBridgeUtils.getContractName(fromType: compType!)\n    }\n\n    if let address = contractAddress {\n        // Borrow a reference to the FT contract\n        let resolverRef = getAccount(address)\n            .contracts.borrow<&{FungibleToken}>(name: contractName!)\n                ?? panic(\"Could not borrow FungibleToken reference to the contract. Make sure the provided contract name (\"\n                            .concat(contractName!).concat(\") and address (\").concat(address.toString()).concat(\") are correct!\"))\n\n        // Use that reference to retrieve the FTView \n        let vaultData = resolverRef.resolveContractView(resourceType: nil, viewType: Type<FungibleTokenMetadataViews.FTVaultData>()) as! FungibleTokenMetadataViews.FTVaultData?\n            ?? panic(\"Could not resolve FTVaultData view. The \".concat(contractName!)\n                .concat(\" contract needs to implement the FTVaultData Metadata view in order to execute this transaction.\"))\n\n        // Get the Cadence balance of the token\n        cadenceBalance = getAccount(owner).capabilities.borrow<&{FungibleToken.Balance}>(\n                vaultData.metadataPath\n            )?.balance\n            ?? 0.0\n    }\n\n    // Get the COA from the owner's account\n    if let coa = getAuthAccount<auth(BorrowValue) &Account>(owner)\n        .storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(\n            from: /storage/evm\n        ) \n    {\n        if let erc20Address = tokenEVMAddress {\n            // Get the COA address\n            let coaAddress = coa.address().toString()\n\n            // Get the ERC20 balance of the COA\n            coaBalance = FlowEVMBridgeUtils.balanceOf(\n                owner: EVM.addressFromString(coaAddress),\n                evmContractAddress: EVM.addressFromString(erc20Address)\n            )\n            \n            // Get the token decimals of the ERC20 contract\n            decimals = FlowEVMBridgeUtils.getTokenDecimals(\n                evmContractAddress: EVM.addressFromString(erc20Address)\n            )\n        }\n        \n        if compType == Type<@FlowToken.Vault>() {\n            coaBalance = coaBalance! + UInt256(coa.address().balance().inAttoFLOW())\n        }\n    }\n\n    let balances = [decimals, cadenceBalance, coaBalance]\n    \n    return balances\n}\n`\n\n/**\n * Returns the balance of the owner of a given Fungible Token across both Cadence and EVM accounts.\n * @param param0\n * @returns\n */\nexport function useCrossVmTokenBalance(params: UseCrossVmTokenBalanceArgs) {\n  const chainIdResult = useFlowChainId()\n  const queryResult = useFlowQuery({\n    cadence: chainIdResult.data\n      ? getCrossVmTokenBalance(chainIdResult.data as \"testnet\" | \"mainnet\")\n      : \"\",\n    args: (arg, t) => [\n      params.owner\n        ? arg(params.owner, t.Address)\n        : arg(null, t.Optional(t.Address)),\n      arg(\n        \"vaultIdentifier\" in params && params.vaultIdentifier\n          ? params.vaultIdentifier\n          : null,\n        t.Optional(t.String)\n      ),\n      arg(\n        \"erc20Address\" in params && params.erc20Address\n          ? params.erc20Address\n          : null,\n        t.Optional(t.String)\n      ),\n    ],\n    flowClient: params.flowClient,\n    query: {\n      ...params.query,\n      enabled:\n        (params.query?.enabled ?? true) &&\n        !!chainIdResult.data &&\n        !!params.owner &&\n        (!!params.vaultIdentifier || !!params.erc20Address),\n    },\n  })\n\n  if (chainIdResult.isError) {\n    return chainIdResult\n  }\n\n  const data = queryResult.data as [string, string, string, string] | undefined\n  if (!data) {\n    return {\n      ...queryResult,\n      data: null,\n    } as UseQueryResult<UseCrossVmTokenBalanceData | null, Error>\n  }\n\n  const [evmDecimals, cadenceBalance, evmBalance] = data\n\n  // Convert the values to the max precision between Cadence and EVM\n  // to avoid precision loss when summing the two balances\n  const totalPrecision = Math.max(CADENCE_UFIX64_PRECISION, Number(evmDecimals))\n  const totalPrecisionCadenceBalance = parseUnits(\n    cadenceBalance,\n    totalPrecision\n  )\n  const totalPrecisionEvmBalance = parseUnits(\n    formatUnits(BigInt(evmBalance), Number(evmDecimals)),\n    totalPrecision\n  )\n\n  return {\n    ...queryResult,\n    data: data\n      ? {\n          cadence: {\n            formatted: formatUnits(\n              parseUnits(cadenceBalance, CADENCE_UFIX64_PRECISION),\n              CADENCE_UFIX64_PRECISION\n            ),\n            value: parseUnits(cadenceBalance, CADENCE_UFIX64_PRECISION),\n            precision: CADENCE_UFIX64_PRECISION,\n          },\n          evm: {\n            formatted: formatUnits(BigInt(evmBalance), Number(evmDecimals)),\n            precision: Number(evmDecimals),\n            value: BigInt(evmBalance),\n          },\n          combined: {\n            formatted: formatUnits(\n              totalPrecisionCadenceBalance + totalPrecisionEvmBalance,\n              totalPrecision\n            ),\n            value: totalPrecisionCadenceBalance + totalPrecisionEvmBalance,\n            precision: totalPrecision,\n          },\n        }\n      : null,\n  } as UseQueryResult<UseCrossVmTokenBalanceData | null, Error>\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmTransactionStatus.test.ts",
    "content": "import {renderHook} from \"@testing-library/react\"\nimport {useFlowTransactionStatus} from \"./useFlowTransactionStatus\"\nimport {useCrossVmTransactionStatus} from \"./useCrossVmTransactionStatus\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {mock} from \"node:test\"\n\njest.mock(\"./useFlowTransactionStatus\")\njest.mock(\"./useFlowChainId\")\n\ndescribe(\"useCrossVmTransactionStatus\", () => {\n  test(\"should return transaction status from useFlowTransactionStatus\", async () => {\n    const mockTxId = \"0x123\"\n    const mockStatus = {\n      status: \"FINALIZED\",\n      errorMessage: null,\n    } as any\n    jest.mocked(useFlowTransactionStatus).mockReturnValue({\n      transactionStatus: mockStatus,\n      error: null,\n    })\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n    } as any)\n    const {result} = renderHook(() =>\n      useCrossVmTransactionStatus({id: mockTxId})\n    )\n    expect(result.current.transactionStatus).toEqual(mockStatus)\n    expect(result.current.error).toBeNull()\n    expect(useFlowTransactionStatus).toHaveBeenCalledWith({\n      id: mockTxId,\n    })\n  })\n\n  test(\"should parse EVM events correctly, testnet\", async () => {\n    const mockTxId = \"0x123\"\n    const mockStatus = {\n      status: \"FINALIZED\",\n      errorMessage: null,\n      events: [\n        {\n          type: \"A.8c5303eaa26202d6.EVM.TransactionExecuted\",\n          data: {\n            hash: [\n              parseInt(\"a\", 16).toString(10),\n              parseInt(\"bc\", 16).toString(10),\n            ],\n            errorCode: \"0\",\n            errorMessage: \"\",\n          },\n        },\n      ],\n    } as any\n    jest.mocked(useFlowTransactionStatus).mockReturnValue({\n      transactionStatus: mockStatus,\n      error: null,\n    })\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n    } as any)\n    const {result} = renderHook(() =>\n      useCrossVmTransactionStatus({id: mockTxId})\n    )\n    expect(result.current.transactionStatus).toEqual(mockStatus)\n    expect(result.current.evmResults).toEqual([\n      {\n        status: \"passed\",\n        hash: \"0x0abc\",\n      },\n    ])\n    expect(result.current.error).toBeNull()\n    expect(useFlowTransactionStatus).toHaveBeenCalledWith({\n      id: mockTxId,\n    })\n  })\n\n  test(\"should parse EVM events correctly, mainnet\", async () => {\n    const mockTxId = \"0x123\"\n    const mockStatus = {\n      status: \"FINALIZED\",\n      errorMessage: null,\n      events: [\n        {\n          type: \"A.e467b9dd11fa00df.EVM.TransactionExecuted\",\n          data: {\n            hash: [\n              parseInt(\"d4\", 16).toString(10),\n              parseInt(\"f8\", 16).toString(10),\n            ],\n            errorCode: \"0\",\n            errorMessage: \"\",\n          },\n        },\n      ],\n    } as any\n    jest.mocked(useFlowTransactionStatus).mockReturnValue({\n      transactionStatus: mockStatus,\n      error: null,\n    })\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"mainnet\",\n    } as any)\n    const {result} = renderHook(() =>\n      useCrossVmTransactionStatus({id: mockTxId})\n    )\n    expect(result.current.transactionStatus).toEqual(mockStatus)\n    expect(result.current.evmResults).toEqual([\n      {\n        status: \"passed\",\n        hash: \"0xd4f8\",\n      },\n    ])\n    expect(result.current.error).toBeNull()\n    expect(useFlowTransactionStatus).toHaveBeenCalledWith({\n      id: mockTxId,\n    })\n  })\n\n  test(\"should handle error correctly\", async () => {\n    const mockTxId = \"0x123\"\n    const mockError = new Error(\"Transaction not found\")\n    jest.mocked(useFlowTransactionStatus).mockReturnValue({\n      transactionStatus: null,\n      error: mockError,\n    })\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n    const {result} = renderHook(() =>\n      useCrossVmTransactionStatus({id: mockTxId})\n    )\n    expect(result.current.transactionStatus).toBeNull()\n    expect(result.current.error).toEqual(mockError)\n    expect(useFlowTransactionStatus).toHaveBeenCalledWith({\n      id: mockTxId,\n    })\n  })\n\n  test(\"should not poll transaction status if chain ID is unsupported and return error\", async () => {\n    const mockTxId = \"0x123\"\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"unsupported\",\n      isLoading: false,\n      isError: false,\n      error: null,\n      isSuccess: true,\n    } as any)\n    const {result} = renderHook(() =>\n      useCrossVmTransactionStatus({id: mockTxId})\n    )\n    expect(result.current.transactionStatus).toBeNull()\n    expect(result.current.error).toEqual(\n      new Error(\n        \"Unsupported chain: unsupported. Please ensure the chain ID is valid and supported.\"\n      )\n    )\n    expect(useFlowTransactionStatus).toHaveBeenCalledWith({\n      id: undefined,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useCrossVmTransactionStatus.ts",
    "content": "import type {TransactionStatus} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {sansPrefix} from \"@onflow/fcl-core\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowTransactionStatus} from \"./useFlowTransactionStatus\"\n\nexport interface UseCrossVmTransactionStatusArgs {\n  /** The Flow transaction ID to monitor */\n  id?: string\n  flowClient?: FlowClientCore\n}\n\nexport interface UseCrossVmTransactionStatusResult {\n  /** Latest transaction status, or null before any update */\n  transactionStatus: TransactionStatus | null\n  /** EVM transaction results, if available */\n  evmResults?: CallOutcome[]\n  /** Any error encountered during status updates */\n  error: Error | null\n}\n\nexport interface CallOutcome {\n  status: \"passed\" | \"failed\" | \"skipped\"\n  hash?: string\n  errorMessage?: string\n}\n\nexport interface EvmTransactionExecutedData {\n  hash: string[]\n  index: string\n  type: string\n  payload: string[]\n  errorCode: string\n  errorMessage: string\n  gasConsumed: string\n  contractAddress: string\n  logs: string[]\n  blockHeight: string\n  returnedData: string[]\n  precompiledCalls: string[]\n  stateUpdateChecksum: string\n}\n\n/**\n * Subscribes to status updates for a given Cross-VM Flow transaction ID that executes EVM calls.\n * This hook monitors the transaction status and extracts EVM call results if available.\n *\n * @returns {UseCrossVmTransactionStatusResult}\n */\nexport function useCrossVmTransactionStatus({\n  id,\n  flowClient,\n}: UseCrossVmTransactionStatusArgs): UseCrossVmTransactionStatusResult {\n  const chainId = useFlowChainId()\n\n  const eventType =\n    chainId.data && chainId.data in CONTRACT_ADDRESSES\n      ? `A.${sansPrefix(CONTRACT_ADDRESSES[chainId.data as keyof typeof CONTRACT_ADDRESSES].EVM)}.EVM.TransactionExecuted`\n      : null\n\n  const {transactionStatus, error} = useFlowTransactionStatus({\n    id: eventType ? id : undefined,\n    flowClient,\n  })\n\n  if (eventType === null) {\n    return {\n      transactionStatus: null,\n      error: new Error(\n        `Unsupported chain: ${chainId.data}. Please ensure the chain ID is valid and supported.`\n      ),\n    }\n  }\n\n  const evmEvents = transactionStatus?.events\n    ?.filter(event => event.type === eventType)\n    ?.map(event => event.data) as EvmTransactionExecutedData[]\n\n  const evmResults: CallOutcome[] = evmEvents?.map(event => {\n    const {hash, errorCode, errorMessage} = event\n    const result: CallOutcome = {\n      status: errorCode === \"0\" ? \"passed\" : \"failed\",\n      hash: `0x${hash.map(h => parseInt(h, 10).toString(16).padStart(2, \"0\")).join(\"\")}`,\n    }\n    if (event.errorMessage) {\n      result.errorMessage = errorMessage\n    }\n    return result\n  })\n\n  return {transactionStatus, error, evmResults: evmResults}\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowAccount.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowAccount} from \"./useFlowAccount\"\nimport {Account} from \"@onflow/typedefs\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowAccount\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"does nothing when no address is provided\", () => {\n    const {result} = renderHook(() => useFlowAccount({}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.isLoading).toBe(false)\n    expect(result.current.data).toBeNull()\n    expect(result.current.error).toBeNull()\n  })\n\n  test(\"fetches account when address is provided\", async () => {\n    const mockAccount: Account = {\n      address: \"0x1234\",\n      balance: 100,\n      code: 0,\n      contracts: {},\n      keys: [],\n    }\n\n    const accountMock = jest.mocked(mockFcl.mockFclInstance.account)\n    accountMock.mockResolvedValueOnce(mockAccount)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowAccount({address: \"0x1234\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeNull()\n\n    // Wait for the hook to finish loading\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    // After update, the data should be available\n    expect(hookResult.current.data).toEqual(mockAccount)\n    expect(hookResult.current.error).toBeNull()\n    expect(accountMock).toHaveBeenCalledWith(\"0x1234\")\n  })\n\n  test(\"handles error when fetching account fails\", async () => {\n    const testError = new Error(\"Failed to fetch account\")\n    const accountMock = jest.mocked(mockFcl.mockFclInstance.account)\n    accountMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowAccount({address: \"0x5678\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.error).toBeNull()\n    expect(hookResult.current.data).toBeNull()\n\n    // Wait for the loading to finish and error to appear\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    // After loading is complete, we should have an error\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).not.toBeNull()\n    expect(hookResult.current.error?.message).toEqual(\"Failed to fetch account\")\n    expect(accountMock).toHaveBeenCalledWith(\"0x5678\")\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const mockAccount: Account = {\n      address: \"0x1234\",\n      balance: 100,\n      code: 0,\n      contracts: {},\n      keys: [],\n    }\n\n    const accountMock = jest.mocked(mockFcl.mockFclInstance.account)\n    accountMock.mockResolvedValueOnce(mockAccount)\n\n    let hookResult: any\n    await act(async () => {\n      const {result} = renderHook(() => useFlowAccount({address: \"0x1234\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.isLoading).toBe(false)\n    })\n\n    expect(hookResult.current.data).toEqual(mockAccount)\n\n    const updatedAccount = {...mockAccount, balance: 200}\n    accountMock.mockResolvedValueOnce(updatedAccount)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.data?.balance).toBe(200)\n    })\n\n    expect(hookResult.current.data).toEqual(updatedAccount)\n    expect(accountMock).toHaveBeenCalledTimes(2)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowAccount.ts",
    "content": "import type {Account} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useQuery, UseQueryResult, UseQueryOptions} from \"@tanstack/react-query\"\nimport {useCallback} from \"react\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseFlowAccountArgs {\n  /** Flow address (with or without `0x`) */\n  address?: string\n  /** React Query settings (staleTime, retry, enabled, select, etc.) */\n  query?: Omit<UseQueryOptions<Account | null, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * Fetches Flow account data for a given address.\n *\n * @param args.address – Flow address\n * @param args.query – Optional React Query options\n */\nexport function useFlowAccount({\n  address,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowAccountArgs): UseQueryResult<Account | null, Error> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const fetchAccount = useCallback(async () => {\n    if (!address) return null\n    return (await fcl.account(address)) as Account\n  }, [address])\n\n  return useQuery<Account | null, Error>(\n    {\n      queryKey: [\"flowAccount\", address],\n      queryFn: fetchAccount,\n      initialData: null,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowAuthz.test.ts",
    "content": "import {InteractionAccount} from \"@onflow/typedefs\"\nimport {act, renderHook} from \"@testing-library/react\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowAuthz} from \"./useFlowAuthz\"\n\nconst createMockAccount = (): Partial<InteractionAccount> => ({\n  tempId: \"MOCK_TEMP_ID\",\n  resolve: null,\n})\n\ndescribe(\"useFlowAuthz\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"returns authorization function from current user\", () => {\n    const {result} = renderHook(() => useFlowAuthz(), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current).toBeDefined()\n    expect(typeof result.current).toBe(\"function\")\n    expect(result.current).toBe(\n      mockFcl.mockFclInstance.currentUser.authorization\n    )\n  })\n\n  test(\"authorization function can be called\", async () => {\n    const mockAuthzFn = jest.fn().mockResolvedValue({\n      tempId: \"CURRENT_USER\",\n      resolve: jest.fn(),\n    })\n\n    mockFcl.mockFclInstance.currentUser.authorization = mockAuthzFn\n\n    const {result} = renderHook(() => useFlowAuthz(), {\n      wrapper: TestProvider,\n    })\n\n    const mockAccount = createMockAccount()\n\n    await act(async () => {\n      await result.current(mockAccount)\n    })\n\n    expect(mockAuthzFn).toHaveBeenCalledWith(mockAccount)\n  })\n\n  test(\"returns stable authorization reference\", () => {\n    const {result, rerender} = renderHook(() => useFlowAuthz(), {\n      wrapper: TestProvider,\n    })\n\n    const firstAuth = result.current\n    expect(firstAuth).toBeDefined()\n\n    // Rerender should return the same authorization function\n    rerender()\n\n    expect(result.current).toBe(firstAuth)\n  })\n\n  test(\"uses custom flowClient when provided\", () => {\n    const customMockFcl = createMockFclInstance()\n    const customFlowClient = customMockFcl.mockFclInstance as any\n\n    const {result} = renderHook(\n      () =>\n        useFlowAuthz({\n          flowClient: customFlowClient,\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    expect(result.current).toBe(customFlowClient.currentUser.authorization)\n  })\n\n  test(\"creates custom authorization with authorization function\", () => {\n    const customAuthz = (account: Partial<InteractionAccount>) => ({\n      ...account,\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      signingFunction: jest.fn(),\n    })\n\n    const {result} = renderHook(() => useFlowAuthz({authz: customAuthz}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current).toBeDefined()\n    expect(typeof result.current).toBe(\"function\")\n    expect(result.current).toBe(customAuthz)\n  })\n\n  test(\"custom authorization returns correct account data\", () => {\n    const customAddress = \"0xBACKEND\"\n    const customKeyId = 5\n    const mockSigningFunction = jest.fn()\n\n    const customAuthz = (account: Partial<InteractionAccount>) => ({\n      ...account,\n      addr: customAddress,\n      keyId: customKeyId,\n      signingFunction: mockSigningFunction,\n    })\n\n    const {result} = renderHook(() => useFlowAuthz({authz: customAuthz}), {\n      wrapper: TestProvider,\n    })\n\n    const mockAccount = createMockAccount()\n    const authResult = result.current(\n      mockAccount\n    ) as Partial<InteractionAccount>\n\n    expect(authResult.addr).toBe(customAddress)\n    expect(authResult.keyId).toBe(customKeyId)\n    expect(authResult.signingFunction).toBe(mockSigningFunction)\n  })\n\n  test(\"custom authorization signing function can be called\", async () => {\n    const mockSigningFunction = jest.fn().mockResolvedValue({\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      signature: \"mock_signature_123\",\n    })\n\n    const customAuthz = (account: Partial<InteractionAccount>) => ({\n      ...account,\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      signingFunction: mockSigningFunction,\n    })\n\n    const {result} = renderHook(() => useFlowAuthz({authz: customAuthz}), {\n      wrapper: TestProvider,\n    })\n\n    const mockAccount = createMockAccount()\n    const authResult = result.current(\n      mockAccount\n    ) as Partial<InteractionAccount>\n\n    const mockSignable = {\n      message: \"test_message\",\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      roles: {proposer: false, authorizer: true, payer: false},\n      voucher: {},\n    }\n\n    const signatureResult = await authResult.signingFunction!(mockSignable)\n\n    expect(mockSigningFunction).toHaveBeenCalledWith(mockSignable)\n    expect(signatureResult).toEqual({\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      signature: \"mock_signature_123\",\n    })\n  })\n\n  test(\"custom authorization works even when user is not logged in\", () => {\n    const customAuthz = (account: Partial<InteractionAccount>) => ({\n      ...account,\n      addr: \"0xBACKEND\",\n      keyId: 0,\n      signingFunction: jest.fn(),\n    })\n\n    const {result} = renderHook(() => useFlowAuthz({authz: customAuthz}), {\n      wrapper: TestProvider,\n    })\n\n    // User is not logged in (defaultUser.loggedIn === false)\n    // But custom auth should still work\n    expect(result.current).toBeDefined()\n    expect(typeof result.current).toBe(\"function\")\n    expect(result.current).toBe(customAuthz)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowAuthz.ts",
    "content": "import type {InteractionAccount} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport type AuthorizationFunction = (\n  account: Partial<InteractionAccount>\n) => Partial<InteractionAccount> | Promise<Partial<InteractionAccount>>\n\ninterface UseFlowAuthzArgs {\n  /** Custom authorization function. If not provided, uses current user's wallet authorization. */\n  authz?: AuthorizationFunction\n  /** Optional FlowClient instance to use instead of the default */\n  flowClient?: FlowClientCore\n}\n\n/**\n * @description A React hook that returns an authorization function for Flow transactions.\n * If no custom authorization is provided, it returns the current user's wallet authorization.\n *\n * @param options Optional configuration object\n * @param options.authz Optional custom authorization function\n * @param options.flowClient Optional FlowClient instance to use instead of the default\n *\n * @returns The authorization function compatible with Flow transactions authorizations parameter\n *\n * @example\n * // Current user authorization\n * import { useFlowAuthz } from \"@onflow/react-sdk\"  // or @onflow/react-native-sdk\n * import * as fcl from \"@onflow/fcl\"  // or @onflow/fcl-react-native on mobile\n *\n * function MyComponent() {\n *   const authorization = useFlowAuthz()\n *\n *   const sendTransaction = async () => {\n *     await fcl.mutate({\n *       cadence: `transaction { prepare(signer: auth(Storage) &Account) {} }`,\n *       authorizations: [authorization],\n *     })\n *   }\n * }\n *\n * @example\n * // Custom authorization function\n * import { useFlowAuthz } from \"@onflow/react-sdk\"  // or @onflow/react-native-sdk\n * import * as fcl from \"@onflow/fcl\"  // or @onflow/fcl-react-native on mobile\n *\n * function MyComponent() {\n *   const customAuthz = (account) => ({\n *     ...account,\n *     addr: \"0xCUSTOM\",\n *     keyId: 0,\n *     signingFunction: async (signable) => ({ signature: \"0x...\" })\n *   })\n *\n *   const authorization = useFlowAuthz({ authz: customAuthz })\n *\n *   const sendTransaction = async () => {\n *     await fcl.mutate({\n *       cadence: `transaction { prepare(signer: auth(Storage) &Account) {} }`,\n *       authorizations: [authorization],\n *     })\n *   }\n * }\n */\nexport function useFlowAuthz({\n  authz,\n  flowClient,\n}: UseFlowAuthzArgs = {}): AuthorizationFunction {\n  const fcl = useFlowClient({flowClient})\n  return authz || (fcl.currentUser.authorization as any)\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowBlock.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowBlock} from \"./useFlowBlock\"\nimport {Block} from \"@onflow/typedefs\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowBlock\", () => {\n  let mockFcl: MockFclInstance\n\n  const mockLatestBlock: Block = {\n    id: \"latest-block-id\",\n    parentId: \"parent-id\",\n    height: 100,\n    timestamp: \"2023-01-01T00:00:00Z\",\n    collectionGuarantees: [],\n    blockSeals: [],\n    parentVoterSignature: \"\",\n  }\n\n  const mockSealedBlock: Block = {\n    id: \"sealed-block-id\",\n    parentId: \"parent-id\",\n    height: 99,\n    timestamp: \"2023-01-01T00:00:00Z\",\n    collectionGuarantees: [],\n    blockSeals: [],\n    parentVoterSignature: \"\",\n  }\n\n  const mockBlockById: Block = {\n    id: \"specific-block-id\",\n    parentId: \"parent-id\",\n    height: 50,\n    timestamp: \"2023-01-01T00:00:00Z\",\n    collectionGuarantees: [],\n    blockSeals: [],\n    parentVoterSignature: \"\",\n  }\n\n  const mockBlockByHeight: Block = {\n    id: \"block-at-height-75\",\n    parentId: \"parent-id\",\n    height: 75,\n    timestamp: \"2023-01-01T00:00:00Z\",\n    collectionGuarantees: [],\n    blockSeals: [],\n    parentVoterSignature: \"\",\n  }\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"fetches the latest block when no parameters are provided\", async () => {\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockLatestBlock)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeNull()\n\n    // Wait for the hook to finish loading\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    // After update, the data should be available\n    expect(hookResult.current.data).toEqual(mockLatestBlock)\n    expect(hookResult.current.error).toBeNull()\n    expect(hookResult.current.data).toEqual(mockLatestBlock)\n  })\n\n  test(\"fetches the latest sealed block when sealed is true\", async () => {\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockSealedBlock)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock({sealed: true}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toEqual(mockSealedBlock)\n    expect(blockMock).toHaveBeenCalledWith({sealed: true})\n  })\n\n  test(\"fetches a block by ID\", async () => {\n    const blockId = \"specific-block-id\"\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockBlockById)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock({id: blockId}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toEqual(mockBlockById)\n    expect(blockMock).toHaveBeenCalledWith({id: blockId})\n  })\n\n  test(\"fetches a block by height\", async () => {\n    const height = 75\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockBlockByHeight)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock({height}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toEqual(mockBlockByHeight)\n    expect(blockMock).toHaveBeenCalledWith({height})\n  })\n\n  test(\"handles error when fetching block fails\", async () => {\n    const testError = new Error(\"Failed to fetch block\")\n\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock({id: \"invalid-id\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).toEqual(testError)\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockLatestBlock)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() =>\n      expect(hookResult.current.data).toEqual(mockLatestBlock)\n    )\n\n    const newLatestBlock = {...mockLatestBlock, height: 101}\n    blockMock.mockResolvedValueOnce(newLatestBlock)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(newLatestBlock))\n\n    expect(mockFcl.mockFclInstance.block).toHaveBeenCalledTimes(2)\n  })\n\n  test(\"updates when parameters change\", async () => {\n    const blockMock = jest.mocked(mockFcl.mockFclInstance.block)\n    blockMock.mockResolvedValueOnce(mockLatestBlock)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowBlock(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() =>\n      expect(hookResult.current.data).toEqual(mockLatestBlock)\n    )\n\n    const newLatestBlock = {...mockLatestBlock, height: 101}\n    blockMock.mockResolvedValueOnce(newLatestBlock)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(newLatestBlock))\n\n    expect(mockFcl.mockFclInstance.block).toHaveBeenCalledTimes(2)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowBlock.ts",
    "content": "import type {Block} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useQuery, UseQueryResult, UseQueryOptions} from \"@tanstack/react-query\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useCallback, useMemo} from \"react\"\nimport {useFlowClient} from \"./useFlowClient\"\n\ninterface BlockByLatest {\n  sealed?: never\n  id?: never\n  height?: never\n}\n\ninterface BlockByLatestSealed {\n  sealed?: boolean\n  id?: never\n  height?: never\n}\n\ninterface BlockById {\n  id: string\n  sealed?: never\n  height?: never\n}\n\ninterface BlockByHeight {\n  height: number\n  sealed?: never\n  id?: never\n}\n\ntype UseBlockParams =\n  | BlockByLatest\n  | BlockByLatestSealed\n  | BlockById\n  | BlockByHeight\n\nexport interface UseFlowBlockArgs {\n  sealed?: boolean\n  id?: string\n  height?: number\n  query?: Omit<UseQueryOptions<Block | null, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * Fetches a Flow block according to the given params.\n *\n * @param params\n *   - sealed: boolean (optional) – latest sealed block\n *   - id: string (optional)     – block by ID\n *   - height: number (optional) – block by height\n *   - query: (optional)         – React Query flags (enabled, staleTime, retry, etc.)\n */\nexport function useFlowBlock(\n  params: UseFlowBlockArgs = {}\n): UseQueryResult<Block | null, Error> {\n  const {sealed, id, height, query: queryOptions = {}, flowClient} = params\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const domainParams = useMemo<UseBlockParams>(\n    () => ({sealed, id, height}) as UseBlockParams,\n    [sealed, id, height]\n  )\n\n  const fetchBlock = useCallback(async () => {\n    return (await fcl.block(domainParams)) as Block\n  }, [domainParams])\n\n  return useQuery<Block | null, Error>(\n    {\n      queryKey: [\"flowBlock\", domainParams],\n      queryFn: fetchBlock,\n      initialData: null,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowChainId.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowChainId\", () => {\n  let mockFcl: MockFclInstance\n  const mockChainId = \"mainnet\"\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"fetches the chain ID successfully\", async () => {\n    const getChainIdMock = jest.mocked(mockFcl.mockFclInstance.getChainId)\n    getChainIdMock.mockResolvedValueOnce(mockChainId)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowChainId(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeNull()\n\n    // Wait for the hook to finish loading\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    // After update, the data should be available\n    expect(hookResult.current.data).toEqual(mockChainId)\n    expect(hookResult.current.error).toBeNull()\n    expect(getChainIdMock).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"handles error when fetching chain ID fails\", async () => {\n    const testError = new Error(\"Failed to fetch chain ID\")\n    const getChainIdMock = jest.mocked(mockFcl.mockFclInstance.getChainId)\n    getChainIdMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowChainId(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).toEqual(testError)\n    expect(getChainIdMock).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const getChainIdMock = jest.mocked(mockFcl.mockFclInstance.getChainId)\n    getChainIdMock.mockResolvedValueOnce(mockChainId)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowChainId(), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(mockChainId))\n\n    const newChainId = \"testnet\"\n    getChainIdMock.mockResolvedValueOnce(newChainId)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(newChainId))\n\n    expect(mockFcl.mockFclInstance.getChainId).toHaveBeenCalledTimes(2)\n  })\n\n  test(\"respects custom query options\", async () => {\n    const getChainIdMock = jest.mocked(mockFcl.mockFclInstance.getChainId)\n    getChainIdMock.mockResolvedValueOnce(mockChainId)\n\n    const customOptions = {\n      enabled: false,\n      staleTime: 1000,\n    }\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowChainId({query: customOptions}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    // Since enabled is false, the query should not run\n    expect(getChainIdMock).not.toHaveBeenCalled()\n    expect(hookResult.current.data).toBeNull()\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowChainId.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useQuery, UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useCallback} from \"react\"\nimport {useFlowClient} from \"./useFlowClient\"\nimport {useFlowConfig} from \"./useFlowConfig\"\n\ninterface UseFlowChainIdArgs {\n  query?: Omit<UseQueryOptions<string | null, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * Gets the Flow chain ID.\n */\nexport function useFlowChainId({\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowChainIdArgs = {}): UseQueryResult<string | null, Error> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n  const config = useFlowConfig()\n\n  const fetchChainId = useCallback(async () => {\n    return await fcl.getChainId()\n  }, [fcl, config])\n\n  return useQuery<string | null, Error>(\n    {\n      queryKey: [\"flowChainId\"],\n      queryFn: fetchChainId,\n      initialData: null,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowClient.ts",
    "content": "import {useContext} from \"react\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {FlowClientContext} from \"../core/context\"\n\nexport function useFlowClient({\n  flowClient,\n}: {flowClient?: FlowClientCore} = {}) {\n  const contextClient = useContext(FlowClientContext)\n  const _flowClient = flowClient ?? contextClient\n  if (!_flowClient) {\n    throw new Error(\n      \"useFlowClient must be used within FlowProvider or manually specified using the flowClient property\"\n    )\n  }\n  return _flowClient\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowConfig.ts",
    "content": "import {useContext} from \"react\"\nimport {FlowConfigContext, FlowConfig} from \"../core/context\"\n\nexport function useFlowConfig(): FlowConfig {\n  return useContext(FlowConfigContext)\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowCurrentUser.test.ts",
    "content": "import {renderHook, act} from \"@testing-library/react\"\nimport {useFlowCurrentUser} from \"./useFlowCurrentUser\"\n// Import directly from the new hook, not from the deprecated one\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {CurrentUser} from \"@onflow/typedefs\"\nimport {defaultUser, authenticatedUser} from \"../__mocks__/user\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowCurrentUser\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"initializes with the correct default user state\", () => {\n    const {result} = renderHook(() => useFlowCurrentUser(), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.user).toEqual(defaultUser)\n  })\n\n  test(\"updates user state when subscription emits a new user\", () => {\n    let subscribeCallback: (user: CurrentUser) => void = () => {}\n\n    const subscribeMock = jest.mocked(\n      mockFcl.mockFclInstance.currentUser.subscribe\n    )\n\n    subscribeMock.mockImplementation((callback: any) => {\n      subscribeCallback = callback\n      callback(defaultUser)\n      return () => {}\n    })\n\n    const {result} = renderHook(() => useFlowCurrentUser(), {\n      wrapper: TestProvider,\n    })\n\n    act(() => {\n      subscribeCallback(authenticatedUser)\n    })\n\n    expect(result.current.user).toEqual(authenticatedUser)\n  })\n\n  test(\"authenticate calls fcl.authenticate and returns the authenticated user\", async () => {\n    const authenticateMock = jest.mocked(mockFcl.mockFclInstance.authenticate)\n    authenticateMock.mockResolvedValueOnce(authenticatedUser)\n\n    const {result} = renderHook(() => useFlowCurrentUser(), {\n      wrapper: TestProvider,\n    })\n\n    let returnedUser: CurrentUser | undefined\n    await act(async () => {\n      returnedUser = await result.current.authenticate()\n    })\n\n    expect(mockFcl.mockFclInstance.authenticate).toHaveBeenCalledTimes(1)\n\n    expect(returnedUser).toEqual(authenticatedUser)\n  })\n\n  test(\"unauthenticate calls fcl.unauthenticate and updates user state\", async () => {\n    const {result} = renderHook(() => useFlowCurrentUser(), {\n      wrapper: TestProvider,\n    })\n\n    await act(async () => {\n      result.current.unauthenticate()\n    })\n\n    expect(mockFcl.mockFclInstance.unauthenticate).toHaveBeenCalledTimes(1)\n\n    expect(result.current.user).toEqual(defaultUser)\n  })\n\n  test(\"unsubscribes from user changes on unmount\", () => {\n    const unsubscribeMock = jest.fn()\n\n    const subscribeMock = jest.mocked(\n      mockFcl.mockFclInstance.currentUser.subscribe\n    )\n    subscribeMock.mockImplementation((callback: any) => {\n      return unsubscribeMock\n    })\n\n    const {unmount} = renderHook(() => useFlowCurrentUser(), {\n      wrapper: TestProvider,\n    })\n\n    unmount()\n\n    expect(unsubscribeMock).toHaveBeenCalledTimes(1)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowCurrentUser.ts",
    "content": "import {useState, useEffect} from \"react\"\nimport type {CurrentUser} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\ninterface UseFlowCurrentUserArgs {\n  flowClient?: FlowClientCore\n}\n\ninterface UseFlowCurrentUserResult {\n  user: CurrentUser | null\n  authenticate: () => Promise<CurrentUser>\n  unauthenticate: () => void\n}\n\nexport function useFlowCurrentUser({\n  flowClient,\n}: UseFlowCurrentUserArgs = {}): UseFlowCurrentUserResult {\n  const [user, setUser] = useState<CurrentUser | null>(null)\n  const fcl = useFlowClient({flowClient})\n\n  useEffect(() => {\n    const unsubscribe = fcl.currentUser.subscribe(setUser)\n    return () => unsubscribe()\n  }, [fcl])\n\n  const authenticate = async (): Promise<CurrentUser> => {\n    try {\n      return await fcl.authenticate()\n    } catch (error) {\n      throw error\n    }\n  }\n\n  const unauthenticate = (): void => {\n    fcl.unauthenticate()\n  }\n\n  return {\n    user,\n    authenticate,\n    unauthenticate,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowEvents.test.ts",
    "content": "import {renderHook, act} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowEvents} from \"./useFlowEvents\"\nimport {Event} from \"@onflow/typedefs\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowEvents\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"subscribes to events with eventTypes array and calls onEvent\", () => {\n    const mockEvent: Event = {\n      type: \"A.0xDeaDBeef.SomeContract.SomeEvent\",\n      transactionId: \"tx-id\",\n      transactionIndex: 0,\n      eventIndex: 0,\n      data: {someField: \"value\"},\n      blockId: \"block-id\",\n      blockHeight: 100,\n      blockTimestamp: \"2023-01-01T00:00:00Z\",\n    }\n\n    let eventCallback: (event: Event | null) => void\n    const mockUnsubscribe = jest.fn()\n    const mockSubscribe = jest.fn(callback => {\n      eventCallback = callback\n      return mockUnsubscribe\n    })\n\n    const eventsMock = jest.mocked(mockFcl.mockFclInstance.events)\n    eventsMock.mockReturnValueOnce({subscribe: mockSubscribe} as any)\n\n    const onEvent = jest.fn()\n\n    const {unmount} = renderHook(\n      () =>\n        useFlowEvents({\n          eventTypes: [\"A.0xDeaDBeef.SomeContract.SomeEvent\"],\n          onEvent,\n        }),\n      {wrapper: TestProvider}\n    )\n\n    expect(mockFcl.mockFclInstance.events).toHaveBeenCalledWith({\n      eventTypes: [\"A.0xDeaDBeef.SomeContract.SomeEvent\"],\n    })\n    expect(mockSubscribe).toHaveBeenCalled()\n\n    act(() => {\n      eventCallback(mockEvent)\n    })\n    expect(onEvent).toHaveBeenCalledWith(mockEvent)\n\n    unmount()\n    expect(mockUnsubscribe).toHaveBeenCalled()\n  })\n\n  test(\"subscribes to events with full filter object and calls onEvent\", () => {\n    const mockEvent: Event = {\n      type: \"A.0xDeaDBeef.SomeContract.SomeEvent\",\n      transactionId: \"tx-id\",\n      transactionIndex: 0,\n      eventIndex: 0,\n      data: {someField: \"value\"},\n      blockId: \"block-id\",\n      blockHeight: 100,\n      blockTimestamp: \"2023-01-01T00:00:00Z\",\n    }\n\n    let eventCallback: (event: Event | null) => void\n    const mockUnsubscribe = jest.fn()\n    const mockSubscribe = jest.fn(callback => {\n      eventCallback = callback\n      return mockUnsubscribe\n    })\n\n    const eventsMock = jest.mocked(mockFcl.mockFclInstance.events)\n    eventsMock.mockReturnValueOnce({subscribe: mockSubscribe} as any)\n\n    const filter = {\n      startHeight: 100,\n      eventTypes: [\"A.0xDeaDBeef.SomeContract.SomeEvent\"],\n      addresses: [\"0x1234\"],\n    }\n\n    const onEvent = jest.fn()\n    const {unmount} = renderHook(\n      () =>\n        useFlowEvents({\n          ...filter,\n          onEvent,\n        }),\n      {wrapper: TestProvider}\n    )\n\n    expect(mockFcl.mockFclInstance.events).toHaveBeenCalledWith(filter)\n    expect(mockSubscribe).toHaveBeenCalled()\n\n    act(() => {\n      eventCallback(mockEvent)\n    })\n    expect(onEvent).toHaveBeenCalledWith(mockEvent)\n\n    unmount()\n    expect(mockUnsubscribe).toHaveBeenCalled()\n  })\n\n  test(\"handles error during subscription\", () => {\n    const testError = new Error(\"Subscription failed\")\n\n    const eventsMock = jest.mocked(mockFcl.mockFclInstance.events)\n    eventsMock.mockImplementation(() => {\n      throw testError\n    })\n\n    const onEvent = jest.fn()\n    const onError = jest.fn()\n\n    renderHook(\n      () =>\n        useFlowEvents({\n          eventTypes: [\"A.0xDeaDBeef.SomeContract.SomeEvent\"],\n          onEvent,\n          onError,\n        }),\n      {wrapper: TestProvider}\n    )\n\n    expect(onError).toHaveBeenCalledWith(testError)\n    expect(onEvent).not.toHaveBeenCalled()\n  })\n\n  test(\"calls onEvent multiple times for multiple events\", () => {\n    const mockEvent1: Event = {\n      type: \"A.0xDeaDBeef.SomeContract.SomeEvent\",\n      transactionId: \"tx-id-1\",\n      transactionIndex: 0,\n      eventIndex: 0,\n      data: {someField: \"value1\"},\n      blockId: \"block-id-1\",\n      blockHeight: 100,\n      blockTimestamp: \"2023-01-01T00:00:00Z\",\n    }\n    const mockEvent2: Event = {\n      type: \"A.0xDeaDBeef.SomeContract.SomeEvent\",\n      transactionId: \"tx-id-2\",\n      transactionIndex: 0,\n      eventIndex: 0,\n      data: {someField: \"value2\"},\n      blockId: \"block-id-2\",\n      blockHeight: 101,\n      blockTimestamp: \"2023-01-01T00:01:00Z\",\n    }\n\n    let eventCallback: (event: Event | null) => void\n    const mockUnsubscribe = jest.fn()\n    const mockSubscribe = jest.fn(callback => {\n      eventCallback = callback\n      return mockUnsubscribe\n    })\n\n    const eventsMock = jest.mocked(mockFcl.mockFclInstance.events)\n    eventsMock.mockReturnValueOnce({subscribe: mockSubscribe} as any)\n\n    const onEvent = jest.fn()\n    renderHook(\n      () =>\n        useFlowEvents({\n          eventTypes: [\"A.0xDeaDBeef.SomeContract.SomeEvent\"],\n          onEvent,\n        }),\n      {wrapper: TestProvider}\n    )\n\n    act(() => {\n      eventCallback(mockEvent1)\n    })\n    act(() => {\n      eventCallback(mockEvent2)\n    })\n\n    expect(onEvent).toHaveBeenCalledTimes(2)\n    expect(onEvent).toHaveBeenCalledWith(mockEvent1)\n    expect(onEvent).toHaveBeenCalledWith(mockEvent2)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowEvents.ts",
    "content": "import type {Event} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useEffect} from \"react\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface EventFilter {\n  startBlockId?: string\n  startHeight?: number\n  eventTypes?: string[]\n  addresses?: string[]\n  contracts?: string[]\n  opts?: {\n    heartbeatInterval?: number\n  }\n}\n\nexport interface UseFlowEventsArgs extends EventFilter {\n  /** Called for each new event received */\n  onEvent: (event: Event) => void\n  /** Optional error callback */\n  onError?: (error: Error) => void\n  flowClient?: FlowClientCore\n}\n\n/**\n * useFlowEvents hook\n *\n * Subscribes to a Flow event stream and calls the provided callbacks.\n */\nexport function useFlowEvents({\n  startBlockId,\n  startHeight,\n  eventTypes,\n  addresses,\n  contracts,\n  opts,\n  onEvent,\n  onError,\n  flowClient,\n}: UseFlowEventsArgs) {\n  const fcl = useFlowClient({flowClient})\n\n  useEffect(() => {\n    let unsubscribe: (() => void) | undefined\n\n    try {\n      const filter: EventFilter = {\n        startBlockId,\n        startHeight,\n        eventTypes,\n        addresses,\n        contracts,\n        opts,\n      }\n\n      unsubscribe = fcl.events(filter).subscribe((newEvent: Event | null) => {\n        if (newEvent) {\n          onEvent(newEvent)\n        }\n      })\n    } catch (err) {\n      const error = err instanceof Error ? err : new Error(String(err))\n      onError?.(error)\n    }\n\n    return () => {\n      unsubscribe?.()\n    }\n  }, [\n    startBlockId,\n    startHeight,\n    JSON.stringify(eventTypes),\n    JSON.stringify(addresses),\n    JSON.stringify(contracts),\n    JSON.stringify(opts),\n    onEvent,\n    onError,\n  ])\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowMutate.test.ts",
    "content": "import {renderHook} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowMutate} from \"./useFlowMutate\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowMutate\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"calls fcl.mutate and returns transaction id\", async () => {\n    const txId = \"transaction-id-123\"\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockResolvedValueOnce(txId)\n\n    const variables = {\n      cadence: \"transaction {}\",\n      args: (arg: any) => [],\n    }\n    const {result} = renderHook(() => useFlowMutate(), {\n      wrapper: TestProvider,\n    })\n\n    const returnedTxId = await result.current.mutateAsync(variables)\n    expect(returnedTxId).toBe(txId)\n    expect(mockFcl.mockFclInstance.mutate).toHaveBeenCalledWith(variables)\n  })\n\n  test(\"handles error when fcl.mutate rejects\", async () => {\n    const error = new Error(\"Mutation failed\")\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockRejectedValue(error)\n\n    const variables = {\n      cadence: \"transaction {}\",\n      args: (arg: any) => [],\n    }\n    const {result} = renderHook(() => useFlowMutate(), {\n      wrapper: TestProvider,\n    })\n\n    await expect(result.current.mutateAsync(variables)).rejects.toThrow(error)\n    expect(mockFcl.mockFclInstance.mutate).toHaveBeenCalledWith(variables)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowMutate.ts",
    "content": "import {\n  useMutation,\n  UseMutationResult,\n  UseMutationOptions,\n} from \"@tanstack/react-query\"\nimport {useCallback} from \"react\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\n/**\n * Arguments for the useFlowMutate hook.\n *\n * - `mutation`: Optional React Query mutation settings\n *   (e.g. `onSuccess`, `onError`, `retry`, `retryDelay`, etc.).\n */\nexport interface UseFlowMutateArgs {\n  mutation?: Omit<UseMutationOptions<string, Error, any>, \"mutationFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * useFlowMutate\n *\n * Sends a Flow transaction via FCL and returns a React Query mutation.\n *\n * @param args.mutation – Optional React Query mutation options\n */\nexport function useFlowMutate({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseFlowMutateArgs = {}): UseMutationResult<string, Error, any> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const mutationFn = useCallback(\n    async (variables: any) => {\n      const txId = await fcl.mutate(variables)\n      return txId\n    },\n    [fcl]\n  )\n\n  return useMutation<string, Error, any>(\n    {\n      mutationFn,\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowNftMetadata.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowNftMetadata, NftViewResult} from \"./useFlowNftMetadata\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowNftMetadata\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"returns null data when required params are missing\", async () => {\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(null)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowNftMetadata({}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).toBeNull()\n  })\n\n  test(\"fetches NFT metadata when all params are provided\", async () => {\n    const mockNftData = {\n      name: \"Test NFT\",\n      description: \"A test NFT\",\n      thumbnail: {url: \"https://example.com/nft.png\"},\n      externalURL: \"https://example.com/nft/123\",\n      collectionDisplay: {\n        name: \"Test Collection\",\n        externalURL: {url: \"https://example.com/collection\"},\n      },\n      rarity: \"Rare\",\n      traits: {color: \"blue\", size: \"large\"},\n      serialNumber: \"123\",\n    }\n\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(mockNftData)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () =>\n          useFlowNftMetadata({\n            accountAddress: \"0x1234\",\n            tokenId: \"123\",\n            publicPathIdentifier: \"examplenftcollection\",\n          }),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeNull()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    const expectedResult: NftViewResult = {\n      name: \"Test NFT\",\n      description: \"A test NFT\",\n      thumbnailUrl: \"https://example.com/nft.png\",\n      externalUrl: \"https://example.com/nft/123\",\n      collectionName: \"Test Collection\",\n      collectionExternalUrl: \"https://example.com/collection\",\n      tokenID: \"123\",\n      traits: {color: \"blue\", size: \"large\"},\n      rarity: \"Rare\",\n      serialNumber: \"123\",\n    }\n\n    expect(hookResult.current.data).toEqual(expectedResult)\n    expect(hookResult.current.error).toBeNull()\n    expect(queryMock).toHaveBeenCalledWith(\n      expect.objectContaining({\n        cadence: expect.stringContaining(\"NonFungibleToken\"),\n        args: expect.any(Function),\n      })\n    )\n  })\n\n  test(\"handles missing NFT data gracefully\", async () => {\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(null)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () =>\n          useFlowNftMetadata({\n            accountAddress: \"0x1234\",\n            tokenId: \"999\",\n            publicPathIdentifier: \"examplenftcollection\",\n          }),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).toBeNull()\n  })\n\n  test(\"handles error when fetching NFT fails\", async () => {\n    const testError = new Error(\"Failed to fetch NFT\")\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () =>\n          useFlowNftMetadata({\n            accountAddress: \"0x5678\",\n            tokenId: \"123\",\n            publicPathIdentifier: \"examplenftcollection\",\n          }),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    expect(hookResult.current.error).toBeNull()\n    expect(hookResult.current.data).toBeNull()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).not.toBeNull()\n    expect(hookResult.current.error?.message).toEqual(\"Failed to fetch NFT\")\n  })\n\n  test(\"processes IPFS thumbnails correctly\", async () => {\n    const mockNftData = {\n      name: \"IPFS NFT\",\n      description: \"An NFT with IPFS thumbnail\",\n      thumbnail: {\n        cid: \"QmTest123\",\n        path: \"/image.png\",\n      },\n      externalURL: null,\n      collectionDisplay: null,\n      rarity: null,\n      traits: {},\n      serialNumber: null,\n    }\n\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(mockNftData)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () =>\n          useFlowNftMetadata({\n            accountAddress: \"0x1234\",\n            tokenId: \"123\",\n            publicPathIdentifier: \"examplenftcollection\",\n          }),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data?.thumbnailUrl).toBe(\n      \"https://ipfs.io/ipfs/QmTest123/image.png\"\n    )\n    expect(hookResult.current.data?.name).toBe(\"IPFS NFT\")\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const initialNftData = {\n      name: \"Initial NFT\",\n      description: \"Initial description\",\n      thumbnail: {url: \"https://example.com/initial.png\"},\n      externalURL: null,\n      collectionDisplay: null,\n      rarity: null,\n      traits: {},\n      serialNumber: \"123\",\n    }\n\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(initialNftData)\n\n    let hookResult: any\n    await act(async () => {\n      const {result} = renderHook(\n        () =>\n          useFlowNftMetadata({\n            accountAddress: \"0x1234\",\n            tokenId: \"123\",\n            publicPathIdentifier: \"examplenftcollection\",\n          }),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.isLoading).toBe(false)\n    })\n\n    expect(hookResult.current.data?.name).toBe(\"Initial NFT\")\n\n    const updatedNftData = {...initialNftData, name: \"Updated NFT\"}\n    queryMock.mockResolvedValueOnce(updatedNftData)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.data?.name).toBe(\"Updated NFT\")\n    })\n\n    expect(queryMock).toHaveBeenCalledTimes(2)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowNftMetadata.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {useFlowQuery} from \"./useFlowQuery\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowChainId} from \"./useFlowChainId\"\n\nexport interface NftViewResult {\n  name: string\n  description: string\n  thumbnailUrl: string\n  externalUrl?: string\n  collectionName?: string\n  collectionExternalUrl?: string\n  tokenID: string\n  traits?: Record<string, string>\n  rarity?: string\n  serialNumber?: string\n}\n\ninterface UseFlowNftMetadataArgs {\n  accountAddress?: string\n  tokenId?: string | number\n  publicPathIdentifier?: string\n  query?: Omit<UseQueryOptions<unknown, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\nconst getNftCadence = (network: \"testnet\" | \"mainnet\" | \"local\") => `\n  import NonFungibleToken from ${CONTRACT_ADDRESSES[network].NonFungibleToken}\n  import MetadataViews from ${CONTRACT_ADDRESSES[network].MetadataViews}\n  import ViewResolver from ${CONTRACT_ADDRESSES[network].ViewResolver}\n\n  access(all) struct ViewInfo {\n    access(all) let name: String\n    access(all) let description: String\n    access(all) let thumbnail: {MetadataViews.File}\n    access(all) let rarity: String?\n    access(all) let transferrable: Bool\n    access(all) let collectionDisplay: MetadataViews.NFTCollectionDisplay?\n    access(all) let externalURL: String?\n    access(all) let traits: {String: String}?\n    access(all) let royalties: {String: UFix64}?\n    access(all) let serialNumber: UInt64?\n\n    init(name: String, description: String, thumbnail: {MetadataViews.File}, rarity: String?, transferrable: Bool, collectionDisplay: MetadataViews.NFTCollectionDisplay?, externalURL: String?, traits: {String: String}?, royalties: {String: UFix64}?, serialNumber: UInt64?) {\n      self.name = name\n      self.description = description\n      self.thumbnail = thumbnail\n      self.rarity = rarity\n      self.transferrable = transferrable\n      self.collectionDisplay = collectionDisplay\n      self.externalURL = externalURL\n      self.traits = traits\n      self.royalties = royalties\n      self.serialNumber = serialNumber\n    }\n  }\n\n  access(all) fun main(address: Address, publicPathID: String, tokenID: UInt64): ViewInfo? {\n    let account = getAccount(address)\n\n    let capability = account.capabilities.get<&{ViewResolver.ResolverCollection}>(PublicPath(identifier: publicPathID)!)\n    if capability != nil {\n      let collection = capability!.borrow()\n      if collection != nil {\n        let resolver = collection!.borrowViewResolver(id: tokenID)\n        if resolver != nil {\n          // Get display information\n          let display = MetadataViews.getDisplay(resolver!)\n          if display != nil {\n            // Get rarity information\n            var rarityDesc: String? = nil\n            let rarityView = MetadataViews.getRarity(resolver!)\n            if rarityView != nil {\n              rarityDesc = rarityView!.description\n            }\n\n            // Get collection display information\n            var collectionDisplay: MetadataViews.NFTCollectionDisplay? = nil\n            let cDisplay = MetadataViews.getNFTCollectionDisplay(resolver!)\n            if cDisplay != nil {\n              collectionDisplay = cDisplay\n            }\n\n            // Get external URL\n            var externalURL: String? = nil\n            let externalView = MetadataViews.getExternalURL(resolver!)\n            if externalView != nil {\n              externalURL = externalView!.url\n            }\n\n            // Get traits\n            var traits: {String: String}? = nil\n            let traitsView = MetadataViews.getTraits(resolver!)\n            if traitsView != nil {\n              var traitsDict: {String: String} = {}\n              for trait in traitsView!.traits {\n                // Convert trait value to string\n                var valueStr: String = \"\"\n                if let s = trait.value as? String { valueStr = s }\n                else if let i = trait.value as? Int { valueStr = i.toString() }\n                else if let f = trait.value as? UFix64 { valueStr = f.toString() }\n                else { valueStr = \"Unknown\" }\n                traitsDict[trait.name] = valueStr\n              }\n              traits = traitsDict\n            }\n\n            // Get royalties\n            var royalties: {String: UFix64}? = nil\n\n            // Get serial number\n            var serialNumber: UInt64? = nil\n            let serialView = MetadataViews.getSerial(resolver!)\n            if serialView != nil {\n              serialNumber = serialView!.number\n            }\n\n            return ViewInfo(\n              name: display!.name,\n              description: display!.description,\n              thumbnail: display!.thumbnail,\n              rarity: rarityDesc,\n              transferrable: true,\n              collectionDisplay: collectionDisplay,\n              externalURL: externalURL,\n              traits: traits,\n              royalties: royalties,\n              serialNumber: serialNumber\n            )\n          }\n        }\n      }\n    }\n\n    // If ViewResolver approach fails, try as a basic NFT collection\n    let basicCapability = account.capabilities.get<&{NonFungibleToken.CollectionPublic}>(PublicPath(identifier: publicPathID)!)\n    if basicCapability != nil {\n      let collection = basicCapability!.borrow()\n      if collection != nil {\n        // Check if the NFT exists\n        if collection!.getIDs().contains(tokenID) {\n          // Return basic NFT info\n          return ViewInfo(\n            name: \"NFT #\".concat(tokenID.toString()),\n            description: \"An NFT from \".concat(publicPathID),\n            thumbnail: MetadataViews.HTTPFile(url: \"\"),\n            rarity: nil,\n            transferrable: true,\n            collectionDisplay: nil,\n            externalURL: nil,\n            traits: nil,\n            royalties: nil,\n            serialNumber: tokenID\n          )\n        }\n      }\n    }\n\n    return nil\n  }\n`\n\n/**\n * Query a single NFT's basic metadata views from an account's ResolverCollection capability.\n */\nexport function useFlowNftMetadata(params: UseFlowNftMetadataArgs) {\n  const chainIdResult = useFlowChainId()\n\n  const queryResult = useFlowQuery({\n    cadence: chainIdResult.data\n      ? getNftCadence(chainIdResult.data as \"testnet\" | \"mainnet\" | \"local\")\n      : \"\",\n    args: (arg, t) => [\n      arg(params.accountAddress || \"\", t.Address),\n      arg(params.publicPathIdentifier || \"\", t.String),\n      arg(String(params.tokenId || \"\"), t.UInt64),\n    ],\n    flowClient: params.flowClient,\n    ...params.query,\n  })\n\n  if (chainIdResult.isError) {\n    return chainIdResult\n  }\n\n  const getThumbnailUrl = (thumbnail: any): string => {\n    if (!thumbnail) return \"\"\n    if (thumbnail.url) return thumbnail.url\n    if (thumbnail.cid)\n      return `https://ipfs.io/ipfs/${thumbnail.cid}${thumbnail.path || \"\"}`\n    return \"\"\n  }\n\n  let processedData: NftViewResult | null = null\n\n  if (queryResult.data) {\n    const data = queryResult.data as any\n    const collectionDisplay = data.collectionDisplay\n\n    processedData = {\n      name: data.name || \"Unknown NFT\",\n      description: data.description || \"\",\n      thumbnailUrl: getThumbnailUrl(data.thumbnail),\n      externalUrl: data.externalURL || collectionDisplay?.externalURL?.url,\n      collectionName: collectionDisplay?.name,\n      collectionExternalUrl: collectionDisplay?.externalURL?.url,\n      tokenID: String(params.tokenId ?? \"\"),\n      traits: data.traits || {},\n      rarity: data.rarity,\n      serialNumber: data.serialNumber ? String(data.serialNumber) : undefined,\n    }\n  }\n\n  return {\n    ...queryResult,\n    data: processedData,\n  } as UseQueryResult<NftViewResult | null, Error>\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowQuery.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowQuery, encodeQueryArgs} from \"./useFlowQuery\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {arg, t} from \"@onflow/fcl-core\"\n\ndescribe(\"useFlowQuery\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"returns undefined when no cadence is provided\", async () => {\n    const {result} = renderHook(() => useFlowQuery({cadence: \"\"}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.data).toBeUndefined()\n    await waitFor(() => expect(result.current.isLoading).toBe(false))\n  })\n\n  test(\"fetches data successfully\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const expectedResult = 42\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(expectedResult)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQuery({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeUndefined()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toEqual(expectedResult)\n    expect(queryMock).toHaveBeenCalledWith({\n      cadence: cadenceScript,\n      args: undefined,\n    })\n  })\n\n  test(\"does not fetch data when enabled is false\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n\n    renderHook(\n      () => useFlowQuery({cadence: cadenceScript, query: {enabled: false}}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    // wait a little to ensure fcl.query isn't called\n    await waitFor(() => {\n      expect(queryMock).not.toHaveBeenCalled()\n    })\n  })\n\n  test(\"handles error from fcl.query\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const testError = new Error(\"Query failed\")\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQuery({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toBeUndefined()\n    expect(hookResult.current.error).toEqual(testError)\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const initialResult = 42\n    const updatedResult = 100\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(initialResult)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQuery({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(initialResult))\n\n    queryMock.mockResolvedValueOnce(updatedResult)\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(updatedResult))\n    expect(queryMock).toHaveBeenCalledTimes(2)\n  })\n\n  test(\"supports args function parameter\", async () => {\n    const cadenceScript = \"access(all) fun main(a: Int): Int { return a }\"\n    const expectedResult = 7\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(expectedResult)\n\n    const argsFunction = (_arg: typeof arg, _t: typeof t) => [_arg(7, _t.Int)]\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQuery({cadence: cadenceScript, args: argsFunction}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toEqual(expectedResult)\n    expect(queryMock).toHaveBeenCalledWith({\n      cadence: cadenceScript,\n      args: argsFunction,\n    })\n  })\n\n  test(\"detects args changes\", async () => {\n    const cadenceScript = \"access(all) fun main(a: Int): Int { return a }\"\n    const initialResult = 7\n    const updatedResult = 42\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.query)\n    queryMock.mockResolvedValueOnce(initialResult)\n\n    const argsFunction = (_arg: typeof arg, _t: typeof t) => [_arg(7, _t.Int)]\n\n    let hookResult: any\n    let hookRerender: any\n\n    await act(async () => {\n      const {result, rerender} = renderHook(useFlowQuery, {\n        wrapper: TestProvider,\n        initialProps: {cadence: cadenceScript, args: argsFunction},\n      })\n      hookResult = result\n      hookRerender = rerender\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toEqual(initialResult)\n\n    queryMock.mockResolvedValueOnce(updatedResult)\n    await act(() => {\n      hookRerender({\n        cadence: cadenceScript,\n        args: (_arg: typeof arg, _t: typeof t) => [_arg(42, _t.Int)],\n      })\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(updatedResult))\n  })\n\n  describe(\"encodeQueryArgs\", () => {\n    beforeEach(() => {\n      queryClient.clear()\n      // Clear mocks\n      jest.clearAllMocks()\n    })\n\n    test(\"returns undefined when args is undefined\", () => {\n      const result = encodeQueryArgs(undefined)\n      expect(result).toBeUndefined()\n    })\n\n    test(\"returns undefined when args is null\", () => {\n      const result = encodeQueryArgs(null as any)\n      expect(result).toBeUndefined()\n    })\n\n    test(\"encodes single argument correctly\", () => {\n      const argsFunction = (_arg: typeof arg, _t: typeof t) => [\n        _arg(\"42\", _t.Int),\n      ]\n\n      const result = encodeQueryArgs(argsFunction)\n\n      expect(result).toEqual([{type: \"Int\", value: \"42\"}])\n    })\n\n    test(\"encodes multiple arguments correctly\", () => {\n      const argsFunction = (_arg: typeof arg, _t: typeof t) => [\n        _arg(\"42\", _t.Int),\n        _arg(\"hello\", _t.String),\n        _arg(\"0x1234567890abcdef\", _t.Address),\n      ]\n\n      const result = encodeQueryArgs(argsFunction)\n\n      expect(result).toEqual([\n        {type: \"Int\", value: \"42\"},\n        {type: \"String\", value: \"hello\"},\n        {type: \"Address\", value: \"0x1234567890abcdef\"},\n      ])\n    })\n\n    test(\"handles empty args array\", () => {\n      const argsFunction = (_arg: typeof arg, _t: typeof t) => []\n\n      const result = encodeQueryArgs(argsFunction)\n\n      expect(result).toEqual([])\n    })\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowQuery.ts",
    "content": "import {useQuery, UseQueryResult, UseQueryOptions} from \"@tanstack/react-query\"\nimport {useCallback} from \"react\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {arg, t} from \"@onflow/fcl-core\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport function encodeQueryArgs(\n  args?: (_arg: typeof arg, _t: typeof t) => unknown[]\n): any[] | undefined {\n  // Encode the arguments to a JSON-CDC object so they can be deterministically\n  // serialized and used as the query key.\n  return args?.(arg, t)?.map((x: any) => x.xform.asArgument(x.value))\n}\n\nexport interface UseFlowQueryArgs {\n  cadence: string\n  args?: (_arg: typeof arg, _t: typeof t) => unknown[]\n  query?: Omit<UseQueryOptions<unknown, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * useFlowQuery\n *\n * Executes a Cadence script and returns the query result.\n *\n * @param params\n *   - cadence: The Cadence script to run\n *   - args: (optional) A function returning script arguments\n *   - query: (optional) React Query settings (staleTime, retry, enabled, select, etc.)\n * @returns {UseQueryResult<unknown, Error>}\n */\nexport function useFlowQuery({\n  cadence,\n  args,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowQueryArgs): UseQueryResult<unknown, Error> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const fetchQuery = useCallback(async () => {\n    if (!cadence) return null\n    return fcl.query({cadence, args})\n  }, [cadence, args])\n\n  const encodedArgs = encodeQueryArgs(args)\n  return useQuery<unknown, Error>(\n    {\n      queryKey: [\"flowQuery\", cadence, encodedArgs],\n      queryFn: fetchQuery,\n      enabled: queryOptions.enabled ?? true,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowQueryRaw.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowQueryRaw} from \"./useFlowQueryRaw\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {arg, t} from \"@onflow/fcl-core\"\n\ndescribe(\"useFlowQueryRaw\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"returns undefined when no cadence is provided\", async () => {\n    const {result} = renderHook(() => useFlowQueryRaw({cadence: \"\"}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.data).toBeUndefined()\n    await waitFor(() => expect(result.current.isLoading).toBe(false))\n  })\n\n  test(\"fetches data successfully\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const expectedResult = 42\n    const queryMock = mockFcl.mockFclInstance.queryRaw\n    queryMock.mockResolvedValueOnce(expectedResult)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQueryRaw({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeUndefined()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(queryMock).toHaveBeenCalledWith({\n      cadence: cadenceScript,\n      args: undefined,\n    })\n    expect(hookResult.current.data).toEqual(expectedResult)\n  })\n\n  test(\"does not fetch data when enabled is false\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.queryRaw)\n\n    renderHook(\n      () => useFlowQueryRaw({cadence: cadenceScript, query: {enabled: false}}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    // wait a little to ensure fcl.queryRaw isn't called\n    await waitFor(() => {\n      expect(queryMock).not.toHaveBeenCalled()\n    })\n  })\n\n  test(\"handles error from fcl.queryRaw\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const testError = new Error(\"Query failed\")\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.queryRaw)\n    queryMock.mockRejectedValueOnce(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQueryRaw({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toBeUndefined()\n    expect(hookResult.current.error).toEqual(testError)\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const cadenceScript = \"access(all) fun main(): Int { return 42 }\"\n    const initialResult = 42\n    const updatedResult = 100\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.queryRaw)\n    queryMock.mockResolvedValueOnce(initialResult)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQueryRaw({cadence: cadenceScript}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(initialResult))\n\n    queryMock.mockResolvedValueOnce(updatedResult)\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(updatedResult))\n    expect(queryMock).toHaveBeenCalledTimes(2)\n  })\n\n  test(\"supports args function parameter\", async () => {\n    const cadenceScript = \"access(all) fun main(a: Int): Int { return a }\"\n    const expectedResult = 7\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.queryRaw)\n    queryMock.mockResolvedValueOnce(expectedResult)\n\n    const argsFunction = (_arg: typeof arg, _t: typeof t) => [_arg(7, _t.Int)]\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(\n        () => useFlowQueryRaw({cadence: cadenceScript, args: argsFunction}),\n        {\n          wrapper: TestProvider,\n        }\n      )\n      hookResult = result\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toEqual(expectedResult)\n    expect(queryMock).toHaveBeenCalledWith({\n      cadence: cadenceScript,\n      args: argsFunction,\n    })\n  })\n\n  test(\"detects args changes\", async () => {\n    const cadenceScript = \"access(all) fun main(a: Int): Int { return a }\"\n    const initialResult = 7\n    const updatedResult = 42\n    const queryMock = jest.mocked(mockFcl.mockFclInstance.queryRaw)\n    queryMock.mockResolvedValueOnce(initialResult)\n\n    const argsFunction = (_arg: typeof arg, _t: typeof t) => [_arg(7, _t.Int)]\n\n    let hookResult: any\n    let hookRerender: any\n\n    await act(async () => {\n      const {result, rerender} = renderHook(useFlowQueryRaw, {\n        wrapper: TestProvider,\n        initialProps: {cadence: cadenceScript, args: argsFunction},\n      })\n      hookResult = result\n      hookRerender = rerender\n    })\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n    expect(hookResult.current.data).toEqual(initialResult)\n\n    queryMock.mockResolvedValueOnce(updatedResult)\n    await act(() => {\n      hookRerender({\n        cadence: cadenceScript,\n        args: (_arg: typeof arg, _t: typeof t) => [_arg(42, _t.Int)],\n      })\n    })\n\n    await waitFor(() => expect(hookResult.current.data).toEqual(updatedResult))\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowQueryRaw.ts",
    "content": "import {useQuery, UseQueryResult, UseQueryOptions} from \"@tanstack/react-query\"\nimport {useCallback} from \"react\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {arg as fclArg, t as fclT} from \"@onflow/fcl-core\"\nimport {encodeQueryArgs} from \"./useFlowQuery\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseFlowQueryRawArgs {\n  cadence: string\n  args?: (arg: typeof fclArg, t: typeof fclT) => unknown[]\n  query?: Omit<UseQueryOptions<unknown, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * useFlowQueryRaw\n *\n * Executes a Cadence script and returns the raw query result.\n *\n * @param params\n *   - cadence: The Cadence script to run\n *   - args: (optional) A function returning script arguments\n *   - query: (optional) React Query settings (staleTime, retry, enabled, select, etc.)\n * @returns {UseQueryResult<unknown, Error>}\n */\nexport function useFlowQueryRaw({\n  cadence,\n  args,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowQueryRawArgs): UseQueryResult<unknown, Error> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const fetchQueryRaw = useCallback(async () => {\n    if (!cadence) return null\n    return fcl.queryRaw({cadence, args})\n  }, [cadence, args])\n\n  const encodedArgs = encodeQueryArgs(args)\n  return useQuery<unknown, Error>(\n    {\n      queryKey: [\"flowQueryRaw\", cadence, encodedArgs],\n      queryFn: fetchQueryRaw,\n      enabled: queryOptions.enabled ?? true,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowRevertibleRandom.test.tsx",
    "content": "import React from \"react\"\nimport {renderHook, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowRevertibleRandom} from \"./useFlowRevertibleRandom\"\nimport {useFlowQuery} from \"./useFlowQuery\"\nimport {createMockFclInstance} from \"../__mocks__/flow-client\"\n\njest.mock(\"./useFlowBlock\")\njest.mock(\"./useFlowQuery\")\n\nconst wrapper = ({children}: {children: React.ReactNode}) => (\n  <TestProvider\n    config={{flowNetwork: \"emulator\", accessNodeUrl: \"http://localhost\"}}\n  >\n    {children}\n  </TestProvider>\n)\n\ndescribe(\"useFlowRandom\", () => {\n  beforeEach(() => {\n    queryClient.clear()\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"fetches random UInt256 within given bounds\", async () => {\n    const min = \"0\"\n    const max = \"100\"\n    const count = 3\n    const expectedBlockHeight = 123\n    const expectedRandomValue = \"40\"\n\n    jest.mocked(useFlowQuery).mockReturnValue({\n      data: null,\n      isLoading: true,\n      error: null,\n    } as any)\n\n    const {result, rerender} = renderHook(\n      () => useFlowRevertibleRandom({min, max, count}),\n      {wrapper}\n    )\n\n    await waitFor(() => expect(result.current.isLoading).toBe(true))\n    expect(result.current.data).toBeNull()\n\n    jest.mocked(useFlowQuery).mockReturnValue({\n      data: Array(count).fill({\n        blockHeight: expectedBlockHeight,\n        value: expectedRandomValue,\n      }),\n      isLoading: false,\n      error: null,\n    } as any)\n\n    rerender()\n\n    await waitFor(() => expect(result.current.isLoading).toBe(false))\n    expect(result.current.data).toHaveLength(count)\n    expect(result.current.data?.[0].blockHeight).toEqual(expectedBlockHeight)\n    expect(result.current.data?.[0].value).toEqual(expectedRandomValue)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowRevertibleRandom.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {useFlowQuery} from \"./useFlowQuery\"\n\n/**\n * A single random result, paired with the block height from which it was generated.\n */\nexport interface RevertibleRandomResult {\n  /** The block height at which the random value was generated */\n  blockHeight: string\n  /** The random UInt256 value, returned as a decimal string */\n  value: string\n}\n\n/**\n * Arguments for `useFlowRevertibleRandom` hook.\n *\n * - `min`: Minimum (inclusive) bound for random generation, expressed as a UInt256 decimal string.\n * - `max`: Maximum (inclusive) bound for random generation, expressed as a UInt256 decimal string.\n * - `count`: Number of random values to fetch (must be >= 1). Defaults to 1.\n * - `query`: Optional TanStack Query settings (e.g. staleTime, retry, enabled, select, placeholderData, etc.).\n */\nexport interface UseFlowRevertibleRandomArgs {\n  /** Decimal string for minimum UInt256 (inclusive). Defaults to \"0\". */\n  min?: string\n  /** Decimal string for maximum UInt256 (inclusive). */\n  max: string\n  /** How many results to generate; must be at least 1. Defaults to 1. */\n  count?: number\n  /**\n   * TanStack Query options for an array of RevertibleRandomResult.\n   */\n  query?: Omit<UseQueryOptions<any, Error>, \"queryKey\" | \"queryFn\">\n  flowClient?: FlowClientCore\n}\n\n/**\n * Hook: Fetch one or more pseudorandom UInt256 values from the Flow blockchain\n * in a revertible fashion (i.e. they can be re-generated if the transaction reverts).\n *\n * @param params.min   Minimum bound as UInt256 decimal string (default: \"0\").\n * @param params.max   Maximum bound as UInt256 decimal string.\n * @param params.count Number of values to generate (default: 1).\n * @param params.query React-Query options (staleTime, retry, enabled, etc.).\n *\n * @returns A React-Query `UseQueryResult` wrapping an array of results.\n */\nexport function useFlowRevertibleRandom({\n  min = \"0\",\n  max,\n  count = 1,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowRevertibleRandomArgs): UseQueryResult<\n  RevertibleRandomResult[],\n  Error\n> {\n  const mergedQuery: Omit<\n    UseQueryOptions<any, Error>,\n    \"queryKey\" | \"queryFn\"\n  > = {\n    staleTime: Infinity,\n    refetchOnWindowFocus: false,\n    ...queryOptions,\n  }\n\n  const result = useFlowQuery({\n    cadence: `\n      access(all) struct RevertibleRandomResult {\n          access(all) let blockHeight: UInt64\n          access(all) let value: UInt256\n\n          init(blockHeight: UInt64, value: UInt256) {\n              self.blockHeight = blockHeight\n              self.value = value\n          }\n      }\n\n      access(all) fun main(min: UInt256, max: UInt256, count: Int): [RevertibleRandomResult] {\n          pre {\n              min < max: \"Invalid random range - max must be greater than min\"\n              0 < count: \"Invalid count - must request at least one random value at a time\"\n          }\n          let currentHeight = getCurrentBlock().height\n          let results: [RevertibleRandomResult] = []\n          for i in InclusiveRange(0, count - 1) {\n              results.append(RevertibleRandomResult(\n                  blockHeight: currentHeight,\n                  value: min + revertibleRandom<UInt256>(modulo: max - min + 1)\n              ))\n          }\n          return results\n      }\n    `,\n    args: (arg, t) => [\n      arg(min, t.UInt256),\n      arg(max, t.UInt256),\n      arg(count, t.Int),\n    ],\n    query: mergedQuery,\n    flowClient,\n  })\n\n  return result as UseQueryResult<RevertibleRandomResult[], Error>\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransaction.test.ts",
    "content": "import {renderHook, waitFor} from \"@testing-library/react\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"./useFlowScheduledTransactionList\"\nimport {useFlowScheduledTransaction} from \"./useFlowScheduledTransaction\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useFlowScheduledTransaction\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  test(\"gets a transaction by ID\", async () => {\n    const mockTransaction = {\n      id: \"42\",\n      priority: 0,\n      executionEffort: \"50\",\n      status: 2,\n      fees: \"0.0005\",\n      scheduledTimestamp: \"1234567890.0\",\n      handlerTypeIdentifier: \"A.789.Handler\",\n      handlerAddress: \"0x789\",\n    }\n\n    jest\n      .mocked(mockFcl.mockFclInstance.query)\n      .mockResolvedValueOnce(mockTransaction)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransaction({txId: \"42\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toBeDefined()\n    expect(result.current.data?.id).toBe(\"42\")\n    expect(result.current.data?.priority).toBe(ScheduledTransactionPriority.Low)\n    expect(result.current.data?.status).toBe(\n      ScheduledTransactionStatus.Completed\n    )\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"gets a transaction with handler data\", async () => {\n    const mockTransactionWithHandler = {\n      id: \"42\",\n      priority: 1,\n      executionEffort: \"100\",\n      status: 0,\n      fees: \"0.001\",\n      scheduledTimestamp: \"1234567890.0\",\n      handlerTypeIdentifier: \"A.789.Handler\",\n      handlerAddress: \"0x789\",\n      handlerUUID: \"5555\",\n      handlerResolvedViews: {metadata: {description: \"Test handler\"}},\n    }\n\n    jest\n      .mocked(mockFcl.mockFclInstance.query)\n      .mockResolvedValueOnce(mockTransactionWithHandler)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransaction({\n          txId: \"42\",\n          includeHandlerData: true,\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toBeDefined()\n    expect(result.current.data?.id).toBe(\"42\")\n    expect(result.current.data?.handlerUUID).toBe(\"5555\")\n    expect(result.current.data?.handlerResolvedViews).toEqual({\n      metadata: {description: \"Test handler\"},\n    })\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"returns null when transaction not found\", async () => {\n    jest.mocked(mockFcl.mockFclInstance.query).mockResolvedValueOnce(null)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransaction({txId: \"999\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toBeNull()\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"is disabled when no transaction ID provided\", async () => {\n    const {result} = renderHook(() => useFlowScheduledTransaction(), {\n      wrapper: TestProvider,\n    })\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n\n  test(\"is disabled when chain ID not detected\", async () => {\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: null,\n      isLoading: false,\n    } as any)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransaction({txId: \"42\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n\n  test(\"handles query errors\", async () => {\n    const error = new Error(\"Query failed\")\n    jest.mocked(mockFcl.mockFclInstance.query).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransaction({txId: \"42\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isError).toBe(true))\n\n    expect(result.current.error).toEqual(error)\n  })\n\n  test(\"uses custom flowClient when provided\", async () => {\n    const customMockFcl = createMockFclInstance()\n    const customFlowClient = customMockFcl.mockFclInstance as any\n\n    jest.mocked(customFlowClient.query).mockResolvedValueOnce(null)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransaction({\n          txId: \"42\",\n          flowClient: customFlowClient,\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(customFlowClient.query).toHaveBeenCalled()\n  })\n\n  test(\"respects query options enabled flag\", async () => {\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransaction({\n          txId: \"42\",\n          query: {enabled: false},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransaction.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {parseUnits} from \"viem/utils\"\nimport {CONTRACT_ADDRESSES, CADENCE_UFIX64_PRECISION} from \"../constants\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQuery} from \"./useFlowQuery\"\nimport {\n  ScheduledTransaction,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"./useFlowScheduledTransactionList\"\n\nexport interface UseFlowScheduledTransactionArgs {\n  txId?: string\n  includeHandlerData?: boolean\n  query?: Omit<\n    UseQueryOptions<ScheduledTransaction | null, Error>,\n    \"queryKey\" | \"queryFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport type UseFlowScheduledTransactionResult = UseQueryResult<\n  ScheduledTransaction | null,\n  Error\n>\n\nconst getScheduledTransactionQuery = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionScheduler from ${contractAddresses.FlowTransactionScheduler}\n\naccess(all) struct TransactionInfo {\n    access(all) let id: UInt64\n    access(all) let priority: UInt8\n    access(all) let executionEffort: UInt64\n    access(all) let status: UInt8\n    access(all) let fees: UFix64\n    access(all) let scheduledTimestamp: UFix64\n    access(all) let handlerTypeIdentifier: String\n    access(all) let handlerAddress: Address\n\n    init(data: FlowTransactionScheduler.TransactionData) {\n        self.id = data.id\n        self.priority = data.priority.rawValue\n        self.executionEffort = data.executionEffort\n        self.status = data.status.rawValue\n        self.fees = data.fees\n        self.scheduledTimestamp = data.scheduledTimestamp\n        self.handlerTypeIdentifier = data.handlerTypeIdentifier\n        self.handlerAddress = data.handlerAddress\n    }\n}\n\n/// Gets a transaction by ID (checks globally, not manager-specific)\n/// This script is used by: flow schedule get <transaction-id>\naccess(all) fun main(txId: UInt64): TransactionInfo? {\n    // Get transaction data directly from FlowTransactionScheduler\n    if let txData = FlowTransactionScheduler.getTransactionData(id: txId) {\n        return TransactionInfo(data: txData)\n    }\n    return nil\n}\n`\n}\n\nconst getScheduledTransactionWithHandlerQuery = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionScheduler from ${contractAddresses.FlowTransactionScheduler}\n\naccess(all) struct TransactionInfoWithHandler {\n    access(all) let id: UInt64\n    access(all) let priority: UInt8\n    access(all) let executionEffort: UInt64\n    access(all) let status: UInt8\n    access(all) let fees: UFix64\n    access(all) let scheduledTimestamp: UFix64\n    access(all) let handlerTypeIdentifier: String\n    access(all) let handlerAddress: Address\n\n    access(all) let handlerUUID: UInt64\n    access(all) let handlerResolvedViews: {Type: AnyStruct}\n\n    init(data: FlowTransactionScheduler.TransactionData, handlerUUID: UInt64, resolvedViews: {Type: AnyStruct}) {\n        // Initialize transaction fields\n        self.id = data.id\n        self.priority = data.priority.rawValue\n        self.executionEffort = data.executionEffort\n        self.status = data.status.rawValue\n        self.fees = data.fees\n        self.scheduledTimestamp = data.scheduledTimestamp\n        self.handlerTypeIdentifier = data.handlerTypeIdentifier\n        self.handlerAddress = data.handlerAddress\n\n        self.handlerUUID = handlerUUID\n        self.handlerResolvedViews = resolvedViews\n    }\n}\n\n/// Gets a transaction by ID with handler data (checks globally, not manager-specific)\n/// This script is used by: flow schedule get <transaction-id> --include-handler-data\naccess(all) fun main(txId: UInt64): TransactionInfoWithHandler? {\n    // Get transaction data directly from FlowTransactionScheduler\n    if let txData = FlowTransactionScheduler.getTransactionData(id: txId) {\n        // Borrow handler and resolve views\n        let handler = txData.borrowHandler()\n        let availableViews = handler.getViews()\n        var resolvedViews: {Type: AnyStruct} = {}\n\n        for viewType in availableViews {\n            if let resolvedView = handler.resolveView(viewType) {\n                resolvedViews[viewType] = resolvedView\n            }\n        }\n\n        return TransactionInfoWithHandler(\n            data: txData,\n            handlerUUID: handler.uuid,\n            resolvedViews: resolvedViews\n        )\n    }\n\n    return nil\n}\n`\n}\n\nconst convertScheduledTransaction = (\n  data: any,\n  includeHandlerData: boolean\n): ScheduledTransaction => {\n  return {\n    id: data.id,\n    priority: Number(data.priority || 0) as ScheduledTransactionPriority,\n    executionEffort: BigInt(data.executionEffort || 0),\n    status: Number(data.status || 0) as ScheduledTransactionStatus,\n    fees: {\n      value: parseUnits(data.fees || \"0.0\", CADENCE_UFIX64_PRECISION),\n      formatted: data.fees || \"0.0\",\n    },\n    scheduledTimestamp: Number(data.scheduledTimestamp || 0),\n    handlerTypeIdentifier: data.handlerTypeIdentifier || \"\",\n    handlerAddress: data.handlerAddress || \"\",\n    ...(includeHandlerData && {\n      handlerUUID: data.handlerUUID,\n      handlerResolvedViews: data.handlerResolvedViews || {},\n    }),\n  }\n}\n\n/**\n * Hook for getting a specific scheduled transaction by ID.\n *\n * @param {UseFlowScheduledTransactionArgs} args Configuration including transaction ID and options\n * @returns {UseFlowScheduledTransactionResult} Query result with scheduled transaction or null if not found\n *\n * @example\n * // Basic usage\n * const { data: transaction, isLoading } = useFlowScheduledTransaction({\n *   txId: \"42\"\n * })\n *\n * @example\n * // With handler data\n * const { data: transaction } = useFlowScheduledTransaction({\n *   txId: \"42\",\n *   includeHandlerData: true\n * })\n */\nexport function useFlowScheduledTransaction({\n  txId,\n  includeHandlerData = false,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowScheduledTransactionArgs = {}): UseFlowScheduledTransactionResult {\n  const chainIdResult = useFlowChainId()\n  const chainId = chainIdResult.data\n\n  const queryResult = useFlowQuery({\n    cadence: chainId\n      ? includeHandlerData\n        ? getScheduledTransactionWithHandlerQuery(chainId)\n        : getScheduledTransactionQuery(chainId)\n      : \"\",\n    args: txId ? (arg, t) => [arg(txId, t.UInt64)] : undefined,\n    query: {\n      ...(queryOptions as Omit<\n        UseQueryOptions<unknown, Error>,\n        \"queryKey\" | \"queryFn\"\n      >),\n      enabled: (queryOptions?.enabled ?? true) && !!chainId && !!txId,\n    },\n    flowClient,\n  })\n\n  // Transform raw Cadence data to ScheduledTransaction or null\n  const data =\n    queryResult.data !== undefined\n      ? queryResult.data\n        ? convertScheduledTransaction(queryResult.data, includeHandlerData)\n        : null\n      : undefined\n\n  return {\n    ...queryResult,\n    data,\n  } as UseFlowScheduledTransactionResult\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionCancel.test.ts",
    "content": "import {renderHook, waitFor} from \"@testing-library/react\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowScheduledTransactionCancel} from \"./useFlowScheduledTransactionCancel\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useFlowScheduledTransactionCancel\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  test(\"cancels a transaction successfully\", async () => {\n    const resultTxId = \"cancel-tx-id-456\"\n    jest\n      .mocked(mockFcl.mockFclInstance.mutate)\n      .mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionCancel(), {\n      wrapper: TestProvider,\n    })\n\n    const returnedTxId = await result.current.cancelTransactionAsync(\"42\")\n\n    expect(returnedTxId).toBe(resultTxId)\n    expect(mockFcl.mockFclInstance.mutate).toHaveBeenCalled()\n  })\n\n  test(\"handles cancel errors\", async () => {\n    const error = new Error(\"Cancel failed\")\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionCancel(), {\n      wrapper: TestProvider,\n    })\n\n    await expect(result.current.cancelTransactionAsync(\"42\")).rejects.toThrow(\n      \"Cancel failed\"\n    )\n  })\n\n  test(\"throws error when chain ID not detected\", async () => {\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: null,\n      isLoading: false,\n    } as any)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionCancel(), {\n      wrapper: TestProvider,\n    })\n\n    await expect(result.current.cancelTransactionAsync(\"42\")).rejects.toThrow(\n      \"Chain ID not detected\"\n    )\n  })\n\n  test(\"uses custom flowClient when provided\", async () => {\n    const customMockFcl = createMockFclInstance()\n    const customFlowClient = customMockFcl.mockFclInstance as any\n    const resultTxId = \"cancel-tx-id-789\"\n\n    jest.mocked(customFlowClient.mutate).mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionCancel({flowClient: customFlowClient}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    const returnedTxId = await result.current.cancelTransactionAsync(\"42\")\n\n    expect(returnedTxId).toBe(resultTxId)\n    expect(customFlowClient.mutate).toHaveBeenCalled()\n  })\n\n  test(\"calls onSuccess callback when provided\", async () => {\n    const resultTxId = \"cancel-tx-id-abc\"\n    const onSuccess = jest.fn()\n    jest\n      .mocked(mockFcl.mockFclInstance.mutate)\n      .mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionCancel({\n          mutation: {onSuccess},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await result.current.cancelTransactionAsync(\"42\")\n\n    await waitFor(() =>\n      expect(onSuccess).toHaveBeenCalledWith(resultTxId, \"42\", undefined)\n    )\n  })\n\n  test(\"calls onError callback when provided\", async () => {\n    const error = new Error(\"Cancel failed\")\n    const onError = jest.fn()\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionCancel({\n          mutation: {onError},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await expect(result.current.cancelTransactionAsync(\"42\")).rejects.toThrow()\n\n    await waitFor(() => expect(onError).toHaveBeenCalled())\n  })\n\n  test(\"isPending is true while mutation is in progress\", async () => {\n    const resultTxId = \"cancel-tx-id-def\"\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockImplementation(\n      () =>\n        new Promise(resolve => {\n          setTimeout(() => resolve(resultTxId), 100)\n        })\n    )\n\n    const {result} = renderHook(() => useFlowScheduledTransactionCancel(), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.isPending).toBe(false)\n\n    const promise = result.current.cancelTransactionAsync(\"42\")\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    await promise\n\n    await waitFor(() => expect(result.current.isPending).toBe(false))\n  })\n\n  test(\"passes correct transaction ID to mutation\", async () => {\n    const resultTxId = \"cancel-tx-id-xyz\"\n    const txId = \"999\"\n    jest\n      .mocked(mockFcl.mockFclInstance.mutate)\n      .mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionCancel(), {\n      wrapper: TestProvider,\n    })\n\n    await result.current.cancelTransactionAsync(txId)\n\n    expect(mockFcl.mockFclInstance.mutate).toHaveBeenCalled()\n    // Verify the mutation was called with args function\n    const mutateCall = jest.mocked(mockFcl.mockFclInstance.mutate).mock\n      .calls[0][0] as {cadence: string; args: Function}\n    expect(mutateCall.args).toBeInstanceOf(Function)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionCancel.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseFlowScheduledTransactionCancelArgs {\n  mutation?: Omit<UseMutationOptions<string, Error, string>, \"mutationFn\">\n  flowClient?: FlowClientCore\n}\n\nexport interface UseFlowScheduledTransactionCancelResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  cancelTransaction: UseMutateFunction<string, Error, string>\n  cancelTransactionAsync: UseMutateAsyncFunction<string, Error, string>\n}\n\nconst cancelScheduledTransactionMutation = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionSchedulerUtils from ${contractAddresses.FlowTransactionSchedulerUtils}\nimport FlowToken from ${contractAddresses.FlowToken}\nimport FungibleToken from ${contractAddresses.FungibleToken}\n\n/// Cancels a scheduled transaction by ID\n/// This transaction is used by: flow schedule cancel <transaction-id> [--signer account]\ntransaction(txId: UInt64) {\n    let manager: auth(FlowTransactionSchedulerUtils.Owner) &{FlowTransactionSchedulerUtils.Manager}\n    let receiverRef: &{FungibleToken.Receiver}\n\n    prepare(signer: auth(BorrowValue) &Account) {\n        // Borrow the Manager with Owner entitlement\n        self.manager = signer.storage.borrow<auth(FlowTransactionSchedulerUtils.Owner) &{FlowTransactionSchedulerUtils.Manager}>(\n            from: FlowTransactionSchedulerUtils.managerStoragePath\n        ) ?? panic(\"Could not borrow Manager with Owner entitlement from account\")\n\n        // Get receiver reference from signer's account\n        self.receiverRef = signer.capabilities.borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)\n            ?? panic(\"Could not borrow receiver reference\")\n    }\n\n    execute {\n        // Cancel the transaction and receive refunded fees\n        let refundedFees <- self.manager.cancel(id: txId)\n\n        // Deposit refunded fees back to the signer's vault\n        self.receiverRef.deposit(from: <-refundedFees)\n    }\n}\n`\n}\n\n/**\n * Hook for canceling a scheduled transaction.\n *\n * @param {UseFlowScheduledTransactionCancelArgs} args Optional configuration including mutation options\n * @returns {UseFlowScheduledTransactionCancelResult} Mutation result with cancelTransaction/cancelTransactionAsync functions\n *\n * @example\n * const { cancelTransactionAsync, isPending } = useFlowScheduledTransactionCancel()\n *\n * const handleCancel = async (txId: string) => {\n *   try {\n *     const resultTxId = await cancelTransactionAsync(txId)\n *     console.log(\"Cancel transaction ID:\", resultTxId)\n *   } catch (error) {\n *     console.error(\"Cancel failed:\", error)\n *   }\n * }\n */\nexport function useFlowScheduledTransactionCancel({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseFlowScheduledTransactionCancelArgs = {}): UseFlowScheduledTransactionCancelResult {\n  const chainIdResult = useFlowChainId()\n  const chainId = chainIdResult.data\n  const cadenceTx = chainId ? cancelScheduledTransactionMutation(chainId) : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const mutation = useMutation(\n    {\n      mutationFn: async (txId: string) => {\n        if (!cadenceTx) {\n          throw new Error(\"Chain ID not detected\")\n        }\n\n        const resultTxId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: (arg, t) => [arg(txId, t.UInt64)],\n        })\n        return resultTxId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {\n    mutate: cancelTransaction,\n    mutateAsync: cancelTransactionAsync,\n    ...rest\n  } = mutation\n\n  return {\n    cancelTransaction,\n    cancelTransactionAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionList.test.ts",
    "content": "import {renderHook, waitFor} from \"@testing-library/react\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {\n  useFlowScheduledTransactionList,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"./useFlowScheduledTransactionList\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useFlowScheduledTransactionList\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  test(\"lists transactions for an account\", async () => {\n    const mockTransactions = [\n      {\n        id: \"1\",\n        priority: 1,\n        executionEffort: \"100\",\n        status: 0,\n        fees: \"0.001\",\n        scheduledTimestamp: \"1234567890.0\",\n        handlerTypeIdentifier: \"A.123.Handler\",\n        handlerAddress: \"0x123\",\n      },\n    ]\n\n    jest\n      .mocked(mockFcl.mockFclInstance.query)\n      .mockResolvedValueOnce(mockTransactions)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionList({account: \"0xACCOUNT\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toHaveLength(1)\n    expect(result.current.data?.[0].id).toBe(\"1\")\n    expect(result.current.data?.[0].priority).toBe(\n      ScheduledTransactionPriority.Medium\n    )\n    expect(result.current.data?.[0].status).toBe(\n      ScheduledTransactionStatus.Pending\n    )\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"lists transactions with handler data\", async () => {\n    const mockTransactionsWithHandler = [\n      {\n        id: \"1\",\n        priority: 2,\n        executionEffort: \"200\",\n        status: 1,\n        fees: \"0.002\",\n        scheduledTimestamp: \"1234567890.0\",\n        handlerTypeIdentifier: \"A.456.Handler\",\n        handlerAddress: \"0x456\",\n        handlerUUID: \"9999\",\n        handlerResolvedViews: {display: {name: \"Test\"}},\n      },\n    ]\n\n    jest\n      .mocked(mockFcl.mockFclInstance.query)\n      .mockResolvedValueOnce(mockTransactionsWithHandler)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionList({\n          account: \"0xACCOUNT\",\n          includeHandlerData: true,\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toHaveLength(1)\n    expect(result.current.data?.[0].id).toBe(\"1\")\n    expect(result.current.data?.[0].handlerUUID).toBe(\"9999\")\n    expect(result.current.data?.[0].handlerResolvedViews).toEqual({\n      display: {name: \"Test\"},\n    })\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"returns empty array when no transactions\", async () => {\n    jest.mocked(mockFcl.mockFclInstance.query).mockResolvedValueOnce([])\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionList({account: \"0xACCOUNT\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(result.current.data).toEqual([])\n    expect(mockFcl.mockFclInstance.query).toHaveBeenCalled()\n  })\n\n  test(\"is disabled when no account provided\", async () => {\n    const {result} = renderHook(() => useFlowScheduledTransactionList(), {\n      wrapper: TestProvider,\n    })\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n\n  test(\"is disabled when chain ID not detected\", async () => {\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: null,\n      isLoading: false,\n    } as any)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionList({account: \"0xACCOUNT\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n\n  test(\"handles query errors\", async () => {\n    const error = new Error(\"Query failed\")\n    jest.mocked(mockFcl.mockFclInstance.query).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionList({account: \"0xACCOUNT\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isError).toBe(true))\n\n    expect(result.current.error).toEqual(error)\n  })\n\n  test(\"uses custom flowClient when provided\", async () => {\n    const customMockFcl = createMockFclInstance()\n    const customFlowClient = customMockFcl.mockFclInstance as any\n\n    jest.mocked(customFlowClient.query).mockResolvedValueOnce([])\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionList({\n          account: \"0xACCOUNT\",\n          flowClient: customFlowClient,\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isSuccess).toBe(true))\n\n    expect(customFlowClient.query).toHaveBeenCalled()\n  })\n\n  test(\"respects query options enabled flag\", async () => {\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionList({\n          account: \"0xACCOUNT\",\n          query: {enabled: false},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    expect(result.current.data).toBeUndefined()\n    expect(mockFcl.mockFclInstance.query).not.toHaveBeenCalled()\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionList.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {UseQueryOptions, UseQueryResult} from \"@tanstack/react-query\"\nimport {parseUnits} from \"viem/utils\"\nimport {CADENCE_UFIX64_PRECISION, CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQuery} from \"./useFlowQuery\"\n\nexport enum ScheduledTransactionPriority {\n  Low = 0,\n  Medium = 1,\n  High = 2,\n}\n\nexport enum ScheduledTransactionStatus {\n  Pending = 0,\n  Processing = 1,\n  Completed = 2,\n  Failed = 3,\n  Cancelled = 4,\n}\n\nexport interface ScheduledTransaction {\n  id: string\n  priority: ScheduledTransactionPriority\n  executionEffort: bigint\n  status: ScheduledTransactionStatus\n  fees: {\n    value: bigint\n    formatted: string\n  }\n  scheduledTimestamp: number\n  handlerTypeIdentifier: string\n  handlerAddress: string\n  handlerUUID?: string\n  handlerResolvedViews?: {[viewType: string]: any}\n}\n\nexport interface UseFlowScheduledTransactionListArgs {\n  account?: string\n  includeHandlerData?: boolean\n  query?: Omit<\n    UseQueryOptions<ScheduledTransaction[], Error>,\n    \"queryKey\" | \"queryFn\"\n  >\n  flowClient?: FlowClientCore\n}\n\nexport type UseFlowScheduledTransactionListResult = UseQueryResult<\n  ScheduledTransaction[],\n  Error\n>\n\nconst getListScheduledTransactionScript = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionScheduler from ${contractAddresses.FlowTransactionScheduler}\nimport FlowTransactionSchedulerUtils from ${contractAddresses.FlowTransactionSchedulerUtils}\n\naccess(all) struct TransactionInfo {\n    access(all) let id: UInt64\n    access(all) let priority: UInt8\n    access(all) let executionEffort: UInt64\n    access(all) let status: UInt8\n    access(all) let fees: UFix64\n    access(all) let scheduledTimestamp: UFix64\n    access(all) let handlerTypeIdentifier: String\n    access(all) let handlerAddress: Address\n\n    init(data: FlowTransactionScheduler.TransactionData) {\n        self.id = data.id\n        self.priority = data.priority.rawValue\n        self.executionEffort = data.executionEffort\n        self.status = data.status.rawValue\n        self.fees = data.fees\n        self.scheduledTimestamp = data.scheduledTimestamp\n        self.handlerTypeIdentifier = data.handlerTypeIdentifier\n        self.handlerAddress = data.handlerAddress\n    }\n}\n\naccess(all) fun main(account: Address): [TransactionInfo] {\n    let manager = FlowTransactionSchedulerUtils.borrowManager(at: account)\n        ?? panic(\"Could not borrow Manager from account\")\n\n    let txIds = manager.getTransactionIDs()\n    var transactions: [TransactionInfo] = []\n\n    for id in txIds {\n        if let txData = manager.getTransactionData(id) {\n            transactions.append(TransactionInfo(data: txData))\n        }\n    }\n\n    return transactions\n}\n`\n}\n\nconst getListScheduledTransactionWithHandlerScript = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionScheduler from ${contractAddresses.FlowTransactionScheduler}\nimport FlowTransactionSchedulerUtils from ${contractAddresses.FlowTransactionSchedulerUtils}\n\naccess(all) struct TransactionInfoWithHandler {\n    access(all) let id: UInt64\n    access(all) let priority: UInt8\n    access(all) let executionEffort: UInt64\n    access(all) let status: UInt8\n    access(all) let fees: UFix64\n    access(all) let scheduledTimestamp: UFix64\n    access(all) let handlerTypeIdentifier: String\n    access(all) let handlerAddress: Address\n    access(all) let handlerUUID: UInt64\n    access(all) let handlerResolvedViews: {Type: AnyStruct}\n\n    init(data: FlowTransactionScheduler.TransactionData, handlerUUID: UInt64, resolvedViews: {Type: AnyStruct}) {\n        self.id = data.id\n        self.priority = data.priority.rawValue\n        self.executionEffort = data.executionEffort\n        self.status = data.status.rawValue\n        self.fees = data.fees\n        self.scheduledTimestamp = data.scheduledTimestamp\n        self.handlerTypeIdentifier = data.handlerTypeIdentifier\n        self.handlerAddress = data.handlerAddress\n        self.handlerUUID = handlerUUID\n        self.handlerResolvedViews = resolvedViews\n    }\n}\n\naccess(all) fun main(account: Address): [TransactionInfoWithHandler] {\n    let manager = FlowTransactionSchedulerUtils.borrowManager(at: account)\n        ?? panic(\"Could not borrow Manager from account\")\n\n    let txIds = manager.getTransactionIDs()\n    var transactions: [TransactionInfoWithHandler] = []\n\n    for id in txIds {\n        if let txData = manager.getTransactionData(id) {\n            let handler = txData.borrowHandler()\n            let availableViews = manager.getHandlerViewsFromTransactionID(id)\n            var resolvedViews: {Type: AnyStruct} = {}\n\n            for viewType in availableViews {\n                if let resolvedView = manager.resolveHandlerViewFromTransactionID(id, viewType: viewType) {\n                    resolvedViews[viewType] = resolvedView\n                }\n            }\n\n            transactions.append(TransactionInfoWithHandler(\n                data: txData,\n                handlerUUID: handler.uuid,\n                resolvedViews: resolvedViews\n            ))\n        }\n    }\n\n    return transactions\n}\n`\n}\n\nconst convertToScheduledTransaction = (\n  data: any,\n  includeHandlerData: boolean\n): ScheduledTransaction => {\n  return {\n    id: data.id,\n    priority: Number(data.priority || 0) as ScheduledTransactionPriority,\n    executionEffort: BigInt(data.executionEffort || 0),\n    status: Number(data.status || 0) as ScheduledTransactionStatus,\n    fees: {\n      value: parseUnits(data.fees || \"0.0\", CADENCE_UFIX64_PRECISION),\n      formatted: data.fees || \"0.0\",\n    },\n    scheduledTimestamp: Number(data.scheduledTimestamp || 0),\n    handlerTypeIdentifier: data.handlerTypeIdentifier || \"\",\n    handlerAddress: data.handlerAddress || \"\",\n    ...(includeHandlerData && {\n      handlerUUID: data.handlerUUID,\n      handlerResolvedViews: data.handlerResolvedViews || {},\n    }),\n  }\n}\n\n/**\n * Hook for listing all scheduled transactions for an account.\n *\n * @param {UseFlowScheduledTransactionListArgs} args Configuration including account address and options\n * @returns {UseFlowScheduledTransactionListResult} Query result with list of scheduled transactions\n *\n * @example\n * // Basic usage\n * const { data: transactions, isLoading } = useFlowScheduledTransactionList({\n *   account: \"0x1234567890abcdef\"\n * })\n *\n * @example\n * // With handler data\n * const { data: transactions } = useFlowScheduledTransactionList({\n *   account: \"0x1234567890abcdef\",\n *   includeHandlerData: true\n * })\n */\nexport function useFlowScheduledTransactionList({\n  account,\n  includeHandlerData = false,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowScheduledTransactionListArgs = {}): UseFlowScheduledTransactionListResult {\n  const chainIdResult = useFlowChainId()\n  const chainId = chainIdResult.data\n\n  const queryResult = useFlowQuery({\n    cadence: chainId\n      ? includeHandlerData\n        ? getListScheduledTransactionWithHandlerScript(chainId)\n        : getListScheduledTransactionScript(chainId)\n      : \"\",\n    args: account ? (arg, t) => [arg(account, t.Address)] : undefined,\n    query: {\n      ...(queryOptions as Omit<\n        UseQueryOptions<unknown, Error>,\n        \"queryKey\" | \"queryFn\"\n      >),\n      enabled: (queryOptions?.enabled ?? true) && !!chainId && !!account,\n    },\n    flowClient,\n  })\n\n  // Transform raw Cadence data to ScheduledTransaction[]\n  const data =\n    queryResult.data !== undefined\n      ? Array.isArray(queryResult.data)\n        ? queryResult.data.map(item =>\n            convertToScheduledTransaction(item, includeHandlerData)\n          )\n        : []\n      : undefined\n\n  return {\n    ...queryResult,\n    data,\n  } as UseFlowScheduledTransactionListResult\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionSetup.test.ts",
    "content": "import {renderHook, waitFor} from \"@testing-library/react\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowScheduledTransactionSetup} from \"./useFlowScheduledTransactionSetup\"\n\njest.mock(\"./useFlowChainId\", () => ({\n  useFlowChainId: jest.fn(),\n}))\n\ndescribe(\"useFlowScheduledTransactionSetup\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    jest.clearAllMocks()\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: \"testnet\",\n      isLoading: false,\n    } as any)\n\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  test(\"sets up manager successfully\", async () => {\n    const resultTxId = \"setup-tx-id-123\"\n    jest\n      .mocked(mockFcl.mockFclInstance.mutate)\n      .mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionSetup(), {\n      wrapper: TestProvider,\n    })\n\n    const returnedTxId = await result.current.setupAsync()\n\n    expect(returnedTxId).toBe(resultTxId)\n    expect(mockFcl.mockFclInstance.mutate).toHaveBeenCalled()\n  })\n\n  test(\"handles setup errors\", async () => {\n    const error = new Error(\"Setup failed\")\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionSetup(), {\n      wrapper: TestProvider,\n    })\n\n    await expect(result.current.setupAsync()).rejects.toThrow(\"Setup failed\")\n  })\n\n  test(\"throws error when chain ID not detected\", async () => {\n    jest.mocked(useFlowChainId).mockReturnValue({\n      data: null,\n      isLoading: false,\n    } as any)\n\n    const {result} = renderHook(() => useFlowScheduledTransactionSetup(), {\n      wrapper: TestProvider,\n    })\n\n    await expect(result.current.setupAsync()).rejects.toThrow(\n      \"Chain ID not detected\"\n    )\n  })\n\n  test(\"uses custom flowClient when provided\", async () => {\n    const customMockFcl = createMockFclInstance()\n    const customFlowClient = customMockFcl.mockFclInstance as any\n    const resultTxId = \"setup-tx-id-456\"\n\n    jest.mocked(customFlowClient.mutate).mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(\n      () => useFlowScheduledTransactionSetup({flowClient: customFlowClient}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    const returnedTxId = await result.current.setupAsync()\n\n    expect(returnedTxId).toBe(resultTxId)\n    expect(customFlowClient.mutate).toHaveBeenCalled()\n  })\n\n  test(\"calls onSuccess callback when provided\", async () => {\n    const resultTxId = \"setup-tx-id-789\"\n    const onSuccess = jest.fn()\n    jest\n      .mocked(mockFcl.mockFclInstance.mutate)\n      .mockResolvedValueOnce(resultTxId)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionSetup({\n          mutation: {onSuccess},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await result.current.setupAsync()\n\n    await waitFor(() =>\n      expect(onSuccess).toHaveBeenCalledWith(resultTxId, undefined, undefined)\n    )\n  })\n\n  test(\"calls onError callback when provided\", async () => {\n    const error = new Error(\"Setup failed\")\n    const onError = jest.fn()\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockRejectedValueOnce(error)\n\n    const {result} = renderHook(\n      () =>\n        useFlowScheduledTransactionSetup({\n          mutation: {onError},\n        }),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    await expect(result.current.setupAsync()).rejects.toThrow()\n\n    await waitFor(() => expect(onError).toHaveBeenCalled())\n  })\n\n  test(\"isPending is true while mutation is in progress\", async () => {\n    const resultTxId = \"setup-tx-id-abc\"\n    jest.mocked(mockFcl.mockFclInstance.mutate).mockImplementation(\n      () =>\n        new Promise(resolve => {\n          setTimeout(() => resolve(resultTxId), 100)\n        })\n    )\n\n    const {result} = renderHook(() => useFlowScheduledTransactionSetup(), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.isPending).toBe(false)\n\n    const promise = result.current.setupAsync()\n\n    await waitFor(() => expect(result.current.isPending).toBe(true))\n\n    await promise\n\n    await waitFor(() => expect(result.current.isPending).toBe(false))\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowScheduledTransactionSetup.ts",
    "content": "import type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {\n  UseMutateAsyncFunction,\n  UseMutateFunction,\n  useMutation,\n  UseMutationOptions,\n  UseMutationResult,\n} from \"@tanstack/react-query\"\nimport {CONTRACT_ADDRESSES} from \"../constants\"\nimport {useFlowClient} from \"./useFlowClient\"\nimport {useFlowChainId} from \"./useFlowChainId\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\n\nexport interface UseFlowScheduledTransactionSetupArgs {\n  mutation?: Omit<UseMutationOptions<string, Error, void>, \"mutationFn\">\n  flowClient?: FlowClientCore\n}\n\nexport interface UseFlowScheduledTransactionSetupResult\n  extends Omit<UseMutationResult<string, Error>, \"mutate\" | \"mutateAsync\"> {\n  setup: UseMutateFunction<string, Error, void>\n  setupAsync: UseMutateAsyncFunction<string, Error, void>\n}\n\nconst setupSchedulerMutation = (chainId: string) => {\n  const contractAddresses =\n    CONTRACT_ADDRESSES[chainId as keyof typeof CONTRACT_ADDRESSES]\n  if (!contractAddresses) {\n    throw new Error(`Unsupported chain: ${chainId}`)\n  }\n\n  return `\nimport FlowTransactionSchedulerUtils from ${contractAddresses.FlowTransactionSchedulerUtils}\n\n/// Sets up a Manager resource in the signer's account if not already done\n/// This transaction is used by: flow schedule setup [--signer account]\ntransaction() {\n    prepare(signer: auth(BorrowValue, IssueStorageCapabilityController, SaveValue, PublishCapability) &Account) {\n        // Save a manager resource to storage if not already present\n        if signer.storage.borrow<&AnyResource>(from: FlowTransactionSchedulerUtils.managerStoragePath) == nil {\n            let manager <- FlowTransactionSchedulerUtils.createManager()\n            signer.storage.save(<-manager, to: FlowTransactionSchedulerUtils.managerStoragePath)\n        }\n\n        // Check if capability is already published\n        let existingCap = signer.capabilities.get<&{FlowTransactionSchedulerUtils.Manager}>(\n            FlowTransactionSchedulerUtils.managerPublicPath\n        )\n        // Only issue and publish if not already published or invalid\n        if !existingCap.check() {\n            // Create a new capability for the Manager\n            let managerCap = signer.capabilities.storage.issue<&{FlowTransactionSchedulerUtils.Manager}>(\n                FlowTransactionSchedulerUtils.managerStoragePath\n            )\n            signer.capabilities.publish(managerCap, at: FlowTransactionSchedulerUtils.managerPublicPath)\n        }\n    }\n}\n`\n}\n\n/**\n * Hook for setting up a Flow Transaction Scheduler Manager resource.\n *\n * @param {UseFlowScheduledTransactionSetupArgs} args Optional configuration including mutation options\n * @returns {UseFlowScheduledTransactionSetupResult} Mutation result with setup/setupAsync functions\n *\n * @example\n * const { setupAsync, isPending } = useFlowScheduledTransactionSetup()\n *\n * const handleSetup = async () => {\n *   try {\n *     const resultTxId = await setupAsync()\n *     console.log(\"Setup transaction ID:\", resultTxId)\n *   } catch (error) {\n *     console.error(\"Setup failed:\", error)\n *   }\n * }\n */\nexport function useFlowScheduledTransactionSetup({\n  mutation: mutationOptions = {},\n  flowClient,\n}: UseFlowScheduledTransactionSetupArgs = {}): UseFlowScheduledTransactionSetupResult {\n  const chainIdResult = useFlowChainId()\n  const chainId = chainIdResult.data\n  const cadenceTx = chainId ? setupSchedulerMutation(chainId) : null\n\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const mutation = useMutation(\n    {\n      mutationFn: async () => {\n        if (!cadenceTx) {\n          throw new Error(\"Chain ID not detected\")\n        }\n\n        const resultTxId = await fcl.mutate({\n          cadence: cadenceTx,\n          args: () => [],\n        })\n        return resultTxId\n      },\n      retry: false,\n      ...mutationOptions,\n    },\n    queryClient\n  )\n\n  const {mutate: setup, mutateAsync: setupAsync, ...rest} = mutation\n\n  return {\n    setup,\n    setupAsync,\n    ...rest,\n  }\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowTransaction.test.ts",
    "content": "import {renderHook, act, waitFor} from \"@testing-library/react\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {useFlowTransaction} from \"./useFlowTransaction\"\nimport type {Transaction} from \"@onflow/typedefs\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowTransaction\", () => {\n  let mockFcl: MockFclInstance\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"does nothing when no txId is provided\", () => {\n    const {result} = renderHook(() => useFlowTransaction({}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.isLoading).toBe(false)\n    expect(result.current.data).toBeNull()\n    expect(result.current.error).toBeNull()\n  })\n\n  test(\"fetches transaction when txId is provided\", async () => {\n    const mockTransaction: Partial<Transaction> = {\n      script: \"transaction { }\",\n      args: [],\n      referenceBlockId: \"123456\",\n      gasLimit: 1000,\n      proposalKey: {\n        address: \"0x123\",\n        keyId: 0,\n        sequenceNumber: 1,\n      },\n      payer: \"0x123\",\n      proposer: \"0x123\",\n      authorizers: [\"0x123\"],\n      payloadSignatures: [],\n      envelopeSignatures: [],\n    }\n\n    // Set up mock to return transaction via send/decode pattern\n    mockFcl.setMockSendResponse(mockTransaction)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowTransaction({txId: \"abc123\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.data).toBeNull()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toEqual(mockTransaction)\n    expect(hookResult.current.error).toBeNull()\n    expect(mockFcl.mockFclInstance.send).toHaveBeenCalled()\n    expect(mockFcl.mockFclInstance.decode).toHaveBeenCalled()\n  })\n\n  test(\"handles error when fetching transaction fails\", async () => {\n    const testError = new Error(\"Failed to fetch transaction\")\n\n    // Make send reject with error\n    mockFcl.mockFclInstance.send = jest.fn().mockRejectedValue(testError)\n\n    let hookResult: any\n\n    await act(async () => {\n      const {result} = renderHook(() => useFlowTransaction({txId: \"def456\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    expect(hookResult.current.error).toBeNull()\n    expect(hookResult.current.data).toBeNull()\n\n    await waitFor(() => expect(hookResult.current.isLoading).toBe(false))\n\n    expect(hookResult.current.data).toBeNull()\n    expect(hookResult.current.error).not.toBeNull()\n    expect(hookResult.current.error?.message).toEqual(\n      \"Failed to fetch transaction\"\n    )\n    expect(mockFcl.mockFclInstance.send).toHaveBeenCalled()\n  })\n\n  test(\"refetch function works correctly\", async () => {\n    const mockTransaction: Partial<Transaction> = {\n      script: \"transaction { }\",\n      args: [],\n      referenceBlockId: \"123456\",\n      gasLimit: 1000,\n      proposalKey: {\n        address: \"0x123\",\n        keyId: 0,\n        sequenceNumber: 1,\n      },\n      payer: \"0x123\",\n      proposer: \"0x123\",\n      authorizers: [\"0x123\"],\n      payloadSignatures: [],\n      envelopeSignatures: [],\n    }\n\n    const updatedTransaction: Partial<Transaction> = {\n      ...mockTransaction,\n      gasLimit: 2000,\n    }\n\n    // Set initial response\n    mockFcl.setMockSendResponse(mockTransaction)\n\n    let hookResult: any\n    await act(async () => {\n      const {result} = renderHook(() => useFlowTransaction({txId: \"abc123\"}), {\n        wrapper: TestProvider,\n      })\n      hookResult = result\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.isLoading).toBe(false)\n    })\n\n    expect(hookResult.current.data).toEqual(mockTransaction)\n\n    // Update response for refetch\n    mockFcl.setMockSendResponse(updatedTransaction)\n\n    act(() => {\n      hookResult.current.refetch()\n    })\n\n    await waitFor(() => {\n      expect(hookResult.current.data?.gasLimit).toBe(2000)\n    })\n\n    expect(hookResult.current.data).toEqual(updatedTransaction)\n    expect(mockFcl.mockFclInstance.send).toHaveBeenCalledTimes(2)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowTransaction.ts",
    "content": "import {getTransaction} from \"@onflow/fcl-core\"\nimport type {Transaction} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useQuery, UseQueryResult, UseQueryOptions} from \"@tanstack/react-query\"\nimport {useCallback} from \"react\"\nimport {useFlowQueryClient} from \"../provider/FlowQueryClient\"\nimport {useFlowClient} from \"./useFlowClient\"\n\nexport interface UseFlowTransactionArgs {\n  /** The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string) to fetch */\n  txId?: string\n  /** React Query settings (staleTime, retry, enabled, select, etc.) */\n  query?: Omit<\n    UseQueryOptions<Transaction | null, Error>,\n    \"queryKey\" | \"queryFn\"\n  >\n  /** Optional flowClient */\n  flowClient?: FlowClientCore\n}\n\n/**\n * Fetches a Flow transaction by ID.\n *\n * @param args.txId - The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string)\n * @param args.query - Optional React Query options\n * @returns {UseQueryResult<Transaction | null, Error>} Transaction object or null\n */\nexport function useFlowTransaction({\n  txId,\n  query: queryOptions = {},\n  flowClient,\n}: UseFlowTransactionArgs): UseQueryResult<Transaction | null, Error> {\n  const queryClient = useFlowQueryClient()\n  const fcl = useFlowClient({flowClient})\n\n  const fetchTransaction = useCallback(async () => {\n    if (!txId) return null\n\n    return fcl\n      .send([getTransaction(txId)])\n      .then(fcl.decode) as Promise<Transaction>\n  }, [txId])\n\n  return useQuery<Transaction | null, Error>(\n    {\n      queryKey: [\"flowTransaction\", txId],\n      queryFn: fetchTransaction,\n      initialData: null,\n      ...queryOptions,\n    },\n    queryClient\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowTransactionStatus.test.ts",
    "content": "import {renderHook, act} from \"@testing-library/react\"\nimport {useFlowTransactionStatus} from \"./useFlowTransactionStatus\"\nimport {TransactionStatus} from \"@onflow/typedefs\"\nimport {\n  TestProvider,\n  setMockFlowClient,\n  queryClient,\n} from \"../__mocks__/TestProvider\"\nimport {defaultTxStatus, errorTxStatus} from \"../__mocks__/tx\"\nimport {createMockFclInstance, MockFclInstance} from \"../__mocks__/flow-client\"\n\ndescribe(\"useFlowTransactionStatus\", () => {\n  let mockFcl: MockFclInstance\n\n  beforeEach(() => {\n    queryClient.clear()\n    mockFcl = createMockFclInstance()\n    setMockFlowClient(mockFcl.mockFclInstance)\n  })\n\n  afterEach(() => {\n    setMockFlowClient(null)\n    jest.clearAllMocks()\n  })\n\n  test(\"returns UNKNOWN when first called\", async () => {\n    const txMock = jest.mocked(mockFcl.mockFclInstance.tx)\n\n    let subscribeCallback: (txStatus: TransactionStatus) => void = () => {}\n\n    const subscribeMock = jest.fn().mockImplementation(callback => {\n      subscribeCallback = callback\n      return () => {}\n    })\n\n    txMock.mockReturnValue({\n      subscribe: subscribeMock,\n    } as unknown as ReturnType<typeof fcl.tx>)\n\n    const {result} = renderHook(\n      () => useFlowTransactionStatus({id: \"mockTxId\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    act(() => {\n      subscribeCallback(defaultTxStatus)\n    })\n\n    expect(result.current.transactionStatus?.status).toBe(0)\n    expect(result.current.transactionStatus?.statusString).toBe(\"UNKNOWN\")\n    expect(result.current.error).toBe(null)\n  })\n\n  test(\"sets error when transaction status includes an errorMessage\", async () => {\n    const txMock = jest.mocked(mockFcl.mockFclInstance.tx)\n\n    let subscribeCallback: (txStatus: TransactionStatus) => void = () => {}\n    const subscribeMock = jest.fn().mockImplementation(callback => {\n      subscribeCallback = callback\n      return () => {}\n    })\n\n    txMock.mockReturnValue({\n      subscribe: subscribeMock,\n    } as unknown as ReturnType<typeof fcl.tx>)\n\n    const {result} = renderHook(\n      () => useFlowTransactionStatus({id: \"mockTxId\"}),\n      {\n        wrapper: TestProvider,\n      }\n    )\n\n    act(() => {\n      subscribeCallback(errorTxStatus)\n    })\n\n    expect(result.current.transactionStatus?.statusString).toBe(\"ERROR\")\n    expect(result.current.error).not.toBeNull()\n    expect(result.current.error?.message).toBe(\"Test error occurred\")\n  })\n\n  test(\"returns null when no transaction ID is provided\", () => {\n    const {result} = renderHook(() => useFlowTransactionStatus({}), {\n      wrapper: TestProvider,\n    })\n\n    expect(result.current.transactionStatus).toBe(null)\n    expect(result.current.error).toBe(null)\n  })\n})\n"
  },
  {
    "path": "packages/react-core/src/hooks/useFlowTransactionStatus.ts",
    "content": "import {useState, useEffect} from \"react\"\nimport type {TransactionStatus} from \"@onflow/typedefs\"\nimport type {FlowClientCore} from \"@onflow/fcl-core\"\nimport {useFlowClient} from \"./useFlowClient\"\nimport {TransactionError} from \"@onflow/fcl-core\"\n\nexport interface UseFlowTransactionStatusArgs {\n  /** The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string) to monitor */\n  id?: string | null\n  flowClient?: FlowClientCore\n}\n\nexport interface UseFlowTransactionStatusResult {\n  /** Latest transaction status, or null before any update */\n  transactionStatus: TransactionStatus | null\n  /** Any error encountered during status updates */\n  error: Error | null\n}\n\n/**\n * Subscribes to status updates for a given Flow transaction ID.\n *\n * @remarks\n * This hook was previously named `useFlowTransaction`.\n *\n * @param args.id - The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string) to watch\n * @returns {UseFlowTransactionStatusResult}\n */\nexport function useFlowTransactionStatus({\n  id,\n  flowClient,\n}: UseFlowTransactionStatusArgs): UseFlowTransactionStatusResult {\n  const [transactionStatus, setTransactionStatus] =\n    useState<TransactionStatus | null>(null)\n  const [error, setError] = useState<Error | null>(null)\n  const fcl = useFlowClient({flowClient})\n\n  useEffect(() => {\n    if (!id) return\n\n    setTransactionStatus(null)\n    setError(null)\n\n    const tx = fcl.tx(id)\n    const unsubscribe = tx.subscribe((updatedStatus: TransactionStatus) => {\n      setTransactionStatus(updatedStatus)\n\n      if (updatedStatus.errorMessage) {\n        setError(TransactionError.fromErrorMessage(updatedStatus.errorMessage))\n      }\n    })\n\n    return () => {\n      unsubscribe()\n    }\n  }, [id])\n\n  return {transactionStatus, error}\n}\n"
  },
  {
    "path": "packages/react-core/src/index.ts",
    "content": "export * from \"./hooks\"\nexport * from \"./core\"\nexport * from \"./provider\"\nexport * from \"./constants\"\nexport * from \"./utils\"\n"
  },
  {
    "path": "packages/react-core/src/jest-setup.ts",
    "content": "const {TextEncoder, TextDecoder} = require(\"util\")\n\nObject.assign(global, {TextDecoder, TextEncoder})\n"
  },
  {
    "path": "packages/react-core/src/provider/FlowQueryClient.tsx",
    "content": "import React, {createContext, useContext, PropsWithChildren} from \"react\"\nimport {QueryClient} from \"@tanstack/react-query\"\n\nexport const FlowQueryClientContext = createContext<QueryClient | undefined>(\n  undefined\n)\n\nexport function useFlowQueryClient() {\n  const queryClient = useContext(FlowQueryClientContext)\n  if (!queryClient) {\n    throw new Error(\n      \"useFlowQueryClient must be used within a FlowQueryClientProvider\"\n    )\n  }\n  return queryClient\n}\n\nexport function FlowQueryClientProvider({\n  queryClient,\n  children,\n}: PropsWithChildren<{queryClient: QueryClient}>) {\n  return (\n    <FlowQueryClientContext.Provider value={queryClient} children={children} />\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/provider/GlobalTransactionProvider.tsx",
    "content": "import React, {createContext, useContext, useState, useEffect} from \"react\"\nimport {TransactionExecutionStatus} from \"@onflow/typedefs\"\nimport {useFlowClient} from \"../hooks/useFlowClient\"\n\ninterface GlobalTransactionContextValue {\n  /** Current global transaction ID, or null if none */\n  globalTxId: string | null\n  /** Set the global transaction ID */\n  setGlobalTxId: (txId: string | null) => void\n}\n\nconst GlobalTransactionContext =\n  createContext<GlobalTransactionContextValue | null>(null)\n\n/**\n * Hook to access and manage the global transaction state.\n *\n * @throws Error if used outside of FlowProvider\n *\n * @example\n * ```tsx\n * const {globalTxId, setGlobalTxId} = useGlobalTransaction()\n *\n * // Start tracking a transaction\n * setGlobalTxId(txId)\n *\n * // Check if a transaction is in progress\n * if (globalTxId) {\n *   console.log(\"Transaction in progress:\", globalTxId)\n * }\n * ```\n */\nexport function useGlobalTransaction(): GlobalTransactionContextValue {\n  const context = useContext(GlobalTransactionContext)\n  if (!context) {\n    throw new Error(\"useGlobalTransaction must be used within a FlowProvider\")\n  }\n  return context\n}\n\ninterface GlobalTransactionProviderProps {\n  children: React.ReactNode\n}\n\n/**\n * Provider that tracks a single global transaction.\n * Automatically clears the transaction ID when the transaction is executed.\n */\nexport function GlobalTransactionProvider({\n  children,\n}: GlobalTransactionProviderProps) {\n  const [txId, setTxId] = useState<string | null>(null)\n  const fcl = useFlowClient()\n\n  useEffect(() => {\n    if (!txId) return\n\n    const unsub = fcl.tx(txId).subscribe(\n      (txStatus: {status: number}) => {\n        if (txStatus.status >= TransactionExecutionStatus.EXECUTED) {\n          setTxId(null)\n        }\n      },\n      (error: Error) => {\n        console.error(\"Transaction status subscription error:\", error)\n        setTxId(null)\n      }\n    )\n\n    return () => {\n      unsub()\n    }\n  }, [txId])\n\n  const value: GlobalTransactionContextValue = {\n    globalTxId: txId,\n    setGlobalTxId: (newTxId: string | null) => {\n      if (newTxId !== txId) {\n        setTxId(newTxId)\n      }\n    },\n  }\n\n  return (\n    <GlobalTransactionContext.Provider value={value}>\n      {children}\n    </GlobalTransactionContext.Provider>\n  )\n}\n"
  },
  {
    "path": "packages/react-core/src/provider/index.ts",
    "content": "export {\n  useFlowQueryClient,\n  FlowQueryClientContext,\n  FlowQueryClientProvider,\n} from \"./FlowQueryClient\"\nexport {\n  useGlobalTransaction,\n  GlobalTransactionProvider,\n} from \"./GlobalTransactionProvider\"\n"
  },
  {
    "path": "packages/react-core/src/utils/address.ts",
    "content": "export const truncateAddress = (address: string): string => {\n  if (!address) return \"\"\n  return `${address.slice(0, 6)}...${address.slice(-4)}`\n}\n"
  },
  {
    "path": "packages/react-core/src/utils/deepEqual.ts",
    "content": "export function deepEqual(a: any, b: any): boolean {\n  if (a === b) return true\n\n  if (\n    typeof a !== \"object\" ||\n    a === null ||\n    typeof b !== \"object\" ||\n    b === null\n  ) {\n    return false\n  }\n\n  if (Array.isArray(a) !== Array.isArray(b)) return false\n\n  const keysA = Object.keys(a)\n  const keysB = Object.keys(b)\n  if (keysA.length !== keysB.length) return false\n\n  for (const key of keysA) {\n    if (!Object.prototype.hasOwnProperty.call(b, key)) return false\n    if (!deepEqual(a[key], b[key])) return false\n  }\n\n  return true\n}\n"
  },
  {
    "path": "packages/react-core/src/utils/flowscan.ts",
    "content": "import type {FlowNetwork} from \"../core/types\"\n\ntype ExplorerNetwork = Extract<FlowNetwork, \"mainnet\" | \"testnet\">\n\nexport const BLOCK_EXPLORER_URL: Record<ExplorerNetwork, string> = {\n  mainnet: \"https://www.flowscan.io\",\n  testnet: \"https://testnet.flowscan.io\",\n}\n\nexport const getFlowscanTxUrl = (\n  txId: string,\n  chainId?: FlowNetwork | string | null\n): string | null => {\n  // Check for emulator or local (both strings identify emulator)\n  if (!chainId || chainId === \"emulator\" || chainId === \"local\") return null\n  return `${BLOCK_EXPLORER_URL[chainId as ExplorerNetwork]}/tx/${txId}`\n}\n\nexport const getFlowscanAccountUrl = (\n  address: string,\n  chainId?: FlowNetwork | string | null\n): string | null => {\n  // Check for emulator or local (both strings identify emulator)\n  if (!address || !chainId || chainId === \"emulator\" || chainId === \"local\") {\n    return null\n  }\n  return `${BLOCK_EXPLORER_URL[chainId as ExplorerNetwork]}/account/${address}`\n}\n\nexport const getFlowscanScheduledTxUrl = (\n  txId: string,\n  chainId?: FlowNetwork | string | null\n): string | null => {\n  // Check for emulator or local (both strings identify emulator)\n  if (!chainId || chainId === \"emulator\" || chainId === \"local\") return null\n  return `${BLOCK_EXPLORER_URL[chainId as ExplorerNetwork]}/scheduled/${txId}`\n}\n"
  },
  {
    "path": "packages/react-core/src/utils/index.ts",
    "content": "export * from \"./address\"\nexport * from \"./deepEqual\"\nexport * from \"./flowscan\"\n"
  },
  {
    "path": "packages/react-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./dist\",\n    \"rootDir\": \"./src\",\n    \"declarationDir\": \"./types\",\n    \"declaration\": true,\n    \"jsx\": \"react\"\n  },\n  \"include\": [\"src/**/*\"],\n  \"exclude\": [\n    \"node_modules\",\n    \"dist\",\n    \"types\",\n    \"**/*.test.ts\",\n    \"**/*.test.tsx\",\n    \"**/__mocks__/**\",\n    \"**/jest-setup.ts\",\n    \"**/mocks/**\"\n  ]\n}\n"
  },
  {
    "path": "packages/react-native-sdk/.babelrc",
    "content": "{\n  \"presets\": [\n    \"@babel/preset-typescript\",\n    \"@babel/preset-env\",\n    [\"@babel/preset-react\", {\"runtime\": \"automatic\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/react-native-sdk/CHANGELOG.md",
    "content": "# @onflow/react-native-sdk\n\n## 0.3.0\n\n### Minor Changes\n\n- [#2774](https://github.com/onflow/fcl-js/pull/2774) [`d8cbe12f20ca9c047567155b40642e3dbea66c89`](https://github.com/onflow/fcl-js/commit/d8cbe12f20ca9c047567155b40642e3dbea66c89) Thanks [@mfbz](https://github.com/mfbz)! - Improved wc redirect flexibility and updated connect modal to be normal centered modal for better layout support.\n\n### Patch Changes\n\n- Updated dependencies [[`d8cbe12f20ca9c047567155b40642e3dbea66c89`](https://github.com/onflow/fcl-js/commit/d8cbe12f20ca9c047567155b40642e3dbea66c89)]:\n  - @onflow/fcl-react-native@1.22.0\n\n## 0.2.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338) Thanks [@mfbz](https://github.com/mfbz)! - Added react-native-sdk package, similar to react-sdk but for react-native applications. It fully supports all the same hooks available in react-sdk, plus the connect and profile components. It leverages fcl-react-native for managing blockchain interactions and it's compatible to both react-native and expo applications.\n\n### Patch Changes\n\n- Updated dependencies [[`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338)]:\n  - @onflow/fcl-react-native@1.21.0\n  - @onflow/react-core@0.9.0\n"
  },
  {
    "path": "packages/react-native-sdk/README.md",
    "content": "# @onflow/react-native-sdk\n\nA React Native library that provides hooks for interacting with the Flow blockchain. It helps you authenticate users, run Cadence scripts and transactions, listen to events, and manage network configuration directly from your components. Fully compatible with Expo.\n\nThis package provides a comparable API to [@onflow/react-sdk](https://www.npmjs.com/package/@onflow/react-sdk) for React Native applications. See the hooks in action in the [React SDK Playground](https://react.flow.com).\n\n## 🔧 Installation\n\n```bash\nnpm install @onflow/react-native-sdk\n```\n\n## 🧩 Quick Setup\n\nBefore using any hooks, wrap your app in the `FlowProvider`:\n\n```tsx\nimport {FlowProvider} from \"@onflow/react-native-sdk\"\nimport flowJson from \"../flow.json\"\n\n<FlowProvider\n  config={{\n    accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n    flowNetwork: \"mainnet\",\n    walletconnectProjectId: \"YOUR_WALLETCONNECT_PROJECT_ID\",\n    appDetailTitle: \"My On Chain App\",\n    appDetailIcon: \"https://example.com/icon.png\",\n    appDetailDescription: \"A decentralized app on Flow\",\n    appDetailUrl: \"https://myonchainapp.com\",\n  }}\n  flowJson={flowJson}\n>\n  <App />\n</FlowProvider>\n```\n\n## 🪝 Available Hooks\n\nHere's a look at some of the hooks available. For a full list, see the [official documentation](https://developers.flow.com/tools/react-native-sdk/hooks).\n\n- `useFlowCurrentUser`\n- `useFlowAccount`\n- `useFlowBlock`\n- `useFlowConfig`\n- `useFlowEvents`\n- `useFlowQuery`\n- `useFlowRevertibleRandom`\n- `useFlowMutate`\n- `useFlowTransaction`\n- `useFlowTransactionStatus`\n- `useCrossVmTokenBalance`\n- `useCrossVmBatchTransaction`\n\n## 🧱 Available Components\n\n- `<Connect />` - Wallet connection button with built-in profile modal\n- `<Profile />` - Displays connected wallet information with disconnect option\n\n## 🔗 WalletConnect Deeplinks\n\nThis SDK uses `wc-redirect` as the deeplink path for WalletConnect redirects (e.g., `myapp://wc-redirect`). When a wallet approves a connection or transaction, it redirects back to your app using this path.\n\nTo prevent navigation flashes, you can intercept this path using Expo Router's `+native-intent.tsx`. See [Expo Router Native Intent documentation](https://docs.expo.dev/router/advanced/native-intent/) for details.\n\n## 📚 Full Documentation\n\nLooking for full API docs, examples, and usage tips?\n\n👉 [Explore the official docs →](https://developers.flow.com/tools/react-sdk)\n"
  },
  {
    "path": "packages/react-native-sdk/jest.config.js",
    "content": "module.exports = {\n  preset: \"react-native\",\n  passWithNoTests: true,\n  moduleNameMapper: {\n    \"^@walletconnect\": \"<rootDir>/src/__mocks__/noop.ts\",\n  },\n  transformIgnorePatterns: [\n    \"node_modules/(?!(react-native|@react-native|@onflow)/)\",\n  ],\n  workerThreads: true,\n}\n"
  },
  {
    "path": "packages/react-native-sdk/package.json",
    "content": "{\n  \"name\": \"@onflow/react-native-sdk\",\n  \"version\": \"0.3.0\",\n  \"description\": \"React Native library for interacting with the Flow blockchain\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://www.flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"sideEffects\": false,\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"types\": \"types/index.d.ts\",\n  \"source\": \"src/index.ts\",\n  \"files\": [\n    \"dist\",\n    \"types\",\n    \"README.md\"\n  ],\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"build:types\": \"tsc\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@onflow/react-core\": \"0.9.0\",\n    \"@babel/runtime\": \"^7.25.7\",\n    \"expo-clipboard\": \"^7.0.0\",\n    \"@tanstack/react-query\": \"^5.67.3\",\n    \"react-native-svg\": \"^15.8.0\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl-react-native\": \">=1.22.0\",\n    \"react\": \"^18.0.0 || ^19.0.0\",\n    \"react-native\": \">=0.70.0\",\n    \"viem\": \"^2.29.2\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-env\": \"^7.26.9\",\n    \"@babel/preset-react\": \"^7.26.3\",\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@tanstack/react-query\": \"^5.67.3\",\n    \"@testing-library/react-native\": \"^12.4.3\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/react\": \"^18.2.6\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"jest\": \"^29.7.0\",\n    \"react\": \"^18.3.1\",\n    \"react-native\": \"^0.76.0\",\n    \"react-test-renderer\": \"^18.3.1\",\n    \"typescript\": \"^5.9.2\",\n    \"viem\": \"^2.29.2\"\n  }\n}\n"
  },
  {
    "path": "packages/react-native-sdk/src/__mocks__/noop.ts",
    "content": "export default {}\n"
  },
  {
    "path": "packages/react-native-sdk/src/components/Connect.tsx",
    "content": "import {useFlowCurrentUser, truncateAddress} from \"@onflow/react-core\"\nimport {UseCrossVmTokenBalanceData} from \"@onflow/react-core\"\nimport React, {useCallback, useMemo, useState} from \"react\"\nimport {\n  Modal,\n  Pressable,\n  StyleSheet,\n  Text,\n  TouchableOpacity,\n} from \"react-native\"\nimport {\n  colors,\n  spacing,\n  radius,\n  borderWidths,\n  sizes,\n  fontSizes,\n  fontWeights,\n} from \"../styles\"\nimport {Profile} from \"./Profile\"\n\ntype BalanceType = keyof UseCrossVmTokenBalanceData\n\nexport type TokenConfig = {\n  symbol: string\n  name: string\n} & (\n  | {vaultIdentifier: string; erc20Address?: never}\n  | {vaultIdentifier?: never; erc20Address: string}\n)\n\nexport interface ConnectProps {\n  /** Callback after successful connection */\n  onConnect?: () => void\n  /** Callback after disconnection */\n  onDisconnect?: () => void\n  /** Balance type to display in profile (cadence, evm, or combined) */\n  balanceType?: BalanceType\n  /** Custom tokens to display balance for in profile */\n  balanceTokens?: TokenConfig[]\n  /** Whether to show profile modal when connected (default: true) */\n  modalEnabled?: boolean\n}\n\n/**\n * Connect - Wallet connection button for React Native\n *\n * Displays a button to connect/disconnect wallet. When connected,\n * shows the truncated address and opens a profile modal on tap.\n *\n * @example\n * ```tsx\n * <Connect\n *   onConnect={() => console.log(\"Connected!\")}\n *   onDisconnect={() => console.log(\"Disconnected!\")}\n * />\n * ```\n *\n * @example\n * ```tsx\n * // With balance display\n * <Connect\n *   balanceType=\"cadence\"\n *   balanceTokens={[\n *     { symbol: \"FLOW\", name: \"Flow Token\", vaultIdentifier: \"...\" }\n *   ]}\n * />\n * ```\n */\nexport function Connect({\n  onConnect,\n  onDisconnect,\n  balanceType = \"cadence\",\n  balanceTokens,\n  modalEnabled = true,\n}: ConnectProps) {\n  const {user, authenticate, unauthenticate} = useFlowCurrentUser()\n  const [modalVisible, setModalVisible] = useState(false)\n\n  const isLoggedIn = user?.loggedIn ?? false\n\n  const displayAddress = useMemo(() => {\n    if (!user?.addr) return \"\"\n    return truncateAddress(user.addr)\n  }, [user?.addr])\n\n  const handleDisconnect = useCallback(() => {\n    unauthenticate()\n    setModalVisible(false)\n    onDisconnect?.()\n  }, [unauthenticate, onDisconnect])\n\n  const handlePress = useCallback(async () => {\n    if (isLoggedIn) {\n      if (modalEnabled) {\n        setModalVisible(true)\n      } else {\n        handleDisconnect()\n      }\n    } else {\n      try {\n        await authenticate()\n        onConnect?.()\n      } catch {\n        // Authentication was cancelled or failed - no action needed\n      }\n    }\n  }, [isLoggedIn, modalEnabled, authenticate, onConnect, handleDisconnect])\n\n  const buttonText = useMemo(() => {\n    if (isLoggedIn) return displayAddress\n    return \"Connect Wallet\"\n  }, [isLoggedIn, displayAddress])\n\n  const accessibilityLabel = useMemo(() => {\n    if (isLoggedIn) return `Connected: ${displayAddress}`\n    return \"Connect wallet\"\n  }, [isLoggedIn, displayAddress])\n\n  return (\n    <>\n      <TouchableOpacity\n        style={[\n          styles.button,\n          isLoggedIn ? styles.connectedButton : styles.disconnectedButton,\n        ]}\n        onPress={handlePress}\n        accessible\n        accessibilityRole=\"button\"\n        accessibilityLabel={accessibilityLabel}\n        accessibilityHint={\n          isLoggedIn ? \"Tap to view profile\" : \"Tap to connect wallet\"\n        }\n      >\n        <Text\n          style={[\n            styles.buttonText,\n            isLoggedIn\n              ? styles.connectedButtonText\n              : styles.disconnectedButtonText,\n          ]}\n        >\n          {buttonText}\n        </Text>\n      </TouchableOpacity>\n\n      {isLoggedIn && modalEnabled && (\n        <Modal\n          visible={modalVisible}\n          transparent\n          animationType=\"fade\"\n          onRequestClose={() => setModalVisible(false)}\n          accessible\n          accessibilityViewIsModal\n        >\n          <Pressable\n            style={styles.modalOverlay}\n            onPress={() => setModalVisible(false)}\n            accessible\n            accessibilityRole=\"button\"\n            accessibilityLabel=\"Close profile\"\n          >\n            <Pressable\n              style={styles.modalContent}\n              onPress={e => e.stopPropagation()}\n            >\n              <Profile\n                onDisconnect={handleDisconnect}\n                balanceType={balanceType}\n                balanceTokens={balanceTokens}\n              />\n            </Pressable>\n          </Pressable>\n        </Modal>\n      )}\n    </>\n  )\n}\n\nconst styles = StyleSheet.create({\n  button: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    paddingVertical: spacing.sm,\n    paddingHorizontal: spacing.xl,\n    borderRadius: radius.sm,\n    minHeight: sizes.buttonMinHeight,\n  },\n  disconnectedButton: {\n    backgroundColor: colors.slate900,\n  },\n  connectedButton: {\n    backgroundColor: colors.transparent,\n    borderWidth: borderWidths.default,\n    borderColor: colors.slate200,\n  },\n  buttonText: {\n    fontSize: fontSizes.md,\n    fontWeight: fontWeights.semibold,\n  },\n  disconnectedButtonText: {\n    color: colors.white,\n  },\n  connectedButtonText: {\n    color: colors.slate900,\n  },\n  modalOverlay: {\n    flex: 1,\n    backgroundColor: colors.overlay,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    padding: spacing.lg,\n  },\n  modalContent: {\n    backgroundColor: colors.white,\n    borderRadius: radius.lg,\n    width: \"100%\",\n    maxWidth: sizes.modalMaxWidth,\n    shadowColor: colors.slate900,\n    shadowOffset: {width: 0, height: 4},\n    shadowOpacity: 0.15,\n    shadowRadius: radius.md,\n    elevation: 8,\n  },\n})\n"
  },
  {
    "path": "packages/react-native-sdk/src/components/Profile.tsx",
    "content": "import React, {useCallback, useMemo, useState, useEffect} from \"react\"\nimport {View, Text, TouchableOpacity, StyleSheet, Linking} from \"react-native\"\nimport * as Clipboard from \"expo-clipboard\"\nimport {sansPrefix} from \"@onflow/fcl-react-native\"\nimport {\n  useFlowCurrentUser,\n  useCrossVmTokenBalance,\n  UseCrossVmTokenBalanceData,\n  useFlowChainId,\n  getFlowscanAccountUrl,\n  CONTRACT_ADDRESSES,\n  truncateAddress,\n} from \"@onflow/react-core\"\nimport type {TokenConfig} from \"./Connect\"\nimport {\n  UserIcon,\n  CopyIcon,\n  CheckIcon,\n  LogOutIcon,\n  ExternalLinkIcon,\n} from \"../icons\"\nimport {\n  colors,\n  spacing,\n  radius,\n  borderWidths,\n  sizes,\n  fontSizes,\n  fontWeights,\n} from \"../styles\"\n\ntype BalanceType = keyof UseCrossVmTokenBalanceData\n\nexport interface ProfileProps {\n  /** Callback when user disconnects */\n  onDisconnect?: () => void\n  /** Balance type to display (cadence, evm, or combined) */\n  balanceType?: BalanceType\n  /** Custom tokens to display balance for */\n  balanceTokens?: TokenConfig[]\n}\n\n/**\n * Profile - Displays user wallet information with balance\n *\n * Shows the connected wallet address and token balance.\n * Provides disconnect functionality and links to Flowscan.\n *\n * @example\n * ```tsx\n * <Profile\n *   onDisconnect={() => console.log(\"Disconnected\")}\n *   balanceType=\"cadence\"\n * />\n * ```\n */\nexport const Profile: React.FC<ProfileProps> = ({\n  onDisconnect,\n  balanceType = \"cadence\",\n  balanceTokens,\n}) => {\n  const {user, unauthenticate} = useFlowCurrentUser()\n  const {data: chainId} = useFlowChainId()\n  const [copied, setCopied] = useState(false)\n\n  // Default token configuration for FlowToken\n  const defaultTokens: TokenConfig[] = useMemo(() => {\n    if (!chainId) return []\n\n    const getFlowTokenAddress = () => {\n      if (chainId === \"emulator\" || chainId === \"local\")\n        return CONTRACT_ADDRESSES.local.FlowToken\n      return chainId === \"testnet\"\n        ? CONTRACT_ADDRESSES.testnet.FlowToken\n        : CONTRACT_ADDRESSES.mainnet.FlowToken\n    }\n\n    const address = sansPrefix(getFlowTokenAddress())\n    return [\n      {\n        symbol: \"FLOW\",\n        name: \"Flow Token\",\n        vaultIdentifier: `A.${address}.FlowToken.Vault`,\n      },\n    ]\n  }, [chainId])\n\n  // Use provided tokens or default to FLOW\n  const availableTokens = useMemo(\n    () =>\n      balanceTokens && balanceTokens.length > 0 ? balanceTokens : defaultTokens,\n    [balanceTokens, defaultTokens]\n  )\n\n  const [selectedToken, setSelectedToken] = useState<TokenConfig | undefined>(\n    availableTokens[0]\n  )\n\n  // Update selectedToken when availableTokens changes\n  useEffect(() => {\n    if (!availableTokens || availableTokens.length === 0) {\n      setSelectedToken(undefined)\n      return\n    }\n\n    setSelectedToken(prev => {\n      if (!prev) return availableTokens[0]\n\n      const updatedToken = availableTokens.find(t => t.symbol === prev.symbol)\n      if (!updatedToken) return availableTokens[0]\n\n      if (\n        (!prev.vaultIdentifier && updatedToken.vaultIdentifier) ||\n        (!prev.erc20Address && updatedToken.erc20Address)\n      ) {\n        return updatedToken\n      }\n\n      return prev\n    })\n  }, [availableTokens])\n\n  const {data: balanceData} = useCrossVmTokenBalance({\n    owner: user?.addr,\n    vaultIdentifier: selectedToken?.vaultIdentifier,\n    erc20Address: selectedToken?.erc20Address,\n    query: {\n      enabled:\n        !!user?.addr &&\n        !!chainId &&\n        !!selectedToken &&\n        (!!selectedToken?.vaultIdentifier || !!selectedToken?.erc20Address),\n    },\n  })\n\n  const displayAddress = useMemo(() => {\n    if (!user?.addr) return \"\"\n    return truncateAddress(user.addr)\n  }, [user?.addr])\n\n  const flowscanUrl = useMemo(\n    () => getFlowscanAccountUrl(user?.addr || \"\", chainId),\n    [user?.addr, chainId]\n  )\n\n  const displayBalance = useMemo(() => {\n    if (\n      !balanceData ||\n      typeof balanceData === \"string\" ||\n      !balanceData[balanceType]?.formatted\n    ) {\n      return \"0\"\n    }\n    return Number(balanceData[balanceType].formatted).toLocaleString(\n      undefined,\n      {\n        maximumFractionDigits: 4,\n        minimumFractionDigits: 0,\n      }\n    )\n  }, [balanceData, balanceType])\n\n  const handleCopy = useCallback(async () => {\n    if (user?.addr) {\n      try {\n        await Clipboard.setStringAsync(user.addr)\n        setCopied(true)\n        setTimeout(() => setCopied(false), 1500)\n      } catch {\n        // Silently fail - clipboard may not be available in all environments\n      }\n    }\n  }, [user?.addr])\n\n  const handleOpenFlowscan = useCallback(async () => {\n    if (flowscanUrl) {\n      try {\n        await Linking.openURL(flowscanUrl)\n      } catch {\n        // Silently fail - URL may not be supported\n      }\n    }\n  }, [flowscanUrl])\n\n  const handleDisconnect = useCallback(() => {\n    unauthenticate()\n    onDisconnect?.()\n  }, [unauthenticate, onDisconnect])\n\n  const handleSelectToken = useCallback((token: TokenConfig) => {\n    setSelectedToken(token)\n  }, [])\n\n  // Not connected state\n  if (!user?.loggedIn) {\n    return (\n      <View style={[styles.container, styles.centerContent]}>\n        <View style={styles.avatarPlaceholder}>\n          <UserIcon size={sizes.iconMd} color={colors.slate500} />\n        </View>\n        <Text style={styles.notConnectedText}>No connected wallet</Text>\n      </View>\n    )\n  }\n\n  // Connected state\n  return (\n    <View style={styles.container}>\n      <View style={styles.header}>\n        <View style={styles.avatar}>\n          <UserIcon size={sizes.iconMd} color={colors.slate500} />\n        </View>\n        <View style={styles.addressRow}>\n          <Text style={styles.address}>{displayAddress}</Text>\n          {flowscanUrl && (\n            <TouchableOpacity\n              onPress={handleOpenFlowscan}\n              accessible\n              accessibilityRole=\"link\"\n              accessibilityLabel=\"View on Flowscan\"\n            >\n              <ExternalLinkIcon size={sizes.iconSm} color={colors.slate500} />\n            </TouchableOpacity>\n          )}\n        </View>\n      </View>\n\n      {availableTokens.length > 1 && (\n        <View style={styles.tokenSelector}>\n          <Text style={styles.sectionLabel}>Token</Text>\n          <View style={styles.tokenList}>\n            {availableTokens.map(token => (\n              <TouchableOpacity\n                key={token.symbol}\n                style={[\n                  styles.tokenOption,\n                  selectedToken?.symbol === token.symbol &&\n                    styles.tokenOptionSelected,\n                ]}\n                onPress={() => handleSelectToken(token)}\n                accessible\n                accessibilityRole=\"radio\"\n                accessibilityState={{\n                  selected: selectedToken?.symbol === token.symbol,\n                }}\n              >\n                <Text\n                  style={[\n                    styles.tokenSymbol,\n                    selectedToken?.symbol === token.symbol &&\n                      styles.tokenSymbolSelected,\n                  ]}\n                >\n                  {token.symbol}\n                </Text>\n              </TouchableOpacity>\n            ))}\n          </View>\n        </View>\n      )}\n\n      <View style={styles.balanceCard}>\n        <Text style={styles.sectionLabel}>Balance</Text>\n        <View style={styles.balanceRow}>\n          <Text style={styles.balanceAmount}>{displayBalance}</Text>\n          <Text style={styles.balanceSymbol}>\n            {selectedToken?.symbol || \"FLOW\"}\n          </Text>\n        </View>\n      </View>\n\n      <View style={styles.actions}>\n        <TouchableOpacity\n          style={styles.actionButton}\n          onPress={handleCopy}\n          disabled={copied}\n          accessible\n          accessibilityRole=\"button\"\n          accessibilityLabel={copied ? \"Address copied\" : \"Copy address\"}\n        >\n          {copied ? (\n            <CheckIcon size={sizes.iconSm} color={colors.success} />\n          ) : (\n            <CopyIcon size={sizes.iconSm} color={colors.slate900} />\n          )}\n          <Text style={styles.actionText}>\n            {copied ? \"Copied!\" : \"Copy Address\"}\n          </Text>\n        </TouchableOpacity>\n\n        <TouchableOpacity\n          style={styles.actionButton}\n          onPress={handleDisconnect}\n          accessible\n          accessibilityRole=\"button\"\n          accessibilityLabel=\"Disconnect wallet\"\n        >\n          <LogOutIcon size={sizes.iconSm} color={colors.slate900} />\n          <Text style={styles.actionText}>Disconnect</Text>\n        </TouchableOpacity>\n      </View>\n    </View>\n  )\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    padding: spacing.lg,\n  },\n  centerContent: {\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    paddingVertical: spacing.xxl,\n  },\n\n  avatarPlaceholder: {\n    width: sizes.avatar,\n    height: sizes.avatar,\n    borderRadius: radius.full,\n    backgroundColor: colors.slate100,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    marginBottom: spacing.sm,\n  },\n  notConnectedText: {\n    fontSize: fontSizes.sm,\n    fontWeight: fontWeights.medium,\n    color: colors.slate500,\n  },\n\n  header: {\n    alignItems: \"center\",\n    marginBottom: spacing.lg,\n  },\n  avatar: {\n    width: sizes.avatar,\n    height: sizes.avatar,\n    borderRadius: radius.full,\n    backgroundColor: colors.slate100,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    marginBottom: spacing.sm,\n  },\n  addressRow: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    gap: spacing.xs,\n  },\n  address: {\n    fontSize: fontSizes.md,\n    fontWeight: fontWeights.semibold,\n    color: colors.slate900,\n  },\n\n  tokenSelector: {\n    marginBottom: spacing.md,\n  },\n  sectionLabel: {\n    fontSize: fontSizes.xs,\n    fontWeight: fontWeights.semibold,\n    color: colors.slate500,\n    marginBottom: spacing.xs,\n  },\n  tokenList: {\n    flexDirection: \"row\",\n    flexWrap: \"wrap\",\n    gap: spacing.xs,\n  },\n  tokenOption: {\n    paddingHorizontal: spacing.md,\n    paddingVertical: spacing.xs,\n    borderRadius: radius.sm,\n    borderWidth: borderWidths.default,\n    borderColor: colors.slate200,\n    backgroundColor: colors.white,\n  },\n  tokenOptionSelected: {\n    borderColor: colors.primary,\n    backgroundColor: colors.primaryLight,\n  },\n  tokenSymbol: {\n    fontSize: fontSizes.sm,\n    fontWeight: fontWeights.semibold,\n    color: colors.slate500,\n  },\n  tokenSymbolSelected: {\n    color: colors.primary,\n  },\n\n  balanceCard: {\n    backgroundColor: colors.slate50,\n    borderRadius: radius.md,\n    borderWidth: borderWidths.default,\n    borderColor: colors.slate200,\n    padding: spacing.md,\n    marginBottom: spacing.md,\n  },\n  balanceRow: {\n    flexDirection: \"row\",\n    alignItems: \"baseline\",\n  },\n  balanceAmount: {\n    fontSize: fontSizes.lg,\n    fontWeight: fontWeights.bold,\n    color: colors.slate900,\n  },\n  balanceSymbol: {\n    fontSize: fontSizes.sm,\n    fontWeight: fontWeights.medium,\n    color: colors.slate500,\n    marginLeft: spacing.xs,\n  },\n\n  actions: {\n    flexDirection: \"row\",\n    gap: spacing.sm,\n  },\n  actionButton: {\n    flex: 1,\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    paddingVertical: spacing.sm,\n    paddingHorizontal: spacing.md,\n    borderRadius: radius.sm,\n    borderWidth: borderWidths.default,\n    borderColor: colors.slate200,\n    backgroundColor: colors.white,\n    gap: spacing.xs,\n  },\n  actionText: {\n    fontSize: fontSizes.sm,\n    fontWeight: fontWeights.medium,\n    color: colors.slate900,\n  },\n})\n"
  },
  {
    "path": "packages/react-native-sdk/src/components/index.ts",
    "content": "export {Connect} from \"./Connect\"\nexport type {ConnectProps, TokenConfig} from \"./Connect\"\nexport {Profile} from \"./Profile\"\nexport type {ProfileProps} from \"./Profile\"\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/CheckIcon.tsx",
    "content": "import React from \"react\"\nimport {Svg, Path} from \"react-native-svg\"\n\ninterface IconProps {\n  size?: number\n  color?: string\n}\n\nexport const CheckIcon: React.FC<IconProps> = ({\n  size = 24,\n  color = \"#0F172A\",\n}) => (\n  <Svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <Path d=\"M20 6L9 17l-5-5\" />\n  </Svg>\n)\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/CopyIcon.tsx",
    "content": "import React from \"react\"\nimport {Svg, Path, Rect} from \"react-native-svg\"\n\ninterface IconProps {\n  size?: number\n  color?: string\n}\n\nexport const CopyIcon: React.FC<IconProps> = ({\n  size = 24,\n  color = \"#0F172A\",\n}) => (\n  <Svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <Rect width={14} height={14} x={8} y={8} rx={2} ry={2} />\n    <Path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n  </Svg>\n)\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/ExternalLinkIcon.tsx",
    "content": "import React from \"react\"\nimport {Svg, Path} from \"react-native-svg\"\n\ninterface IconProps {\n  size?: number\n  color?: string\n}\n\nexport const ExternalLinkIcon: React.FC<IconProps> = ({\n  size = 16,\n  color = \"#64748B\",\n}) => (\n  <Svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <Path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n    <Path d=\"M15 3h6v6\" />\n    <Path d=\"M10 14L21 3\" />\n  </Svg>\n)\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/LogOutIcon.tsx",
    "content": "import React from \"react\"\nimport {Svg, Path} from \"react-native-svg\"\n\ninterface IconProps {\n  size?: number\n  color?: string\n}\n\nexport const LogOutIcon: React.FC<IconProps> = ({\n  size = 24,\n  color = \"#0F172A\",\n}) => (\n  <Svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <Path d=\"m16 17 5-5-5-5\" />\n    <Path d=\"M21 12H9\" />\n    <Path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n  </Svg>\n)\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/UserIcon.tsx",
    "content": "import React from \"react\"\nimport {Svg, Path, Circle} from \"react-native-svg\"\n\ninterface IconProps {\n  size?: number\n  color?: string\n}\n\nexport const UserIcon: React.FC<IconProps> = ({\n  size = 24,\n  color = \"#64748B\",\n}) => (\n  <Svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke={color}\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <Path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\" />\n    <Circle cx={12} cy={7} r={4} />\n  </Svg>\n)\n"
  },
  {
    "path": "packages/react-native-sdk/src/icons/index.ts",
    "content": "export {UserIcon} from \"./UserIcon\"\nexport {CopyIcon} from \"./CopyIcon\"\nexport {CheckIcon} from \"./CheckIcon\"\nexport {LogOutIcon} from \"./LogOutIcon\"\nexport {ExternalLinkIcon} from \"./ExternalLinkIcon\"\n"
  },
  {
    "path": "packages/react-native-sdk/src/index.ts",
    "content": "// Re-export types from react-core\nexport type {FlowNetwork, FlowConfig} from \"@onflow/react-core\"\n\n// Re-export hooks from react-core\nexport {\n  useFlowCurrentUser,\n  useFlowAuthz,\n  useFlowAccount,\n  useFlowBlock,\n  useFlowChainId,\n  useFlowClient,\n  useFlowConfig,\n  useFlowEvents,\n  useFlowMutate,\n  useFlowQuery,\n  useFlowQueryRaw,\n  useFlowRevertibleRandom,\n  useCrossVmBatchTransaction,\n  useCrossVmTokenBalance,\n  useFlowTransaction,\n  useFlowTransactionStatus,\n  useCrossVmSpendNft,\n  useCrossVmSpendToken,\n  useCrossVmBridgeNftFromEvm,\n  useCrossVmBridgeNftToEvm,\n  useCrossVmBridgeTokenFromEvm,\n  useCrossVmBridgeTokenToEvm,\n  useCrossVmTransactionStatus,\n  useFlowNftMetadata,\n  useFlowScheduledTransactionList,\n  useFlowScheduledTransaction,\n  useFlowScheduledTransactionSetup,\n  useFlowScheduledTransactionCancel,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"@onflow/react-core\"\n\n// Re-export utilities from react-core\nexport {\n  CONTRACT_ADDRESSES,\n  getFlowscanAccountUrl,\n  getFlowscanTxUrl,\n  getFlowscanScheduledTxUrl,\n} from \"@onflow/react-core\"\n\n// Re-export types from hooks\nexport type {NftViewResult, ScheduledTransaction} from \"@onflow/react-core\"\n\n// React Native specific components and providers\nexport * from \"./components\"\nexport * from \"./provider\"\n"
  },
  {
    "path": "packages/react-native-sdk/src/provider/FlowProvider.tsx",
    "content": "import React, {useState, PropsWithChildren, useMemo, useEffect} from \"react\"\nimport {\n  FlowConfig,\n  FlowConfigContext,\n  FlowClientContext,\n  FlowQueryClientProvider,\n  GlobalTransactionProvider,\n} from \"@onflow/react-core\"\nimport {DefaultOptions, QueryClient} from \"@tanstack/react-query\"\nimport {\n  createFlowClient,\n  ConnectModalProvider,\n  config,\n} from \"@onflow/fcl-react-native\"\n\nexport interface FlowProviderProps {\n  config?: FlowConfig\n  queryClient?: QueryClient\n  flowClient?: ReturnType<typeof createFlowClient>\n  flowJson?: Record<string, unknown>\n}\n\nconst defaultQueryOptions: DefaultOptions = {\n  queries: {\n    retry: false,\n    staleTime: 0,\n    refetchOnWindowFocus: false,\n    refetchOnReconnect: false,\n    refetchIntervalInBackground: false,\n  },\n}\n\n// Singleton to preserve flowClient across remounts (e.g., deeplink navigation)\n// This prevents auth state from being lost when expo-router causes remounts\nlet cachedFlowClient: ReturnType<typeof createFlowClient> | null = null\nlet cachedConfigKey: string | null = null\n\nfunction getConfigKey(\n  cfg: FlowConfig,\n  flowJson?: Record<string, unknown>\n): string {\n  // Create a stable key from config to detect if config actually changed\n  return JSON.stringify({\n    accessNodeUrl: cfg.accessNodeUrl,\n    flowNetwork: cfg.flowNetwork,\n    walletconnectProjectId: cfg.walletconnectProjectId,\n  })\n}\n\nexport function FlowProvider({\n  config: initialConfig = {},\n  queryClient: _queryClient,\n  flowClient: _flowClient,\n  flowJson,\n  children,\n}: PropsWithChildren<FlowProviderProps>) {\n  const [queryClient] = useState<QueryClient>(\n    () => _queryClient ?? new QueryClient({defaultOptions: defaultQueryOptions})\n  )\n\n  const flowClient = useMemo(() => {\n    if (_flowClient) return _flowClient\n\n    // Check if we can reuse cached client (same config)\n    const configKey = getConfigKey(initialConfig, flowJson)\n    if (cachedFlowClient && cachedConfigKey === configKey) {\n      return cachedFlowClient\n    }\n\n    const client = createFlowClient({\n      accessNodeUrl: initialConfig.accessNodeUrl!,\n      discoveryWallet: initialConfig.discoveryWallet,\n      discoveryWalletMethod: initialConfig.discoveryWalletMethod,\n      discoveryAuthnEndpoint: initialConfig.discoveryAuthnEndpoint,\n      discoveryAuthnInclude: initialConfig.discoveryAuthnInclude,\n      discoveryAuthnExclude: initialConfig.discoveryAuthnExclude,\n      flowJson,\n      flowNetwork: initialConfig.flowNetwork,\n      computeLimit: initialConfig.computeLimit,\n      walletconnectProjectId: initialConfig.walletconnectProjectId,\n      walletconnectDisableNotifications:\n        initialConfig.walletconnectDisableNotifications,\n      appDetailTitle: initialConfig.appDetailTitle,\n      appDetailIcon: initialConfig.appDetailIcon,\n      appDetailDescription: initialConfig.appDetailDescription,\n      appDetailUrl: initialConfig.appDetailUrl,\n      serviceOpenIdScopes: initialConfig.serviceOpenIdScopes,\n    })\n\n    // Cache for reuse across remounts\n    cachedFlowClient = client\n    cachedConfigKey = configKey\n\n    return client\n  }, [_flowClient, initialConfig, flowJson])\n\n  // Set discovery.authn.endpoint in global FCL config for ServiceDiscovery\n  // This is needed for the ConnectModal to work correctly and retrieve the endpoint to load wallets\n  useEffect(() => {\n    if (initialConfig.discoveryAuthnEndpoint) {\n      config().put(\n        \"discovery.authn.endpoint\",\n        initialConfig.discoveryAuthnEndpoint\n      )\n    }\n  }, [initialConfig.discoveryAuthnEndpoint])\n\n  return (\n    <FlowQueryClientProvider queryClient={queryClient}>\n      <FlowConfigContext.Provider value={initialConfig}>\n        <FlowClientContext.Provider value={flowClient}>\n          <GlobalTransactionProvider>\n            <ConnectModalProvider>{children}</ConnectModalProvider>\n          </GlobalTransactionProvider>\n        </FlowClientContext.Provider>\n      </FlowConfigContext.Provider>\n    </FlowQueryClientProvider>\n  )\n}\n"
  },
  {
    "path": "packages/react-native-sdk/src/provider/index.ts",
    "content": "export {FlowProvider} from \"./FlowProvider\"\nexport type {FlowProviderProps} from \"./FlowProvider\"\nexport {useFlowQueryClient} from \"@onflow/react-core\"\n"
  },
  {
    "path": "packages/react-native-sdk/src/styles/colors.ts",
    "content": "export const colors = {\n  // Slate palette\n  slate900: \"#0F172A\", // Primary dark (text, buttons)\n  slate500: \"#64748B\", // Secondary text, icons\n  slate200: \"#E2E8F0\", // Borders\n  slate100: \"#F1F5F9\", // Avatar backgrounds\n  slate50: \"#F8FAFC\", // Card backgrounds\n\n  // Core\n  white: \"#FFFFFF\",\n  transparent: \"transparent\",\n\n  // Semantic\n  success: \"#16A34A\", // Green for success/check\n  primary: \"#2563EB\", // Blue for selected state\n  primaryLight: \"#EFF6FF\", // Blue-50 for selected bg\n\n  // Overlay\n  overlay: \"rgba(0, 0, 0, 0.5)\",\n}\n"
  },
  {
    "path": "packages/react-native-sdk/src/styles/dimensions.ts",
    "content": "export const spacing = {\n  xs: 8, // gaps, small margins\n  sm: 12, // button padding, margins\n  md: 16, // card padding, margins\n  lg: 20, // container padding\n  xl: 24, // button horizontal padding\n  xxl: 48, // large vertical padding\n}\n\nexport const radius = {\n  sm: 8, // buttons, tokens, action buttons\n  md: 12, // cards\n  lg: 16, // modals\n  full: 32, // avatars (half of avatar size)\n}\n\nexport const borderWidths = {\n  default: 1,\n}\n\nexport const sizes = {\n  avatar: 64,\n  iconSm: 16,\n  iconMd: 32,\n  buttonMinHeight: 48,\n  modalMaxWidth: 400,\n}\n\nexport const fontSizes = {\n  xs: 12, // labels\n  sm: 14, // body text, symbols\n  md: 16, // addresses, button text\n  lg: 28, // balance amount\n}\n\nexport const fontWeights = {\n  medium: \"500\" as const,\n  semibold: \"600\" as const,\n  bold: \"700\" as const,\n}\n"
  },
  {
    "path": "packages/react-native-sdk/src/styles/index.ts",
    "content": "export {colors} from \"./colors\"\nexport {\n  spacing,\n  radius,\n  borderWidths,\n  sizes,\n  fontSizes,\n  fontWeights,\n} from \"./dimensions\"\n"
  },
  {
    "path": "packages/react-native-sdk/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\",\n    \"jsx\": \"react\",\n    \"lib\": [\"ES2015\", \"ES2022.Error\"],\n    \"skipLibCheck\": true,\n    \"paths\": {\n      \"react\": [\"../../node_modules/@types/react/index\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/react-sdk/.babelrc",
    "content": "{\n  \"presets\": [\n    \"@babel/preset-typescript\",\n    \"@babel/preset-env\",\n    [\"@babel/preset-react\", {\"runtime\": \"automatic\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/react-sdk/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/react-sdk/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/react-sdk/CHANGELOG.md",
    "content": "# @onflow/react-sdk\n\n## 0.20.0\n\n### Minor Changes\n\n- [#2769](https://github.com/onflow/fcl-js/pull/2769) [`55cc8ff8345e26ff015e2af5f44ddcdcf314d690`](https://github.com/onflow/fcl-js/commit/55cc8ff8345e26ff015e2af5f44ddcdcf314d690) Thanks [@chasefleming](https://github.com/chasefleming)! - Implement theming system across all components and switch to color theme system\n\n### Patch Changes\n\n- [#2750](https://github.com/onflow/fcl-js/pull/2750) [`e98815ef1163e89cdb9822b0efd5f927c75c05fc`](https://github.com/onflow/fcl-js/commit/e98815ef1163e89cdb9822b0efd5f927c75c05fc) Thanks [@chasefleming](https://github.com/chasefleming)! - Update NFT card to use internal button component\n\n## 0.19.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338) Thanks [@mfbz](https://github.com/mfbz)! - Added react-native-sdk package, similar to react-sdk but for react-native applications. It fully supports all the same hooks available in react-sdk, plus the connect and profile components. It leverages fcl-react-native for managing blockchain interactions and it's compatible to both react-native and expo applications.\n\n### Patch Changes\n\n- Updated dependencies [[`706e08247a1e13eb49f01671772e2172bf664338`](https://github.com/onflow/fcl-js/commit/706e08247a1e13eb49f01671772e2172bf664338)]:\n  - @onflow/react-core@0.9.0\n\n## 0.18.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/react-core@0.8.1\n  - @onflow/fcl@1.21.9\n\n## 0.18.0\n\n### Minor Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/react-core@0.8.0\n  - @onflow/fcl@1.21.8\n\n## 0.17.0\n\n### Minor Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/react-core@0.7.0\n  - @onflow/fcl@1.21.7\n\n## 0.16.0\n\n### Minor Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/react-core@0.6.0\n  - @onflow/fcl@1.21.6\n\n## 0.15.0\n\n### Minor Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/react-core@0.5.0\n  - @onflow/fcl@1.21.5\n\n## 0.14.0\n\n### Minor Changes\n\n- [#2756](https://github.com/onflow/fcl-js/pull/2756) [`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6) Thanks [@mfbz](https://github.com/mfbz)! - Packages re-released after lerna update.\n\n### Patch Changes\n\n- Updated dependencies [[`60f568702df22f874cea5a756962f701e79783d6`](https://github.com/onflow/fcl-js/commit/60f568702df22f874cea5a756962f701e79783d6)]:\n  - @onflow/react-core@0.4.0\n  - @onflow/fcl@1.21.4\n\n## 0.13.1\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/react-core@0.3.0\n  - @onflow/fcl@1.21.3\n\n## 0.13.0\n\n### Minor Changes\n\n- [#2733](https://github.com/onflow/fcl-js/pull/2733) [`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd) Thanks [@mfbz](https://github.com/mfbz)! - Add react-core package with platform-agnostic hooks with common utils and types extracted from react-sdk. Refactored react-sdk to use react-core package.\n\n### Patch Changes\n\n- Updated dependencies [[`b5da56b93755f2871135573bfa806a8e12a50ddd`](https://github.com/onflow/fcl-js/commit/b5da56b93755f2871135573bfa806a8e12a50ddd)]:\n  - @onflow/react-core@0.2.0\n  - @onflow/fcl@1.21.2\n\n## 0.12.2\n\n### Patch Changes\n\n- Updated dependencies [[`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d)]:\n  - @onflow/fcl@1.21.0\n\n## 0.12.1\n\n### Patch Changes\n\n- [#2696](https://github.com/onflow/fcl-js/pull/2696) [`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810) Thanks [@jribbink](https://github.com/jribbink)! - Add support for `discoveryAuthnExclude` configuration option in React SDK. This allows users to exclude specific wallet providers from the discovery service, complementing the existing `discoveryAuthnInclude` option.\n\n- Updated dependencies [[`3bf349056b623cdd19ca5f135120250814bcf810`](https://github.com/onflow/fcl-js/commit/3bf349056b623cdd19ca5f135120250814bcf810), [`a5e84666b0482547fe9411064f4821e8067e5238`](https://github.com/onflow/fcl-js/commit/a5e84666b0482547fe9411064f4821e8067e5238)]:\n  - @onflow/fcl@1.20.5\n\n## 0.12.0\n\n### Minor Changes\n\n- [#2677](https://github.com/onflow/fcl-js/pull/2677) [`58f953381ee0826bfeb6d068c28bf8853b470915`](https://github.com/onflow/fcl-js/commit/58f953381ee0826bfeb6d068c28bf8853b470915) Thanks [@mfbz](https://github.com/mfbz)! - Added `NftCard` component for displaying NFT metadata. The component automatically fetches and renders NFT information including image, name, description, collection details, traits, and external links. Features loading states, error handling, dark mode support and optional display of traits and additional metadata through `showTraits` and `showExtra` props.\n\n- [#2685](https://github.com/onflow/fcl-js/pull/2685) [`f47dd3bd1efce2498b3ab731ca08da2326604f5f`](https://github.com/onflow/fcl-js/commit/f47dd3bd1efce2498b3ab731ca08da2326604f5f) Thanks [@mfbz](https://github.com/mfbz)! - Added standalone Profile component for displaying wallet information. The Profile component has been extracted from the Connect component modal to provide a reusable profile display that can be used independently. The component automatically detects connection state, showing a compact \"No connected wallet\" message when disconnected and full profile information when connected (including address, balance with cross-VM support, multi-token selector, copy/disconnect actions, and optional scheduled transactions).\n\n- [#2679](https://github.com/onflow/fcl-js/pull/2679) [`8ef9cc6933f61c45e32a69c9d723ab669a7757ec`](https://github.com/onflow/fcl-js/commit/8ef9cc6933f61c45e32a69c9d723ab669a7757ec) Thanks [@mfbz](https://github.com/mfbz)! - Added `ScheduledTransactionList` component, a scrollable list that displays scheduled transactions for a Flow account with support for MetadataViews.Display (thumbnails, names, descriptions), transaction cancellation, automatic refresh, responsive design and dark mode. Each card shows the scheduled execution time, fee, priority, and effort with an optional cancel button for pending transactions.\n\n  Enhanced `Connect` component to display scheduled transactions in the profile modal. The modal now shows the user's scheduled transactions below their account info with a configurable `modalConfig` prop to control visibility.\n\n- [#2680](https://github.com/onflow/fcl-js/pull/2680) [`b7d73c709f009b192bed02f476edcc997538213d`](https://github.com/onflow/fcl-js/commit/b7d73c709f009b192bed02f476edcc997538213d) Thanks [@mfbz](https://github.com/mfbz)! - Enhanced the Connect component to enable visualizing different tokens like USDC and other stablecoins within the Connect modal.\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.4\n\n## 0.11.0\n\n### Minor Changes\n\n- [#2592](https://github.com/onflow/fcl-js/pull/2592) [`52688c33eb41862a5daa4226e2fdfa98afab79a4`](https://github.com/onflow/fcl-js/commit/52688c33eb41862a5daa4226e2fdfa98afab79a4) Thanks [@mfbz](https://github.com/mfbz)! - Added `useCrossVmBridgeTokenFromEvm` hook for bridging fungible tokens from Flow EVM to Cadence. This hook withdraws tokens from the signer's Cadence-Owned Account (COA) in EVM and deposits them into their Cadence vault, automatically configuring the vault if needed.\n\n- [#2652](https://github.com/onflow/fcl-js/pull/2652) [`879ae914da9f4cffa3bccffddef462ffbe8ed8c7`](https://github.com/onflow/fcl-js/commit/879ae914da9f4cffa3bccffddef462ffbe8ed8c7) Thanks [@mfbz](https://github.com/mfbz)! - Added `useFlowAuthz` hook for handling Flow transaction authorization. This hook returns an authorization function that can be used when sending a transaction, defaulting to the current user's wallet authorization when no custom authorization is provided.\n\n- [#2624](https://github.com/onflow/fcl-js/pull/2624) [`7963d7aa2984e4fd0ad94182a65c8c4065f1d98c`](https://github.com/onflow/fcl-js/commit/7963d7aa2984e4fd0ad94182a65c8c4065f1d98c) Thanks [@mfbz](https://github.com/mfbz)! - Added `useCrossVmBridgeNftFromEvm` hook for bridging NFTs from Flow EVM to Cadence. This hook withdraws an NFT from the signer's Cadence-Owned Account (COA) in EVM and deposits it into their Cadence collection, automatically configuring the collection if needed.\n\n- [#2661](https://github.com/onflow/fcl-js/pull/2661) [`e651d625af8e516d935e74d885524eca741dd9e6`](https://github.com/onflow/fcl-js/commit/e651d625af8e516d935e74d885524eca741dd9e6) Thanks [@mfbz](https://github.com/mfbz)! - Add `useFlowNftMetadata` hook to fetch NFT metadata including name, description, thumbnail, traits, and collection information from Flow blockchain accounts.\n\n- [#2653](https://github.com/onflow/fcl-js/pull/2653) [`9ff0f852c5f350e41996c7b8b62e9feb9dd1ee89`](https://github.com/onflow/fcl-js/commit/9ff0f852c5f350e41996c7b8b62e9feb9dd1ee89) Thanks [@mfbz](https://github.com/mfbz)! - Added `useFlowSchedule` hook for managing scheduled transactions. This hook provides methods to list, get, setup, and cancel scheduled transactions with support for handler data resolution and transaction status tracking.\n\n- [#2660](https://github.com/onflow/fcl-js/pull/2660) [`54672e6b16234d33fa33889d2b48451697fc8f8e`](https://github.com/onflow/fcl-js/commit/54672e6b16234d33fa33889d2b48451697fc8f8e) Thanks [@mfbz](https://github.com/mfbz)! - Fixed transaction management so that it clears up transaction state on error\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.20.3\n\n## 0.10.3\n\n### Patch Changes\n\n- [#2647](https://github.com/onflow/fcl-js/pull/2647) [`6a9b141a51c563663f1030504a1537cf8a0d76df`](https://github.com/onflow/fcl-js/commit/6a9b141a51c563663f1030504a1537cf8a0d76df) Thanks [@jribbink](https://github.com/jribbink)! - Export `useFlowClient` from Flow React SDK\n\n## 0.10.2\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/fcl@1.20.1\n\n## 0.10.1\n\n### Patch Changes\n\n- [#2620](https://github.com/onflow/fcl-js/pull/2620) [`f02d080abc695f339e0a27bfeba01b8b085faad2`](https://github.com/onflow/fcl-js/commit/f02d080abc695f339e0a27bfeba01b8b085faad2) Thanks [@jribbink](https://github.com/jribbink)! - Fix animation for `TransactionDialog`\n\n## 0.10.0\n\n### Minor Changes\n\n- [#2579](https://github.com/onflow/fcl-js/pull/2579) [`77f4cbaa5c73b5fccbc6e76414293debfe167659`](https://github.com/onflow/fcl-js/commit/77f4cbaa5c73b5fccbc6e76414293debfe167659) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled React SDK from the global state and include a `FlowClient` instance within the `FlowProvider` context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application. Additionally, this is part of a larger effort to move towards a cleaner lifecycle less reliant on asynchronous state management prone to race conditions and frequent bugs.\n\n  Moving forward, developers wishing to interact directly with the Flow Client (FCL Instance) should use the `useFlowClient` hook provided by the React SDK instead of relying on globally exported functions from the FCL package.\n\n- [#2582](https://github.com/onflow/fcl-js/pull/2582) [`90f0728bd34fb1d1ce52a08c24f1a4fbcf5db455`](https://github.com/onflow/fcl-js/commit/90f0728bd34fb1d1ce52a08c24f1a4fbcf5db455) Thanks [@jribbink](https://github.com/jribbink)! - Update with latest changes on `master` branch\n\n- [#2558](https://github.com/onflow/fcl-js/pull/2558) [`11c6830ae99d2daba54276854157b6fc234dd6ef`](https://github.com/onflow/fcl-js/commit/11c6830ae99d2daba54276854157b6fc234dd6ef) Thanks [@jribbink](https://github.com/jribbink)! - Add `<TransactionButton />` component\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add component theming options\n\n- [#2609](https://github.com/onflow/fcl-js/pull/2609) [`4be1b361150c557f5c5a747b461558e35e1d3c38`](https://github.com/onflow/fcl-js/commit/4be1b361150c557f5c5a747b461558e35e1d3c38) Thanks [@mfbz](https://github.com/mfbz)! - Added tailwind prefix for style isolation\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add `<TransactionLink />` component\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add `<Connect />` component\n\n- [#2579](https://github.com/onflow/fcl-js/pull/2579) [`77f4cbaa5c73b5fccbc6e76414293debfe167659`](https://github.com/onflow/fcl-js/commit/77f4cbaa5c73b5fccbc6e76414293debfe167659) Thanks [@jribbink](https://github.com/jribbink)! - Removed deprecated `useCurrentFlowUser` hook in favor of `useFlowCurrentUser` hook for better clarity and consistency in naming conventions.\n\n- [#2604](https://github.com/onflow/fcl-js/pull/2604) [`aea5df931cbc7f664aaf6730cac8c270166a2abd`](https://github.com/onflow/fcl-js/commit/aea5df931cbc7f664aaf6730cac8c270166a2abd) Thanks [@jribbink](https://github.com/jribbink)! - Add missing config key for `discoveryAuthnInclude`.\n\n### Patch Changes\n\n- [#2589](https://github.com/onflow/fcl-js/pull/2589) [`43751a02a0052f2f77915e527afb0edd21097b79`](https://github.com/onflow/fcl-js/commit/43751a02a0052f2f77915e527afb0edd21097b79) Thanks [@mfbz](https://github.com/mfbz)! - Updated transaction button pending state\n\n- Updated dependencies [[`305763aadbd906d3355aab2ba2ba6aa3aae1cb7b`](https://github.com/onflow/fcl-js/commit/305763aadbd906d3355aab2ba2ba6aa3aae1cb7b), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0\n\n## 0.10.0-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`c5191ab2f51204dac26f099c071ed02913b616ff`](https://github.com/onflow/fcl-js/commit/c5191ab2f51204dac26f099c071ed02913b616ff)]:\n  - @onflow/fcl@1.20.0-alpha.2\n\n## 0.10.0-alpha.2\n\n### Minor Changes\n\n- [#2579](https://github.com/onflow/fcl-js/pull/2579) [`77f4cbaa5c73b5fccbc6e76414293debfe167659`](https://github.com/onflow/fcl-js/commit/77f4cbaa5c73b5fccbc6e76414293debfe167659) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled React SDK from the global state and include a `FlowClient` instance within the `FlowProvider` context.\n\n  This allows for better modularity and helps support multiple FCL instances in the same application. Additionally, this is part of a larger effort to move towards a cleaner lifecycle less reliant on asynchronous state management prone to race conditions and frequent bugs.\n\n  Moving forward, developers wishing to interact directly with the Flow Client (FCL Instance) should use the `useFlowClient` hook provided by the React SDK instead of relying on globally exported functions from the FCL package.\n\n- [#2609](https://github.com/onflow/fcl-js/pull/2609) [`4be1b361150c557f5c5a747b461558e35e1d3c38`](https://github.com/onflow/fcl-js/commit/4be1b361150c557f5c5a747b461558e35e1d3c38) Thanks [@mfbz](https://github.com/mfbz)! - Added tailwind prefix for style isolation\n\n- [#2604](https://github.com/onflow/fcl-js/pull/2604) [`aea5df931cbc7f664aaf6730cac8c270166a2abd`](https://github.com/onflow/fcl-js/commit/aea5df931cbc7f664aaf6730cac8c270166a2abd) Thanks [@jribbink](https://github.com/jribbink)! - Add missing config key for `discoveryAuthnInclude`.\n\n## 0.10.0-alpha.1\n\n### Patch Changes\n\n- [#2589](https://github.com/onflow/fcl-js/pull/2589) [`43751a02a0052f2f77915e527afb0edd21097b79`](https://github.com/onflow/fcl-js/commit/43751a02a0052f2f77915e527afb0edd21097b79) Thanks [@mfbz](https://github.com/mfbz)! - Updated transaction button pending state\n\n## 0.10.0-alpha.0\n\n### Minor Changes\n\n- [#2582](https://github.com/onflow/fcl-js/pull/2582) [`90f0728bd34fb1d1ce52a08c24f1a4fbcf5db455`](https://github.com/onflow/fcl-js/commit/90f0728bd34fb1d1ce52a08c24f1a4fbcf5db455) Thanks [@jribbink](https://github.com/jribbink)! - Update with latest changes on `master` branch\n\n### Patch Changes\n\n- Update to latest changes on master branch\n\n## 0.9.0\n\n### Minor Changes\n\n- [#2533](https://github.com/onflow/fcl-js/pull/2533) [`ad8989cd3d994df2835cff2c24e19aa73fdbd0d5`](https://github.com/onflow/fcl-js/commit/ad8989cd3d994df2835cff2c24e19aa73fdbd0d5) Thanks [@jribbink](https://github.com/jribbink)! - Add emulator support for Cross VM hooks\n\n## 0.8.0\n\n### Minor Changes\n\n- [#2568](https://github.com/onflow/fcl-js/pull/2568) [`8c707acc270bfb6f6cd592a4cd061d105aea56f9`](https://github.com/onflow/fcl-js/commit/8c707acc270bfb6f6cd592a4cd061d105aea56f9) Thanks [@chasefleming](https://github.com/chasefleming)! - Add `discoveryAuthnEndpoint` to config options\n\n## 0.8.0-alpha.0\n\n### Minor Changes\n\n- [#2558](https://github.com/onflow/fcl-js/pull/2558) [`11c6830ae99d2daba54276854157b6fc234dd6ef`](https://github.com/onflow/fcl-js/commit/11c6830ae99d2daba54276854157b6fc234dd6ef) Thanks [@jribbink](https://github.com/jribbink)! - Add `<TransactionButton />` component\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add component theming options\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add `<TransactionLink />` component\n\n- [#2559](https://github.com/onflow/fcl-js/pull/2559) [`b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1`](https://github.com/onflow/fcl-js/commit/b1bcc0a7b2bbfd952b0fa93ac79c35fcd7dccae1) Thanks [@jribbink](https://github.com/jribbink)! - Add `<Connect />` component\n\n### Patch Changes\n\n- Updated dependencies [[`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc)]:\n  - @onflow/fcl@1.20.0-alpha.0\n\n## 0.7.0\n\n### Minor Changes\n\n- [#2551](https://github.com/onflow/fcl-js/pull/2551) [`32db6b4e909d92aa66d969990ae2c21f93c52b38`](https://github.com/onflow/fcl-js/commit/32db6b4e909d92aa66d969990ae2c21f93c52b38) Thanks [@chasefleming](https://github.com/chasefleming)! - Rename `useCurrentFlowUser` to `useFlowCurrentUser`\n\n## 0.6.0\n\n### Minor Changes\n\n- [#2542](https://github.com/onflow/fcl-js/pull/2542) [`aacae504fbc568d5629211c28c55849074ed696b`](https://github.com/onflow/fcl-js/commit/aacae504fbc568d5629211c28c55849074ed696b) Thanks [@chasefleming](https://github.com/chasefleming)! - Add `useFlowTransaction` hook\n\n## 0.5.0\n\n### Minor Changes\n\n- [#2514](https://github.com/onflow/fcl-js/pull/2514) [`fcab03fe88078a0b8a1ae5e252377903c6187c5a`](https://github.com/onflow/fcl-js/commit/fcab03fe88078a0b8a1ae5e252377903c6187c5a) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmTransactionStatus` hook\n\n- [#2523](https://github.com/onflow/fcl-js/pull/2523) [`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d) Thanks [@mfbz](https://github.com/mfbz)! - Added `useFlowQueryRaw` hook to execute a query and get non-decoded data as result.\n\n### Patch Changes\n\n- [#2506](https://github.com/onflow/fcl-js/pull/2506) [`3263a098d32d8d4f73224f3d1facebd1a824c53b`](https://github.com/onflow/fcl-js/commit/3263a098d32d8d4f73224f3d1facebd1a824c53b) Thanks [@jribbink](https://github.com/jribbink)! - Make `useFlowChainId` args consistent with other hooks\n\n- [#2529](https://github.com/onflow/fcl-js/pull/2529) [`27a6b4f346eb26af63522aa25f7734c7b232bbef`](https://github.com/onflow/fcl-js/commit/27a6b4f346eb26af63522aa25f7734c7b232bbef) Thanks [@jribbink](https://github.com/jribbink)! - Export `useFlowChainId`\n\n- Updated dependencies [[`6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d`](https://github.com/onflow/fcl-js/commit/6076b0bfc95bcbe07a734c0c10c32d81ecb1dd2d)]:\n  - @onflow/fcl@1.19.0\n\n## 0.4.0\n\n### Minor Changes\n\n- [#2503](https://github.com/onflow/fcl-js/pull/2503) [`29a2c99b08d6f5a427bef5362e5d4e7ada9d51e7`](https://github.com/onflow/fcl-js/commit/29a2c99b08d6f5a427bef5362e5d4e7ada9d51e7) Thanks [@jribbink](https://github.com/jribbink)! - **BREAKING** Update `useCrossVmBatchTransaction` result data to the Cadence transaction ID instead of waiting for the EVM transaction hash.\n\n  This change ensures consistency with the existing `useFlowMutate` response format and latencies, as waiting for the transaction execution for EVM results adds unnecessary delays and harms user experience.\n\n  Developers should instead manually subscribe to the Cadence transaction status to track execution status and determine the EVM transaction results.\n\n- [#2460](https://github.com/onflow/fcl-js/pull/2460) [`d7b673e2ea97f6ab5ec2b81d2186b3e9799460cf`](https://github.com/onflow/fcl-js/commit/d7b673e2ea97f6ab5ec2b81d2186b3e9799460cf) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmSpendNft` hook\n\n- [#2503](https://github.com/onflow/fcl-js/pull/2503) [`f1a7eeab04a46e78b34a7a19aa4d8d93f3add452`](https://github.com/onflow/fcl-js/commit/f1a7eeab04a46e78b34a7a19aa4d8d93f3add452) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmSpendToken` hook\n\n## 0.3.1\n\n### Patch Changes\n\n- [#2491](https://github.com/onflow/fcl-js/pull/2491) [`ff07e0ea38845f188f0bbbcb9a365cad96cfb8b7`](https://github.com/onflow/fcl-js/commit/ff07e0ea38845f188f0bbbcb9a365cad96cfb8b7) Thanks [@jribbink](https://github.com/jribbink)! - Export `useCrossVmTokenBalance` hook\n\n## 0.3.0\n\n### Minor Changes\n\n- [#2398](https://github.com/onflow/fcl-js/pull/2398) [`99510059485ffb2d741407a573f3be076c77e044`](https://github.com/onflow/fcl-js/commit/99510059485ffb2d741407a573f3be076c77e044) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmTokenBalance` hook to get full token balance across both Cadence and EVM accounts\n\n### Patch Changes\n\n- [#2486](https://github.com/onflow/fcl-js/pull/2486) [`3f5d5037882d2da03713ece0ff4f6b7e9d3693b2`](https://github.com/onflow/fcl-js/commit/3f5d5037882d2da03713ece0ff4f6b7e9d3693b2) Thanks [@jribbink](https://github.com/jribbink)! - Switch `contractIdentifier` to `vaultIdentifier` in `useCrossVmTokenBalance` hook\n\n## 0.2.1\n\n### Patch Changes\n\n- [#2433](https://github.com/onflow/fcl-js/pull/2433) [`9f9e18b5381d455ef4546b6521ea37c5eef3063c`](https://github.com/onflow/fcl-js/commit/9f9e18b5381d455ef4546b6521ea37c5eef3063c) Thanks [@jribbink](https://github.com/jribbink)! - Fix script args query key\n\n## 0.2.0\n\n### Minor Changes\n\n- [#2439](https://github.com/onflow/fcl-js/pull/2439) [`a36d78ee5283ceb9a2f411e6da9ddf0373777c24`](https://github.com/onflow/fcl-js/commit/a36d78ee5283ceb9a2f411e6da9ddf0373777c24) Thanks [@jribbink](https://github.com/jribbink)! - Make `txId` optional for `useFlowTransactionStatus`\n\n- [#2368](https://github.com/onflow/fcl-js/pull/2368) [`eca4617c2d4d10d85bad0324f6c6064489c3d1c3`](https://github.com/onflow/fcl-js/commit/eca4617c2d4d10d85bad0324f6c6064489c3d1c3) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmBatchTransaction` function\n\n- [#2414](https://github.com/onflow/fcl-js/pull/2414) [`605f66c7a78f9ff1474a18b70298956b92f90bc1`](https://github.com/onflow/fcl-js/commit/605f66c7a78f9ff1474a18b70298956b92f90bc1) Thanks [@chasefleming](https://github.com/chasefleming)! - **BREAKING**: Rename `useFlowTransaction` as `useFlowTransactionStatus`\n\n- [#2367](https://github.com/onflow/fcl-js/pull/2367) [`9595af75eeffb0c91f9bb94b70fb0adf4db40eec`](https://github.com/onflow/fcl-js/commit/9595af75eeffb0c91f9bb94b70fb0adf4db40eec) Thanks [@jribbink](https://github.com/jribbink)! - Add `useFlowChainId` hook to the `@onflow/react-sdk` package.\n\n### Patch Changes\n\n- [#2419](https://github.com/onflow/fcl-js/pull/2419) [`f498aa9fdb0739aef8905593bdbd05af9db3267a`](https://github.com/onflow/fcl-js/commit/f498aa9fdb0739aef8905593bdbd05af9db3267a) Thanks [@chasefleming](https://github.com/chasefleming)! - Update readme with `useFlowRevertibleRandom` hook\n\n- [#2417](https://github.com/onflow/fcl-js/pull/2417) [`8608416f4d26e40d3bfa464da7e988c8beb35336`](https://github.com/onflow/fcl-js/commit/8608416f4d26e40d3bfa464da7e988c8beb35336) Thanks [@jribbink](https://github.com/jribbink)! - Fix `useFlowRevertibleRandom` range\n\n- Updated dependencies [[`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0\n\n## 0.2.0-alpha.1\n\n### Minor Changes\n\n- [#2439](https://github.com/onflow/fcl-js/pull/2439) [`a36d78ee5283ceb9a2f411e6da9ddf0373777c24`](https://github.com/onflow/fcl-js/commit/a36d78ee5283ceb9a2f411e6da9ddf0373777c24) Thanks [@jribbink](https://github.com/jribbink)! - Make `txId` optional for `useFlowTransactionStatus`\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/fcl@1.18.0-alpha.1\n\n## 0.2.0-alpha.0\n\n### Minor Changes\n\n- [#2368](https://github.com/onflow/fcl-js/pull/2368) [`eca4617c2d4d10d85bad0324f6c6064489c3d1c3`](https://github.com/onflow/fcl-js/commit/eca4617c2d4d10d85bad0324f6c6064489c3d1c3) Thanks [@jribbink](https://github.com/jribbink)! - Add `useCrossVmBatchTransaction` function\n\n- [#2414](https://github.com/onflow/fcl-js/pull/2414) [`605f66c7a78f9ff1474a18b70298956b92f90bc1`](https://github.com/onflow/fcl-js/commit/605f66c7a78f9ff1474a18b70298956b92f90bc1) Thanks [@chasefleming](https://github.com/chasefleming)! - **BREAKING**: Rename `useFlowTransaction` as `useFlowTransactionStatus`\n\n- [#2367](https://github.com/onflow/fcl-js/pull/2367) [`9595af75eeffb0c91f9bb94b70fb0adf4db40eec`](https://github.com/onflow/fcl-js/commit/9595af75eeffb0c91f9bb94b70fb0adf4db40eec) Thanks [@jribbink](https://github.com/jribbink)! - Add `useFlowChainId` hook to the `@onflow/react-sdk` package.\n\n### Patch Changes\n\n- [#2419](https://github.com/onflow/fcl-js/pull/2419) [`f498aa9fdb0739aef8905593bdbd05af9db3267a`](https://github.com/onflow/fcl-js/commit/f498aa9fdb0739aef8905593bdbd05af9db3267a) Thanks [@chasefleming](https://github.com/chasefleming)! - Update readme with `useFlowRevertibleRandom` hook\n\n- [#2417](https://github.com/onflow/fcl-js/pull/2417) [`8608416f4d26e40d3bfa464da7e988c8beb35336`](https://github.com/onflow/fcl-js/commit/8608416f4d26e40d3bfa464da7e988c8beb35336) Thanks [@jribbink](https://github.com/jribbink)! - Fix `useFlowRevertibleRandom` range\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab)]:\n  - @onflow/fcl@1.18.0-alpha.0\n\n## 0.1.0\n\n### Minor Changes\n\n- [#2384](https://github.com/onflow/fcl-js/pull/2365) [`24e2a5c160531b6973a4137e569ce127a9e7e590`](https://github.com/onflow/fcl-js/commit/24e2a5c160531b6973a4137e569ce127a9e7e590) Thanks [@chasefleming](https://github.com/chasefleming)! - Add `useFlowRevertibleRandom` hook\n\n### Patch Changes\n\n- Updated dependencies [[`f86b71357696826a5ad7b8e578de76ecebcd2e29`](https://github.com/onflow/fcl-js/commit/f86b71357696826a5ad7b8e578de76ecebcd2e29)]:\n  - @onflow/fcl@1.17.0\n\n## 0.0.2\n\n### Patch Changes\n\n- [#2359](https://github.com/onflow/fcl-js/pull/2359) [`67a302d72e217f16720a6fb38eb3d097fc98bcd6`](https://github.com/onflow/fcl-js/commit/67a302d72e217f16720a6fb38eb3d097fc98bcd6) Thanks [@chasefleming](https://github.com/chasefleming)! - Remove alpha message\n\n## 0.0.1\n\nInitial release of the FCL Kit Library. Built on top of FCL-JS, this library provides easy-to-use React bindings for building frontend applications that interact with Flow blockchain. It includes a set of components and hooks that simplify the process of connecting to Flow wallets, managing user sessions, querying on-chain data, and handling transactions.\n\nSee more on the official [Flow Developer Documentation](https://developers.flow.com/tools/kit).\n"
  },
  {
    "path": "packages/react-sdk/README.md",
    "content": "# @onflow/react-sdk\n\nA React library that provides hooks for interacting with the Flow blockchain. It helps you authenticate users, run Cadence scripts and transactions, listen to events, and manage network configuration directly from your components.\n\n## 🔧 Installation\n\n```bash\nnpm install @onflow/react-sdk\n```\n\n## 🧩 Quick Setup\n\nBefore using any hooks, wrap your app in the `FlowProvider`:\n\n```tsx\nimport { FlowProvider } from \"@onflow/react-sdk\"\nimport flowJson from \"../flow.json\"\n\n<FlowProvider\n  config={{\n    accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n    flowNetwork: \"mainnet\",\n    appDetailTitle: \"My On Chain App\",\n    appDetailIcon: \"https://example.com/icon.png\",\n    appDetailDescription: \"A decentralized app on Flow\",\n    appDetailUrl: \"https://myonchainapp.com\",\n  }}\n  flowJson={flowJson}\n>\n  <App />\n</FlowProvider>\n```\n\n## 🪝 Available Hooks\n\n- `useFlowCurrentUser`\n- `useFlowAccount`\n- `useFlowBlock`\n- `useFlowConfig`\n- `useFlowEvents`\n- `useFlowQuery`\n- `useFlowRevertibleRandom`\n- `useFlowMutate`\n- `useFlowTransaction`\n- `useCrossVmTokenBalance`\n- `useDarkMode`\n- `useFlowTransactionStatus`\n- `useCrossVmTokenBalance`\n\n## 📚 Full Documentation\n\nLooking for full API docs, examples, and usage tips?\n\n👉 [Explore the official docs →](https://developers.flow.com/tools/react-sdk)\n"
  },
  {
    "path": "packages/react-sdk/jest.config.js",
    "content": "module.exports = {\n  testEnvironment: \"jsdom\",\n  passWithNoTests: true,\n  moduleNameMapper: {\n    \"^@walletconnect\": \"<rootDir>/src/__mocks__/noop.ts\",\n    \"^preact\": \"<rootDir>/src/__mocks__/noop.ts\",\n    \"\\\\.(css|less)$\": \"<rootDir>/src/mocks/file-mock.ts\",\n  },\n  // This is a workaround with Jest v29 issues related to BigInt serialization\n  // It can be removed once Jest v30 is released and upgraded\n  // https://github.com/jestjs/jest/issues/11617\n  workerThreads: true,\n  setupFiles: [\"<rootDir>/src/jest-setup.ts\"],\n}\n"
  },
  {
    "path": "packages/react-sdk/package.json",
    "content": "{\n  \"name\": \"@onflow/react-sdk\",\n  \"version\": \"0.20.0\",\n  \"description\": \"React library for interacting with the Flow blockchain\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://www.flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"sideEffects\": false,\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"types\": \"types/index.d.ts\",\n  \"source\": \"src/index.ts\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-env\": \"^7.26.9\",\n    \"@babel/preset-react\": \"^7.26.3\",\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/typedefs\": \"^1.8.0\",\n    \"@testing-library/dom\": \"^10.4.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/react\": \"^19.0.10\",\n    \"@types/react-dom\": \"^19.0.4\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"autoprefixer\": \"^10.4.20\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"postcss-prefixwrap\": \"^1.56.1\",\n    \"tailwindcss\": \"^3.4.14\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@headlessui/react\": \"^2.2.2\",\n    \"@onflow/react-core\": \"0.9.0\",\n    \"@tanstack/react-query\": \"^5.67.3\",\n    \"@testing-library/react\": \"^16.2.0\",\n    \"tailwind-merge\": \"^3.3.1\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/fcl\": \">=1.21.9\",\n    \"react\": \"^18.0.0 || ^19.0.0\",\n    \"react-dom\": \"^18.0.0 || ^19.0.0\",\n    \"viem\": \"^2.29.2\"\n  }\n}\n"
  },
  {
    "path": "packages/react-sdk/postcss.config.js",
    "content": "const tailwindcss = require(\"tailwindcss\")\nconst tailwindConfig = require(\"./tailwind.config.js\")\nconst autoprefixer = require(\"autoprefixer\")\nconst prefixwrap = require(\"postcss-prefixwrap\")\n\nmodule.exports = {\n  plugins: [\n    tailwindcss(tailwindConfig),\n    autoprefixer,\n    prefixwrap(\".flow-wrapper\"),\n  ],\n}\n"
  },
  {
    "path": "packages/react-sdk/src/__mocks__/fcl.ts",
    "content": "import {createMockFclInstance} from \"./flow-client\"\nimport {authenticatedUser, defaultUser} from \"./user\"\n\nconst sharedSubscribe = jest.fn(callback => {\n  callback({\n    \"accessNode.api\": \"http://localhost:8080\",\n    \"app.detail.title\": \"Test App\",\n  })\n  return () => {}\n})\n\nlet currentUserState = defaultUser\n\nexport default {\n  ...jest.requireActual(\"@onflow/fcl\"),\n  account: jest.fn(),\n  block: jest.fn(),\n  events: jest.fn(),\n  mutate: jest.fn(),\n  query: jest.fn(),\n  queryRaw: jest.fn(),\n  tx: jest.fn(),\n  send: jest.fn().mockImplementation(args => {\n    // The real FCL returns an object that allows chaining with .then(fcl.decode)\n    return {\n      then: (callback: (value: any) => any) => callback({}),\n    }\n  }),\n  decode: jest.fn().mockImplementation(result => {\n    return result\n  }),\n  getTransaction: jest.fn().mockImplementation(txId => {\n    return {\n      /* Mock transaction request object */\n    }\n  }),\n  config: () => ({\n    subscribe: sharedSubscribe,\n    load: jest.fn(),\n  }),\n\n  currentUser: {\n    subscribe: jest.fn().mockImplementation((callback: any) => {\n      callback(currentUserState)\n      return () => {}\n    }),\n    snapshot: () => currentUserState,\n  },\n  authenticate: jest.fn().mockImplementation(() => {\n    currentUserState = authenticatedUser\n    return Promise.resolve(authenticatedUser)\n  }),\n  unauthenticate: jest.fn().mockImplementation(() => {\n    currentUserState = defaultUser\n  }),\n  getChainId: jest.fn().mockResolvedValue(\"mainnet\"),\n\n  TransactionError: {\n    fromErrorMessage: (errorMessage: string) => {\n      return new Error(errorMessage)\n    },\n  },\n\n  createFlowClient: jest.fn(),\n}\n"
  },
  {
    "path": "packages/react-sdk/src/__mocks__/flow-client.ts",
    "content": "import {createFlowClient} from \"@onflow/fcl\"\nimport {tx as realTx} from \"@onflow/fcl\"\nimport {authenticatedUser, defaultUser} from \"./user\"\n\nconst sharedSubscribe = jest.fn(callback => {\n  callback({\n    \"accessNode.api\": \"http://localhost:8080\",\n    \"app.detail.title\": \"Test App\",\n  })\n  return () => {}\n})\n\nlet currentUserState = defaultUser\n\nexport const createMockFclInstance = () => {\n  let mockTxResponse = {\n    snapshot: jest.fn(),\n    subscribe: jest.fn(),\n    onceFinalized: jest.fn(),\n    onceExecuted: jest.fn(),\n    onceSealed: jest.fn(),\n  }\n  const mockTx = Object.assign(jest.fn().mockReturnValue(mockTxResponse), {\n    isUnknown: jest.fn().mockImplementation(realTx.isUnknown),\n    isPending: jest.fn().mockImplementation(realTx.isPending),\n    isFinalized: jest.fn().mockImplementation(realTx.isFinalized),\n    isExecuted: jest.fn().mockImplementation(realTx.isExecuted),\n    isSealed: jest.fn().mockImplementation(realTx.isSealed),\n    isExpired: jest.fn().mockImplementation(realTx.isExpired),\n  })\n\n  const mockCurrentUser = {\n    subscribe: jest.fn().mockImplementation((callback: any) => {\n      callback(currentUserState)\n      return () => {}\n    }),\n    snapshot: async () => currentUserState,\n    authenticate: jest.fn().mockImplementation(() => {\n      currentUserState = authenticatedUser\n      return Promise.resolve(authenticatedUser)\n    }),\n    unauthenticate: jest.fn().mockImplementation(() => {\n      currentUserState = defaultUser\n    }),\n    authorization: jest.fn(),\n    signUserMessage: jest.fn().mockImplementation(() => {\n      return Promise.resolve(\"signedMessage\")\n    }),\n    resolveArgument: jest.fn(),\n  }\n\n  const mockFclInstance: jest.Mocked<ReturnType<typeof createFlowClient>> = {\n    account: jest.fn(),\n    block: jest.fn(),\n    events: jest.fn(),\n    mutate: jest.fn(),\n    query: jest.fn(),\n    queryRaw: jest.fn(),\n    tx: mockTx,\n    send: jest.fn().mockImplementation(args => {\n      // The real FCL returns an object that allows chaining with .then(fcl.decode)\n      return {\n        then: (callback: (value: any) => any) => callback({}),\n      }\n    }),\n    decode: jest.fn().mockImplementation(result => {\n      return result\n    }),\n\n    currentUser: mockCurrentUser,\n    authenticate: jest.fn().mockImplementation(() => {\n      currentUserState = authenticatedUser\n      return Promise.resolve(authenticatedUser)\n    }),\n    unauthenticate: jest.fn().mockImplementation(() => {\n      currentUserState = defaultUser\n    }),\n    getChainId: jest.fn().mockResolvedValue(\"mainnet\"),\n    subscribe: jest.fn(),\n    subscribeRaw: jest.fn(),\n    resolve: jest.fn(),\n    verifyUserSignatures: jest\n      .fn()\n      .mockRejectedValue(new Error(\"Not implemented\")),\n    signUserMessage: mockCurrentUser.signUserMessage,\n    serialize: jest.fn(),\n  }\n\n  return {\n    mockFclInstance,\n    mockTx,\n  }\n}\n\nexport type MockFclInstance = ReturnType<typeof createMockFclInstance>\n"
  },
  {
    "path": "packages/react-sdk/src/__mocks__/noop.ts",
    "content": "// This file is meant to stub out the @walletconnect/relay package which has an issue where it tries\n// to `require` an ESM package (uint8arrays) which causes the test to fail. This is a temporary\n// workaround until the issue is resolved.\n"
  },
  {
    "path": "packages/react-sdk/src/__mocks__/tx.ts",
    "content": "import {TransactionStatus} from \"@onflow/typedefs\"\n\nexport const defaultTxStatus: TransactionStatus = {\n  blockId: \"\",\n  status: 0,\n  statusString: \"UNKNOWN\",\n  statusCode: 0,\n  errorMessage: \"\",\n  events: [],\n}\n\nexport const errorTxStatus: TransactionStatus = {\n  blockId: \"block123\",\n  status: 2,\n  statusString: \"ERROR\",\n  statusCode: 1,\n  errorMessage: \"Test error occurred\",\n  events: [],\n}\n"
  },
  {
    "path": "packages/react-sdk/src/__mocks__/user.ts",
    "content": "import {CurrentUser} from \"@onflow/typedefs\"\n\nexport const defaultUser: CurrentUser = {\n  f_type: \"USER\",\n  f_vsn: \"1.0.0\",\n  loggedIn: false,\n  services: [],\n}\n\nexport const authenticatedUser: CurrentUser = {\n  f_type: \"USER\",\n  f_vsn: \"1.0.0\",\n  loggedIn: true,\n  addr: \"0x1234\",\n  services: [],\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/Connect.tsx",
    "content": "import React, {useState} from \"react\"\nimport {useFlowCurrentUser, truncateAddress} from \"@onflow/react-core\"\nimport {UseCrossVmTokenBalanceData} from \"@onflow/react-core\"\nimport {Button, ButtonProps} from \"./internal/Button\"\nimport {Dialog} from \"./internal/Dialog\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {Profile} from \"./Profile\"\n\ntype BalanceType = keyof UseCrossVmTokenBalanceData\n\nexport type TokenConfig = {\n  symbol: string\n  name: string\n} & (\n  | {vaultIdentifier: string; erc20Address?: never}\n  | {vaultIdentifier?: never; erc20Address: string}\n)\n\nexport interface ConnectModalConfig {\n  scheduledTransactions?: {\n    show?: boolean\n    filterHandlerTypes?: string[]\n  }\n}\n\ninterface ConnectProps {\n  variant?: ButtonProps[\"variant\"]\n  onConnect?: () => void\n  onDisconnect?: () => void\n  balanceType?: BalanceType\n  balanceTokens?: TokenConfig[]\n  modalConfig?: ConnectModalConfig\n  modalEnabled?: boolean\n}\n\nexport const Connect: React.FC<ConnectProps> = ({\n  variant = \"primary\",\n  onConnect,\n  onDisconnect,\n  balanceType = \"cadence\",\n  balanceTokens,\n  modalConfig = {},\n  modalEnabled = true,\n}) => {\n  const {user, authenticate, unauthenticate} = useFlowCurrentUser()\n  const [open, setOpen] = useState(false)\n\n  const showScheduledTransactions =\n    modalConfig.scheduledTransactions?.show ?? false\n  const modalWidth = showScheduledTransactions\n    ? \"flow-max-w-xl\"\n    : \"flow-max-w-md\"\n\n  const displayAddress =\n    user?.loggedIn && user.addr ? truncateAddress(user.addr) : \"\"\n\n  const handleButtonClick = async () => {\n    if (user?.loggedIn) {\n      if (modalEnabled) {\n        setOpen(true)\n      } else {\n        // Disconnect when modal is disabled\n        handleDisconnect()\n      }\n    } else {\n      await authenticate()\n      onConnect?.()\n    }\n  }\n\n  const handleDisconnect = () => {\n    unauthenticate()\n    setOpen(false)\n    onDisconnect?.()\n  }\n\n  return (\n    <>\n      <StyleWrapper>\n        <Button\n          onClick={handleButtonClick}\n          variant={user?.loggedIn ? \"outline\" : variant}\n          className=\"flow-px-2 flow-text-sm\"\n        >\n          {user?.loggedIn ? displayAddress : \"Connect Wallet\"}\n        </Button>\n      </StyleWrapper>\n      {user?.loggedIn && modalEnabled && (\n        <Dialog\n          isOpen={open}\n          onClose={() => setOpen(false)}\n          className={modalWidth}\n        >\n          <Profile\n            onDisconnect={handleDisconnect}\n            balanceType={balanceType}\n            balanceTokens={balanceTokens}\n            profileConfig={modalConfig}\n          />\n        </Dialog>\n      )}\n    </>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/NftCard.tsx",
    "content": "import React, {useEffect} from \"react\"\nimport {useFlowNftMetadata, type NftViewResult} from \"@onflow/react-core\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {ImageIcon} from \"../icons/ImageIcon\"\nimport {ExternalLinkIcon} from \"../icons/ExternalLink\"\nimport {AlertCircleIcon} from \"../icons/AlertCircleIcon\"\nimport {LoaderCircleIcon} from \"../icons/LoaderCircleIcon\"\nimport {MoreVerticalIcon} from \"../icons/MoreVerticalIcon\"\nimport {Dialog} from \"./internal/Dialog\"\nimport {Button} from \"./internal/Button\"\nimport {twMerge} from \"tailwind-merge\"\nimport {useTheme} from \"../core/theme\"\n\nexport interface NftCardAction {\n  title: string\n  onClick: () => Promise<void> | void\n}\n\ninterface NftCardProps {\n  accountAddress: string\n  tokenId: string | number\n  publicPathIdentifier: string\n  showTraits?: boolean\n  showExtra?: boolean\n  actions?: NftCardAction[]\n  className?: string\n  style?: React.CSSProperties\n}\n\nexport const NftCard: React.FC<NftCardProps> = ({\n  accountAddress,\n  tokenId,\n  publicPathIdentifier,\n  showTraits = false,\n  showExtra = false,\n  actions,\n  className,\n  style,\n}) => {\n  const [showTraitsModal, setShowTraitsModal] = React.useState(false)\n  const [actionLoading, setActionLoading] = React.useState<number | null>(null)\n  const [isDropdownOpen, setIsDropdownOpen] = React.useState(false)\n  const dropdownRef = React.useRef<HTMLDivElement>(null)\n  const {colors} = useTheme()\n\n  const {\n    data: nft,\n    isLoading,\n    error,\n  } = useFlowNftMetadata({\n    accountAddress,\n    tokenId,\n    publicPathIdentifier,\n  })\n\n  const getThumbnailUrl = (nft: NftViewResult | null) => {\n    if (!nft || !nft.thumbnailUrl) return null\n    return nft.thumbnailUrl\n  }\n\n  const hasError = error || !nft\n  const hasImage = !hasError && getThumbnailUrl(nft)\n  const totalTraits =\n    !hasError && nft?.traits ? Object.keys(nft.traits).length : 0\n\n  // Click outside to close dropdown\n  useEffect(() => {\n    const handleClickOutside = (event: MouseEvent) => {\n      if (\n        dropdownRef.current &&\n        !dropdownRef.current.contains(event.target as Node)\n      ) {\n        setIsDropdownOpen(false)\n      }\n    }\n\n    const handleEscapeKey = (event: KeyboardEvent) => {\n      if (event.key === \"Escape\") {\n        setIsDropdownOpen(false)\n      }\n    }\n\n    if (isDropdownOpen) {\n      document.addEventListener(\"mousedown\", handleClickOutside)\n      document.addEventListener(\"keydown\", handleEscapeKey)\n    }\n    return () => {\n      document.removeEventListener(\"mousedown\", handleClickOutside)\n      document.removeEventListener(\"keydown\", handleEscapeKey)\n    }\n  }, [isDropdownOpen])\n\n  return (\n    <StyleWrapper>\n      <div\n        className={twMerge(\n          \"flow-w-full flow-rounded-lg flow-overflow-hidden\",\n          \"flow-shadow-lg hover:flow-shadow-xl flow-transition-shadow\",\n          \"flow-duration-300 flow-border\",\n          colors.background,\n          colors.border,\n          className\n        )}\n        style={style}\n      >\n        <div className=\"flow-relative\">\n          <div\n            className={twMerge(\n              \"flow-relative flow-w-full flow-aspect-square flow-overflow-hidden\",\n              colors.secondary\n            )}\n          >\n            {isLoading ? (\n              <div className=\"flow-absolute flow-inset-0 flow-flex flow-items-center flow-justify-center\">\n                <LoaderCircleIcon\n                  className={twMerge(\n                    \"flow-h-16 flow-w-16 flow-animate-spin\",\n                    colors.mutedForeground\n                  )}\n                />\n              </div>\n            ) : hasError ? (\n              <div\n                className=\"flow-absolute flow-inset-0 flow-flex flow-flex-col flow-items-center\n                  flow-justify-center flow-gap-3\"\n              >\n                <AlertCircleIcon\n                  className={twMerge(\n                    \"flow-h-16 flow-w-16\",\n                    colors.mutedForeground\n                  )}\n                />\n                <p\n                  className={twMerge(\n                    \"flow-text-sm flow-font-medium\",\n                    colors.mutedForeground\n                  )}\n                >\n                  Failed to load NFT\n                </p>\n              </div>\n            ) : hasImage ? (\n              <img\n                src={getThumbnailUrl(nft)!}\n                alt={nft.name || `NFT #${tokenId}`}\n                className=\"flow-absolute flow-inset-0 flow-w-full flow-h-full flow-object-cover\"\n              />\n            ) : (\n              <div className=\"flow-absolute flow-inset-0 flow-flex flow-items-center flow-justify-center\">\n                <ImageIcon\n                  className={twMerge(\n                    \"flow-h-16 flow-w-16\",\n                    colors.mutedForeground\n                  )}\n                />\n              </div>\n            )}\n          </div>\n\n          {actions && actions.length > 0 && (\n            <div className=\"flow-absolute flow-top-2 flow-right-2 flow-z-[2]\">\n              <div\n                ref={dropdownRef}\n                className=\"flow-relative flow-inline-block\"\n              >\n                <button\n                  onClick={() => setIsDropdownOpen(!isDropdownOpen)}\n                  onKeyDown={e => {\n                    if (e.key === \"Enter\" || e.key === \" \") {\n                      e.preventDefault()\n                      setIsDropdownOpen(!isDropdownOpen)\n                    }\n                  }}\n                  className=\"flow-p-2 flow-rounded-full flow-bg-white/80 dark:flow-bg-slate-900/80\n                    flow-backdrop-blur-sm flow-border flow-border-slate-200\n                    dark:flow-border-slate-700 hover:flow-bg-white dark:hover:flow-bg-slate-900\n                    flow-transition-colors flow-shadow-sm hover:flow-shadow-md\n                    focus:flow-outline-none\"\n                  aria-label=\"Actions menu\"\n                  aria-expanded={isDropdownOpen}\n                >\n                  <MoreVerticalIcon\n                    className={twMerge(\"flow-h-4 flow-w-4\", colors.foreground)}\n                  />\n                </button>\n\n                {isDropdownOpen && (\n                  <div\n                    className={twMerge(\n                      \"flow-absolute flow-top-full flow-mt-2 flow-w-52 flow-rounded-lg\",\n                      \"flow-shadow-sm hover:flow-shadow-md flow-border flow-p-1 flow-origin-top-right\",\n                      colors.background,\n                      colors.border\n                    )}\n                    style={{right: \"0px\"}}\n                  >\n                    {actions.map((action, index) => (\n                      <button\n                        key={index}\n                        onClick={async e => {\n                          e.stopPropagation()\n                          setActionLoading(index)\n                          try {\n                            await action.onClick()\n                            setIsDropdownOpen(false)\n                          } finally {\n                            setActionLoading(null)\n                          }\n                        }}\n                        disabled={actionLoading !== null}\n                        className=\"flow-w-full flow-text-left flow-px-3 flow-py-2.5 flow-text-sm flow-font-medium\n                          flow-transition-all flow-duration-150 flow-flex flow-items-center\n                          flow-justify-between flow-gap-2 flow-text-slate-700 dark:flow-text-slate-300\n                          hover:flow-bg-slate-100 dark:hover:flow-bg-slate-700/50\n                          hover:flow-text-slate-900 dark:hover:flow-text-white focus:flow-bg-slate-100\n                          dark:focus:flow-bg-slate-700/50 focus:flow-text-slate-900\n                          dark:focus:flow-text-white focus:flow-outline-none disabled:flow-opacity-50\n                          disabled:flow-cursor-not-allowed flow-rounded-lg\"\n                      >\n                        <span className=\"flow-truncate\">{action.title}</span>\n                        {actionLoading === index && (\n                          <LoaderCircleIcon\n                            className={twMerge(\n                              \"flow-h-4 flow-w-4 flow-flex-shrink-0 flow-animate-spin\",\n                              colors.mutedForeground\n                            )}\n                          />\n                        )}\n                      </button>\n                    ))}\n                  </div>\n                )}\n              </div>\n            </div>\n          )}\n        </div>\n\n        <div className=\"flow-p-6 flow-space-y-4\">\n          <div className=\"flow-space-y-2\">\n            {isLoading ? (\n              <>\n                <div className=\"flow-flex flow-items-start flow-justify-between flow-gap-4\">\n                  <div className=\"flow-flex-1 flow-min-w-0 flow-pr-2\">\n                    <div\n                      className=\"flow-bg-slate-200 dark:flow-bg-slate-700 flow-h-3 flow-rounded flow-w-1/3\n                        flow-mb-2 flow-animate-pulse\"\n                    ></div>\n                    <div\n                      className=\"flow-bg-slate-200 dark:flow-bg-slate-700 flow-h-6 flow-rounded flow-w-3/4\n                        flow-animate-pulse\"\n                    ></div>\n                  </div>\n                  <div className=\"flow-flex-shrink-0 flow-self-start\">\n                    <div\n                      className=\"flow-bg-slate-200 dark:flow-bg-slate-700 flow-h-5 flow-rounded flow-w-12\n                        flow-animate-pulse\"\n                    ></div>\n                  </div>\n                </div>\n                <div\n                  className=\"flow-bg-slate-200 dark:flow-bg-slate-700 flow-h-4 flow-rounded flow-w-full\n                    flow-animate-pulse\"\n                ></div>\n                <div\n                  className=\"flow-bg-slate-200 dark:flow-bg-slate-700 flow-h-4 flow-rounded flow-w-5/6\n                    flow-animate-pulse\"\n                ></div>\n              </>\n            ) : (\n              <div className=\"flow-flex flow-items-start flow-justify-between flow-gap-4\">\n                <div className=\"flow-flex-1 flow-min-w-0 flow-pr-2\">\n                  {!hasError && nft.collectionName && (\n                    <p\n                      className={twMerge(\n                        \"flow-text-xs flow-uppercase flow-tracking-wider flow-font-semibold flow-mb-1\",\n                        colors.mutedForeground\n                      )}\n                    >\n                      {nft.collectionName}\n                    </p>\n                  )}\n\n                  <h3\n                    className={twMerge(\n                      \"flow-text-xl flow-font-bold flow-truncate flow-leading-tight\",\n                      colors.foreground\n                    )}\n                  >\n                    {hasError\n                      ? `NFT #${tokenId}`\n                      : nft.name || `NFT #${tokenId}`}\n                  </h3>\n                </div>\n\n                <div className=\"flow-flex-shrink-0 flow-self-start\">\n                  <span\n                    className={twMerge(\n                      \"flow-text-sm flow-font-medium flow-whitespace-nowrap\",\n                      colors.mutedForeground\n                    )}\n                  >\n                    #{tokenId}\n                  </span>\n                </div>\n              </div>\n            )}\n\n            {!isLoading && !hasError && nft.description && (\n              <p\n                className={twMerge(\n                  \"flow-text-sm flow-line-clamp-2 flow-leading-relaxed\",\n                  colors.mutedForeground\n                )}\n              >\n                {nft.description}\n              </p>\n            )}\n\n            {!isLoading && hasError && (\n              <p className={twMerge(\"flow-text-sm\", colors.mutedForeground)}>\n                Unable to load NFT metadata\n              </p>\n            )}\n          </div>\n\n          {showExtra &&\n            !hasError &&\n            (nft.serialNumber ||\n              nft.rarity ||\n              nft.externalUrl ||\n              nft.collectionExternalUrl) && (\n              <div className=\"flow-flex flow-flex-wrap flow-gap-2\">\n                {nft.serialNumber && (\n                  <span\n                    className=\"flow-inline-flex flow-items-center flow-px-3 flow-py-1.5 flow-rounded-full\n                      flow-text-xs flow-font-semibold flow-bg-blue-50 dark:flow-bg-blue-900/20\n                      flow-text-blue-700 dark:flow-text-blue-400 flow-border flow-border-blue-200\n                      dark:flow-border-blue-800\"\n                  >\n                    Serial #{nft.serialNumber}\n                  </span>\n                )}\n\n                {nft.rarity && (\n                  <span\n                    className=\"flow-inline-flex flow-items-center flow-px-3 flow-py-1.5 flow-rounded-full\n                      flow-text-xs flow-font-semibold flow-bg-purple-50 dark:flow-bg-purple-900/20\n                      flow-text-purple-700 dark:flow-text-purple-400 flow-border\n                      flow-border-purple-200 dark:flow-border-purple-800\"\n                  >\n                    {nft.rarity}\n                  </span>\n                )}\n\n                {(nft.externalUrl || nft.collectionExternalUrl) && (\n                  <a\n                    href={nft.externalUrl || nft.collectionExternalUrl}\n                    target=\"_blank\"\n                    rel=\"noopener noreferrer\"\n                    className=\"flow-inline-flex flow-items-center flow-gap-1.5 flow-px-3 flow-py-1.5\n                      flow-rounded-full flow-text-xs flow-font-semibold flow-bg-slate-100\n                      dark:flow-bg-slate-800 flow-text-slate-700 dark:flow-text-slate-300\n                      hover:flow-bg-slate-200 dark:hover:flow-bg-slate-700 flow-transition-colors\n                      flow-border flow-border-slate-200 dark:flow-border-slate-700\"\n                  >\n                    <ExternalLinkIcon className=\"flow-h-3.5 flow-w-3.5\" />\n                    View\n                  </a>\n                )}\n              </div>\n            )}\n\n          {showTraits && !hasError && nft.traits && totalTraits > 0 && (\n            <div className=\"flow-space-y-3\">\n              <p\n                className={twMerge(\n                  \"flow-text-xs flow-font-bold flow-uppercase flow-tracking-wider\",\n                  colors.foreground\n                )}\n              >\n                Traits\n              </p>\n              <div className=\"flow-grid flow-grid-cols-2 flow-gap-2\">\n                {Object.entries(nft.traits)\n                  .slice(0, 4)\n                  .map(([key, value]) => (\n                    <div\n                      key={key}\n                      className={twMerge(\n                        \"flow-px-3 flow-py-2 flow-rounded-lg flow-border\",\n                        colors.muted,\n                        colors.border\n                      )}\n                    >\n                      <p\n                        className={twMerge(\n                          \"flow-text-xs flow-truncate flow-mb-0.5\",\n                          colors.mutedForeground\n                        )}\n                      >\n                        {key}\n                      </p>\n                      <p\n                        className={twMerge(\n                          \"flow-text-sm flow-font-semibold flow-truncate\",\n                          colors.foreground\n                        )}\n                      >\n                        {value}\n                      </p>\n                    </div>\n                  ))}\n                {totalTraits > 4 && (\n                  <Button\n                    variant=\"secondary\"\n                    onClick={() => setShowTraitsModal(true)}\n                    className=\"flow-col-span-2 flow-text-xs\"\n                  >\n                    Show all ({totalTraits}) traits\n                  </Button>\n                )}\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n\n      <Dialog\n        isOpen={showTraitsModal}\n        onClose={() => setShowTraitsModal(false)}\n        title={`NFT #${tokenId} Traits`}\n      >\n        <div\n          className=\"flow-overflow-y-auto flow-pr-2\"\n          style={{\n            maxHeight: totalTraits > 6 ? \"70vh\" : \"auto\",\n          }}\n        >\n          <div className=\"flow-grid flow-grid-cols-2 flow-gap-3\">\n            {!hasError &&\n              nft.traits &&\n              Object.entries(nft.traits).map(([key, value]) => (\n                <div\n                  key={key}\n                  className={twMerge(\n                    \"flow-px-3 flow-py-2 flow-rounded-lg flow-border\",\n                    colors.muted,\n                    colors.border\n                  )}\n                >\n                  <p\n                    className={twMerge(\n                      \"flow-text-xs flow-truncate flow-mb-0.5\",\n                      colors.mutedForeground\n                    )}\n                  >\n                    {key}\n                  </p>\n                  <p\n                    className={twMerge(\n                      \"flow-text-sm flow-font-semibold flow-truncate\",\n                      colors.foreground\n                    )}\n                  >\n                    {value}\n                  </p>\n                </div>\n              ))}\n          </div>\n        </div>\n      </Dialog>\n    </StyleWrapper>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/Profile.tsx",
    "content": "import React, {useState, useEffect, useMemo} from \"react\"\nimport {\n  Listbox,\n  ListboxButton,\n  ListboxOption,\n  ListboxOptions,\n  Tab,\n  TabGroup,\n  TabList,\n  TabPanel,\n  TabPanels,\n} from \"@headlessui/react\"\nimport {sansPrefix} from \"@onflow/fcl\"\nimport {useFlowCurrentUser, truncateAddress} from \"@onflow/react-core\"\nimport {\n  useCrossVmTokenBalance,\n  UseCrossVmTokenBalanceData,\n} from \"@onflow/react-core\"\nimport {useFlowChainId} from \"@onflow/react-core\"\nimport {Button} from \"./internal/Button\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {UserIcon} from \"../icons/UserIcon\"\nimport {CopyIcon} from \"../icons/CopyIcon\"\nimport {LogOutIcon} from \"../icons/LogOutIcon\"\nimport {ExternalLinkIcon} from \"../icons/ExternalLink\"\nimport {ScheduledTransactionList} from \"./ScheduledTransactionList\"\nimport {CONTRACT_ADDRESSES, getFlowscanAccountUrl} from \"@onflow/react-core\"\nimport {twMerge} from \"tailwind-merge\"\nimport type {TokenConfig, ConnectModalConfig} from \"./Connect\"\nimport {useTheme} from \"../core/theme\"\n\ntype BalanceType = keyof UseCrossVmTokenBalanceData\n\nexport interface ProfileConfig extends ConnectModalConfig {}\n\ninterface ProfileProps {\n  onDisconnect?: () => void\n  balanceType?: BalanceType\n  balanceTokens?: TokenConfig[]\n  profileConfig?: ProfileConfig\n  className?: string\n  style?: React.CSSProperties\n}\n\nexport const Profile: React.FC<ProfileProps> = ({\n  onDisconnect,\n  balanceType = \"cadence\",\n  balanceTokens,\n  profileConfig = {},\n  className,\n  style,\n}) => {\n  const {user, unauthenticate} = useFlowCurrentUser()\n  const [copied, setCopied] = useState(false)\n  const {data: chainId} = useFlowChainId()\n  const {colors} = useTheme()\n\n  // Default token configuration for FlowToken - memoized to avoid recreation\n  const defaultTokens: TokenConfig[] = useMemo(() => {\n    if (!chainId) return []\n\n    const getFlowTokenAddress = () => {\n      if (chainId === \"emulator\" || chainId === \"local\")\n        return CONTRACT_ADDRESSES.local.FlowToken\n      return chainId === \"testnet\"\n        ? CONTRACT_ADDRESSES.testnet.FlowToken\n        : CONTRACT_ADDRESSES.mainnet.FlowToken\n    }\n\n    const address = sansPrefix(getFlowTokenAddress())\n    return [\n      {\n        symbol: \"FLOW\",\n        name: \"Flow Token\",\n        vaultIdentifier: `A.${address}.FlowToken.Vault`,\n      },\n    ]\n  }, [chainId])\n\n  // Use provided tokens or default to FLOW - memoized to avoid recreation\n  const availableTokens = useMemo(\n    () =>\n      balanceTokens && balanceTokens.length > 0 ? balanceTokens : defaultTokens,\n    [balanceTokens, defaultTokens]\n  )\n\n  // Initialize with first token, but will update when availableTokens changes\n  const [selectedToken, setSelectedToken] = useState<TokenConfig>(\n    availableTokens[0] || defaultTokens[0]\n  )\n\n  // Update selectedToken when availableTokens changes (when chainId loads or balanceTokens prop changes)\n  useEffect(() => {\n    setSelectedToken((prev: any) => {\n      // If no tokens available yet, return undefined\n      if (!availableTokens || availableTokens.length === 0) return undefined\n      // If prev is undefined (first load), return first available token\n      if (!prev) return availableTokens[0]\n\n      // Find the same token in the new list (match by symbol)\n      const updatedToken = availableTokens.find(t => t.symbol === prev.symbol)\n\n      // If the token is no longer in the list, switch to first token\n      if (!updatedToken) {\n        return availableTokens[0]\n      }\n\n      // If we found the same token but it now has more data (chainId loaded), use the updated version\n      if (\n        (!prev.vaultIdentifier && updatedToken.vaultIdentifier) ||\n        (!prev.erc20Address && updatedToken.erc20Address)\n      ) {\n        return updatedToken\n      }\n\n      // Keep the current selection if nothing changed\n      return prev\n    })\n  }, [availableTokens])\n\n  const showScheduledTransactions =\n    profileConfig.scheduledTransactions?.show ?? false\n\n  const {data: balanceData} = useCrossVmTokenBalance({\n    owner: user?.addr,\n    vaultIdentifier: selectedToken?.vaultIdentifier,\n    erc20Address: selectedToken?.erc20Address,\n    query: {\n      enabled:\n        !!user?.addr &&\n        !!chainId &&\n        !!selectedToken &&\n        (!!selectedToken?.vaultIdentifier || !!selectedToken?.erc20Address),\n    },\n  })\n\n  const displayAddress =\n    user?.loggedIn && user.addr ? truncateAddress(user.addr) : \"\"\n\n  const flowscanUrl = getFlowscanAccountUrl(user?.addr || \"\", chainId)\n\n  // Get balance for the selected type\n  const displayBalance =\n    balanceData &&\n    typeof balanceData !== \"string\" &&\n    balanceData[balanceType]?.formatted\n      ? Number(balanceData[balanceType].formatted).toLocaleString(undefined, {\n          maximumFractionDigits: 4,\n          minimumFractionDigits: 0,\n        })\n      : \"0\"\n\n  const handleCopy = async () => {\n    if (\n      user?.addr &&\n      typeof window !== \"undefined\" &&\n      window.navigator.clipboard\n    ) {\n      await window.navigator.clipboard.writeText(user.addr)\n      setCopied(true)\n      setTimeout(() => setCopied(false), 1500)\n    }\n  }\n\n  const handleDisconnect = () => {\n    unauthenticate()\n    onDisconnect?.()\n  }\n\n  // Not connected state - compact design\n  if (!user?.loggedIn) {\n    return (\n      <StyleWrapper>\n        <div\n          className={twMerge(\n            \"flow-w-full flow-h-full flow-flex flow-flex-col\",\n            className\n          )}\n          style={style}\n        >\n          <div\n            className=\"flow-flex flow-flex-col flow-items-center flow-justify-center flow-gap-3\n              flow-py-12\"\n          >\n            <div\n              className={twMerge(\n                `flow-w-16 flow-h-16 flow-rounded-full flow-flex flow-items-center\n                flow-justify-center`,\n                colors.muted\n              )}\n            >\n              <UserIcon\n                className={twMerge(\"flow-w-8 flow-h-8\", colors.mutedForeground)}\n              />\n            </div>\n            <p\n              className={twMerge(\n                \"flow-text-sm flow-font-medium\",\n                colors.mutedForeground\n              )}\n            >\n              No connected wallet\n            </p>\n          </div>\n        </div>\n      </StyleWrapper>\n    )\n  }\n\n  // Connected state - full profile\n  return (\n    <StyleWrapper>\n      <div\n        className={twMerge(\n          \"flow-w-full flow-h-full flow-flex flow-flex-col\",\n          className\n        )}\n        style={style}\n      >\n        <div className=\"flow-flex flow-flex-col flow-gap-4\">\n          <div className=\"flow-flex flow-flex-col flow-items-center\">\n            <div\n              className={twMerge(\n                `flow-w-16 flow-h-16 flow-rounded-full flow-flex flow-items-center\n                flow-justify-center flow-mb-3`,\n                colors.muted\n              )}\n            >\n              <UserIcon\n                className={twMerge(\"flow-w-8 flow-h-8\", colors.foreground)}\n              />\n            </div>\n            <div className=\"flow-flex flow-items-center flow-gap-2\">\n              <div\n                className={twMerge(\n                  \"flow-text-base flow-font-medium\",\n                  colors.foreground\n                )}\n              >\n                {displayAddress}\n              </div>\n              {flowscanUrl && (\n                <a\n                  href={flowscanUrl}\n                  target=\"_blank\"\n                  rel=\"noopener noreferrer\"\n                  className={twMerge(\n                    \"flow-transition-colors hover:flow-opacity-80\",\n                    colors.mutedForeground\n                  )}\n                  title=\"View on Flowscan\"\n                >\n                  <ExternalLinkIcon className=\"flow-w-4 flow-h-4\" />\n                </a>\n              )}\n            </div>\n          </div>\n\n          {showScheduledTransactions ? (\n            <TabGroup>\n              <TabList\n                className={twMerge(\n                  \"flow-flex flow-gap-6 flow-border-b\",\n                  colors.border\n                )}\n              >\n                <Tab\n                  className={twMerge(\n                    \"flow-relative flow-py-3 flow-px-1 flow-text-sm flow-font-medium\",\n                    \"hover:flow-opacity-80 focus:flow-outline-none flow-transition-colors\",\n                    colors.mutedForeground\n                  )}\n                >\n                  {({selected}) => (\n                    <>\n                      <span className={selected ? colors.foreground : \"\"}>\n                        Home\n                      </span>\n                      {selected && (\n                        <div\n                          className={twMerge(\n                            \"flow-absolute flow-bottom-0 flow-left-0 flow-right-0 flow-h-0.5\",\n                            colors.primary\n                          )}\n                        />\n                      )}\n                    </>\n                  )}\n                </Tab>\n                <Tab\n                  className={twMerge(\n                    \"flow-relative flow-py-3 flow-px-1 flow-text-sm flow-font-medium\",\n                    \"hover:flow-opacity-80 focus:flow-outline-none flow-transition-colors\",\n                    colors.mutedForeground\n                  )}\n                >\n                  {({selected}) => (\n                    <>\n                      <span className={selected ? colors.foreground : \"\"}>\n                        Scheduled Transactions\n                      </span>\n                      {selected && (\n                        <div\n                          className={twMerge(\n                            \"flow-absolute flow-bottom-0 flow-left-0 flow-right-0 flow-h-0.5\",\n                            colors.primary\n                          )}\n                        />\n                      )}\n                    </>\n                  )}\n                </Tab>\n              </TabList>\n\n              <TabPanels>\n                <TabPanel className=\"flow-pt-4 focus:flow-outline-none\">\n                  <div className=\"flow-w-full flow-space-y-3\">\n                    <div className=\"flow-flex flow-items-stretch flow-gap-3\">\n                      {availableTokens.length > 1 && (\n                        <div\n                          className=\"flow-flex-shrink-0\"\n                          style={{minWidth: \"140px\"}}\n                        >\n                          <Listbox\n                            value={selectedToken}\n                            onChange={setSelectedToken}\n                          >\n                            {({open}) => (\n                              <div className=\"flow-relative flow-h-full\">\n                                <ListboxButton\n                                  className={twMerge(\n                                    \"flow-relative flow-w-full flow-h-full flow-cursor-pointer flow-rounded-md\",\n                                    \"flow-py-2.5 flow-px-3 flow-text-left flow-border\",\n                                    \"hover:flow-opacity-80 focus:flow-outline-none flow-transition-colors\",\n                                    colors.background,\n                                    colors.border\n                                  )}\n                                >\n                                  <div className=\"flow-flex flow-flex-col flow-justify-center flow-h-full\">\n                                    <span\n                                      className={twMerge(\n                                        \"flow-text-xs flow-font-medium flow-mb-1\",\n                                        colors.mutedForeground\n                                      )}\n                                    >\n                                      Token\n                                    </span>\n                                    <div className=\"flow-flex flow-items-center flow-justify-between flow-gap-2\">\n                                      <span\n                                        className={twMerge(\n                                          \"flow-text-sm flow-font-semibold flow-truncate\",\n                                          colors.foreground\n                                        )}\n                                      >\n                                        {selectedToken?.symbol}\n                                      </span>\n                                      <svg\n                                        className={twMerge(\n                                          \"flow-h-4 flow-w-4 flow-flex-shrink-0\",\n                                          colors.mutedForeground\n                                        )}\n                                        viewBox=\"0 0 20 20\"\n                                        fill=\"currentColor\"\n                                      >\n                                        <path\n                                          fillRule=\"evenodd\"\n                                          d=\"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z\"\n                                          clipRule=\"evenodd\"\n                                        />\n                                      </svg>\n                                    </div>\n                                  </div>\n                                </ListboxButton>\n                                {open && (\n                                  <ListboxOptions\n                                    static\n                                    className={twMerge(\n                                      \"flow-absolute flow-z-10 flow-mt-2 flow-w-48 flow-overflow-auto flow-rounded-md\",\n                                      \"flow-py-2 flow-border focus:flow-outline-none flow-max-h-64\",\n                                      colors.background,\n                                      colors.border\n                                    )}\n                                  >\n                                    {availableTokens.map(\n                                      (token: TokenConfig) => (\n                                        <ListboxOption\n                                          key={token.symbol}\n                                          value={token}\n                                          className={twMerge(\n                                            \"flow-relative flow-cursor-pointer flow-select-none flow-py-2.5 flow-px-4\",\n                                            \"data-[focus]:flow-opacity-80 flow-transition-colors\",\n                                            colors.foreground\n                                          )}\n                                        >\n                                          {({selected}) => (\n                                            <div className=\"flow-flex flow-items-center flow-justify-between\">\n                                              <div>\n                                                <div\n                                                  className={`flow-text-sm ${selected ? \"flow-font-semibold\" : \"flow-font-medium\"}`}\n                                                >\n                                                  {token.name}\n                                                </div>\n                                                <div\n                                                  className={twMerge(\n                                                    \"flow-text-xs flow-mt-0.5\",\n                                                    colors.mutedForeground\n                                                  )}\n                                                >\n                                                  {token.symbol}\n                                                </div>\n                                              </div>\n                                              {selected && (\n                                                <svg\n                                                  className={twMerge(\n                                                    \"flow-h-5 flow-w-5\",\n                                                    colors.foreground\n                                                  )}\n                                                  viewBox=\"0 0 20 20\"\n                                                  fill=\"currentColor\"\n                                                >\n                                                  <path\n                                                    fillRule=\"evenodd\"\n                                                    d=\"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z\"\n                                                    clipRule=\"evenodd\"\n                                                  />\n                                                </svg>\n                                              )}\n                                            </div>\n                                          )}\n                                        </ListboxOption>\n                                      )\n                                    )}\n                                  </ListboxOptions>\n                                )}\n                              </div>\n                            )}\n                          </Listbox>\n                        </div>\n                      )}\n\n                      <div\n                        className={twMerge(\n                          \"flow-flex-1 flow-rounded-md flow-border flow-px-4 flow-py-2.5\",\n                          colors.muted,\n                          colors.border\n                        )}\n                      >\n                        <div\n                          className={twMerge(\n                            \"flow-text-xs flow-font-medium flow-mb-1\",\n                            colors.mutedForeground\n                          )}\n                        >\n                          Balance\n                        </div>\n                        <div\n                          className={twMerge(\n                            \"flow-text-xl flow-font-semibold flow-leading-tight\",\n                            colors.foreground\n                          )}\n                        >\n                          {displayBalance}{\" \"}\n                          <span\n                            className={twMerge(\n                              \"flow-text-sm flow-font-medium\",\n                              colors.mutedForeground\n                            )}\n                          >\n                            {selectedToken?.symbol}\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n                  </div>\n\n                  <div className=\"flow-flex flow-gap-3 flow-w-full flow-mt-6\">\n                    <Button\n                      variant=\"outline\"\n                      className=\"flow-flex-1 flow-flex flow-items-center flow-justify-center flow-text-sm\"\n                      onClick={handleCopy}\n                      disabled={copied}\n                    >\n                      {copied ? (\n                        <>\n                          <span className=\"flow-mr-2 flow-h-4 flow-w-4\">✓</span>\n                          Copied!\n                        </>\n                      ) : (\n                        <>\n                          <CopyIcon className=\"flow-mr-2 flow-h-4 flow-w-4\" />\n                          Copy Address\n                        </>\n                      )}\n                    </Button>\n                    <Button\n                      variant=\"outline\"\n                      className=\"flow-flex-1 flow-flex flow-items-center flow-justify-center flow-text-sm\"\n                      onClick={handleDisconnect}\n                    >\n                      <LogOutIcon className=\"flow-mr-2 flow-h-4 flow-w-4\" />\n                      Disconnect\n                    </Button>\n                  </div>\n                </TabPanel>\n\n                <TabPanel className=\"flow-pt-4 focus:flow-outline-none\">\n                  <div\n                    className=\"flow-overflow-y-auto flow-pr-2\"\n                    style={{maxHeight: \"250px\", minHeight: \"100px\"}}\n                  >\n                    <ScheduledTransactionList\n                      address={user.addr || \"\"}\n                      filterHandlerTypes={\n                        profileConfig.scheduledTransactions?.filterHandlerTypes\n                      }\n                    />\n                  </div>\n                </TabPanel>\n              </TabPanels>\n            </TabGroup>\n          ) : (\n            <>\n              <div className=\"flow-w-full flow-space-y-3\">\n                <div className=\"flow-flex flow-items-stretch flow-gap-3\">\n                  {availableTokens.length > 1 && (\n                    <div\n                      className=\"flow-flex-shrink-0\"\n                      style={{minWidth: \"140px\"}}\n                    >\n                      <Listbox\n                        value={selectedToken}\n                        onChange={setSelectedToken}\n                      >\n                        {({open}) => (\n                          <div className=\"flow-relative flow-h-full\">\n                            <ListboxButton\n                              className={twMerge(\n                                \"flow-relative flow-w-full flow-h-full flow-cursor-pointer flow-rounded-md\",\n                                \"flow-py-2.5 flow-px-3 flow-text-left flow-border\",\n                                \"hover:flow-opacity-80 focus:flow-outline-none flow-transition-colors\",\n                                colors.background,\n                                colors.border\n                              )}\n                            >\n                              <div className=\"flow-flex flow-flex-col flow-justify-center flow-h-full\">\n                                <span\n                                  className={twMerge(\n                                    \"flow-text-xs flow-font-medium flow-mb-1\",\n                                    colors.mutedForeground\n                                  )}\n                                >\n                                  Token\n                                </span>\n                                <div className=\"flow-flex flow-items-center flow-justify-between flow-gap-2\">\n                                  <span\n                                    className={twMerge(\n                                      \"flow-text-sm flow-font-semibold flow-truncate\",\n                                      colors.foreground\n                                    )}\n                                  >\n                                    {selectedToken?.symbol}\n                                  </span>\n                                  <svg\n                                    className={twMerge(\n                                      \"flow-h-4 flow-w-4 flow-flex-shrink-0\",\n                                      colors.mutedForeground\n                                    )}\n                                    viewBox=\"0 0 20 20\"\n                                    fill=\"currentColor\"\n                                  >\n                                    <path\n                                      fillRule=\"evenodd\"\n                                      d=\"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z\"\n                                      clipRule=\"evenodd\"\n                                    />\n                                  </svg>\n                                </div>\n                              </div>\n                            </ListboxButton>\n                            {open && (\n                              <ListboxOptions\n                                static\n                                className={twMerge(\n                                  \"flow-absolute flow-z-10 flow-mt-2 flow-w-48 flow-overflow-auto flow-rounded-md\",\n                                  \"flow-py-2 flow-border focus:flow-outline-none flow-max-h-64\",\n                                  colors.background,\n                                  colors.border\n                                )}\n                              >\n                                {availableTokens.map((token: TokenConfig) => (\n                                  <ListboxOption\n                                    key={token.symbol}\n                                    value={token}\n                                    className={twMerge(\n                                      \"flow-relative flow-cursor-pointer flow-select-none flow-py-2.5 flow-px-4\",\n                                      \"data-[focus]:flow-opacity-80 flow-transition-colors\",\n                                      colors.foreground\n                                    )}\n                                  >\n                                    {({selected}) => (\n                                      <div className=\"flow-flex flow-items-center flow-justify-between\">\n                                        <div>\n                                          <div\n                                            className={`flow-text-sm ${selected ? \"flow-font-semibold\" : \"flow-font-medium\"}`}\n                                          >\n                                            {token.name}\n                                          </div>\n                                          <div\n                                            className={twMerge(\n                                              \"flow-text-xs flow-mt-0.5\",\n                                              colors.mutedForeground\n                                            )}\n                                          >\n                                            {token.symbol}\n                                          </div>\n                                        </div>\n                                        {selected && (\n                                          <svg\n                                            className={twMerge(\n                                              \"flow-h-5 flow-w-5\",\n                                              colors.foreground\n                                            )}\n                                            viewBox=\"0 0 20 20\"\n                                            fill=\"currentColor\"\n                                          >\n                                            <path\n                                              fillRule=\"evenodd\"\n                                              d=\"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z\"\n                                              clipRule=\"evenodd\"\n                                            />\n                                          </svg>\n                                        )}\n                                      </div>\n                                    )}\n                                  </ListboxOption>\n                                ))}\n                              </ListboxOptions>\n                            )}\n                          </div>\n                        )}\n                      </Listbox>\n                    </div>\n                  )}\n\n                  <div\n                    className={twMerge(\n                      \"flow-flex-1 flow-rounded-md flow-border flow-px-4 flow-py-2.5\",\n                      colors.muted,\n                      colors.border\n                    )}\n                  >\n                    <div\n                      className={twMerge(\n                        \"flow-text-xs flow-font-medium flow-mb-1\",\n                        colors.mutedForeground\n                      )}\n                    >\n                      Balance\n                    </div>\n                    <div\n                      className={twMerge(\n                        \"flow-text-xl flow-font-semibold flow-leading-tight\",\n                        colors.foreground\n                      )}\n                    >\n                      {displayBalance}{\" \"}\n                      <span\n                        className={twMerge(\n                          \"flow-text-sm flow-font-medium\",\n                          colors.mutedForeground\n                        )}\n                      >\n                        {selectedToken?.symbol}\n                      </span>\n                    </div>\n                  </div>\n                </div>\n              </div>\n\n              <div className=\"flow-flex flow-gap-3 flow-w-full flow-mt-6\">\n                <Button\n                  variant=\"outline\"\n                  className=\"flow-flex-1 flow-flex flow-items-center flow-justify-center flow-text-sm\"\n                  onClick={handleCopy}\n                  disabled={copied}\n                >\n                  {copied ? (\n                    <>\n                      <span className=\"flow-mr-2 flow-h-4 flow-w-4\">✓</span>\n                      Copied!\n                    </>\n                  ) : (\n                    <>\n                      <CopyIcon className=\"flow-mr-2 flow-h-4 flow-w-4\" />\n                      Copy Address\n                    </>\n                  )}\n                </Button>\n                <Button\n                  variant=\"outline\"\n                  className=\"flow-flex-1 flow-flex flow-items-center flow-justify-center flow-text-sm\"\n                  onClick={handleDisconnect}\n                >\n                  <LogOutIcon className=\"flow-mr-2 flow-h-4 flow-w-4\" />\n                  Disconnect\n                </Button>\n              </div>\n            </>\n          )}\n        </div>\n      </div>\n    </StyleWrapper>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/ScheduledTransactionList.tsx",
    "content": "import React from \"react\"\nimport {\n  useFlowScheduledTransactionList,\n  UseFlowScheduledTransactionListArgs,\n  ScheduledTransaction,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"@onflow/react-core\"\nimport {useFlowScheduledTransactionCancel} from \"@onflow/react-core\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {AlertCircleIcon} from \"../icons/AlertCircleIcon\"\nimport {LoaderCircleIcon} from \"../icons/LoaderCircleIcon\"\nimport {TrashIcon} from \"../icons/TrashIcon\"\nimport {FlowIcon} from \"../icons/FlowIcon\"\nimport {ExternalLinkIcon} from \"../icons/ExternalLink\"\nimport {twMerge} from \"tailwind-merge\"\nimport {useTheme} from \"../core/theme\"\nimport {useFlowQueryClient} from \"@onflow/react-core\"\nimport {useFlowChainId} from \"@onflow/react-core\"\nimport {getFlowscanScheduledTxUrl} from \"@onflow/react-core\"\n\nconst getPriorityLabel = (priority: ScheduledTransactionPriority): string => {\n  switch (priority) {\n    case ScheduledTransactionPriority.Low:\n      return \"Low\"\n    case ScheduledTransactionPriority.Medium:\n      return \"Medium\"\n    case ScheduledTransactionPriority.High:\n      return \"High\"\n    default:\n      return \"Unknown\"\n  }\n}\n\nconst getPriorityColor = (priority: ScheduledTransactionPriority): string => {\n  switch (priority) {\n    case ScheduledTransactionPriority.Low:\n      return \"flow-bg-slate-100 dark:flow-bg-slate-800 flow-text-slate-700 dark:flow-text-slate-300\"\n    case ScheduledTransactionPriority.Medium:\n      return \"flow-bg-yellow-100 dark:flow-bg-yellow-900/30 flow-text-yellow-700 dark:flow-text-yellow-400\"\n    case ScheduledTransactionPriority.High:\n      return \"flow-bg-red-100 dark:flow-bg-red-900/30 flow-text-red-700 dark:flow-text-red-400\"\n    default:\n      return \"flow-bg-slate-100 dark:flow-bg-slate-800 flow-text-slate-700 dark:flow-text-slate-300\"\n  }\n}\n\nconst formatTimestamp = (timestamp: number): string => {\n  const date = new Date(timestamp * 1000)\n  return date.toLocaleString(undefined, {\n    year: \"numeric\",\n    month: \"short\",\n    day: \"numeric\",\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n  })\n}\n\nconst getThumbnailUrl = (thumbnail: any): string => {\n  if (!thumbnail) return \"\"\n  if (thumbnail.url) return thumbnail.url\n  if (thumbnail.cid)\n    return `https://ipfs.io/ipfs/${thumbnail.cid}${thumbnail.path || \"\"}`\n  return \"\"\n}\n\nconst extractMetadataDisplay = (handlerResolvedViews?: {\n  [viewType: string]: any\n}): {\n  name?: string\n  description?: string\n  thumbnail?: string\n} => {\n  if (!handlerResolvedViews) return {}\n\n  // Find MetadataViews.Display - match the full type name\n  const displayView = Object.entries(handlerResolvedViews).find(([key]) =>\n    key.includes(\"MetadataViews.Display\")\n  )\n\n  if (displayView && displayView[1]) {\n    const view = displayView[1]\n    const thumbnailUrl = getThumbnailUrl(view.thumbnail)\n\n    return {\n      name: view.name || undefined,\n      description: view.description || undefined,\n      thumbnail: thumbnailUrl || undefined,\n    }\n  }\n\n  return {}\n}\n\ninterface ScheduledTransactionCardProps {\n  transaction: ScheduledTransaction\n  cancelEnabled?: boolean\n  onCancelSuccess?: () => void\n  className?: string\n}\n\nconst ScheduledTransactionCard: React.FC<ScheduledTransactionCardProps> = ({\n  transaction,\n  cancelEnabled = true,\n  onCancelSuccess,\n  className,\n}) => {\n  const {colors} = useTheme()\n  const {cancelTransactionAsync, isPending} =\n    useFlowScheduledTransactionCancel()\n  const {data: chainId} = useFlowChainId()\n\n  const metadata = extractMetadataDisplay(transaction.handlerResolvedViews)\n\n  const handleCancel = async () => {\n    try {\n      await cancelTransactionAsync(transaction.id)\n      onCancelSuccess?.()\n    } catch (error) {\n      console.error(\"Failed to cancel transaction:\", error)\n    }\n  }\n\n  const canCancel =\n    cancelEnabled &&\n    (transaction.status === ScheduledTransactionStatus.Pending ||\n      transaction.status === ScheduledTransactionStatus.Processing)\n\n  return (\n    <div\n      className={twMerge(\n        \"flow-w-full flow-rounded-lg flow-relative flow-group\",\n        colors.background,\n        \"flow-border\",\n        colors.border,\n        \"flow-transition-colors flow-duration-200\",\n        className\n      )}\n    >\n      <div className=\"flow-flex flow-items-start flow-gap-2 sm:flow-gap-3 flow-p-2 sm:flow-p-3\">\n        {metadata.thumbnail && (\n          <div\n            className={twMerge(\n              `max-sm:flow-hidden flow-flex-shrink-0 flow-w-16 flow-h-16 flow-rounded\n              flow-overflow-hidden`,\n              colors.muted\n            )}\n          >\n            <img\n              src={metadata.thumbnail}\n              alt={metadata.name || \"Transaction\"}\n              className=\"flow-w-full flow-h-full flow-object-cover\"\n            />\n          </div>\n        )}\n\n        <div className=\"flow-flex-1 flow-min-w-0 flow-pr-10 sm:flow-pr-12\">\n          <div className=\"flow-flex flow-items-center flow-gap-2 flow-mb-0.5 flow-flex-wrap\">\n            <h3\n              className={twMerge(\n                \"flow-text-sm flow-font-semibold flow-truncate flow-flex-shrink flow-min-w-0\",\n                colors.foreground\n              )}\n              title={metadata.name || \"Scheduled Transaction\"}\n            >\n              {metadata.name || \"Scheduled Transaction\"}\n            </h3>\n            <span\n              className={twMerge(\n                \"flow-text-xs flow-font-mono flow-flex-shrink-0\",\n                colors.mutedForeground\n              )}\n              title={`Transaction ID: ${transaction.id}`}\n            >\n              #{transaction.id.slice(0, 8)}\n            </span>\n          </div>\n\n          {metadata.description && (\n            <p\n              className={twMerge(\n                \"flow-text-xs flow-truncate flow-mb-2\",\n                colors.mutedForeground\n              )}\n              title={metadata.description}\n            >\n              {metadata.description}\n            </p>\n          )}\n\n          <div\n            className={twMerge(\n              `flow-flex flow-items-center flow-flex-wrap flow-gap-2 sm:flow-gap-2.5\n              flow-text-[10px] flow-mt-2`,\n              colors.mutedForeground\n            )}\n          >\n            <div\n              className={twMerge(\n                \"flow-inline-flex flow-items-center flow-gap-1 flow-px-2 flow-py-0.5\",\n                \"flow-rounded-full flow-font-semibold\",\n                getPriorityColor(transaction.priority)\n              )}\n              title=\"Priority\"\n            >\n              <span\n                className={twMerge(\n                  \"flow-w-1.5 flow-h-1.5 flow-rounded-full\",\n                  transaction.priority === ScheduledTransactionPriority.High\n                    ? \"flow-bg-red-500 dark:flow-bg-red-400\"\n                    : transaction.priority ===\n                        ScheduledTransactionPriority.Medium\n                      ? \"flow-bg-yellow-500 dark:flow-bg-yellow-400\"\n                      : \"flow-bg-slate-400 dark:flow-bg-slate-500\"\n                )}\n              />\n              {getPriorityLabel(transaction.priority)}\n            </div>\n\n            <div\n              className=\"flow-flex flow-items-center flow-gap-1\"\n              title=\"Scheduled time\"\n            >\n              <svg\n                className=\"flow-h-3.5 flow-w-3.5\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={2}\n                  d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"\n                />\n              </svg>\n              <span className=\"flow-font-medium\">\n                {formatTimestamp(transaction.scheduledTimestamp)}\n              </span>\n            </div>\n\n            <div\n              className=\"flow-flex flow-items-center flow-gap-1\"\n              title=\"Execution effort\"\n            >\n              <svg\n                className=\"flow-h-3.5 flow-w-3.5\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeWidth={2}\n                  d=\"M13 10V3L4 14h7v7l9-11h-7z\"\n                />\n              </svg>\n              <span className=\"flow-font-medium\">\n                {transaction.executionEffort.toString()}\n              </span>\n            </div>\n\n            <div className=\"flow-flex flow-items-center flow-gap-1\" title=\"Fee\">\n              <FlowIcon className=\"flow-h-3.5 flow-w-3.5\" />\n              <span className=\"flow-font-medium\">\n                {transaction.fees.formatted}\n              </span>\n            </div>\n          </div>\n        </div>\n\n        <div\n          className=\"flow-absolute flow-right-2 sm:flow-right-2 flow-top-2 sm:flow-top-3 flow-flex\n            flow-flex-col flow-items-end flow-gap-1\"\n        >\n          {canCancel && (\n            <div\n              className=\"flow-opacity-0 group-hover:flow-opacity-100 flow-transition-opacity\"\n              title={isPending ? \"Cancelling...\" : \"Cancel transaction\"}\n            >\n              <button\n                onClick={handleCancel}\n                disabled={isPending}\n                className={twMerge(\n                  \"flow-h-6 flow-w-6 flow-p-0 flow-rounded-full flow-flex flow-items-center\",\n                  \"flow-justify-center flow-bg-transparent flow-border\",\n                  colors.border,\n                  \"hover:flow-border-red-500 dark:hover:flow-border-red-500\",\n                  \"flow-transition-colors disabled:flow-opacity-50 disabled:flow-cursor-not-allowed\"\n                )}\n              >\n                {isPending ? (\n                  <LoaderCircleIcon className=\"flow-h-3 flow-w-3 flow-text-red-500 flow-animate-spin\" />\n                ) : (\n                  <TrashIcon className=\"flow-h-3 flow-w-3 flow-text-red-500\" />\n                )}\n              </button>\n            </div>\n          )}\n\n          <a\n            href={getFlowscanScheduledTxUrl(transaction.id, chainId) || \"#\"}\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            className={twMerge(\n              \"flow-h-6 flow-w-6 flow-p-0 flow-rounded-full flow-flex flow-items-center\",\n              \"flow-justify-center flow-transition-colors\",\n              colors.mutedForeground\n            )}\n            title=\"View on Flowscan\"\n          >\n            <ExternalLinkIcon className=\"flow-h-3.5 flow-w-3.5\" />\n          </a>\n        </div>\n      </div>\n    </div>\n  )\n}\n\ninterface ScheduledTransactionListProps {\n  address: string\n  filterHandlerTypes?: string[]\n  cancelEnabled?: boolean\n  className?: string\n  style?: React.CSSProperties\n  flowClient?: UseFlowScheduledTransactionListArgs[\"flowClient\"]\n}\n\nexport const ScheduledTransactionList: React.FC<\n  ScheduledTransactionListProps\n> = ({\n  address,\n  filterHandlerTypes,\n  cancelEnabled = true,\n  className,\n  style,\n  flowClient,\n}) => {\n  const {colors} = useTheme()\n  const queryClient = useFlowQueryClient()\n\n  const {\n    data: transactions,\n    isLoading,\n    error,\n    refetch,\n  } = useFlowScheduledTransactionList({\n    account: address,\n    includeHandlerData: true,\n    flowClient,\n  })\n\n  const handleCancelSuccess = () => {\n    queryClient.invalidateQueries({\n      queryKey: [\"flowQuery\"],\n      exact: false,\n    })\n    refetch()\n  }\n\n  const filteredTransactions =\n    filterHandlerTypes && transactions\n      ? transactions.filter(tx =>\n          filterHandlerTypes.includes(tx.handlerTypeIdentifier)\n        )\n      : transactions\n\n  const sortedTransactions = filteredTransactions\n    ? [...filteredTransactions].sort((a, b) => {\n        if (a.scheduledTimestamp !== b.scheduledTimestamp) {\n          return a.scheduledTimestamp - b.scheduledTimestamp\n        }\n        return b.priority - a.priority\n      })\n    : filteredTransactions\n\n  return (\n    <StyleWrapper>\n      <div\n        className={twMerge(\n          \"flow-w-full flow-h-full flow-flex flow-flex-col\",\n          className\n        )}\n        style={style}\n      >\n        <div className=\"flow-flex-1\">\n          {isLoading ? (\n            <div className=\"flow-space-y-2 flow-py-2\">\n              {[1, 2, 3].map(i => (\n                <div\n                  key={i}\n                  className={twMerge(\n                    \"flow-w-full flow-rounded-lg flow-relative flow-border flow-animate-pulse\",\n                    colors.muted,\n                    colors.border\n                  )}\n                >\n                  <div className=\"flow-flex flow-items-center flow-gap-3 flow-p-3\">\n                    <div\n                      className={twMerge(\n                        \"flow-flex-shrink-0 flow-w-12 flow-h-12 flow-rounded\",\n                        colors.muted\n                      )}\n                    ></div>\n                    <div className=\"flow-flex-1 flow-min-w-0 flow-space-y-2\">\n                      <div\n                        className={twMerge(\n                          \"flow-h-4 flow-rounded flow-w-1/3\",\n                          colors.muted\n                        )}\n                      ></div>\n                      <div\n                        className={twMerge(\n                          \"flow-h-3 flow-rounded flow-w-2/3\",\n                          colors.muted\n                        )}\n                      ></div>\n                    </div>\n                    <div\n                      className={twMerge(\n                        \"flow-h-8 flow-w-8 flow-rounded\",\n                        colors.muted\n                      )}\n                    ></div>\n                  </div>\n                </div>\n              ))}\n            </div>\n          ) : error ? (\n            <div\n              className=\"flow-flex flow-flex-col flow-items-center flow-justify-center flow-h-full\n                flow-gap-3 flow-py-12\"\n            >\n              <AlertCircleIcon\n                className={twMerge(\n                  \"flow-h-16 flow-w-16\",\n                  colors.mutedForeground\n                )}\n              />\n              <p\n                className={twMerge(\n                  \"flow-text-sm flow-font-medium\",\n                  colors.mutedForeground\n                )}\n              >\n                Failed to load scheduled transactions\n              </p>\n              <p\n                className={twMerge(\n                  \"flow-text-xs flow-max-w-md flow-text-center\",\n                  colors.mutedForeground\n                )}\n              >\n                An error occurred.\n              </p>\n            </div>\n          ) : !sortedTransactions || sortedTransactions.length === 0 ? (\n            <div\n              className=\"flow-flex flow-flex-col flow-items-center flow-justify-center flow-h-full\n                flow-gap-3 flow-py-12\"\n            >\n              <div\n                className={twMerge(\n                  `flow-h-16 flow-w-16 flow-rounded-full flow-flex flow-items-center\n                    flow-justify-center`,\n                  colors.muted\n                )}\n              >\n                <svg\n                  className={twMerge(\n                    \"flow-h-8 flow-w-8\",\n                    colors.mutedForeground\n                  )}\n                  fill=\"none\"\n                  viewBox=\"0 0 24 24\"\n                  stroke=\"currentColor\"\n                >\n                  <path\n                    strokeLinecap=\"round\"\n                    strokeLinejoin=\"round\"\n                    strokeWidth={2}\n                    d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01\"\n                  />\n                </svg>\n              </div>\n              <p\n                className={twMerge(\n                  \"flow-text-sm flow-font-medium\",\n                  colors.mutedForeground\n                )}\n              >\n                No scheduled transactions\n              </p>\n            </div>\n          ) : (\n            <div className=\"flow-space-y-2\">\n              {sortedTransactions.map(transaction => (\n                <ScheduledTransactionCard\n                  key={transaction.id}\n                  transaction={transaction}\n                  onCancelSuccess={handleCancelSuccess}\n                  cancelEnabled={cancelEnabled}\n                />\n              ))}\n            </div>\n          )}\n        </div>\n      </div>\n    </StyleWrapper>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/TransactionButton.tsx",
    "content": "import React from \"react\"\nimport {useFlowMutate} from \"@onflow/react-core\"\nimport {Button, ButtonProps} from \"./internal/Button\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {UseMutationOptions} from \"@tanstack/react-query\"\nimport {type mutate} from \"@onflow/fcl\"\nimport {useGlobalTransaction} from \"@onflow/react-core\"\n\ninterface TransactionButtonProps\n  extends Omit<ButtonProps, \"onClick\" | \"children\"> {\n  /**\n   * Transaction to execute when the button is clicked.\n   * This should be a valid Flow transaction object that can be passed to `fcl.mutate`.\n   * It can include Cadence code, arguments, and other transaction parameters.\n   */\n  transaction: Parameters<typeof mutate>[0]\n  /**\n   * Optional label for the button.\n   * If not provided, the button will display a default label based on the transaction type.\n   */\n  label?: string\n  /**\n   * Optional TanStack React Query mutation options.\n   * This allows you to customize the mutation behavior, such as retry logic,\n   * error handling, and more.\n   */\n  mutation?: UseMutationOptions<string, Error, Parameters<typeof mutate>[0]>\n}\n\nexport const TransactionButton: React.FC<TransactionButtonProps> = ({\n  variant = \"primary\",\n  label,\n  transaction,\n  mutation,\n  ...buttonProps\n}) => {\n  // Get global transaction state\n  const {setGlobalTxId, globalTxId} = useGlobalTransaction()\n\n  // Standalone mutation for when not in transaction context\n  const {mutate: sendTransaction, isPending} = useFlowMutate({\n    mutation: {\n      ...mutation,\n      onSuccess: (data, variables, context) => {\n        // Set the global transaction ID when the transaction is successfully sent\n        setGlobalTxId(data)\n\n        // Call the original onSuccess handler if provided\n        mutation?.onSuccess?.(data, variables, context)\n      },\n    },\n  })\n\n  const handleButtonClick = async () => {\n    sendTransaction(transaction)\n  }\n\n  // Determine loading state, pending during signature OR during transaction execution\n  const isLoading = isPending || !!globalTxId\n\n  // Button is disabled if: explicitly disabled, currently loading, or any global transaction is running\n  const isDisabled = buttonProps.disabled || isLoading\n\n  return (\n    <StyleWrapper>\n      <Button\n        onClick={handleButtonClick}\n        disabled={isDisabled}\n        {...buttonProps}\n      >\n        <span>\n          {!isLoading\n            ? label || \"Execute Transaction\"\n            : isPending\n              ? \"Waiting for signature...\"\n              : \"Processing...\"}\n        </span>\n      </Button>\n    </StyleWrapper>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/TransactionDialog.tsx",
    "content": "import React, {useEffect} from \"react\"\nimport {twMerge} from \"tailwind-merge\"\nimport {Dialog} from \"./internal/Dialog\"\nimport {Button} from \"./internal/Button\"\nimport {TransactionLink} from \"./TransactionLink\"\nimport {LoaderCircleIcon} from \"../icons/LoaderCircleIcon\"\nimport {CircleCheckIcon} from \"../icons/CircleCheckIcon\"\nimport {useFlowTransactionStatus} from \"@onflow/react-core\"\nimport {useTheme} from \"../core/theme\"\n\ninterface TransactionDialogProps {\n  open: boolean\n  onOpenChange: (open: boolean) => void\n  /** The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string) to monitor */\n  txId?: string\n  onSuccess?: () => void\n  pendingTitle?: string\n  pendingDescription?: string\n  successTitle?: string\n  successDescription?: string\n  closeOnSuccess?: boolean\n}\n\nexport const TransactionDialog: React.FC<TransactionDialogProps> = ({\n  open,\n  onOpenChange,\n  txId,\n  onSuccess,\n  pendingTitle,\n  pendingDescription,\n  successTitle,\n  successDescription,\n  closeOnSuccess,\n}) => {\n  const {colors} = useTheme()\n  const {transactionStatus} = useFlowTransactionStatus({id: txId})\n  const isSuccess =\n    typeof transactionStatus?.status === \"number\" &&\n    transactionStatus.status >= 3\n\n  useEffect(() => {\n    if (isSuccess) {\n      if (onSuccess) onSuccess()\n      if (closeOnSuccess) onOpenChange(false)\n    }\n  }, [isSuccess, onSuccess, closeOnSuccess, onOpenChange])\n\n  return (\n    <Dialog isOpen={open} onClose={() => onOpenChange(false)}>\n      <div\n        className=\"flow-flex flow-flex-col flow-items-center flow-gap-4 flow-py-8\n          flow-min-w-[320px] flow-animate-fade-in\"\n      >\n        <div className=\"flow-flex flow-flex-col flow-items-center flow-gap-2\">\n          {!isSuccess ? (\n            <LoaderCircleIcon className=\"flow-animate-spin flow-text-blue-500 flow-w-12 flow-h-12\" />\n          ) : (\n            <CircleCheckIcon\n              className={twMerge(\n                \"flow-animate-pop flow-w-12 flow-h-12\",\n                colors.success\n              )}\n            />\n          )}\n          <div className=\"flow-text-lg flow-font-semibold flow-text-center\">\n            {!isSuccess\n              ? pendingTitle || \"Transaction Pending\"\n              : successTitle || \"Transaction Successful\"}\n          </div>\n        </div>\n        <div\n          className={twMerge(\n            \"flow-text-center flow-text-sm\",\n            colors.mutedForeground\n          )}\n        >\n          {!isSuccess\n            ? pendingDescription ||\n              \"Your transaction is being processed. Please wait...\"\n            : successDescription || \"Your transaction was successful!\"}\n        </div>\n        {isSuccess && txId && <TransactionLink txId={txId} variant=\"link\" />}\n        <Button\n          variant=\"outline\"\n          onClick={() => onOpenChange(false)}\n          className=\"flow-mt-4\"\n        >\n          Close\n        </Button>\n      </div>\n    </Dialog>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/TransactionLink.tsx",
    "content": "import React from \"react\"\nimport {Button, ButtonProps} from \"./internal/Button\"\nimport {StyleWrapper} from \"./internal/StyleWrapper\"\nimport {useFlowChainId} from \"@onflow/react-core\"\nimport {ExternalLinkIcon} from \"../icons/ExternalLink\"\nimport {getFlowscanTxUrl} from \"@onflow/react-core\"\n\ninterface TransactionLinkProps {\n  /** The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string) */\n  txId: string\n  variant?: ButtonProps[\"variant\"]\n}\n\nexport const TransactionLink: React.FC<TransactionLinkProps> = ({\n  txId,\n  variant = \"link\",\n}) => {\n  const {data: chainId} = useFlowChainId()\n\n  const handleClick = (e: React.MouseEvent) => {\n    if (chainId === \"emulator\" || chainId === \"local\") {\n      e.preventDefault()\n      console.warn(\"Block explorer links are not available in emulator mode\")\n    }\n  }\n\n  const explorerUrl = getFlowscanTxUrl(txId, chainId) || \"#\"\n\n  return (\n    <StyleWrapper>\n      <a\n        href={explorerUrl}\n        target=\"_blank\"\n        rel=\"noopener noreferrer\"\n        className=\"flow-no-underline\"\n        onClick={handleClick}\n      >\n        <Button\n          variant={variant}\n          className=\"flow-mt-2 flow-flex flow-items-center flow-gap-1\"\n          disabled={chainId === \"emulator\" || chainId === \"local\"}\n        >\n          View on Block Explorer\n          <ExternalLinkIcon className=\"flow-w-4 flow-h-4\" />\n        </Button>\n      </a>\n    </StyleWrapper>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/index.ts",
    "content": "export {Connect, type TokenConfig, type ConnectModalConfig} from \"./Connect\"\nexport {Profile, type ProfileConfig} from \"./Profile\"\nexport {TransactionDialog} from \"./TransactionDialog\"\nexport {TransactionLink} from \"./TransactionLink\"\nexport {TransactionButton} from \"./TransactionButton\"\nexport {NftCard, type NftCardAction} from \"./NftCard\"\nexport {ScheduledTransactionList} from \"./ScheduledTransactionList\"\n"
  },
  {
    "path": "packages/react-sdk/src/components/internal/Button.tsx",
    "content": "import React from \"react\"\nimport {Button as HeadlessButton} from \"@headlessui/react\"\nimport {useTheme, getButtonStyles, ButtonVariant} from \"../../core/theme\"\nimport {twMerge} from \"tailwind-merge\"\n\nexport interface ButtonProps\n  extends React.ComponentProps<typeof HeadlessButton> {\n  variant?: ButtonVariant\n}\n\nexport const Button: React.FC<ButtonProps> = ({\n  variant = \"primary\",\n  className,\n  ...props\n}) => {\n  const {colors} = useTheme()\n  const buttonStyles = getButtonStyles(colors, variant)\n\n  const baseStyles =\n    \"flow-px-4 flow-py-2 flow-rounded-md flow-font-medium flow-transition-colors\"\n\n  const hoverClass = buttonStyles.hover ? `hover:${buttonStyles.hover}` : \"\"\n\n  const variantClasses = twMerge(\n    buttonStyles.background,\n    buttonStyles.text,\n    hoverClass,\n    buttonStyles.border ? `flow-border ${buttonStyles.border}` : undefined,\n    buttonStyles.underline ? \"hover:flow-underline\" : undefined\n  )\n\n  return (\n    <HeadlessButton\n      className={twMerge(baseStyles, variantClasses, className)}\n      {...props}\n    />\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/internal/Dialog.tsx",
    "content": "import React from \"react\"\nimport {Dialog as HeadlessDialog} from \"@headlessui/react\"\nimport {useTheme} from \"../../core/theme\"\nimport {useDarkMode} from \"../../provider/DarkModeProvider\"\nimport {twMerge} from \"tailwind-merge\"\nimport {XIcon} from \"../../icons/XIcon\"\nimport {Button} from \"./Button\"\n\nexport interface DialogProps {\n  isOpen: boolean\n  onClose: () => void\n  title?: string\n  children: React.ReactNode\n  className?: string\n}\n\nexport const Dialog: React.FC<DialogProps> = ({\n  isOpen,\n  onClose,\n  title,\n  children,\n  className,\n}) => {\n  const {colors} = useTheme()\n  const {isDark} = useDarkMode()\n\n  // NB: flow-wrapper class must be applied to headlessdialog directly to avoid positioning issues\n  return (\n    <HeadlessDialog\n      open={isOpen}\n      onClose={onClose}\n      className={`flow-wrapper ${isDark ? \"flow-dark\" : \"\"} flow-relative flow-z-50`}\n    >\n      {/* Background overlay */}\n      <div\n        className=\"flow-fixed flow-inset-0 flow-bg-black/30\"\n        aria-hidden=\"true\"\n      />\n\n      {/* Full-screen container to center the panel */}\n      <div className=\"flow-fixed flow-inset-0 flow-flex flow-items-center flow-justify-center flow-p-4\">\n        <HeadlessDialog.Panel\n          className={twMerge(\n            \"flow-w-full flow-rounded-lg flow-p-6 flow-shadow-xl flow-relative\",\n            colors.background,\n            className || \"flow-max-w-md\"\n          )}\n        >\n          {/* Close button absolutely positioned */}\n          <Button\n            variant=\"outline\"\n            onClick={onClose}\n            className={twMerge(\n              \"flow-absolute flow-top-4 flow-right-4 flow-rounded-full flow-p-2\"\n            )}\n            aria-label=\"Close\"\n          >\n            <XIcon className=\"flow-w-4 flow-h-4\" />\n          </Button>\n\n          {/* Header only if title is present */}\n          {title && (\n            <div className=\"flow-mb-4\">\n              <HeadlessDialog.Title\n                className={twMerge(\n                  \"flow-text-lg flow-font-semibold\",\n                  colors.foreground\n                )}\n              >\n                {title}\n              </HeadlessDialog.Title>\n            </div>\n          )}\n\n          {/* Content starts at the top */}\n          <div className={twMerge(\"flow-mt-2\", colors.mutedForeground)}>\n            {children}\n          </div>\n        </HeadlessDialog.Panel>\n      </div>\n    </HeadlessDialog>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/components/internal/StyleWrapper.tsx",
    "content": "import React from \"react\"\nimport {useDarkMode} from \"../../provider/DarkModeProvider\"\n\nexport interface StyleWrapperProps {\n  children: React.ReactNode\n  className?: string\n}\n\n/**\n * Internal wrapper component that ensures React SDK components have access to\n * their scoped Tailwind styles by wrapping them in flow-wrapper class\n */\nexport const StyleWrapper: React.FC<StyleWrapperProps> = ({\n  children,\n  className,\n}) => {\n  const {isDark} = useDarkMode()\n\n  return (\n    <div\n      className={`flow-wrapper ${isDark ? \"flow-dark\" : \"\"} ${className || \"\"}`}\n    >\n      {children}\n    </div>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/core/theme.tsx",
    "content": "import React, {createContext, useContext} from \"react\"\n\nexport type ThemeColors = {\n  /** Primary action color (CTAs, main buttons) */\n  primary?: string\n  /** Text color on primary backgrounds */\n  primaryForeground?: string\n  /** Secondary action color (secondary buttons) */\n  secondary?: string\n  /** Text color on secondary backgrounds */\n  secondaryForeground?: string\n  /** Accent color for highlights, selected states */\n  accent?: string\n  /** Default background color (cards, modals) */\n  background?: string\n  /** Default text color */\n  foreground?: string\n  /** Muted/subtle background color */\n  muted?: string\n  /** Muted text color */\n  mutedForeground?: string\n  /** Border color */\n  border?: string\n  /** Success state color */\n  success?: string\n  /** Error state color */\n  error?: string\n  /** Link text color */\n  link?: string\n}\n\nexport type Theme = {\n  colors: ThemeColors\n}\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"outline\" | \"link\"\n\nexport type ButtonStyles = {\n  background?: string\n  text?: string\n  hover?: string\n  border?: string\n  underline?: boolean\n}\n\nexport const getButtonStyles = (\n  colors: ThemeColors,\n  variant: ButtonVariant\n): ButtonStyles => {\n  switch (variant) {\n    case \"primary\":\n      return {\n        background: colors.primary,\n        text: colors.primaryForeground,\n        hover: colors.accent,\n      }\n    case \"secondary\":\n      return {\n        background: colors.secondary,\n        text: colors.secondaryForeground,\n        hover: colors.muted,\n      }\n    case \"outline\":\n      return {\n        background: \"flow-bg-transparent\",\n        text: colors.foreground,\n        hover: colors.muted,\n        border: colors.border,\n      }\n    case \"link\":\n      return {\n        background: \"flow-bg-transparent\",\n        text: colors.link,\n        underline: true,\n      }\n    default:\n      return {\n        background: colors.primary,\n        text: colors.primaryForeground,\n        hover: colors.accent,\n      }\n  }\n}\n\nconst defaultTheme: Theme = {\n  colors: {\n    primary: \"flow-bg-slate-900 dark:flow-bg-white\",\n    primaryForeground: \"flow-text-white dark:flow-text-slate-900\",\n    secondary: \"flow-bg-slate-100 dark:flow-bg-slate-800\",\n    secondaryForeground: \"flow-text-slate-900 dark:flow-text-slate-100\",\n    accent: \"flow-bg-slate-800 dark:flow-bg-slate-200\",\n    background: \"flow-bg-white dark:flow-bg-slate-800\",\n    foreground: \"flow-text-slate-900 dark:flow-text-slate-100\",\n    muted: \"flow-bg-slate-100 dark:flow-bg-slate-700\",\n    mutedForeground: \"flow-text-slate-500 dark:flow-text-slate-400\",\n    border: \"flow-border-slate-200 dark:flow-border-slate-700\",\n    success: \"flow-text-green-600 dark:flow-text-green-400\",\n    error: \"flow-text-red-600 dark:flow-text-red-400\",\n    link: \"flow-text-slate-900 dark:flow-text-slate-100\",\n  },\n}\n\nconst ThemeContext = createContext<Theme>(defaultTheme)\nexport const useTheme = () => useContext(ThemeContext)\n\ntype DeepPartial<T> = {\n  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]\n}\n\ntype ThemeProviderProps = React.PropsWithChildren<{\n  theme?: DeepPartial<Theme>\n}>\n\nconst deepMerge = <T extends object>(target: T, source?: DeepPartial<T>): T => {\n  if (!source) return target\n  const result = {...target}\n\n  Object.keys(source).forEach(key => {\n    const targetValue = target[key as keyof T]\n    const sourceValue = source[key as keyof DeepPartial<T>]\n\n    if (\n      sourceValue &&\n      typeof sourceValue === \"object\" &&\n      targetValue &&\n      typeof targetValue === \"object\"\n    ) {\n      result[key as keyof T] = deepMerge(\n        targetValue as object,\n        sourceValue as object\n      ) as T[keyof T]\n    } else if (sourceValue !== undefined) {\n      result[key as keyof T] = sourceValue as T[keyof T]\n    }\n  })\n\n  return result\n}\n\nexport const ThemeProvider = ({\n  theme: customTheme,\n  children,\n}: ThemeProviderProps) => {\n  const theme = deepMerge(defaultTheme, customTheme)\n  return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>\n}\n"
  },
  {
    "path": "packages/react-sdk/src/css.d.ts",
    "content": "declare module \"*.css\"\n"
  },
  {
    "path": "packages/react-sdk/src/icons/AlertCircleIcon.tsx",
    "content": "import React from \"react\"\n\nexport const AlertCircleIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    className={className}\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    stroke=\"currentColor\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      strokeWidth={2}\n      d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n    />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/CircleCheckIcon.tsx",
    "content": "import React from \"react\"\n\nexport const CircleCheckIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <circle cx=\"12\" cy=\"12\" r=\"10\" />\n    <path d=\"m9 12 2 2 4-4\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/CircleUserRoundIcon.tsx",
    "content": "import React from \"react\"\n\nexport const CircleUserRoundIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"M18 20a6 6 0 0 0-12 0\" />\n    <circle cx=\"12\" cy=\"10\" r=\"4\" />\n    <circle cx=\"12\" cy=\"12\" r=\"10\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/CopyIcon.tsx",
    "content": "import React from \"react\"\n\nexport const CopyIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n    <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/DownIcon.tsx",
    "content": "import React from \"react\"\n\nexport const DownIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <path\n      d=\"M6 9l6 6 6-6\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/ExternalLink.tsx",
    "content": "import React from \"react\"\n\nexport const ExternalLinkIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <path\n      d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n    <path\n      d=\"M15 3h6v6\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n    <path\n      d=\"M10 14L21 3\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/FlowIcon.tsx",
    "content": "import React from \"react\"\n\nexport const FlowIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 400 400\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <g clipPath=\"url(#clip0_9707_11225)\">\n      <circle cx=\"199\" cy=\"199\" r=\"200\" fill=\"#00EF8B\" />\n      <path\n        d=\"M285.653 167.531H229.594V223.567H285.653V167.531Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M173.641 244.555C173.641 248.715 172.407 252.781 170.095 256.24C167.783 259.698 164.497 262.394 160.653 263.986C156.808 265.578 152.577 265.994 148.496 265.183C144.415 264.371 140.666 262.368 137.723 259.426C134.781 256.486 132.777 252.738 131.966 248.658C131.154 244.578 131.57 240.349 133.162 236.506C134.755 232.664 137.452 229.379 140.912 227.067C144.371 224.757 148.44 223.524 152.601 223.524H173.641V167.531H152.601C137.361 167.531 122.464 172.048 109.792 180.512C97.1204 188.976 87.2444 201.005 81.4124 215.079C75.5803 229.153 74.0543 244.641 77.0275 259.582C80.0007 274.523 87.3394 288.247 98.1151 299.019C108.892 309.791 122.622 317.126 137.569 320.099C152.516 323.07 168.008 321.546 182.088 315.716C196.168 309.886 208.202 300.013 216.669 287.347C225.135 274.681 229.655 259.788 229.655 244.555V223.524H173.641V244.555Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M250.624 139.536H313.665V83.5039H250.624C230.195 83.5249 210.609 91.6467 196.162 106.087C181.716 120.527 173.591 140.106 173.57 160.527V167.551H229.585V160.527C229.595 154.957 231.817 149.618 235.761 145.682C239.706 141.746 245.052 139.536 250.624 139.536Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M173.57 223.528H229.589V167.531H173.57V223.528Z\"\n        fill=\"#00EF8B\"\n      />\n    </g>\n    <defs>\n      <clipPath id=\"clip0_9707_11225\">\n        <rect width=\"400\" height=\"400\" fill=\"white\" />\n      </clipPath>\n    </defs>\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/ImageIcon.tsx",
    "content": "import React from \"react\"\n\nexport const ImageIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    className={className}\n    fill=\"none\"\n    viewBox=\"0 0 24 24\"\n    stroke=\"currentColor\"\n  >\n    <path\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      strokeWidth={2}\n      d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n    />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/LoaderCircleIcon.tsx",
    "content": "import React from \"react\"\n\nexport const LoaderCircleIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/LogOutIcon.tsx",
    "content": "import React from \"react\"\n\nexport const LogOutIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"m16 17 5-5-5-5\" />\n    <path d=\"M21 12H9\" />\n    <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/MoreVerticalIcon.tsx",
    "content": "import React from \"react\"\n\nexport const MoreVerticalIcon: React.FC<{className?: string}> = ({\n  className,\n}) => (\n  <svg\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <circle\n      cx=\"12\"\n      cy=\"12\"\n      r=\"1\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n    <circle\n      cx=\"12\"\n      cy=\"5\"\n      r=\"1\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n    <circle\n      cx=\"12\"\n      cy=\"19\"\n      r=\"1\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n    />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/TrashIcon.tsx",
    "content": "import React from \"react\"\n\nexport const TrashIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"M3 6h18\" />\n    <path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\" />\n    <path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/UserIcon.tsx",
    "content": "import React from \"react\"\n\nexport const UserIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\" />\n    <circle cx=\"12\" cy=\"7\" r=\"4\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/icons/XIcon.tsx",
    "content": "import React from \"react\"\n\nexport const XIcon: React.FC<{className?: string}> = ({className}) => (\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    className={className}\n  >\n    <path d=\"M18 6 6 18\" />\n    <path d=\"m6 6 12 12\" />\n  </svg>\n)\n"
  },
  {
    "path": "packages/react-sdk/src/index.ts",
    "content": "// Re-export types from react-core (matching original react-sdk interface)\nexport type {FlowNetwork} from \"@onflow/react-core\"\n\n// Re-export hooks from react-core (matching original react-sdk interface)\nexport {\n  useFlowCurrentUser,\n  useFlowAuthz,\n  useFlowAccount,\n  useFlowBlock,\n  useFlowChainId,\n  useFlowClient,\n  useFlowConfig,\n  useFlowEvents,\n  useFlowMutate,\n  useFlowQuery,\n  useFlowQueryRaw,\n  useFlowRevertibleRandom,\n  useCrossVmBatchTransaction,\n  useCrossVmTokenBalance,\n  useFlowTransaction,\n  useFlowTransactionStatus,\n  useCrossVmSpendNft,\n  useCrossVmSpendToken,\n  useCrossVmBridgeNftFromEvm,\n  useCrossVmBridgeNftToEvm,\n  useCrossVmBridgeTokenFromEvm,\n  useCrossVmBridgeTokenToEvm,\n  useCrossVmTransactionStatus,\n  useFlowNftMetadata,\n  useFlowScheduledTransactionList,\n  useFlowScheduledTransaction,\n  useFlowScheduledTransactionSetup,\n  useFlowScheduledTransactionCancel,\n  ScheduledTransactionPriority,\n  ScheduledTransactionStatus,\n} from \"@onflow/react-core\"\n\n// Re-export types from hooks\nexport type {NftViewResult, ScheduledTransaction} from \"@onflow/react-core\"\n\n// Web-specific components and providers\nexport * from \"./components\"\nexport * from \"./provider\"\n"
  },
  {
    "path": "packages/react-sdk/src/jest-setup.ts",
    "content": "import {TextEncoder, TextDecoder} from \"util\"\n\nObject.assign(global, {TextDecoder, TextEncoder})\n\n// Mock window.matchMedia for tests\nObject.defineProperty(window, \"matchMedia\", {\n  writable: true,\n  value: jest.fn().mockImplementation(query => ({\n    matches: false,\n    media: query,\n    onchange: null,\n    addListener: jest.fn(), // deprecated\n    removeListener: jest.fn(), // deprecated\n    addEventListener: jest.fn(),\n    removeEventListener: jest.fn(),\n    dispatchEvent: jest.fn(),\n  })),\n})\n"
  },
  {
    "path": "packages/react-sdk/src/mocks/file-mock.ts",
    "content": "export default \"mocked-file\"\n"
  },
  {
    "path": "packages/react-sdk/src/provider/DarkModeProvider.tsx",
    "content": "import React, {createContext, useContext, PropsWithChildren} from \"react\"\n\ntype DarkModeContextType = {\n  isDark: boolean\n}\n\nconst DarkModeContext = createContext<DarkModeContextType | undefined>(\n  undefined\n)\n\nexport function DarkModeProvider({\n  children,\n  darkMode = false,\n}: PropsWithChildren<{darkMode?: boolean}>) {\n  return (\n    <DarkModeContext.Provider value={{isDark: darkMode}}>\n      {children}\n    </DarkModeContext.Provider>\n  )\n}\n\nexport function useDarkMode() {\n  const context = useContext(DarkModeContext)\n  if (!context) {\n    throw new Error(\"useDarkMode must be used within a FlowProvider\")\n  }\n  return context\n}\n"
  },
  {
    "path": "packages/react-sdk/src/provider/FlowProvider.tsx",
    "content": "import React, {useState, PropsWithChildren, useMemo, useEffect} from \"react\"\nimport {\n  FlowConfig,\n  FlowConfigContext,\n  FlowClientContext,\n  FlowQueryClientProvider,\n  GlobalTransactionProvider,\n} from \"@onflow/react-core\"\nimport {DefaultOptions, QueryClient} from \"@tanstack/react-query\"\nimport {createFlowClient} from \"@onflow/fcl\"\nimport {ThemeProvider, Theme} from \"../core/theme\"\nimport tailwindStyles from \"../styles/tailwind.css\"\nimport {DarkModeProvider} from \"./DarkModeProvider\"\n\nexport type ColorMode = \"light\" | \"dark\" | \"system\"\n\ninterface FlowProviderProps {\n  config?: FlowConfig\n  queryClient?: QueryClient\n  flowClient?: ReturnType<typeof createFlowClient>\n  flowJson?: Record<string, any>\n  theme?: Partial<Theme>\n  colorMode?: ColorMode\n}\n\nconst defaultQueryOptions: DefaultOptions = {\n  queries: {\n    retry: false,\n    staleTime: 0,\n    refetchOnWindowFocus: false,\n    refetchOnReconnect: false,\n    refetchIntervalInBackground: false,\n  },\n}\n\nexport function FlowProvider({\n  config: initialConfig = {},\n  queryClient: _queryClient,\n  flowClient: _flowClient,\n  flowJson,\n  theme: customTheme,\n  children,\n  colorMode = \"system\",\n}: PropsWithChildren<FlowProviderProps>) {\n  const [queryClient] = useState<QueryClient>(\n    () => _queryClient ?? new QueryClient({defaultOptions: defaultQueryOptions})\n  )\n  const flowClient = useMemo(() => {\n    if (_flowClient) return _flowClient\n    else\n      return createFlowClient({\n        accessNodeUrl: initialConfig.accessNodeUrl!,\n        discoveryWallet: initialConfig.discoveryWallet,\n        discoveryWalletMethod: initialConfig.discoveryWalletMethod,\n        discoveryAuthnEndpoint: initialConfig.discoveryAuthnEndpoint,\n        discoveryAuthnInclude: initialConfig.discoveryAuthnInclude,\n        discoveryAuthnExclude: initialConfig.discoveryAuthnExclude,\n        flowJson: flowJson,\n        flowNetwork: initialConfig.flowNetwork,\n        computeLimit: initialConfig.computeLimit,\n        walletconnectProjectId: initialConfig.walletconnectProjectId,\n        walletconnectDisableNotifications:\n          initialConfig.walletconnectDisableNotifications,\n        appDetailTitle: initialConfig.appDetailTitle,\n        appDetailIcon: initialConfig.appDetailIcon,\n        appDetailDescription: initialConfig.appDetailDescription,\n        appDetailUrl: initialConfig.appDetailUrl,\n        serviceOpenIdScopes: initialConfig.serviceOpenIdScopes,\n      })\n  }, [_flowClient, initialConfig, flowJson])\n\n  // Helper function to get initial dark mode value\n  const getInitialDarkMode = (colorMode: ColorMode): boolean => {\n    if (colorMode === \"dark\") return true\n    if (colorMode === \"light\") return false\n    // For system mode, check if window exists (SSR safety) and get system preference\n    if (typeof window !== \"undefined\") {\n      return window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n    }\n    // Fallback to light mode during SSR\n    return false\n  }\n  // Initialize with the correct value to prevent flashing\n  const [darkMode, setDarkMode] = useState<boolean>(() =>\n    getInitialDarkMode(colorMode)\n  )\n\n  // Update dark mode when color mode changes\n  useEffect(() => {\n    if (colorMode === \"system\") {\n      // Only proceed if we're in the browser\n      if (typeof window === \"undefined\") return\n\n      // Set initial value (might be different from useState fallback)\n      const mediaQuery = window.matchMedia(\"(prefers-color-scheme: dark)\")\n      setDarkMode(mediaQuery.matches)\n\n      const handleChange = (event: MediaQueryListEvent) => {\n        setDarkMode(event.matches)\n      }\n\n      mediaQuery.addEventListener(\"change\", handleChange)\n      return () => mediaQuery.removeEventListener(\"change\", handleChange)\n    } else {\n      setDarkMode(colorMode === \"dark\")\n    }\n  }, [colorMode])\n\n  return (\n    <FlowQueryClientProvider queryClient={queryClient}>\n      <FlowConfigContext.Provider value={initialConfig}>\n        <FlowClientContext.Provider value={flowClient}>\n          <GlobalTransactionProvider>\n            <style>{tailwindStyles}</style>\n            <ThemeProvider theme={customTheme}>\n              <DarkModeProvider darkMode={darkMode}>\n                {children}\n              </DarkModeProvider>\n            </ThemeProvider>\n          </GlobalTransactionProvider>\n        </FlowClientContext.Provider>\n      </FlowConfigContext.Provider>\n    </FlowQueryClientProvider>\n  )\n}\n"
  },
  {
    "path": "packages/react-sdk/src/provider/index.ts",
    "content": "export {FlowProvider} from \"./FlowProvider\"\nexport {useFlowQueryClient} from \"@onflow/react-core\"\nexport {DarkModeProvider, useDarkMode} from \"./DarkModeProvider\"\n"
  },
  {
    "path": "packages/react-sdk/src/styles/tailwind.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "packages/react-sdk/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  content: [\"./src/**/*.{js,ts,jsx,tsx}\"],\n  theme: {\n    extend: {},\n  },\n  darkMode: \"class\",\n  plugins: [],\n  prefix: \"flow-\",\n  // NB: Needed so that Tailwind doesn't remove the classes and we can use them in the theme\n  safelist: [\n    // All background colors\n    {\n      pattern:\n        /^flow-bg-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // All text colors\n    {\n      pattern:\n        /^flow-text-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // All border colors\n    {\n      pattern:\n        /^flow-border-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // Basic colors without numbers - background\n    {\n      pattern: /^flow-bg-(black|white|transparent)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // Basic colors without numbers - text\n    {\n      pattern: /^flow-text-(black|white)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // Basic colors without numbers - border\n    {\n      pattern: /^flow-border-(black|white)$/,\n      variants: [\"hover\", \"dark\", \"dark:hover\"],\n    },\n    // Additional specific classes\n    \"flow-border\",\n    \"hover:flow-underline\",\n    \"dark:hover:flow-underline\",\n  ],\n}\n"
  },
  {
    "path": "packages/react-sdk/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\",\n    \"paths\": {\n      \"react\": [\"../../node_modules/@types/react/index\"]\n    },\n    \"jsx\": \"react\"\n  }\n}\n"
  },
  {
    "path": "packages/rlp/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/rlp/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/rlp/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/tag-lines\": 0,\n    \"jsdoc/require-param-description\": 0,\n    \"jsdoc/require-param\": 0,\n    \"jsdoc/valid-types\": 0,\n    \"jsdoc/require-returns-description\": 0,\n    \"jsdoc/require-returns\": 0,\n    \"@typescript-eslint/no-explicit-any\": \"off\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/rlp/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/rlp/CHANGELOG.md",
    "content": "# @onflow/rlp\n\n## 1.2.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.2\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.1\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.0.4\n\n### Patch Changes\n\n- [#1471](https://github.com/onflow/fcl-js/pull/1471) [`fb4af2a6`](https://github.com/onflow/fcl-js/commit/fb4af2a6ce054fc5abd806dbb7234522b78dcfc4) Thanks [@bthaile](https://github.com/bthaile)! - export decode method\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n- 2022-02-11 -- Use Buffer from dependency\n\n### 0.0.2 && 0.0.3 -- 2020-10-28\n\n- 2020-10-28 -- Version Bump to force NPM update\n\n### 0.0.1 -- 2020-10-28\n\n- 2020-10-13 -- fix export issue on get length\n\n### 0.0.0 -- 2020-10-07\n\n- 2020-09-29 -- Initial port from etheriumjs/rlp.\n"
  },
  {
    "path": "packages/rlp/LICENSE",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\nmeans each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\nmeans the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\nmeans Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\nmeans Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\nmeans\n\n(a) that the initial Contributor has attached the notice described\nin Exhibit B to the Covered Software; or\n\n(b) that the Covered Software was made available under the terms of\nversion 1.1 or earlier of the License, but not also under the\nterms of a Secondary License.\n\n1.6. \"Executable Form\"\nmeans any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\nmeans a work that combines Covered Software with other material, in \na separate file or files, that is not Covered Software.\n\n1.8. \"License\"\nmeans this document.\n\n1.9. \"Licensable\"\nmeans having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n1.10. \"Modifications\"\nmeans any of the following:\n\n(a) any file in Source Code Form that results from an addition to,\ndeletion from, or modification of the contents of Covered\nSoftware; or\n\n(b) any new file in Source Code Form that contains any Covered\nSoftware.\n\n1.11. \"Patent Claims\" of a Contributor\nmeans any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n1.12. \"Secondary License\"\nmeans either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n1.13. \"Source Code Form\"\nmeans the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, \"You\" includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, \"control\" means (a) the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or (b) ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or\nas part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\nfor sale, have made, import, and otherwise transfer either its\nContributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\nor\n\n(b) for infringements caused by: (i) Your and any other third party's\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\nits Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\nForm, as described in Section 3.1, and You must inform recipients of\nthe Executable Form how they can obtain a copy of such Source Code\nForm by reasonable means in a timely manner, at a charge no more\nthan the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\nLicense, or sublicense it under different terms, provided that the\nlicense for the Executable Form does not attempt to limit or alter\nthe recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\nThis Source Code Form is \"Incompatible With Secondary Licenses\", as\ndefined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "packages/rlp/README.md",
    "content": "Port of [ethereumjs/rlp][https://github.com/ethereumjs/rlp] sans BN support/dependency.\n"
  },
  {
    "path": "packages/rlp/package.json",
    "content": "{\n  \"name\": \"@onflow/rlp\",\n  \"version\": \"1.2.4\",\n  \"description\": \"Port of ethereumjs/rlp\",\n  \"license\": \"MPL-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/rlp.js\",\n  \"module\": \"dist/rlp.module.js\",\n  \"unpkg\": \"dist/rlp.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"buffer\": \"^6.0.3\"\n  }\n}\n"
  },
  {
    "path": "packages/rlp/src/index.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(1).toBe(1)\n})\n"
  },
  {
    "path": "packages/rlp/src/index.ts",
    "content": "import {Buffer} from \"buffer\"\n\nexport {Buffer}\n\nexport type EncodeInput =\n  | Buffer\n  | string\n  | number\n  | Uint8Array\n  | null\n  | undefined\n  | EncodeInput[]\n\n/**\n * Built on top of rlp library, removing the BN dependency for the flow.\n * Package : https://github.com/ethereumjs/rlp\n * RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE\n *\n * ethereumjs/rlp is licensed under the\n * Mozilla Public License 2.0\n * Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.\n */\n\n/**\n * @param input - will be converted to buffer\n * @returns returns buffer of encoded data\n */\nexport function encode(input: EncodeInput): Buffer {\n  if (Array.isArray(input)) {\n    const output = []\n    for (let i = 0; i < input.length; i++) {\n      output.push(encode(input[i]))\n    }\n    const buf = Buffer.concat(output)\n    return Buffer.concat([encodeLength(buf.length, 192), buf])\n  } else {\n    const inputBuf = toBuffer(input)\n    return inputBuf.length === 1 && inputBuf[0] < 128\n      ? inputBuf\n      : Buffer.concat([encodeLength(inputBuf.length, 128), inputBuf])\n  }\n}\n\n/**\n * Parse integers. Check if there is no leading zeros\n * @param v The value to parse\n * @param base The base to parse the integer into\n */\nfunction safeParseInt(v: string, base: number): number {\n  if (v.slice(0, 2) === \"00\") {\n    throw new Error(\"invalid RLP: extra zeros\")\n  }\n  return parseInt(v, base)\n}\nfunction encodeLength(len: number, offset: number): Buffer {\n  if (len < 56) {\n    return Buffer.from([len + offset])\n  } else {\n    const hexLength = intToHex(len)\n    const lLength = hexLength.length / 2\n    const firstByte = intToHex(offset + 55 + lLength)\n    return Buffer.from(firstByte + hexLength, \"hex\")\n  }\n}\n\n/**\n * Built on top of rlp library, removing the BN dependency for the flow.\n * Package : https://github.com/ethereumjs/rlp\n * RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE\n *\n * ethereumjs/rlp is licensed under the\n * Mozilla Public License 2.0\n * Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.\n */\n\n/**\n * @param input - will be converted to buffer\n * @param stream Is the input a stream (false by default)\n * @returns returns buffer of encoded data\n */\nexport function decode(input: Buffer | Uint8Array, stream?: boolean): Buffer {\n  if (stream === void 0) {\n    stream = false\n  }\n  if (!input || input.length === 0) {\n    return Buffer.from([])\n  }\n  const inputBuffer = toBuffer(input)\n  const decoded = _decode(inputBuffer)\n  if (stream) {\n    return decoded\n  }\n  if (decoded.remainder.length !== 0) {\n    throw new Error(\"invalid remainder\")\n  }\n  return decoded.data\n}\n\n/**\n * Get the length of the RLP input\n * @param input\n * @returns The length of the input or an empty Buffer if no input\n */\nexport function getLength(\n  input: Buffer | Uint8Array | null | undefined | string | number\n): number {\n  const inputBuffer = toBuffer(input)\n  if (inputBuffer.length === 0) {\n    return 0\n  }\n\n  const firstByte = inputBuffer[0]\n  if (firstByte <= 0x7f) {\n    return inputBuffer.length\n  } else if (firstByte <= 0xb7) {\n    return firstByte - 0x7f\n  } else if (firstByte <= 0xbf) {\n    return firstByte - 0xb6\n  } else if (firstByte <= 0xf7) {\n    // a list between  0-55 bytes long\n    return firstByte - 0xbf\n  } else {\n    // a list  over 55 bytes long\n    const llength = firstByte - 0xf6\n    const length = safeParseInt(\n      inputBuffer.slice(1, llength).toString(\"hex\"),\n      16\n    )\n    return llength + length\n  }\n}\n\n/** Decode an input with RLP */\nfunction _decode(input: Buffer | Uint8Array): any {\n  let length, llength, data, innerRemainder, d\n  const decoded = []\n  const firstByte = input[0]\n  if (firstByte <= 0x7f) {\n    // a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding.\n    return {\n      data: input.slice(0, 1),\n      remainder: input.slice(1),\n    }\n  } else if (firstByte <= 0xb7) {\n    // string is 0-55 bytes long. A single byte with value 0x80 plus the length of the string followed by the string\n    // The range of the first byte is [0x80, 0xb7]\n    length = firstByte - 0x7f\n    // set 0x80 null to 0\n    if (firstByte === 0x80) {\n      data = Buffer.from([])\n    } else {\n      data = input.slice(1, length)\n    }\n    if (length === 2 && data[0] < 0x80) {\n      throw new Error(\"invalid rlp encoding: byte must be less 0x80\")\n    }\n    return {\n      data: data,\n      remainder: input.slice(length),\n    }\n  } else if (firstByte <= 0xbf) {\n    llength = firstByte - 0xb6\n    length = safeParseInt(input.slice(1, llength).toString(\"hex\"), 16)\n    data = input.slice(llength, length + llength)\n    if (data.length < length) {\n      throw new Error(\"invalid RLP\")\n    }\n    return {\n      data: data,\n      remainder: input.slice(length + llength),\n    }\n  } else if (firstByte <= 0xf7) {\n    // a list between  0-55 bytes long\n    length = firstByte - 0xbf\n    innerRemainder = input.slice(1, length)\n    while (innerRemainder.length) {\n      d = _decode(innerRemainder)\n      decoded.push(d.data)\n      innerRemainder = d.remainder\n    }\n    return {\n      data: decoded,\n      remainder: input.slice(length),\n    }\n  } else {\n    // a list  over 55 bytes long\n    llength = firstByte - 0xf6\n    length = safeParseInt(input.slice(1, llength).toString(\"hex\"), 16)\n    const totalLength = llength + length\n    if (totalLength > input.length) {\n      throw new Error(\"invalid rlp: total length is larger than the data\")\n    }\n    innerRemainder = input.slice(llength, totalLength)\n    if (innerRemainder.length === 0) {\n      throw new Error(\"invalid rlp, List has a invalid length\")\n    }\n    while (innerRemainder.length) {\n      d = _decode(innerRemainder)\n      decoded.push(d.data)\n      innerRemainder = d.remainder\n    }\n    return {\n      data: decoded,\n      remainder: input.slice(totalLength),\n    }\n  }\n}\n/** Check if a string is prefixed by 0x */\nfunction isHexPrefixed(str: string) {\n  return str.slice(0, 2) === \"0x\"\n}\n/** Removes 0x from a given String */\nfunction stripHexPrefix(str: string) {\n  if (typeof str !== \"string\") {\n    return str\n  }\n  return isHexPrefixed(str) ? str.slice(2) : str\n}\n/** Transform an integer into its hexadecimal value */\nfunction intToHex(integer: number) {\n  if (integer < 0) {\n    throw new Error(\"Invalid integer as argument, must be unsigned!\")\n  }\n  const hex = integer.toString(16)\n  return hex.length % 2 ? \"0\" + hex : hex\n}\n/** Pad a string to be even */\nfunction padToEven(a: string) {\n  return a.length % 2 ? \"0\" + a : a\n}\n/** Transform an integer into a Buffer */\nfunction intToBuffer(integer: number) {\n  const hex = intToHex(integer)\n  return Buffer.from(hex, \"hex\")\n}\n\n/** Transform anything into a Buffer */\nexport function toBuffer(\n  v: Buffer | string | number | Uint8Array | null | undefined\n) {\n  if (!Buffer.isBuffer(v)) {\n    if (typeof v === \"string\") {\n      if (isHexPrefixed(v)) {\n        return Buffer.from(padToEven(stripHexPrefix(v)), \"hex\")\n      } else {\n        return Buffer.from(v)\n      }\n    } else if (typeof v === \"number\") {\n      if (!v) {\n        return Buffer.from([])\n      } else {\n        return intToBuffer(v)\n      }\n    } else if (v === null || v === undefined) {\n      return Buffer.from([])\n    } else if (v instanceof Uint8Array) {\n      return Buffer.from(v)\n    } else {\n      throw new Error(\"invalid type\")\n    }\n  }\n  return v\n}\n"
  },
  {
    "path": "packages/rlp/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/sdk/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"useBuiltIns\": false\n      }\n    ],\n    \"@babel/preset-typescript\"\n  ]\n}\n"
  },
  {
    "path": "packages/sdk/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/sdk/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": 0,\n    \"jsdoc/valid-types\": 0\n  }\n}\n"
  },
  {
    "path": "packages/sdk/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/sdk/CHANGELOG.md",
    "content": "# @onflow/sdk\n\n## 1.13.7\n\n### Patch Changes\n\n- Updated dependencies [[`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c)]:\n  - @onflow/config@1.11.1\n  - @onflow/transport-http@1.15.6\n\n## 1.13.6\n\n### Patch Changes\n\n- Updated dependencies [[`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e)]:\n  - @onflow/config@1.11.0\n  - @onflow/transport-http@1.15.5\n\n## 1.13.5\n\n### Patch Changes\n\n- Updated dependencies [[`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7)]:\n  - @onflow/config@1.10.0\n  - @onflow/transport-http@1.15.4\n\n## 1.13.4\n\n### Patch Changes\n\n- Updated dependencies [[`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754)]:\n  - @onflow/config@1.9.0\n  - @onflow/transport-http@1.15.3\n\n## 1.13.3\n\n### Patch Changes\n\n- Updated dependencies [[`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69)]:\n  - @onflow/config@1.8.0\n  - @onflow/transport-http@1.15.2\n\n## 1.13.2\n\n### Patch Changes\n\n- Updated dependencies [[`197938abdc11798c0299aab3394daa5cf1959f65`](https://github.com/onflow/fcl-js/commit/197938abdc11798c0299aab3394daa5cf1959f65)]:\n  - @onflow/config@1.7.0\n\n## 1.13.1\n\n### Patch Changes\n\n- Updated dependencies [[`d6e0a02145cd599fa22823ca83087ca096fb251d`](https://github.com/onflow/fcl-js/commit/d6e0a02145cd599fa22823ca83087ca096fb251d)]:\n  - @onflow/transport-http@1.15.1\n\n## 1.13.0\n\n### Minor Changes\n\n- [#2704](https://github.com/onflow/fcl-js/pull/2704) [`afab3d34cf05b000a80eaed217ef8ec772ecc32d`](https://github.com/onflow/fcl-js/commit/afab3d34cf05b000a80eaed217ef8ec772ecc32d) Thanks [@mfbz](https://github.com/mfbz)! - Improved fcl-react-native WalletConnect implementation with full fcl specs support, automatic redirect URI detection, session validation and full feature parity with fcl.\n\n## 1.12.0\n\n### Minor Changes\n\n- [#2664](https://github.com/onflow/fcl-js/pull/2664) [`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212) Thanks [@jribbink](https://github.com/jribbink)! - Add support for scheduled transaction API changes, including UInt64 transaction IDs and automatic fallback to legacy polling when WebSocket subscriptions are not supported.\n\n### Patch Changes\n\n- Updated dependencies [[`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212)]:\n  - @onflow/transport-http@1.15.0\n\n## 1.11.2\n\n### Patch Changes\n\n- [#2698](https://github.com/onflow/fcl-js/pull/2698) [`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e) Thanks [@chasefleming](https://github.com/chasefleming)! - Add support for Cadence import aliasing\n\n- Updated dependencies [[`9c5bed0ed542e85d038e1763c6d94e38614d9a0e`](https://github.com/onflow/fcl-js/commit/9c5bed0ed542e85d038e1763c6d94e38614d9a0e)]:\n  - @onflow/config@1.6.3\n\n## 1.11.1\n\n### Patch Changes\n\n- [#2689](https://github.com/onflow/fcl-js/pull/2689) [`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Added support for UFix128 and Fix128 types to @onflow/types package and decoder support to @onflow/sdk package. These fixed-point number types have been added to the Flow protocol and are now available for use in Cadence transactions and scripts. UFix128 and Fix128 support up to 24 decimal places of precision.\n\n  The decoder in @onflow/sdk now properly handles UFix128 and Fix128 values when decoding responses from Flow scripts and transactions.\n\n- Updated dependencies [[`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73), [`c8b0b880d147840c66b8913894a8fe1e9804d557`](https://github.com/onflow/fcl-js/commit/c8b0b880d147840c66b8913894a8fe1e9804d557)]:\n  - @onflow/types@1.5.0\n  - @onflow/config@1.6.2\n\n## 1.11.0\n\n### Minor Changes\n\n- [#2669](https://github.com/onflow/fcl-js/pull/2669) [`ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23`](https://github.com/onflow/fcl-js/commit/ef3fb70d694e83bc19c2bd6b6d6ea44b6df6ac23) Thanks [@mfbz](https://github.com/mfbz)! - Added support for mixed cadence imports\n\n- [#2638](https://github.com/onflow/fcl-js/pull/2638) [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960) Thanks [@jribbink](https://github.com/jribbink)! - Adds support for signature extension data introduced by [FLIP 264](https://github.com/onflow/flips/blob/main/protocol/20250203-webauthn-credential-support.md).\n\n  Users can now include signature extension data in their transactions by returning an additional `extensionData` property in their signing functions.\n\n  ```typescript\n  const authz = (ix: Interaction) => {\n    return {\n      addr: \"0x1234567890abcdef\",\n      keyId: 0,\n      signingFunction: (signable: Signable) => ({\n        signature: \"1234\",\n        extensionData: \"1234\",\n      }),\n    }\n  }\n  ```\n\n### Patch Changes\n\n- Updated dependencies [[`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960)]:\n  - @onflow/transport-http@1.14.0\n  - @onflow/typedefs@1.8.0\n\n## 1.10.2\n\n### Patch Changes\n\n- Updated dependencies [[`430bb0813bab6c2de59e152184256238bda20d99`](https://github.com/onflow/fcl-js/commit/430bb0813bab6c2de59e152184256238bda20d99)]:\n  - @onflow/transport-http@1.13.2\n\n## 1.10.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/config@1.6.1\n  - @onflow/rlp@1.2.4\n  - @onflow/transport-http@1.13.1\n  - @onflow/typedefs@1.7.1\n  - @onflow/types@1.4.2\n  - @onflow/util-actor@1.3.5\n  - @onflow/util-address@1.2.4\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n  - @onflow/util-template@1.2.4\n\n## 1.10.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n- [#2538](https://github.com/onflow/fcl-js/pull/2538) [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled SDK functions from the global state and created a `createSdkClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple SDK clients in the same application.\n\n  All SDK functions will continue to work as before, but now you can create a custom SDK client with its own context.\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76), [`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8)]:\n  - @onflow/typedefs@1.7.0\n  - @onflow/config@1.6.0\n\n## 1.10.0-alpha.1\n\n### Minor Changes\n\n- [#2538](https://github.com/onflow/fcl-js/pull/2538) [`7307e779415cd941f911bbb0c634581c959050b2`](https://github.com/onflow/fcl-js/commit/7307e779415cd941f911bbb0c634581c959050b2) Thanks [@jribbink](https://github.com/jribbink)! - Decoupled SDK functions from the global state and created a `createSdkClient` function which constructs a new SDK client instance bound to a custom context.\n\n  This allows for better modularity and helps support multiple SDK clients in the same application.\n\n  All SDK functions will continue to work as before, but now you can create a custom SDK client with its own context.\n\n### Patch Changes\n\n- Updated dependencies [[`72e23611de8025dbd36bddc2dcc1c5858f50efe8`](https://github.com/onflow/fcl-js/commit/72e23611de8025dbd36bddc2dcc1c5858f50efe8)]:\n  - @onflow/config@1.6.0-alpha.0\n\n## 1.10.0-alpha.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n### Patch Changes\n\n- Updated dependencies [[`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7), [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc), [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76)]:\n  - @onflow/typedefs@1.7.0-alpha.0\n\n## 1.9.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n- [#2352](https://github.com/onflow/fcl-js/pull/2352) [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0) Thanks [@mfbz](https://github.com/mfbz)! - Refactored onflow/sdk package to improve TypeScript support\n\n### Patch Changes\n\n- [#2434](https://github.com/onflow/fcl-js/pull/2434) [`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89) Thanks [@mfbz](https://github.com/mfbz)! - Fixed fcl.mutate hanging\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`0b83658f62a428a70074d33875f264fbd48aff1e`](https://github.com/onflow/fcl-js/commit/0b83658f62a428a70074d33875f264fbd48aff1e), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/typedefs@1.6.0\n  - @onflow/transport-http@1.13.0\n\n## 1.9.0-alpha.1\n\n### Patch Changes\n\n- [#2434](https://github.com/onflow/fcl-js/pull/2434) [`3ac616d64c9abcda32f0c450119f22fa479d5e89`](https://github.com/onflow/fcl-js/commit/3ac616d64c9abcda32f0c450119f22fa479d5e89) Thanks [@mfbz](https://github.com/mfbz)! - Fixed fcl.mutate hanging\n\n## 1.9.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add real-time streaming methods `subscribe` and `subscribeRaw`.\n\n  These are only available when using a REST API endpoint and not supported by the deprecated GRPC trasnport.\n\n  The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n  Please see the [Flow Developer Documentation](https://developers.flow.com/clients/fcl-js/) for more details on how to use these new methods.\n\n- [#2352](https://github.com/onflow/fcl-js/pull/2352) [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0) Thanks [@mfbz](https://github.com/mfbz)! - Refactored onflow/sdk package to improve TypeScript support\n\n### Patch Changes\n\n- Updated dependencies [[`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab), [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa), [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0)]:\n  - @onflow/typedefs@1.6.0-alpha.0\n  - @onflow/transport-http@1.13.0-alpha.0\n\n## 1.8.1\n\n### Patch Changes\n\n- Updated dependencies [[`e10f1db63a8a9cc86a56e312d7d7e3a2089d4a3a`](https://github.com/onflow/fcl-js/commit/e10f1db63a8a9cc86a56e312d7d7e3a2089d4a3a)]:\n  - @onflow/typedefs@1.5.0\n\n## 1.8.0\n\n### Minor Changes\n\n- [#2270](https://github.com/onflow/fcl-js/pull/2270) [`6c4d6c3df669883e34951bc1d26edb95441f124d`](https://github.com/onflow/fcl-js/commit/6c4d6c3df669883e34951bc1d26edb95441f124d) Thanks [@mfbz](https://github.com/mfbz)! - Added default Flow network config exports: `flowMainnet`, `flowTestnet`, and `flowEmulator`. These can be used with `fcl.config()` to simplify setup.\n\n### Patch Changes\n\n- Updated dependencies [[`f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01`](https://github.com/onflow/fcl-js/commit/f2721d7fffec1f5b8e0f9faac6b633c6d9b86c01)]:\n  - @onflow/config@1.5.2\n\n## 1.7.0\n\n### Minor Changes\n\n- [#2252](https://github.com/onflow/fcl-js/pull/2252) [`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714) Thanks [@jribbink](https://github.com/jribbink)! - Default to soft-finality for all queries (get account, get block, get block header, execute script). Developers can manually override this setting on a per-query basis if required.\n\n  Because developers can now query against un-sealed blocks, it is now recommended to switch to waiting for soft-finality (\"executed\" status) when awaiting for transaction results whenever possible for significant latency improvements (~2.5x faster).\n\n  This can be done by switching from `fcl.tx(...).onceSealed()` to `fcl.tx(...).onceExecuted()` or updating listeners passed to `fcl.tx(...).subscribe()`.\n\n### Patch Changes\n\n- Updated dependencies [[`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714)]:\n  - @onflow/transport-http@1.12.0\n\n## 1.6.1\n\n### Patch Changes\n\n- [#2245](https://github.com/onflow/fcl-js/pull/2245) [`b361069e8b42a4752c2614b1c6908af9749729ac`](https://github.com/onflow/fcl-js/commit/b361069e8b42a4752c2614b1c6908af9749729ac) Thanks [@jribbink](https://github.com/jribbink)! - Fix regression in `account` query at latest block\n\n## 1.6.0\n\n### Minor Changes\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Add `fcl.experimental.softFinality` config option to run all state queries (e.g. execute script, get account) against the latest soft-finality state by default\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Add `atLatestBlock` SDK builder method to query the latest block with the given finality state\n\n### Patch Changes\n\n- Updated dependencies [[`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8)]:\n  - @onflow/transport-http@1.11.0\n\n## 1.5.7\n\n### Patch Changes\n\n- [#2216](https://github.com/onflow/fcl-js/pull/2216) [`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec) Thanks [@jribbink](https://github.com/jribbink)! - Expose all available arguments to `EventFilter` type (`startBlockId`, `startBlockHeight`, `heartbeatInterval`)\n\n- Updated dependencies [[`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec)]:\n  - @onflow/typedefs@1.4.1\n\n## 1.5.6\n\n### Patch Changes\n\n- Updated dependencies [[`4e907764cbbe688ea8fd1508968c2b095f00d79e`](https://github.com/onflow/fcl-js/commit/4e907764cbbe688ea8fd1508968c2b095f00d79e)]:\n  - @onflow/transport-http@1.10.5\n\n## 1.5.5\n\n### Patch Changes\n\n- Updated dependencies [[`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d)]:\n  - @onflow/transport-http@1.10.4\n\n## 1.5.4\n\n### Patch Changes\n\n- [#2027](https://github.com/onflow/fcl-js/pull/2025) [`169974cbd76495f29fac9d950916e3e9fd7f3fd4`](https://github.com/onflow/fcl-js/commit/169974cbd76495f29fac9d950916e3e9fd7f3fd4) Thanks [@caosbad](https://github.com/jribbink)! - Fixed an issue where the signer could not get the correct singerIndex when preparing a payload due to prefixed addresses in the sdk\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21), [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26), [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7), [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21), [`dda32df052801ee5e70b703a19c246f36bbd31c2`](https://github.com/onflow/fcl-js/commit/dda32df052801ee5e70b703a19c246f36bbd31c2)]:\n  - @onflow/typedefs@1.4.0\n  - @onflow/transport-http@1.10.3\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-template@1.2.3\n  - @onflow/util-address@1.2.3\n  - @onflow/util-logger@1.3.3\n  - @onflow/util-actor@1.3.4\n  - @onflow/config@1.5.1\n  - @onflow/rlp@1.2.3\n\n## 1.5.4-alpha.3\n\n### Patch Changes\n\n- [#2027](https://github.com/onflow/fcl-js/pull/2025) [`169974cbd76495f29fac9d950916e3e9fd7f3fd4`](https://github.com/onflow/fcl-js/commit/169974cbd76495f29fac9d950916e3e9fd7f3fd4) Thanks [@caosbad](https://github.com/caosbad)! - Fixed an issue where the signer could not get the correct singerIndex when preparing a payload due to prefixed addresses in the sdk\n\n## 1.5.4-alpha.2\n\n### Patch Changes\n\n- Updated dependencies [[`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26)]:\n  - @onflow/typedefs@1.4.0-alpha.2\n\n## 1.5.4-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21), [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21)]:\n  - @onflow/typedefs@1.4.0-alpha.1\n\n## 1.5.4-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7), [`dda32df052801ee5e70b703a19c246f36bbd31c2`](https://github.com/onflow/fcl-js/commit/dda32df052801ee5e70b703a19c246f36bbd31c2)]:\n  - @onflow/transport-http@1.10.3-alpha.0\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n  - @onflow/util-actor@1.3.4-alpha.0\n  - @onflow/typedefs@1.4.0-alpha.0\n  - @onflow/config@1.5.1-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n\n## 1.5.3\n\n### Patch Changes\n\n- Updated dependencies [[`91526e65`](https://github.com/onflow/fcl-js/commit/91526e65190d8c8ba67598e5df3b8b1c6c41292a)]:\n  - @onflow/transport-http@1.10.2\n\n## 1.5.2\n\n### Patch Changes\n\n- [#1915](https://github.com/onflow/fcl-js/pull/1915) [`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump ws from 8.14.2 to 8.17.1\n\n- [#1918](https://github.com/onflow/fcl-js/pull/1918) [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5) Thanks [@jribbink](https://github.com/jribbink)! - Miscellaneous TypeScript fixes\n\n- [#1910](https://github.com/onflow/fcl-js/pull/1910) [`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24) Thanks [@jribbink](https://github.com/jribbink)! - Restore account resolution ordering (fixes issue where FCL currentUser authz would run without knowing custom authz accounts)\n\n- [#1943](https://github.com/onflow/fcl-js/pull/1943) [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec) Thanks [@jribbink](https://github.com/jribbink)! - Make `sdk.payer` arguments more permissive (authz can be an object or a function)\n\n- Updated dependencies [[`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5), [`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/typedefs@1.3.1\n  - @onflow/config@1.5.0\n\n## 1.5.2-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`cd234798`](https://github.com/onflow/fcl-js/commit/cd234798008868df13447ea97654b7e278dd746f)]:\n  - @onflow/config@1.5.0-alpha.0\n\n## 1.5.2-alpha.2\n\n### Patch Changes\n\n- [#1943](https://github.com/onflow/fcl-js/pull/1943) [`95c63f26`](https://github.com/onflow/fcl-js/commit/95c63f26c5b21787ba9dddc52c7111183b0983ec) Thanks [@jribbink](https://github.com/jribbink)! - Make `sdk.payer` arguments more permissive (authz can be an object or a function)\n\n## 1.5.2-alpha.1\n\n### Patch Changes\n\n- [#1910](https://github.com/onflow/fcl-js/pull/1910) [`c0b3becf`](https://github.com/onflow/fcl-js/commit/c0b3becfcfb284e2182d6b4b6d809ff67406fc24) Thanks [@jribbink](https://github.com/jribbink)! - Restore account resolution ordering (fixes issue where FCL currentUser authz would run without knowing custom authz accounts)\n\n## 1.5.2-alpha.0\n\n### Patch Changes\n\n- [#1915](https://github.com/onflow/fcl-js/pull/1915) [`9c787314`](https://github.com/onflow/fcl-js/commit/9c7873140015c9d1e28712aed93c56654f656639) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump ws from 8.14.2 to 8.17.1\n\n- [#1918](https://github.com/onflow/fcl-js/pull/1918) [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5) Thanks [@jribbink](https://github.com/jribbink)! - Miscellaneous TypeScript fixes\n\n- Updated dependencies [[`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5)]:\n  - @onflow/typedefs@1.3.1-alpha.0\n\n## 1.5.1\n\n### Patch Changes\n\n- Updated dependencies [[`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175)]:\n  - @onflow/util-actor@1.3.3\n  - @onflow/config@1.4.1\n\n## 1.5.0\n\n### Minor Changes\n\n- [#1863](https://github.com/onflow/fcl-js/pull/1863) [`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074) Thanks [@jribbink](https://github.com/jribbink)! - Update SDK encoding/decoding for Cadence 1.0 JSON-CDC changes\n\n### Patch Changes\n\n- [#1879](https://github.com/onflow/fcl-js/pull/1879) [`8fb453b5`](https://github.com/onflow/fcl-js/commit/8fb453b5ff3a00285d91a5432972afbe9e779706) Thanks [@jribbink](https://github.com/jribbink)! - Allow building a transaction without any authorizers\n\n- Updated dependencies [[`dfc5472e`](https://github.com/onflow/fcl-js/commit/dfc5472e94c8237b048940ebc44742071f77f59d), [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]:\n  - @onflow/transport-http@1.10.1\n  - @onflow/util-invariant@1.2.3\n  - @onflow/config@1.4.0\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - Typescript improvements\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new event streaming API. This can be accessed through new SDK builder `sdk.subscribeEvents(...)`. See FLIP for more information: https://github.com/onflow/flips/blob/4152912f8ec39515eb1c4dddbc6605c6ebe70966/protocol/20230309-accessnode-event-streaming-api.md.\n\n- [#1852](https://github.com/onflow/fcl-js/pull/1852) [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0) Thanks [@jribbink](https://github.com/jribbink)! - Generalize chainId decoder for all \"flow\" prefixed networks\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1840](https://github.com/onflow/fcl-js/pull/1840) [`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d) Thanks [@jribbink](https://github.com/jribbink)! - Typescript fixes for SDK builders\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3), [`72e8f796`](https://github.com/onflow/fcl-js/commit/72e8f796caf8f62a829cba3641e395c20466547a), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/transport-http@1.10.0\n  - @onflow/typedefs@1.3.0\n  - @onflow/util-address@1.2.2\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/util-logger@1.3.2\n  - @onflow/util-actor@1.3.2\n  - @onflow/config@1.3.0\n  - @onflow/rlp@1.2.2\n\n## 1.4.0-alpha.9\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n  - @onflow/typedefs@1.3.0-alpha.4\n  - @onflow/transport-http@1.10.0-alpha.5\n\n## 1.4.0-alpha.8\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- Updated dependencies [[`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88)]:\n  - @onflow/transport-http@1.10.0-alpha.4\n  - @onflow/typedefs@1.3.0-alpha.3\n\n## 1.4.0-alpha.7\n\n### Minor Changes\n\n- [#1852](https://github.com/onflow/fcl-js/pull/1852) [`b2c73354`](https://github.com/onflow/fcl-js/commit/b2c733545a3904dcff959a2e12b4cf90383bdac0) Thanks [@jribbink](https://github.com/jribbink)! - Generalize chainId decoder for all \"flow\" prefixed networks\n\n## 1.4.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`fdd52c45`](https://github.com/onflow/fcl-js/commit/fdd52c45b3a64210c5f716e13aa4d08d3796370c)]:\n  - @onflow/config@1.3.0-alpha.3\n\n## 1.4.0-alpha.5\n\n### Patch Changes\n\n- [#1840](https://github.com/onflow/fcl-js/pull/1840) [`151a2290`](https://github.com/onflow/fcl-js/commit/151a2290e92fbcb399052476004c7f20ceda5c2d) Thanks [@jribbink](https://github.com/jribbink)! - Typescript fixes for SDK builders\n\n## 1.4.0-alpha.4\n\n### Patch Changes\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- Updated dependencies [[`72e8f796`](https://github.com/onflow/fcl-js/commit/72e8f796caf8f62a829cba3641e395c20466547a), [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f)]:\n  - @onflow/transport-http@1.10.0-alpha.3\n\n## 1.4.0-alpha.3\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/transport-http@1.10.0-alpha.2\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n  - @onflow/util-actor@1.3.2-alpha.2\n  - @onflow/typedefs@1.3.0-alpha.2\n  - @onflow/config@1.2.2-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n\n## 1.4.0-alpha.2\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - TS conversion\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new event streaming API https://github.com/onflow/flips/blob/4152912f8ec39515eb1c4dddbc6605c6ebe70966/protocol/20230309-accessnode-event-streaming-api.md. Can be accessed through new SDK builder sdk.subscribeEvents(...).\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4), [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d)]:\n  - @onflow/transport-http@1.10.0-alpha.1\n  - @onflow/typedefs@1.3.0-alpha.1\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-template@1.2.2-alpha.1\n  - @onflow/util-address@1.2.2-alpha.1\n  - @onflow/util-logger@1.3.2-alpha.1\n  - @onflow/util-actor@1.3.2-alpha.1\n  - @onflow/config@1.2.2-alpha.1\n  - @onflow/rlp@1.2.2-alpha.1\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-actor@1.3.1\n  - @onflow/config@1.2.1\n  - @onflow/rlp@1.2.1\n  - @onflow/transport-http@1.8.1\n  - @onflow/util-address@1.2.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-logger@1.3.1\n  - @onflow/util-template@1.2.1\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-template@1.2.0\n  - @onflow/util-address@1.2.0\n  - @onflow/util-logger@1.3.0\n  - @onflow/rlp@1.2.0\n  - @onflow/transport-http@1.8.0\n  - @onflow/util-actor@1.3.0\n  - @onflow/config@1.2.0\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Refactor Resolve Accounts to user role based async decomposition for resolving internal accounts\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fixed duplicate signatures when sending transaction\n\n- Updated dependencies [[`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5)]:\n  - @onflow/transport-http@1.7.2\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1767](https://github.com/onflow/fcl-js/pull/1767) [`f6681cfe`](https://github.com/onflow/fcl-js/commit/f6681cfebc5aab78cbf74f34b5655faa4f06a8c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix responseBody not being included in errors\n\n- Updated dependencies [[`f6681cfe`](https://github.com/onflow/fcl-js/commit/f6681cfebc5aab78cbf74f34b5655faa4f06a8c4)]:\n  - @onflow/transport-http@1.7.1\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1719](https://github.com/onflow/fcl-js/pull/1719) [`62fd9baf`](https://github.com/onflow/fcl-js/commit/62fd9baf28afbb2742f9e8c5ef6674adc9d030b7) Thanks [@nialexsan](https://github.com/nialexsan)! - Fixed args type for send\n\n- [#1721](https://github.com/onflow/fcl-js/pull/1721) [`1553967a`](https://github.com/onflow/fcl-js/commit/1553967aff61c242990b2de509e5dc5b8842ab2d) Thanks [@nialexsan](https://github.com/nialexsan)! - Fixed return types\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6), [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285)]:\n  - @onflow/config@1.1.1\n  - @onflow/transport-http@1.7.0\n  - @onflow/util-logger@1.2.1\n\n## 1.2.1-alpha.2\n\n### Patch Changes\n\n- [#1721](https://github.com/onflow/fcl-js/pull/1721) [`1553967a`](https://github.com/onflow/fcl-js/commit/1553967aff61c242990b2de509e5dc5b8842ab2d) Thanks [@nialexsan](https://github.com/nialexsan)! - Fixed return types\n\n## 1.2.1-alpha.1\n\n### Patch Changes\n\n- [#1719](https://github.com/onflow/fcl-js/pull/1719) [`62fd9baf`](https://github.com/onflow/fcl-js/commit/62fd9baf28afbb2742f9e8c5ef6674adc9d030b7) Thanks [@nialexsan](https://github.com/nialexsan)! - Fixed args type for send\n\n## 1.2.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6), [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285)]:\n  - @onflow/config@1.1.1-alpha.0\n  - @onflow/transport-http@1.7.0-alpha.0\n  - @onflow/util-logger@1.2.1-alpha.0\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1573](https://github.com/onflow/fcl-js/pull/1573) [`74c75d51`](https://github.com/onflow/fcl-js/commit/74c75d5167560eb07da6e21f9f7835b5639ee7d5) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc to SDK and generate types\n\n- [#1564](https://github.com/onflow/fcl-js/pull/1564) [`66fe102a`](https://github.com/onflow/fcl-js/commit/66fe102a269aca71bd82c6ac55bb23527d04db01) Thanks [@justinbarry](https://github.com/justinbarry)! - Add support for import \"ContractName\" syntax in scripts and transactions.\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Export 'response' function for testing\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1610](https://github.com/onflow/fcl-js/pull/1610) [`bd6ebb8e`](https://github.com/onflow/fcl-js/commit/bd6ebb8eea5b0de26c0de9b2e0e7561006783040) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated transport-http dependency\n\n- [#1565](https://github.com/onflow/fcl-js/pull/1565) [`8c921ba2`](https://github.com/onflow/fcl-js/commit/8c921ba2098d2449846bb4a3fdf44a633f4cb11e) Thanks [@justinbarry](https://github.com/justinbarry)! - Prefix contract addresses with 0x if not preset in the config during Address replacement.\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9), [`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1), [`82810ef0`](https://github.com/onflow/fcl-js/commit/82810ef000ebdf4dde4dbd7846d31dd335cd9cbb), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355), [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242), [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19), [`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22), [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4), [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020), [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645), [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b)]:\n  - @onflow/config@1.1.0\n  - @onflow/util-address@1.1.0\n  - @onflow/transport-http@1.6.0\n  - @onflow/rlp@1.1.0\n  - @onflow/util-actor@1.2.0\n  - @onflow/util-invariant@1.1.0\n  - @onflow/util-logger@1.2.0\n  - @onflow/util-template@1.1.0\n\n## 1.2.0-alpha.10\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Export 'response' function for testing\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/config@1.1.0-alpha.8\n  - @onflow/rlp@1.1.0-alpha.2\n  - @onflow/transport-http@1.6.0-alpha.6\n  - @onflow/util-actor@1.2.0-alpha.3\n  - @onflow/util-address@1.1.0-alpha.5\n  - @onflow/util-invariant@1.1.0-alpha.2\n  - @onflow/util-logger@1.2.0-alpha.3\n  - @onflow/util-template@1.1.0-alpha.2\n\n## 1.2.0-alpha.9\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/transport-http@1.6.0-alpha.5\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.4\n  - @onflow/util-logger@1.2.0-alpha.2\n  - @onflow/util-actor@1.2.0-alpha.2\n  - @onflow/config@1.1.0-alpha.7\n  - @onflow/rlp@1.1.0-alpha.1\n\n## 1.2.0-alpha.8\n\n### Patch Changes\n\n- [#1610](https://github.com/onflow/fcl-js/pull/1610) [`bd6ebb8e`](https://github.com/onflow/fcl-js/commit/bd6ebb8eea5b0de26c0de9b2e0e7561006783040) Thanks [@nialexsan](https://github.com/nialexsan)! - Updated transport-http dependency\n\n## 1.2.0-alpha.7\n\n### Minor Changes\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n### Patch Changes\n\n- Updated dependencies [[`82810ef0`](https://github.com/onflow/fcl-js/commit/82810ef000ebdf4dde4dbd7846d31dd335cd9cbb)]:\n  - @onflow/transport-http@1.6.0-alpha.3\n\n## 1.2.0-alpha.6\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/config@1.1.0-alpha.4\n  - @onflow/rlp@1.1.0-alpha.0\n  - @onflow/transport-http@1.6.0-alpha.2\n  - @onflow/util-actor@1.2.0-alpha.0\n  - @onflow/util-address@1.1.0-alpha.3\n  - @onflow/util-invariant@1.1.0-alpha.0\n  - @onflow/util-logger@1.2.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.0\n\n## 1.2.0-alpha.5\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n### Patch Changes\n\n- Updated dependencies [[`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb)]:\n  - @onflow/config@1.1.0-alpha.3\n  - @onflow/util-address@1.1.0-alpha.2\n\n## 1.2.0-alpha.4\n\n### Minor Changes\n\n- [#1573](https://github.com/onflow/fcl-js/pull/1573) [`74c75d51`](https://github.com/onflow/fcl-js/commit/74c75d5167560eb07da6e21f9f7835b5639ee7d5) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc to SDK and generate types\n\n### Patch Changes\n\n- Updated dependencies [[`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020)]:\n  - @onflow/config@1.1.0-alpha.2\n\n## 1.2.0-alpha.3\n\n### Patch Changes\n\n- [#1565](https://github.com/onflow/fcl-js/pull/1565) [`8c921ba2`](https://github.com/onflow/fcl-js/commit/8c921ba2098d2449846bb4a3fdf44a633f4cb11e) Thanks [@justinbarry](https://github.com/justinbarry)! - Prefix contract addresses with 0x if not preset in the config during Address replacement.\n\n## 1.2.0-alpha.2\n\n### Minor Changes\n\n- [#1564](https://github.com/onflow/fcl-js/pull/1564) [`66fe102a`](https://github.com/onflow/fcl-js/commit/66fe102a269aca71bd82c6ac55bb23527d04db01) Thanks [@justinbarry](https://github.com/justinbarry)! - Add support for import \"ContractName\" syntax in scripts and transactions.\n\n## 1.2.0-alpha.1\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n### Patch Changes\n\n- Updated dependencies [[`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22)]:\n  - @onflow/transport-http@1.6.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.0\n\n## 1.1.3-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9)]:\n  - @onflow/config@1.1.0-alpha.0\n  - @onflow/util-logger@1.1.3-alpha.0\n  - @onflow/transport-http@1.5.1-alpha.0\n\n## 1.1.2\n\n### Patch Changes\n\n- [#1339](https://github.com/onflow/fcl-js/pull/1339) [`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f) Thanks [@jribbink](https://github.com/jribbink)! - Fix erroneous sansPrefix requirement for acct.addr in authorization function which occured when proposer and authorizer did not match\n\n- Updated dependencies [[`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe), [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe), [`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f)]:\n  - @onflow/transport-http@1.5.0\n\n## 1.1.2-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe), [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe)]:\n  - @onflow/transport-http@1.5.0-alpha.1\n\n## 1.1.2-alpha.0\n\n### Patch Changes\n\n- [#1339](https://github.com/onflow/fcl-js/pull/1339) [`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f) Thanks [@jribbink](https://github.com/jribbink)! - Fix erroneous sansPrefix requirement for acct.addr in authorization function which occured when proposer and authorizer did not match\n\n- Updated dependencies [[`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f)]:\n  - @onflow/transport-http@1.4.1-alpha.0\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1326](https://github.com/onflow/fcl-js/pull/1326) [`053ff10d`](https://github.com/onflow/fcl-js/commit/053ff10dbc1d6ec64b1cafec9dad6b58ad154552) Thanks [@jribbink](https://github.com/jribbink)! - Fix getAccount executing at latest finalized block instead of sealed block (version bump `@onflow/transport-http`)\n\n* [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n* Updated dependencies [[`422914bc`](https://github.com/onflow/fcl-js/commit/422914bcdc4c1b44c61d3ec1850bf57114f31a6b), [`b9577b63`](https://github.com/onflow/fcl-js/commit/b9577b6355be06dec98f1e11101594fa65e66cf7), [`c83c4606`](https://github.com/onflow/fcl-js/commit/c83c4606f1c78e7addaadece89350b19cb5544d6), [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6), [`4d59f80c`](https://github.com/onflow/fcl-js/commit/4d59f80c0a8b45c82a28a05e6c579f4376107b86), [`45607fae`](https://github.com/onflow/fcl-js/commit/45607fae1d99adaa6e2c9ebbb8dc2f7e0c267033)]:\n  - @onflow/transport-http@1.4.0\n  - @onflow/config@1.0.3\n  - @onflow/rlp@1.0.2\n  - @onflow/util-actor@1.1.1\n  - @onflow/util-address@1.0.2\n  - @onflow/util-invariant@1.0.2\n  - @onflow/util-logger@1.1.1\n  - @onflow/util-template@1.0.3\n\n## 1.1.1-alpha.2\n\n### Patch Changes\n\n- Fix getAccount executing at latest finalized block instead of sealed block (version bump `@onflow/transport-http`)\n\n## 1.1.1-alpha.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`b9577b63`](https://github.com/onflow/fcl-js/commit/b9577b6355be06dec98f1e11101594fa65e66cf7), [`c83c4606`](https://github.com/onflow/fcl-js/commit/c83c4606f1c78e7addaadece89350b19cb5544d6), [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/transport-http@1.3.1-alpha.1\n  - @onflow/config@1.0.3-alpha.0\n  - @onflow/rlp@1.0.2-alpha.0\n  - @onflow/util-actor@1.1.1-alpha.0\n  - @onflow/util-address@1.0.2-alpha.0\n  - @onflow/util-invariant@1.0.2-alpha.0\n  - @onflow/util-logger@1.1.1-alpha.1\n  - @onflow/util-template@1.0.3-alpha.0\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`4d59f80c`](https://github.com/onflow/fcl-js/commit/4d59f80c0a8b45c82a28a05e6c579f4376107b86)]:\n  - @onflow/transport-http@1.3.1-alpha.0\n  - @onflow/util-logger@1.1.1-alpha.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1183](https://github.com/onflow/fcl-js/pull/1183) [`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5) Thanks [@jribbink](https://github.com/jribbink)! - Added deprecation warning for hard-coded DEFAULT_COMPUTE_LIMIT=10 (and increase to DEFAULT_COMPUTE_LIMIT=100 for now) and added sdk.defaultComputeLimit to config\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n* [#1191](https://github.com/onflow/fcl-js/pull/1191) [`90d5163a`](https://github.com/onflow/fcl-js/commit/90d5163a7723dd529324a271ea8accaa43a3d7be) Thanks [@jribbink](https://github.com/jribbink)! - Allow for integer string account.keyId in authorization function\n\n- [#1263](https://github.com/onflow/fcl-js/pull/1263) [`45951f1a`](https://github.com/onflow/fcl-js/commit/45951f1af310d302ee708e43d1a939265f404d2c) Thanks [@jribbink](https://github.com/jribbink)! - Fix infinite recursion bug when using array authorization function (used for multiple signing keys)\n\n* [#1218](https://github.com/onflow/fcl-js/pull/1218) [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix interaction arguments in http request body broken by prettier\n\n- [#1212](https://github.com/onflow/fcl-js/pull/1212) [`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314) Thanks [@jribbink](https://github.com/jribbink)! - Make deprecation notice for getEvents use @onflow/util-logger instead of console.warn\n\n* [#1199](https://github.com/onflow/fcl-js/pull/1199) [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb) Thanks [@jribbink](https://github.com/jribbink)! - Fix issue where custom decoders did not properly override default decoders\n\n* Updated dependencies [[`06279c1d`](https://github.com/onflow/fcl-js/commit/06279c1d27433893494b6a79b7f742ea9a7fab8e), [`d9bc1cc6`](https://github.com/onflow/fcl-js/commit/d9bc1cc671f143d2f37cad6eb6b80123f1f3d760), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`cd218e84`](https://github.com/onflow/fcl-js/commit/cd218e843acfc390049b391d36c447ce93668221), [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/transport-http@1.3.0\n  - @onflow/util-logger@1.1.0\n  - @onflow/util-template@1.0.2\n  - @onflow/util-actor@1.1.0\n  - @onflow/config@1.0.2\n\n## 1.1.0-alpha.4\n\n### Patch Changes\n\n- [#1263](https://github.com/onflow/fcl-js/pull/1263) [`45951f1a`](https://github.com/onflow/fcl-js/commit/45951f1af310d302ee708e43d1a939265f404d2c) Thanks [@jribbink](https://github.com/jribbink)! - Fix infinite recursion bug when using array authorization function (used for multiple signing keys)\n\n## 1.1.0-alpha.3\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]:\n  - @onflow/util-logger@1.1.0-alpha.2\n  - @onflow/util-template@1.0.2-alpha.0\n  - @onflow/util-actor@1.1.0-alpha.0\n  - @onflow/transport-http@1.3.0-alpha.3\n  - @onflow/config@1.0.2-alpha.0\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1183](https://github.com/onflow/fcl-js/pull/1183) [`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5) Thanks [@jribbink](https://github.com/jribbink)! - Added deprecation warning for hard-coded DEFAULT_COMPUTE_LIMIT=10 (and increase to DEFAULT_COMPUTE_LIMIT=100 for now) and added sdk.defaultComputeLimit to config\n\n### Patch Changes\n\n- Updated dependencies [[`06279c1d`](https://github.com/onflow/fcl-js/commit/06279c1d27433893494b6a79b7f742ea9a7fab8e)]:\n  - @onflow/transport-http@1.3.0-alpha.2\n  - @onflow/util-logger@1.0.2-alpha.1\n\n## 1.0.2-alpha.1\n\n### Patch Changes\n\n- [#1191](https://github.com/onflow/fcl-js/pull/1191) [`90d5163a`](https://github.com/onflow/fcl-js/commit/90d5163a7723dd529324a271ea8accaa43a3d7be) Thanks [@jribbink](https://github.com/jribbink)! - Allow for integer string account.keyId in authorization function\n\n* [#1218](https://github.com/onflow/fcl-js/pull/1218) [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix interaction arguments in http request body broken by prettier\n\n* Updated dependencies [[`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4)]:\n  - @onflow/transport-http@1.3.0-alpha.1\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1212](https://github.com/onflow/fcl-js/pull/1212) [`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314) Thanks [@jribbink](https://github.com/jribbink)! - Make deprecation notice for getEvents use @onflow/util-logger instead of console.warn\n\n* [#1199](https://github.com/onflow/fcl-js/pull/1199) [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb) Thanks [@jribbink](https://github.com/jribbink)! - Fix issue where custom decoders did not properly override default decoders\n\n* Updated dependencies [[`d9bc1cc6`](https://github.com/onflow/fcl-js/commit/d9bc1cc671f143d2f37cad6eb6b80123f1f3d760), [`cd218e84`](https://github.com/onflow/fcl-js/commit/cd218e843acfc390049b391d36c447ce93668221)]:\n  - @onflow/transport-http@1.3.0-alpha.0\n  - @onflow/util-logger@1.0.2-alpha.0\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4), [`f348803d`](https://github.com/onflow/fcl-js/commit/f348803dbaaebad6d7081248b41f5582d5627d86)]:\n  - @onflow/config@1.0.1\n  - @onflow/rlp@1.0.1\n  - @onflow/transport-http@1.1.0\n  - @onflow/util-actor@1.0.1\n  - @onflow/util-address@1.0.1\n  - @onflow/util-invariant@1.0.1\n  - @onflow/util-logger@1.0.1\n  - @onflow/util-template@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1155](https://github.com/onflow/fcl-js/pull/1155) [`700433d5`](https://github.com/onflow/fcl-js/commit/700433d50d4156183b09b13781f7f74f23882586) Thanks [@caosbad](https://github.com/caosbad)! - Export encodeTransactionPayload, encodeTransactionEnvelope, and encodeTxIdFromVoucher from sdk.\n\n* [#1156](https://github.com/onflow/fcl-js/pull/1156) [`6ff970df`](https://github.com/onflow/fcl-js/commit/6ff970dfc04281c86043e1cf8f5bceb633dc4186) Thanks [@justinbarry](https://github.com/justinbarry)! - Add sansPrefix for address before RLP encoding\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n- Updated dependencies [[`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7), [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a), [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60), [`b2c95e77`](https://github.com/onflow/fcl-js/commit/b2c95e776a3bbfd769778e0bae767fdd69ba6143), [`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d), [`828a7b2b`](https://github.com/onflow/fcl-js/commit/828a7b2b4babb6485218e67e49f3a8ba9d4488fd), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/transport-http@1.0.0\n  - @onflow/config@1.0.0\n  - @onflow/util-actor@1.0.0\n  - @onflow/util-address@1.0.0\n  - @onflow/util-invariant@1.0.0\n  - @onflow/rlp@1.0.0\n  - @onflow/util-logger@1.0.0\n  - @onflow/util-template@1.0.0\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n* [#1167](https://github.com/onflow/fcl-js/pull/1167) [`d6d0d1`](https://github.com/onflow/fcl-js/commit/cd6d0d1b43f57d316e1325ae415bd862e9eea200) Thanks [@justinbarry](https://github.com/justinbarry)! - Remove warning about interaction field renamings/deprecations.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/config@1.0.0-alpha.2\n  - @onflow/rlp@1.0.0-alpha.1\n  - @onflow/transport-http@1.0.0-alpha.2\n  - @onflow/util-actor@1.0.0-alpha.2\n  - @onflow/util-address@1.0.0-alpha.1\n  - @onflow/util-invariant@1.0.0-alpha.1\n  - @onflow/util-logger@1.0.0-alpha.1\n  - @onflow/util-template@1.0.0-alpha.1\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1155](https://github.com/onflow/fcl-js/pull/1155) [`700433d5`](https://github.com/onflow/fcl-js/commit/700433d50d4156183b09b13781f7f74f23882586) Thanks [@caosbad](https://github.com/caosbad)! - Export encodeTransactionPayload, encodeTransactionEnvelope, and encodeTxIdFromVoucher from sdk.\n\n* [#1153](https://github.com/onflow/fcl-js/pull/1153) [`6ff970df`](https://github.com/onflow/fcl-js/commit/6ff970dfc04281c86043e1cf8f5bceb633dc4186) Thanks [@lmcmz](https://github.com/lmcmz)! - Add sansPrefix for address before RLP encoding\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n* Updated dependencies [[`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7), [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a), [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60), [`b2c95e77`](https://github.com/onflow/fcl-js/commit/b2c95e776a3bbfd769778e0bae767fdd69ba6143), [`828a7b2b`](https://github.com/onflow/fcl-js/commit/828a7b2b4babb6485218e67e49f3a8ba9d4488fd), [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe)]:\n  - @onflow/transport-http@1.0.0-alpha.1\n  - @onflow/config@1.0.0-alpha.1\n  - @onflow/util-actor@1.0.0-alpha.1\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- Updated dependencies [7469c5c3]\n- Updated dependencies\n\n  - @onflow/util-address@1.0.0-alpha.0\n  - @onflow/util-invariant@1.0.0-alpha.0\n  - @onflow/rlp@1.0.0-alpha.0\n  - @onflow/transport-http@1.0.0-alpha.0\n  - @onflow/util-actor@1.0.0-alpha.0\n  - @onflow/util-logger@1.0.0-alpha.0\n  - @onflow/util-template@1.0.0-alpha.0\n\n- 2022-03-31 -- [@chasefleming](https://github.com/chasefleming): Convert SDK logger functionality to use `@onflow/util-logger`.\n- 2022-03-28 -- **BREAKING** [@JeffreyDoyle](https://github.com/JeffreyDoyle): Makes `@onflow/transport-http` the default send module used by SDK. By default, SDK will need to be configured with `accessNode.api` corresponding to a REST/HTTP access node, unless another send module is configured.\n- 2022-03-16 -- [@bthaile](https://github.com/bthaile) Payer can now be an array of keys on a single account. Non-array payer is deprecated and will error in future versions of sdk.\n- 2022-03-16 -- [@chasefleming](https://github.com/chasefleming): Warn about field renamings/deprecations. To turn on warnings, set config `log.level` to `2`.\n\n```js\nsdk.config(\"logger.level\", 2)\n```\n\n- 2022-03-07 -- **BREAKING** [@JeffreyDoyle](https://github.com/JeffreyDoyle): Decode number types implicitly. Number types, `[U]Int*` and `Word*`, will now be decoded into String. This is done to protect against decoding such types into JavaScript Number when the value they represent exceeds the largest supported value for Number. Developers should adjust their use of the JS-SDK accordingly to this new return type when decoding number `[U]Int*` and `Word*` types.\n- 2022-02-11 -- Uses Buffer from @onflow/rlp in encode.\n- 2022-02-11 -- Injects Buffer from @onflow/rlp to transport send modules.\n- 2022-02-04 -- [@chasefleming](https://github.com/chasefleming): Add options for for getting account by block height.\n\n```javascript\nawait sdk.account(\"0x123\") // Existing: get account at the latest block\nawait sdk.account(\"0x123\", {height: 123}) // New: get account at the block with the provided height\n```\n\n## 0.0.57-alpha.3 -- 2022-02-02\n\n- 2022-02-03 -- [@gregsantos](https://github.com/gregsantos): Rename `preSendCheck` to `voucherIntercept` and expose.\n- 2022-01-31 -- [@chasefleming](https://github.com/chasefleming): Fix SDK circular dependency in `src/block.js` file.\n\n## 0.0.57-alpha.1 -- 2022-01-21\n\n- 2022-01-21 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Abstracts away the SDK transport modules into their own packages. The JS-SDK now makes use of transport modules for sending an interaction to an access api and receiving a response. A transport module can be defined in config:\n\n```javascript\nimport {send as grpcSend} from \"@onflow/transport-grpc\"\nimport {send as httpSend} from \"@onflow/transport-http\"\n\n// Configure SDK to use GRPC\nsdk\n  .config()\n  .put(\"accessNode.api\", \"https://access-testnet.onflow.org\")\n  .put(\"sdk.transport\", grpcSend)\n\n// Configure SDK to use HTTP\nsdk\n  .config()\n  .put(\"accessNode.api\", \"https://rest-testnet.onflow.org\")\n  .put(\"sdk.transport\", httpSend)\n```\n\n## 0.0.56-alpha.3 -- 2022-01-19\n\n- 2022-01-07 -- [@chasefleming](https://github.com/chasefleming): Create methods for more easily getting a block by height or by id.\n\n```javascript\nawait sdk.block() // get latest finalized block\nawait sdk.block({sealed: true}) // get latest sealed block\nawait sdk.block({id: \"abc\"}) // get block by id\nawait sdk.block({height: 123}) // get block by height\n```\n\n## 0.0.56-alpha.2 -- 2022-01-05\n\n- 2021-12-17 -- [@chasefleming](https://github.com/chasefleming): Fix bug `resolveArgument` is being executed in the wrong context.\n- 2021-11-22 -- [@chasefleming](https://github.com/chasefleming): Fix bug where similar aliases in config can result in partial replacement of the wrong alias.\n- 2021-11-22 -- [@chasefleming](https://github.com/chasefleming): Fix bug where address aliases from config in cadence code are only replaced once.\n- 2021-11-17 -- [@chasefleming](https://github.com/chasefleming): Support passing of current user as authorization. Simply pass `currentUser` instead of `currentUser.authorization` or `currentUser().authorization`.\n\n```javascript\nimport {currentUser} from \"@onflow/fcl\"\n\nfcl\n  .send([\n    fcl.transaction(CODE),\n    fcl.proposer(currentUser),\n    fcl.payer(currentUser),\n    fcl.authorizations([currentUser]),\n  ])\n  .then(fcl.decode)\n```\n\n## 0.0.56-alpha.1 -- 2021-10-21\n\n- 2021-10-21 -- [@GregSantos](https://github.com/gregsantos): SDK Alpha Release `@onflow/sdk` 0.0.55 -> 0.0.56-alpha.1\n- 2021-10-13 -- **Community Contribution from** [@avcdsld](https://github.com/avcdsld): Adds initial implementation of a feature that allows for the transaction id to be computed before sending the transaction to the chain. It can be passed an asynchronous function that receives the voucher. Exports `voucherToTxId` to produce a transaction hash from `voucher`.\n- 2021-10-11 -- [@chasefleming](https://github.com/chasefleming): Access string status instead of just number value (e.g. `FINALIZED` for status `2`) by using the `statusString` property on the response of `getTransactionStatus`\n\nExample of `statusString`:\n\n```javascript\nimport * as sdk from \"@onflow/sdk\"\nconst response = await sdk.send(\n  await sdk.build([sdk.getTransactionStatus(txId)]),\n  {node: \"http://localhost:8080\"}\n)\n\nconsole.log(response.statusString)\n```\n\n## 0.0.55 -- 2021-10-01\n\n- 2021-09-30 -- [@chasefleming](https://github.com/chasefleming): Resolve asynchronous arguments with specific `resolveArgument` method over generic `resolve`\n\nExample of `resolveArgument` for async args.\n\n```javascript\nconst argument = {\n  async resolveArgument() {\n    return {\n      value: \"0x12341324\",\n      xform: t.Address,\n    }\n  },\n}\n\nsdk.args([argument])\n```\n\n- 2021-09-20 -- [@chasefleming](https://github.com/chasefleming): Support asynchronous resolve methods in `resolveArguments`\n- 2021-09-20 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds wallet utility for encoding provable authentication messages.\n- 2021-08-05 -- [@gregsantos](https://github.com/gregsantos): Update `createSignableVoucher` structure and move to separate module.\n\n## 0.0.54 -- 2021-07-23\n\n- 2021-07-22 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds support for decoding `Enum` and `Capability` JSON-CDC payloads.\n\n## 0.0.53 -- 2021-07-21\n\n- 2021-07-21 -- Full version bump\n- 2021-07-21 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Corrects error in send-get-account where account address was not supplied to GRPC request object.\n\n## 0.0.52 -- 2021-07-21\n\n- 2021-07-21 -- Full version bump\n- 2021-07-21 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds support for decoding `Type` and `Path` JSON-CDC payloads.\n- 2021-07-14 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Refactors Send Functions to prevent and mitigate cases where the expected request type cannot be determined.\n\n## 0.0.51 -- 2021-07-20\n\n- 2021-07-20 -- Full version bump\n\n## 0.0.51-alpha.2 -- 2021-07-19\n\n- 2021-07-14 -- Update `createSignableVoucher` to return `payloadSigs` and `envelopeSigs`. Addresses CORS bug.\n\n## 0.0.51-alpha.1 -- 2021-07-13\n\n- 2021-07-13 -- [@orodio](https://github.com/orodio): Top level now exposes `TestUtils`\n- 2021-07-13 -- [@orodio](https://github.com/orodio): Config now exposes an `overload` function. `config.overload(otps, callback)`\n- 2021-07-13 -- [@orodio](https://github.com/orodio): Config now exposes a `first` function. `config.first([\"A\", \"B\"], \"FALLBACK\")`\n- 2021-07-13 -- [@orodo](https://github.com/orodio): Config functions can now be written like `config.get(\"foo\")` instead of `config().get(\"foo\")`\n- 2021-07-13 -- [@orodio](https://github.com/orodio): Config now exposes an `all` function. `config().all()`\n- 2021-06-24 -- [@gregsantos](https://github.com/gregsantos): Added `payer` signature to `payloadSigs` on `voucher`.\n\nExample Updates to config.\n\n```javascript\nimport {config} from \"@onflow/config\"\n\nexpect(await config.all()).toEqual({})\n\nconfig({\n  \"foo.bar\": \"baz\",\n})\nconfig.put(\"bob\", \"pat\")\n\nexpect(await config.all()).toEqual({\n  \"foo.bar\": \"baz\",\n  bob: \"pat\",\n})\n\nvar ret = await config.overload({bob: \"bill\"}, async () => {\n  expect(await config.all()).toEqual({\n    \"foo.bar\": \"baz\",\n    bob: \"bill\",\n  })\n  return \"woot\"\n})\n\nexpect(ret).toBe(\"woot\")\n\nexpect(await config.all()).toEqual({\n  \"foo.bar\": \"baz\",\n  bob: \"pat\",\n})\n\nexpect(await config.first([\"bax\", \"foo.bar\"], \"FALLBACK\")).toBe(\"baz\")\nexpect(await config.first([\"nope\", \"oh-no\"], \"FALLBACK\")).toBe(\"FALLBACK\")\n```\n\nExample of TestUtils.\n\n```javascript\nimport {config, TestUtils} from \"@onflow/sdk\"\nimport * as sdk from \"@onflow/sdk\"\n\ntest(\"single account/key pair for all three signatory roles\", async () => {\n  await config.overload(\n    {\n      // mockSend -- Mocks the internal send calls used in resolve\n      // can pass in a function that will be used as the return value of sdk.transport (Response)\n      \"sdk.transport\": TestUtils.mockSend(),\n    },\n    async () => {\n      const SIGNATORY = {addr: \"0x1111222233334444\", keyId: 1}\n      const idof = acct => `${acct.addr}-${acct.keyId}`\n\n      // authzFn -- stubs out an authorization function from a signatory\n      const authz = TestUtils.authzFn(SIGNATORY)\n\n      // run -- builds and resolves the transaction // sets a reference block\n      var ix = await run([\n        sdk.transaction`CODE`,\n        sdk.proposer(authz),\n        sdk.payer(authz),\n        sdk.authorizations([authz]),\n      ])\n\n      expect(Object.keys(ix.accounts).length).toBe(1)\n      expect(ix.accounts[TestUtils.idof(SIGNATORY)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(SIGNATORY))\n      expect(ix.payer).toBe(TestUtils.idof(SIGNATORY))\n      expect(ix.authorizations).toEqual([TestUtils.idof(SIGNATORY)])\n    }\n  )\n})\n```\n\n## 0.0.50 - 2021-06-17\n\n- 2021-06-16 -- [@orodio](https://github.com/orodio): General dep clean up. And force internal usage of config.\n\n## 0.0.49 - 2021-06-16\n\n- 2021-06-16 -- [@orodio](https://github.com/orodio): Pulled `@onflow/config` functionality into `@onflow/sdk`\n- 2021-06-16 -- [@orodio](https://github.com/orodio): Added the ability to set configuration values in `sdk.config` from initializer.\n\n```javascript\nimport {config} from \"@onflow/config\"\n\nconfig({\n  \"accessNode.api\": \"https://access-testnet.onflow.org\",\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n  \"0xFUSD\": \"0xe223d8a629e49c68\",\n})\n\n// -- is equivalent to --\n\nconfig()\n  .put(\"accessNode.api\", \"https://access-testnet.onflow.org\")\n  .put(\"discovery.wallet\", \"https://fcl-discovery.onflow.org/testnet/authn\")\n  .put(\"0xFUSD\", \"0xe223d8a629e49c68\")\n```\n\n## 0.0.48 - 2021-06-16\n\n- 2021-06-16 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds ability to specify optional grpc metadata to requests sent to an Access API. To specity grpc metadata, use config like such:\n\n```javascript\nimport {config} from \"@onflow/config\"\n\nfcl.config().put(\"grpc.metadata\", {headerkey1: \"headervalue1\"})\n```\n\n- 2021-06-16 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds encode signable wallet utility function.\n\n## 0.0.47 - 2021-06-04\n\n- 2021-04-27 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Full VSN Release `@onflow/sdk` 0.0.47-alpha.1 -> 0.0.47\n\n## 0.0.47-alpha.1 - 2021-05-27\n\n- 2021-05-27 -- [@gregsantos](https://github.com/gregsantos): Exposes `createSignableVoucher`\n\n## 0.0.46 - 2021-05-10\n\n- 2021-05-05 -- [@gregsantos](https://github.com/gregsantos): Renames `createVoucher` to `createSignableVoucher` and moves to `resolve-signatures`. Internal only.\n- 2021-04-27 -- [@gregsantos](https://github.com/gregsantos): Removes `resolveParams`, Updates `resolvers` exported from `sdk`\n\n## 0.0.46-alpha.1 - 2021-05-05\n\n- 2021-05-05 **BREAKING** -- Prepends a transaction domain tag to encoded payload and envelope messages. Transaction domain tags allow signers to identify which messages are intended to represent encoded transactions, and which are not. The Flow protocol has been updated (as of May 5th 2021) to both accept signatures produced from messages prepended with a transaction domain tag, and from messages that are not. The next spork (time and date of next spork are TBD) will _strictly require_ all signatures for transnactions to have been produced from messages prepended with a transaction domain tag. This breaking change requires _all_ users of Flow Client Library and the Flow JavaScript SDK to update their versions to a version greater than or equal to the verison that this change was included in.\n- 2021-05-03 -- Decodes signatures in block responses from a byte array to a hex string\n- 2021-05-03 -- Updates shape of response ADT\n\n## 0.0.45 - 2021-04-27\n\n- 2021-04-27 -- Full VSN Release `@onflow/sdk` 0.0.45-alpha.20 -> 0.0.45\n- 2021-04-23 -- Moves type check utils to `/utils`\n- 2021-04-23 -- Move `createVoucher` to `/utils` to resolve circular dependency in `interaction`\n- 2021-04-22 -- Adds `wallet-utils` `validateSignableTransaction` support for wallets to validate Signable payload\n- 2021-04-20 -- Removes **Deprecated** `params`, `buildParams`\n- 2021-04-21 -- Updates encoding naming of `gasLimit` and `script` to `computeLimit` and `cadence`. Internal only.\n\n## 0.0.45-alpha.20 -- 2021-04-21\n\n- 2021-04-21 -- **BREAKING** The experimental feature `sdk.meta` which allowed for a transaction to send along meta data to an authorization function has been removed because of the unprovable nature of its data and our strict trustless requirements. We believe this removal is in the best interest for js-sdk/fcl end users and will be looking into alternative approaches that provide the same functionality but in a more provable/trustless way. We have no ETA on this features replacement.\n\n## 0.0.45-alpha.19 -- 2021-04-16\n\n- 2021-04-15 -- Adds `createSignableVoucher` for message payload verification by wallet, pass as `voucher` to `PreSignable` and `Signable`\n- 2021-04-15 -- Exposes `config` from SDK.\n- 2021-04-15 -- Removes use of `TextDecoder` from `send-get-account`.\n- 2021-04-13 -- Adds `makeVoucher` for message verification by wallet, pass as `voucher` to `PreSignable` and `Signable`\n- 2021-04-09 -- Internal only - Added `prepAccount` to `interaction`. Update `authorizations`, `payer`, `proposer` builders.\n\n## 0.0.45-alpha.18 -- 2021-04-09\n\n- 2021-04-08 -- Adds `GetCollection` interaction, build, send and decode support.\n- 2021-04-08 -- - Implements Transaction Metadata for media rich wallet transactions\n- 2021-04-08 -- Implements Transaction Metadata for media rich wallet transactions\n  - Adds `metadata` field to `interaction` and provides `meta` builder to include optional metadata with the transaction.\n  - `meta()` accepts the optional fields `title`, `description`, `price`, and `image` as Strings. Invalid types will `throw`. Unsupport fields will be scrubbed.\n\n```js\nsdk.build([\n  sdk.transaction(TRANSFER_NFT),\n  sdk.meta({\n    title: 'Kitty Kangol',\n    description: 'A cool cat hat',\n    price: '10',\n    image: 'https://i.imgur.com/Ol2zPax.png',\n  }),\n])\n\ntype Metadata {\n  title: String\n  description: String\n  price: String\n  image: String\n}\n```\n\n- 2021-04-08 -- Added validation to `metadata` builder.\n- 2021-04-07 -- Internal only. Update `build-limit`\n- 2021-04-07 -- Added `metadata` field to `Signable` in resolve-signatures.\n- 2021-04-06 -- Added `metadata` field to `preSignable` in resolve-accounts. Export `meta` builder from `sdk.js`\n- 2021-04-02 -- Updated `interaction` with metadata object. Added `meta` builder function and test.\n\n## 0.0.45-alpha.16 -- 2021-03-28\n\n- 2021-03-28 -- Added new test suits for `build` and `send`.\n\n## 0.0.45-alpha.15 -- 2021-03-22\n\n- 2021-03-22 -- Fixed an issue where `send-get-block-header` interactions were not able to be sent correctly.\n\n## 0.0.45-alpha.14 -- 2021-03-19\n\n- 2021-03-19 -- Fixed an issue in `send-get-block` and `send-get-block-header` where timestamps were not being decoded to ISO strings properly.\n\n## 0.0.45-alpha.13 -- 2021-03-17\n\n- 2021-03-17 -- Fixed an issue in `send-get-events` where block IDs were not being decoded to strings properly.\n\n## 0.0.45-alpha.12 -- 2021-03-12\n\n- 2021-03-16 -- Fixed issue in `interaction` where `isNumber` did not correctly check if a value is a number or not\n- 2021-03-12 -- Fixed issue where `GetEvents*` interactions were not being sent in correct GRPC request type\n\n## 0.0.45-alpha.10 -- 2021-03-02\n\n- 2021-03-02 -- Fixed issue where `ExecuteScript*` interactions were not being sent in correct GRPC request type\n- 2021-03-02 -- Fixed issue where `GetAccount*` interactions were not being sent in correct GRPC request type\n\n## 0.0.45-alpha.[4-6] -- 2021-02-02\n\n- 2021-02-18 -- Merged `@onflow/send` into `@onflow/sdk`\n- 2021-02-18 -- Merged `@onflow/decode` into `@onflow/sdk`\n- 2021-02-18 -- Merged `@onflow/encode` into `@onflow/sdk`\n- 2021-02-18 -- Merged `@onflow/interaction` into `@onflow/sdk`\n- 2021-02-18 -- Merged `@onflow/response` into `@onflow/sdk`\n- 2021-02-18 -- Merged all `@onflow/resolve-*` into `@onflow/sdk`\n- 2021-02-18 -- Merged all `@onflow/build-*` into `@onflow/sdk`\n\n## 0.0.45-alpha.[1-3] -- 2021-02-02\n\n- 2021-02-02 -- Adds support for new `GetEvents`, `GetBlockHeader`, `GetBlock` interactions.\n\n## 0.0.44 -- 2020-12-11\n\n- 2020-12-11 -- VSN `@onflow/sdk-resolve-ref-block-id` 0.0.0 -> 0.0.7\n- 2020-12-11 -- VSN `@onflow/decode` 0.0.9 -> 0.0.10\n- 2020-12-11 -- VSN `@onflow/send` 0.0.34 -> 0.0.34\n\n## 0.0.43 -- 2020-10-28\n\n- 2020-11-04 -- VSN `@onflow/sdk-resolve-signatures` 0.0.4 -> 0.0.5\n\n## 0.0.42 -- 2020-10-28\n\n- 2020-10-28 -- VSN `@onflow/decode` 0.0.8 -> 0.0.9\n- 2020-10-28 -- VSN `@onflow/sdk-build-authorizations` 0.0.0 -> 0.0.1\n- 2020-10-28 -- VSN `@onflow/sdk-resolve-ref-block-id` 0.0.0 -> 0.0.3\n- 2020-10-28 -- VSN `@onflow/sdk-resolve-signatures` 0.0.3 -> 0.0.4\n\n## 0.0.41 -- 2020-10-28\n\n- 2020-10-28 -- VSN `@onflow/sdk-resolve-signatures` 0.0.2 -> 0.0.3\n\n## 0.0.40 -- 2020-10-28\n\n- 2020-10-28 -- VSN `@onflow/sdk-resolve-signatures` 0.0.1 -> 0.0.2\n\n## 0.0.39 -- 2020-10-08\n\n- 2020-10-08 -- VSN `@onflow/decode` 0.0.7 -> 0.0.8\n- 2020-10-08 -- VSN `@onflow/sdk-build-get-account` 0.0.0 -> 0.0.1\n\n## 0.0.38 -- 2020-10-07\n\n- 2020-10-07 -- Proxy `@onflow/sdk-resolve-ref-block-id` at the top level\n- 2020-10-07 -- Removed export of resolveProposerSequenceNumber (it never worked anyways)\n\n## 0.0.37 -- 2020-10-07\n\n- 2020-10-07 -- VSN `@onflow/sdk-resolve-signatures` 0.0.0 -> 0.0.1\n\n## 0.0.36 -- 2020-10-07\n\n- 2020-10-07 -- Proxy `@onflow/sdk-build-authorizations` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-get-account` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-get-events` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-get-latest-block` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-get-block-by-id` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-get-block-by-height` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-transaction-status` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-limit` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-params` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-arguments` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-proposer` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-payer` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-ping` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-ref` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-script` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-transaction` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-validator` at the top level\n- 2020-10-07 -- Proxy `@onflow/sdk-build-invariant` at the top level\n\n## 0.0.35 -- 2020-09-29\n\n- 2020-09-29 -- Proxy @onflow/sdk-resolve-validators at the top level\n- 2020-09-29 -- Proxy @onflow/sdk-resolve-signatures at the top level\n- 2020-09-29 -- Proxy @onflow/sdk-resolve-accounts at the top level\n- 2020-09-29 -- Proxy @onflow/sdk-resolve-arguments at the top level\n- 2020-09-29 -- VSN `@onflow/send` 0.0.21 -> 0.0.22\n\n## 0.0.34 - 2020-09-29\n\n- 2020-09-29 -- VSN `@onflow/send` 0.0.20 -> 0.0.21\n\n## 0.0.33 - 2020-09-29\n\n- 2020-09-29 -- Proxy sdk.resolveArguments to `@onflow/sdk-resolve-arguments`\n- 2020-09-29 -- VSN `@onflow/sdk-resolve-cadence` 0.0.0 -> 0.0.1\n\n## 0.0.32 -- 2020-09-29\n\n- 2020-09-29 -- Deprecate resolverParams\n\n## 0.0.31 -- 2020-08-25\n\n- 2020-08-25 -- VSN `@onflow/send` 0.0.17 -> 0.0.20\n- 2020-08-25 -- VSN `@onflow/interaction` 0.0.9 -> 0.0.10\n- 2020-08-25 -- VSN `@onflow/decode` 0.0.6 -> 0.0.7\n- 2020-08-24 -- Implements GetBlockByHeight and GetBlockById interaction builders.\n- 2020-08-13 -- Updates Readme with an overview of the JS-SDK\n- 2020-08-10 -- Updates Readme\n\n## 0.0.30 -- 2020-7-27\n\n- 2020-07-27 -- VSN `@onflow/send` 0.0.16 -> 0.0.17\n\n## 0.0.29 -- 2020-7-27\n\n- 2020-07-27 -- VSN `@onflow/send` 0.0.15 -> 0.0.16\n\n## 0.0.28 -- 2020-7-13\n\n- 2020-07-13 -- VSN `@onflow/send` 0.0.14 -> 0.0.15\n- 2020-07-20 -- Adds resolveProposerSequenceNumber resolve to resolve proposer sequence numbers where they are unspecified.\n- 2020-07-20 -- Adds resolveRefBlockId resolver to resolve reference block ids on transactions where they are unspecified.\n\n## 0.0.27 -- 2020-7-13\n\n- 2020-07-13 -- VSN `@onflow/send` 0.0.13 -> 0.0.14\n\n## 0.0.26 -- 2020-07-09\n\n- 2020-07-09 -- FIX: resolveSignatures now passes arguments to encoder\n\n## 0.0.25 -- 2020-07-09\n\n- 2020-07-09 -- FIX: no longer lose signatures sometimes\n- 2020-07-07 -- Updates to Readme\n\n## 0.0.24 -- 2020-07-07\n\n- 2020-06-30 -- Update dependency versions\n- 2020-06-22 -- Adds arguments to signature resolver\n- 2020-06-19 -- Adds argument resolver\n- 2020-06-19 -- Adds argument builder\n- 2020-06-08 -- Added validator builder\n\n## 0.0.23 -- 2020-06-04\n\n- 2020-06-04 -- VSN `@onflow/encode` 0.0.2 -> 0.0.3\n\n## 0.0.22 -- 2020-06-03\n\n- 2020-06-03 -- VSN `@onflow/encode` 0.0.2 -> 0.0.3\n- 2020-06-03 -- VSN `@onflow/send` 0.0.11 -> 0.0.12\n\n## 0.0.21 -- 2020-05-15\n\n- 2020-05-15 -- VSN `@qvvg/templar` 0.0.0 -> 0.0.1\n\n## 0.0.20 -- 2020-05-07\n\n- 2020-05-07 **BREAKING** -- Proposers accept authorization object\n\n## 0.0.19 -- 2020-05-07\n\n- Same as 0.0.18 but the package-lock was updated\n\n## 0.0.18 -- 2020-05-07\n\n- 2020-05-07 -- Params resolver parses params correctly\n- 2020-05-07 -- Allows authorizer payer and proposer to be the same\n\n## 0.0.17 -- 2020-05-06\n\n- 2020-05-06 -- VSN `@onflow/send` 0.0.9 -> 0.0.10\n- 2020-05-06 -- VSN `@onflow/interaction` 0.0.6 -> 0.0.7\n- 2020-05-05 -- Allows params to accept async resolver functions that return a param\n\n## 0.0.16 -- 2020-05-05\n\n- 2020-05-05 -- Fix bug where `resolveAccounts` was mutating a copy of an account instead of the original account\n\n## 0.0.15 -- 2020-05-05\n\n- 2020-05-05 -- VSN `@onflow/send` 0.0.8 -> 0.0.9\n- 2020-05-05 -- VSN `@onflow/interaction` 0.0.5 -> 0.0.6\n- 2020-05-05 -- VSN `@onflow/decode` 0.0.5 -> 0.0.6\n- 2020-05-04 **BREAKING** -- Updates sdk according to updated interaction ADT\n\n## 0.0.14 -- 2020-04-20\n\n- 2020-04-20 -- VSN `@onflow/send` 0.0.7 -> 0.0.8\n\n## 0.0.13 -- 2020-04-20\n\n- 2020-04-20 -- Updates proposer to set only on the top level proposer field on the ix and updates tests.\n- 2020-04-20 -- VSN `@onflow/send` 0.0.5 -> 0.0.7\n- 2020-04-20 -- VSN `@onflow/interaction` 0.0.4 -> 0.0.5\n- 2020-04-20 -- VSN `@onflow/decode` 0.0.4 -> 0.0.5\n- 2020-04-20 -- VSN `@onflow/encode` 0.0.1 -> 0.0.2\n- 2020-04-20 -- VSN `@onflow/interaction` 0.0.3 -> 0.0.4\n- 2020-04-20 **BREAKING** -- No longer exporting `nonce`\n- 2020-04-20 **BREAKING** -- No longer exporting `resolvePayload`\n- 2020-04-20 -- Remove dep `rlp`\n- 2020-04-20 -- Remove dep `@onflow/bytes`\n- 2020-04-20 -- Add dep `@onflow/encode` 0.0.1\n- 2020-04-19 **BREAKING** Updates `resolveAuthorizations()` according to the signing requirements of the latest AccessAPI spec. Adds `payer` builder.\n\n## 0.0.12 -- 2020-04-18\n\n- 2020-04-18 -- VSN send 0.0.4 -> 0.0.5\n- 2020-04-18 -- VSN bytes 0.0.1 -> 0.0.2\n- 2020-04-18 -- VSN decode 0.0.1 -> 0.0.4\n- 2020-04-18 -- VSN jest 25.1.0 -> 25.3.0\n- 2020-04-18 -- VSN microbundle 0.11.0 -> 0.12.0-next.8\n- 2020-04-18 **BREAKING** -- Changes `getTransaction(txId)` to `getTransactionStatus(txId)` in accordance to the updated AccessAPI spec.\n- 2020-04-17 -- Adds `proposer` builder to add a proposer to a transaction interaction.\n\n## 0.0.11 -- 2020-04-17\n\n- Pre Changelog\n"
  },
  {
    "path": "packages/sdk/TRANSITIONS.md",
    "content": "# Transitions\n\n## 0010 Deprecate interaction\n\n- **Date:** Sept 25th 2023\n- **Type:** Deprecation of interaction method\n\nThe \"interaction\" method has been deprecated and will be removed in future versions.\n\nPlease update your code to use the \"initInteraction\" method for improved functionality and compatibility.\n\n```javascript\n  // Deprecated:\n  const result = interaction();\n \n  // Recommended:\n  const result = initInteraction();\n```\n\n## 0009 Deprecate default compute limit\n\n- **Date:** Jun 7th 2022\n- **Type:** Deprecation of default compute limit (DEFAULT_COMPUTE_LIMIT=10)\n\nPreviously, providing a compute limit for transactions was optional and a fallback existed (DEFAULT_COMPUTE_LIMIT=10).  This will be removed in a future version of the JS-SDK.\n\nIn lieu of this feature, a configuration option has been added `fcl.limit` which allows developers to specify their desired fallback compute limit.  This configuration option can be used as such:\n\n```javascript\nimport {config} from \"@onflow/config\"\n\nconst DEFAULT_COMPUTE_LIMIT = ...\nconfig().put(\"fcl.limit\", DEFAULT_COMPUTE_LIMIT)\n```\n\nCompute limits may still be applied explicitly in a transaction, with these taking priority above `fcl.limit`, as follows:\n\n```javascript\nimport * as sdk from \"@onflow/fcl\"\n\nconst TX_COMPUTE_LIMIT = ...\n\nsdk.send([\n  sdk.transaction`MY CADENCE CODE...`,\n  sdk.limit(TX_COMPUTE_LIMIT),\n  sdk.proposer(...),\n  sdk.authorizations([...]),\n  sdk.payer([...]),\n  ...\n])\n```\n\n\n## 0008 Deprecate Latest Block Method\n\n- **Date:** Jan 14th 2022\n- **Type:** Deprecation of latestBlock method\n\nFor JS-SDK versions 0.0.55 and below, getting the latest block looked like this:\n\n```javascript\nlet options = {...}\nlet isSealed = false\n\nawait sdk.latestBlock(isSealed, options)\n```\n\nGetting the latest block now works slightly differently. If you wish to get the latest block, you must now pass in arguments\nlike such:\n\n```javascript\nlet options = {...}\n\nawait sdk.block() // gets the latest finalized block\nawait sdk.block({sealed: true}) // get latest sealed block\n```\n\nThe first argument to `block` is an optional object with either `sealed`, `id`, or `height`. The second argument is for optional options.\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, `latestBlock` may\ncease to exist.\n\n## 0007 Deprecate Opts First Arg Latest Block\n\n- **Date:** Feb 2nd 2021\n- **Type:** Deprecation of options as first argument to latestBlock\n- **Removed:** Jan 14th 2022\n\nFor JS-SDK versions 0.0.44 and below, getting the latest block looked like this:\n\n```javascript\nlet options = {...}\n\nawait sdk.latestBlock(options)\n```\n\nGetting the latest block now works slightly differently. If you wish to get the latest block, you must now pass in arguments\nlike such:\n\n```javascript\nlet options = {...}\nlet isSealed = false\n\nawait sdk.latestBlock(isSealed, options)\n```\n\nThe first argument to `latestBlock` must be a boolean specifying if the latest block must be sealed or not, followed by send options\nas the second argument.\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, `latestBlock` may\ncease to accept options as the first argument.\n\n## 0006 Deprecate Get Latest Block Builder\n\n- **Date:** Feb 2nd 2021\n- **Type:** Deprecation of getLatestBlock Builder\n\nFor JS-SDK versions 0.0.44 and below, getting the latest block looked like this:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getLatestBlock()\n]).then(sdk.decode)\n```\n\nGetting the latest block now works slightly differently. If you wish to get the latest block, you must now use the\n`getBlock` builder like such:\n\n```javascript\nlet isSealed = false\n\nawait sdk.send(sdk.build([\n  sdk.getBlock(isSealed)\n]).then(sdk.decode)\n```\n\nYou can optionally specify if you require the latest block to be sealed or not by passing in an isSealed boolean as the first\nargument to the `getBlock` builder.\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, the `getLatestBlock` builder\nmay cease to exist.\n\n## 0005 Deprecate Start End Get Events Builder\n\n- **Date:** Feb 2nd 2021\n- **Type:** Deprecation of getEvents Builder\n\nFor JS-SDK versions 0.0.44 and below, getting events in a block height range looked something like this:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getEvents(\"MyEvent\", 123, 456)\n]).then(sdk.decode)\n```\n\nGetting events now works slightly differently. If you wish to get events in a block height range, you must now use the\n`getEventsAtBlockHeightRange` builder like such:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getEventsAtBlockHeightRange(\"MyEvent\", 123, 456)\n]).then(sdk.decode)\n```\n\nIf you wish to get events in a selection of blocks specified by block ids, you can now use the `getEventsAtBlockIds` builder\nlike such:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getEventsAtBlockIds(\"MyEvent\", [\n    \"c4f239d49e96d1e5fbcf1f31027a6e582e8c03fcd9954177b7723fdb03d938c7\",\n    \"5dbaa85922eb194a3dc463c946cc01c866f2ff2b88f3e59e21c0d8d00113273f\"\n  ])\n]).then(sdk.decode)\n```\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, the `getEvents` builder\nmay cease to exist.\n\n## 0004 Deprecate Get Block By Id Builder\n\n- **Date:** Feb 2nd 2021\n- **Type:** Deprecation of getBlockById Builder\n\nFor JS-SDK versions 0.0.44 and below, getting a block at a specific block id looked something like this:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getBlockById(\"c4f239d49e96d1e5fbcf1f31027a6e582e8c03fcd9954177b7723fdb03d938c7\")\n]).then(sdk.decode)\n```\n\nMoving forward, getting a block by a specific block id will work by specifying that you want to get a block, and then the block id\nof the block you wish to get like such:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getBlock(),\n  sdk.atBlockId(\"c4f239d49e96d1e5fbcf1f31027a6e582e8c03fcd9954177b7723fdb03d938c7\")\n]).then(sdk.decode)\n```\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, the `getBlockById` builder\nmay cease to exist.\n\n## 0003 Deprecate Get Block By Height Builder\n\n- **Date:** Feb 2nd 2021\n- **Type:** Deprecation of getBlockByHeight Builder\n\nFor JS-SDK versions 0.0.44 and below, getting a block at a specific block height looked something like this:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getBlockByHeight(123)\n]).then(sdk.decode)\n```\n\nMoving forward, getting a block by a specific block height will work by specifying that you want to get a block, and then the block height\nof the block you wish to get like such:\n\n```javascript\nawait sdk.send(sdk.build([\n  sdk.getBlock(),\n  sdk.atBlockHeight(123)\n]).then(sdk.decode)\n```\n\nWe recommend migrating your code to the new format as soon as you can. In future versions of the JS-SDK, the `getBlockByHeight` builder\nmay cease to exist.\n\n## 0002 Deprecate Resolve Params Resolver\n\n- **Date:** Sept 29th 2020\n- **Issue:** [#177](https://github.com/onflow/fcl-js/issues/177)\n- **Type:** Deprecation of resolveParams Resolver\n\nAt the time of writing this if you are writing script and transaction interactions and building up your resolvers yourself you will likely have a piece of code that looks something like this.\n\n```javascript\nimport * as sdk from \"@onflow/sdk\"\n\nsdk.resolve(ix, [\n  sdk.resolveParams,\n])\n```\n\nWe are introducing a more generic resolver that covers core cadence concepts: `@onflow/sdk-resolve-cadence`.\nThe above code using `sdk.resolveParams` will still work for now as a proxy to `@onflow/sdk-resolve-cadence` (with deprecation notice), but we can't promise it will stay around forever in the future.\n\nInstead we would recommend that you use the following in its place:\n\n```javascript\nimport * as sdk from \"@onflow/sdk\"\nimport {resolveCadence} from \"@onflow/sdk-resolve-cadence\"\n\nsdk.resolve(ix, [\n  resolveCadence,\n])\n```\n\nAs part of our ongoing effort to break the sdk down into smaller and smaller pieces, at this time we are not considering adding in an `sdk.resolveCadence`.\n\n## 0001 Deprecate Params\n\n- **Date:** July 22nd 2020\n- **Issue:** [#177](https://github.com/onflow/fcl-js/issues/177)\n- **Type:** Deprecation of Certain Functionality\n\nA common way of getting values from our javascript into our cadence code has been like this:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport * as t from \"@onflow/types\"\n\nconst doTheThing = async (a, b, msg) => {\n  const response = await fcl.send([\n    fcl.script`\n      pub fun main(): Int {\n        log(\"${p => p.msg}\")\n        return ${p => p.a} + ${p => p.b}\n      }\n    `,\n    fcl.params([\n      fcl.param(5, t.Identity, \"a\"),\n      fcl.param(6, t.Identity, \"b\"),\n      fcl.param(\"hmm\", t.Identity, \"msg\"),\n    ]),\n  ])\n\n  return fcl.decode(response)\n}\n```\n\nWhere `a` and `b` are integers in the users control, and `msg` is a string in the applications control.\n\nWe have a couple issues with this, which are better listed out (here)[https://github.com/onflow/fcl-js/issues/177], which is leading us to modify a couple parts of this functionality.\n\nWith the addition of `Arguments` in the Cadence code we would prefer the above to be written like this:\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport * as t from \"@onflow/types\"\n\nconst doTheThing = async (a, b, msg) => {\n  const response = await fcl.send([\n    fcl.script`\n      pub fun main(a: Int, b: Int): Int {\n        log(\"${msg}\")\n        return a + b\n      }\n    `,\n    fcl.args([fcl.arg(5, t.Int), fcl.arg(6, t.Int)]),\n  ])\n\n  return fcl.decode(response)\n}\n```\n\nOnce again, where `a` and `b` are values the user controls, and `msg` is a value that the application controls.\n\n**Arguments also work with transactions**\n\nYou might have something like this before:\n\n```javascript\nconst doTheThing = async (m1, m2, m3) => {\n  const response = await fcl.send([\n    fcl.transaction`\n      transaction {\n        execute {\n          log(\"${p => p.m1}\")\n          log(\"${p => p.m2}\")\n          log(\"${p => p.m3}\")\n        }\n      }\n    `,\n    fcl.params([\n      fcl.param(m1, t.Identity, \"m1\"),\n      fcl.param(m2, t.Identity, \"m2\"),\n      fcl.param(m3, t.Identity, \"m3\"),\n    ]),\n    // ...payer/authorizations/proposer\n  ])\n}\n```\n\nWith arguments you can do it like this:\n\n```javascript\nconst doTheThing = async (m1, m2, m3) => {\n  const response = await fcl.send([\n    fcl.transaction`\n      transaction(m1: String, m2: String, m3: String) {\n        execute {\n          log(m1)\n          log(m2)\n          log(m3)\n        }\n      }\n    `,\n    fcl.args([\n      fcl.arg(m1, t.String),\n      fcl.arg(m2, t.String),\n      fcl.arg(m3, t.String),\n    ]),\n    // ...payer/authorizations/proposer\n  ])\n}\n```\n\n**Some things to be aware of:**\n\nImport addresses have to be done as standard interpolation.\n\n```javascript\nimport * as fcl from \"@onflow/fcl\"\nimport * as t from \"@onflow/types\"\n\nconst CONTRACT_ADDRESS = process.env.CONTRACT_ADDRESS\n\nconst doTheThing = async barId => {\n  const response = await fcl.send([\n    fcl.script`\n      import Foo from ${CONTRACT_ADDRESS}\n\n      pub fun main(id: UFix64): Foo.Bar {\n        return Foo.getBarWithId(id: id)\n      }\n    `,\n    fcl.args([fcl.arg(barId, t.UFix64)]),\n  ])\n\n  return fcl.decode(response)\n}\n```\n"
  },
  {
    "path": "packages/sdk/docs/extra.md",
    "content": "## Connect\n\nBy default, the library uses HTTP to communicate with the access nodes and it must be configured with the correct access node API URL. An error will be returned if the host is unreachable.\n\nExample:\n\n```typescript\nimport { config } from \"@onflow/fcl\"\n\nconfig({\n  \"accessNode.api\": \"https://rest-testnet.onflow.org\"\n})\n```\n\n## Querying the Flow Network\n\nAfter you have established a connection with an access node, you can query the Flow network to retrieve data about blocks, accounts, events and transactions. We will explore how to retrieve each of these entities in the sections below.\n\n## Mutate Flow Network\n\nFlow, like most blockchains, allows anybody to submit a transaction that mutates the shared global chain state. A transaction is an object that holds a payload, which describes the state mutation, and one or more authorizations that permit the transaction to mutate the state owned by specific accounts.\n\nTransaction data is composed and signed with help of the SDK. The signed payload of transaction then gets submitted to the access node API. If a transaction is invalid or the correct number of authorizing signatures are not provided, it gets rejected.\n\n## Transactions\n\nA transaction is nothing more than a signed set of data that includes script code which are instructions on how to mutate the network state and properties that define and limit it's execution. All these properties are explained below.\n\n**Script** field is the portion of the transaction that describes the state mutation logic. On Flow, transaction logic is written in [Cadence](https://cadence-lang.org/docs). Here is an example transaction script:\n\n```typescript\ntransaction(greeting: string) {\n  execute {\n    log(greeting.concat(\", World!\"))\n  }\n}\n```\n\n**Arguments**. A transaction can accept zero or more arguments that are passed into the Cadence script. The arguments on the transaction must match the number and order declared in the Cadence script. Sample script from above accepts a single `String` argument.\n\n**Proposal key** must be provided to act as a sequence number and prevent replay and other potential attacks.\n\nEach account key maintains a separate transaction sequence counter; the key that lends its sequence number to a transaction is called the proposal key.\n\nA proposal key contains three fields:\n\n- Account address\n- Key index\n- Sequence number\n\nA transaction is only valid if its declared sequence number matches the current on-chain sequence number for that key. The sequence number increments by one after the transaction is executed.\n\n**Payer** is the account that pays the fees for the transaction. A transaction must specify exactly one payer. The payer is only responsible for paying the network and gas fees; the transaction is not authorized to access resources or code stored in the payer account.\n\n**Authorizers** are accounts that authorize a transaction to read and mutate their resources. A transaction can specify zero or more authorizers, depending on how many accounts the transaction needs to access.\n\nThe number of authorizers on the transaction must match the number of `&Account` parameters declared in the prepare statement of the Cadence script.\n\nExample transaction with multiple authorizers:\n\n```typescript\ntransaction {\n  prepare(authorizer1: &Account, authorizer2: &Account) { }\n}\n```\n\n**Gas limit** is the limit on the amount of computation a transaction requires, and it will abort if it exceeds its gas limit.\nCadence uses metering to measure the number of operations per transaction. You can read more about it in the [Cadence documentation](https://cadence-lang.org/docs).\n\nThe gas limit depends on the complexity of the transaction script. Until dedicated gas estimation tooling exists, it's best to use the emulator to test complex transactions and determine a safe limit.\n\n**Reference block** specifies an expiration window (measured in blocks) during which a transaction is considered valid by the network.\nA transaction will be rejected if it is submitted past its expiry block. Flow calculates transaction expiry using the _reference block_ field on a transaction.\nA transaction expires after `600` blocks are committed on top of the reference block, which takes about 10 minutes at average Mainnet block rates.\n"
  },
  {
    "path": "packages/sdk/docs-generator.config.js",
    "content": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nmodule.exports = {\n  customData: {\n    extra: fs\n      .readFileSync(path.join(__dirname, \"docs\", \"extra.md\"), \"utf8\")\n      .trim(),\n  },\n}\n"
  },
  {
    "path": "packages/sdk/package.json",
    "content": "{\n  \"name\": \"@onflow/sdk\",\n  \"version\": \"1.13.7\",\n  \"description\": \"Low-level JavaScript/TypeScript SDK for interacting with the Flow blockchain.\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"jest\": {\n    \"globals\": {\n      \"PACKAGE_CURRENT_VERSION\": \"TESTVERSION\"\n    }\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/uuid\": \"^9.0.8\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/sdk.ts\",\n  \"main\": \"dist/sdk.js\",\n  \"module\": \"dist/sdk.module.js\",\n  \"unpkg\": \"dist/sdk.umd.js\",\n  \"types\": \"types/sdk.d.ts\",\n  \"scripts\": {\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\",\n    \"generate-docs\": \"node ../../docs-generator/generate-docs.js\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/config\": \"1.11.1\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/transport-http\": \"1.15.6\",\n    \"@onflow/typedefs\": \"1.8.0\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@onflow/util-actor\": \"1.3.5\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@onflow/util-template\": \"1.2.4\",\n    \"deepmerge\": \"^4.3.1\",\n    \"events\": \"^3.3.0\",\n    \"sha3\": \"^2.1.4\",\n    \"uuid\": \"^9.0.1\"\n  }\n}\n"
  },
  {
    "path": "packages/sdk/readme.md",
    "content": "---\ntitle: SDK\ndescription: A collection of modules that make interacting with Flow easier\n---\n\n\n\n## Status\n\n> For release updates, [see the repo](https://github.com/onflow/fcl-js/releases)\n\nThis package is working and in active development, breaking changes may happen.\n\n## Install\n\n```bash\nnpm install --save @onflow/sdk\n```\n\n## Flow JS-SDK\n\n#### Introduction\n\nWelcome, we're glad you're here.\n\nThe Flow JS-SDK is a relatively low-level suite of tools that allow JavaScript and TypeScript applications to interact with the Flow Blockchain.\n\nIn doing so, the Flow JS-SDK employs several concepts which empower developers to create, and operate upon what we call _Interactions_ that can be sent to the Flow Blockchain, and what we call _Responses_ that are returned from the Flow Blockchain.\n\nInteractions have a Type, which tells the Flow JS-SDK itself how to react to preparing, operating upon and sending this specific interaction. Types of Interactions include, Get Account, Execute Script, Execute Transaction, Get Events, Get Latest Block and Get Transaction Status.\n\nFurther in this document we will outline how to create such Interactions for use in your TypeScript or JavaScript applications, and how to deal with the Responses that the Flow Blockchain returns.\n\n## Phases\n\nConceptually, there are four phases to the Flow JS-SDK.\n\nBuild -> Resolve -> Send -> Decode\n\nWe will walk through each phase to explain how it is relevant for your applications and how you use the Flow JS-SDK.\n\n## Build\n\nBuild is the phase of your use of the Flow JS-SDK where you _Build_ up a specific interaction. During this phase you specify upon an interaction what information you currently know. This may include the specific Cadence code for a Script you wish to execute, or the address for the Account of which you wish to get. As you specify information, the type of the interaction you are composing becomes clear. For example, if you Build an interaction and specify that you want to get an account for a specific address, you are composing an interaction of type Get Account.\n\nThe Flow JS-SDK exposes what we call a _build_ function, and a suite of _builder_ functions. The build function consumes as its argument an array of builder functions within it. Each builder function consumes information that you know, and that you want to place into the interaction.\n\nExample 1: Building an Execute Script Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst interaction = await sdk.build([\n   sdk.script`\n       pub fun main(): Int {\n           return 721\n       }\n   `\n])\n```\n\nIn Example 1, we're composing an Execute Script Interaction, because we have built an interaction and specified a Script Cadence code within it using the sdk.script builder.\n\nExample 2: Building an Execute Get Account Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst interaction = await sdk.build([\n   sdk.getAccount(\"0x123ABC456DEF\")\n])\n```\n\nIn Example 2, we're composing a Get Account Interaction, because we have built an interaction and specified an address within it using the sdk.getAccount builder.\n\n## Build - Transactions\n\nOn Flow, you can also execute transactions. Transaction Interactions can be built as well using the Flow JS-SDK. Transaction Interactions require a few pieces of information when they're being built. They require, the Cadence Code for the Transaction, any arguments that the Transaction Requires, a Proposer for the Transaction, a Payer for the Transaction and a list of Authorizers for the transaction.\n\nThe Proposer of the transaction represents the Account on Flow for which one of its keys will have its sequence number incremented by the transaction.\n\nThe Payer of the transaction represents the Account on Flow for which will pay for the transaction.\n\nEach Authorizer of the transaction represents an Account on Flow which consents to have its state modified by this transaction.\n\nThe builders for the Proposer, Payer and each Authorizer consume an _authorization_ which is built using its own builder function. An authorization is a data structure which is constructed by providing an Address, Signing Function and a keyId, and optionally a sequence number (more on this later).\n\nThe Address for an Authorization corresponds to the address for the Flow Account this authorization represents. The Signing Function is a function which can produce a Signature for a transaction on behalf of the specified account. The keyId represents the id of the key on the Account which needs to be used to produce the Signature for a transaction. An Authorization also optionally takes a sequence number, which is the sequence number for the key corresponding to the keyId of the Flow Account this authorization represents, if this authorization is for a proposer. (Again, more on this later. Observe how we choose not to provide this piece of information in Example 3, this decision will be explained later).\n\nExample 3: Building a Transaction Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst signingFunction = (message) => {\n    // Signing logic would go here\n    return { signature: \"generated-signature\" }\n}\n\nconst interaction = await sdk.build([\n    sdk.transaction`transaction() { prepare(acct: AuthAccount) {} execute { log(\"Hello, Flow!\") } }`,\n    sdk.payer(sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)),\n    sdk.proposer(sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)),\n    sdk.authorizations([sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)]),\n])\n```\n\nIn Example 3, we build a Transaction Interaction by building an interaction and specifying transaction code, a payer, proposer and list of authorizers using their corresponding builder functions. Inside the payer, proposer and each authorizer, we call the authorization builder function and provide the required address, signing function and keyId that will be used in that authorization.\n\n## Resolve\n\nAfter Build, the next phase of use of the JS-SDK is the Resolve phase. During Build, we specified onto the Interaction we're building the information that we currently know. Things like the Cadence Code we wish to have executed for a Script Interaction or Transaction Interaction, or the authorizations for a payer or proposer, or the address of the account we wish for get for a Get Account Interaction.\n\nSome things, however, we don't know. For example, when developing your dApp, you don't know the signature that will be produced when a user signs a transaction. You don't know the specific encoding that your Interaction needs to be in, or maybe you don't yet know the sequence number for a transactions proposer authorization. All of these things need to be discovered, produced or conceptually _resolved_ before your Interaction can be sent to the Flow Blockchain.\n\nThis is where the _Resolve_ phase comes in. Resolve takes your built interaction containing all the information you do know and does its best to get it into a position where it can be sent to the Flow Blockchain. The Flow JS-SDK comes with several _resolver_ functions that your dApp can use to do just this.\n\nExample 4: Building an Execute Script Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\nconst builtInteraction = await sdk.build([\n    sdk.script`\n        pub fun main(msg: String): String {\n            return \"Hello, Flow!\"\n        }\n    `,\n    sdk.args([ sdk.arg(\"Hello, Flow\", t.String) ])\n])\n\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n    sdk.resolveParams,\n    sdk.resolveArguments,\n])\n```\n\nIn Example 4 we Build an Execute Script Interaction by using the script builder to specify a Cadence script and the args and arg builders to specify some arguments to pass into the Cadence Script. To Resolve this built interaction, we pipe'd the built interaction through an array of resolvers. The resolveParams resolver encoded the Cadence script into a format the Flow Blockchain accepts, and the resolveArguments resolver prepared the arguments into the correct encoding that the Flow Blockchain accepts.\n\nExample 5: Building a Transaction Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst signingFunction = (message) => {\n    // Signing logic would go here\n    return { signature: \"generated-signature\" }\n}\n\nconst builtInteraction = await sdk.build([\n    sdk.transaction`transaction(msg: String) { prepare(acct: AuthAccount) {} execute { log(msg) } }`,\n    sdk.args([sdk.arg(\"Hello, Flow!\", types.String)]),\n    sdk.payer(sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)),\n    sdk.proposer(sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)),\n    sdk.authorizations([sdk.authorization(\"0xf8d6e0586b0a20c7\", signingFunction, 0)]),\n])\n\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n    sdk.resolveArguments,\n    sdk.resolveParams,\n    sdk.resolveAccounts,\n    sdk.resolveRefBlockId({ node: \"http://localhost:8080\" }),\n    sdk.resolveProposerSequenceNumber({ node: \"http://localhost:8080\" }),\n    sdk.resolveSignatures,\n])\n```\n\nIn Example 5 we build a Transaction Interaction by building an interaction and calling the transaction builder with a piece of transaction Cadence code, and then specify an authorization for the payer, proposer and one authorizer.\n\nAfter the Transaction Interaction is built, we pipe it through a series of resolvers. We resolve the reference block id to execute this transaction against by calling the resolveRefBlockId resolver. We resolve the sequence number for the proposer authorization for this transaction by calling the resolveProposerSequenceNumber resolver. Then we resolve the arguments and params for the transaction by calling the resolveArguments and resolveParams resolvers. We then call the resolveAccounts resolver to prepare each specified authorization into a format that they could be used to produce their correct signature(s) for the transaction. Finally, at the end, we call the resolveSignatures resolver which will asynchronously use the signingFunction available for the specified authorizations to retrieve a signature for each.\n\n## Send\n\nOnce an Interaction has been _Built_ and, if necessary, _Resolved_ it can then be _Sent_ to the Flow Blockchain. Fortunately, sending to the Flow Blockchain is simple. The Flow JS-SDK exposes a Send function which consumes an Interaction and some configuration, and returns a data structure called a _Response_ (more on this later).\n\nExample 6: Sending an Execute Script Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\nconst builtInteraction = await sdk.build([\n    sdk.script`\n        pub fun main(msg: String): String {\n            return \"Hello, Flow!\"\n        }\n    `,\n    sdk.args([ sdk.arg(\"Hello, Flow\", t.String) ])\n])\n\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n    sdk.resolveParams,\n    sdk.resolveArguments,\n])\n\n// The response contains the raw result from the access node\nconst response = await sdk.send(resolvedInteraction, { node: \"my-access-node-url\" })\n```\n\nIn Example 6 we use the Flow JS-SDK send function to send an Interaction to the Flow Blockchain, and receive back a Response. Notice how the send function consumes both the resolved interaction as well as an object of configuration. The key value pair `node: \"my-access-node-url\"` on this configuration object tells the send function where to send this interaction to. The node here must point to the Flow access node of your choice, be that for the Flow main-net, testnet, emulator or elsewhere.\n\n## Decode\n\nThe Flow JS-SDK send function returns a response. This Response is a Data Structure that must be _decoded_ into a format that you intuitively want. For example, if you send an Execute Script Interaction to the Flow Blockchain and inside that Interaction was a Cadence script that when executed returns the Integer 1, then the response you intuitively want is the integer 1 represented as the JavaScript number 1. If you send a Get Account Interaction to the Flow Blockchain, then the response you intuitively want is a JavaScript object containing information of that Flow Account, not the entire content of the Response Data Structure itself.\n\nThis is where the decode phase comes in. The Flow JS-SDK exposes a function `decode` that consumes a response and returns back what you intuitively expect.\n\nFor the available Interaction types, decoding responses for them produces values like such:\n\n- Decoding a Transaction Interaction returns the Transaction ID for the submitted Transaction Interaction\n- Decoding an Execute Script Interaction returns the JavaScript equivalently typed values for the value returned by the Cadence Script that was Executed.\n- Decoding a Get Account Interaction returns a JavaScript object containing the information for the account.\n- Decoding a Get Events Interaction returns a JavaScript array of JavaScript objects each containing the relevant information for each Event.\n- Decoding a Get Transaction Status interaction returns a JavaScript object of relevant information about the status of a transaction.\n- Decoding a Get Latest Block interaction returns a JavaScript object of relevant information of the Latest Block.\n\nExample 7: Decoding an Execute Script Interaction\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\nconst builtInteraction = await sdk.build([\n    sdk.script`\n        pub fun main(int1: Int, int2: Int): Int {\n            return int1 + int2\n        }\n    `,\n    sdk.args([ sdk.arg(1, t.Int), sdk.arg(2, t.Int) ])\n])\n\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n    sdk.resolveParams,\n    sdk.resolveArguments,\n])\n\nconst response = await sdk.send(resolvedInteraction, { node: \"my-access-node-url\" })\n\nconst decoded = await sdk.decode(response)\n\nconsole.assert(3 === decoded)\nconsole.assert(typeof decoded === \"number\")\n```\n\nIn Example 7 we illustrate how intuitively the decoded value returned from calling decode on the response returned from this Execute Script interaction must be the JavaScript number 3. This is because the Execute Script interaction contains Cadence code, which when executed with the included script arguments, adds the Cadence Integer 1 and Cadence Integer 2 together to return the Cadence Integer 3. Since there is no native concept of a Cadence Integer of value 3 in JavaScript, when this response is decoded, we intuitively expect the decoded value to be the JavaScript number 3.\n\nDecode does several things under the hood to take your response into something you'd like to consume in your JS Applications. At a high level, it returns the relevant information from the response data structure, and if there are any Cadence values, decodes those Cadence values into conceptually equivalent JavaScript values and types.\n\n## Custom Decoders\n\nCustom Decoders are a concept available in the Flow JS-SDK which allows developers to, when decoding a response, exchange any Cadence typed values into their desired JavaScript value.\n\nCustom Decoders are declared by passing a configuration object of key value pairs into the decode function. The keys included in this object correspond to the Cadence type you wish to provide a custom decoder for, and the value must be an asynchronous function which returns your desired JavaScript value for the type. The keys in this object can optionally be regex values declared by writing a regular expression between two forward slashes (ie: \"/my-regex-exp/\").\n\nExample 8: Using a Custom Decoder to decode an Execute Script interaction.\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\nconst builtInteraction = await sdk.build([\n    sdk.script`\n        pub struct Point {\n            pub var x: Int\n            pub var y: Int\n\n            init(x: Int, y: Int) {\n                self.x = x\n                self.y = y\n            }\n        }\n\n        pub fun main(x: Int, y: Int): Point {\n            return Point(x: x, y: y)\n        }\n    `,\n    sdk.args([ sdk.arg(123, t.Int), sdk.arg(456, t.Int) ])\n])\n\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n    sdk.resolveParams,\n    sdk.resolveArguments,\n])\n\nconst response = await sdk.send(resolvedInteraction, { node: \"my-access-node-url\" })\n\n// Create a custom type that we'll convert our Point into\ninterface PointInterface {\n    x: number;\n    y: number;\n}\n\nclass Point implements PointInterface {\n    x: number;\n    y: number;\n    created_at: number;\n\n    constructor({ x, y }: PointInterface) {\n        this.x = x;\n        this.y = y;\n        this.created_at = Date.now();\n    }\n}\n\nconst decoded: Point = await sdk.decode(response, {\n    \"/Point/\": async (point: PointInterface) => new Point(point)\n})\n\nconsole.assert(decoded.x === 123);\nconsole.assert(decoded.y === 456);\nconsole.assert(decoded instanceof Point);\n```\n\nIn Example 8 we declare an Execute Script interaction with Cadence code that returns a Point Cadence struct. If no custom decoders were declared, the returned Cadence Point struct would by default be decoded into a JavaScript object with key value pairs for its x and y variables. However, in this example we declare a custom decoder onto the call to decode which includes a regular expression that will match to the Point struct and return a new instance of the Point class that is declared just above.\n\n## Flow JS-SDK Usage\n\n### Example: Building A Transaction Interaction\n\nBuilding an interaction produces an unresolved interaction. For example, to build a transaction interaction you must call `sdk.build([...])`, and pass in the sequence of builders you want to use to compose that transaction interaction. The example below highlights one way to build a transaction interaction:\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\nconst signingFunction = (message) => {\n    // Signing logic would go here\n    return { signature: \"generated-signature\" }\n}\n\n// Optional: define a specific sequence number\nconst seqNum: number = 42\n\nconst builtTxIx = await sdk.build([\n  sdk.transaction`transaction(msg: String) { prepare(acct: AuthAccount) {} execute { log(msg) } }`,\n  sdk.args([sdk.arg(\"Hello, Flow!\", t.String)]),\n  sdk.payer(sdk.authorization(\"0x01\", signingFunction, 0)),\n  sdk.proposer(sdk.authorization(\"0x01\", signingFunction, 0, seqNum)),\n  sdk.authorizations([sdk.authorization(\"0x01\", signingFunction, 0)]),\n])\n```\n\n### Example: Resolving A Transaction Interaction\n\nOnce a transaction interaction is built, it's still not quite ready to be sent to the Access Node. To further prepare it to be ready to be sent to the Access Node, you must resolve it by piping it through a series of resolvers. Resolvers are functions that consume an interaction and attempt to fill in or prepare any missing pieces of it to get it ready to be sent to the Access API. The example below highlights one way to resolve a transaction interaction:\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst resolvedTxIx = await sdk.pipe(builtTxIx, [\n  sdk.resolve([\n    sdk.resolveArguments,\n    sdk.resolveParams,\n    sdk.resolveAccounts,\n    sdk.resolveProposerSequenceNumber({ node: \"http://localhost:8080\" }),\n    sdk.resolveRefBlockId({ node: \"http://localhost:8080\" }),\n    sdk.resolveSignatures\n  ])\n])\n```\n\n### Example: Sending A Transaction Interaction\n\nNow that your transaction interaction is resolved, it can be sent to an Access Node! To send it to an Access Node, you must call `sdk.send(...)` with that interaction, and a configuration object. To specify which Access Node to send your request to, you specify it in the _node_ parameter of the config object. For example, the code below shows how to send your transaction interaction to the Flow Emulator running on _localhost:8080_:\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\nconst options = { \n  node: \"http://localhost:8080\" \n}\n\nconst response = await sdk.send(resolvedTxIx, options)\n\n// You can then decode the response to get the transaction ID\nconst txId: string = await sdk.decode(response)\nconsole.log(\"Transaction ID:\", txId)\n```\n\nThe SDK additionally supplies builders to construct interactions of many different types to interact with the Access Node's various APIs.\n\nPlease reference the provided example project `react-simple` for example code.\n\n### Example: Pre Checking Before Sending A Transaction\n\nAs an extension, it is possible to intercept the voucher before sending a transaction. To do this, use `sdk.voucherIntercept(...)`. This argument is an arbitrary async function that receives a voucher object containing information about the transaction before it is sent. Within this, you can call `sdk.voucherToTxId(voucher)` to get the txId. Furthermore, you can call any API to record this txId before sending the transaction. If an error is thrown in this, the transaction sending process will be aborted.\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\n// Example function to send transaction hash to your backend API\nasync function sendHashToBackend(txId: string) {\n  // Your backend API call logic here\n  console.log(`Sending hash ${txId} to backend`);\n}\n\n// Define signing function\nconst signingFunction = () => ({ signature: \"generated-signature\" });\nconst seqNum: number = 42; // Optional: define a specific sequence number\n\nconst response = await sdk.send(\n  await sdk.resolve(\n    await sdk.build([\n      sdk.transaction`transaction(msg: String) { prepare(acct: AuthAccount) {} execute { log(msg) } }`,\n      sdk.args([sdk.arg(\"Hello, Flow!\", types.String)]),\n      sdk.payer(sdk.authorization(\"0x01\", signingFunction, 0)),\n      sdk.proposer(sdk.authorization(\"0x01\", signingFunction, 0, seqNum)),\n      sdk.authorizations([sdk.authorization(\"0x01\", signingFunction, 0)]),\n      sdk.voucherIntercept(async (voucher: any) => {\n        const txId: string = sdk.voucherToTxId(voucher)\n\n        // You can make an async call to your backend to keep track of the hash\n        await sendHashToBackend(txId)\n\n        // Could throw an error here if you wanted which would halt the transaction.\n        // if (someCondition) throw new Error(\"Transaction aborted due to condition\");\n      }),\n    ])\n  ), { node: \"http://localhost:8080\" })\n```\n\n### GetAccount Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Build and resolve the interaction\nconst interaction = await sdk.build([\n  sdk.getAccount(\"0xf8d6e0586b0a20c7\")\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\nconst account = await sdk.decode(response)\nconsole.log(\"Account balance:\", account.balance)\n```\n\n### GetEvents Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Event type and block range\nconst eventType: string = \"A.1654653399040a61.FlowToken.TokensDeposited\"\nconst startBlock: number = 10000\nconst endBlock: number = 10100\n\n// Build and resolve the interaction\nconst interaction = await sdk.build([\n  sdk.getEvents(eventType, startBlock, endBlock),\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\nconst events = await sdk.decode(response)\nconsole.log(`Got ${events.length} events`)\n```\n\n### GetLatestBlock Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Build the interaction, specify whether to get sealed blocks or not\nconst interaction = await sdk.build([\n  sdk.getLatestBlock(true) // true for sealed blocks, false for unsealed\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\nconst block = await sdk.decode(response)\nconsole.log(`Latest block height: ${block.height}`)\n```\n\n### GetTransactionStatus Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Transaction ID to check\nconst txId: string = \"9dda49b2f2b1b9bc12d5cabe09f8a8cb49828c9c449574c1f46f3b3a5e5c0cb0\"\n\n// Build the interaction\nconst interaction = await sdk.build([\n  sdk.getTransactionStatus(txId),\n  // Optionally disambiguate system txns by providing a specific block id\n  // (uses HTTP query param ?block_id=... under the hood)\n  sdk.atBlockId(\"abc123blockid\")\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\nconst status = await sdk.decode(response)\nconsole.log(`Transaction status: ${status.statusString}`)\n```\n\n### Ping Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Build the interaction\nconst interaction = await sdk.build([\n  sdk.ping()\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\nconst pingResult = await sdk.decode(response)\nconsole.log(`Ping result: ${pingResult.tag}`) // Should output: Ping result: PONG\n```\n\n### Script Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\n// Build the script interaction\nconst builtInteraction = await sdk.build([\n  sdk.args([sdk.arg(\"Hello Flow!\", t.String)]),\n  sdk.script`\n    pub fun main(msg: String): Int {\n      log(msg)\n      return 7\n    }\n  `,\n])\n\n// Resolve the interaction with required resolvers\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n  sdk.resolveArguments,\n  sdk.resolveParams,\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(resolvedInteraction, { node: \"http://localhost:8080\" })\n// Decode the response to get the result (a number in this case)\nconst result: number = await sdk.decode(response)\nconsole.log(`Script returned: ${result}`) // Should output: Script returned: 7\n```\n\n### Transaction Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\nimport { t } from \"@onflow/sdk\"\n\n// Define a signing function\nconst signingFunction = () => ({ signature: \"generated-signature\" })\n\n// Build the transaction interaction with all required components\nconst builtInteraction = await sdk.build([\n  sdk.transaction`transaction(msg: String) { prepare(acct: AuthAccount) {} execute { log(msg) } }`,\n  sdk.args([sdk.arg(\"Hello, Flow!\", t.String)]),\n  sdk.payer(sdk.authorization(\"0x01\", signingFunction, 0)),\n  sdk.proposer(sdk.authorization(\"0x01\", signingFunction, 0)),\n  sdk.authorizations([sdk.authorization(\"0x01\", signingFunction, 0)]),\n  // Optional voucher intercept\n  sdk.voucherIntercept(async (voucher: any) => {\n    // Process the voucher before the transaction is sent\n    console.log(\"Processing voucher:\", voucher)\n  }),\n])\n\n// Resolve the transaction with all required resolvers\nconst resolvedInteraction = await sdk.pipe(builtInteraction, [\n  sdk.resolveArguments,\n  sdk.resolveParams,\n  sdk.resolveAccounts,\n  sdk.resolveProposerSequenceNumber({ node: \"http://localhost:8080\" }),\n  sdk.resolveRefBlockId({ node: \"http://localhost:8080\" }),\n  sdk.resolveSignatures,\n  // Optional resolver for voucher intercept\n  sdk.resolveVoucherIntercept,\n])\n\n// Send the transaction to the Access Node\nconst response = await sdk.send(resolvedInteraction, { node: \"http://localhost:8080\" })\n\n// Decode the response to get the transaction ID\nconst txId: string = await sdk.decode(response)\nconsole.log(`Transaction ID: ${txId}`)\n```\n\n### Get Network Parameters Usage\n\n```typescript\nimport * as sdk from \"@onflow/sdk\"\n\n// Build the interaction to get network parameters\nconst interaction = await sdk.build([\n  sdk.getNetworkParameters()\n])\n\n// Send the interaction to the Access Node\nconst response = await sdk.send(interaction, { node: \"http://localhost:8080\" })\n\n// Decode the response to get network parameters\ninterface NetworkParameters {\n  chainId: string;\n}\n\nconst params: NetworkParameters = await sdk.decode(response)\nconsole.log(`Chain ID: ${params.chainId}`)\n```\n\n## Flow JS-SDK Exposes\n\n- [Top Level](./src)\n\n  - [`sdk.build`](./src/build)\n  - [`sdk.resolve`](./src/resolve)\n  - [`sdk.send`](./src/send)\n  - [`sdk.decode`](./src/decode)\n  - [`sdk.decodeResponse`](./src/decode)\n\n- [Utils](./src/interaction)\n\n  - [`sdk.isOk`](./src/interaction)\n  - [`sdk.isBad`](./src/interaction)\n  - [`sdk.why`](./src/interaction)\n  - [`sdk.pipe`](./src/interaction)\n\n- [Builders](./src/build)\n\n  - [`sdk.args` & `sdk.arg`](./src/build/build-arguments.ts)\n  - [`sdk.atBlockHeight`](./src/build/build-at-block-height.ts)\n  - [`sdk.atBlockId`](./src/build/build-at-block-id.ts)\n  - [`sdk.authorizations` & `authorization`](./src/build/build-authorizations.ts)\n  - [`sdk.getAccount`](./src/build/build-get-account.ts)\n  - [`sdk.getBlock`](./src/build/build-get-block.ts)\n  - [`sdk.getBlockByHeight`](./src/build/build-get-block-by-height.ts)\n  - [`sdk.getBlockById`](./src/build/build-get-block-by-id.ts)\n  - [`sdk.getBlockHeader`](./src/build/build-get-block-header.ts)\n  - [`sdk.getCollection`](./src/build/build-get-collection.ts)\n  - [`sdk.getEvents`](./src/build/build-get-events.ts)\n  - [`sdk.getEventsAtBlockHeightRange`](./src/build/build-get-events-at-block-height-range.ts)\n  - [`sdk.getEventsAtBlockIds`](./src/build/build-get-events-at-block-ids.ts)\n  - [`sdk.getLatestBlock`](./src/build/build-get-latest-block.ts)\n  - [`sdk.getTransactionStatus`](./src/build/build-get-transaction-status.ts)\n  - [`sdk.getTransaction`](./src/build/build-get-transaction.ts)\n  - [`sdk.getNetworkParameters`](./src/build/build-get-network-parameters.ts)\n  - [`sdk.invariant`](./src/build/build-invariant.ts)\n  - [`sdk.limit`](./src/build/build-limit.ts)\n  - [`sdk.payer`](./src/build/build-payer.ts)\n  - [`sdk.ping`](./src/build/build-ping.ts)\n  - [`sdk.voucherIntercept`](./src/build/build-voucher-intercept.ts)\n  - [`sdk.proposer`](./src/build/build-proposer.ts)\n  - [`sdk.ref`](./src/build/build-ref.ts)\n  - [`sdk.script`](./src/build/build-script.ts)\n  - [`sdk.transaction`](./src/build/build-transaction.ts)\n  - [`sdk.validator`](./src/build/build-validator.ts)\n\n- [Resolvers](./src/resolve)\n  - [`sdk.resolveAccounts`](./src/resolve/resolve-accounts.ts)\n  - [`sdk.resolveArguments`](./src/resolve/resolve-arguments.ts)\n  - [`sdk.resolveCadence`](./src/resolve/resolve-cadence.ts)\n  - [`sdk.resolveFinalNormalization`](./src/resolve/resolve-final-normalization.ts)\n  - [`sdk.resolveVoucherIntercept`](./src/resolve/resolve-voucher-intercept.ts)\n  - [`sdk.resolveProposerSequenceNumber`](./src/resolve/resolve-proposer-sequence-number.ts)\n  - [`sdk.resolveRefBlockId`](./src/resolve/resolve-ref-block-id.ts)\n  - [`sdk.resolveSignatures`](./src/resolve/resolve-signatures.ts)\n  - [`sdk.resolveValidators`](./src/resolve/resolve-validators.ts)\n\n- [Other Utils](./src/)\n  - [`sdk.voucherToTxId`](./src/resolve/voucher.ts)\n"
  },
  {
    "path": "packages/sdk/src/VERSION.ts",
    "content": "declare const PACKAGE_CURRENT_VERSION: string | undefined\n\n// Use PACKAGE_CURRENT_VERSION if available (from build), otherwise use a default for development\nexport const VERSION: string =\n  typeof PACKAGE_CURRENT_VERSION !== \"undefined\"\n    ? PACKAGE_CURRENT_VERSION\n    : \"TESTVERSION\"\n"
  },
  {
    "path": "packages/sdk/src/account/account.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/account/account.ts",
    "content": "import type {Account} from \"@onflow/typedefs\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {atBlockHeight} from \"../build/build-at-block-height\"\nimport {atBlockId} from \"../build/build-at-block-id\"\nimport {atLatestBlock} from \"../build/build-at-latest-block\"\nimport {getAccount} from \"../build/build-get-account\"\nimport {decodeResponse as decode} from \"../decode/decode\"\nimport {SdkContext} from \"../context/context\"\nimport {withGlobalContext} from \"../context/global\"\nimport {createSend} from \"../transport/send/send\"\n\nexport interface AccountQueryOptions {\n  height?: number\n  id?: string\n  isSealed?: boolean\n}\n\nexport function createAccount(context: SdkContext) {\n  async function account(\n    address: string,\n    {height, id, isSealed}: AccountQueryOptions = {},\n    opts?: object\n  ): Promise<Account> {\n    invariant(\n      !((id && height) || (id && isSealed) || (height && isSealed)),\n      `Method: account -- Only one of the following parameters can be provided: id, height, isSealed`\n    )\n\n    // Get account by ID\n    if (id)\n      return await createSend(context)(\n        [getAccount(address), atBlockId(id)],\n        opts\n      ).then(decode)\n\n    // Get account by height\n    if (height)\n      return await createSend(context)(\n        [getAccount(address), atBlockHeight(height)],\n        opts\n      ).then(decode)\n\n    // Get account by latest block\n    return await createSend(context)(\n      [getAccount(address), atLatestBlock(isSealed ?? false)],\n      opts\n    ).then(decode)\n  }\n\n  return account\n}\n\n/**\n * Retrieve any account from Flow network's latest block or from a specified block height.\n *\n * Account address is a unique account identifier. Be mindful about the '0x' prefix, you should use the prefix as a default representation but be careful and safely handle user inputs without the prefix.\n *\n * An account includes the following data:\n * - Address: the account address.\n * - Balance: balance of the account.\n * - Contracts: list of contracts deployed to the account.\n * - Keys: list of keys associated with the account.\n *\n * @param address Address of the account\n * @param queryOptions Query parameters\n * @param queryOptions.height Block height to query\n * @param queryOptions.id Block ID to query\n * @param queryOptions.isSealed Block finality\n * @param opts Optional parameters\n * @returns A promise that resolves to an Account object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get account from latest block height\n * const account = await fcl.account(\"0x1d007d755706c469\");\n * console.log(\"Address:\", account.address);\n * console.log(\"Balance:\", account.balance);\n * console.log(\"Keys:\", account.keys);\n * console.log(\"Contracts:\", Object.keys(account.contracts));\n *\n * // Get account at a specific block height\n * const historicalAccount = await fcl.account(\"0x1d007d755706c469\", {\n *   height: 12345\n * });\n *\n * // Get account at a specific block ID\n * const accountAtBlock = await fcl.account(\"0x1d007d755706c469\", {\n *   id: \"9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3\"\n * });\n *\n * // Get account from sealed block\n * const sealedAccount = await fcl.account(\"0x1d007d755706c469\", {\n *   isSealed: true\n * });\n *\n * // Alternative using builder pattern\n * fcl.send([\n *   fcl.getAccount(\"0x1d007d755706c469\"),\n *   fcl.atBlockHeight(123)\n * ]).then(fcl.decode);\n */\nexport const account = /* @__PURE__ */ withGlobalContext(createAccount)\n"
  },
  {
    "path": "packages/sdk/src/block/block.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/block/block.ts",
    "content": "import type {Block} from \"@onflow/typedefs\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {atBlockHeight} from \"../build/build-at-block-height\"\nimport {atBlockId} from \"../build/build-at-block-id\"\nimport {getBlock} from \"../build/build-get-block\"\nimport {decodeResponse as decode} from \"../decode/decode\"\nimport {SdkContext} from \"../context/context\"\nimport {createSend} from \"../transport/send/send\"\nimport {withGlobalContext} from \"../context/global\"\n\nexport interface BlockQueryOptions {\n  sealed?: boolean\n  height?: number\n  id?: string\n}\n\nexport function createBlock(context: SdkContext) {\n  async function block(\n    {sealed = false, id, height}: BlockQueryOptions = {},\n    opts: object = {}\n  ): Promise<Block> {\n    invariant(\n      !((sealed && id) || (sealed && height)),\n      `Method: block -- Cannot pass \"sealed\" with \"id\" or \"height\"`\n    )\n\n    invariant(\n      !(id && height),\n      `Method: block -- Cannot pass \"id\" and \"height\" simultaneously`\n    )\n\n    // Get block by ID\n    if (id)\n      return await createSend(context)([getBlock(), atBlockId(id)], opts).then(\n        decode\n      )\n\n    // Get block by height\n    if (height)\n      return await createSend(context)(\n        [getBlock(), atBlockHeight(height)],\n        opts\n      ).then(decode)\n\n    // Get latest block\n    return await createSend(context)([getBlock(sealed)], opts).then(decode)\n  }\n\n  return block\n}\n\n/**\n * Query the network for block by id, height or get the latest block.\n *\n * Block ID is SHA3-256 hash of the entire block payload. This hash is stored as an ID field on any block response object (ie. response from `GetLatestBlock`).\n *\n * Block height expresses the height of the block on the chain. The latest block height increases by one for every valid block produced.\n *\n * @param queryOptions Query parameters\n * @param queryOptions.sealed Whether to query for a sealed block\n * @param queryOptions.height Block height to query\n * @param queryOptions.id Block ID to query\n * @param opts Optional parameters\n * @returns A promise that resolves to a Block object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get latest block\n * const latestBlock = await fcl.block(); // Get the latest finalized block\n * const latestSealedBlock = await fcl.block({sealed: true}); // Get the latest sealed block\n *\n * // Get block by ID (uses builder function)\n * await fcl.send([fcl.getBlock(), fcl.atBlockId(\"23232323232\")]).then(fcl.decode);\n *\n * // Get block at height (uses builder function)\n * await fcl.send([fcl.getBlock(), fcl.atBlockHeight(123)]).then(fcl.decode)\n */\nexport const block = /* @__PURE__ */ withGlobalContext(createBlock)\n"
  },
  {
    "path": "packages/sdk/src/build/build-arguments.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-arguments.ts",
    "content": "import {pipe, makeArgument, CadenceArgument} from \"../interaction/interaction\"\nimport {TypeDescriptorInput, TypeDescriptor} from \"@onflow/types\"\n\n/**\n * A utility builder to be used with other builders to pass in arguments with a value and supported type.\n *\n * A transaction can accept zero or more arguments that are passed into the Cadence script. The arguments on the transaction must match the number and order declared in the Cadence script.\n * This function returns a Partial Interaction that contains the arguments and types passed in. This alone is a partial and incomplete interaction.\n *\n * @param ax An array of argument objects created with fcl.arg()\n * @returns A Partial Interaction object containing the arguments and types passed in\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * await fcl.mutate({\n *   cadence: `\n *     transaction(amount: UFix64, to: Address) {\n *       prepare(signer: AuthAccount) {\n *         // transaction logic\n *       }\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(\"10.0\", t.UFix64), // Will be the first argument `amount: UFix64`\n *     arg(\"0xba1132bc08f82fe2\", t.Address), // Will be the second argument `to: Address`\n *   ],\n * })\n */\nexport function args(ax: CadenceArgument<any>[]) {\n  return pipe(ax.map(makeArgument))\n}\n\n/**\n * A utility builder to be used with fcl.args[...] to create FCL supported arguments for interactions.\n *\n * Arguments are used to pass data to Cadence scripts and transactions. The arguments must match the number and order declared in the Cadence script.\n * This function creates an ArgumentObject that holds the value and type passed in.\n *\n * @param value Any value that you are looking to pass to other builders\n * @param xform A type supported by Flow (FType descriptor)\n * @returns An ArgumentObject that holds the value and type passed in\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * const result = await fcl.query({\n *   cadence: `\n *     access(all) fun main(a: Int, b: Int, addr: Address): Int {\n *       log(addr)\n *       return a + b\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(7, t.Int), // a: Int\n *     arg(6, t.Int), // b: Int\n *     arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n *   ],\n * });\n */\nexport function arg<T extends TypeDescriptor<any, any>>(\n  value: TypeDescriptorInput<T>,\n  xform: T\n) {\n  return {value, xform} as CadenceArgument<T>\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-block-height.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {atBlockHeight} from \"./build-at-block-height\"\n\ndescribe(\"Build At Block Height\", () => {\n  test(\"At Block Height\", async () => {\n    const blockHeight = 123\n\n    const ix = await atBlockHeight(blockHeight)(initInteraction())\n\n    expect(ix.block.height).toBe(blockHeight)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-block-height.ts",
    "content": "import {pipe, InteractionBuilderFn} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {validator} from \"./build-validator\"\n\n/**\n * A builder function that returns a partial interaction to a block at a specific height.\n *\n * Use with other interactions like 'fcl.getBlock()' to get a full interaction at the specified block height.\n *\n * Block height expresses the height of the block on the chain. The latest block height increases by one for every valid block produced.\n *\n * @param height The height of the block to execute the interaction at\n * @returns A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get block at specific height\n * await fcl.send([fcl.getBlock(), fcl.atBlockHeight(123)]).then(fcl.decode);\n *\n * // Get account at specific block height\n * await fcl.send([\n *   fcl.getAccount(\"0x1d007d755706c469\"),\n *   fcl.atBlockHeight(12345)\n * ]).then(fcl.decode);\n *\n * // Execute script at specific block height\n * await fcl.send([\n *   fcl.script`\n *     access(all) fun main(): UFix64 {\n *       return getCurrentBlock().height\n *     }\n *   `,\n *   fcl.atBlockHeight(100)\n * ]).then(fcl.decode);\n */\nexport function atBlockHeight(height: number): InteractionBuilderFn {\n  return pipe([\n    (ix: Interaction) => {\n      ix.block.height = height\n      return ix\n    },\n    validator((ix: Interaction) => {\n      if (typeof ix.block.isSealed === \"boolean\")\n        throw new Error(\"Unable to specify both block height and isSealed.\")\n      if (ix.block.id)\n        throw new Error(\"Unable to specify both block height and block id.\")\n      return ix\n    }),\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-block-id.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {atBlockId} from \"./build-at-block-id\"\n\ndescribe(\"Build At Block ID\", () => {\n  test(\"At Block ID\", async () => {\n    const blockId = \"abc123\"\n\n    const ix = await atBlockId(blockId)(initInteraction())\n\n    expect(ix.block.id).toBe(blockId)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-block-id.ts",
    "content": "import {\n  isGetAccount,\n  pipe,\n  Ok as OkFn,\n  Bad as BadFn,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\nimport {validator} from \"./build-validator\"\nimport {Interaction} from \"@onflow/typedefs\"\n\n/**\n * A builder function that returns a partial interaction to a block at a specific block ID.\n *\n * Use with other interactions like 'fcl.getBlock()' to get a full interaction at the specified block ID.\n *\n * Block ID is SHA3-256 hash of the entire block payload. This hash is stored as an ID field on any block response object (ie. response from 'GetLatestBlock').\n *\n * @param id The ID of the block to execute the interaction at\n * @returns A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get block by ID\n * await fcl.send([fcl.getBlock(), fcl.atBlockId(\"23232323232\")]).then(fcl.decode);\n *\n * // Get account at specific block ID\n * await fcl.send([\n *   fcl.getAccount(\"0x1d007d755706c469\"),\n *   fcl.atBlockId(\"9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3\")\n * ]).then(fcl.decode);\n *\n * // Execute script at specific block\n * await fcl.send([\n *   fcl.script`\n *     access(all) fun main(): UFix64 {\n *       return getCurrentBlock().timestamp\n *     }\n *   `,\n *   fcl.atBlockId(\"a1b2c3d4e5f6\")\n * ]).then(fcl.decode);\n */\nexport function atBlockId(id: string): InteractionBuilderFn {\n  return pipe([\n    (ix: Interaction) => {\n      ix.block.id = id\n      return OkFn(ix)\n    },\n    validator(\n      (ix: Interaction, {Ok, Bad}: {Ok: typeof OkFn; Bad: typeof BadFn}) => {\n        if (isGetAccount(ix))\n          return Bad(\n            ix,\n            \"Unable to specify a block id with a Get Account interaction.\"\n          )\n        if (typeof ix.block.isSealed === \"boolean\")\n          return Bad(ix, \"Unable to specify both block id and isSealed.\")\n        if (ix.block.height)\n          return Bad(ix, \"Unable to specify both block id and block height.\")\n        return Ok(ix)\n      }\n    ),\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-latest-block.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {atLatestBlock} from \"./build-at-latest-block\"\n\ndescribe(\"Build At Latest Block\", () => {\n  test(\"At Latest Sealed Block\", async () => {\n    const ix = await atLatestBlock(true)(initInteraction())\n\n    expect(ix.block.isSealed).toBe(true)\n  })\n\n  test(\"At Latest Executed Block\", async () => {\n    const ix = await atLatestBlock(false)(initInteraction())\n\n    expect(ix.block.isSealed).toBe(false)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-at-latest-block.ts",
    "content": "import {pipe, InteractionBuilderFn} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {validator} from \"./build-validator\"\n\n/**\n * A builder function that returns a partial interaction to query the latest block with the given finality state.\n *\n * Use with other interactions like 'fcl.getBlock()' to get the latest block information.\n * Block finality determines whether you get the latest executed block or the latest sealed block.\n *\n * - Executed blocks (soft-finality): Latest block that has been executed but may not be final\n * - Sealed blocks (hard-finality): Latest block that has been sealed and is considered final\n *\n * @param isSealed Block finality state, defaults to latest executed block (\"soft-finality\"), set to true for sealed blocks (\"hard-finality\")\n * @returns A function that processes a partial interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get latest executed block (soft finality)\n * await fcl.send([fcl.getBlock(), fcl.atLatestBlock()]).then(fcl.decode);\n *\n * // Get latest sealed block (hard finality)\n * await fcl.send([fcl.getBlock(), fcl.atLatestBlock(true)]).then(fcl.decode);\n *\n * // Get account from latest sealed block\n * await fcl.send([\n *   fcl.getAccount(\"0x1d007d755706c469\"),\n *   fcl.atLatestBlock(true)\n * ]).then(fcl.decode);\n *\n * // Execute script against latest executed block\n * await fcl.send([\n *   fcl.script`\n *     access(all) fun main(): UFix64 {\n *       return getCurrentBlock().height\n *     }\n *   `,\n *   fcl.atLatestBlock()\n * ]).then(fcl.decode);\n */\nexport function atLatestBlock(isSealed = false): InteractionBuilderFn {\n  return pipe([\n    (ix: Interaction) => {\n      ix.block.isSealed = isSealed\n      return ix\n    },\n    validator((ix: Interaction) => {\n      if (ix.block.id)\n        throw new Error(\"Unable to specify both block finality and block id.\")\n      if (ix.block.height)\n        throw new Error(\n          \"Unable to specify both block finality and block height.\"\n        )\n      return ix\n    }),\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-authorizations.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {authorizations, authorization} from \"./build-authorizations\"\n\ndescribe(\"Build Authorizations\", () => {\n  test(\"build authorizer\", async () => {\n    let ix = await (\n      await authorizations([\n        authorization(\"0xabc123\", () => ({signature: \"123\"}), 1, 123),\n      ])\n    )(initInteraction())\n\n    const authorizerAccount =\n      ix.accounts[ix.authorizations as unknown as string]\n\n    expect(authorizerAccount.addr).toEqual(\"0xabc123\")\n    expect(authorizerAccount.role).toEqual({\n      authorizer: true,\n      payer: false,\n      proposer: false,\n      param: false,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-authorizations.ts",
    "content": "import {InteractionAccount, TransactionRole} from \"@onflow/typedefs\"\nimport {\n  AccountAuthorization,\n  pipe,\n  prepAccount,\n} from \"../interaction/interaction\"\nimport {Voucher} from \"../encode/encode\"\n\n/**\n * An object that contains all the information needed for FCL to sign a message with the user's signature.\n * Note: These values are destructed from the payload object in the first argument of a signing function.\n */\ninterface SignableMessage {\n  /**\n   * The encoded string which needs to be used to produce the signature.\n   */\n  message: string\n  /**\n   * The encoded string which needs to be used to produce the signature.\n   */\n  addr: string\n  /**\n   * The encoded string which needs to be used to produce the signature.\n   */\n  keyId: number | string\n  /**\n   * The encoded string which needs to be used to produce the signature.\n   */\n  roles: {\n    /**\n     * A Boolean representing if this signature to be produced for a proposer.\n     */\n    proposer: boolean\n    /**\n     * A Boolean representing if this signature to be produced for a authorizer.\n     */\n    authorizer: boolean\n    /**\n     * A Boolean representing if this signature to be produced for a payer.\n     */\n    payer: boolean\n  }\n  /**\n   * The raw transactions information, can be used to create the message for additional safety and lack of trust in the supplied message.\n   */\n  voucher: Voucher\n}\n\n/**\n * The object that contains all the information needed by FCL to authorize a user's transaction.\n */\ninterface SigningResult {\n  /**\n   * The address of the Flow Account this signature was produced for.\n   */\n  addr?: string\n  /**\n   * The keyId for which key was used to produce the signature.\n   */\n  keyId?: number | string\n  /**\n   * The hex encoded string representing the signature of the message.\n   */\n  signature: string\n}\n\n/**\n * A signing function consumes a payload and produces a signature for a transaction.\n * This function is always async.\n * Only write your own signing function if you are writing your own custom authorization function.\n */\ntype SigningFn = (\n  signable?: SignableMessage\n) => SigningResult | Promise<SigningResult>\n\n/**\n * A utility builder to set the authorizations on a transaction.\n *\n * Authorizations define the accounts that are responsible for paying the transaction fees and providing signatures for the transaction.\n * You can have multiple authorizers in a single transaction (multi-signature transactions).\n *\n * Read more about [transaction roles](https://docs.onflow.org/concepts/transaction-signing/) and [signing transactions](https://docs.onflow.org/concepts/accounts-and-keys/).\n *\n * @param ax An array of authorization functions that produce account authorization details\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Single authorizer (most common case)\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(acct: AuthAccount) {\n *         log(\"Hello from: \".concat(acct.address.toString()))\n *       }\n *     }\n *   `,\n *   authorizations: [fcl.authz] // Current user authorization\n * });\n *\n * // Multiple authorizers - both accounts must approve\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(acct1: AuthAccount, acct2: AuthAccount) {\n *         log(\"Transaction signed by both accounts\")\n *       }\n *     }\n *   `,\n *   authorizations: [userOneAuthz, userTwoAuthz]\n * });\n *\n * // Using builder pattern\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(acct: AuthAccount) {\n *         acct.save(\"Hello, World!\", to: /storage/greeting)\n *       }\n *     }\n *   `,\n *   fcl.authorizations([fcl.authz]),\n *   fcl.proposer(fcl.authz),\n *   fcl.payer(fcl.authz),\n *   fcl.limit(100)\n * ]);\n */\nexport function authorizations(ax: Array<AccountAuthorization> = []) {\n  return pipe(\n    ax.map(authz => {\n      return prepAccount(authz, {\n        role: TransactionRole.AUTHORIZER,\n      })\n    })\n  )\n}\n\n/**\n * Creates an authorization function for use in transactions.\n *\n * An authorization function must produce the information of the user that is going to sign and a signing function to use the information to produce a signature.\n *\n * Read more about [authorization functions](https://docs.onflow.org/fcl/reference/authorization-function/) and [transaction roles](https://docs.onflow.org/concepts/transaction-signing/).\n *\n * @param addr The address of the account that will sign the transaction\n * @param signingFunction A function that produces signatures for the account\n * @param keyId The index of the key to use for signing (optional)\n * @param sequenceNum The sequence number for the account key (optional)\n * @returns A partial interaction account object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { ec as EC } from \"elliptic\";\n *\n * // Create a signing function\n * const signingFunction = ({ message }) => {\n *   // Your signing logic here\n *   return {\n *     addr: \"0x123456789abcdef0\",\n *     keyId: 0,\n *     signature: \"your_signature_here\"\n *   };\n * };\n *\n * // Create authorization\n * const authz = fcl.authorization(\n *   \"0x123456789abcdef0\", // account address\n *   signingFunction,     // signing function\n *   0,                   // key ID\n *   42                   // sequence number\n * );\n *\n * // Use in transaction\n * await fcl.mutate({\n *   cadence: `transaction { prepare(acct: AuthAccount) {} }`,\n *   proposer: authz,\n *   payer: authz,\n *   authorizations: [authz]\n * });\n */\nexport function authorization(\n  addr: string,\n  signingFunction: SigningFn,\n  keyId?: number | string,\n  sequenceNum?: number\n): Partial<InteractionAccount> {\n  return {addr, signingFunction, keyId, sequenceNum}\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-account.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {sansPrefix, withPrefix} from \"@onflow/util-address\"\nimport {getAccount} from \"./build-get-account\"\n\nconst ADDRESS = \"0xf117a8efa34ffd58\"\n\ndescribe(\"address as input\", () => {\n  test(\"sansPrefix\", async () => {\n    const addr = sansPrefix(ADDRESS)\n    const result = await getAccount(addr)(initInteraction())\n\n    expect(result.account.addr).toBe(sansPrefix(ADDRESS))\n  })\n\n  test(\"withPrefix\", async () => {\n    const addr = withPrefix(ADDRESS)\n    const result = await getAccount(addr)(initInteraction())\n\n    expect(result.account.addr).toBe(sansPrefix(ADDRESS))\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-account.ts",
    "content": "import {sansPrefix} from \"@onflow/util-address\"\nimport {\n  InteractionBuilderFn,\n  makeGetAccount,\n  Ok,\n  pipe,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get an account by address.\n *\n * Consider using the pre-built interaction 'fcl.account(address)' if you do not need to pair with any other builders.\n *\n * Account address is a unique account identifier. Be mindful about the '0x' prefix, you should use the prefix as a default representation but be careful and safely handle user inputs without the prefix.\n *\n * @param address Address of the user account with or without a prefix (both formats are supported)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // somewhere in an async function\n * // fcl.account is the same as this function\n * const getAccount = async (address) => {\n *   const account = await fcl.send([fcl.getAccount(address)]).then(fcl.decode);\n *   return account;\n * };\n */\nexport function getAccount(addr: string): InteractionBuilderFn {\n  return pipe([\n    makeGetAccount,\n    ix => {\n      ix.account.addr = sansPrefix(addr)\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-block-header.test.ts",
    "content": "import {initInteraction, isGetBlockHeader} from \"../interaction/interaction\"\nimport {getBlockHeader} from \"./build-get-block-header\"\n\ndescribe(\"Build Get Block Header\", () => {\n  test(\"Get Block Header, isSealed = false\", async () => {\n    const isSealed = false\n\n    const ix = await getBlockHeader(isSealed)(initInteraction())\n\n    expect(isGetBlockHeader(ix)).toBe(true)\n    expect(ix.block.isSealed).toEqual(isSealed)\n  })\n\n  test(\"Get Block Header, isSealed = true\", async () => {\n    const isSealed = true\n\n    const ix = await getBlockHeader(isSealed)(initInteraction())\n\n    expect(isGetBlockHeader(ix)).toBe(true)\n    expect(ix.block.isSealed).toEqual(isSealed)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-block-header.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetBlockHeader,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get a block header.\n *\n * A block header contains metadata about a block without the full transaction details, making it more\n * lightweight than fetching the entire block. This is useful when you only need block metadata like\n * timestamp, height, parent hash, etc.\n *\n * Use with 'fcl.atBlockId()' and 'fcl.atBlockHeight()' when building the interaction to get headers for specific blocks.\n *\n * @param isSealed Block finality state, true for sealed blocks, false for finalized blocks, null for latest\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get latest sealed block header\n * const sealedHeader = await fcl.send([\n *   fcl.getBlockHeader(true)\n * ]).then(fcl.decode);\n *\n * console.log(\"Block height:\", sealedHeader.height);\n * console.log(\"Block timestamp:\", sealedHeader.timestamp);\n * console.log(\"Parent block ID:\", sealedHeader.parentId);\n *\n * // Get header for specific block\n * const blockHeader = await fcl.send([\n *   fcl.getBlockHeader(),\n *   fcl.atBlockHeight(12345)\n * ]).then(fcl.decode);\n *\n * // Get latest finalized block header\n * const finalizedHeader = await fcl.send([\n *   fcl.getBlockHeader(false)\n * ]).then(fcl.decode);\n */\nexport function getBlockHeader(\n  isSealed: boolean | null = null\n): InteractionBuilderFn {\n  return pipe([\n    makeGetBlockHeader,\n    ix => {\n      ix.block.isSealed = isSealed\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-block.test.ts",
    "content": "import {initInteraction, isGetBlock} from \"../interaction/interaction\"\nimport {getBlock} from \"./build-get-block\"\n\ndescribe(\"Build Get Block\", () => {\n  test(\"Get Block - isSealed = false\", async () => {\n    const isSealed = false\n\n    const ix = await getBlock(isSealed)(initInteraction())\n\n    expect(isGetBlock(ix)).toBe(true)\n    expect(ix.block.isSealed).toBe(false)\n  })\n\n  test(\"Get Block - isSealed = false\", async () => {\n    const isSealed = true\n\n    const ix = await getBlock(isSealed)(initInteraction())\n\n    expect(isGetBlock(ix)).toBe(true)\n    expect(ix.block.isSealed).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-block.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetBlock,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get the latest block.\n *\n * Use with 'fcl.atBlockId()' and 'fcl.atBlockHeight()' when building the interaction to get information for older blocks.\n *\n * Consider using the pre-built interaction 'fcl.block(options)' if you do not need to pair with any other builders.\n *\n * Block ID is SHA3-256 hash of the entire block payload. This hash is stored as an ID field on any block response object (ie. response from 'GetLatestBlock').\n *\n * Block height expresses the height of the block on the chain. The latest block height increases by one for every valid block produced.\n *\n * @param isSealed If the latest block should be sealed or not. See block states\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * const latestSealedBlock = await fcl.send([\n *   fcl.getBlock(true) // isSealed = true\n * ]).then(fcl.decode);\n */\nexport function getBlock(\n  isSealed: boolean | null = null\n): InteractionBuilderFn {\n  return pipe([\n    makeGetBlock,\n    ix => {\n      ix.block.isSealed = isSealed\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-collection.test.ts",
    "content": "import {initInteraction, isGetCollection} from \"../interaction/interaction\"\nimport {getCollection} from \"./build-get-collection\"\n\ndescribe(\"Build Get Collection\", () => {\n  test(\"Get Collection\", async () => {\n    const collectionId = \"my-collection-id\"\n\n    const ix = await getCollection(collectionId)(initInteraction())\n\n    expect(isGetCollection(ix)).toBe(true)\n    expect(ix.collection.id).toBe(collectionId)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-collection.ts",
    "content": "import {\n  pipe,\n  makeGetCollection,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns a collection containing a list of transaction IDs by its collection ID.\n *\n * A collection is a batch of transactions that have been included in a block. Each collection has a unique ID\n * which is the SHA3-256 hash of the collection payload. Collections are used to group related transactions\n * together for more efficient processing by the network.\n *\n * The collection ID provided must be from the current spork. Collections from past sporks are currently unavailable.\n *\n * @param collectionID The ID of the collection to retrieve\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get a collection and see what transactions it contains\n * const collection = await fcl.send([\n *   fcl.getCollection(\"cccdb0c67d015dc7f6444e8f62a3244ed650215ed66b90603006c70c5ef1f6e5\")\n * ]).then(fcl.decode);\n *\n * console.log(\"Collection ID:\", collection.id);\n * console.log(\"Transaction IDs:\", collection.transactionIds);\n * console.log(\"Total transactions:\", collection.transactionIds.length);\n *\n * // Process each transaction in the collection\n * for (const txId of collection.transactionIds) {\n *   const transaction = await fcl.send([\n *     fcl.getTransaction(txId)\n *   ]).then(fcl.decode);\n *   console.log(\"Transaction:\", transaction);\n * }\n */\nexport function getCollection(id: string | null = null): InteractionBuilderFn {\n  return pipe([\n    makeGetCollection,\n    ix => {\n      ix.collection.id = id\n      return ix\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events-at-block-height-range.test.ts",
    "content": "import {initInteraction, isGetEvents} from \"../interaction/interaction\"\nimport {getEventsAtBlockHeightRange} from \"./build-get-events-at-block-height-range\"\n\ndescribe(\"Build Get Events At Block Height Range\", () => {\n  test(\"Get Events At Block Height Range\", async () => {\n    const eventName = \"MyEvent\"\n    const start = 123\n    const end = 456\n\n    let ix = await getEventsAtBlockHeightRange(\n      eventName,\n      start,\n      end\n    )(initInteraction())\n\n    expect(isGetEvents(ix)).toBe(true)\n    expect(ix.events.eventType).toBe(eventName)\n    expect(ix.events.start).toBe(start)\n    expect(ix.events.end).toBe(end)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events-at-block-height-range.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetEvents,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns all instances of a particular event (by name) within a height range.\n *\n * The block range provided must be from the current spork.\n *\n * The block range provided must be 250 blocks or lower per request.\n *\n * Event type is a string that follow a standard format: A.{AccountAddress}.{ContractName}.{EventName}\n *\n * Please read more about [events in the documentation](https://docs.onflow.org/cadence/language/events/).\n *\n * Block height range expresses the height of the start and end block in the chain.\n *\n * @param eventType The type of event to get\n * @param startHeight The height of the block to start looking for events (inclusive)\n * @param endHeight The height of the block to stop looking for events (inclusive)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get events at block height range\n * await fcl\n *   .send([\n *     fcl.getEventsAtBlockHeightRange(\n *       \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\", // event name\n *       35580624, // block to start looking for events at\n *       35580624 // block to stop looking for events at\n *     ),\n *   ])\n *   .then(fcl.decode);\n */\nexport function getEventsAtBlockHeightRange(\n  eventType: string,\n  startHeight: number,\n  endHeight: number\n): InteractionBuilderFn {\n  return pipe([\n    makeGetEvents,\n    ix => {\n      ix.events.eventType = eventType\n      ix.events.start = startHeight\n      ix.events.end = endHeight\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events-at-block-ids.test.ts",
    "content": "import {initInteraction, isGetEvents} from \"../interaction/interaction\"\nimport {getEventsAtBlockIds} from \"./build-get-events-at-block-ids\"\n\ndescribe(\"Build Get Events At Block Ids\", () => {\n  test(\"Get Events At Block Ids\", async () => {\n    const eventName = \"MyEvent\"\n    const blockIds = [\"abc\", \"123\"]\n\n    let ix = await getEventsAtBlockIds(eventName, blockIds)(initInteraction())\n\n    expect(isGetEvents(ix)).toBe(true)\n    expect(ix.events.eventType).toBe(eventName)\n    expect(ix.events.blockIds).toBe(blockIds)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events-at-block-ids.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetEvents,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns all instances of a particular event (by name) within a set of blocks, specified by block ids.\n *\n * The block range provided must be from the current spork.\n *\n * Event type is a string that follow a standard format: A.{AccountAddress}.{ContractName}.{EventName}\n *\n * Please read more about [events in the documentation](https://docs.onflow.org/cadence/language/events/).\n *\n * @param eventType The type of event to get\n * @param blockIds The ids of the blocks to scan for events\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * const events = await fcl.send([\n *   fcl.getEventsAtBlockIds(\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\", [\n *     \"c4f239d49e96d1e5fbcf1f31027a6e582e8c03fcd9954177b7723fdb03d938c7\",\n *     \"5dbaa85922eb194a3dc463c946cc01c866f2ff2b88f3e59e21c0d8d00113273f\"\n *   ])\n * ]).then(fcl.decode);\n */\nexport function getEventsAtBlockIds(\n  eventType: string,\n  blockIds: string[]\n): InteractionBuilderFn {\n  return pipe([\n    makeGetEvents,\n    ix => {\n      ix.events.eventType = eventType\n      ix.events.blockIds = blockIds\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-events.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetEvents,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get events.\n *\n * Events are emitted by Cadence code during transaction execution and provide insights into what happened during execution.\n * This function queries for events of a specific type within a range of block heights.\n *\n * @param eventType The type of event to get (e.g., \"A.1654653399040a61.FlowToken.TokensWithdrawn\")\n * @param start The start block height to query from\n * @param end The end block height to query to\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get FlowToken transfer events from blocks 1000 to 2000\n * const events = await fcl.send([\n *   fcl.getEvents(\"A.1654653399040a61.FlowToken.TokensDeposited\", 1000, 2000)\n * ]).then(fcl.decode);\n *\n * console.log(\"Found events:\", events.length);\n * events.forEach(event => {\n *   console.log(\"Event data:\", event.data);\n *   console.log(\"Transaction ID:\", event.transactionId);\n * });\n */\nexport function getEvents(\n  eventType: string,\n  start: number,\n  end: number\n): InteractionBuilderFn {\n  return pipe([\n    makeGetEvents,\n    ix => {\n      ix.events.eventType = eventType\n      ix.events.start = start\n      ix.events.end = end\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-latest-block.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-latest-block.ts",
    "content": "import {log} from \"@onflow/util-logger\"\nimport {\n  pipe,\n  Ok,\n  makeGetBlock,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get the latest block\n *\n * This function creates an interaction to retrieve the latest block from the Flow blockchain.\n * You can specify whether to get the latest executed block (soft finality) or the latest sealed block (hard finality).\n *\n * @param isSealed Whether or not the block should be sealed (defaults to false for executed blocks)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get the latest executed block (soft finality)\n * const latestBlock = await fcl.send([fcl.getLatestBlock()]).then(fcl.decode);\n * console.log(\"Latest block height:\", latestBlock.height);\n * console.log(\"Block ID:\", latestBlock.id);\n * console.log(\"Block timestamp:\", latestBlock.timestamp);\n *\n * // Get the latest sealed block (hard finality)\n * const sealedBlock = await fcl.send([fcl.getLatestBlock(true)]).then(fcl.decode);\n * console.log(\"Latest sealed block height:\", sealedBlock.height);\n *\n * // Use in combination with other builders\n * const blockInfo = await fcl.send([\n *   fcl.getLatestBlock(),\n *   // Additional builders can be added here\n * ]).then(fcl.decode);\n */\nexport function getLatestBlock(\n  isSealed: boolean = false\n): InteractionBuilderFn {\n  log.deprecate({\n    pkg: \"FCL/SDK\",\n    subject: \"The getLatestBlock builder\",\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0006-deprecate-get-latest-block-builder\",\n  })\n\n  return pipe([\n    makeGetBlock,\n    ix => {\n      ix.block.isSealed = isSealed ?? false\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-network-parameters.test.ts",
    "content": "import {\n  initInteraction,\n  isGetNetworkParameters,\n} from \"../interaction/interaction\"\nimport {getNetworkParameters} from \"./build-get-network-parameters\"\n\ndescribe(\"Build Get Network Parameters\", () => {\n  test(\"Get Network Parameters\", async () => {\n    let ix = await getNetworkParameters()(initInteraction())\n\n    expect(isGetNetworkParameters(ix)).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-network-parameters.ts",
    "content": "import {\n  pipe,\n  makeGetNetworkParameters,\n  Ok,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get network parameters.\n *\n * Network parameters contain important configuration information about the Flow network,\n * including the chain ID, which is essential for signing transactions correctly.\n * This information is crucial for ensuring transactions are submitted to the correct network.\n *\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get network parameters to verify chain ID\n * const params = await fcl.send([\n *   fcl.getNetworkParameters()\n * ]).then(fcl.decode);\n *\n * console.log(\"Chain ID:\", params.chainId);\n * console.log(\"Network:\", params.name);\n *\n * // Use this to verify you're connected to the right network\n * if (params.chainId === \"flow-mainnet\") {\n *   console.log(\"Connected to Flow Mainnet\");\n * } else if (params.chainId === \"flow-testnet\") {\n *   console.log(\"Connected to Flow Testnet\");\n * }\n */\nexport function getNetworkParameters(): InteractionBuilderFn {\n  return pipe([\n    makeGetNetworkParameters,\n    ix => {\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-node-version-info.test.ts",
    "content": "import {initInteraction, isGetNodeVersionInfo} from \"../interaction/interaction\"\nimport {getNodeVersionInfo} from \"./build-get-node-version-info\"\n\ndescribe(\"Build Get Node Version Info\", () => {\n  test(\"Get Node Version Info\", async () => {\n    let ix = await getNodeVersionInfo()(initInteraction())\n\n    expect(isGetNodeVersionInfo(ix)).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-node-version-info.ts",
    "content": "import {\n  Ok,\n  makeGetNodeVerionInfo,\n  pipe,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function for the Get Node Version Info interaction.\n *\n * Creates an interaction to retrieve version information from the connected Flow Access Node.\n * This includes details about the node's software version, protocol version, and spork information.\n *\n * Consider using the pre-built interaction 'fcl.nodeVersionInfo()' if you do not need to pair with any other builders.\n *\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get node version information using builder\n * const versionInfo = await fcl.send([\n *   fcl.getNodeVersionInfo()\n * ]).then(fcl.decode);\n *\n * console.log(\"Node version:\", versionInfo.semver);\n * console.log(\"Protocol version:\", versionInfo.protocol_version);\n * console.log(\"Spork ID:\", versionInfo.spork_id);\n *\n * // Use with other builders if needed\n * const interaction = await fcl.build([\n *   fcl.getNodeVersionInfo()\n *   // other builders can be added here\n * ]);\n */\nexport function getNodeVersionInfo(): InteractionBuilderFn {\n  return pipe([\n    makeGetNodeVerionInfo,\n    ix => {\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-transaction-status.test.ts",
    "content": "import {\n  initInteraction,\n  isGetTransactionStatus,\n} from \"../interaction/interaction\"\nimport {getTransactionStatus} from \"./build-get-transaction-status\"\n\ndescribe(\"Build Get Transaction Status\", () => {\n  test(\"Get Transaction Status\", async () => {\n    const transactionId = \"abc123\"\n\n    let ix = await getTransactionStatus(transactionId)(initInteraction())\n\n    expect(isGetTransactionStatus(ix)).toBe(true)\n    expect(ix.transaction.id).toBe(transactionId)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-transaction-status.ts",
    "content": "import {\n  pipe,\n  Ok,\n  makeGetTransactionStatus,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the status of transaction.\n *\n * The transaction id provided must be from the current spork.\n *\n * Consider using 'fcl.tx(id)' instead of calling this method directly for real-time transaction monitoring.\n *\n * @param transactionId The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * const status = await fcl.send([\n *   fcl.getTransactionStatus(\"9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3\")\n * ]).then(fcl.decode);\n */\nexport function getTransactionStatus(\n  transactionId: string\n): InteractionBuilderFn {\n  return pipe([\n    makeGetTransactionStatus,\n    ix => {\n      ix.transaction.id = transactionId\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-transaction.test.ts",
    "content": "import {initInteraction, isGetTransaction} from \"../interaction/interaction\"\nimport {getTransaction} from \"./build-get-transaction\"\n\ndescribe(\"Build Get Transaction\", () => {\n  test(\"Get Transaction\", async () => {\n    const transactionId = \"abc123\"\n\n    let ix = await getTransaction(transactionId)(initInteraction())\n\n    expect(isGetTransaction(ix)).toBe(true)\n    expect(ix.transaction.id).toBe(transactionId)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-get-transaction.ts",
    "content": "import {\n  InteractionBuilderFn,\n  Ok,\n  makeGetTransaction,\n  pipe,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that returns the interaction to get a transaction by id.\n *\n * Transaction id is a hash of the encoded transaction payload and can be calculated before submitting the transaction to the network.\n * Transaction status represents the state of a transaction in the blockchain. Status can change until it is finalized.\n *\n * The transaction id provided must be from the current spork.\n *\n * Consider using 'fcl.tx(id).onceExecuted()' instead of calling this method directly for real-time transaction monitoring.\n *\n * @param id The transaction ID (256-bit hash as hex string) or scheduled transaction ID (UInt64 as decimal string)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * const tx = await fcl.send([\n *   fcl.getTransaction(\"9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3\")\n * ]).then(fcl.decode);\n */\nexport function getTransaction(id: string): InteractionBuilderFn {\n  return pipe([\n    makeGetTransaction,\n    ix => {\n      ix.transaction.id = id\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-invariant.js",
    "content": "import {Ok, Bad} from \"../interaction/interaction\"\n\nexport function invariant(...args) {\n  if (args.length > 1) {\n    const [predicate, message] = args\n    return invariant((ix, {Ok, Bad}) => {\n      return predicate ? Ok(ix) : Bad(ix, message)\n    })\n  }\n  const [fn] = args\n  return ix => fn(ix, {Ok, Bad})\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-invariant.test.js",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-limit.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {limit} from \"./build-limit\"\n\ndescribe(\"Build Limit\", () => {\n  test(\"Build Limit\", async () => {\n    const txLimit = 100\n\n    let ix = await limit(txLimit)(initInteraction())\n\n    expect(ix.message.computeLimit).toEqual(txLimit)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-limit.ts",
    "content": "import {InteractionBuilderFn} from \"../interaction/interaction\"\n\n/**\n * A utility builder to set the compute limit on a transaction.\n *\n * The compute limit is the maximum amount of computation that can be performed during transaction execution.\n * Setting an appropriate compute limit helps prevent infinite loops and ensures predictable transaction costs.\n *\n * Read more about [computation cost](https://docs.onflow.org/concepts/fees/#computation-cost) and [transaction fees](https://docs.onflow.org/concepts/fees/).\n *\n * @param limit The maximum amount of computation for the transaction\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         // Complex transaction logic here\n *       }\n *     }\n *   `,\n *   limit: 1000 // Set compute limit to 1000\n * });\n *\n * // Using builder pattern\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         // Transaction logic\n *       }\n *     }\n *   `,\n *   fcl.limit(9999) // Set higher limit for complex operations\n * ]);\n */\nexport function limit(limit: number): InteractionBuilderFn {\n  return ix => {\n    ix.message.computeLimit = limit\n    return ix\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-payer.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {payer} from \"./build-payer\"\n\ndescribe(\"Build Payer\", () => {\n  test(\"Build Payer\", async () => {\n    const authz = {addr: \"0xabc123\"}\n\n    let ix = await (await payer(authz))(initInteraction())\n\n    const payerAccount = ix.accounts[ix.payer[0]]\n\n    expect(payerAccount.addr).toEqual(authz.addr)\n    expect(payerAccount.role).toEqual({\n      authorizer: false,\n      param: false,\n      payer: true,\n      proposer: false,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-payer.ts",
    "content": "import {TransactionRole} from \"@onflow/typedefs\"\nimport {\n  AccountAuthorization,\n  pipe,\n  prepAccount,\n} from \"../interaction/interaction\"\n\n/**\n * A builder function that adds payer account(s) to a transaction.\n *\n * Every transaction requires at least one payer.\n *\n * The payer is the account that pays the transaction fee for executing the transaction on the network.\n * The payer account must have sufficient Flow tokens to cover the transaction fees.\n *\n * Read more about [transaction roles](https://docs.onflow.org/concepts/transaction-signing/#payer) and [transaction fees](https://docs.onflow.org/concepts/fees/).\n *\n * @param ax An account address or an array of account addresses\n * @returns A function that takes an interaction object and returns a new interaction object with the payer(s) added\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Using current user as payer (most common case)\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(acct: AuthAccount) {\n *         log(\"Transaction fees paid by: \".concat(acct.address.toString()))\n *       }\n *     }\n *   `,\n *   payer: fcl.authz // Current user as payer\n * });\n *\n * // Using custom payer with builder pattern\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(acct: AuthAccount) {\n *         // Transaction logic\n *       }\n *     }\n *   `,\n *   fcl.proposer(fcl.authz),        // Current user as proposer\n *   fcl.authorizations([fcl.authz]), // Current user as authorizer\n *   fcl.payer(customPayerAuthz)     // Custom payer pays fees\n * ]);\n *\n * // Multiple payers (advanced use case)\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(acct: AuthAccount) {\n *         // Transaction logic\n *       }\n *     }\n *   `,\n *   fcl.payer([payerAuthz1, payerAuthz2]) // Multiple payers split fees\n * ]);\n */\nexport function payer(ax: AccountAuthorization[] = []) {\n  if (!Array.isArray(ax)) ax = [ax]\n  return pipe(\n    ax.map(authz => {\n      return prepAccount(authz, {\n        role: TransactionRole.PAYER,\n      })\n    })\n  )\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-ping.test.ts",
    "content": "import {initInteraction, isPing} from \"../interaction/interaction\"\nimport {ping} from \"./build-ping\"\n\ndescribe(\"Build Ping\", () => {\n  test(\"Build Ping\", async () => {\n    let ix = await ping()(initInteraction())\n\n    expect(isPing(ix)).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-ping.ts",
    "content": "import {makePing, InteractionBuilderFn} from \"../interaction/interaction\"\n\n/**\n * A builder function that creates a ping interaction to test connectivity to the Flow Access Node.\n *\n * The ping interaction is a simple way to test if the Flow Access Node is reachable and responding. This is useful for health checks, connectivity testing, and debugging network issues.\n *\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Simple ping to test connectivity\n * try {\n *   const response = await fcl.send([fcl.ping()]);\n *   console.log(\"Access Node is reachable\");\n * } catch (error) {\n *   console.error(\"Access Node is not reachable:\", error);\n * }\n *\n * // Use ping for health checks\n * const healthCheck = async () => {\n *   try {\n *     await fcl.send([fcl.ping()]);\n *     return { status: \"healthy\", timestamp: new Date().toISOString() };\n *   } catch (error) {\n *     return { status: \"unhealthy\", error: error.message, timestamp: new Date().toISOString() };\n *   }\n * };\n *\n * const health = await healthCheck();\n * console.log(\"Health status:\", health);\n */\nexport function ping(): InteractionBuilderFn {\n  return makePing\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-proposer.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {proposer} from \"./build-proposer\"\n\ndescribe(\"Build Proposer\", () => {\n  test(\"Build Proposer\", async () => {\n    const authz = {addr: \"0xabc123\"}\n\n    let ix = await (await proposer(authz))(initInteraction())\n\n    const proposerAccount = ix.accounts[ix.proposer!]\n\n    expect(proposerAccount.addr).toEqual(authz.addr)\n    expect(proposerAccount.role).toEqual({\n      authorizer: false,\n      param: false,\n      payer: false,\n      proposer: true,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-proposer.ts",
    "content": "import {TransactionRole} from \"@onflow/typedefs\"\nimport {AccountAuthorization, prepAccount} from \"../interaction/interaction\"\n\n/**\n * A builder function that adds the proposer to a transaction.\n *\n * The proposer is responsible for providing the proposal key and paying the network fee for the transaction.\n * The proposer key is used to specify the sequence number and prevent replay attacks.\n *\n * Every transaction requires exactly one proposer.\n *\n * Read more about [transaction roles](https://docs.onflow.org/concepts/transaction-signing/#proposer) and [signing transactions](https://docs.onflow.org/concepts/accounts-and-keys/).\n *\n * @param authz The authorization object for the proposer\n * @returns A function that takes an interaction object and returns a new interaction object with the proposer added\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Using the current user as proposer\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Hello from proposer!\")\n *       }\n *     }\n *   `,\n *   proposer: fcl.authz\n * });\n *\n * // Using builder pattern\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Transaction executed\")\n *       }\n *     }\n *   `,\n *   fcl.proposer(proposerAuthz),\n *   fcl.payer(payerAuthz),\n *   fcl.authorizations([authorizerAuthz]),\n *   fcl.limit(100)\n * ]);\n */\nexport function proposer(authz: AccountAuthorization) {\n  return prepAccount(authz, {\n    role: TransactionRole.PROPOSER,\n  })\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-ref.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {ref} from \"./build-ref\"\n\ndescribe(\"Build Ref\", () => {\n  test(\"Build Ref\", async () => {\n    const refBlockId = \"abc123\"\n\n    let ix = await ref(refBlockId)(initInteraction())\n\n    expect(ix.message.refBlock).toEqual(refBlockId)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-ref.ts",
    "content": "import {pipe, Ok, InteractionBuilderFn} from \"../interaction/interaction\"\n\n/**\n * A builder function that sets the reference block for a transaction.\n *\n * The reference block specifies an expiration window (measured in blocks) during which a transaction is considered valid by the network.\n * A transaction will be rejected if it is submitted past its expiry block. Flow calculates transaction expiry using the reference block field.\n *\n * @param refBlock The reference block ID\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Set specific reference block for transaction\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Transaction with custom reference block\")\n *       }\n *     }\n *   `,\n *   fcl.ref(\"a1b2c3d4e5f6789...\"), // Custom reference block ID\n *   fcl.proposer(fcl.authz),\n *   fcl.payer(fcl.authz),\n *   fcl.authorizations([fcl.authz]),\n *   fcl.limit(100)\n * ]);\n *\n * // Usually, you don't need to set reference block manually\n * // as FCL will automatically set it to the latest block\n */\nexport function ref(refBlock: string): InteractionBuilderFn {\n  return pipe([\n    ix => {\n      ix.message.refBlock = refBlock\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-script.test.ts",
    "content": "import {initInteraction, isScript} from \"../interaction/interaction\"\nimport {script} from \"./build-script\"\n\ndescribe(\"Build Script\", () => {\n  test(\"Build Script\", async () => {\n    const cadence = \"access(all) fun main(): Int { return 123 }\"\n\n    let ix = await script(cadence)(initInteraction())\n\n    expect(isScript(ix)).toBe(true)\n    expect(ix.assigns[\"ix.cadence\"]).not.toBeUndefined()\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-script.ts",
    "content": "import {\n  pipe,\n  put,\n  makeScript,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\nimport {template} from \"@onflow/util-template\"\n\n/**\n * A builder function that creates a script interaction. Scripts allow you to write arbitrary non-mutating Cadence code on the Flow blockchain and return data.\n *\n * You can learn more about [Cadence here](https://cadence-lang.org/docs/language), but we are now only interested in executing the script code and getting back the data.\n *\n * We can execute a script using the latest state of the Flow blockchain or we can choose to execute the script at a specific time in history defined by a block height or block ID.\n *\n * Block ID is SHA3-256 hash of the entire block payload, but you can get that value from the block response properties.\n *\n * Block height expresses the height of the block in the chain.\n *\n * @param args The arguments to pass to the template\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * const result = await fcl.query({\n *   cadence: `\n *     access(all) fun main(a: Int, b: Int, addr: Address): Int {\n *       log(addr)\n *       return a + b\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(7, t.Int), // a: Int\n *     arg(6, t.Int), // b: Int\n *     arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n *   ],\n * });\n *\n * console.log(result); // 13\n */\nexport function script(\n  ...args: [\n    string | TemplateStringsArray | ((x?: unknown) => string),\n    ...unknown[],\n  ]\n): InteractionBuilderFn {\n  return pipe([makeScript, put(\"ix.cadence\", template(...args))])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-subscribe-events.test.ts",
    "content": "import {interaction} from \"../interaction/interaction\"\nimport {subscribeEvents} from \"./build-subscribe-events\"\n\ndescribe(\"Subscribe Events\", () => {\n  test(\"subscribe events no block\", async () => {\n    let ix = await subscribeEvents({\n      eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeatInterval: 1000,\n    })(interaction())\n\n    expect(ix.subscribeEvents.eventTypes).toEqual([\n      \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\",\n    ])\n    expect(ix.subscribeEvents.addresses).toEqual([\"0x1\", \"0x2\"])\n    expect(ix.subscribeEvents.contracts).toEqual([\n      \"A.7e60df042a9c0868.FlowToken\",\n    ])\n    expect(ix.subscribeEvents.heartbeatInterval).toBe(1000)\n  })\n\n  test(\"subscribe events block height\", async () => {\n    let ix = await subscribeEvents({\n      startHeight: 1,\n      eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeatInterval: 1000,\n    })(interaction())\n\n    expect(ix.subscribeEvents.startHeight).toBe(1)\n    expect(ix.subscribeEvents.eventTypes).toEqual([\n      \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\",\n    ])\n    expect(ix.subscribeEvents.addresses).toEqual([\"0x1\", \"0x2\"])\n    expect(ix.subscribeEvents.contracts).toEqual([\n      \"A.7e60df042a9c0868.FlowToken\",\n    ])\n    expect(ix.subscribeEvents.heartbeatInterval).toBe(1000)\n  })\n\n  test(\"subscribe events block id\", async () => {\n    let ix = await subscribeEvents({\n      startBlockId: \"abc123\",\n      eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeatInterval: 1000,\n    })(interaction())\n\n    expect(ix.subscribeEvents.startBlockId).toBe(\"abc123\")\n    expect(ix.subscribeEvents.eventTypes).toEqual([\n      \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\",\n    ])\n    expect(ix.subscribeEvents.addresses).toEqual([\"0x1\", \"0x2\"])\n    expect(ix.subscribeEvents.contracts).toEqual([\n      \"A.7e60df042a9c0868.FlowToken\",\n    ])\n    expect(ix.subscribeEvents.heartbeatInterval).toBe(1000)\n  })\n\n  test(\"throws if both startBlockId and startHeight are set\", async () => {\n    await expect(async () =>\n      subscribeEvents({\n        startBlockId: \"abc123\",\n        startHeight: 1,\n        eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n        addresses: [\"0x1\", \"0x2\"],\n        contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n        heartbeatInterval: 1000,\n      })\n    ).rejects.toThrow(\n      \"INVARIANT SDK Subscribe Events Error: Cannot set both startBlockId and startHeight.\"\n    )\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-subscribe-events.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  pipe,\n  Ok,\n  makeSubscribeEvents,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\nimport {EventFilter, Interaction} from \"@onflow/typedefs\"\n\n/**\n * Subscribe to events with the given filter and parameters.\n *\n * Creates a subscription to listen for real-time events from the Flow blockchain. This function configures\n * the subscription parameters for filtering specific events based on type, addresses, contracts, and other criteria.\n *\n * Events are emitted by Cadence code during transaction execution and provide insights into what happened.\n * Subscriptions allow you to listen for these events in real-time without polling.\n *\n * @param filter The filter configuration for the event subscription\n * @param filter.startBlockId Optional block ID to start subscription from\n * @param filter.startHeight Optional block height to start subscription from\n * @param filter.eventTypes Array of event types to filter for\n * @param filter.addresses Array of account addresses to filter events from\n * @param filter.contracts Array of contract names to filter events from\n * @param filter.heartbeatInterval Interval for heartbeat messages in milliseconds\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Subscribe to FlowToken transfer events\n * const subscription = await fcl.send([\n *   fcl.subscribeEvents({\n *     eventTypes: [\n *       \"A.1654653399040a61.FlowToken.TokensWithdrawn\",\n *       \"A.1654653399040a61.FlowToken.TokensDeposited\"\n *     ],\n *     startHeight: 1000000, // Start from specific block height\n *     heartbeatInterval: 3000 // 3 second heartbeat\n *   })\n * ]);\n *\n * // Subscribe to events from specific contracts\n * const contractSubscription = await fcl.send([\n *   fcl.subscribeEvents({\n *     contracts: [\"FlowToken\", \"FungibleToken\"],\n *     addresses: [\"0x1654653399040a61\"]\n *   })\n * ]);\n *\n * // Handle the subscription data elsewhere using fcl.subscribe()\n */\nexport function subscribeEvents({\n  startBlockId,\n  startHeight,\n  eventTypes,\n  addresses,\n  contracts,\n  heartbeatInterval,\n}: EventFilter): InteractionBuilderFn {\n  invariant(\n    !(startBlockId && startHeight),\n    `SDK Subscribe Events Error: Cannot set both startBlockId and startHeight.`\n  )\n\n  return pipe([\n    makeSubscribeEvents,\n    (ix: Interaction) => {\n      ix.subscribeEvents.startBlockId = startBlockId ?? null\n      ix.subscribeEvents.startHeight = startHeight ?? null\n      ix.subscribeEvents.eventTypes = eventTypes ?? null\n      ix.subscribeEvents.addresses = addresses ?? null\n      ix.subscribeEvents.contracts = contracts ?? null\n      ix.subscribeEvents.heartbeatInterval = heartbeatInterval ?? null\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-transaction.test.ts",
    "content": "import {initInteraction, isTransaction} from \"../interaction/interaction\"\nimport {transaction} from \"./build-transaction\"\n\ndescribe(\"Build Transaction\", () => {\n  test(\"Build Transaction\", async () => {\n    const cadence = \"transaction { increaseMyBallerStatus() }\"\n\n    let ix = await transaction(cadence)(initInteraction())\n\n    expect(isTransaction(ix)).toBe(true)\n    expect(ix.assigns[\"ix.cadence\"]).not.toBeUndefined()\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-transaction.ts",
    "content": "import {\n  pipe,\n  put,\n  Ok,\n  makeTransaction,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\nimport {template} from \"@onflow/util-template\"\n\nconst DEFAULT_SCRIPT_ACCOUNTS: string[] = []\nconst DEFAULT_REF: any = null\n\n/**\n * A template builder to use a Cadence transaction for an interaction. FCL \"mutate\" does the work of building, signing, and sending a transaction behind the scenes.\n *\n * Flow supports great flexibility when it comes to transaction signing, we can define multiple authorizers (multi-sig transactions) and have different payer account than proposer.\n *\n * @param args The arguments to pass to the template\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\"\n *\n * // Basic transaction usage\n * await fcl.mutate({\n *   cadence: `\n *     transaction(a: Int) {\n *       prepare(acct: &Account) {\n *         log(acct)\n *         log(a)\n *       }\n *     }\n *   `,\n *   args: (arg, t) => [\n *     arg(6, t.Int)\n *   ],\n *   limit: 50\n * })\n *\n * // Single party, single signature\n * // Proposer, payer and authorizer are the same account\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(acct: &Account) {}\n *     }\n *   `,\n *   authz: currentUser, // Optional. Will default to currentUser if not provided.\n *   limit: 50,\n * })\n *\n * // Multiple parties\n * // Proposer and authorizer are the same account, but different payer\n * await fcl.mutate({\n *   cadence: `\n *     transaction {\n *       prepare(acct: &Account) {}\n *     }\n *   `,\n *   proposer: authzFn,\n *   payer: authzTwoFn,\n *   authorizations: [authzFn],\n *   limit: 50,\n * })\n */\nexport function transaction(\n  ...args: [string | TemplateStringsArray, ...any[]]\n): InteractionBuilderFn {\n  return pipe([\n    makeTransaction,\n    put(\"ix.cadence\", template(...args)),\n    ix => {\n      ix.message.refBlock = ix.message.refBlock || DEFAULT_REF\n      ix.authorizations = ix.authorizations || DEFAULT_SCRIPT_ACCOUNTS\n      return Ok(ix)\n    },\n  ])\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-validator.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-validator.ts",
    "content": "import {update, InteractionBuilderFn} from \"../interaction/interaction\"\n\n/**\n * A builder function that adds a validator to a transaction.\n *\n * Validators are functions that run during transaction building to check for invalid configurations or parameters.\n * They help catch errors early before submitting transactions to the network, preventing failed transactions\n * and wasted compute costs.\n *\n * @param cb The validator function that takes an interaction and returns it (or throws an error if invalid)\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Custom validator to ensure account has sufficient balance\n * const validateBalance = (ix) => {\n *   if (ix.message.computeLimit > 1000) {\n *     throw new Error(\"Compute limit too high for this account\");\n *   }\n *   return ix;\n * };\n *\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         // Transaction logic\n *       }\n *     }\n *   `,\n *   fcl.validator(validateBalance),\n *   fcl.limit(500) // This will pass validation\n * ]);\n */\nexport function validator(cb: Function): InteractionBuilderFn {\n  return update(\"ix.validators\", (validators: Function | Function[]) =>\n    Array.isArray(validators) ? [...validators, cb] : [cb]\n  )\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build-voucher-intercept.test.ts",
    "content": "import {initInteraction} from \"../interaction/interaction\"\nimport {voucherIntercept} from \"./build-voucher-intercept\"\n\ndescribe(\"Build voucherIntercept\", () => {\n  test(\"Build voucherIntercept\", async () => {\n    const checkFunc = async () => \"test func\"\n\n    const ix = await voucherIntercept(checkFunc)(initInteraction())\n\n    expect(ix.assigns[\"ix.voucher-intercept\"]).toEqual(checkFunc)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build-voucher-intercept.ts",
    "content": "import {put, InteractionBuilderFn} from \"../interaction/interaction\"\nimport {Voucher} from \"../encode/encode\"\n\ntype VoucherInterceptFn = (voucher: Voucher) => any | Promise<any>\n\n/**\n * A builder function that intercepts and modifies a voucher.\n *\n * This function is useful for debugging, logging, or making modifications to\n * the transaction data. The voucher contains all the transaction details in their final form.\n *\n * @param fn The function to intercept and potentially modify the voucher\n * @returns A function that processes an interaction object\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Intercept voucher for logging\n * await fcl.send([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Transaction executed\")\n *       }\n *     }\n *   `,\n *   fcl.voucherIntercept((voucher) => {\n *     console.log(\"Voucher details:\", {\n *       cadence: voucher.cadence,\n *       proposalKey: voucher.proposalKey,\n *       payer: voucher.payer,\n *       authorizers: voucher.authorizers,\n *       computeLimit: voucher.computeLimit\n *     });\n *   }),\n *   fcl.proposer(fcl.authz),\n *   fcl.payer(fcl.authz),\n *   fcl.authorizations([fcl.authz])\n * ]);\n */\nexport function voucherIntercept(fn: VoucherInterceptFn): InteractionBuilderFn {\n  return put(\"ix.voucher-intercept\", fn)\n}\n"
  },
  {
    "path": "packages/sdk/src/build/build.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/build/build.ts",
    "content": "import {\n  pipe,\n  initInteraction,\n  InteractionBuilderFn,\n} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\n\n/**\n * A builder function that creates an interaction from an array of builder functions.\n *\n * The build function takes an array of builder functions and applies them to create a complete interaction object. This is the foundation for constructing all interactions in Flow, whether they're scripts, transactions, or queries.\n *\n * Each builder function modifies specific parts of the interaction object, such as adding Cadence code, arguments, authorization details, or other configuration.\n *\n * @param fns The functions to apply to the interaction\n * @returns A promise of an interaction\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Build a script interaction\n * const scriptInteraction = await fcl.build([\n *   fcl.script`\n *     access(all) fun main(a: Int, b: Int): Int {\n *       return a + b\n *     }\n *   `,\n *   fcl.args([\n *     fcl.arg(1, fcl.t.Int),\n *     fcl.arg(2, fcl.t.Int)\n *   ])\n * ]);\n *\n * // Build a transaction interaction\n * const txInteraction = await fcl.build([\n *   fcl.transaction`\n *     transaction(name: String) {\n *       prepare(account: AuthAccount) {\n *         log(\"Hello, \" + name)\n *       }\n *     }\n *   `,\n *   fcl.args([fcl.arg(\"World\", fcl.t.String)]),\n *   fcl.proposer(proposerAuthz),\n *   fcl.payer(payerAuthz),\n *   fcl.authorizations([authorizerAuthz]),\n *   fcl.limit(100)\n * ]);\n */\nexport function build(\n  fns: (InteractionBuilderFn | false)[] = []\n): Promise<Interaction> {\n  return pipe(initInteraction(), fns)\n}\n"
  },
  {
    "path": "packages/sdk/src/constants.ts",
    "content": "export const flowMainnet: Record<string, unknown> = {\n  \"flow.network\": \"mainnet\",\n  \"accessNode.api\": \"https://rest-mainnet.onflow.org\",\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/authn\",\n}\n\nexport const flowTestnet: Record<string, unknown> = {\n  \"flow.network\": \"testnet\",\n  \"accessNode.api\": \"https://rest-testnet.onflow.org\",\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\",\n}\n\nexport const flowEmulator: Record<string, unknown> = {\n  \"flow.network\": \"local\",\n  \"accessNode.api\": \"http://127.0.0.1:8888\",\n  \"discovery.wallet\": \"http://localhost:8701/fcl/authn\",\n}\n"
  },
  {
    "path": "packages/sdk/src/context/context.ts",
    "content": "import {SdkTransport} from \"@onflow/typedefs\"\n\n/**\n * Options for configuring the SDK client.\n */\nexport interface SdkClientOptions {\n  /**\n   * The URL of the Flow access node to connect to.\n   */\n  accessNodeUrl: string\n  /**\n   * The transport object used for sending requests to the Flow network.\n   */\n  transport: SdkTransport\n  /**\n   * The compute limit for transactions and queries.\n   */\n  computeLimit: number\n  /**\n   * Map of contract names to their addresses.\n   * @example\n   * ```ts\n   * {\n   *   \"FlowToken\": \"0x9a07664d3c2b5f8\",\n   * }\n   * ```\n   */\n  contracts?: {\n    [contractName: string]: string\n  }\n  customResolver?: (args: any) => Promise<any>\n  customDecoders?: {[key: string]: (data: any) => any}\n}\n\nexport interface SdkContext {\n  get accessNodeUrl(): string\n  get transport(): SdkTransport\n  get computeLimit(): number\n  get customResolver(): ((args: any) => Promise<any>) | undefined\n  get customDecoders(): {[key: string]: (data: any) => any}\n\n  // Map of contract names to their addresses\n  // e.g. { \"FlowToken\": \"0x9a07664d3c2b5f8\" }\n  get contracts(): {\n    [contractName: string]: string\n  }\n\n  // Legacy properties for backwards compatibility\n  get debug(): {[key: string]: any} // Debug options for internal use\n  get legacyContractIdentifiers(): Record<string, string>\n}\n\n/**\n * Creates a new SDK context with the provided configuration.\n */\nexport function createContext({\n  accessNodeUrl,\n  transport,\n  computeLimit,\n  customResolver,\n  customDecoders = {},\n  contracts = {},\n}: SdkClientOptions): SdkContext {\n  if (!transport) {\n    throw new Error(\"Transport must be provided to create SDK context\")\n  }\n\n  // Ensure transport is an instance of SdkTransport\n  if (typeof transport.send !== \"function\") {\n    throw new Error(\"Invalid transport provided, must implement send method\")\n  }\n\n  if (typeof transport.subscribe !== \"function\") {\n    throw new Error(\n      \"Invalid transport provided, must implement subscribe method\"\n    )\n  }\n\n  if (!accessNodeUrl) {\n    throw new Error(\"Access node must be provided to create SDK context\")\n  }\n\n  if (typeof accessNodeUrl !== \"string\") {\n    throw new Error(\"Access node must be a string URL\")\n  }\n\n  if (typeof computeLimit !== \"number\" || computeLimit <= 0) {\n    throw new Error(\"Compute limit must be a positive number\")\n  }\n\n  return {\n    transport,\n    accessNodeUrl,\n    computeLimit,\n    customResolver,\n    customDecoders,\n    debug: {},\n    contracts,\n    legacyContractIdentifiers: {},\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/context/get-global-transport.test.ts",
    "content": "import {SdkTransport} from \"@onflow/typedefs\"\nimport {getGlobalTransport} from \"./get-global-transport\"\nimport {httpTransport} from \"@onflow/transport-http\"\n\njest.mock(\"@onflow/transport-http\", () => ({\n  httpTransport: {\n    send: jest.fn(),\n    subscribe: jest.fn(),\n  } as jest.Mocked<SdkTransport>,\n}))\n\ndescribe(\"getGlobalTransport\", () => {\n  beforeEach(() => {\n    jest.resetAllMocks()\n  })\n\n  test(\"fallback to http transport\", () => {\n    const transport = getGlobalTransport({})\n    expect(transport).toBe(httpTransport)\n  })\n\n  test(\"transport from global config - sdk.transport\", () => {\n    const customTransport = {\n      send: jest.fn(),\n      subscribe: jest.fn(),\n    } as jest.Mocked<SdkTransport>\n\n    const transport = getGlobalTransport({\n      \"sdk.transport\": customTransport,\n    })\n\n    expect(transport).toBe(customTransport)\n  })\n\n  test(\"send function from global config - sdk.transport\", () => {\n    const customSend = jest.fn()\n\n    const transport = getGlobalTransport({\n      \"sdk.transport\": customSend,\n    })\n\n    expect(transport).toEqual({\n      send: customSend,\n      subscribe: expect.any(Function),\n    })\n  })\n\n  test(\"send function from global config - sdk.send\", () => {\n    const customSend = jest.fn()\n\n    const transport = getGlobalTransport({\n      \"sdk.send\": customSend,\n    })\n\n    expect(transport).toEqual({\n      send: customSend,\n      subscribe: expect.any(Function),\n    })\n  })\n\n  test(\"sdk.transport has priority over sdk.send\", () => {\n    const transportSend = jest.fn()\n    const sdkSend = jest.fn()\n\n    const transport = getGlobalTransport({\n      \"sdk.transport\": transportSend,\n      \"sdk.send\": sdkSend,\n    })\n\n    expect(transport).toEqual({\n      send: transportSend,\n      subscribe: expect.any(Function),\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/context/get-global-transport.ts",
    "content": "import {httpTransport as defaultTransport} from \"@onflow/transport-http\"\nimport {SdkTransport} from \"@onflow/typedefs\"\nimport {SubscriptionsNotSupportedError} from \"../transport/subscribe/errors\"\n\n/**\n * Get the SDK transport object, either from the provided override or from the global config.\n *\n * The transport object handles communication with Flow Access Nodes, including sending transactions,\n * executing scripts, and managing subscriptions. This function resolves the transport configuration\n * from various sources with the following priority order:\n * 1. Provided override parameters\n * 2. Global SDK configuration\n * 3. Default HTTP transport\n *\n * @param override Override default configuration with custom transport or send function\n * @param override.send Custom send function for backwards compatibility with legacy configurations\n * @param override.transport Complete transport object with both send and subscribe capabilities\n * @returns The resolved SDK transport object with send and subscribe methods\n *\n * @throws {Error} When both transport and send options are provided simultaneously\n * @throws {SubscriptionsNotSupportedError} When attempting to subscribe using a legacy send-only transport\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { httpTransport } from \"@onflow/transport-http\";\n *\n * // Get default transport (usually HTTP transport)\n * const defaultTransport = await fcl.getTransport();\n *\n * // Override with custom transport\n * const customTransport = await fcl.getTransport({\n *   transport: httpTransport({\n *     accessNode: \"https://rest-mainnet.onflow.org\",\n *     timeout: 10000\n *   })\n * });\n */\nexport function getGlobalTransport(cfg: Record<string, any>): SdkTransport {\n  const transportOrSend = (cfg[\"sdk.transport\"] ||\n    cfg[\"sdk.send\"] ||\n    defaultTransport) as SdkTransport | SdkTransport[\"send\"]\n\n  // Backwards compatibility with legacy send function\n  if (!isTransportObject(transportOrSend)) {\n    return {\n      send: transportOrSend,\n      subscribe: () => {\n        throw new SubscriptionsNotSupportedError()\n      },\n    }\n  }\n\n  return transportOrSend\n}\n\nfunction isTransportObject(transport: any): transport is SdkTransport {\n  return (\n    transport.send !== undefined &&\n    transport.subscribe !== undefined &&\n    typeof transport.send === \"function\" &&\n    typeof transport.subscribe === \"function\"\n  )\n}\n"
  },
  {
    "path": "packages/sdk/src/context/global.ts",
    "content": "import {config} from \"@onflow/config\"\nimport {SdkContext} from \"./context\"\nimport {getGlobalTransport} from \"./get-global-transport\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {log} from \"@onflow/util-logger\"\n\nconst DEFAULT_COMPUTE_LIMIT = 10\n\nlet cachedContext: Promise<SdkContext> | undefined\n\nexport async function createGlobalContext(): Promise<SdkContext> {\n  const globalConfig = await config().all()\n\n  return {\n    get transport() {\n      return getGlobalTransport(globalConfig)\n    },\n    get accessNodeUrl() {\n      const accessNodeUrl = globalConfig[\"accessNode.api\"] as string | undefined\n      invariant(\n        !!accessNodeUrl,\n        `Either opts.node or \"accessNode.api\" in config must be defined.`\n      )\n      return accessNodeUrl\n    },\n    get computeLimit() {\n      const computeLimit = globalConfig[\"fcl.limit\"] as number | undefined\n      if (!computeLimit) {\n        log.deprecate({\n          pkg: \"FCL/SDK\",\n          subject:\n            \"The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10)\",\n          transition:\n            \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit\",\n        })\n        return DEFAULT_COMPUTE_LIMIT\n      }\n      return computeLimit\n    },\n    get customResolver() {\n      const customResolver = globalConfig[\"sdk.resolve\"] as\n        | ((args: any) => Promise<any>)\n        | undefined\n      return customResolver\n    },\n    get customDecoders() {\n      return Object.fromEntries(\n        Object.entries(globalConfig).filter(([key]) =>\n          key.startsWith(\"decoder.\")\n        )\n      ) as Record<string, (data: any) => any>\n    },\n    get contracts() {\n      return Object.fromEntries(\n        Object.entries(globalConfig)\n          .filter(([key]) => key.startsWith(\"system.contracts.\"))\n          .map(([key, value]) => [key.replace(\"system.contracts.\", \"\"), value])\n      ) as Record<string, string>\n    },\n    get debug() {\n      return Object.fromEntries(\n        Object.entries(globalConfig).filter(([key]) => key.startsWith(\"debug.\"))\n      )\n    },\n    get legacyContractIdentifiers() {\n      return Object.fromEntries(\n        Object.entries(globalConfig).filter(([key]) => key.startsWith(\"0x\"))\n      ) as Record<string, string>\n    },\n  }\n}\n\nexport async function getGlobalContext(): Promise<SdkContext> {\n  if (!cachedContext) {\n    // Watch for changes in the config and recreate the context if needed\n    config().subscribe(() => {\n      cachedContext = createGlobalContext()\n    })\n\n    // Create the context for the first time\n    cachedContext = createGlobalContext()\n  }\n  return cachedContext instanceof Promise ? cachedContext : cachedContext\n}\n\nexport function withGlobalContext<\n  T extends (context: SdkContext) => (...args: any[]) => Promise<any>,\n>(\n  fn: T\n): (\n  ...args: Parameters<ReturnType<T>>\n) => Promise<Awaited<ReturnType<ReturnType<T>>>> {\n  return async (\n    ...args: Parameters<ReturnType<T>>\n  ): Promise<Awaited<ReturnType<ReturnType<T>>>> => {\n    const context = await getGlobalContext()\n    return fn(context)(...args)\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/contract.test.ts",
    "content": "import * as root from \"./sdk\"\nimport * as decode from \"./decode/decode\"\nimport * as encode from \"./encode/encode\"\nimport * as interaction from \"./interaction/interaction\"\nimport * as send from \"./transport\"\nimport * as template from \"@onflow/util-template\"\n\nconst interfaceContract =\n  (label: string, wat: any) =>\n  ([template]: TemplateStringsArray): void => {\n    const keys = template.replace(/\\s+/g, \"|\").split(\"|\").filter(Boolean)\n\n    describe(label, () => {\n      for (let key of keys)\n        test(`${label}.${key}`, () =>\n          expect(wat[key]).toStrictEqual(expect.any(Function)))\n    })\n  }\n\ninterfaceContract(\"export\", root)`\n  build resolve send\n  decode\n  isOk isBad why pipe\n  getAccount getEvents getTransactionStatus\n  authorizations authorization\n  params param\n  proposer payer\n  ping script transaction\n  limit ref\n  resolveAccounts\n  resolveSignatures\n`\n\ndescribe(\"consume\", () => {\n  interfaceContract(\"@onflow/decode\", decode)`\n    decode\n    decodeResponse\n  `\n\n  interfaceContract(\"@onflow/encode\", encode)`\n    encodeTransactionPayload\n    encodeTransactionEnvelope\n  `\n\n  interfaceContract(\"@onflow/interaction\", interaction)`\n    initInteraction\n    pipe Ok isOk isBad why\n    put get update\n    makeGetAccount makeGetEvents\n    makeGetTransactionStatus makePing\n    makeScript makeTransaction\n    isTransaction isScript\n  `\n\n  interfaceContract(\"@onflow/send\", send)`\n    send\n  `\n\n  interfaceContract(\"@onflow/util-template\", template)`\n    template\n  `\n})\n"
  },
  {
    "path": "packages/sdk/src/decode/README.md",
    "content": "> **NOTE:** Requires a Buffer polyfill\n\n# Decode\n\nThis package provides methods that can decode a response, which can include JSON-CDC payloads from the Access API into JavaScript friendly types.\n\n# Status\n\n- **Last Updated:** April 21st 2020\n- **Stable:** Yes\n- **Risk of Breaking Change**: Extremely Low (If the known upcoming change is taken into account)\n\nThis package is fairly stable, might even be the most complete package we have.\nWe are fairly happy with how it is consumed, and how it works internally.\nOther than the known upcoming change listed below this package might be ready for its first major version bump.\n\n# Install\n\n```bash\nnpm install --save @onflow/sdk\n```\n\n# Usage\n\n**Decoding without ABIs**\n\nUnlike with other blockchains, Flow does not require the use of an ABI to decode responses from the blockchain! A response from the Flow Access Node is encoded in JSON-CDC, which is a self describing payload that this package uses to decode the response into JavaScript friendly types.\n\n**Decoding**\n\nYou can use `decodeResponse` on any type of response. If that response includes a JSON-CDC payload, it will be decoded into JavaScript friendly types. The data that is returned from `decodeResponse` is the data received from the Access Node for the sent interaction.\n\n**Decoding a Response**\n\n```javascript\nimport {decodeResponse} from \"@onflow/decode\"\nconst decoded = await decodeResponse(myResponse)\n```\n\n**Decoding a Response, with a Custom Decoder**\n\nA Custom Decoder is a way for users to define how to decode certain encoded types from the Access API\n\n```javascript\nimport {decodeResponse} from \"@onflow/decode\"\nconst decoded = await decodeResponse(myResponse, {\n  UInt8: data => Number(data),\n})\n```\n\n**Decoding a Response, with a Custom Decoder for a Resource**\n\nA Custom Decoder is a way for users to additionally define how to decode Resources.\n\n```javascript\nimport {decodeResponse} from \"@onflow/decode\"\nconst decoded = await decodeResponse(myResponse, {\n  CryptoKitty: cryptoKitty => ({\n    name: cryptoKitty.kittyName || \"Lil BUB The Magical Space Cat\",\n  }),\n})\n```\n\n**Decoding a Response, with a Custom Decoder using Regex Lookup**\n\nYou can specify Custom Decoders to be executed on types tested against with a regular expression.\nTo denote a regular expression, write the key for that custom decoder between two slashes. Note that\nonly global search is supported at this time.\n\n```javascript\nimport {decodeResponse} from \"@onflow/decode\"\nconst decoded = await decodeResponse(myResponse, {\n  \"/.CryptoKitty$/\": myCryptoKittyDecoder,\n})\n```\n\n**Decoding a JSON-CDC payload**\n\nYou can additionally directly decode a JSON-CDC payload.\n\n```javascript\nimport {decode} from \"@onflow/decode\"\n\nconst jsonCDC = {type: \"String\", value: \"https://discordapp.com/invite/WgAQhtB\"}\n\nconst decoded = await deocde(jsonCDC)\n\nexpect(decoded).toStrictEqual(\"https://discordapp.com/invite/WgAQhtB\")\n```\n"
  },
  {
    "path": "packages/sdk/src/decode/decode-stream.test.ts",
    "content": "import {EventEmitter} from \"stream\"\nimport {decodeStream} from \"./decode-stream\"\nimport {StreamConnection} from \"@onflow/typedefs\"\nimport * as decodeResponseModule from \"./decode\"\n\ndescribe(\"decode stream\", () => {\n  let mockStream: StreamConnection<{data: any}>\n  let emitter: EventEmitter\n  let mockDecodeResponse\n\n  beforeEach(() => {\n    mockDecodeResponse = jest.fn()\n    jest\n      .spyOn(decodeResponseModule, \"decodeResponse\")\n      .mockImplementation(mockDecodeResponse)\n    emitter = new EventEmitter()\n    mockStream = {\n      on: jest.fn((event, callback) => {\n        emitter.on(event, callback)\n      }) as any,\n      off: jest.fn((event, callback) => {\n        emitter.off(event, callback)\n      }) as any,\n      close: jest.fn(),\n    }\n  })\n\n  test(\"data is mapped to decoded data per channel for non-null values\", async () => {\n    const originalData = {\n      dummy: {foo: \"bar\"},\n      other: {foo: \"baz\"},\n      nullExample: null,\n    }\n    const decodedData = {\n      dummy: {foo2: \"bar2\"},\n      other: {foo2: \"baz2\"},\n    }\n    mockDecodeResponse.mockImplementation(response => {\n      if (response.dummy) {\n        return decodedData.dummy\n      } else if (response.other) {\n        return decodedData.other\n      } else {\n        throw new Error(\"unexpected response\")\n      }\n    })\n\n    const customDecoders = {\n      foo: jest.fn(),\n      bar: jest.fn(),\n    }\n\n    const decodedStream = decodeStream(\n      mockStream,\n      mockDecodeResponse,\n      customDecoders\n    )\n    const dummyCallback = jest.fn(data => {\n      expect(data).toEqual(decodedData.dummy)\n    })\n    const otherCallback = jest.fn(data => {\n      expect(data).toEqual(decodedData.other)\n    })\n    const nullCallback = jest.fn()\n    decodedStream.on(\"dummy\", dummyCallback)\n    decodedStream.on(\"other\", otherCallback)\n    decodedStream.on(\"nullExample\", nullCallback)\n\n    emitter.emit(\"data\", originalData)\n\n    // wait for next tick\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(mockDecodeResponse).toHaveBeenNthCalledWith(\n      1,\n      {\n        dummy: {foo: \"bar\"},\n      },\n      customDecoders\n    )\n    expect(mockDecodeResponse).toHaveBeenNthCalledWith(\n      2,\n      {\n        other: {foo: \"baz\"},\n      },\n      customDecoders\n    )\n\n    expect(dummyCallback).toHaveBeenCalled()\n    expect(otherCallback).toHaveBeenCalled()\n    expect(nullCallback).not.toHaveBeenCalled()\n  })\n\n  test(\"data is emitted in order\", async () => {\n    const incomingData = [{foo: \"one\"}, {bar: \"two\"}]\n    mockDecodeResponse.mockImplementation(async response => {\n      if (response.foo) {\n        await new Promise(resolve => setTimeout(resolve, 100))\n        return response.foo\n      } else if (response.bar) {\n        return response.bar\n      } else {\n        throw new Error(\"unexpected response\")\n      }\n    })\n\n    const decodedStream = decodeStream(mockStream, mockDecodeResponse)\n    const cb = jest.fn()\n    decodedStream.on(\"foo\", msg => {\n      cb(\"foo\", msg)\n    })\n    decodedStream.on(\"bar\", msg => {\n      cb(\"bar\", msg)\n    })\n\n    emitter.emit(\"data\", incomingData[0])\n    emitter.emit(\"data\", incomingData[1])\n\n    // Wait for data to be processed\n    await new Promise(resolve => setTimeout(resolve, 200))\n\n    expect(cb).toHaveBeenNthCalledWith(1, \"foo\", \"one\")\n    expect(cb).toHaveBeenNthCalledWith(2, \"bar\", \"two\")\n  })\n\n  test(\"each channel is emitted in order\", async () => {\n    const decodedStream = decodeStream(mockStream, mockDecodeResponse)\n    // Data will take time to decode but must arrive before error/close\n    mockDecodeResponse.mockImplementation(async response => {\n      await new Promise(resolve => setTimeout(resolve, 100))\n      return response\n    })\n    const cb = jest.fn()\n    decodedStream.on(\"foo\", msg => {\n      cb(\"foo\", msg)\n    })\n    decodedStream.on(\"bar\", msg => {\n      cb(\"bar\", msg)\n    })\n    decodedStream.on(\"error\", err => {\n      cb(\"error\", err)\n    })\n    decodedStream.on(\"close\", () => {\n      cb(\"close\")\n    })\n\n    emitter.emit(\"data\", {foo: \"one\"})\n    emitter.emit(\"error\", new Error(\"error\"))\n    emitter.emit(\"data\", {bar: \"two\"})\n    emitter.emit(\"close\")\n\n    // Wait for data to be processed\n    await new Promise(resolve => setTimeout(resolve, 250))\n\n    expect(cb).toHaveBeenNthCalledWith(1, \"foo\", {foo: \"one\"})\n    expect(cb).toHaveBeenNthCalledWith(2, \"error\", new Error(\"error\"))\n    expect(cb).toHaveBeenNthCalledWith(3, \"bar\", {bar: \"two\"})\n    expect(cb).toHaveBeenNthCalledWith(4, \"close\")\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/decode/decode-stream.ts",
    "content": "import EventEmitter from \"events\"\nimport {StreamConnection} from \"@onflow/typedefs\"\n\ntype DecodeResponseFn = (\n  response: Record<string, any>,\n  customDecoders?: Record<string, any>\n) => Promise<any>\n\n/**\n * Pipes a generic stream of data into a granular stream of decoded data.\n *\n * The data is decoded per channel and emitted in order. This function is particularly useful\n * for handling streaming responses from Flow Access API, such as event subscriptions or\n * real-time block updates. It ensures that data is properly decoded and emitted in the\n * correct order while maintaining the stream's event-driven nature.\n *\n * All topics for a given message will be emitted synchronously before moving on to the next\n * message. The internal queue ensures that data is emitted in order and avoids race conditions\n * when decoding.\n *\n * @param stream The raw stream connection to decode\n * @param decodeResponse Function to decode response data\n * @param customDecoders Optional custom decoders for specific data types\n * @returns A new stream connection with decoded data\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Create a subscription stream\n * const rawStream = await fcl.send([\n *   fcl.subscribeEvents({\n *     eventTypes: [\"flow.AccountCreated\"],\n *     startHeight: 0\n *   })\n * ]);\n *\n * // Decode the stream data\n * const decodedStream = fcl.decodeStream(\n *   rawStream,\n *   fcl.decodeResponse,\n *   {}\n * );\n *\n * // Listen for decoded events\n * decodedStream.on(\"events\", (events) => {\n *   events.forEach(event => {\n *     console.log(\"Decoded event:\", event);\n *   });\n * });\n *\n * decodedStream.on(\"error\", (error) => {\n *   console.error(\"Stream error:\", error);\n * });\n *\n * decodedStream.on(\"close\", () => {\n *   console.log(\"Stream closed\");\n * });\n */\nexport const decodeStream = (\n  stream: StreamConnection<{data: any}>,\n  decodeResponse: DecodeResponseFn,\n  customDecoders?: Record<string, any>\n): StreamConnection<any> => {\n  const newStream = new EventEmitter()\n  let queue = taskQueue()\n\n  // Data is separated by topic & the decoded data is emitted in order\n  // All topics for a given message will be emitted synchronously before moving on to the next message\n  // The streamReady promise ensures that the data is emitted in order and avoids race conditions when decoding\n  stream.on(\"data\", async data => {\n    const topics = Object.keys(data).filter(\n      key => data[key] != null && key !== \"tag\"\n    )\n\n    let newDataPromise = Promise.all(\n      topics.map(async channel => {\n        const partialResponse = {\n          [channel]: data[channel],\n        }\n        const message = await decodeResponse(partialResponse, customDecoders)\n        return {\n          channel,\n          message,\n        }\n      })\n    )\n\n    queue.push(async () => {\n      // Emit the new data\n      const newData = await newDataPromise\n      newData.forEach(({channel, message}) => {\n        newStream.emit(channel, message)\n      })\n    })\n  })\n\n  // Relay events from the original stream\n  // These events are delivered in order as well so that the stream will\n  // not emit more data after it has announced a contradictory state\n  function relayEvent(event: any) {\n    stream.on(event, (message: any) => {\n      queue.push(async () => {\n        newStream.emit(event, message)\n      })\n    })\n  }\n  relayEvent(\"close\")\n  relayEvent(\"error\")\n\n  return {\n    on(channel: string, callback: any) {\n      newStream.on(channel, callback)\n      return this\n    },\n    off(channel: string, callback: any) {\n      newStream.off(channel, callback)\n      return this\n    },\n    close: () => {\n      stream.close()\n    },\n  }\n}\n\nfunction taskQueue() {\n  let queue: (() => Promise<any>)[] = [] as any as (() => Promise<any>)[]\n  let running = false\n\n  async function run() {\n    if (running) return\n    running = true\n    while (queue.length > 0) {\n      const task = queue.shift()\n      await task?.()\n    }\n    running = false\n  }\n\n  return {\n    push: (task: () => Promise<any>) => {\n      queue.push(task)\n      run()\n    },\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/decode/decode.test.js",
    "content": "import {decode, decodeResponse} from \"./decode\"\nimport {Buffer} from \"@onflow/rlp\"\nimport * as decodeStreamModule from \"./decode-stream\"\nimport * as decodeModule from \"./decode\"\n\nit(\"decodeResponse\", async () => {\n  const response = {\n    encodedData: JSON.parse(\n      Buffer.from(\n        Uint8Array.from(\n          Buffer.from(\n            \"7b2274797065223a22496e74222c2276616c7565223a2237227d0a\",\n            \"hex\"\n          )\n        )\n      ).toString(\"utf8\")\n    ),\n  }\n\n  const data = await decodeResponse(response)\n  expect(data).toBe(\"7\")\n})\n\ndescribe(\"unit tests to cover all types\", () => {\n  it(\"returns the correct response given a json-cdc payload 2 OPTIONAL\", async () => {\n    const payload = {type: \"Optional\", value: null}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(null)\n  })\n\n  it(\"returns the correct response given a json-cdc payload 3 OPTIONAL\", async () => {\n    const payload = {type: \"Optional\", value: {type: \"Int\", value: \"42\"}}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"42\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 4 VOID\", async () => {\n    const payload = {type: \"Void\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(null)\n  })\n\n  it(\"returns the correct response given a json-cdc payload 5 BOOLEAN\", async () => {\n    const payload = {type: \"Bool\", value: true}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(true)\n  })\n\n  it(\"returns the correct response given a json-cdc payload 6 BOOLEAN\", async () => {\n    const payload = {type: \"Bool\", value: false}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(false)\n  })\n\n  it(\"returns the correct response given a json-cdc payload 7 STRING\", async () => {\n    const payload = {type: \"String\", value: \"\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 8 STRING\", async () => {\n    const payload = {type: \"String\", value: \"foo\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"foo\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 9 ADDRESS\", async () => {\n    const payload = {\n      type: \"Address\",\n      value: \"0x0102030405000000000000000000000000000000\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"0x0102030405000000000000000000000000000000\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 10 ADDRESS\", async () => {\n    const payload = {\n      type: \"Address\",\n      value: \"0x0102030405000000000000000000000000000000\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"0x0102030405000000000000000000000000000000\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 10 INT\", async () => {\n    const payload = {type: \"Int\", value: \"-42\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-42\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 11 INT\", async () => {\n    const payload = {\n      type: \"Int\",\n      value:\n        \"115792089237316195423570985008687907853269984665640564039457584007913129639945\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\n      \"115792089237316195423570985008687907853269984665640564039457584007913129639945\"\n    )\n  })\n\n  it(\"returns the correct response given a json-cdc payload 12 INT\", async () => {\n    const payload = {\n      type: \"Int\",\n      value:\n        \"-57896044618658097711785492504343953926634992332820282019728792003956564819978\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\n      \"-57896044618658097711785492504343953926634992332820282019728792003956564819978\"\n    )\n  })\n\n  it(\"returns the correct response given a json-cdc payload 13 INT\", async () => {\n    const payload = {type: \"Int\", value: \"0\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"0\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 14 INT8\", async () => {\n    const payload = {type: \"Int8\", value: \"-128\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-128\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 15 INT16\", async () => {\n    const payload = {type: \"Int16\", value: \"32767\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"32767\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 16 INT32\", async () => {\n    const payload = {type: \"Int32\", value: \"2147483647\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"2147483647\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 17 INT64\", async () => {\n    const payload = {type: \"Int64\", value: \"-9223372036854775808\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-9223372036854775808\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 18 INT128\", async () => {\n    const payload = {\n      type: \"Int128\",\n      value: \"-170141183460469231731687303715884105727\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-170141183460469231731687303715884105727\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 19 INT256\", async () => {\n    const payload = {\n      type: \"Int256\",\n      value:\n        \"57896044618658097711785492504343953926634992332820282019728792003956564819967\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\n      \"57896044618658097711785492504343953926634992332820282019728792003956564819967\"\n    )\n  })\n\n  it(\"returns the correct response given a json-cdc payload 20 UINT\", async () => {\n    const payload = {\n      type: \"UInt\",\n      value:\n        \"115792089237316195423570985008687907853269984665640564039457584007913129639945\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\n      \"115792089237316195423570985008687907853269984665640564039457584007913129639945\"\n    )\n  })\n\n  it(\"returns the correct response given a json-cdc payload 21 UINT8\", async () => {\n    const payload = {type: \"UInt8\", value: \"255\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"255\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 22 UINT16\", async () => {\n    const payload = {type: \"UInt16\", value: \"65535\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"65535\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 23 UINT32\", async () => {\n    const payload = {type: \"UInt32\", value: \"4294967295\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"4294967295\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 24 UINT64\", async () => {\n    const payload = {type: \"UInt64\", value: \"18446744073709551615\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"18446744073709551615\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 25 UINT128\", async () => {\n    const payload = {\n      type: \"UInt128\",\n      value: \"340282366920938463463374607431768211455\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"340282366920938463463374607431768211455\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 26 UINT256\", async () => {\n    const payload = {\n      type: \"UInt256\",\n      value:\n        \"115792089237316195423570985008687907853269984665640564039457584007913129639935\",\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\n      \"115792089237316195423570985008687907853269984665640564039457584007913129639935\"\n    )\n  })\n\n  it(\"returns the correct response given a json-cdc payload 27 WORD8\", async () => {\n    const payload = {type: \"Word8\", value: \"255\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"255\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 28 WORD16\", async () => {\n    const payload = {type: \"Word16\", value: \"65535\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"65535\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 29 WORD32\", async () => {\n    const payload = {type: \"Word32\", value: \"4294967295\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"4294967295\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 30 WORD128\", async () => {\n    const payload = {type: \"Word128\", value: \"12412531315\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"12412531315\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 31 WORD256\", async () => {\n    const payload = {type: \"Word256\", value: \"555153134124\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"555153134124\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 32 WORD64\", async () => {\n    const payload = {type: \"Word64\", value: \"18446744073709551615\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"18446744073709551615\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 33 FIX64\", async () => {\n    const payload = {type: \"Fix64\", value: \"789.00123010\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"789.00123010\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 34 FIX64\", async () => {\n    const payload = {type: \"Fix64\", value: \"-12345.00678900\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-12345.00678900\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 35 UFIX64\", async () => {\n    const payload = {type: \"UFix64\", value: \"789.00123010\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"789.00123010\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 36 FIX128\", async () => {\n    const payload = {type: \"Fix128\", value: \"1.230000000000000000000000\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"1.230000000000000000000000\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 37 FIX128\", async () => {\n    const payload = {type: \"Fix128\", value: \"-12345.123456789012345678901234\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"-12345.123456789012345678901234\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 38 UFIX128\", async () => {\n    const payload = {type: \"UFix128\", value: \"789.123456789012345678901234\"}\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"789.123456789012345678901234\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 39 ARRAY\", async () => {\n    const payload = {\n      type: \"Array\",\n      value: [\n        {type: \"Int\", value: \"1\"},\n        {type: \"Int\", value: \"2\"},\n        {type: \"Int\", value: \"3\"},\n      ],\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual([\"1\", \"2\", \"3\"])\n  })\n\n  it(\"returns the correct response given a json-cdc payload 37 ARRAY\", async () => {\n    const payload = {\n      type: \"Array\",\n      value: [\n        {\n          type: \"Resource\",\n          value: {\n            id: \"test.Foo\",\n            fields: [{name: \"bar\", value: {type: \"Int\", value: \"1\"}}],\n          },\n        },\n        {\n          type: \"Resource\",\n          value: {\n            id: \"test.Foo\",\n            fields: [{name: \"bar\", value: {type: \"Int\", value: \"2\"}}],\n          },\n        },\n        {\n          type: \"Resource\",\n          value: {\n            id: \"test.Foo\",\n            fields: [{name: \"bar\", value: {type: \"Int\", value: \"3\"}}],\n          },\n        },\n      ],\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual([{bar: \"1\"}, {bar: \"2\"}, {bar: \"3\"}])\n  })\n\n  it(\"returns the correct response given a json-cdc payload 38 DICTIONARY\", async () => {\n    const payload = {\n      type: \"Dictionary\",\n      value: [\n        {key: {type: \"String\", value: \"a\"}, value: {type: \"Int\", value: \"1\"}},\n        {key: {type: \"String\", value: \"b\"}, value: {type: \"Int\", value: \"2\"}},\n        {key: {type: \"String\", value: \"c\"}, value: {type: \"Int\", value: \"3\"}},\n      ],\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"1\", b: \"2\", c: \"3\"})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 39 DICTIONARY\", async () => {\n    const payload = {\n      type: \"Dictionary\",\n      value: [\n        {\n          key: {type: \"String\", value: \"a\"},\n          value: {\n            type: \"Dictionary\",\n            value: [\n              {\n                key: {type: \"String\", value: \"1\"},\n                value: {type: \"Int\", value: \"1\"},\n              },\n            ],\n          },\n        },\n        {\n          key: {type: \"String\", value: \"b\"},\n          value: {\n            type: \"Dictionary\",\n            value: [\n              {\n                key: {type: \"String\", value: \"2\"},\n                value: {type: \"Int\", value: \"2\"},\n              },\n            ],\n          },\n        },\n        {\n          key: {type: \"String\", value: \"c\"},\n          value: {\n            type: \"Dictionary\",\n            value: [\n              {\n                key: {type: \"String\", value: \"3\"},\n                value: {type: \"Int\", value: \"3\"},\n              },\n            ],\n          },\n        },\n      ],\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: {1: \"1\"}, b: {2: \"2\"}, c: {3: \"3\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 40 DICTIONARY\", async () => {\n    const payload = {\n      type: \"Dictionary\",\n      value: [\n        {\n          key: {type: \"String\", value: \"a\"},\n          value: {\n            type: \"Resource\",\n            value: {\n              id: \"test.Foo\",\n              fields: [{name: \"bar\", value: {type: \"Int\", value: \"1\"}}],\n            },\n          },\n        },\n        {\n          key: {type: \"String\", value: \"b\"},\n          value: {\n            type: \"Resource\",\n            value: {\n              id: \"test.Foo\",\n              fields: [{name: \"bar\", value: {type: \"Int\", value: \"2\"}}],\n            },\n          },\n        },\n        {\n          key: {type: \"String\", value: \"c\"},\n          value: {\n            type: \"Resource\",\n            value: {\n              id: \"test.Foo\",\n              fields: [{name: \"bar\", value: {type: \"Int\", value: \"3\"}}],\n            },\n          },\n        },\n      ],\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: {bar: \"1\"}, b: {bar: \"2\"}, c: {bar: \"3\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 41 RESOURCE\", async () => {\n    const payload = {\n      type: \"Resource\",\n      value: {\n        id: \"test.Foo\",\n        fields: [{name: \"bar\", value: {type: \"Int\", value: \"42\"}}],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({bar: \"42\"})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 42 RESOURCE\", async () => {\n    const payload = {\n      type: \"Resource\",\n      value: {\n        id: \"test.Foo\",\n        fields: [\n          {\n            name: \"bar\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.Bar\",\n                fields: [{name: \"x\", value: {type: \"Int\", value: \"42\"}}],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({bar: {x: \"42\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 43 STRUCT\", async () => {\n    const payload = {\n      type: \"Struct\",\n      value: {\n        id: \"test.FooStruct\",\n        fields: [\n          {name: \"a\", value: {type: \"Int\", value: \"1\"}},\n          {name: \"b\", value: {type: \"String\", value: \"foo\"}},\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"1\", b: \"foo\"})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 44 STRUCT\", async () => {\n    const payload = {\n      type: \"Struct\",\n      value: {\n        id: \"test.FooStruct\",\n        fields: [\n          {name: \"a\", value: {type: \"String\", value: \"foo\"}},\n          {\n            name: \"b\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.Foo\",\n                fields: [{name: \"bar\", value: {type: \"Int\", value: \"42\"}}],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"foo\", b: {bar: \"42\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 45 STRUCT\", async () => {\n    const payload = {\n      type: \"Struct\",\n      value: {\n        id: \"test.FooStruct\",\n        fields: [\n          {name: \"a\", value: {type: \"String\", value: \"foo\"}},\n          {\n            name: \"b\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.Foo\",\n                fields: [{name: \"bar\", value: {type: \"Int\", value: \"42\"}}],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"foo\", b: {bar: \"42\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 46 EVENT\", async () => {\n    const payload = {\n      type: \"Event\",\n      value: {\n        id: \"test.FooEvent\",\n        fields: [\n          {name: \"a\", value: {type: \"Int\", value: \"1\"}},\n          {name: \"b\", value: {type: \"String\", value: \"foo\"}},\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"1\", b: \"foo\"})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 47 EVENT\", async () => {\n    const payload = {\n      type: \"Event\",\n      value: {\n        id: \"test.FooEvent\",\n        fields: [\n          {name: \"a\", value: {type: \"String\", value: \"foo\"}},\n          {\n            name: \"b\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.Foo\",\n                fields: [{name: \"bar\", value: {type: \"Int\", value: \"42\"}}],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({a: \"foo\", b: {bar: \"42\"}})\n  })\n\n  it(\"returns the correct response given a json-cdc payload 48 TYPE\", async () => {\n    const payload = {\n      type: \"Type\",\n      value: {\n        staticType: \"FooType\",\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual(\"FooType\")\n  })\n\n  it(\"returns the correct response given a json-cdc payload 49 PATH\", async () => {\n    const payload = {\n      type: \"Path\",\n      value: {\n        domain: \"storage\",\n        identifier: \"123abc\",\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({\n      domain: \"storage\",\n      identifier: \"123abc\",\n    })\n  })\n\n  it(\"returns the correct response given a json-cdc payload 50 INCLUSIVERANGE\", async () => {\n    const payload = {\n      type: \"InclusiveRange\",\n      value: {\n        start: {type: \"Int\", value: \"2\"},\n        end: {type: \"Int\", value: \"10\"},\n        step: {type: \"Int\", value: \"1\"},\n      },\n    }\n\n    const decoded = await decode(payload)\n\n    expect(decoded).toStrictEqual({\n      start: \"2\",\n      end: \"10\",\n      step: \"1\",\n    })\n  })\n})\n\n// Boolean\nconst genBool = () => {\n  const OPTIONS = [true, false]\n  const value = OPTIONS[~~(Math.random() * OPTIONS.length)]\n  return {payload: {type: \"Bool\", value}, decoded: value}\n}\nconst genBoolSpec = () => {\n  const {payload, decoded} = genBool()\n  return {\n    label: `Boolean -- ${payload.value}`,\n    payload,\n    decoded,\n  }\n}\n\n// Void\nconst genVoid = () => {\n  return {\n    payload: {type: \"Void\"},\n    decoded: null,\n  }\n}\nconst genVoidSpec = () => {\n  const {payload, decoded} = genVoid()\n  return {\n    label: `Void`,\n    payload,\n    decoded,\n  }\n}\n\n// Int\nconst genInt = () => {\n  const minInt256 =\n    -57896044618658097711785492504343953926634992332820282019728792003956564819978\n  const maxUInt256 = 115792089237316195423570985008687907853269984665640564039457584007913129639945\n  const ranInt = ~~(Math.random() * (maxUInt256 - minInt256) + minInt256)\n  return {\n    payload: {type: \"Int\", value: ranInt.toString()},\n    decoded: ranInt.toString(),\n  }\n}\nconst genIntSpec = () => {\n  const {payload, decoded} = genInt()\n  return {\n    label: `Int -- ${decoded}`,\n    payload,\n    decoded,\n  }\n}\n\n// String\nconst genString = () => {\n  const stringLen = ~~(100 * Math.random())\n  const ranString = Math.random()\n    .toString(36)\n    .replace(/[^a-z]+/g, \"\")\n    .substr(0, stringLen)\n  return {\n    payload: {type: \"String\", value: ranString},\n    decoded: ranString,\n  }\n}\nconst genStringSpec = () => {\n  const {payload, decoded} = genString()\n  return {\n    label: `String -- ${decoded}`,\n    payload,\n    decoded,\n  }\n}\n\n// Dictionary\nconst genDictionary = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Dictionary\", value: []},\n      decoded: {},\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const dictionaryLength = ~~(Math.random() * 10)\n  const arr = Array.from({length: dictionaryLength}).reduce(\n    acc => {\n      const {payload: valPayload, decoded: val} =\n        OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      const {payload: keyPayload, decoded: ranStringKey} = genString()\n      acc.dict.push({\n        key: keyPayload,\n        value: valPayload,\n      })\n      acc.decoded = {\n        ...acc.decoded,\n        [ranStringKey]: val,\n      }\n      return acc\n    },\n    {dict: [], decoded: {}}\n  )\n  return {\n    payload: {type: \"Dictionary\", value: arr.dict},\n    decoded: arr.decoded,\n  }\n}\nconst genDictionarySpec = () => {\n  const {payload, decoded} = genDictionary()\n  return {\n    label: `Dictionary`,\n    payload,\n    decoded,\n  }\n}\n\nconst genResource = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Resource\", value: {fields: []}},\n      decoded: {},\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const fieldsLength = ~~(Math.random() * 10)\n  const res = Array.from({length: fieldsLength}).reduce(\n    acc => {\n      const {payload: valPayload, decoded: val} =\n        OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      const {decoded: ranStringName} = genString()\n      acc.fields.push({\n        name: ranStringName,\n        value: valPayload,\n      })\n      acc.decoded = {\n        ...acc.decoded,\n        [ranStringName]: val,\n      }\n      return acc\n    },\n    {fields: [], decoded: {}}\n  )\n  return {\n    payload: {type: \"Resource\", value: {fields: res.fields}},\n    decoded: res.decoded,\n  }\n}\nconst genResourceSpec = () => {\n  const {payload, decoded} = genResource()\n  return {\n    label: `Resource`,\n    payload,\n    decoded,\n  }\n}\n\nconst genStruct = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Struct\", value: {fields: []}},\n      decoded: {},\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const fieldsLength = ~~(Math.random() * 10)\n  const res = Array.from({length: fieldsLength}).reduce(\n    acc => {\n      const {payload: valPayload, decoded: val} =\n        OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      const {decoded: ranStringName} = genString()\n      acc.fields.push({\n        name: ranStringName,\n        value: valPayload,\n      })\n      acc.decoded = {\n        ...acc.decoded,\n        [ranStringName]: val,\n      }\n      return acc\n    },\n    {fields: [], decoded: {}}\n  )\n  return {\n    payload: {type: \"Struct\", value: {fields: res.fields}},\n    decoded: res.decoded,\n  }\n}\nconst genStructSpec = () => {\n  const {payload, decoded} = genStruct()\n  return {\n    label: `Struct`,\n    payload,\n    decoded,\n  }\n}\n\nconst genEvent = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Event\", value: {fields: []}},\n      decoded: {},\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const fieldsLength = ~~(Math.random() * 10)\n  const res = Array.from({length: fieldsLength}).reduce(\n    acc => {\n      const {payload: valPayload, decoded: val} =\n        OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      const {decoded: ranStringName} = genString()\n      acc.fields.push({\n        name: ranStringName,\n        value: valPayload,\n      })\n      acc.decoded = {\n        ...acc.decoded,\n        [ranStringName]: val,\n      }\n      return acc\n    },\n    {fields: [], decoded: {}}\n  )\n  return {\n    payload: {type: \"Event\", value: {fields: res.fields}},\n    decoded: res.decoded,\n  }\n}\nconst genEventSpec = () => {\n  const {payload, decoded} = genEvent()\n  return {\n    label: `Event`,\n    payload,\n    decoded,\n  }\n}\n\nconst genEnum = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Enum\", value: {fields: []}},\n      decoded: {},\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const fieldsLength = ~~(Math.random() * 10)\n  const res = Array.from({length: fieldsLength}).reduce(\n    acc => {\n      const {payload: valPayload, decoded: val} =\n        OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      const {decoded: ranStringName} = genString()\n      acc.fields.push({\n        name: ranStringName,\n        value: valPayload,\n      })\n      acc.decoded = {\n        ...acc.decoded,\n        [ranStringName]: val,\n      }\n      return acc\n    },\n    {fields: [], decoded: {}}\n  )\n  return {\n    payload: {type: \"Enum\", value: {fields: res.fields}},\n    decoded: res.decoded,\n  }\n}\nconst genEnumSpec = () => {\n  const {payload, decoded} = genEnum()\n  return {\n    label: `Enum`,\n    payload,\n    decoded,\n  }\n}\n\nconst genArray = (depth = 0) => {\n  const MAXDEPTH = 5\n  if (depth >= MAXDEPTH) {\n    return {\n      payload: {type: \"Array\", value: []},\n      decoded: [],\n    }\n  }\n  const OPTIONS = [\n    genString,\n    genInt,\n    genBool,\n    genVoid,\n    () => genDictionary(depth++),\n    () => genResource(depth++),\n    () => genStruct(depth++),\n    () => genEvent(depth++),\n    () => genArray(depth++),\n    () => genEnum(depth++),\n  ]\n  const fieldsLength = ~~(Math.random() * 10)\n  const arr = Array.from({length: fieldsLength}).reduce(\n    acc => {\n      const {payload, decoded} = OPTIONS[~~(Math.random() * OPTIONS.length)]()\n      acc.values.push(payload)\n      acc.decoded.push(decoded)\n      return acc\n    },\n    {values: [], decoded: []}\n  )\n  return {\n    payload: {type: \"Array\", value: arr.values},\n    decoded: arr.decoded,\n  }\n}\nconst genArraySpec = () => {\n  const {payload, decoded} = genArray()\n  return {\n    label: `Array`,\n    payload,\n    decoded,\n  }\n}\n\nconst genType = () => {\n  const {payload, decoded} = genString()\n  return {\n    payload: {type: \"Type\", value: {staticType: payload.value}},\n    decoded: decoded,\n  }\n}\nconst genTypeSpec = () => {\n  const {payload, decoded} = genType()\n  return {\n    label: `Type`,\n    payload,\n    decoded,\n  }\n}\n\nconst genPath = () => {\n  const domains = [\"storage\", \"private\", \"public\"]\n  const randDomain = domains[~~Math.random() * domains.length]\n  const {payload, decoded} = genString()\n  return {\n    payload: {\n      type: \"Path\",\n      value: {domain: randDomain, identifier: payload.value},\n    },\n    decoded: {\n      domain: randDomain,\n      identifier: decoded,\n    },\n  }\n}\nconst genPathSpec = () => {\n  const {payload, decoded} = genPath()\n  return {\n    label: `Path`,\n    payload,\n    decoded,\n  }\n}\n\nconst genCapability = () => {\n  const {payload: payload1, decoded: decoded1} = genString()\n  const {payload: payload2, decoded: decoded2} = genString()\n  const {payload: payload3, decoded: decoded3} = genString()\n  return {\n    payload: {\n      type: \"Capability\",\n      value: {\n        path: payload1.value,\n        address: payload2.value,\n        borrowType: payload3.value,\n      },\n    },\n    decoded: {\n      path: decoded1,\n      address: decoded2,\n      borrowType: decoded3,\n    },\n  }\n}\nconst genCapabilitySpec = () => {\n  const {payload, decoded} = genCapability()\n  return {\n    label: `Capability`,\n    payload,\n    decoded,\n  }\n}\n\nconst times = fn => {\n  const OPTS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n  return Array.from({length: OPTS[~~(Math.random() * OPTS.length)]}, () => fn)\n}\n\ndescribe(\"generative tests\", () => {\n  ;[\n    {\n      label: \"optional\",\n      payload: {type: \"Optional\", value: null},\n      decoded: null,\n    },\n    ...times(genBoolSpec),\n    ...times(genVoidSpec),\n    ...times(genIntSpec),\n    ...times(genStringSpec),\n    ...times(genDictionarySpec),\n    ...times(genResourceSpec),\n    ...times(genStructSpec),\n    ...times(genEventSpec),\n    ...times(genArraySpec),\n    ...times(genTypeSpec),\n    ...times(genPathSpec),\n    ...times(genEnumSpec),\n    ...times(genCapabilitySpec),\n  ]\n    .filter(d => d != null)\n    .map(d => {\n      return typeof d === \"function\" ? d() : d\n    })\n    .forEach(({label, payload, decoded, custom}) => {\n      it(label, async () =>\n        expect(await decode(payload, custom || undefined)).toStrictEqual(\n          decoded\n        )\n      )\n    })\n})\n\ndescribe(\"custom decoder tests\", () => {\n  it(\"decodes using a custom decoder correctly\", async () => {\n    const resource = {\n      type: \"Resource\",\n      value: {\n        id: \"test.Foo\",\n        fields: [{name: \"bar\", value: {type: \"Int\", value: \"1\"}}],\n      },\n    }\n\n    const fooDecoder = async resource => ({\n      hello: \"world\",\n    })\n\n    const decoded = await decode(resource, {\"test.Foo\": fooDecoder})\n\n    expect(decoded).toStrictEqual({\n      hello: \"world\",\n    })\n  })\n\n  it(\"custom regex decoder overrides default decoder correctly\", async () => {\n    const resource = {\n      type: \"String\",\n      value: \"original value\",\n    }\n\n    const stringDecoder = _ => \"replaced value\"\n\n    const decoded = await decode(resource, {\"/String/\": stringDecoder})\n\n    expect(decoded).toStrictEqual(\"replaced value\")\n  })\n\n  it(\"decodes using a custom nested decoder correctly\", async () => {\n    const resource = {\n      type: \"Resource\",\n      value: {\n        id: \"test.Jeff\",\n        fields: [\n          {name: \"firstName\", value: {type: \"String\", value: \"Jeff\"}},\n          {name: \"lastName\", value: {type: \"String\", value: \"Doyle\"}},\n        ],\n      },\n    }\n\n    const Jeff = function (resource) {\n      if (!(this instanceof Jeff)) return new Jeff(resource)\n      this.firstName = resource.firstName\n      this.lastName = resource.lastName\n      this.printName = () => `${this.firstName} ${this.lastName}`\n    }\n\n    const jeffDecoder = async resource => {\n      return Jeff(resource)\n    }\n\n    const decoded = await decode(resource, {\"test.Jeff\": jeffDecoder}, [])\n\n    expect(decoded.printName()).toStrictEqual(\"Jeff Doyle\")\n  })\n\n  it(\"decodes using a cusotm nested decoder correctly\", async () => {\n    const resource = {\n      type: \"Resource\",\n      value: {\n        id: \"test.CryptoKitty\",\n        fields: [\n          {name: \"kittyName\", value: {type: \"String\", value: \"Sir Meowsers\"}},\n          {\n            name: \"kittyHat\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.CryptoKittyHat\",\n                fields: [\n                  {\n                    name: \"kittyHatName\",\n                    value: {type: \"String\", value: \"Yankee With No Brim\"},\n                  },\n                ],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const kittyHatDecoder = async kittyHat => ({\n      name: kittyHat.kittyHatName,\n    })\n\n    const kittyDecoder = async kitty => ({\n      name: kitty.kittyName,\n      hat: kitty.kittyHat,\n    })\n\n    const decoded = await decode(resource, {\n      \"/test.CryptoKitty$/\": kittyDecoder,\n      \"/test.CryptoKittyHat$/\": kittyHatDecoder,\n    })\n\n    expect(decoded).toStrictEqual({\n      name: \"Sir Meowsers\",\n      hat: {\n        name: \"Yankee With No Brim\",\n      },\n    })\n  })\n\n  it(\"decodes using a custom decoder with regex lookup\", async () => {\n    const resource = {\n      type: \"Resource\",\n      value: {\n        id: \"test.CryptoKitty\",\n        fields: [\n          {name: \"kittyName\", value: {type: \"String\", value: \"Sir Meowsers\"}},\n          {\n            name: \"kittyHat\",\n            value: {\n              type: \"Resource\",\n              value: {\n                id: \"test.CryptoKittyHat\",\n                fields: [\n                  {\n                    name: \"kittyHatName\",\n                    value: {type: \"String\", value: \"Yankee With No Brim\"},\n                  },\n                ],\n              },\n            },\n          },\n        ],\n      },\n    }\n\n    const kittyHatDecoder = async kittyHat => ({\n      name: kittyHat.kittyHatName,\n    })\n\n    const kittyDecoder = async kitty => ({\n      name: kitty.kittyName,\n      hat: kitty.kittyHat,\n    })\n\n    const decoded = await decode(resource, {\n      \"/.CryptoKittyHat$/\": kittyHatDecoder,\n      \"/.CryptoKitty$/\": kittyDecoder,\n    })\n\n    expect(decoded).toStrictEqual({\n      name: \"Sir Meowsers\",\n      hat: {\n        name: \"Yankee With No Brim\",\n      },\n    })\n  })\n})\n\ndescribe(\"decode GetEvents tests\", () => {\n  it(\"decodes a GetEvents response correctly\", async () => {\n    const timestampISOString = new Date().toISOString()\n\n    const getEventsResponse = {\n      events: [\n        {\n          blockHeight: 123,\n          blockId: \"abc123\",\n          blockTimestamp: timestampISOString,\n          eventIndex: 123,\n          transactionId: \"abc-123\",\n          transactionIndex: 123,\n          type: \"MyFunAndCoolEvent\",\n          payload: {type: \"String\", value: \"foo\"},\n        },\n      ],\n    }\n\n    expect(await decodeResponse(getEventsResponse)).toStrictEqual([\n      {\n        blockHeight: 123,\n        blockId: \"abc123\",\n        blockTimestamp: timestampISOString,\n        eventIndex: 123,\n        transactionId: \"abc-123\",\n        transactionIndex: 123,\n        type: \"MyFunAndCoolEvent\",\n        data: \"foo\",\n      },\n    ])\n  })\n})\n\ndescribe(\"decode single event tests\", () => {\n  it(\"decodes a single event response correctly\", async () => {\n    const eventResponse = {\n      event: {\n        blockHeight: 123,\n        blockId: \"abc123\",\n        blockTimestamp: new Date(123).toISOString(),\n        eventIndex: 123,\n        transactionId: \"abc-123\",\n        transactionIndex: 123,\n        type: \"MyFunAndCoolEvent\",\n        payload: {type: \"String\", value: \"foo\"},\n      },\n    }\n\n    expect(await decodeResponse(eventResponse)).toStrictEqual({\n      blockHeight: 123,\n      blockId: \"abc123\",\n      blockTimestamp: new Date(123).toISOString(),\n      eventIndex: 123,\n      transactionId: \"abc-123\",\n      transactionIndex: 123,\n      type: \"MyFunAndCoolEvent\",\n      data: \"foo\",\n    })\n  })\n})\n\ndescribe(\"decode account status event tests\", () => {\n  it(\"decodes an account status response correctly\", async () => {\n    const accountStatusResponse = {\n      accountStatusEvent: {\n        accountAddress: \"0x123\",\n        blockHeight: 123,\n        blockId: \"abc123\",\n        blockTimestamp: new Date(123).toISOString(),\n        eventIndex: 123,\n        transactionId: \"abc-123\",\n        transactionIndex: 123,\n        type: \"flow.AccountKeyAdded\",\n        payload: {type: \"String\", value: \"foo\"},\n      },\n    }\n\n    expect(await decodeResponse(accountStatusResponse)).toStrictEqual({\n      accountAddress: \"0x123\",\n      blockHeight: 123,\n      blockId: \"abc123\",\n      blockTimestamp: new Date(123).toISOString(),\n      eventIndex: 123,\n      transactionId: \"abc-123\",\n      transactionIndex: 123,\n      type: \"flow.AccountKeyAdded\",\n      data: \"foo\",\n    })\n  })\n})\n\ndescribe(\"decode block digest tests\", () => {\n  it(\"decodes a block digest response correctly\", async () => {\n    const blockDigestResponse = {\n      blockDigest: {\n        id: \"abc123\",\n        height: 123,\n        timestamp: new Date(123).toISOString(),\n      },\n    }\n\n    expect(await decodeResponse(blockDigestResponse)).toStrictEqual({\n      id: \"abc123\",\n      height: 123,\n      timestamp: new Date(123).toISOString(),\n    })\n  })\n})\n\ndescribe(\"decode stream connection tests\", () => {\n  it(\"calls decodeStream to decode stream connection\", async () => {\n    let mockStream = {}\n    const streamResponse = {\n      streamConnection: mockStream,\n    }\n    const decodeStreamSpy = jest\n      .spyOn(decodeStreamModule, \"decodeStream\")\n      .mockImplementation(() => {\n        return mockStream\n      })\n    const decoders = {foo: () => {}}\n    const decoded = await decodeResponse(streamResponse, decoders)\n\n    expect(decoded).toBe(mockStream)\n    expect(decodeStreamSpy).toHaveBeenCalledWith(\n      mockStream,\n      decodeResponse,\n      decoders\n    )\n  })\n})\n\ndescribe(\"decode heartbeat tests\", () => {\n  it(\"decodes a heartbeat response correctly\", async () => {\n    const heartbeatResponse = {\n      heartbeat: {\n        timestamp: 123456789,\n      },\n    }\n\n    expect(await decodeResponse(heartbeatResponse)).toStrictEqual({\n      timestamp: 123456789,\n    })\n  })\n})\n\nafterEach(() => {\n  jest.restoreAllMocks()\n})\n"
  },
  {
    "path": "packages/sdk/src/decode/decode.ts",
    "content": "import {log} from \"@onflow/util-logger\"\nimport {decodeStream} from \"./decode-stream\"\n\ntype DecoderFunction = (\n  value: any,\n  decoders: DecoderMap,\n  stack: any[]\n) => Promise<any>\n\ninterface DecoderMap {\n  [key: string]: DecoderFunction\n}\n\ninterface DecodeInstructions {\n  type: string\n  value?: any\n}\n\ninterface CompositeField {\n  name: string\n  value: DecodeInstructions\n}\n\ninterface CompositeInstruction {\n  id?: string\n  fields: CompositeField[]\n}\n\ninterface KeyValuePair {\n  key: DecodeInstructions\n  value: DecodeInstructions\n}\n\ninterface InclusiveRangeValue {\n  start?: DecodeInstructions\n  end?: DecodeInstructions\n  step?: DecodeInstructions\n  [key: string]: any\n}\n\ninterface FlowEvent {\n  type: string\n  transactionId: string\n  transactionIndex: number\n  eventIndex: number\n  payload: DecodeInstructions\n}\n\ninterface FlowBlockEvent extends FlowEvent {\n  blockId: string\n  blockHeight: number\n  blockTimestamp: string\n}\n\ninterface FlowTransactionStatus {\n  blockId: string\n  status: number\n  statusCode: number\n  errorMessage: string\n  events: FlowEvent[]\n}\n\ninterface FlowResponse {\n  encodedData?: DecodeInstructions\n  transactionStatus?: FlowTransactionStatus\n  transaction?: any\n  events?: FlowBlockEvent[]\n  account?: any\n  block?: any\n  blockHeader?: any\n  blockDigest?: any\n  event?: any\n  accountStatusEvent?: any\n  latestBlock?: any\n  transactionId?: string\n  collection?: any\n  networkParameters?: {\n    chainId: string\n  }\n  streamConnection?: any\n  heartbeat?: any\n  nodeVersionInfo?: any\n}\n\nconst latestBlockDeprecationNotice = (): void => {\n  log.deprecate({\n    pkg: \"@onflow/decode\",\n    subject:\n      \"Operating upon data of the latestBlock field of the response object\",\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field\",\n  })\n}\n\nconst decodeNumber = async (\n  num: any,\n  _: DecoderMap,\n  stack: any[]\n): Promise<number> => {\n  try {\n    return Number(num)\n  } catch (e) {\n    throw new Error(`Decode Number Error : ${stack.join(\".\")}`)\n  }\n}\n\nconst decodeImplicit = async <T>(i: T): Promise<T> => i\n\nconst decodeVoid = async (): Promise<null> => null\n\nconst decodeType = async (type: any): Promise<any> => {\n  return type.staticType\n}\n\nconst decodeOptional = async (\n  optional: any,\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<any> =>\n  optional ? await recurseDecode(optional, decoders, stack) : null\n\nconst decodeArray = async (\n  array: DecodeInstructions[],\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<any[]> =>\n  await Promise.all(\n    array.map(\n      v =>\n        new Promise(async res =>\n          res(await recurseDecode(v, decoders, [...stack, v.type]))\n        )\n    )\n  )\n\nconst decodeDictionary = async (\n  dictionary: KeyValuePair[],\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<Record<string, any>> =>\n  await dictionary.reduce(\n    async (acc, v) => {\n      acc = await acc\n      acc[await recurseDecode(v.key, decoders, [...stack, v.key])] =\n        await recurseDecode(v.value, decoders, [...stack, v.key])\n      return acc\n    },\n    Promise.resolve({}) as any\n  )\n\nconst decodeComposite = async (\n  composite: CompositeInstruction,\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<any> => {\n  const decoded = await composite.fields.reduce(\n    async (acc, v) => {\n      acc = await acc\n      acc[v.name] = await recurseDecode(v.value, decoders, [...stack, v.name])\n      return acc\n    },\n    Promise.resolve({}) as any\n  )\n  const decoder = composite.id && decoderLookup(decoders, composite.id)\n  return decoder ? await decoder(decoded) : decoded\n}\n\nconst decodeInclusiveRange = async (\n  range: InclusiveRangeValue,\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<Record<string, any>> => {\n  // Recursive decode for start, end, and step\n  // We don't do all fields just in case there are future API changes\n  // where fields added and are not Cadence values\n  const keys = [\"start\", \"end\", \"step\"]\n  const decoded = await Object.keys(range).reduce(\n    async (acc, key) => {\n      acc = await acc\n      if (keys.includes(key)) {\n        acc[key] = await recurseDecode(range[key], decoders, [...stack, key])\n      }\n      return acc\n    },\n    Promise.resolve({}) as any\n  )\n  return decoded\n}\n\nconst defaultDecoders: DecoderMap = {\n  UInt: decodeImplicit,\n  Int: decodeImplicit,\n  UInt8: decodeImplicit,\n  Int8: decodeImplicit,\n  UInt16: decodeImplicit,\n  Int16: decodeImplicit,\n  UInt32: decodeImplicit,\n  Int32: decodeImplicit,\n  UInt64: decodeImplicit,\n  Int64: decodeImplicit,\n  UInt128: decodeImplicit,\n  Int128: decodeImplicit,\n  UInt256: decodeImplicit,\n  Int256: decodeImplicit,\n  Word8: decodeImplicit,\n  Word16: decodeImplicit,\n  Word32: decodeImplicit,\n  Word64: decodeImplicit,\n  Word128: decodeImplicit,\n  Word256: decodeImplicit,\n  UFix64: decodeImplicit,\n  Fix64: decodeImplicit,\n  UFix128: decodeImplicit,\n  Fix128: decodeImplicit,\n  String: decodeImplicit,\n  Character: decodeImplicit,\n  Bool: decodeImplicit,\n  Address: decodeImplicit,\n  Void: decodeVoid,\n  Optional: decodeOptional,\n  Reference: decodeImplicit,\n  Array: decodeArray,\n  Dictionary: decodeDictionary,\n  Event: decodeComposite,\n  Resource: decodeComposite,\n  Struct: decodeComposite,\n  Enum: decodeComposite,\n  Type: decodeType,\n  Path: decodeImplicit,\n  Capability: decodeImplicit,\n  InclusiveRange: decodeInclusiveRange,\n}\n\nconst decoderLookup = (decoders: DecoderMap, lookup: any): any => {\n  const found = Object.keys(decoders).find(decoder => {\n    if (/^\\/.*\\/$/.test(decoder)) {\n      const reg = new RegExp(decoder.substring(1, decoder.length - 1))\n      return reg.test(lookup)\n    }\n    return decoder === lookup\n  })\n  return lookup && found && decoders[found]\n}\n\nconst recurseDecode = async (\n  decodeInstructions: DecodeInstructions,\n  decoders: DecoderMap,\n  stack: any[]\n): Promise<any> => {\n  let decoder = decoderLookup(decoders, decodeInstructions.type)\n  if (!decoder)\n    throw new Error(\n      `Undefined Decoder Error: ${decodeInstructions.type}@${stack.join(\".\")}`\n    )\n  return await decoder(decodeInstructions.value, decoders, stack)\n}\n\n/**\n * @description - Decodes a response from Flow into JSON\n * @param decodeInstructions - The response object from Flow\n * @param customDecoders - An object of custom decoders\n * @param stack - The stack of the current decoding\n * @returns - The decoded response\n */\nexport const decode = async (\n  decodeInstructions: DecodeInstructions,\n  customDecoders: DecoderMap = {},\n  stack: any[] = []\n): Promise<any> => {\n  // Filter out all default decoders which are overridden by a custom decoder regex\n  const filteredDecoders = Object.keys(defaultDecoders)\n    .filter(\n      decoder =>\n        !Object.keys(customDecoders).find(customDecoder =>\n          new RegExp(customDecoder).test(decoder)\n        )\n    )\n    .reduce((decoders, decoderKey) => {\n      decoders[decoderKey] = defaultDecoders[decoderKey]\n      return decoders\n    }, customDecoders)\n\n  const decoders = {\n    ...filteredDecoders,\n    ...customDecoders,\n  }\n  return recurseDecode(decodeInstructions, decoders, stack)\n}\n\n/**\n * Decodes a response from Flow into JSON\n *\n * @param response The response object from Flow\n * @param customDecoders An object of custom decoders\n * @returns The decoded response\n */\nexport const decodeResponse = async (\n  response: FlowResponse,\n  customDecoders: DecoderMap = {}\n): Promise<any> => {\n  if (response.encodedData) {\n    return decode(response.encodedData, customDecoders)\n  } else if (response.transactionStatus) {\n    return {\n      ...response.transactionStatus,\n      events: await Promise.all(\n        response.transactionStatus.events.map(async function decodeEvents(e) {\n          return {\n            type: e.type,\n            transactionId: e.transactionId,\n            transactionIndex: e.transactionIndex,\n            eventIndex: e.eventIndex,\n            data: await decode(e.payload, customDecoders),\n          }\n        })\n      ),\n    }\n  } else if (response.transaction) {\n    return response.transaction\n  } else if (response.events) {\n    return await Promise.all(\n      response.events.map(async function decodeEvents(e) {\n        return {\n          blockId: e.blockId,\n          blockHeight: e.blockHeight,\n          blockTimestamp: e.blockTimestamp,\n          type: e.type,\n          transactionId: e.transactionId,\n          transactionIndex: e.transactionIndex,\n          eventIndex: e.eventIndex,\n          data: await decode(e.payload, customDecoders),\n        }\n      })\n    )\n  } else if (response.event) {\n    const {payload, ...rest} = response.event\n    return {\n      ...rest,\n      data: await decode(payload, customDecoders),\n    }\n  } else if (response.accountStatusEvent) {\n    const {payload, ...rest} = response.accountStatusEvent\n    return {\n      ...rest,\n      data: await decode(payload, customDecoders),\n    }\n  } else if (response.account) {\n    return response.account\n  } else if (response.block) {\n    return response.block\n  } else if (response.blockHeader) {\n    return response.blockHeader\n  } else if (response.blockDigest) {\n    return response.blockDigest\n  } else if (response.latestBlock) {\n    latestBlockDeprecationNotice()\n    return response.latestBlock\n  } else if (response.transactionId) {\n    return response.transactionId\n  } else if (response.collection) {\n    return response.collection\n  } else if (response.networkParameters) {\n    const prefixRegex = /^flow-/\n    const rawChainId = response.networkParameters.chainId\n    let formattedChainId: string\n\n    if (rawChainId === \"flow-emulator\") {\n      formattedChainId = \"local\"\n    } else if (prefixRegex.test(rawChainId)) {\n      formattedChainId = rawChainId.replace(prefixRegex, \"\")\n    } else {\n      formattedChainId = rawChainId\n    }\n\n    return {\n      chainId: formattedChainId,\n    }\n  } else if (response.streamConnection) {\n    return decodeStream(\n      response.streamConnection,\n      decodeResponse,\n      customDecoders\n    )\n  } else if (response.heartbeat) {\n    return response.heartbeat\n  } else if (response.nodeVersionInfo) {\n    return response.nodeVersionInfo\n  }\n\n  return null\n}\n"
  },
  {
    "path": "packages/sdk/src/decode/sdk-decode.ts",
    "content": "import {decodeResponse} from \"./decode\"\nimport {SdkContext} from \"../context/context\"\nimport {withGlobalContext} from \"../context/global\"\n\nexport function createDecode(context: SdkContext) {\n  async function decode(response: any): Promise<any> {\n    return decodeResponse(response, context.customDecoders)\n  }\n\n  return decode\n}\n\n/**\n * Decodes the response from 'fcl.send()' into the appropriate JSON representation of any values returned from Cadence code.\n *\n * The response from Flow contains encoded values that need to be decoded into JavaScript types. This function handles that conversion, including complex types like structs, arrays, and dictionaries.\n *\n * @param response Should be the response returned from 'fcl.send([...])'\n * @returns A JSON representation of the raw string response depending on the cadence code executed. The return value can be a single value and type or an object with multiple types.\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Simple script to add 2 numbers\n * const response = await fcl.send([\n *   fcl.script`\n *     access(all) fun main(int1: Int, int2: Int): Int {\n *       return int1 + int2\n *     }\n *   `,\n *   fcl.args([fcl.arg(1, fcl.t.Int), fcl.arg(2, fcl.t.Int)])\n * ]);\n *\n * const decoded = await fcl.decode(response);\n * console.log(decoded); // 3\n * console.log(typeof decoded); // \"number\"\n *\n * // Complex return types\n * const complexResponse = await fcl.send([\n *   fcl.script`\n *     access(all) fun main(): {String: Int} {\n *       return {\"foo\": 1, \"bar\": 2}\n *     }\n *   `\n * ]);\n *\n * const complexDecoded = await fcl.decode(complexResponse);\n * console.log(complexDecoded); // {foo: 1, bar: 2}\n */\nexport const decode = /* @__PURE__ */ withGlobalContext(createDecode)\n"
  },
  {
    "path": "packages/sdk/src/encode/README.md",
    "content": "# Encode\n\nEncoding utilities for [Flow](https://flow.com) entities. Produces the values that need to be signed for successful transactions.\n\n# Status\n\n- **Last Updated:** April 21st 2020\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n\nThis package is fairly close to its first major version release.\nAs we propagate some of the terms used in this module to other things they might break, but unless the Flow blockchain needs different things signed nothing should really change here.\n\n# Install\n\n```bash\nnpm install --save @onflow/sdk\n```\n\n# Usage\n\n```javascript\nimport {\n  encodeTransactionPayload,\n  encodeTransactionEnvelope,\n} from \"@onflow/encode\"\n\nconst payloadMsg = encodeTransactionPayload({\n  cadence: `transaction { execute { log(\"Hello, World!\") } }`,\n  refBlock: \"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b\",\n  computeLimit: 42,\n  proposalKey: {\n    address: \"01\",\n    keyId: 7,\n    sequenceNum: 10,\n  },\n  payer: \"01\",\n  authorizers: [\"01\"],\n})\n\nconst envelopeMsg = encodeTransactionEnvelope({\n  cadence: `transaction { execute { log(\"Hello, World!\") } }`,\n  refBlock: \"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b\",\n  computeLimit: 42,\n  proposalKey: {\n    address: \"01\",\n    keyId: 7,\n    sequenceNum: 10,\n  },\n  payer: \"01\",\n  authorizers: [\"01\"],\n  payloadSigs: [\n    {\n      address: \"01\",\n      keyId: 7,\n      sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    },\n  ],\n})\n```\n"
  },
  {
    "path": "packages/sdk/src/encode/encode.test.ts",
    "content": "const merge = require(\"deepmerge\")\n\nimport {\n  encodeTransactionPayload,\n  encodeTransactionEnvelope,\n  encodeTxIdFromVoucher,\n} from \"./encode\"\nimport * as root from \"./encode\"\n\nit(\"export contract interface\", () => {\n  expect(root).toStrictEqual(\n    expect.objectContaining({\n      encodeTransactionPayload: expect.any(Function),\n      encodeTransactionEnvelope: expect.any(Function),\n      encodeTxIdFromVoucher: expect.any(Function),\n    })\n  )\n})\n\nconst baseTx = {\n  cadence: `transaction { execute { log(\"Hello, World!\") } }`,\n  arguments: [],\n  refBlock: \"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b\",\n  computeLimit: 42,\n  proposalKey: {\n    address: \"01\",\n    keyId: 4,\n    sequenceNum: 10,\n  },\n  payer: \"01\",\n  authorizers: [\"01\"],\n  payloadSigs: [\n    {\n      address: \"01\",\n      keyId: 4,\n      sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    },\n  ],\n}\n\nconst combineMerge = (target, source, options) => {\n  // empty list always overwrites target\n  if (source.length == 0) return source\n\n  const destination = target.slice()\n\n  source.forEach((item, index) => {\n    if (typeof destination[index] === \"undefined\") {\n      destination[index] = options.cloneUnlessOtherwiseSpecified(item, options)\n    } else if (options.isMergeableObject(item)) {\n      destination[index] = merge(target[index], item, options)\n    } else if (target.indexOf(item) === -1) {\n      destination.push(item)\n    }\n  })\n\n  return destination\n}\n\nconst buildTx = partialTx =>\n  merge(baseTx, partialTx, {arrayMerge: combineMerge})\n\ndescribe(\"encode transaction\", () => {\n  const invalidPayloadCases = [\n    [\"empty\", {}],\n    [\"non-object\", \"foo\"],\n\n    [\"null cadence\", buildTx({cadence: null})],\n    [\"null computeLimit\", buildTx({computeLimit: null})],\n    [\"null proposalKey\", buildTx({proposalKey: null})],\n    [\"null proposalKey.address\", buildTx({proposalKey: {address: null}})],\n    [\"null proposalKey.keyId\", buildTx({proposalKey: {keyId: null}})],\n    [\n      \"null proposalKey.sequenceNum\",\n      buildTx({proposalKey: {sequenceNum: null}}),\n    ],\n    [\"null payer\", buildTx({payer: null})],\n    [\"null authorizers\", buildTx({authorizers: null})],\n\n    [\"non-string cadence\", buildTx({cadence: 42})],\n    [\"non-string refBlock\", buildTx({refBlock: 42})],\n    [\"non-number computeLimit\", buildTx({computeLimit: \"foo\"})],\n    [\"non-object proposalKey\", buildTx({proposalKey: \"foo\"})],\n    [\"non-string proposalKey.address\", buildTx({proposalKey: {address: 42}})],\n    [\"non-number proposalKey.keyId\", buildTx({proposalKey: {keyId: \"foo\"}})],\n    [\n      \"non-number proposalKey.sequenceNum\",\n      buildTx({proposalKey: {sequenceNum: \"foo\"}}),\n    ],\n    [\"non-string payer\", buildTx({payer: 42})],\n    [\"non-array authorizers\", buildTx({authorizers: {}})],\n  ]\n\n  const invalidEnvelopeCases = [\n    ...invalidPayloadCases,\n    [\"null payloadSigs\", buildTx({payloadSigs: null})],\n    [\"null payloadSigs.0.address\", buildTx({payloadSigs: [{address: null}]})],\n    [\"null payloadSigs.0.keyId\", buildTx({payloadSigs: [{keyId: null}]})],\n    [\"null payloadSigs.0.sig\", buildTx({payloadSigs: [{sig: null}]})],\n\n    [\"non-array payloadSigs\", buildTx({payloadSigs: {}})],\n    [\n      \"non-string payloadSigs.0.address\",\n      buildTx({payloadSigs: [{address: 42}]}),\n    ],\n    [\n      \"non-number payloadSigs.0.keyId\",\n      buildTx({payloadSigs: [{keyId: \"foo\"}]}),\n    ],\n    [\"non-string payloadSigs.0.sig\", buildTx({payloadSigs: [{sig: 42}]})],\n  ]\n\n  // Test case format:\n  // [\n  //   <test name>,\n  //   <tx obj>,\n  //   <encoded payload>,\n  //   <encoded envelope>,\n  // ]\n  const validPayloadCases = [\n    [\n      \"complete tx\",\n      buildTx({}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"empty cadence\",\n      buildTx({cadence: \"\"}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f84280c0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f869f84280c0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"null refBlock\",\n      buildTx({refBlock: null}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a000000000000000000000000000000000000000000000000000000000000000002a880000000000000001040a880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a000000000000000000000000000000000000000000000000000000000000000002a880000000000000001040a880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"zero computeLimit\",\n      buildTx({computeLimit: 0}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b80880000000000000001040a880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b80880000000000000001040a880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"zero proposalKey.key\",\n      buildTx({proposalKey: {keyId: 0}}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001800a880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001800a880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"zero proposalKey.sequenceNum\",\n      buildTx({proposalKey: {sequenceNum: 0}}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8800000000000000010480880000000000000001c9880000000000000001\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8800000000000000010480880000000000000001c9880000000000000001e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"empty authorizers\",\n      buildTx({authorizers: []}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f869b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c0\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f890f869b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c0e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"multiple authorizers\",\n      buildTx({authorizers: [\"01\", \"02\"]}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f87bb07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001d2880000000000000001880000000000000002\",\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f8a2f87bb07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001d2880000000000000001880000000000000002e4e38004a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"payload sig with extensionData appends 4th element\",\n      buildTx({\n        payloadSigs: [\n          {\n            address: \"01\",\n            keyId: 4,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n            extensionData: \"abcd\",\n          },\n        ],\n      }),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001\",\n      null,\n    ],\n  ]\n\n  // Test case format:\n  // [\n  //   <test name>,\n  //   <tx obj>,\n  //   <encoded envelope>,\n  // ]\n  const validEnvelopeCases = [\n    [\n      \"empty payloadSigs\",\n      buildTx({payloadSigs: []}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f875f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001c0\",\n    ],\n    [\n      \"zero payloadSigs.0.key\",\n      buildTx({payloadSigs: [{keyId: 0}]}),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f899f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001e4e38080a0f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    ],\n    [\n      \"out-of-order payloadSigs -- by signer\",\n      buildTx({\n        authorizers: [\"01\", \"02\", \"03\"],\n        payloadSigs: [\n          {address: \"03\", keyId: 0, sig: \"c\"},\n          {address: \"01\", keyId: 0, sig: \"a\"},\n          {address: \"02\", keyId: 0, sig: \"b\"},\n        ],\n      }),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f893f884b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001db880000000000000001880000000000000002880000000000000003ccc3808080c3018080c3028080\",\n    ],\n    [\n      \"out-of-order payloadSigs -- by key ID\",\n      buildTx({\n        authorizers: [\"01\"],\n        payloadSigs: [\n          {address: \"01\", keyId: 2, sig: \"c\"},\n          {address: \"01\", keyId: 0, sig: \"a\"},\n          {address: \"01\", keyId: 1, sig: \"b\"},\n        ],\n      }),\n      \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f881f872b07472616e73616374696f6e207b2065786563757465207b206c6f67282248656c6c6f2c20576f726c64212229207d207dc0a0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a880000000000000001040a880000000000000001c9880000000000000001ccc3808080c3800180c3800280\",\n    ],\n  ]\n\n  describe(\"payload\", () => {\n    describe(\"invalid\", () => {\n      test.each(invalidPayloadCases)(\"%s\", (_, tx) => {\n        expect(() => encodeTransactionPayload(tx)).toThrow()\n      })\n    })\n\n    describe(\"valid\", () => {\n      test.each(validPayloadCases)(\"%s\", (_, tx, expectedPayload) => {\n        expect(encodeTransactionPayload(tx)).toBe(expectedPayload)\n      })\n    })\n  })\n\n  describe(\"envelope\", () => {\n    describe(\"invalid\", () => {\n      test.each(invalidEnvelopeCases)(\"%s\", (_, tx) => {\n        expect(() => encodeTransactionEnvelope(tx)).toThrow()\n      })\n    })\n\n    describe(\"valid\", () => {\n      test.each(validPayloadCases)(\n        \"%s\",\n        (_, tx, expectedPayload, expectedEnvelope) => {\n          if (expectedEnvelope != null) {\n            expect(encodeTransactionEnvelope(tx)).toBe(expectedEnvelope)\n          } else {\n            expect(() => encodeTransactionEnvelope(tx)).not.toThrow()\n          }\n        }\n      )\n\n      test.each(validEnvelopeCases)(\"%s\", (_, tx, expectedEnvelope) => {\n        expect(encodeTransactionEnvelope(tx)).toBe(expectedEnvelope)\n      })\n    })\n  })\n})\n\nconst baseVoucher = {\n  cadence: `transaction { execute { log(\"Hello, World!\") } }`,\n  arguments: [],\n  refBlock: \"f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b\",\n  computeLimit: 42,\n  proposalKey: {\n    address: \"01\",\n    keyId: 4,\n    sequenceNum: 10,\n  },\n  payer: \"01\",\n  authorizers: [\"01\"],\n  payloadSigs: [\n    {\n      address: \"01\",\n      keyId: 4,\n      sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n    },\n  ],\n  envelopeSigs: [],\n}\n\nconst buildVoucher = partialVoucher =>\n  merge(baseVoucher, partialVoucher, {arrayMerge: combineMerge})\n\ndescribe(\"encode txId from voucher\", () => {\n  const invalidPayloadCases = [\n    [\"empty\", {}],\n    [\"non-object\", \"foo\"],\n\n    [\"null cadence\", buildVoucher({cadence: null})],\n    [\"null computeLimit\", buildVoucher({computeLimit: null})],\n    [\"null proposalKey\", buildVoucher({proposalKey: null})],\n    [\"null proposalKey.address\", buildVoucher({proposalKey: {address: null}})],\n    [\"null proposalKey.keyId\", buildVoucher({proposalKey: {keyId: null}})],\n    [\n      \"null proposalKey.sequenceNum\",\n      buildVoucher({proposalKey: {sequenceNum: null}}),\n    ],\n    [\"null payer\", buildVoucher({payer: null})],\n    [\"null authorizers\", buildVoucher({authorizers: null})],\n\n    [\"non-string cadence\", buildVoucher({cadence: 42})],\n    [\"non-string refBlock\", buildVoucher({refBlock: 42})],\n    [\"non-number computeLimit\", buildVoucher({computeLimit: \"foo\"})],\n    [\"non-object proposalKey\", buildVoucher({proposalKey: \"foo\"})],\n    [\n      \"non-string proposalKey.address\",\n      buildVoucher({proposalKey: {address: 42}}),\n    ],\n    [\n      \"non-number proposalKey.keyId\",\n      buildVoucher({proposalKey: {keyId: \"foo\"}}),\n    ],\n    [\n      \"non-number proposalKey.sequenceNum\",\n      buildVoucher({proposalKey: {sequenceNum: \"foo\"}}),\n    ],\n    [\"non-string payer\", buildVoucher({payer: 42})],\n    [\"non-array authorizers\", buildVoucher({authorizers: {}})],\n  ]\n\n  const invalidPayloadSigsCases = [\n    [\"null payloadSigs\", buildVoucher({payloadSigs: null})],\n    [\n      \"null payloadSigs.0.address\",\n      buildVoucher({payloadSigs: [{address: null}]}),\n    ],\n    [\"null payloadSigs.0.keyId\", buildVoucher({payloadSigs: [{keyId: null}]})],\n    [\"null payloadSigs.0.sig\", buildVoucher({payloadSigs: [{sig: null}]})],\n\n    [\"non-array payloadSigs\", buildVoucher({payloadSigs: {}})],\n    [\n      \"non-string payloadSigs.0.address\",\n      buildVoucher({payloadSigs: [{address: 42}]}),\n    ],\n    [\n      \"non-number payloadSigs.0.keyId\",\n      buildVoucher({payloadSigs: [{keyId: \"foo\"}]}),\n    ],\n    [\"non-string payloadSigs.0.sig\", buildVoucher({payloadSigs: [{sig: 42}]})],\n  ]\n\n  const invalidEnvelopeSigsCases = [\n    [\"null envelopeSigs\", buildVoucher({envelopeSigs: null})],\n    [\n      \"null envelopeSigs.0.address\",\n      buildVoucher({envelopeSigs: [{address: null}]}),\n    ],\n    [\n      \"null envelopeSigs.0.keyId\",\n      buildVoucher({envelopeSigs: [{keyId: null}]}),\n    ],\n    [\"null envelopeSigs.0.sig\", buildVoucher({envelopeSigs: [{sig: null}]})],\n\n    [\"non-array envelopeSigs\", buildVoucher({envelopeSigs: {}})],\n    [\n      \"non-string envelopeSigs.0.address\",\n      buildVoucher({envelopeSigs: [{address: 42}]}),\n    ],\n    [\n      \"non-number envelopeSigs.0.keyId\",\n      buildVoucher({envelopeSigs: [{keyId: \"foo\"}]}),\n    ],\n    [\n      \"non-string envelopeSigs.0.sig\",\n      buildVoucher({envelopeSigs: [{sig: 42}]}),\n    ],\n  ]\n\n  // Test case format:\n  // [\n  //   <test name>,\n  //   <tx obj>,\n  //   <tx id>, // These values are calculated using Flow Go SDK test code.\n  // ]\n  const validCases = [\n    [\n      \"complete tx\",\n      buildVoucher({}),\n      \"118d6462f1c4182501d56f04a0cd23cf685283194bb316dceeb215b353120b2b\",\n    ],\n    [\n      \"complete tx with envelope sig\",\n      buildVoucher({\n        envelopeSigs: [\n          {\n            address: \"01\",\n            keyId: 4,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n        ],\n      }),\n      \"363172029cc6bfc5df3f99e84393e82b6c11e2a920c0e8c3229d077ae8bc31f7\",\n    ],\n    [\n      \"empty cadence\",\n      buildVoucher({cadence: \"\"}),\n      \"41dbbb83852ec8aa84dbeff03e29c0ed9c4a17b374eb0aa81695d83ccb344faf\",\n    ],\n    [\n      \"null refBlock\",\n      buildVoucher({refBlock: null}),\n      \"b01ac14da3e2a64e4c2e0a341ae2da832ff366b4c18b665fdd1fb5837e6128e0\",\n    ],\n    [\n      \"zero computeLimit\",\n      buildVoucher({computeLimit: 0}),\n      \"c149bf2077e174ccbf190f28eecda915f355333afb247f5c2ec44c2d041faf64\",\n    ],\n    [\n      \"zero proposalKey.key\",\n      buildVoucher({proposalKey: {keyId: 0}}),\n      \"1627bf4a626af55e0230b466b3828cb54822e53585f704e99a37abbbe6fbe51a\",\n    ],\n    [\n      \"zero proposalKey.sequenceNum\",\n      buildVoucher({proposalKey: {sequenceNum: 0}}),\n      \"3e9541ecee13b87a1c7be5e9ef0a00e4d48937a6f3df25167ffab2d4b4c846f4\",\n    ],\n    [\n      \"multiple authorizers\",\n      buildVoucher({authorizers: [\"01\", \"02\"]}),\n      \"6c4b45769cabadf30a103693195845ae633907f701cdcfa775bb830b6c80cb5b\",\n    ],\n    [\n      \"empty payloadSigs\",\n      buildVoucher({payloadSigs: []}),\n      \"c56b673a57fb94d546b9c30ac637d20021d04faf046e2cd5ea32591b7175794e\",\n    ],\n    [\n      \"out-of-order payloadSigs -- by signer\",\n      buildVoucher({\n        authorizers: [\"01\", \"02\", \"03\"],\n        payloadSigs: [\n          {\n            address: \"03\",\n            keyId: 0,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n          {\n            address: \"01\",\n            keyId: 0,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n          {\n            address: \"02\",\n            keyId: 0,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n        ],\n      }),\n      \"b67576744b0d051ba81e4d6635a47b9c8973b3adc7410bcd213880d5094b264a\",\n    ],\n    [\n      \"out-of-order payloadSigs -- by key ID\",\n      buildVoucher({\n        authorizers: [\"01\"],\n        payloadSigs: [\n          {\n            address: \"01\",\n            keyId: 2,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n          {\n            address: \"01\",\n            keyId: 0,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n          {\n            address: \"01\",\n            keyId: 1,\n            sig: \"f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162\",\n          },\n        ],\n      }),\n      \"183a74ecc0782fbffc364cac0c404ee01144ae258841b806a6274259bfc7ef8b\",\n    ],\n  ]\n\n  describe(\"invalid\", () => {\n    test.each(invalidPayloadCases)(\"%s\", (_, voucher) => {\n      expect(() => encodeTxIdFromVoucher(voucher)).toThrow()\n    })\n\n    test.each(invalidPayloadSigsCases)(\"%s\", (_, voucher) => {\n      expect(() => encodeTxIdFromVoucher(voucher)).toThrow()\n    })\n\n    test.each(invalidEnvelopeSigsCases)(\"%s\", (_, voucher) => {\n      expect(() => encodeTxIdFromVoucher(voucher)).toThrow()\n    })\n  })\n\n  describe(\"valid\", () => {\n    test.each(validCases)(\"%s\", (_, voucher, expectedTxId) => {\n      expect(encodeTxIdFromVoucher(voucher)).toBe(expectedTxId)\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/encode/encode.ts",
    "content": "import {SHA3} from \"sha3\"\nimport {encode, Buffer, EncodeInput} from \"@onflow/rlp\"\nimport {sansPrefix} from \"@onflow/util-address\"\n\n/**\n * Encodes a transaction payload for signing.\n *\n * This function takes a transaction object and encodes it into a format suitable for signing.\n * The encoded payload contains all the transaction details except for the signatures.\n *\n * @param tx The transaction object to encode\n * @returns A hex-encoded string representing the transaction payload\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { encodeTransactionPayload } from \"@onflow/sdk\"\n *\n * // Build a transaction\n * const transaction = await fcl.build([\n *   fcl.transaction`\n *     transaction(amount: UFix64) {\n *       prepare(account: AuthAccount) {\n *         log(\"Transferring: \".concat(amount.toString()))\n *       }\n *     }\n *   `,\n *   fcl.args([fcl.arg(\"10.0\", fcl.t.UFix64)]),\n *   fcl.proposer(proposerAuthz),\n *   fcl.payer(payerAuthz),\n *   fcl.authorizations([authorizerAuthz]),\n *   fcl.limit(100)\n * ]);\n *\n * // Encode the transaction payload for signing\n * const encodedPayload = encodeTransactionPayload(transaction);\n * console.log(\"Encoded payload:\", encodedPayload);\n * // Returns a hex string like \"f90145b90140...\"\n */\nexport const encodeTransactionPayload = (tx: Transaction) =>\n  prependTransactionDomainTag(rlpEncode(preparePayload(tx)))\n\n/**\n * Encodes a complete transaction envelope including payload and signatures.\n *\n * This function encodes the full transaction including both the payload and all signatures.\n * This is the final step before submitting a transaction to the Flow network.\n *\n * @param tx The transaction object to encode\n * @returns A hex-encoded string representing the complete transaction envelope\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { encodeTransactionEnvelope } from \"@onflow/sdk\"\n *\n * // Assuming you have a fully built and signed transaction\n * const signedTransaction = await fcl.build([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Hello, Flow!\")\n *       }\n *     }\n *   `,\n *   fcl.proposer(authz),\n *   fcl.payer(authz),\n *   fcl.authorizations([authz]),\n *   fcl.limit(100)\n * ]);\n *\n * // Add signatures to the transaction (this is usually done automatically)\n * // signedTransaction.payloadSigs = [...];\n * // signedTransaction.envelopeSigs = [...];\n *\n * // Encode the complete transaction envelope\n * const encodedEnvelope = encodeTransactionEnvelope(signedTransaction);\n * console.log(\"Encoded envelope:\", encodedEnvelope);\n * // Returns a hex string ready for network submission\n */\nexport const encodeTransactionEnvelope = (tx: Transaction) =>\n  prependTransactionDomainTag(rlpEncode(prepareEnvelope(tx)))\n\n/**\n * Encodes a transaction ID from a voucher by computing its hash.\n *\n * A voucher is an intermediary object that contains transaction details before final encoding.\n * This function computes the transaction ID that would result from submitting the transaction.\n *\n * @param voucher The voucher object containing transaction details\n * @returns A hex-encoded string representing the transaction ID\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { encodeTxIdFromVoucher } from \"@onflow/sdk\"\n *\n * // Create a voucher (usually done internally by FCL)\n * const voucher = {\n *   cadence: `\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Hello\")\n *       }\n *     }\n *   `,\n *   arguments: [],\n *   refBlock: \"abc123...\",\n *   computeLimit: 100,\n *   proposalKey: {\n *     address: \"0x123456789abcdef0\",\n *     keyId: 0,\n *     sequenceNum: 42\n *   },\n *   payer: \"0x123456789abcdef0\",\n *   authorizers: [\"0x123456789abcdef0\"],\n *   payloadSigs: [],\n *   envelopeSigs: []\n * };\n *\n * // Calculate the transaction ID\n * const txId = encodeTxIdFromVoucher(voucher);\n * console.log(\"Transaction ID:\", txId);\n * // Returns a transaction ID that can be used to track the transaction\n */\nexport const encodeTxIdFromVoucher = (voucher: Voucher) =>\n  sha3_256(rlpEncode(prepareVoucher(voucher)))\n\nconst rightPaddedHexBuffer = (value: string, pad: number) =>\n  Buffer.from(value.padEnd(pad * 2, \"0\"), \"hex\")\n\nconst leftPaddedHexBuffer = (value: string, pad: number) =>\n  Buffer.from(value.padStart(pad * 2, \"0\"), \"hex\")\n\nconst TRANSACTION_DOMAIN_TAG = rightPaddedHexBuffer(\n  Buffer.from(\"FLOW-V0.0-transaction\").toString(\"hex\"),\n  32\n).toString(\"hex\")\nconst prependTransactionDomainTag = (tx: string) => TRANSACTION_DOMAIN_TAG + tx\n\nconst addressBuffer = (addr: string) => leftPaddedHexBuffer(addr, 8)\n\nconst blockBuffer = (block: string) => leftPaddedHexBuffer(block, 32)\n\nconst argumentToString = (arg: Record<string, any>) =>\n  Buffer.from(JSON.stringify(arg), \"utf8\")\n\nconst scriptBuffer = (script: string) => Buffer.from(script, \"utf8\")\nconst signatureBuffer = (signature: string) => Buffer.from(signature, \"hex\")\nconst extensionBuffer = (ext?: string) => {\n  if (ext == null) return undefined\n  return Buffer.from(ext, \"hex\")\n}\n\nconst rlpEncode = (v: EncodeInput) => {\n  return encode(v).toString(\"hex\")\n}\n\nconst sha3_256 = (msg: string) => {\n  const sha = new SHA3(256)\n  sha.update(Buffer.from(msg, \"hex\"))\n  return sha.digest().toString(\"hex\")\n}\n\nconst preparePayload = (tx: Transaction) => {\n  validatePayload(tx)\n\n  return [\n    scriptBuffer(tx.cadence || \"\"),\n    tx.arguments.map(argumentToString),\n    blockBuffer(tx.refBlock || \"\"),\n    tx.computeLimit,\n    addressBuffer(sansPrefix(tx.proposalKey.address || \"\")),\n    tx.proposalKey.keyId,\n    tx.proposalKey.sequenceNum,\n    addressBuffer(sansPrefix(tx.payer)),\n    tx.authorizers.map(authorizer => addressBuffer(sansPrefix(authorizer))),\n  ]\n}\n\nconst prepareEnvelope = (tx: Transaction) => {\n  validateEnvelope(tx)\n\n  return [preparePayload(tx), preparePayloadSignatures(tx)]\n}\n\nconst preparePayloadSignatures = (tx: Transaction) => {\n  const signers = collectSigners(tx)\n\n  return tx.payloadSigs\n    ?.map((sig: Sig) => {\n      return {\n        signerIndex: signers.get(sansPrefix(sig.address)) || \"\",\n        keyId: sig.keyId,\n        sig: sig.sig,\n        sigExt: extensionBuffer(sig.extensionData),\n      }\n    })\n    .sort((a, b) => {\n      if (a.signerIndex > b.signerIndex) return 1\n      if (a.signerIndex < b.signerIndex) return -1\n\n      if (a.keyId > b.keyId) return 1\n      if (a.keyId < b.keyId) return -1\n\n      return 0\n    })\n    .map(sig => {\n      const base: any[] = [sig.signerIndex, sig.keyId, signatureBuffer(sig.sig)]\n      if (sig.sigExt != null) base.push(sig.sigExt)\n      return base\n    })\n}\n\nconst collectSigners = (tx: Voucher | Transaction) => {\n  const signers = new Map<string, number>()\n  let i = 0\n\n  const addSigner = (addr: string) => {\n    if (!signers.has(addr)) {\n      signers.set(addr, i)\n      i++\n    }\n  }\n\n  if (tx.proposalKey.address) {\n    addSigner(tx.proposalKey.address)\n  }\n  addSigner(tx.payer)\n  tx.authorizers.forEach(addSigner)\n\n  return signers\n}\n\nconst prepareVoucher = (voucher: Voucher) => {\n  validateVoucher(voucher)\n\n  const signers = collectSigners(voucher)\n\n  const prepareSigs = (sigs: Sig[]) => {\n    return sigs\n      .map(({address, keyId, sig, extensionData}) => {\n        return {\n          signerIndex: signers.get(sansPrefix(address)) || \"\",\n          keyId,\n          sig,\n          sigExt: extensionBuffer(extensionData),\n        }\n      })\n      .sort((a, b) => {\n        if (a.signerIndex > b.signerIndex) return 1\n        if (a.signerIndex < b.signerIndex) return -1\n        if (a.keyId > b.keyId) return 1\n        if (a.keyId < b.keyId) return -1\n\n        return 0\n      })\n      .map(sig => {\n        const base: any[] = [\n          sig.signerIndex,\n          sig.keyId,\n          signatureBuffer(sig.sig),\n        ]\n        if (sig.sigExt != null) base.push(sig.sigExt)\n        return base\n      })\n  }\n\n  return [\n    [\n      scriptBuffer(voucher.cadence),\n      voucher.arguments.map(argumentToString),\n      blockBuffer(voucher.refBlock),\n      voucher.computeLimit,\n      addressBuffer(sansPrefix(voucher.proposalKey.address)),\n      voucher.proposalKey.keyId,\n      voucher.proposalKey.sequenceNum,\n      addressBuffer(sansPrefix(voucher.payer)),\n      voucher.authorizers.map(authorizer =>\n        addressBuffer(sansPrefix(authorizer))\n      ),\n    ],\n    prepareSigs(voucher.payloadSigs),\n    prepareSigs(voucher.envelopeSigs),\n  ]\n}\n\nconst validatePayload = (tx: Transaction) => {\n  payloadFields.forEach(field => checkField(tx, field))\n  proposalKeyFields.forEach(field =>\n    checkField(tx.proposalKey, field, \"proposalKey\")\n  )\n}\n\nconst validateEnvelope = (tx: Transaction) => {\n  payloadSigsFields.forEach(field => checkField(tx, field))\n  tx.payloadSigs?.forEach((sig, index) => {\n    payloadSigFields.forEach(field =>\n      checkField(sig, field, \"payloadSigs\", index)\n    )\n  })\n}\n\nconst validateVoucher = (voucher: Voucher) => {\n  payloadFields.forEach(field => checkField(voucher, field))\n  proposalKeyFields.forEach(field =>\n    checkField(voucher.proposalKey, field, \"proposalKey\")\n  )\n  payloadSigsFields.forEach(field => checkField(voucher, field))\n  voucher.payloadSigs.forEach((sig, index) => {\n    payloadSigFields.forEach(field =>\n      checkField(sig, field, \"payloadSigs\", index)\n    )\n  })\n  envelopeSigsFields.forEach(field => checkField(voucher, field))\n  voucher.envelopeSigs.forEach((sig, index) => {\n    envelopeSigFields.forEach(field =>\n      checkField(sig, field, \"envelopeSigs\", index)\n    )\n  })\n}\n\nconst isNumber = (v: any): v is number => typeof v === \"number\"\nconst isString = (v: any): v is string => typeof v === \"string\"\nconst isObject = (v: any) => v !== null && typeof v === \"object\"\nconst isArray = (v: any) => isObject(v) && v instanceof Array\n\ninterface VoucherArgument {\n  type: string\n  value: string\n}\n\ninterface VoucherProposalKey {\n  address: string\n  keyId: number | null\n  sequenceNum: number | null\n}\n\ninterface Sig {\n  address: string\n  keyId: number | string\n  sig: string\n  // Optional signature extension data (e.g., WebAuthn clientDataJSON + authenticatorData)\n  // Propagated via \"extensionData\" when present by wallets/connectors.\n  // Not required for existing signatures; encoding remains identical when absent.\n  extensionData?: string\n}\n\nexport interface TransactionProposalKey {\n  address?: string\n  keyId?: number | string\n  sequenceNum?: number\n}\nexport interface Transaction {\n  cadence: string\n  refBlock: string\n  computeLimit: number\n  arguments: VoucherArgument[]\n  proposalKey: TransactionProposalKey\n  payer: string\n  authorizers: string[]\n  payloadSigs?: Sig[]\n  envelopeSigs?: TransactionProposalKey[]\n}\n\nexport interface Voucher {\n  cadence: string\n  refBlock: string\n  computeLimit: number\n  arguments: VoucherArgument[]\n  proposalKey: VoucherProposalKey\n  payer: string\n  authorizers: string[]\n  payloadSigs: Sig[]\n  envelopeSigs: Sig[]\n}\n\ninterface PayloadField {\n  name: string\n  check: (v: any) => boolean\n  defaultVal?: string\n}\n\nconst payloadFields: PayloadField[] = [\n  {name: \"cadence\", check: isString},\n  {name: \"arguments\", check: isArray},\n  {name: \"refBlock\", check: isString, defaultVal: \"0\"},\n  {name: \"computeLimit\", check: isNumber},\n  {name: \"proposalKey\", check: isObject},\n  {name: \"payer\", check: isString},\n  {name: \"authorizers\", check: isArray},\n]\n\nconst proposalKeyFields: PayloadField[] = [\n  {name: \"address\", check: isString},\n  {name: \"keyId\", check: isNumber},\n  {name: \"sequenceNum\", check: isNumber},\n]\n\nconst payloadSigsFields: PayloadField[] = [\n  {name: \"payloadSigs\", check: isArray},\n]\n\nconst payloadSigFields: PayloadField[] = [\n  {name: \"address\", check: isString},\n  {name: \"keyId\", check: isNumber},\n  {name: \"sig\", check: isString},\n]\n\nconst envelopeSigsFields: PayloadField[] = [\n  {name: \"envelopeSigs\", check: isArray},\n]\n\nconst envelopeSigFields: PayloadField[] = [\n  {name: \"address\", check: isString},\n  {name: \"keyId\", check: isNumber},\n  {name: \"sig\", check: isString},\n]\n\nconst checkField = (\n  obj: Record<string, any>,\n  field: PayloadField,\n  base?: string,\n  index?: number\n) => {\n  const {name, check, defaultVal} = field\n  if (obj[name] == null && defaultVal != null) obj[name] = defaultVal\n  if (obj[name] == null) throw missingFieldError(name, base, index)\n  if (!check(obj[name])) throw invalidFieldError(name, base, index)\n}\n\nconst printFieldName = (field: string, base?: string, index?: number) => {\n  if (!!base)\n    return index == null ? `${base}.${field}` : `${base}.${index}.${field}`\n  return field\n}\n\nconst missingFieldError = (field: string, base?: string, index?: number) =>\n  new Error(`Missing field ${printFieldName(field, base, index)}`)\nconst invalidFieldError = (field: string, base?: string, index?: number) =>\n  new Error(`Invalid field ${printFieldName(field, base, index)}`)\n"
  },
  {
    "path": "packages/sdk/src/interaction/interaction.test.ts",
    "content": "import {InteractionAccount, TransactionRole} from \"@onflow/typedefs\"\nimport {resolveAccounts} from \"../sdk\"\nimport {prepAccount, initAccount, initInteraction} from \"./interaction\"\n\ndescribe(\"prepAccount\", () => {\n  test(\"prepAccount converts account object keyId to integer\", async () => {\n    const keyId = \"1\"\n    const acct: InteractionAccount = {\n      ...initAccount(),\n      addr: \"f8d6e0586b0a20c7\",\n      keyId,\n      signingFunction: () => ({\n        addr: \"f8d6e0586b0a20c7\",\n        signature: \"abc123\",\n      }),\n    }\n\n    const ix = prepAccount(acct, {role: TransactionRole.PROPOSER})({\n      ...initInteraction(),\n      accounts: {},\n    })\n    expect(ix.accounts[ix.proposer || \"\"].keyId).toBe(parseInt(keyId))\n  })\n\n  test(\"prepAccount converts authorization function keyId to integer\", async () => {\n    const keyId = \"1\"\n    const authz = (acct: InteractionAccount): InteractionAccount => {\n      return {\n        ...acct,\n        addr: \"f8d6e0586b0a20c7\",\n        keyId,\n        signingFunction: () => ({\n          addr: \"f8d6e0586b0a20c7\",\n          signature: \"abc123\",\n        }),\n      }\n    }\n\n    const ix = await resolveAccounts(\n      prepAccount(authz, {role: TransactionRole.PROPOSER})({\n        ...initInteraction(),\n        accounts: {},\n      })\n    )\n    ix.accounts[ix.proposer || \"\"] =\n      await ix.accounts[ix.proposer || \"\"].resolve()\n    expect(ix.accounts[ix.proposer || \"\"].keyId).toBe(parseInt(keyId))\n  })\n\n  test(\"prepAccount does not affect keyId if undefined/does not exist\", async () => {\n    const authz = (acct: InteractionAccount): InteractionAccount => {\n      return {\n        ...acct,\n        addr: \"f8d6e0586b0a20c7\",\n        signingFunction: () => ({\n          addr: \"f8d6e0586b0a20c7\",\n          signature: \"abc123\",\n        }),\n      }\n    }\n\n    const ix = await resolveAccounts(\n      prepAccount(authz, {role: TransactionRole.PROPOSER})({\n        ...initInteraction(),\n        accounts: {},\n      })\n    )\n    ix.accounts[ix.proposer || \"\"] =\n      await ix.accounts[ix.proposer || \"\"].resolve()\n    expect(ix.accounts[ix.proposer || \"\"].keyId).toBeUndefined()\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/interaction/interaction.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {v4 as uuidv4} from \"uuid\"\nimport {log, LEVELS} from \"@onflow/util-logger\"\n\nimport {\n  TransactionRole,\n  Interaction,\n  InteractionAccount,\n  InteractionResolverKind,\n  InteractionStatus,\n  InteractionTag,\n} from \"@onflow/typedefs\"\nimport {TypeDescriptorInput, TypeDescriptor} from \"@onflow/types\"\n\nexport type AuthorizationFn = (acct: InteractionAccount) => InteractionAccount\nexport type AccountAuthorization =\n  | (AuthorizationFn & Partial<InteractionAccount>)\n  | Partial<InteractionAccount>\n\ntype CadenceArgument<T extends TypeDescriptor<any, any>> = {\n  value: TypeDescriptorInput<T>\n  xform: T\n}\n\nexport {CadenceArgument}\n\nexport type InteractionBuilderFn = (\n  ix: Interaction\n) => Interaction | Promise<Interaction>\n\nconst ACCT = `{\n  \"kind\":\"${InteractionResolverKind.ACCOUNT}\",\n  \"tempId\":null,\n  \"addr\":null,\n  \"keyId\":null,\n  \"sequenceNum\":null,\n  \"signature\":null,\n  \"signingFunction\":null,\n  \"resolve\":null,\n  \"role\": {\n    \"proposer\":false,\n    \"authorizer\":false,\n    \"payer\":false,\n    \"param\":false\n  }\n}`\n\nconst ARG = `{\n  \"kind\":\"${InteractionResolverKind.ARGUMENT}\",\n  \"tempId\":null,\n  \"value\":null,\n  \"asArgument\":null,\n  \"xform\":null,\n  \"resolve\": null,\n  \"resolveArgument\": null\n}`\n\nconst IX = `{\n  \"tag\":\"${InteractionTag.UNKNOWN}\",\n  \"assigns\":{},\n  \"status\":\"${InteractionStatus.OK}\",\n  \"reason\":null,\n  \"accounts\":{},\n  \"params\":{},\n  \"arguments\":{},\n  \"message\": {\n    \"cadence\":null,\n    \"refBlock\":null,\n    \"computeLimit\":null,\n    \"proposer\":null,\n    \"payer\":null,\n    \"authorizations\":[],\n    \"params\":[],\n    \"arguments\":[]\n  },\n  \"proposer\":null,\n  \"authorizations\":[],\n  \"payer\":[],\n  \"events\": {\n    \"eventType\":null,\n    \"start\":null,\n    \"end\":null,\n    \"blockIds\":[]\n  },\n  \"subscribeEvents\": {\n    \"startBlockId\":null,\n    \"startHeight\":null,\n    \"eventTypes\":null,\n    \"addresses\":null,\n    \"contracts\":null,\n    \"heartbeatInterval\":null\n  },\n  \"transaction\": {\n    \"id\":null\n  },\n  \"block\": {\n    \"id\":null,\n    \"height\":null,\n    \"isSealed\":null\n  },\n  \"account\": {\n    \"addr\":null\n  },\n  \"collection\": {\n    \"id\":null\n  }\n}`\n\nconst KEYS = new Set(Object.keys(JSON.parse(IX) as Interaction))\n\n/**\n * Creates a new interaction object with default values.\n *\n * @returns A new interaction object initialized with default values\n */\nexport const initInteraction = (): Interaction => JSON.parse(IX)\n\n/**\n * Creates a new interaction object with default values.\n *\n * @deprecated Use initInteraction() instead. This function will be removed in a future version.\n *\n * @returns A new interaction object initialized with default values\n */\nexport const interaction = () => {\n  log.deprecate({\n    pkg: \"FCL/SDK\",\n    message: `The interaction been deprecated from the Flow JS-SDK/FCL. use initInteraction instead`,\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0010-deprecate-interaction\",\n    level: LEVELS.warn,\n  })\n  return initInteraction()\n}\n\n/**\n * Checks if a value is a number.\n *\n * @param d The value to check\n * @returns True if the value is a number, false otherwise\n *\n * @example\n * import { isNumber } from \"@onflow/sdk\"\n *\n * console.log(isNumber(42)); // true\n * console.log(isNumber(\"42\")); // false\n * console.log(isNumber(3.14)); // true\n * console.log(isNumber(null)); // false\n */\nexport const isNumber = (d: any): d is number => typeof d === \"number\"\n\n/**\n * Checks if a value is an array.\n *\n * @param d The value to check\n * @returns True if the value is an array, false otherwise\n *\n * @example\n * import { isArray } from \"@onflow/sdk\"\n *\n * console.log(isArray([1, 2, 3])); // true\n * console.log(isArray(\"hello\")); // false\n * console.log(isArray({})); // false\n * console.log(isArray(null)); // false\n */\nexport const isArray = (d: any): d is any[] => Array.isArray(d)\n\n/**\n * Checks if a value is an object (but not null).\n *\n * @param d The value to check\n * @returns True if the value is an object and not null, false otherwise\n *\n * @example\n * import { isObj } from \"@onflow/sdk\"\n *\n * console.log(isObj({})); // true\n * console.log(isObj({name: \"Alice\"})); // true\n * console.log(isObj(null)); // false\n * console.log(isObj(\"string\")); // false\n * console.log(isObj([])); // true (arrays are objects)\n */\nexport const isObj = (d: any): d is Record<string, any> =>\n  d !== null && typeof d === \"object\"\n\n/**\n * Checks if a value is null or undefined.\n *\n * @param d The value to check\n * @returns True if the value is null or undefined, false otherwise\n *\n * @example\n * import { isNull } from \"@onflow/sdk\"\n *\n * console.log(isNull(null)); // true\n * console.log(isNull(undefined)); // true\n * console.log(isNull(\"\")); // false\n * console.log(isNull(0)); // false\n * console.log(isNull(false)); // false\n */\nexport const isNull = (d: any): d is null => d == null\n\n/**\n * Checks if a value is a function.\n *\n * @param d The value to check\n * @returns True if the value is a function, false otherwise\n *\n * @example\n * import { isFn } from \"@onflow/sdk\"\n *\n * console.log(isFn(() => {})); // true\n * console.log(isFn(function() {})); // true\n * console.log(isFn(\"function\")); // false\n * console.log(isFn({})); // false\n */\nexport const isFn = (d: any): d is Function => typeof d === \"function\"\n\n/**\n * Checks if an object is a valid interaction.\n *\n * @param ix The object to check\n * @returns True if the object is a valid interaction, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { isInteraction, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n * console.log(isInteraction(interaction)); // true\n * console.log(isInteraction({})); // false\n * console.log(isInteraction(null)); // false\n *\n * // Check if a builder result is a valid interaction\n * const built = await fcl.build([fcl.script`access(all) fun main(): Int { return 42 }`]);\n * console.log(isInteraction(built)); // true\n */\nexport const isInteraction = (ix: unknown) => {\n  if (!isObj(ix) || isNull(ix) || isNumber(ix)) return false\n  for (let key of KEYS) if (!ix.hasOwnProperty(key)) return false\n  return true\n}\n\n/**\n * Marks an interaction as successful and returns the interaction object.\n *\n * @param ix The interaction to mark as successful\n * @returns The interaction object with status set to OK\n *\n * @example\n * import { Ok, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n * const successfulInteraction = Ok(interaction);\n * console.log(successfulInteraction.status); // \"OK\"\n */\nexport const Ok = (ix: Interaction) => {\n  ix.status = InteractionStatus.OK\n  return ix\n}\n\n/**\n * Marks an interaction as failed with a specific reason and returns the interaction object.\n *\n * @param ix The interaction to mark as failed\n * @param reason The reason for the failure\n * @returns The interaction object with status set to BAD and reason set\n *\n * @example\n * import { Bad, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n * const failedInteraction = Bad(interaction, \"Invalid transaction signature\");\n * console.log(failedInteraction.status); // \"BAD\"\n * console.log(failedInteraction.reason); // \"Invalid transaction signature\"\n */\nexport const Bad = (ix: Interaction, reason: string) => {\n  ix.status = InteractionStatus.BAD\n  ix.reason = reason\n  return ix\n}\n\nconst makeIx = (wat: InteractionTag) => (ix: Interaction) => {\n  ix.tag = wat\n  return Ok(ix)\n}\n\nconst prepAccountKeyId = (acct: AccountAuthorization): AccountAuthorization => {\n  if (acct.keyId == null) return acct\n\n  invariant(\n    !isNaN(parseInt(acct.keyId.toString())),\n    \"account.keyId must be an integer\"\n  )\n\n  return {\n    ...acct,\n    keyId: parseInt(acct.keyId.toString()),\n  } as AccountAuthorization\n}\n\ninterface IPrepAccountOpts {\n  role?: TransactionRole | null\n}\n\n/**\n * Creates a new account object with default values.\n *\n * @returns A new account object initialized with default values\n *\n * @example\n * import { initAccount } from \"@onflow/sdk\"\n *\n * const account = initAccount();\n * console.log(account.addr); // null\n * console.log(account.keyId); // null\n * console.log(account.role.proposer); // false\n *\n * // Typically used internally by other functions\n * // You'll more commonly use authorization() or prepAccount()\n */\nexport const initAccount = (): InteractionAccount => JSON.parse(ACCT)\n\n/**\n * Prepares and configures an account for use in an interaction with a specific role.\n *\n * @param acct The account authorization function or account object\n * @param opts Configuration options including the role for the account\n * @returns A function that adds the prepared account to an interaction\n */\nexport const prepAccount =\n  (acct: AccountAuthorization, opts: IPrepAccountOpts = {}) =>\n  (ix: Interaction) => {\n    invariant(\n      typeof acct === \"function\" || typeof acct === \"object\",\n      \"prepAccount must be passed an authorization function or an account object\"\n    )\n    invariant(opts.role != null, \"Account must have a role\")\n\n    const ACCOUNT = initAccount()\n    const role = opts.role\n    const tempId = uuidv4()\n    let account: Partial<InteractionAccount> = {...acct}\n\n    if (acct.authorization && isFn(acct.authorization))\n      account = {resolve: acct.authorization}\n    if (!acct.authorization && isFn(acct)) account = {resolve: acct}\n\n    const resolve = account.resolve\n    if (resolve) {\n      account.resolve = (acct: InteractionAccount, ...rest: any[]) =>\n        [resolve, prepAccountKeyId].reduce(\n          async (d, fn) => fn(await d, ...rest),\n          acct\n        )\n    }\n    account = prepAccountKeyId(account)\n\n    ix.accounts[tempId] = {\n      ...ACCOUNT,\n      tempId,\n      ...account,\n      role: {\n        ...ACCOUNT.role,\n        ...(typeof acct.role === \"object\" ? acct.role : {}),\n        ...(role ? {[role]: true} : {}),\n      },\n    }\n\n    if (role === TransactionRole.AUTHORIZER) {\n      ix.authorizations.push(tempId)\n    } else if (role === TransactionRole.PAYER) {\n      ix.payer.push(tempId)\n    } else if (role) {\n      ix[role] = tempId\n    }\n\n    return ix\n  }\n\n/**\n * Creates an argument resolver and adds it to an interaction.\n *\n * This function is typically used internally by the SDK to handle arguments in scripts and transactions.\n * For most use cases, you should use `fcl.arg()` instead of this function directly.\n *\n * @param arg The argument configuration object\n * @returns A function that adds the argument to an interaction\n *\n * @example\n * import { makeArgument, initInteraction } from \"@onflow/sdk\"\n * import * as fcl from \"@onflow/fcl\";\n *\n * const interaction = initInteraction();\n *\n * // Create an argument resolver (usually you'd use fcl.arg instead)\n * const argResolver = {\n *   value: 42,\n *   xform: fcl.t.Int,\n *   resolve: (value, xform) => ({ value, xform })\n * };\n *\n * // Add the argument to the interaction\n * makeArgument(argResolver)(interaction);\n *\n * console.log(interaction.message.arguments.length); // 1\n *\n * // Preferred way - use fcl.arg instead:\n * // fcl.args([fcl.arg(42, fcl.t.Int)])\n */\nexport const makeArgument = (arg: Record<string, any>) => (ix: Interaction) => {\n  let tempId = uuidv4()\n  ix.message.arguments.push(tempId)\n\n  ix.arguments[tempId] = JSON.parse(ARG)\n  ix.arguments[tempId].tempId = tempId\n  ix.arguments[tempId].value = arg.value\n  ix.arguments[tempId].asArgument = arg.asArgument\n  ix.arguments[tempId].xform = arg.xform\n  ix.arguments[tempId].resolve = arg.resolve\n  ix.arguments[tempId].resolveArgument = isFn(arg.resolveArgument)\n    ? arg.resolveArgument.bind(arg)\n    : arg.resolveArgument\n\n  return Ok(ix)\n}\n\nexport const makeUnknown /*                 */ = makeIx(InteractionTag.UNKNOWN)\nexport const makeScript /*                  */ = makeIx(InteractionTag.SCRIPT)\nexport const makeTransaction /*             */ = makeIx(\n  InteractionTag.TRANSACTION\n)\nexport const makeGetTransactionStatus /*    */ = makeIx(\n  InteractionTag.GET_TRANSACTION_STATUS\n)\nexport const makeGetTransaction /*          */ = makeIx(\n  InteractionTag.GET_TRANSACTION\n)\nexport const makeGetAccount /*              */ = makeIx(\n  InteractionTag.GET_ACCOUNT\n)\nexport const makeGetEvents /*               */ = makeIx(\n  InteractionTag.GET_EVENTS\n)\nexport const makePing /*                    */ = makeIx(InteractionTag.PING)\nexport const makeGetBlock /*                */ = makeIx(\n  InteractionTag.GET_BLOCK\n)\nexport const makeGetBlockHeader /*          */ = makeIx(\n  InteractionTag.GET_BLOCK_HEADER\n)\nexport const makeGetCollection /*           */ = makeIx(\n  InteractionTag.GET_COLLECTION\n)\nexport const makeGetNetworkParameters /*    */ = makeIx(\n  InteractionTag.GET_NETWORK_PARAMETERS\n)\nexport const makeSubscribeEvents /*         */ = makeIx(\n  InteractionTag.SUBSCRIBE_EVENTS\n)\nexport const makeGetNodeVerionInfo /*       */ = makeIx(\n  InteractionTag.GET_NODE_VERSION_INFO\n)\n\nconst is = (wat: InteractionTag) => (ix: Interaction) => ix.tag === wat\n\nexport const isUnknown /*                 */ = is(InteractionTag.UNKNOWN)\nexport const isScript /*                  */ = is(InteractionTag.SCRIPT)\nexport const isTransaction /*             */ = is(InteractionTag.TRANSACTION)\nexport const isGetTransactionStatus /*    */ = is(\n  InteractionTag.GET_TRANSACTION_STATUS\n)\nexport const isGetTransaction /*          */ = is(\n  InteractionTag.GET_TRANSACTION\n)\nexport const isGetAccount /*              */ = is(InteractionTag.GET_ACCOUNT)\nexport const isGetEvents /*               */ = is(InteractionTag.GET_EVENTS)\nexport const isPing /*                    */ = is(InteractionTag.PING)\nexport const isGetBlock /*                */ = is(InteractionTag.GET_BLOCK)\nexport const isGetBlockHeader /*          */ = is(\n  InteractionTag.GET_BLOCK_HEADER\n)\nexport const isGetCollection /*           */ = is(InteractionTag.GET_COLLECTION)\nexport const isGetNetworkParameters /*    */ = is(\n  InteractionTag.GET_NETWORK_PARAMETERS\n)\nexport const isGetNodeVersionInfo /*      */ = is(\n  InteractionTag.GET_NODE_VERSION_INFO\n)\nexport const isSubscribeEvents /*         */ = is(\n  InteractionTag.SUBSCRIBE_EVENTS\n)\n\n/**\n * Checks if an interaction has a successful status.\n *\n * @param ix The interaction to check\n * @returns True if the interaction status is OK, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { isOk } from \"@onflow/sdk\"\n *\n * // Check if a transaction was successful\n * const response = await fcl.send([\n *   fcl.transaction`transaction { prepare(account: AuthAccount) {} }`\n * ]);\n *\n * if (isOk(response)) {\n *   console.log(\"Transaction was successful\");\n * } else {\n *   console.log(\"Transaction failed\");\n * }\n */\nexport const isOk /*  */ = (ix: Interaction) =>\n  ix.status === InteractionStatus.OK\n\n/**\n * Checks if an interaction has a failed status.\n *\n * @param ix The interaction to check\n * @returns True if the interaction status is BAD, false otherwise\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { isBad, why } from \"@onflow/sdk\"\n *\n * const response = await fcl.send([\n *   fcl.transaction`transaction { prepare(account: AuthAccount) {} }`\n * ]);\n *\n * if (isBad(response)) {\n *   console.log(\"Transaction failed:\", why(response));\n * }\n */\nexport const isBad /* */ = (ix: Interaction) =>\n  ix.status === InteractionStatus.BAD\n\n/**\n * Returns the reason for an interaction failure.\n *\n * @param ix The interaction to get the failure reason from\n * @returns The reason string or undefined if no reason is set\n *\n * @example\n * import { Bad, why, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = Bad(initInteraction(), \"Network timeout\");\n * console.log(why(interaction)); // \"Network timeout\"\n *\n * // Used with error handling\n * if (isBad(response)) {\n *   console.error(\"Error occurred:\", why(response));\n * }\n */\nexport const why /*   */ = (ix: Interaction) => ix.reason\n\n/**\n * Checks if an object is an account resolver.\n *\n * @param account The object to check\n * @returns True if the object is an account resolver, false otherwise\n *\n * @example\n * import { isAccount, authorization } from \"@onflow/sdk\"\n *\n * const authz = authorization(\"0x123\", signingFunction);\n * const accountResolver = { kind: \"ACCOUNT\", addr: \"0x123\" };\n * const regularObject = { name: \"test\" };\n *\n * console.log(isAccount(accountResolver)); // true\n * console.log(isAccount(regularObject)); // false\n */\nexport const isAccount /*  */ = (account: Record<string, any>) =>\n  account.kind === InteractionResolverKind.ACCOUNT\n\n/**\n * Checks if an object is an argument resolver.\n *\n * @param argument The object to check\n * @returns True if the object is an argument resolver, false otherwise\n *\n * @example\n * import { isArgument, arg } from \"@onflow/sdk\"\n *\n * const argumentResolver = { kind: \"ARGUMENT\", value: 42 };\n * const regularObject = { value: 42 };\n *\n * console.log(isArgument(argumentResolver)); // true\n * console.log(isArgument(regularObject)); // false\n *\n * // Check arguments in a script\n * const scriptArgs = [arg(10, t.Int), arg(\"hello\", t.String)];\n * scriptArgs.forEach(arg => {\n *   if (isArgument(arg)) {\n *     console.log(\"Valid argument:\", arg.value);\n *   }\n * });\n */\nexport const isArgument /* */ = (argument: Record<string, any>) =>\n  argument.kind === InteractionResolverKind.ARGUMENT\n\nconst hardMode = (ix: Interaction) => {\n  for (let key of Object.keys(ix)) {\n    if (!KEYS.has(key))\n      throw new Error(`\"${key}\" is an invalid root level Interaction property.`)\n  }\n  return ix\n}\n\ntype MaybePromise<T> = T | Promise<T>\n\nconst recPipe = async (\n  ix: MaybePromise<Interaction>,\n  fns: (InteractionBuilderFn | false | MaybePromise<Interaction>)[] = []\n): Promise<Interaction> => {\n  try {\n    ix = hardMode(await ix)\n    if (isBad(ix)) throw new Error(`Interaction Error: ${ix.reason}`)\n    if (!fns.length) return ix\n    const [hd, ...rest] = fns\n    const cur = await hd\n    if (isFn(cur)) return recPipe(cur(ix), rest)\n    if (isNull(cur) || !cur) return recPipe(ix, rest)\n    if (isInteraction(cur)) return recPipe(cur, rest)\n    throw new Error(\"Invalid Interaction Composition\")\n  } catch (e) {\n    throw e\n  }\n}\n\n/**\n * Async pipe function to compose interactions.\n *\n * The pipe function is the foundation for composing multiple interaction builder functions together.\n * It sequentially applies builder functions to an interaction, allowing for complex interaction construction.\n * Each function in the pipe receives the result of the previous function and can modify or validate the interaction.\n *\n * Pipe has two main forms:\n * 1. `pipe(builderFunctions)`: Returns a builder function\n * 2. `pipe(interaction, builderFunctions)`: Directly executes the pipe on an interaction\n *\n * @param fns Array of builder functions to apply\n * @returns An interaction builder function when called with just functions, or a Promise<Interaction> when called with an interaction and functions\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Using pipe to create a reusable builder\n * const myTransactionBuilder = fcl.pipe([\n *   fcl.transaction`\n *     transaction(amount: UFix64) {\n *       prepare(account: AuthAccount) {\n *         log(amount)\n *       }\n *     }\n *   `,\n *   fcl.args([fcl.arg(\"10.0\", fcl.t.UFix64)]),\n *   fcl.proposer(fcl.authz),\n *   fcl.payer(fcl.authz),\n *   fcl.authorizations([fcl.authz]),\n *   fcl.limit(100)\n * ]);\n *\n * // Use the builder\n * const interaction = await fcl.build([myTransactionBuilder]);\n *\n * // Pipe is used internally by build() and send()\n * await fcl.send([\n *   fcl.script`access(all) fun main(): Int { return 42 }`\n * ]); // This uses pipe internally\n */\nfunction pipe(fns: (InteractionBuilderFn | false)[]): InteractionBuilderFn\nfunction pipe(\n  ix: MaybePromise<Interaction>,\n  fns: (InteractionBuilderFn | false)[]\n): Promise<Interaction>\nfunction pipe(\n  ...args:\n    | [(InteractionBuilderFn | false)[]]\n    | [MaybePromise<Interaction>, (InteractionBuilderFn | false)[]]\n): Promise<Interaction> | InteractionBuilderFn {\n  const [arg1, arg2] = args\n  if (isArray(arg1)) return (d: Interaction) => pipe(d, arg1)\n\n  const ix = arg1 as MaybePromise<Interaction>\n  const fns = arg2 as ((x: Interaction) => Interaction)[]\n  return recPipe(ix, fns)\n}\nexport {pipe}\n\nconst identity = <T>(v: T, ..._: any[]) => v\n\n/**\n * Gets a value from an interaction object using a dot-notation key path.\n *\n * @param ix The interaction object\n * @param key The dot-notation key path (e.g., \"message.arguments\")\n * @param fallback The fallback value if the key is not found\n * @returns The value at the key path or the fallback value\n *\n * @example\n * import { get, put, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n *\n * // Set a value first\n * put(\"user.name\", \"Alice\")(interaction);\n *\n * // Get the value\n * const userName = get(interaction, \"user.name\"); // \"Alice\"\n * const userAge = get(interaction, \"user.age\", 25); // 25 (fallback)\n *\n * // Get nested values\n * put(\"config.network.url\", \"https://access.mainnet.onflow.org\")(interaction);\n * const networkUrl = get(interaction, \"config.network.url\");\n */\nexport const get = (\n  ix: Interaction,\n  key: string,\n  fallback: any = undefined\n) => {\n  return ix.assigns[key] == null ? fallback : ix.assigns[key]\n}\n\n/**\n * Sets a value in an interaction object using a dot-notation key path.\n *\n * @param key The dot-notation key path (e.g., \"message.arguments\")\n * @param value The value to set\n * @returns A function that takes an interaction and sets the value\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { put } from \"@onflow/sdk\"\n *\n * // Using put in a custom builder function\n * const setCustomData = (data) => put(\"custom.data\", data);\n *\n * await fcl.send([\n *   fcl.script`access(all) fun main(): String { return \"Hello\" }`,\n *   setCustomData({ userId: 123, timestamp: Date.now() })\n * ]);\n *\n * // Direct usage\n * const interaction = initInteraction();\n * put(\"network.endpoint\", \"https://access.mainnet.onflow.org\")(interaction);\n */\nexport const put = (key: string, value: any) => (ix: Interaction) => {\n  ix.assigns[key] = value\n  return Ok(ix)\n}\n\n/**\n * Updates a value in an interaction object using a transformation function.\n *\n * @param key The dot-notation key path to update\n * @param fn The transformation function to apply to the existing value\n * @returns A function that takes an interaction and updates the value\n *\n * @example\n * import { update, put, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n *\n * // Set initial value\n * put(\"counter\", 0)(interaction);\n *\n * // Increment counter\n * const increment = update(\"counter\", (current) => (current || 0) + 1);\n * increment(interaction); // counter becomes 1\n * increment(interaction); // counter becomes 2\n *\n * // Update array\n * put(\"tags\", [\"flow\", \"blockchain\"])(interaction);\n * const addTag = update(\"tags\", (tags) => [...(tags || []), \"web3\"]);\n * addTag(interaction); // tags becomes [\"flow\", \"blockchain\", \"web3\"]\n */\nexport const update =\n  <T>(key: string, fn: (v: T | T[], ...args: any[]) => T | T[] = identity) =>\n  (ix: Interaction) => {\n    ix.assigns[key] = fn(ix.assigns[key], ix)\n    return Ok(ix)\n  }\n\n/**\n * Removes a property from an interaction object using a dot-notation key path.\n *\n * @param key The dot-notation key path to remove\n * @returns A function that takes an interaction and removes the property\n *\n * @example\n * import { destroy, put, get, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n *\n * // Set some values\n * put(\"user.name\", \"Alice\")(interaction);\n * put(\"user.email\", \"alice@example.com\")(interaction);\n * put(\"user.temp\", \"temporary data\")(interaction);\n *\n * console.log(get(interaction, \"user.temp\")); // \"temporary data\"\n *\n * // Remove temporary data\n * destroy(\"user.temp\")(interaction);\n *\n * console.log(get(interaction, \"user.temp\")); // undefined\n * console.log(get(interaction, \"user.name\")); // \"Alice\" (still exists)\n */\nexport const destroy = (key: string) => (ix: Interaction) => {\n  delete ix.assigns[key]\n  return Ok(ix)\n}\n"
  },
  {
    "path": "packages/sdk/src/node-version-info/node-version-info.ts",
    "content": "import {NodeVersionInfo} from \"@onflow/typedefs\"\nimport {getNodeVersionInfo} from \"../build/build-get-node-version-info\"\nimport {decodeResponse as decode} from \"../decode/decode\"\nimport {send} from \"../transport\"\n\n/**\n * Retrieve version information from the connected Flow Access Node.\n *\n * This function returns detailed information about the Flow node's version, including the protocol version, spork information, and node-specific details. This is useful for debugging, compatibility checks, and understanding the network state.\n *\n * @param opts Optional parameters for the request\n * @returns A promise that resolves to a block response\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Get node version information\n * const versionInfo = await fcl.nodeVersionInfo();\n * console.log(versionInfo);\n * // {\n * //   semver: \"v0.37.13\",\n * //   commit: \"12345abcd\",\n * //   spork_id: \"mainnet-23\",\n * //   protocol_version: \"2.13.10\",\n * //   spork_root_block_height: \"88483760\",\n * //   node_root_block_height: \"88483760\"\n * // }\n *\n * // Check compatibility\n * const info = await fcl.nodeVersionInfo();\n * if (info.protocol_version.startsWith(\"2.13\")) {\n *   console.log(\"Compatible with current protocol version\");\n * }\n */\nexport async function nodeVersionInfo(\n  opts: any = {}\n): Promise<NodeVersionInfo> {\n  return await send([getNodeVersionInfo()], opts).then(decode)\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/__snapshots__/resolve-signatures.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Golden Path 1`] = `\n{\n  \"accounts\": {\n    \"foo\": {\n      \"addr\": \"foo\",\n      \"authorization\": [Function],\n      \"keyId\": 1,\n      \"kind\": \"ACCOUNT\",\n      \"resolve\": null,\n      \"role\": {\n        \"authorizer\": false,\n        \"param\": false,\n        \"payer\": true,\n        \"proposer\": false,\n      },\n      \"sequenceNum\": 123,\n      \"signature\": \"SIGNATURE\",\n      \"signingFunction\": [MockFunction] {\n        \"calls\": [\n          [\n            {\n              \"addr\": \"foo\",\n              \"args\": [],\n              \"cadence\": \"\",\n              \"data\": {},\n              \"f_type\": \"Signable\",\n              \"f_vsn\": \"1.0.1\",\n              \"interaction\": [Circular],\n              \"keyId\": 1,\n              \"message\": \"464c4f572d56302e302d7472616e73616374696f6e0000000000000000000000f843f84080c0a00000000000000000000000000000000000000000000000000000000000000123819c870000000000000f017b870000000000000fc8870000000000000fc0\",\n              \"roles\": {\n                \"authorizer\": false,\n                \"param\": false,\n                \"payer\": true,\n                \"proposer\": false,\n              },\n              \"voucher\": {\n                \"arguments\": [],\n                \"authorizers\": [\n                  \"0xfoo\",\n                ],\n                \"cadence\": \"\",\n                \"computeLimit\": 156,\n                \"envelopeSigs\": [\n                  {\n                    \"address\": \"0xfoo\",\n                    \"keyId\": 1,\n                    \"sig\": null,\n                  },\n                ],\n                \"payer\": \"0xfoo\",\n                \"payloadSigs\": [],\n                \"proposalKey\": {\n                  \"address\": \"0xfoo\",\n                  \"keyId\": 1,\n                  \"sequenceNum\": 123,\n                },\n                \"refBlock\": \"123\",\n              },\n            },\n          ],\n        ],\n        \"results\": [\n          {\n            \"type\": \"return\",\n            \"value\": {\n              \"addr\": \"foo\",\n              \"keyId\": 0,\n              \"signature\": \"SIGNATURE\",\n            },\n          },\n        ],\n      },\n      \"tempId\": \"foo\",\n    },\n  },\n  \"authorizations\": [\n    \"foo\",\n  ],\n  \"message\": {\n    \"arguments\": [],\n    \"authorizations\": [],\n    \"cadence\": \"\",\n    \"computeLimit\": 156,\n    \"params\": [],\n    \"payer\": \"\",\n    \"proposer\": \"\",\n    \"refBlock\": \"123\",\n  },\n  \"payer\": [\n    \"foo\",\n  ],\n  \"proposer\": \"foo\",\n  \"tag\": \"TRANSACTION\",\n}\n`;\n"
  },
  {
    "path": "packages/sdk/src/resolve/__tests__/resolve-accounts.test.js",
    "content": "import {config, TestUtils} from \"../../sdk\"\nimport * as sdk from \"../../sdk\"\n\n// SIGNATORIES\n\nconst S1a = {addr: \"0x1111111111111111\", keyId: 1}\nconst S1b = {...S1a, keyId: 2}\nconst S1c = {...S1a, keyId: 3}\n\nconst S2a = {addr: \"0x2222222222222222\", keyId: 1}\nconst S2b = {...S2a, keyId: 2}\nconst S2c = {...S2a, keyId: 3}\n\nconst S3a = {addr: \"0x3333333333333333\", keyId: 1}\nconst S3b = {...S3a, keyId: 2}\nconst S3c = {...S3a, keyId: 3}\n\ntest(\"single account/key pair for all three signatory roles\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async () => {\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(TestUtils.authzFn(S1a)),\n        sdk.authorizations([TestUtils.authzFn(S1a)]),\n        sdk.payer(TestUtils.authzFn(S1a)),\n      ])\n\n      // Single Signatory\n      expect(Object.keys(ix.accounts).length).toBe(1)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.payer).toEqual([TestUtils.idof(S1a)])\n      expect(ix.authorizations).toEqual([TestUtils.idof(S1a)])\n    }\n  )\n})\n\ntest(\"single account/key pair for all three signatory roles but an additinal authorizer\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async () => {\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(TestUtils.authzFn(S1a)),\n        sdk.authorizations([TestUtils.authzFn(S1a), TestUtils.authzFn(S1b)]),\n        sdk.payer(TestUtils.authzFn(S1a)),\n      ])\n\n      // TWo Signatories\n      expect(Object.keys(ix.accounts).length).toBe(2)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S1b)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.payer).toEqual([TestUtils.idof(S1a)])\n      expect(ix.authorizations).toEqual([\n        TestUtils.idof(S1a),\n        TestUtils.idof(S1b),\n      ])\n    }\n  )\n})\n\ntest(\"All three signatories are different accounts\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async () => {\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(TestUtils.authzFn(S1a)),\n        sdk.authorizations([TestUtils.authzFn(S2a)]),\n        sdk.payer(TestUtils.authzFn(S3a)),\n      ])\n\n      // Three signatories\n      expect(Object.keys(ix.accounts).length).toBe(3)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S2a)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S3a)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.authorizations).toEqual([TestUtils.idof(S2a)])\n      expect(ix.payer).toEqual([TestUtils.idof(S3a)])\n    }\n  )\n})\n\ntest(\"The PreAuthz Usecase same signatories\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async () => {\n      const authz = TestUtils.authzResolveMany({\n        tempId: \"CURRENT_USER\",\n        proposer: S1a,\n        authorizations: [S1a],\n        payer: S1a,\n      })\n\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(authz),\n        sdk.payer(authz),\n        sdk.authorizations([authz]),\n      ])\n\n      // Single Signatory\n      expect(Object.keys(ix.accounts).length).toBe(1)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.payer).toEqual([TestUtils.idof(S1a)])\n\n      expect(ix.authorizations.length).toBe(1)\n      expect(ix.authorizations).toEqual([TestUtils.idof(S1a)])\n    }\n  )\n})\n\ntest(\"The PreAuthz Usecase - mixed signatories (wallet covers transaction fees)\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async c => {\n      const authz = TestUtils.authzResolveMany({\n        tempId: \"CURRENT_USER\",\n        proposer: S1a,\n        authorizations: [S1a, S1b, S1c],\n        payer: S2a, // wallet covers transaction\n      })\n\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(authz),\n        sdk.payer(authz),\n        sdk.authorizations([authz]),\n      ])\n\n      // Four Signatories\n      expect(Object.keys(ix.accounts).length).toBe(4)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S1b)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S1c)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S2a)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.payer).toEqual([TestUtils.idof(S2a)])\n\n      expect(ix.authorizations.length).toBe(3)\n      expect(ix.authorizations).toEqual([\n        TestUtils.idof(S1a),\n        TestUtils.idof(S1b),\n        TestUtils.idof(S1c),\n      ])\n    }\n  )\n})\n\ntest(\"Deep resolve usecase - multiple layer deep resolves on account\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async c => {\n      const authz = TestUtils.authzDeepResolveMany({\n        tempId: \"CURRENT_USER\",\n        proposer: S1a,\n        authorizations: [S1a, S1b, S1c],\n        payer: S2a, // wallet covers transaction\n      })\n\n      var ix = await TestUtils.run([\n        sdk.transaction`CODE`,\n        sdk.proposer(authz),\n        sdk.payer(authz),\n        sdk.authorizations([authz]),\n      ])\n\n      // Four Signatories\n      expect(Object.keys(ix.accounts).length).toBe(4)\n      expect(ix.accounts[TestUtils.idof(S1a)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S1b)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S1c)]).toBeDefined()\n      expect(ix.accounts[TestUtils.idof(S2a)]).toBeDefined()\n\n      expect(ix.proposer).toBe(TestUtils.idof(S1a))\n      expect(ix.payer).toEqual([TestUtils.idof(S2a)])\n\n      expect(ix.authorizations.length).toBe(3)\n      expect(ix.authorizations).toEqual([\n        TestUtils.idof(S1a),\n        TestUtils.idof(S1b),\n        TestUtils.idof(S1c),\n      ])\n    }\n  )\n})\n\ntest.skip(\"Deep resolve usecase - excess resolves throw an eror\", async () => {\n  await config.overload(\n    {\n      \"sdk.transport\": TestUtils.mockSend(),\n      \"debug.accounts\": false,\n    },\n    async c => {\n      const authz = TestUtils.authzDeepResolveMany(\n        {\n          tempId: \"CURRENT_USER\",\n          proposer: S1a,\n          authorizations: [S1a, S1b, S1c],\n          payer: S2a, // wallet covers transaction\n        },\n        5\n      )\n      // expect(...).toThrow doesn't work in this case\n      let error\n      try {\n        await TestUtils.run([\n          sdk.transaction`CODE`,\n          sdk.proposer(authz),\n          sdk.payer(authz),\n          sdk.authorizations([authz]),\n        ])\n      } catch (e) {\n        error = e\n      }\n      expect(error).toMatchInlineSnapshot(\n        \"[Error: recurseResolveAccount Error: Depth limit (5) reached. Ensure your authorization functions resolve to an account after 5 resolves.]\"\n      )\n    }\n  )\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-accounts.test.js",
    "content": "import {\n  build,\n  resolve,\n  ref,\n  transaction,\n  proposer,\n  payer,\n  limit,\n  authorizations,\n} from \"../sdk\"\nimport {buildPreSignable} from \"./resolve-accounts\"\n\ntest(\"Voucher in PreSignable\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(authz),\n      authorizations([authz]),\n      payer({\n        addr: \"0x02\",\n        signingFunction: () => ({signature: \"123\"}),\n        keyId: 0,\n        sequenceNum: 123,\n      }),\n      ref(\"123\"),\n    ])\n  )\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n    payer: \"0x02\",\n    authorizers: [\"0x01\"],\n    payloadSigs: [\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n    ],\n    envelopeSigs: [{address: \"0x02\", keyId: 0, sig: \"123\"}],\n  })\n})\n\ntest(\"Voucher in PreSignable no authorizers\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(authz),\n      payer({\n        addr: \"0x02\",\n        signingFunction: () => ({signature: \"123\"}),\n        keyId: 0,\n        sequenceNum: 123,\n      }),\n      ref(\"123\"),\n    ])\n  )\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n    payer: \"0x02\",\n    authorizers: [],\n    payloadSigs: [{address: \"0x01\", keyId: 1, sig: \"123\"}],\n    envelopeSigs: [{address: \"0x02\", keyId: 0, sig: \"123\"}],\n  })\n})\n\ntest(\"Voucher in PreSignable multiple payer keys\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n\n  const authzPayer = {\n    addr: \"0x02\",\n    resolve: (account, preSignable) => [\n      {\n        ...account,\n        addr: \"0x02\",\n        keyId: 0,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"123\",\n          addr: \"0x02\",\n          keyId: 0,\n        }),\n      },\n      {\n        ...account,\n        addr: \"0x02\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"333\",\n          addr: \"0x02\",\n          keyId: 1,\n        }),\n      },\n    ],\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(authz),\n    authorizations([authz]),\n    payer(authzPayer),\n    ref(\"123\"),\n  ])\n\n  const ix = await resolve(built)\n  expect(ix.payer).toEqual([\"0x02-0\", \"0x02-1\"])\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n    payer: \"0x02\",\n    authorizers: [\"0x01\"],\n    payloadSigs: [\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n    ],\n    envelopeSigs: [\n      {address: \"0x02\", keyId: 0, sig: \"123\"},\n      {address: \"0x02\", keyId: 1, sig: \"333\"},\n    ],\n  })\n})\n\ntest(\"Voucher in PreSignable multiple payer keys different accounts\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n\n  const authzPayer = {\n    addr: \"0x02\",\n    address: \"0x02\",\n    resolve: (account, preSignable) => [\n      {\n        ...account,\n        addr: \"0x02\",\n        keyId: 0,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"123\",\n          addr: \"0x02\",\n          keyId: 0,\n        }),\n      },\n      {\n        ...account,\n        addr: \"0x01\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"333\",\n          addr: \"0x02\",\n          keyId: 1,\n        }),\n      },\n    ],\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(authz),\n    authorizations([authz]),\n    payer(authzPayer),\n    ref(\"123\"),\n  ])\n\n  await expect(resolve(built)).rejects.toThrow()\n})\n\ntest(\"multiple payer scenario (One from dev and one from pre-authz)\", async () => {\n  const authzPayer = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n\n  const authz = {\n    kind: \"ACCOUNT\",\n    addr: null,\n    keyId: null,\n    signature: null,\n    signingFunction: null,\n    resolve: (account, preSignable) => [\n      {\n        addr: \"72f6325947f76d3a\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: true, payer: false, authorizer: false},\n      },\n      {\n        addr: \"f086a545ce3c552d\",\n        signingFunction: () => ({signature: \"2\"}),\n        keyId: 12,\n        role: {proposer: false, payer: true, authorizer: false},\n      },\n      {\n        addr: \"72f6325947f76d3a\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: false, payer: false, authorizer: true},\n      },\n    ],\n    role: {\n      proposer: true,\n      authorizer: true,\n      payer: false,\n      param: false,\n    },\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(authz),\n    authorizations([authz]),\n    payer(authzPayer),\n    ref(\"123\"),\n  ])\n\n  const ix = await resolve(built)\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x72f6325947f76d3a\", keyId: 1, sequenceNum: 12},\n    payer: \"0x01\",\n    authorizers: [\"0x72f6325947f76d3a\"],\n    payloadSigs: [{address: \"0x72f6325947f76d3a\", keyId: 1, sig: \"1\"}],\n    envelopeSigs: [{address: \"0x01\", keyId: 1, sig: \"123\"}],\n  })\n})\n\ntest(\"multiple payer scenario (One from dev and one from pre-authz) as array\", async () => {\n  const authzPayer1 = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n  const authzPayer2 = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"456\"}),\n    keyId: 2,\n    sequenceNum: 456,\n  }\n\n  const authz = {\n    kind: \"ACCOUNT\",\n    addr: null,\n    keyId: null,\n    signature: null,\n    signingFunction: null,\n    resolve: (account, preSignable) => [\n      {\n        addr: \"02\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: true, payer: false, authorizer: false},\n      },\n      {\n        addr: \"01\",\n        signingFunction: () => ({signature: \"2\"}),\n        keyId: 12,\n        role: {proposer: false, payer: true, authorizer: false},\n      },\n      {\n        addr: \"02\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: false, payer: false, authorizer: true},\n      },\n    ],\n    role: {\n      proposer: true,\n      authorizer: true,\n      payer: false,\n      param: false,\n    },\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(authz),\n    authorizations([authz]),\n    payer([authzPayer1, authzPayer2]),\n    ref(\"123\"),\n  ])\n\n  const ix = await resolve(built)\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x02\", keyId: 1, sequenceNum: 12},\n    payer: \"0x01\",\n    authorizers: [\"0x02\"],\n    payloadSigs: [{address: \"0x02\", keyId: 1, sig: \"1\"}],\n    envelopeSigs: [\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n      {address: \"0x01\", keyId: 2, sig: \"456\"},\n    ],\n  })\n})\n\ntest(\"payer from pre-authz\", async () => {\n  const authz = {\n    kind: \"ACCOUNT\",\n    addr: null,\n    keyId: null,\n    signature: null,\n    signingFunction: null,\n    resolve: (account, preSignable) => [\n      {\n        addr: \"72f6325947f76d3a\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: true, payer: false, authorizer: false},\n      },\n      {\n        addr: \"f086a545ce3c552d\",\n        signingFunction: () => ({signature: \"2\"}),\n        keyId: 12,\n        role: {proposer: false, payer: true, authorizer: false},\n      },\n      {\n        addr: \"72f6325947f76d3a\",\n        sequenceNum: 12,\n        signingFunction: () => ({signature: \"1\"}),\n        keyId: 1,\n        role: {proposer: false, payer: false, authorizer: true},\n      },\n    ],\n    role: {\n      proposer: true,\n      authorizer: true,\n      payer: false,\n      param: false,\n    },\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(authz),\n    authorizations([authz]),\n    payer(authz),\n    ref(\"123\"),\n  ])\n\n  const ix = await resolve(built)\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x72f6325947f76d3a\", keyId: 1, sequenceNum: 12},\n    payer: \"0xf086a545ce3c552d\",\n    authorizers: [\"0x72f6325947f76d3a\"],\n    payloadSigs: [{address: \"0x72f6325947f76d3a\", keyId: 1, sig: \"1\"}],\n    envelopeSigs: [{address: \"0xf086a545ce3c552d\", keyId: 12, sig: \"2\"}],\n  })\n})\n\ntest(\"Voucher in PreSignable multiple payer keys and multiple authorizers\", async () => {\n  const proposerAcc = {\n    addr: \"0x04\",\n    signingFunction: () => ({signature: \"456\"}),\n    keyId: 4,\n    sequenceNum: 345,\n  }\n  const authz1 = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 1,\n    sequenceNum: 123,\n  }\n  const authz2 = {\n    addr: \"0x03\",\n    signingFunction: () => ({signature: \"444\"}),\n    keyId: 2,\n    sequenceNum: 234,\n  }\n\n  const authzPayer = {\n    addr: \"0x02\",\n    resolve: (account, preSignable) => [\n      {\n        ...account,\n        addr: \"0x02\",\n        keyId: 0,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"123\",\n          addr: \"0x02\",\n          keyId: 0,\n        }),\n      },\n      {\n        ...account,\n        addr: \"0x02\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: signable => ({\n          signature: \"333\",\n          addr: \"0x02\",\n          keyId: 1,\n        }),\n      },\n    ],\n  }\n\n  const built = await build([\n    transaction``,\n    limit(156),\n    proposer(proposerAcc),\n    authorizations([authz1, authz2]),\n    payer(authzPayer),\n    ref(\"123\"),\n  ])\n\n  const ix = await resolve(built)\n  expect(ix.payer).toEqual([\"0x02-0\", \"0x02-1\"])\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x04\", keyId: 4, sequenceNum: 345},\n    payer: \"0x02\",\n    authorizers: [\"0x01\", \"0x03\"],\n    payloadSigs: [\n      {address: \"0x01\", keyId: 1, sig: \"123\"},\n      {address: \"0x03\", keyId: 2, sig: \"444\"},\n      {address: \"0x04\", keyId: 4, sig: \"456\"},\n    ],\n    envelopeSigs: [\n      {address: \"0x02\", keyId: 0, sig: \"123\"},\n      {address: \"0x02\", keyId: 1, sig: \"333\"},\n    ],\n  })\n})\n\ntest(\"Voucher sent to Current User Pre-Authz includes other authorizer addresses\", async () => {\n  const mockResolve = jest.fn().mockImplementation(async acct => [\n    {\n      ...acct,\n      addr: \"0x01\",\n      keyId: 1,\n      sequenceNum: 123,\n      signingFunction: () => ({signature: \"123\"}),\n      role: {proposer: true, payer: true, authorizer: true},\n    },\n  ])\n  const currentUser = account => ({\n    ...account,\n    tempId: \"CURRENT_USER\",\n    resolve: mockResolve,\n  })\n  const customAuthz = async acct => ({\n    ...acct,\n    addr: \"0x02\",\n    keyId: 2,\n    sequenceNum: 234,\n    signingFunction: () => ({signature: \"234\"}),\n  })\n\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(currentUser),\n      authorizations([customAuthz, currentUser]),\n      payer(currentUser),\n      ref(\"123\"),\n    ])\n  )\n\n  const ps = buildPreSignable(ix.accounts[ix.proposer], ix)\n  expect(ps.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n    payer: \"0x01\",\n    authorizers: [\"0x02\", \"0x01\"],\n    payloadSigs: [{address: \"0x02\", keyId: 2, sig: \"234\"}],\n    envelopeSigs: [{address: \"0x01\", keyId: 1, sig: \"123\"}],\n  })\n\n  expect(mockResolve).toHaveBeenCalledTimes(1)\n  // Verify pre-signable contains custom authz in the authorizers list\n  expect(mockResolve.mock.calls[0][1].voucher.authorizers).toEqual([\n    \"0x02\",\n    null,\n  ])\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-accounts.ts",
    "content": "import {withPrefix} from \"@onflow/util-address\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {log} from \"@onflow/util-logger\"\nimport {isTransaction} from \"../interaction/interaction\"\nimport {Interaction, InteractionAccount} from \"@onflow/typedefs\"\nimport {createSignableVoucher} from \"./voucher\"\nimport {v4 as uuidv4} from \"uuid\"\n\nconst MAX_DEPTH_LIMIT = 5\n\nconst idof = (acct: InteractionAccount) =>\n  `${withPrefix(acct.addr)}-${acct.keyId}`\nconst isFn = (v: any): v is Function =>\n  v &&\n  (Object.prototype.toString.call(v) === \"[object Function]\" ||\n    \"function\" === typeof v ||\n    v instanceof Function)\n\nconst genAccountId = (...ids: (string | boolean | undefined)[]) => ids.join(\"-\")\n\nenum ROLES {\n  PAYER = \"payer\",\n  PROPOSER = \"proposer\",\n  AUTHORIZATIONS = \"authorizations\",\n}\n\nfunction debug() {\n  const SPACE = \" \"\n  const SPACE_COUNT_PER_INDENT = 4\n  const DEBUG_MESSAGE: string[] = []\n  return [\n    function (msg = \"\", indent = 0) {\n      DEBUG_MESSAGE.push(\n        Array(indent * SPACE_COUNT_PER_INDENT)\n          .fill(SPACE)\n          .join(\"-\") + msg\n      )\n    },\n    function () {\n      return DEBUG_MESSAGE.reduce((prev, curr) => prev + \"\\n\" + curr)\n    },\n  ]\n}\n\nfunction recurseFlatMap<T>(el: T, depthLimit = 3) {\n  if (depthLimit <= 0) return el\n  if (!Array.isArray(el)) return el\n  return recurseFlatMap(\n    el.flatMap(e => e),\n    depthLimit - 1\n  )\n}\n\n/**\n * Builds a pre-signable object containing interaction data before signing.\n *\n * @param acct The account to create the pre-signable for\n * @param ix The interaction object containing transaction details\n * @returns A pre-signable object conforming to the FCL pre-signable standard\n */\nexport function buildPreSignable(\n  acct: Partial<InteractionAccount>,\n  ix: Interaction\n) {\n  try {\n    return {\n      f_type: \"PreSignable\",\n      f_vsn: \"1.0.1\",\n      roles: acct.role,\n      cadence: ix.message.cadence,\n      args: ix.message.arguments.map(d => ix.arguments[d].asArgument),\n      data: {},\n      interaction: ix,\n      voucher: createSignableVoucher(ix),\n    }\n  } catch (error) {\n    console.error(\"buildPreSignable\", error)\n    throw error\n  }\n}\n\nasync function removeUnusedIxAccounts(\n  ix: Interaction,\n  opts: Record<string, any>\n) {\n  const payerTempIds = Array.isArray(ix.payer) ? ix.payer : [ix.payer]\n  const authorizersTempIds = Array.isArray(ix.authorizations)\n    ? ix.authorizations\n    : [ix.authorizations]\n  const proposerTempIds =\n    ix.proposer === null\n      ? []\n      : Array.isArray(ix.proposer)\n        ? ix.proposer\n        : [ix.proposer]\n\n  const ixAccountKeys = Object.keys(ix.accounts)\n  const uniqueTempIds = [\n    ...new Set(payerTempIds.concat(authorizersTempIds, proposerTempIds)),\n  ]\n\n  for (const ixAccountKey of ixAccountKeys) {\n    if (!uniqueTempIds.find(id => id === ixAccountKey)) {\n      delete ix.accounts[ixAccountKey]\n    }\n  }\n}\n\nfunction addAccountToIx(ix: Interaction, newAccount: InteractionAccount) {\n  if (\n    typeof newAccount.addr === \"string\" &&\n    (typeof newAccount.keyId === \"number\" ||\n      typeof newAccount.keyId === \"string\")\n  ) {\n    newAccount.tempId = idof(newAccount)\n  } else {\n    newAccount.tempId = newAccount.tempId || uuidv4()\n  }\n\n  const existingAccount = ix.accounts[newAccount.tempId] || newAccount\n\n  if (!ix.accounts[newAccount.tempId]) {\n    ix.accounts[newAccount.tempId] = newAccount\n  }\n\n  ix.accounts[newAccount.tempId].role.proposer =\n    existingAccount.role.proposer || newAccount.role.proposer\n  ix.accounts[newAccount.tempId].role.payer =\n    existingAccount.role.payer || newAccount.role.payer\n  ix.accounts[newAccount.tempId].role.authorizer =\n    existingAccount.role.authorizer || newAccount.role.authorizer\n\n  return ix.accounts[newAccount.tempId]\n}\n\nfunction uniqueAccountsFlatMap(accounts: InteractionAccount[]) {\n  const flatMapped = recurseFlatMap(accounts)\n  const seen = new Set()\n\n  const uniqueAccountsFlatMapped = flatMapped\n    .map(account => {\n      const accountId = genAccountId(\n        account.tempId,\n        account.role.payer,\n        account.role.proposer,\n        account.role.authorizer,\n        account.role.param\n      )\n      if (seen.has(accountId)) return null\n      seen.add(accountId)\n      return account\n    })\n    .filter(e => e !== null) as InteractionAccount[]\n\n  return uniqueAccountsFlatMapped\n}\n\n// Resolve single account, returns new account tempIds (if they exist)\nasync function resolveSingleAccount(\n  ix: Interaction,\n  currentAccountTempId: string,\n  depthLimit = MAX_DEPTH_LIMIT,\n  {debugLogger}: {debugLogger: (msg?: string, indent?: number) => void}\n): Promise<[string[], boolean]> {\n  if (depthLimit <= 0) {\n    throw new Error(\n      `recurseResolveAccount Error: Depth limit (${MAX_DEPTH_LIMIT}) reached. Ensure your authorization functions resolve to an account after ${MAX_DEPTH_LIMIT} resolves.`\n    )\n  }\n\n  let account = ix.accounts[currentAccountTempId]\n\n  if (!account) return [[], false]\n\n  debugLogger(\n    `account: ${account.tempId}`,\n    Math.max(MAX_DEPTH_LIMIT - depthLimit, 0)\n  )\n\n  if (account?.resolve) {\n    if (isFn(account?.resolve)) {\n      debugLogger(\n        `account: ${account.tempId} -- cache MISS`,\n        Math.max(MAX_DEPTH_LIMIT - depthLimit, 0)\n      )\n\n      const {resolve, ...accountWithoutResolve} = account\n\n      let resolvedAccounts = await resolve(\n        accountWithoutResolve,\n        buildPreSignable(accountWithoutResolve, ix)\n      )\n\n      resolvedAccounts = Array.isArray(resolvedAccounts)\n        ? resolvedAccounts\n        : [resolvedAccounts]\n\n      let flatResolvedAccounts = recurseFlatMap(resolvedAccounts)\n\n      flatResolvedAccounts = flatResolvedAccounts.map(\n        (flatResolvedAccount: InteractionAccount) =>\n          addAccountToIx(ix, flatResolvedAccount)\n      )\n\n      account.resolve = flatResolvedAccounts.map(\n        (flatResolvedAccount: InteractionAccount) => flatResolvedAccount.tempId\n      )\n\n      account = addAccountToIx(ix, account)\n\n      return [\n        flatResolvedAccounts.map(\n          (flatResolvedAccount: InteractionAccount) =>\n            flatResolvedAccount.tempId\n        ),\n        true,\n      ]\n    } else {\n      debugLogger(\n        `account: ${account.tempId} -- cache HIT`,\n        Math.max(MAX_DEPTH_LIMIT - depthLimit, 0)\n      )\n\n      return [account.resolve, false]\n    }\n  }\n  return [account.tempId ? [account.tempId] : [], false]\n}\n\nconst getAccountTempIDs = (rawTempIds: string | string[] | null) => {\n  if (rawTempIds === null) {\n    return []\n  }\n  return Array.isArray(rawTempIds) ? rawTempIds : [rawTempIds]\n}\n\nasync function replaceRoles(\n  ix: Interaction,\n  oldAccountTempId: string,\n  newAccounts: InteractionAccount[]\n) {\n  // Replace roles in the interaction with any resolved accounts\n  // e.g. payer -> [oldAccountTempId, anotherId] => payer -> [newAccountTempId, anotherId]\n  for (let role of Object.values(ROLES)) {\n    if (role === ROLES.AUTHORIZATIONS || role === ROLES.PAYER) {\n      ix[role] = getAccountTempIDs(ix[role]).reduce((acc, acctTempId) => {\n        if (acctTempId === oldAccountTempId) {\n          return acc.concat(\n            ...newAccounts\n              .filter(x => {\n                return (\n                  (role === ROLES.PAYER && x.role.payer) ||\n                  (role === ROLES.AUTHORIZATIONS && x.role.authorizer)\n                )\n              })\n              .map(acct => acct.tempId)\n          )\n        }\n        return acc.concat(acctTempId)\n      }, [] as string[]) as any\n    } else if (role === ROLES.PROPOSER) {\n      const proposerAccts = newAccounts.filter(x => x.role.proposer)\n\n      if (proposerAccts.length > 1) {\n        throw new Error(\n          `replaceRoles Error: Multiple proposer keys were resolved, but only one is allowed`\n        )\n      }\n\n      ix[role] = proposerAccts[0]?.tempId ?? ix[role]\n    }\n  }\n}\n\nasync function resolveAccountsByIds(\n  ix: Interaction,\n  accountTempIds: Set<string>,\n  depthLimit = MAX_DEPTH_LIMIT,\n  {debugLogger}: {debugLogger: (msg?: string, indent?: number) => void}\n) {\n  invariant(\n    ix && typeof ix === \"object\",\n    \"resolveAccountType Error: ix not defined\"\n  )\n\n  let newTempIds = new Set<string>()\n  for (let accountId of accountTempIds) {\n    let account = ix.accounts[accountId]\n    invariant(Boolean(account), `resolveAccountType Error: account not found`)\n\n    const [resolvedAccountTempIds, foundNewAccounts] =\n      await resolveSingleAccount(ix, accountId, depthLimit, {\n        debugLogger,\n      })\n\n    // If new accounts were resolved, add them to the set so they can be explored next iteration\n    if (foundNewAccounts) {\n      const resolvedAccounts: InteractionAccount[] = resolvedAccountTempIds.map(\n        (resolvedAccountTempId: string) => ix.accounts[resolvedAccountTempId]\n      )\n\n      const flatResolvedAccounts = uniqueAccountsFlatMap(resolvedAccounts)\n\n      // Add new tempIds to the set so they can be used next iteration\n      flatResolvedAccounts.forEach(x => newTempIds.add(x.tempId))\n\n      // Update any roles in the interaction based on the new accounts\n      replaceRoles(ix, accountId, flatResolvedAccounts)\n    }\n  }\n\n  // Ensure all payers are of the same account\n  let payerAddress\n  for (const payerTempID of ix[ROLES.PAYER]) {\n    let pAcct = ix.accounts[payerTempID]\n    if (!payerAddress) payerAddress = pAcct.addr\n    else if (payerAddress !== pAcct.addr) {\n      throw new Error(\n        \"resolveAccountType Error: payers from different accounts detected\"\n      )\n    }\n  }\n\n  return newTempIds\n}\n\n/**\n * Resolves account authorization functions and validates account configurations for transactions.\n *\n * @param ix The interaction object containing accounts to resolve\n * @param opts Configuration options for resolution\n * @returns The interaction with resolved accounts\n */\nexport async function resolveAccounts(\n  ix: Interaction,\n  opts: Record<string, any> = {}\n) {\n  if (isTransaction(ix)) {\n    if (!Array.isArray(ix.payer)) {\n      log.deprecate({\n        pkg: \"FCL\",\n        subject:\n          '\"ix.payer\" must be an array. Support for ix.payer as a singular',\n        message: \"See changelog for more info.\",\n      })\n    }\n    let [debugLogger, getDebugMessage] = debug()\n    try {\n      // BFS, resolving one level of accounts at a time\n      let depthLimit = MAX_DEPTH_LIMIT\n      let frontier = new Set([\n        ...getAccountTempIDs(ix[ROLES.PAYER]),\n        ...getAccountTempIDs(ix[ROLES.PROPOSER]),\n        ...getAccountTempIDs(ix[ROLES.AUTHORIZATIONS]),\n      ])\n\n      while (frontier.size > 0) {\n        if (depthLimit <= 0) {\n          throw new Error(\n            `resolveAccounts Error: Depth limit (${MAX_DEPTH_LIMIT}) reached. Ensure your authorization functions resolve to an account after ${MAX_DEPTH_LIMIT} resolves.`\n          )\n        }\n\n        frontier = await resolveAccountsByIds(ix, frontier, depthLimit, {\n          debugLogger,\n        })\n        depthLimit--\n      }\n\n      await removeUnusedIxAccounts(ix, {debugLogger})\n\n      // Ensure at least one account for each role is resolved (except for authorizations)\n      for (const role of Object.values(ROLES)) {\n        invariant(\n          getAccountTempIDs(ix[role]).length > 0 ||\n            role === ROLES.AUTHORIZATIONS,\n          `resolveAccountType Error: no accounts for role \"${role}\" found`\n        )\n      }\n\n      if (opts.enableDebug) {\n        console.debug(getDebugMessage())\n      }\n    } catch (error) {\n      console.error(\"=== SAD PANDA ===\\n\\n\", error, \"\\n\\n=== SAD PANDA ===\")\n      throw error\n    }\n  }\n  return ix\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-arguments.test.ts",
    "content": "import {resolveArguments} from \"../sdk\"\n\ndescribe(\"resolveArguments\", () => {\n  const argID = \"28948a11n4\"\n  const argObj = {\n    type: \"Address\",\n    value: \"0xf8d6e0586b0a20c7\",\n  }\n  const tag = \"SCRIPT\"\n  const kind = \"ARGUMENT\"\n  const tempId = argID\n\n  test(\"should resolve synchronous arguments\", async () => {\n    const ix = {\n      tag,\n      arguments: {\n        [argID]: {\n          asArgument: null,\n          kind,\n          resolve: undefined,\n          resolveArgument: undefined,\n          tempId,\n          value: argObj.value,\n          xform: {\n            label: \"Address\",\n            asArgument: () => argObj,\n          },\n        },\n      },\n    }\n\n    const res = await resolveArguments(ix as any)\n    expect(res.arguments[argID].asArgument).toEqual(argObj)\n  })\n\n  test(\"should resolve asynchronous arguments\", async () => {\n    const ix = {\n      tag,\n      arguments: {\n        [argID]: {\n          asArgument: null,\n          kind,\n          resolve: jest.fn(),\n          resolveArgument: jest.fn().mockResolvedValue({\n            xform: {\n              asArgument: () => argObj,\n            },\n          }),\n          tempId,\n          value: null,\n          xform: {\n            label: \"Address\",\n            asArgument: () => argObj,\n          },\n        },\n      },\n    }\n\n    const res = await resolveArguments(ix as any)\n    expect(res.arguments[argID].resolve).not.toHaveBeenCalled()\n    expect(res.arguments[argID].resolveArgument).toHaveBeenCalled()\n    expect(res.arguments[argID].asArgument).toEqual(argObj)\n  })\n\n  test(\"should resolve nested asynchronous arguments\", async () => {\n    const resolveTwo = jest.fn().mockResolvedValue({\n      xform: {\n        asArgument: () => argObj,\n      },\n    })\n\n    const ix = {\n      tag,\n      arguments: {\n        [argID]: {\n          asArgument: null,\n          kind,\n          resolve: undefined,\n          resolveArgument: jest.fn().mockResolvedValue({\n            xform: {\n              asArgument: () => argObj,\n            },\n            resolveArgument: resolveTwo,\n          }),\n          tempId,\n          value: null,\n          xform: {\n            label: \"Address\",\n            asArgument: () => argObj,\n          },\n        },\n      },\n    }\n\n    const res = await resolveArguments(ix as any)\n    expect(res.arguments[argID].resolveArgument).toHaveBeenCalled()\n    expect(resolveTwo).toHaveBeenCalled()\n    expect(res.arguments[argID].asArgument).toEqual(argObj)\n  })\n\n  test(\"should throw an error if resolve recursion exceeds depth limit\", async () => {\n    const ix = {\n      tag,\n      arguments: {\n        [argID]: {\n          asArgument: null,\n          kind,\n          resolve: undefined,\n          resolveArgument: jest.fn().mockResolvedValue({\n            tempId: \"1\",\n            xform: {\n              asArgument: () => argObj,\n            },\n            resolveArgument: jest.fn().mockResolvedValue({\n              tempId: \"2\",\n              xform: {\n                asArgument: () => argObj,\n              },\n              resolveArgument: jest.fn().mockResolvedValue({\n                tempId: \"3\",\n                xform: {\n                  asArgument: () => argObj,\n                },\n              }),\n            }),\n          }),\n          tempId,\n          value: null,\n          xform: {\n            label: \"Address\",\n            asArgument: () => argObj,\n          },\n        },\n      },\n    }\n\n    await expect(resolveArguments(ix as any)).rejects.toThrow()\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-arguments.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {isTransaction, isScript} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\n\ninterface Argument {\n  tempId: string\n  value: any\n  xform: any\n  resolveArgument?: () => Promise<Argument>\n  asArgument?: any\n}\n\nconst isFn = (v: any): v is Function => typeof v === \"function\"\n\nfunction cast(arg: Argument): any {\n  // prettier-ignore\n  invariant(typeof arg.xform != null, `No type specified for argument: ${arg.value}`)\n\n  if (isFn(arg.xform)) return arg.xform(arg.value)\n  if (isFn(arg.xform.asArgument)) return arg.xform.asArgument(arg.value)\n\n  // prettier-ignore\n  invariant(false, `Invalid Argument`, arg)\n}\n\nasync function handleArgResolution(\n  arg: Argument,\n  depth = 3\n): Promise<Argument> {\n  invariant(\n    depth > 0,\n    `Argument Resolve Recursion Limit Exceeded for Arg: ${arg.tempId}`\n  )\n\n  if (isFn(arg.resolveArgument)) {\n    const resolvedArg = await arg.resolveArgument()\n    return handleArgResolution(resolvedArg, depth - 1)\n  } else {\n    return arg\n  }\n}\n\n/**\n * Resolves transaction arguments by evaluating argument functions and converting them to appropriate types.\n *\n * This function processes all arguments in a transaction or script interaction, calling their transform functions\n * to convert JavaScript values into Cadence-compatible argument formats that can be sent to the Flow network.\n *\n * The resolution process includes:\n * - Calling argument resolver functions if present\n * - Applying type transformations using the xform field\n * - Handling recursive argument resolution up to a depth limit\n *\n * @param ix The interaction object containing arguments to resolve\n * @returns The interaction with resolved arguments ready for network transmission\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Arguments are automatically resolved during send()\n * await fcl.send([\n *   fcl.script`\n *     access(all) fun main(amount: UFix64, recipient: Address): String {\n *       return \"Sending \".concat(amount.toString()).concat(\" to \").concat(recipient.toString())\n *     }\n *   `,\n *   fcl.args([\n *     fcl.arg(\"100.0\", fcl.t.UFix64),    // Will be resolved to Cadence UFix64\n *     fcl.arg(\"0x01\", fcl.t.Address)     // Will be resolved to Cadence Address\n *   ])\n * ]).then(fcl.decode);\n *\n * // The resolveArguments function handles the conversion automatically\n */\nexport async function resolveArguments(ix: Interaction): Promise<Interaction> {\n  if (isTransaction(ix) || isScript(ix)) {\n    for (let [id, arg] of Object.entries(ix.arguments)) {\n      const res = await handleArgResolution(arg as Argument)\n      ix.arguments[id].asArgument = cast(res)\n    }\n  }\n\n  return ix\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-cadence.test.ts",
    "content": "import {\n  initInteraction,\n  pipe,\n  put,\n  makeScript,\n} from \"../interaction/interaction\"\nimport {resolveCadence} from \"./resolve-cadence\"\nimport {config} from \"@onflow/config\"\nimport {getGlobalContext} from \"../context/global\"\n\nconst idle = () => new Promise(resolve => setTimeout(resolve, 0))\n\ndescribe(\"resolveCadence\", () => {\n  describe(\"0xHelloWorld-style account identifier syntax\", () => {\n    test(\"cadence is a string\", async () => {\n      const CADENCE = \"CADENCE_STRING\"\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toBe(CADENCE)\n    })\n\n    test(\"cadence is a function\", async () => {\n      const CADENCE = async function () {\n        return \"CADENCE_ASYNC_FUNCTION\"\n      }\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toBe(await CADENCE())\n    })\n\n    test(\"replaces all addresses from config\", async () => {\n      const CADENCE = async function () {\n        return `\n        import MyContract from 0xMY_CONTRACT_ADDRESS\n  \n        access(all) fun main(): Address {\n          return 0xMY_CONTRACT_ADDRESS\n        }\n      `\n      }\n\n      const RESULT = async function () {\n        return `\n        import MyContract from 0x123abc\n  \n        access(all) fun main(): Address {\n          return 0x123abc\n        }\n      `\n      }\n\n      await config.put(\"0xMY_CONTRACT_ADDRESS\", \"0x123abc\")\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(await RESULT())\n    })\n\n    test(\"similar config names do not replace each other\", async () => {\n      const CADENCE = async function () {\n        return `\n        import FooBar from 0xFoo\n        import FooBar from 0xFooBar\n\n        access(all) fun main(): Address {\n          log(0xFoo)\n          return 0xFoo\n        }\n\n        access(all) fun other(): Address {\n          log(0xFooBar)\n          return 0xFooBar\n        }\n\n        access(all) fun otherTwo(): Address {return 0xFoo}\n        access(all) fun otherThree(): Address {return 0xFooBar}\n      `\n      }\n\n      const RESULT = async function () {\n        return `\n        import FooBar from 0x123\n        import FooBar from 0x456\n\n        access(all) fun main(): Address {\n          log(0x123)\n          return 0x123\n        }\n\n        access(all) fun other(): Address {\n          log(0x456)\n          return 0x456\n        }\n\n        access(all) fun otherTwo(): Address {return 0x123}\n        access(all) fun otherThree(): Address {return 0x456}\n      `\n      }\n\n      config.put(\"0xFoo\", \"0x123\").put(\"0xFooBar\", \"0x456\")\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(await RESULT())\n    })\n  })\n\n  describe(\"new Identifier syntax\", () => {\n    test(\"single import statement\", async () => {\n      const CADENCE = `import \"Foo\"\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      const expected = `import Foo from 0x1\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      await config().put(\"system.contracts.Foo\", \"0x1\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"multiple import statements with only one defined\", async () => {\n      const CADENCE = `import \"Foo\"\nimport \"Bar\"\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      const expected = `import Foo from 0x1\nimport \"Bar\"\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      await config().put(\"system.contracts.Foo\", \"0x1\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"multiple import statements\", async () => {\n      const CADENCE = `import \"Foo\"\nimport \"Bar\"\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      const expected = `import Foo from 0x1\nimport Bar from 0x2\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      await config().put(\"system.contracts.Foo\", \"0x1\")\n      await config().put(\"system.contracts.Bar\", \"0x2\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"should prefix addresses with `0x` if not already present\", async () => {\n      const CADENCE = `import \"Foo\"\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      const expected = `import Foo from 0x1\n\naccess(all) fun main(): Address {\n  return \"Foo\"\n}`\n\n      await config().put(\"system.contracts.Foo\", \"1\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n  })\n\n  describe(\"mixed import syntax\", () => {\n    test(\"supports both string imports and traditional imports\", async () => {\n      const CADENCE = `import \"FungibleToken\"\nimport MyContract from 0x12345678\n\naccess(all) fun main(): Address {\n  return 0x12345678\n}`\n\n      const expected = `import FungibleToken from 0xf233dcee88fe0abe\nimport MyContract from 0x12345678\n\naccess(all) fun main(): Address {\n  return 0x12345678\n}`\n\n      await config().put(\"system.contracts.FungibleToken\", \"0xf233dcee88fe0abe\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"supports multiple string imports with traditional imports\", async () => {\n      const CADENCE = `import \"FungibleToken\"\nimport \"NonFungibleToken\"\nimport MyContract from 0xABCDEF\nimport FlowToken from 0x0ae53cb6e3f42a79\n\naccess(all) fun main(): String {\n  return \"mixed imports work\"\n}`\n\n      const expected = `import FungibleToken from 0xf233dcee88fe0abe\nimport NonFungibleToken from 0x1d7e57aa55817448\nimport MyContract from 0xABCDEF\nimport FlowToken from 0x0ae53cb6e3f42a79\n\naccess(all) fun main(): String {\n  return \"mixed imports work\"\n}`\n\n      await config().put(\"system.contracts.FungibleToken\", \"0xf233dcee88fe0abe\")\n      await config().put(\n        \"system.contracts.NonFungibleToken\",\n        \"0x1d7e57aa55817448\"\n      )\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"traditional imports with explicit addresses should not be modified\", async () => {\n      const CADENCE = `import FlowToken from 0x7e60df042a9c0868\nimport MyContract from 0x1234567890abcdef\n\naccess(all) fun main(): UFix64 {\n  return 42.0\n}`\n\n      const expected = `import FlowToken from 0x7e60df042a9c0868\nimport MyContract from 0x1234567890abcdef\n\naccess(all) fun main(): UFix64 {\n  return 42.0\n}`\n\n      // No config needed - explicit addresses should work as-is\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"string import without config should log warning and leave import unchanged\", async () => {\n      const CADENCE = `import \"UnconfiguredContract\"\nimport FlowToken from 0x7e60df042a9c0868\n\naccess(all) fun main(): Bool {\n  return true\n}`\n\n      const expected = `import \"UnconfiguredContract\"\nimport FlowToken from 0x7e60df042a9c0868\n\naccess(all) fun main(): Bool {\n  return true\n}`\n\n      // Spy on console.warn to verify warning is logged\n      const warnSpy = jest.spyOn(console, \"warn\").mockImplementation()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n\n      // Verify warning was logged\n      expect(warnSpy).toHaveBeenCalled()\n      const warnCall = warnSpy.mock.calls.find(call =>\n        call.join(\" \").includes(\"Contract Placeholder not found\")\n      )\n      expect(warnCall).toBeDefined()\n      expect(warnCall?.join(\" \")).toContain(\"UnconfiguredContract\")\n\n      warnSpy.mockRestore()\n    })\n\n    test(\"legacy placeholders and string imports together should throw invariant error\", async () => {\n      const CADENCE = `import \"FungibleToken\"\nimport FlowToken from 0xFLOWTOKEN\n\naccess(all) fun main(): Bool {\n  return true\n}`\n\n      config().put(\"system.contracts.FungibleToken\", \"0xf233dcee88fe0abe\")\n      config().put(\"0xFLOWTOKEN\", \"0x7e60df042a9c0868\")\n      await idle()\n\n      await expect(async () => {\n        await pipe([\n          makeScript,\n          put(\"ix.cadence\", CADENCE),\n          async ix => resolveCadence(ix, await getGlobalContext()),\n        ])(initInteraction())\n      }).rejects.toThrow(\n        \"Both account identifier and contract identifier syntax not simultaneously supported.\"\n      )\n    })\n\n    test(\"legacy placeholders alone should work without string imports\", async () => {\n      const CADENCE = `import FlowToken from 0xFLOWTOKEN\nimport MyContract from 0xMYCONTRACT\n\naccess(all) fun main(): Address {\n  return 0xFLOWTOKEN\n}`\n\n      const expected = `import FlowToken from 0x7e60df042a9c0868\nimport MyContract from 0x1234567890abcdef\n\naccess(all) fun main(): Address {\n  return 0x7e60df042a9c0868\n}`\n\n      config().put(\"0xFLOWTOKEN\", \"0x7e60df042a9c0868\")\n      config().put(\"0xMYCONTRACT\", \"0x1234567890abcdef\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n  })\n\n  describe(\"import aliases with canonical\", () => {\n    test(\"canonical contract import (no alias)\", async () => {\n      const CADENCE = `import \"FUSD\"\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      const expected = `import FUSD from 0x9a0766d93b6608b7\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      await config().put(\"system.contracts.FUSD\", \"0x9a0766d93b6608b7\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"single aliased contract import\", async () => {\n      const CADENCE = `import \"FUSD1\"\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      const expected = `import FUSD as FUSD1 from 0xe223d8a629e49c68\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      await config().put(\"system.contracts.FUSD1\", \"0xe223d8a629e49c68\")\n      await config().put(\"system.contracts.FUSD1.canonical\", \"FUSD\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"multiple aliases of same canonical contract\", async () => {\n      const CADENCE = `import \"FUSD1\"\nimport \"FUSD2\"\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      const expected = `import FUSD as FUSD1 from 0xe223d8a629e49c68\nimport FUSD as FUSD2 from 0x0f9df91c9121c460\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      await config().put(\"system.contracts.FUSD1\", \"0xe223d8a629e49c68\")\n      await config().put(\"system.contracts.FUSD1.canonical\", \"FUSD\")\n      await config().put(\"system.contracts.FUSD2\", \"0x0f9df91c9121c460\")\n      await config().put(\"system.contracts.FUSD2.canonical\", \"FUSD\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n\n    test(\"mixed canonical and alias imports\", async () => {\n      const CADENCE = `import \"FUSD\"\nimport \"FUSD1\"\nimport \"FUSD2\"\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      const expected = `import FUSD from 0x9a0766d93b6608b7\nimport FUSD as FUSD1 from 0xe223d8a629e49c68\nimport FUSD as FUSD2 from 0x0f9df91c9121c460\n\naccess(all) fun main(): String {\n  return \"test\"\n}`\n\n      await config().put(\"system.contracts.FUSD\", \"0x9a0766d93b6608b7\")\n      await config().put(\"system.contracts.FUSD1\", \"0xe223d8a629e49c68\")\n      await config().put(\"system.contracts.FUSD1.canonical\", \"FUSD\")\n      await config().put(\"system.contracts.FUSD2\", \"0x0f9df91c9121c460\")\n      await config().put(\"system.contracts.FUSD2.canonical\", \"FUSD\")\n      await idle()\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n  })\n\n  describe(\"no imports\", () => {\n    test(\"cadence with no imports should remain unchanged\", async () => {\n      const CADENCE = `access(all) fun main(): String {\n  return \"Hello, Flow!\"\n}`\n\n      const expected = `access(all) fun main(): String {\n  return \"Hello, Flow!\"\n}`\n\n      const ix = await pipe([\n        makeScript,\n        put(\"ix.cadence\", CADENCE),\n        async ix => resolveCadence(ix, await getGlobalContext()),\n      ])(initInteraction())\n\n      expect(ix.message.cadence).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-cadence.ts",
    "content": "import {isTransaction, isScript, get} from \"../interaction/interaction\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport * as logger from \"@onflow/util-logger\"\nimport {withPrefix} from \"@onflow/util-address\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {SdkContext} from \"../context/context\"\nimport {withGlobalContext} from \"../context/global\"\n\nconst isFn = (v: any): v is Function => typeof v === \"function\"\nconst isString = (v: any): v is string => typeof v === \"string\"\n\nconst oldIdentifierPatternFn = (): RegExp => /\\b(0x\\w+)\\b/g\nfunction isOldIdentifierSyntax(\n  cadence: string,\n  legacyContractIdentifiers: Record<string, string> = {}\n): boolean {\n  const matches = cadence.matchAll(oldIdentifierPatternFn())\n  for (const match of matches) {\n    const identifier = match[0]\n    // Only return true if we have a legacy identifier that needs replacement\n    if (legacyContractIdentifiers[identifier]) {\n      return true\n    }\n  }\n  return false\n}\n\nconst newIdentifierPatternFn = (): RegExp => /import\\s+\"(\\w+)\"/g\nfunction isNewIdentifierSyntax(cadence: string): boolean {\n  return newIdentifierPatternFn().test(cadence)\n}\n\nfunction getContractIdentifierSyntaxMatches(\n  cadence: string\n): IterableIterator<RegExpMatchArray> {\n  return cadence.matchAll(newIdentifierPatternFn())\n}\n\nexport function createResolveCadence(context: SdkContext) {\n  return async function resolveCadence(ix: Interaction): Promise<Interaction> {\n    if (!isTransaction(ix) && !isScript(ix)) return ix\n\n    var cadence = get(ix, \"ix.cadence\")\n\n    invariant(\n      isFn(cadence) || isString(cadence),\n      \"Cadence needs to be a function or a string.\"\n    )\n    if (isFn(cadence)) cadence = await cadence({} as Record<string, never>)\n    invariant(isString(cadence), \"Cadence needs to be a string at this point.\")\n    invariant(\n      !isOldIdentifierSyntax(cadence, context.legacyContractIdentifiers) ||\n        !isNewIdentifierSyntax(cadence),\n      \"Both account identifier and contract identifier syntax not simultaneously supported.\"\n    )\n\n    if (isOldIdentifierSyntax(cadence, context.legacyContractIdentifiers)) {\n      cadence = Object.entries(context.legacyContractIdentifiers || {}).reduce(\n        (cadence, [key, value]) => {\n          const regex = new RegExp(\"(\\\\b\" + key + \"\\\\b)\", \"g\")\n          return cadence.replace(regex, value)\n        },\n        cadence\n      )\n    }\n\n    if (isNewIdentifierSyntax(cadence)) {\n      for (const [\n        fullMatch,\n        contractName,\n      ] of getContractIdentifierSyntaxMatches(cadence)) {\n        const address: string | null = context.contracts[contractName] || null\n        if (address) {\n          // Check if this contract has a canonical reference (for import aliases)\n          // e.g., context.contracts[\"FUSD1.canonical\"] = \"FUSD\"\n          const canonical: string | null =\n            context.contracts[contractName + \".canonical\"] || null\n\n          // Generate import statement based on whether a canonical exists:\n          // - With canonical: import FUSD as FUSD1 from 0x... (alias syntax)\n          // - Without canonical: import FUSD1 from 0x... (standard syntax)\n          const importStatement = canonical\n            ? `import ${canonical} as ${contractName} from ${withPrefix(address)}`\n            : `import ${contractName} from ${withPrefix(address)}`\n          cadence = cadence.replace(fullMatch, importStatement)\n        } else {\n          logger.log({\n            title: \"Contract Placeholder not found\",\n            message: `Cannot find a value for contract placeholder ${contractName}. Please add to your flow.json or explicitly add it to the config 'contracts.*' namespace.`,\n            level: logger.LEVELS.warn,\n          })\n        }\n      }\n    }\n\n    // We need to move this over in any case.\n    ix.message.cadence = cadence\n\n    return ix\n  }\n}\n\nexport const resolveCadence =\n  /* @__PURE__ */ withGlobalContext(createResolveCadence)\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-compute-limit.test.ts",
    "content": "import {\n  initInteraction,\n  pipe,\n  makeTransaction,\n} from \"../interaction/interaction\"\nimport {config} from \"@onflow/config\"\nimport {resolveComputeLimit} from \"./resolve-compute-limit\"\nimport {getGlobalContext} from \"../context/global\"\n\ndescribe(\"resolveComputeLimit\", () => {\n  test(\"transaction compute limit has priority\", async () => {\n    const TRANSACTION_COMPUTE_LIMIT = 1234\n    const CONFIG_COMPUTE_LIMIT = 4321\n    await config.overload(\n      {\n        \"fcl.limit\": CONFIG_COMPUTE_LIMIT,\n      },\n      async () => {\n        const ix = await pipe([\n          makeTransaction,\n          ix => ({\n            ...ix,\n            message: {\n              ...ix.message,\n              computeLimit: TRANSACTION_COMPUTE_LIMIT,\n            },\n          }),\n          async ix => resolveComputeLimit(ix, await getGlobalContext()),\n        ])(initInteraction())\n\n        expect(ix.message.computeLimit).toBe(TRANSACTION_COMPUTE_LIMIT)\n      }\n    )\n  })\n\n  test(\"config compute limit is used if exists\", async () => {\n    const CONFIG_COMPUTE_LIMIT = 4321\n    await config.overload(\n      {\n        \"fcl.limit\": CONFIG_COMPUTE_LIMIT,\n      },\n      async () => {\n        const ix = await pipe([\n          makeTransaction,\n          async ix => resolveComputeLimit(ix, await getGlobalContext()),\n        ])(initInteraction())\n        expect(ix.message.computeLimit).toBe(CONFIG_COMPUTE_LIMIT)\n      }\n    )\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-compute-limit.ts",
    "content": "import {isTransaction} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {SdkContext} from \"../context/context\"\nimport {withGlobalContext} from \"../context/global\"\n\nexport function createResolveComputeLimit(context: SdkContext) {\n  return async function resolveComputeLimit(\n    ix: Interaction\n  ): Promise<Interaction> {\n    if (isTransaction(ix)) {\n      ix.message.computeLimit = ix.message.computeLimit || context.computeLimit\n    }\n    return ix\n  }\n}\n\n/**\n * Resolves the compute limit for a transaction from configuration or applies default values.\n *\n * @param ix The interaction object to resolve compute limit for\n * @returns The interaction with resolved compute limit\n */\nexport const resolveComputeLimit = withGlobalContext(createResolveComputeLimit)\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-final-normalization.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-final-normalization.ts",
    "content": "import {sansPrefix} from \"@onflow/util-address\"\nimport {Interaction} from \"@onflow/typedefs\"\n\n/**\n * Normalizes account addresses by removing the \"0x\" prefix from all account addresses in the interaction.\n *\n * @param ix The interaction object to normalize\n * @returns The interaction with normalized account addresses\n */\nexport async function resolveFinalNormalization(\n  ix: Interaction\n): Promise<Interaction> {\n  for (let key of Object.keys(ix.accounts)) {\n    ix.accounts[key].addr = sansPrefix(ix.accounts[key].addr)\n  }\n  return ix\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-proposer-sequence-number.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-proposer-sequence-number.ts",
    "content": "import {isTransaction, Ok} from \"../interaction/interaction\"\nimport * as ixModule from \"../interaction/interaction\"\nimport {response as responseModule} from \"../response/response\"\nimport {config} from \"@onflow/config\"\nimport {decodeResponse} from \"../decode/decode\"\nimport {getAccount} from \"../build/build-get-account\"\nimport {build} from \"../build/build\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {send as defaultSend} from \"@onflow/transport-http\"\nimport {Interaction} from \"@onflow/typedefs\"\n\ninterface NodeConfig {\n  node: string\n}\n\n/**\n * Resolves the sequence number for the proposer account by querying the blockchain.\n *\n * @param config Configuration containing the node endpoint\n * @returns A function that resolves the proposer sequence number for an interaction\n */\nexport const resolveProposerSequenceNumber =\n  ({node}: NodeConfig) =>\n  async (ix: Interaction) => {\n    if (!isTransaction(ix)) return Ok(ix)\n    if (ix.accounts[ix.proposer!].sequenceNum) return Ok(ix)\n\n    const sendFn: any = await config.first(\n      [\"sdk.transport\", \"sdk.send\"],\n      defaultSend\n    )\n\n    invariant(\n      sendFn,\n      `Required value for sdk.transport is not defined in config. See: ${\"https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21\"}`\n    )\n\n    const response = await sendFn(\n      await build([getAccount(ix.accounts[ix.proposer!].addr!)]),\n      {response: responseModule, Buffer, ix: ixModule},\n      {node}\n    )\n    const decoded = await decodeResponse(response)\n\n    ix.accounts[ix.proposer!].sequenceNum =\n      decoded.keys[ix.accounts[ix.proposer!].keyId!].sequenceNumber\n\n    return Ok(ix)\n  }\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-ref-block-id.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(1).toBe(1)\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-ref-block-id.ts",
    "content": "import {\n  isTransaction,\n  Ok,\n  initInteraction,\n  pipe,\n} from \"../interaction/interaction\"\nimport * as ixModule from \"../interaction/interaction\"\nimport {response} from \"../response/response\"\nimport {config} from \"@onflow/config\"\nimport {decodeResponse} from \"../decode/decode\"\nimport {getBlock} from \"../build/build-get-block\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {send as defaultSend} from \"@onflow/transport-http\"\n\nasync function getRefId(opts?: {[key: string]: any}): Promise<string> {\n  const node = await config().get(\"accessNode.api\")\n  const sendFn: any = await config.first(\n    [\"sdk.transport\", \"sdk.send\"],\n    defaultSend\n  )\n\n  invariant(\n    sendFn,\n    `Required value for sdk.transport is not defined in config. See: ${\"https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21\"}`\n  )\n\n  var ix\n  ix = await pipe(initInteraction(), [getBlock()])\n  ix = await sendFn(ix, {response, Buffer, ix: ixModule}, {node})\n  ix = await decodeResponse(ix)\n  return ix.id\n}\n\n/**\n * Resolves the reference block ID for a transaction by querying the latest block from the network.\n *\n * @param opts Optional configuration parameters\n * @returns A function that resolves the reference block ID for an interaction\n */\nexport function resolveRefBlockId(opts?: {[key: string]: any}) {\n  return async (ix: any) => {\n    if (!isTransaction(ix)) return Ok(ix)\n    if (ix.message.refBlock) return Ok(ix)\n\n    ix.message.refBlock = await getRefId(opts)\n\n    return Ok(ix)\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-signatures.test.ts",
    "content": "import {resolveSignatures, buildSignable} from \"./resolve-signatures\"\nimport {\n  build,\n  resolve,\n  ref,\n  transaction,\n  proposer,\n  payer,\n  limit,\n  authorizations,\n} from \"../sdk\"\nimport {InteractionResolverKind, InteractionTag} from \"@onflow/typedefs\"\n\nconst signingFunction = jest.fn(() => ({\n  addr: \"foo\",\n  keyId: 0,\n  signature: \"SIGNATURE\",\n}))\n\nconst TRANSACTION = {\n  tag: InteractionTag.TRANSACTION,\n  message: {\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    proposer: \"\",\n    payer: \"\",\n    authorizations: [],\n    params: [],\n    arguments: [],\n  },\n  accounts: {\n    foo: {\n      kind: InteractionResolverKind.ACCOUNT,\n      tempId: \"foo\",\n      addr: \"foo\",\n      keyId: 1,\n      sequenceNum: 123,\n      signature: null,\n      signingFunction: signingFunction,\n      resolve: null,\n      role: {proposer: false, authorizer: false, payer: true, param: false},\n      authorization: () => {},\n    },\n  },\n  proposer: \"foo\",\n  authorizations: [\"foo\"],\n  payer: [\"foo\"],\n} as any\n\ntest(\"exports function\", () => {\n  expect(typeof resolveSignatures).toBe(\"function\")\n})\n\ntest(\"voucher in signable\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\"}),\n    keyId: 0,\n    sequenceNum: 123,\n  }\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(authz),\n      authorizations([authz as any]),\n      payer([\n        {\n          addr: \"0x02\",\n          signingFunction: () => ({signature: \"123\"}),\n          keyId: 0,\n          sequenceNum: 123,\n        },\n      ]),\n      ref(\"123\"),\n    ])\n  )\n\n  const signable = buildSignable(ix.accounts[ix.proposer!], {} as any, ix)\n\n  expect(signable.voucher).toEqual({\n    cadence: \"\",\n    refBlock: \"123\",\n    computeLimit: 156,\n    arguments: [],\n    proposalKey: {address: \"0x01\", keyId: 0, sequenceNum: 123},\n    payer: \"0x02\",\n    authorizers: [\"0x01\"],\n    payloadSigs: [\n      {address: \"0x01\", keyId: 0, sig: \"123\"},\n      {address: \"0x01\", keyId: 0, sig: \"123\"},\n    ],\n    envelopeSigs: [{address: \"0x02\", keyId: 0, sig: \"123\"}],\n  })\n})\n\ntest(\"extensionData is propagated into voucher\", async () => {\n  const authz = {\n    addr: \"0x01\",\n    signingFunction: () => ({signature: \"123\", extensionData: \"abcd\"}),\n    keyId: 0,\n    sequenceNum: 123,\n  }\n  const ix = await resolve(\n    await build([\n      transaction``,\n      limit(156),\n      proposer(authz),\n      authorizations([authz as any]),\n      payer([\n        {\n          addr: \"0x02\",\n          signingFunction: () => ({signature: \"123\"}),\n          keyId: 0,\n          sequenceNum: 123,\n        },\n      ]),\n      ref(\"123\"),\n    ])\n  )\n\n  const signable = buildSignable(ix.accounts[ix.proposer!], {} as any, ix)\n  expect(signable.voucher.payloadSigs[0]).toEqual(\n    expect.objectContaining({extensionData: \"abcd\"})\n  )\n})\n\ntest(\"Golden Path\", async () => {\n  const ix = await resolveSignatures(TRANSACTION)\n\n  expect(ix).toMatchSnapshot()\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-signatures.ts",
    "content": "import {isTransaction} from \"../interaction/interaction\"\nimport {Interaction, InteractionAccount} from \"@onflow/typedefs\"\nimport {sansPrefix} from \"@onflow/util-address\"\nimport {\n  Transaction,\n  TransactionProposalKey,\n  encodeTransactionPayload as encodeInsideMessage,\n  encodeTransactionEnvelope as encodeOutsideMessage,\n} from \"../encode/encode\"\nimport {\n  createSignableVoucher,\n  findInsideSigners,\n  findOutsideSigners,\n} from \"./voucher\"\n\n/**\n * Resolves signatures for a transaction by coordinating the signing process for inside and outside signers.\n *\n * @param ix The interaction object containing transaction details\n * @returns The interaction object with resolved signatures\n */\nexport async function resolveSignatures(ix: Interaction) {\n  if (isTransaction(ix)) {\n    try {\n      let insideSigners = findInsideSigners(ix)\n      const insidePayload = encodeInsideMessage(prepForEncoding(ix))\n\n      // Promise.all could potentially break the flow if there are multiple inside signers trying to resolve at the same time\n      // causing multiple triggers of authz function that tries to render multiple auth iiframes/tabs/extensions\n      // as an alternative, use this:\n      // for(const insideSigner of insideSigners) {\n      //   await fetchSignature(ix, insidePayload)(insideSigner);\n      // }\n      await Promise.all(insideSigners.map(fetchSignature(ix, insidePayload)))\n\n      let outsideSigners = findOutsideSigners(ix)\n      const outsidePayload = encodeOutsideMessage({\n        ...prepForEncoding(ix),\n        payloadSigs: insideSigners.map(id => {\n          const base: any = {\n            address: ix.accounts[id].addr || \"\",\n            keyId: ix.accounts[id].keyId || 0,\n            sig: ix.accounts[id].signature || \"\",\n          }\n          const acc = ix.accounts[id] as InteractionAccount\n          const ext = (acc as any).extensionData as string | null | undefined\n          if (ext != null) (base as any).extensionData = ext\n          return base\n        }),\n      })\n\n      // Promise.all could potentially break the flow if there are multiple outside signers trying to resolve at the same time\n      // causing multiple triggers of authz function that tries to render multiple auth iframes/tabs/extensions\n      // as an alternative, use this:\n      // for(const outsideSigner of outsideSigners) {\n      //   await fetchSignature(ix, outsidePayload)(outsideSigner);\n      // }\n      await Promise.all(outsideSigners.map(fetchSignature(ix, outsidePayload)))\n    } catch (error) {\n      console.error(\"Signatures\", error, {ix})\n      throw error\n    }\n  }\n  return ix\n}\n\nfunction fetchSignature(ix: Interaction, payload: string) {\n  return async function innerFetchSignature(id: string) {\n    const acct = ix.accounts[id]\n    if (acct.signature != null && acct.signature !== undefined) return\n    const {signature, extensionData} = await acct.signingFunction(\n      buildSignable(acct, payload, ix)\n    )\n    ix.accounts[id].signature = signature\n    if (extensionData != null) {\n      ix.accounts[id].extensionData = extensionData\n    }\n  }\n}\n\n/**\n * Builds a signable object that can be signed by an authorization function.\n *\n * @param acct The account to create the signable for\n * @param message The encoded message to be signed\n * @param ix The interaction object containing transaction details\n * @returns A signable object conforming to the FCL signable standard\n */\nexport function buildSignable(\n  acct: InteractionAccount,\n  message: string,\n  ix: Interaction\n) {\n  try {\n    return {\n      f_type: \"Signable\",\n      f_vsn: \"1.0.1\",\n      message,\n      addr: sansPrefix(acct.addr),\n      keyId: acct.keyId,\n      roles: acct.role,\n      cadence: ix.message.cadence,\n      args: ix.message.arguments.map(d => ix.arguments[d].asArgument),\n      data: {},\n      interaction: ix,\n      voucher: createSignableVoucher(ix),\n    }\n  } catch (error) {\n    console.error(\"buildSignable\", error)\n    throw error\n  }\n}\n\nfunction prepForEncoding(ix: Interaction): Transaction {\n  const payerAddress = sansPrefix(\n    (Array.isArray(ix.payer) ? ix.accounts[ix.payer[0]] : ix.accounts[ix.payer])\n      .addr || \"\"\n  )\n\n  const proposalKey: TransactionProposalKey = ix.proposer\n    ? {\n        address: sansPrefix(ix.accounts[ix.proposer].addr) || \"\",\n        keyId: ix.accounts[ix.proposer].keyId || 0,\n        sequenceNum: ix.accounts[ix.proposer].sequenceNum || 0,\n      }\n    : {}\n\n  return {\n    cadence: ix.message.cadence,\n    refBlock: ix.message.refBlock,\n    computeLimit: ix.message.computeLimit,\n    arguments: ix.message.arguments.map(id => ix.arguments[id].asArgument),\n    proposalKey,\n    payer: payerAddress,\n    authorizers: ix.authorizations\n      .map(cid => sansPrefix(ix.accounts[cid].addr) || \"\")\n      .reduce((prev: string[], current) => {\n        return prev.find(item => item === current) ? prev : [...prev, current]\n      }, []),\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-validators.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-validators.ts",
    "content": "import {get, pipe, Ok, Bad} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\n\n/**\n * Executes validator functions that have been attached to an interaction to perform validation checks.\n *\n * @param ix The interaction object containing validators to execute\n * @returns The interaction after running all validators\n */\nexport async function resolveValidators(ix: Interaction): Promise<Interaction> {\n  const validators = get(ix, \"ix.validators\", [])\n  return pipe(\n    ix,\n    validators.map((cb: Function) => (ix: Interaction) => cb(ix, {Ok, Bad}))\n  )\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-voucher-intercept.test.ts",
    "content": "import {InteractionResolverKind, InteractionTag} from \"@onflow/typedefs\"\nimport {resolveVoucherIntercept} from \"./resolve-voucher-intercept\"\n\ntest(\"exports function\", () => {\n  expect(typeof resolveVoucherIntercept).toBe(\"function\")\n})\n\ntest(\"voucherIntercept is executed\", async () => {\n  let executed = false\n\n  const checkFunc = async (voucher: any) => {\n    executed = true\n    expect(typeof voucher).toBe(\"object\")\n  }\n\n  const ix = {\n    tag: InteractionTag.TRANSACTION,\n    assigns: {\n      \"ix.voucher-intercept\": checkFunc,\n    },\n    message: {\n      cadence: \"\",\n      refBlock: \"123\",\n      computeLimit: 156,\n      proposer: \"\",\n      payer: \"\",\n      authorizations: [],\n      params: [],\n      arguments: [],\n    },\n    accounts: {\n      foo: {\n        kind: InteractionResolverKind.ACCOUNT,\n        tempId: \"foo\",\n        addr: \"foo\",\n        keyId: 1,\n        sequenceNum: 123,\n        signature: null,\n        signingFunction: () => ({signature: \"123\"}),\n        resolve: null,\n        role: {proposer: false, authorizer: false, payer: true, param: false},\n        authorization: () => {},\n      },\n    },\n    proposer: \"foo\",\n    authorizations: [\"foo\"],\n    payer: [\"foo\"],\n  } as any\n\n  await resolveVoucherIntercept(ix)\n\n  expect(executed).toBe(true)\n})\n\ntest(\"voucherIntercept throws error\", async () => {\n  let executed = false\n\n  const checkFuncThrowError = async (voucher: any) => {\n    executed = true\n    throw new Error(\"test error\")\n  }\n\n  const ix = {\n    tag: InteractionTag.TRANSACTION,\n    assigns: {\n      \"ix.voucher-intercept\": checkFuncThrowError,\n    },\n    message: {\n      cadence: \"\",\n      refBlock: \"123\",\n      computeLimit: 156,\n      proposer: \"\",\n      payer: \"\",\n      authorizations: [],\n      params: [],\n      arguments: [],\n    },\n    accounts: {\n      foo: {\n        kind: InteractionResolverKind.ACCOUNT,\n        tempId: \"foo\",\n        addr: \"foo\",\n        keyId: 1,\n        sequenceNum: 123,\n        signature: null,\n        signingFunction: () => ({signature: \"123\"}),\n        resolve: null,\n        role: {proposer: false, authorizer: false, payer: true, param: false},\n        authorization: () => {},\n      },\n    },\n    proposer: \"foo\",\n    authorizations: [\"foo\"],\n    payer: [\"foo\"],\n  } as any\n\n  await expect(resolveVoucherIntercept(ix)).rejects.toThrow()\n\n  expect(executed).toBe(true)\n})\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve-voucher-intercept.ts",
    "content": "import {get, isFn} from \"../interaction/interaction\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {createSignableVoucher} from \"./voucher\"\n\n/**\n * Resolves voucher intercept functions by calling them with the current voucher.\n *\n * @param ix The interaction object to resolve voucher intercepts for\n * @returns The interaction after voucher intercept processing\n */\nexport async function resolveVoucherIntercept(\n  ix: Interaction\n): Promise<Interaction> {\n  const fn = get(ix, \"ix.voucher-intercept\")\n  if (isFn(fn)) {\n    await fn(createSignableVoucher(ix))\n  }\n  return ix\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/resolve.ts",
    "content": "import {pipe, isTransaction} from \"../interaction/interaction\"\nimport {config} from \"@onflow/config\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {Buffer} from \"@onflow/rlp\"\nimport * as ixModule from \"../interaction/interaction\"\nimport {response} from \"../response/response\"\nimport {build} from \"../build/build\"\nimport {getBlock} from \"../build/build-get-block\"\nimport {getAccount} from \"../build/build-get-account\"\nimport {decodeResponse as decode} from \"../decode/decode\"\nimport {Interaction} from \"@onflow/typedefs\"\n\nimport {createResolveCadence} from \"./resolve-cadence\"\nimport {resolveArguments} from \"./resolve-arguments\"\nimport {resolveAccounts} from \"./resolve-accounts\"\nimport {resolveSignatures} from \"./resolve-signatures\"\nimport {resolveValidators} from \"./resolve-validators\"\nimport {resolveFinalNormalization} from \"./resolve-final-normalization\"\nimport {resolveVoucherIntercept} from \"./resolve-voucher-intercept\"\nimport {createResolveComputeLimit} from \"./resolve-compute-limit\"\nimport {SdkContext} from \"../context/context\"\nimport {withGlobalContext} from \"../context/global\"\n\ntype DebugCallback = (ix: Interaction, log: any, accts?: any) => any\n\nconst noop = (v: any) => v\nconst debug =\n  (key: string, fn: DebugCallback = noop) =>\n  async (ix: Interaction): Promise<Interaction> => {\n    const take = (obj: any, keys: string | string[] = []) => {\n      if (typeof keys === \"string\") keys = keys.split(\" \")\n      keys.reduce((acc, key) => ({...acc, [key]: obj[key]}), {})\n    }\n\n    const accts = (ix: Interaction) =>\n      [\n        \"\\nAccounts:\",\n        {\n          proposer: ix.proposer,\n          authorizations: ix.authorizations,\n          payer: ix.payer,\n        },\n        \"\\n\\nDetails:\",\n        ix.accounts,\n      ].filter(Boolean)\n\n    const log = (...msg: any[]) => {\n      console.log(`debug[${key}] ---\\n`, ...msg, \"\\n\\n\\n---\")\n    }\n\n    if (await config.get(`debug.${key}`)) await fn(ix, log, accts)\n    return ix\n  }\n\nexport function createResolve(context: SdkContext) {\n  const resolve = async (ix: Interaction) =>\n    pipe([\n      createResolveCadence(context),\n      debug(\"cadence\", (ix: Interaction, log: any) => log(ix.message.cadence)),\n      createResolveComputeLimit(context),\n      debug(\"compute limit\", (ix: Interaction, log: any) =>\n        log(ix.message.computeLimit)\n      ),\n      resolveArguments,\n      debug(\"arguments\", (ix: Interaction, log: any) =>\n        log(ix.message.arguments, ix.message)\n      ),\n      resolveAccounts,\n      debug(\"accounts\", (ix: Interaction, log: any, accts: any) =>\n        log(...accts(ix))\n      ),\n      /* special */ createExecFetchRef(context),\n      /* special */ createExecFetchSequenceNumber(context),\n      resolveSignatures,\n      debug(\"signatures\", (ix: Interaction, log: any, accts: any) =>\n        log(...accts(ix))\n      ),\n      resolveFinalNormalization,\n      resolveValidators,\n      resolveVoucherIntercept,\n      debug(\"resolved\", (ix: Interaction, log: any) => log(ix)),\n    ])(ix)\n\n  return resolve\n}\n\n/**\n * Resolves an interaction by applying a series of resolvers in sequence.\n *\n * This is the main resolver function that takes a built interaction and prepares it\n * for submission to the Flow blockchain by applying all necessary resolvers.\n *\n * The resolve function uses a pipeline approach, applying each resolver in sequence\n * to transform the interaction from its initial built state to a fully resolved state\n * ready for transmission to the Flow Access API.\n *\n * @param interaction The interaction object to resolve\n * @returns A promise that resolves to the fully resolved interaction\n * @example\n * import { resolve, build, script } from \"@onflow/sdk\"\n *\n * const interaction = await build([\n *   script`\n *     access(all) fun main(): String {\n *       return \"Hello, World!\"\n *     }\n *   `\n * ])\n *\n * const resolved = await resolve(interaction)\n */\nexport const resolve = /* @__PURE__ */ withGlobalContext(createResolve)\n\nfunction createExecFetchRef(context: SdkContext) {\n  return async function execFetchRef(ix: Interaction): Promise<Interaction> {\n    if (isTransaction(ix) && ix.message.refBlock == null) {\n      const sendFn = context.transport.send\n\n      ix.message.refBlock = (\n        await sendFn(\n          build([getBlock()]),\n          {response, Buffer, ix: ixModule} as any,\n          {\n            get node() {\n              return context.accessNodeUrl\n            },\n          }\n        ).then(decode)\n      ).id\n    }\n    return ix\n  }\n}\n\nfunction createExecFetchSequenceNumber(context: SdkContext) {\n  return async function execFetchSequenceNumber(\n    ix: Interaction\n  ): Promise<Interaction> {\n    if (isTransaction(ix)) {\n      var acct = Object.values(ix.accounts).find((a: any) => a.role.proposer)\n      invariant(acct !== undefined, `Transactions require a proposer`)\n      if (acct && acct.sequenceNum == null) {\n        const sendFn = context.transport.send\n\n        ix.accounts[acct.tempId].sequenceNum = await sendFn(\n          await build([getAccount(acct.addr!)]),\n          {response, Buffer, ix: ixModule} as any,\n          {\n            get node() {\n              return context.accessNodeUrl\n            },\n          }\n        )\n          .then(decode)\n          .then((acctResponse: any) => acctResponse.keys)\n          .then((keys: any) =>\n            keys.find((key: any) => key.index === acct!.keyId)\n          )\n          .then((key: any) => key.sequenceNumber)\n      }\n    }\n    return ix\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/resolve/voucher.ts",
    "content": "import {withPrefix} from \"@onflow/util-address\"\nimport {Voucher, encodeTxIdFromVoucher} from \"../encode/encode\"\nimport {Interaction, InteractionAccount} from \"@onflow/typedefs\"\n\n/**\n * Identifies signers for the transaction payload (authorizers + proposer, excluding payer).\n *\n * This function determines which accounts need to sign the transaction payload. Payload signers include\n * all authorizers and the proposer, but exclude the payer (who signs the envelope).\n *\n * @param ix The interaction object\n * @returns Array of account tempIds that need to sign the payload\n *\n * @example\n * import { findInsideSigners, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n * // Assume we have account tempIds: \"proposer-123\", \"auth-456\", \"payer-789\"\n * interaction.proposer = \"proposer-123\";\n * interaction.authorizations = [\"auth-456\"];\n * interaction.payer = \"payer-789\";\n *\n * const insideSigners = findInsideSigners(interaction);\n * console.log(insideSigners); // [\"auth-456\", \"proposer-123\"]\n * // Note: payer is excluded from payload signers\n */\nexport function findInsideSigners(ix: Interaction) {\n  // Inside Signers Are: (authorizers + proposer) - payer\n  let inside = new Set(ix.authorizations)\n  if (ix.proposer) {\n    inside.add(ix.proposer)\n  }\n  if (Array.isArray(ix.payer)) {\n    ix.payer.forEach(p => inside.delete(p))\n  } else {\n    inside.delete(ix.payer)\n  }\n  return Array.from(inside)\n}\n\n/**\n * Identifies signers for the transaction envelope (payer accounts only).\n *\n * This function determines which accounts need to sign the transaction envelope. Envelope signers\n * are only the payer accounts, who are responsible for transaction fees.\n *\n * @param ix The interaction object\n * @returns Array of account tempIds that need to sign the envelope\n *\n * @example\n * import { findOutsideSigners, initInteraction } from \"@onflow/sdk\"\n *\n * const interaction = initInteraction();\n * interaction.proposer = \"proposer-123\";\n * interaction.authorizations = [\"auth-456\"];\n * interaction.payer = \"payer-789\";\n *\n * const outsideSigners = findOutsideSigners(interaction);\n * console.log(outsideSigners); // [\"payer-789\"]\n * // Only the payer signs the envelope\n *\n * // Multiple payers example\n * interaction.payer = [\"payer-789\", \"payer-abc\"];\n * const multiplePayerSigners = findOutsideSigners(interaction);\n * console.log(multiplePayerSigners); // [\"payer-789\", \"payer-abc\"]\n */\nexport function findOutsideSigners(ix: Interaction) {\n  // Outside Signers Are: (payer)\n  let outside = new Set(Array.isArray(ix.payer) ? ix.payer : [ix.payer])\n  return Array.from(outside)\n}\n\n/**\n * Creates a signable voucher object from an interaction for signing purposes.\n *\n * A voucher is a standardized representation of a transaction that contains all the necessary\n * information for signing and submitting to the Flow network. This function transforms an\n * interaction object into a voucher format.\n *\n * @param ix The interaction object containing transaction details\n * @returns A voucher object containing all transaction data and signatures\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { createSignableVoucher } from \"@onflow/sdk\"\n *\n * // Build a transaction interaction\n * const interaction = await fcl.build([\n *   fcl.transaction`\n *     transaction(amount: UFix64) {\n *       prepare(account: AuthAccount) {\n *         log(amount)\n *       }\n *     }\n *   `,\n *   fcl.args([fcl.arg(\"10.0\", fcl.t.UFix64)]),\n *   fcl.proposer(proposerAuthz),\n *   fcl.payer(payerAuthz),\n *   fcl.authorizations([authorizerAuthz]),\n *   fcl.limit(100)\n * ]);\n *\n * // Create a voucher for signing\n * const voucher = createSignableVoucher(interaction);\n * console.log(voucher.cadence); // The Cadence script\n * console.log(voucher.arguments); // The transaction arguments\n * console.log(voucher.proposalKey); // Proposer account details\n * console.log(voucher.authorizers); // List of authorizer addresses\n *\n * // The voucher can now be signed and submitted\n */\nexport const createSignableVoucher = (ix: Interaction) => {\n  const buildAuthorizers = () => {\n    const authorizations = ix.authorizations\n      .map(cid => withPrefix(ix.accounts[cid].addr))\n      .reduce((prev: (string | null)[], current) => {\n        return prev.find(item => item === current) ? prev : [...prev, current]\n      }, [])\n    return authorizations\n  }\n\n  const buildInsideSigners = () =>\n    findInsideSigners(ix).map(id => {\n      const base: any = {\n        address: withPrefix(ix.accounts[id].addr),\n        keyId: ix.accounts[id].keyId,\n        sig: ix.accounts[id].signature,\n      }\n      const ext = (ix.accounts[id] as InteractionAccount as any).extensionData\n      if (ext != null) (base as any).extensionData = ext\n      return base\n    })\n\n  const buildOutsideSigners = () =>\n    findOutsideSigners(ix).map(id => {\n      const base: any = {\n        address: withPrefix(ix.accounts[id].addr),\n        keyId: ix.accounts[id].keyId,\n        sig: ix.accounts[id].signature,\n      }\n      const ext = (ix.accounts[id] as InteractionAccount as any).extensionData\n      if (ext != null) (base as any).extensionData = ext\n      return base\n    })\n\n  const proposalKey = ix.proposer\n    ? {\n        address: withPrefix(ix.accounts[ix.proposer].addr),\n        keyId: ix.accounts[ix.proposer].keyId,\n        sequenceNum: ix.accounts[ix.proposer].sequenceNum,\n      }\n    : {}\n\n  return {\n    cadence: ix.message.cadence,\n    refBlock: ix.message.refBlock || null,\n    computeLimit: ix.message.computeLimit,\n    arguments: ix.message.arguments.map(id => ix.arguments[id].asArgument),\n    proposalKey,\n    payer: withPrefix(\n      ix.accounts[Array.isArray(ix.payer) ? ix.payer[0] : ix.payer].addr\n    ),\n    authorizers: buildAuthorizers(),\n    payloadSigs: buildInsideSigners(),\n    envelopeSigs: buildOutsideSigners(),\n  }\n}\n\n/**\n * Converts a voucher object to a transaction ID.\n *\n * This function computes the transaction ID by encoding and hashing the voucher.\n * The transaction ID can be used to track the transaction status on the Flow network.\n *\n * @param voucher The voucher object to convert\n * @returns A transaction ID string\n *\n * @example\n * import { voucherToTxId, createSignableVoucher } from \"@onflow/sdk\"\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Create a voucher from an interaction\n * const interaction = await fcl.build([\n *   fcl.transaction`\n *     transaction {\n *       prepare(account: AuthAccount) {\n *         log(\"Hello, Flow!\")\n *       }\n *     }\n *   `,\n *   fcl.proposer(authz),\n *   fcl.payer(authz),\n *   fcl.authorizations([authz])\n * ]);\n *\n * const voucher = createSignableVoucher(interaction);\n *\n * // Calculate the transaction ID\n * const txId = voucherToTxId(voucher);\n * console.log(\"Transaction ID:\", txId);\n * // Returns something like: \"a1b2c3d4e5f6789...\"\n *\n * // You can use this ID to track the transaction\n * const txStatus = await fcl.tx(txId).onceSealed();\n * console.log(\"Transaction status:\", txStatus);\n */\nexport const voucherToTxId = (voucher: Voucher) => {\n  return encodeTxIdFromVoucher(voucher)\n}\n"
  },
  {
    "path": "packages/sdk/src/response/README.md",
    "content": "# Response\n\nThis module provides an ADT (Abstract Data Type) that represents the underlying data returned from the send function.\n\n# Status\n\n- **Last Updated:** April 23rd 2021\n- **Stable:** Yes\n- **Risk of Breaking Change:** Low\n\nFairly Stable, nothing all that much here. Other modules sort of force this ones hands, because javascript.\n\n# Install\n\n```bash\nnpm install --save @onflow/sdk\n```\n\n{\n    \"tag\":null,\n    \"transaction\":null,\n    \"transactionStatus\":null,\n    \"transactionId\":null,\n    \"encodedData\":null,\n    \"events\":null,\n    \"account\":null,\n    \"block\":null,\n    \"blockHeader\":null,\n    \"latestBlock\":null,\n    \"collection\":null\n}\n\n## Internal Properties\n\n> The response is a monomorphic data structure. It has fields for each of the possible data that can be returned from the AccessAPI. The response tag corresponds to the tag of the interaction that generated the response.\n\n- **tag** _(all)_ `int` -- a marker that represents the type of the response. See @onflow/interaction for information on the possible tag values.\n- **transaction** _GetTransaction_ -- The response from a GetTransaction request.\n  - **script** `string` -- The Cadence code used to execute this transaction\n  - **args** `Array<string>` -- The arguments passed in to the transaction\n  - **referenceBlockId** `string` -- The reference block id for this transaction\n  - **gasLimit** -- The gas limit for the transaction\n  - **proposalKey** `Key`\n    - **sequenceNumber** - Sequence number of key used by the proposer of this transaction\n    - **keyId** - The ID of the key in the account used by the proposer of this transaction\n    - **address** - The address of the proposer of this transaction\n  - **payer** `string` -- Address of the payer of the transaction\n  - **proposer** `string` -- Address of the proposer of this transaction\n  - **authorizers** `Array<string>` -- Array of addresses of authorizers of this transaction\n  - **payloadSignatures** `Array<Signature>` -- The payload signatures for the transaction\n    - **sequenceNumber** `string` -- Sequence number of the key used to perform this signature\n    - **keyId** `number` -- ID of the key in the account used to perform this signature\n    - **signature** `string` -- The signature\n  - **envelopeSignatures** `Array<Signature>` -- The envelope signtaures for the transaction\n    - **sequenceNumber** `string` -- Sequence number of the key used to perform this signature\n    - **keyId** `number` -- ID of the key in the account used to perform this signature\n    - **signature** `string`-- The signature\n- **transactionStatus** _GetTransactionStatus_ -- The response from a GetTransactionStatus request.\n  - **blockId** `string` -- The ID of the Block the transaction is included in.\n  - **status** `int` -- The status of the transaction\n  - **statusCode** `int` -- The status code of the transaction\n  - **errorMessage** `string` -- The error message of the transaction\n  - **events** `Array<Event>` -- The events for this result\n    - **type** `string` -- The type of this event\n    - **transactionId** `int` -- The transactionId of this event\n    - **transactionIndex** `int` -- The transactionIndex of this event\n    - **eventIndex** `int` -- The index of this event\n    - **payload** `Uint8Array` -- The encoded JSON-CDC payload of this event.\n- **transactionId** _Transaction_ `string` -- The id of the transaction executed during a Transaction request.\n- **encodedData** _ExecuteScript_ `Uint8Array` -- The encoded JSON-CDC data returned from a ExecuteScript request.\n- **events** _GetEvents_ -- The events returned from a GetEvents request.\n  - **results** `Array<Result>` -- The results returned from a GetEvents request.\n    - **blockId** `int` -- The block id of this result\n    - **blockHeight** `int` -- The block height of this result\n    - **events** `Array<Event>` -- The events for this result\n      - **type** `string` -- The type of this event\n      - **transactionId** `int` -- The transactionId of this event\n      - **transactionIndex** `int` -- The transactionIndex of this event\n      - **eventIndex** `int` -- The index of this event\n      - **payload** `Uint8Array` -- The encoded JSON-CDC payload of this event.\n- **account** _GetAccount_ -- The account returned from a GetAccount request.\n  - **address** `string` -- The address of the account\n  - **code** `string` -- The code of the account\n  - **keys** `Array<Key>` -- The keys of the account\n    - **index** `int` -- The index of the key\n    - **publicKey** `string` -- The publicKey for this key\n    - **signAlgo** `int` -- The signing algorithm for this key\n    - **hashAlgo** `int` -- The hash algorithm for this key\n    - **weight** `int` -- The weight for this key\n    - **sequenceNumber** `int` -- The sequence number for this key\n- **block** _GetBlock_ -- The block returned from a GetBlock* request\n  - **id** `string` -- ID of the block\n  - **parentId** `string` -- Parent ID of the block\n  - **height** `number` -- Height of the block\n  - **timestamp** `string` -- ISO timestamp of the block\n  - **collectionGuarantees** `Array<CollectionGuarantee`\n    - **collectionId** `string` -- ID of the collection\n    - **signatures** `string` -- Signatures in the collection\n  - **blockSeals**\n    - **blockId** `string` -- ID of the block\n    - **executionReceiptId** `string` -- ID of the execution receipt\n    - **executionReceiptSignatures** `Array<string>` -- Execution receipt signatures\n    - **resultApprovalSignatures** `Array<string>` -- Result approval signatures\n  - **signatures** `Array<string>` -- Signatures included in this block\n- **blockHeader** _GetBlockHeader_  -- The block header returned from a GetBlockHeader request.\n  - **id** `string` -- ID of the block\n  - **parenId** `string` -- Parent ID of the block\n  - **height** `number` -- Height of the block\n  - **timestamp** `string` -- ISO timestamp of the block\n- **DEPRECATED: latestBlock**  _GetLastestBlock_  -- The block returned from a GetLatestBlock request. **DEPRECATED**\n  - **id** `string` -- ID of the block\n  - **parentId** `string` -- Parent ID of the block\n  - **height** `number` -- Height of the block\n  - **timestamp** `string` -- ISO timestamp of the block\n  - **collectionGuarantees** `Array<CollectionGuarantee`\n    - **collectionId** `string` -- ID of the collection\n    - **DEPRECATED: signatures** `string` -- Signatures in the collection\n  - **blockSeals**\n    - **blockId** `string` -- ID of the block\n    - **executionReceiptId** `string` -- ID of the execution receipt\n    - **DEPRECATED: executionReceiptSignatures** `Array<string>` -- Execution receipt signatures\n    - **DEPRECATED: resultApprovalSignatures** `Array<string>` -- Result approval signatures\n  - **DEPRECATED: signatures** `Array<string>` -- Signatures included in this block\n- **collection** _GetCollection_ -- The collection returned from a GetCollection request\n  - **id** `string` -- ID of the collection\n  - **transactionIds** `Array<string>` -- The ids of transactions included in the collection\n- **networkParameters** _GetNetworkParameters_ -- The network parameters returned from a GetNetworkParameters request\n  - **chainId** `string` -- ID of the blockchain\n\n## Exposed Functions\n\n- **Constructor**\n  - [response/0](#response0)\n\n```javascript\nimport {response} from \"@onflow/response\"\n\nconst res = response()\n```\n"
  },
  {
    "path": "packages/sdk/src/response/__snapshots__/response.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Response - Snapshot 1`] = `\n{\n  \"account\": null,\n  \"accountStatusEvent\": null,\n  \"block\": null,\n  \"blockDigest\": null,\n  \"blockHeader\": null,\n  \"collection\": null,\n  \"encodedData\": null,\n  \"event\": null,\n  \"events\": null,\n  \"heartbeat\": null,\n  \"latestBlock\": null,\n  \"networkParameters\": null,\n  \"nodeVersionInfo\": null,\n  \"streamConnection\": null,\n  \"tag\": null,\n  \"transaction\": null,\n  \"transactionId\": null,\n  \"transactionStatus\": null,\n}\n`;\n"
  },
  {
    "path": "packages/sdk/src/response/response.test.ts",
    "content": "import {response} from \"./response\"\n\ntest(\"Response - Snapshot\", async () => {\n  const resp = response()\n\n  expect(resp).toMatchSnapshot()\n})\n"
  },
  {
    "path": "packages/sdk/src/response/response.ts",
    "content": "const DEFAULT_RESPONSE = {\n  tag: null,\n  transaction: null,\n  transactionStatus: null,\n  transactionId: null,\n  encodedData: null,\n  events: null,\n  event: null,\n  accountStatusEvent: null,\n  account: null,\n  block: null,\n  blockHeader: null,\n  blockDigest: null,\n  latestBlock: null,\n  collection: null,\n  networkParameters: null,\n  streamConnection: null,\n  heartbeat: null,\n  nodeVersionInfo: null,\n}\n\n/**\n * Creates a default response object\n *\n * @returns A default response object\n *\n * @example\n * import { response } from \"@onflow/sdk\"\n *\n * // Create a default response object\n * const defaultResponse = response();\n * console.log(defaultResponse.transaction); // null\n * console.log(defaultResponse.account); // null\n * console.log(defaultResponse.block); // null\n *\n * // Typically used internally by the SDK to initialize responses\n * // You'll rarely need to use this directly in application code\n */\nexport const response = () => ({...DEFAULT_RESPONSE})\n"
  },
  {
    "path": "packages/sdk/src/sdk-client.ts",
    "content": "import {createContext, SdkClientOptions} from \"./context/context\"\nimport {createSend} from \"./transport/send/send\"\nimport {createSubscribe} from \"./transport/subscribe/subscribe\"\nimport {createSubscribeRaw} from \"./transport/subscribe/subscribe-raw\"\nimport {createAccount} from \"./account/account\"\nimport {createBlock} from \"./block/block\"\nimport {createResolve} from \"./resolve/resolve\"\nimport {createDecode} from \"./decode/sdk-decode\"\n\n/**\n * Creates an SDK client with the provided options.\n * @param options - Configuration options for the SDK client.\n * @returns A client object with methods to interact with the Flow blockchain.\n * @example\n * const client = createSdkClient({\n *  accessNodeUrl: \"https://rest-mainnet.onflow.org\",\n *  transport: myTransport,\n *  computeLimit: 1000,\n * })\n * client.send([myScript, myTransaction])\n *   .then(client.decode)\n *   .catch(error => console.error(\"Error sending request:\", error))\n */\nexport function createSdkClient(options: SdkClientOptions) {\n  const context = createContext(options)\n\n  return {\n    send: createSend(context),\n    subscribe: createSubscribe(context),\n    subscribeRaw: createSubscribeRaw(context),\n    account: createAccount(context),\n    block: createBlock(context),\n    resolve: createResolve(context),\n    decode: createDecode(context),\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/sdk.test.js",
    "content": "import assert from \"assert\"\nimport {\n  build,\n  resolve,\n  ref,\n  transaction,\n  limit,\n  proposer,\n  authorizations,\n  payer,\n  authorization,\n  VERSION,\n} from \"./sdk\"\n\ntest(\"fcl.VERSION needs to match version in package.json\", () => {\n  expect(VERSION).toBe(\"TESTVERSION\")\n})\n\ndescribe(\"build\", () => {\n  it(\"returns the correct limit when building a transaction\", async () => {\n    const one = await resolve(\n      await build([\n        transaction``,\n        limit(156),\n        proposer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        authorizations([\n          authorization(\"01\", () => ({signature: \"123\"}), 1, 123),\n        ]),\n        payer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        ref(\"123\"),\n      ])\n    )\n\n    const two = await resolve(\n      await build([\n        limit(156),\n        transaction``,\n        proposer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        authorizations([\n          authorization(\"01\", () => ({signature: \"123\"}), 1, 123),\n        ]),\n        payer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        ref(\"123\"),\n      ])\n    )\n\n    // console.log(\"one\", one)\n    // console.log(\"two\", two)\n\n    assert.equal(one.message.computeLimit, 156)\n    assert.equal(two.message.computeLimit, 156)\n    assert.deepEqual(one.message.limit, two.message.limit)\n  })\n\n  it(\"returns the correct proposer when building a transaction with a known proposer\", async () => {\n    const ix = await resolve(\n      await build([\n        transaction``,\n        proposer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        authorizations([\n          authorization(\"01\", () => ({signature: \"123\"}), 1, 123),\n        ]),\n        payer(authorization(\"01\", () => ({signature: \"123\"}), 1, 123)),\n        ref(\"123\"),\n      ])\n    )\n\n    const txProposer = ix.accounts[ix.proposer]\n\n    assert.deepEqual(txProposer.addr, \"01\")\n    assert.deepEqual(txProposer.keyId, 1)\n    assert.deepEqual(txProposer.sequenceNum, 123)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/sdk.ts",
    "content": "import * as logger from \"@onflow/util-logger\"\n// Base\nexport {build} from \"./build/build\"\nexport {resolve} from \"./resolve/resolve\"\nexport {\n  send,\n  subscribe,\n  subscribeRaw,\n  SubscriptionsNotSupportedError,\n} from \"./transport\"\nexport {decode} from \"./decode/sdk-decode\"\nexport {\n  encodeTransactionPayload,\n  encodeTransactionEnvelope,\n  encodeTxIdFromVoucher,\n} from \"./encode/encode\"\n\n// Utils\nexport {\n  interaction, // deprecated\n  initInteraction,\n  isOk,\n  isBad,\n  why,\n  pipe,\n  get,\n  put,\n  update,\n  destroy,\n  isUnknown,\n  isScript,\n  isTransaction,\n  isGetTransaction,\n  isGetTransactionStatus,\n  isGetAccount,\n  isGetEvents,\n  isPing,\n  isGetBlock,\n  isGetBlockHeader,\n  isGetCollection,\n  isGetNetworkParameters,\n  isGetNodeVersionInfo,\n} from \"./interaction/interaction\"\nimport type {CadenceArgument} from \"./interaction/interaction\"\nexport {CadenceArgument} // Workaround for babel https://github.com/babel/babel/issues/8361\nimport type {\n  InteractionBuilderFn,\n  AccountAuthorization,\n  AuthorizationFn,\n} from \"./interaction/interaction\"\nexport {InteractionBuilderFn, AccountAuthorization, AuthorizationFn}\n\nexport {createSignableVoucher, voucherToTxId} from \"./resolve/voucher\"\nexport {encodeMessageFromSignable} from \"./wallet-utils/encode-signable\"\nexport {template as cadence} from \"@onflow/util-template\"\nexport {template as cdc} from \"@onflow/util-template\"\n\nimport type {\n  Voucher,\n  Signable,\n  PayloadSig,\n} from \"./wallet-utils/encode-signable\"\nexport {Voucher, Signable, PayloadSig}\n\n// Helpers\nexport {account} from \"./account/account\"\nexport {block} from \"./block/block\"\nexport {nodeVersionInfo} from \"./node-version-info/node-version-info\"\n\n// Builders\nexport {authorizations, authorization} from \"./build/build-authorizations\"\nexport {atBlockHeight} from \"./build/build-at-block-height\"\nexport {atBlockId} from \"./build/build-at-block-id\"\nexport {atLatestBlock} from \"./build/build-at-latest-block\"\nexport {getAccount} from \"./build/build-get-account\"\nexport {getEvents} from \"./build/build-get-events\"\nexport {getEventsAtBlockHeightRange} from \"./build/build-get-events-at-block-height-range\"\nexport {getEventsAtBlockIds} from \"./build/build-get-events-at-block-ids\"\nexport {getBlock} from \"./build/build-get-block\"\nexport {getBlockHeader} from \"./build/build-get-block-header\"\nexport {getCollection} from \"./build/build-get-collection\"\nexport {getTransactionStatus} from \"./build/build-get-transaction-status\"\nexport {getTransaction} from \"./build/build-get-transaction\"\nexport {getNetworkParameters} from \"./build/build-get-network-parameters\"\nexport {getNodeVersionInfo} from \"./build/build-get-node-version-info\"\nexport {limit} from \"./build/build-limit\"\nexport {args, arg} from \"./build/build-arguments\"\nexport {proposer} from \"./build/build-proposer\"\nexport {payer} from \"./build/build-payer\"\nexport {ping} from \"./build/build-ping\"\nexport {ref} from \"./build/build-ref\"\nexport {script} from \"./build/build-script\"\nexport {transaction} from \"./build/build-transaction\"\nexport {validator} from \"./build/build-validator\"\nexport {invariant} from \"./build/build-invariant\"\nexport {voucherIntercept} from \"./build/build-voucher-intercept\"\nexport {subscribeEvents} from \"./build/build-subscribe-events\"\n\n// Resolvers\nexport {resolveCadence} from \"./resolve/resolve-cadence\"\nexport {resolveFinalNormalization} from \"./resolve/resolve-final-normalization\"\nexport {resolveProposerSequenceNumber} from \"./resolve/resolve-proposer-sequence-number\"\nexport {resolveArguments} from \"./resolve/resolve-arguments\"\nexport {resolveAccounts} from \"./resolve/resolve-accounts\"\nexport {response} from \"./response/response\"\nexport {resolveSignatures} from \"./resolve/resolve-signatures\"\nexport {resolveValidators} from \"./resolve/resolve-validators\"\nexport {resolveRefBlockId} from \"./resolve/resolve-ref-block-id\"\nexport {resolveVoucherIntercept} from \"./resolve/resolve-voucher-intercept\"\n\nexport {config} from \"@onflow/config\"\n\n/**\n * Legacy function for setting parameters on an interaction.\n *\n * @deprecated This function has been removed. Use `args` instead.\n *\n * @param params The parameters to set\n */\nexport const params = (params: never) =>\n  logger.log.deprecate({\n    pkg: \"FCL/SDK\",\n    message: `The params builder has been removed from the Flow JS-SDK/FCL.`,\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\",\n    level: logger.LEVELS.error,\n  })\n\n/**\n * Legacy function for setting a single parameter on an interaction.\n *\n * @deprecated This function has been removed. Use `arg` instead.\n *\n * @param params The parameter to set\n */\nexport const param = (params: never) =>\n  logger.log.deprecate({\n    pkg: \"FCL/SDK\",\n    message: `The param builder has been removed from the Flow JS-SDK/FCL.`,\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\",\n    level: logger.LEVELS.error,\n  })\n\nimport * as TestUtils from \"./test-utils\"\nexport {TestUtils}\n\nexport {VERSION} from \"./VERSION\"\n\nexport {flowMainnet, flowTestnet, flowEmulator} from \"./constants\"\n\nexport * from \"@onflow/typedefs\"\n\nimport * as types from \"@onflow/types\"\nexport {types as t}\n\nexport {createSdkClient} from \"./sdk-client\"\nexport {type SdkClientOptions} from \"./context/context\"\n"
  },
  {
    "path": "packages/sdk/src/test-utils/authz-fn.ts",
    "content": "import {InteractionAccount} from \"@onflow/typedefs\"\nimport {withPrefix} from \"@onflow/util-address\"\n\n/**\n * Generates a unique identifier for an account based on its address and key ID.\n *\n * @param acct The account object\n * @returns A string identifier in the format \"address-keyId\"\n */\nexport const idof = (acct: InteractionAccount) =>\n  `${withPrefix(acct.addr)}-${acct.keyId}`\n\n/**\n * Generates a test signature string for an account.\n *\n * @param opts Partial account object containing address and keyId\n * @returns A test signature string in the format \"SIGNATURE.address.keyId\"\n */\nexport function sig(opts: Partial<InteractionAccount>) {\n  return [\"SIGNATURE\", opts.addr, opts.keyId].join(\".\")\n}\n\ninterface IAuthzOpts {\n  signingFunction?: (signable: any) => any\n}\n\n/**\n * Creates a test authorization function for testing transactions.\n *\n * @param opts Optional configuration including custom signing function\n * @returns An authorization function that can be used in tests\n */\nexport function authzFn(opts: IAuthzOpts = {}) {\n  return function (account: Partial<InteractionAccount>) {\n    const acct: Partial<InteractionAccount> = {\n      ...account,\n      ...opts,\n      resolve: null,\n      signingFunction:\n        opts.signingFunction ||\n        account.signingFunction ||\n        fallbackSigningFunction,\n    }\n\n    return acct\n\n    function fallbackSigningFunction(_signable: any) {\n      return {\n        addr: acct.addr,\n        keyId: acct.keyId,\n        signature: sig(acct),\n      }\n    }\n  }\n}\n\ninterface IAuthzResolveOpts {\n  tempId?: string\n}\n\n/**\n * Creates a test authorization resolver that can be used for testing account resolution.\n *\n * @param opts Optional configuration including temporary ID\n * @returns A function that returns an account with resolve capability\n */\nexport function authzResolve(opts: IAuthzResolveOpts = {}) {\n  return function (account: InteractionAccount) {\n    const {tempId, ...rest} = opts\n    return {\n      ...account,\n      tempId: tempId || \"WITH_RESOLVE\",\n      resolve: authzFn(rest),\n    }\n  }\n}\n\nconst ROLE = {proposer: false, authorizer: false, payer: false}\nconst noop = () => {}\n\ninterface IAuthzResolveMany {\n  tempId?: string\n  authorizations: any[]\n  proposer?: any\n  payer?: any\n}\n\n/**\n * Creates a test authorization resolver that handles multiple accounts with different roles.\n *\n * @param opts Configuration including authorizations array and optional proposer/payer\n * @returns A function that returns an account with multi-role resolve capability\n */\nexport function authzResolveMany(\n  opts: IAuthzResolveMany = {authorizations: []}\n) {\n  return function (account: InteractionAccount): InteractionAccount {\n    const tempId = opts.tempId || \"AUTHZ_RESOLVE_MANY\"\n    return {\n      ...account,\n      tempId,\n      resolve: () =>\n        [\n          opts.proposer &&\n            authzFn(opts.proposer)({role: {...ROLE, proposer: true}}),\n          ...opts.authorizations\n            .map(authzFn)\n            .map(d => d({role: {...ROLE, authorizer: true}})),\n          opts.payer && authzFn(opts.payer)({role: {...ROLE, payer: true}}),\n        ].filter(Boolean),\n    }\n  }\n}\n\n/**\n * Creates a deep test authorization resolver with nested resolution for complex testing scenarios.\n *\n * @param opts Configuration including authorizations array and optional proposer/payer\n * @param depth The depth of nesting for the resolver (default: 1)\n * @returns A function that returns an account with deep nested resolve capability\n */\nexport function authzDeepResolveMany(\n  opts: IAuthzResolveMany = {authorizations: []},\n  depth = 1\n) {\n  return function (account: InteractionAccount): InteractionAccount {\n    const tempId = opts.tempId || \"AUTHZ_DEEP_RESOLVE_MANY\"\n    return {\n      ...account,\n      tempId,\n      resolve:\n        depth > 0\n          ? authzDeepResolveMany(opts, depth - 1)(account).resolve\n          : authzResolveMany(opts)(account).resolve,\n    }\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/test-utils/index.ts",
    "content": "export {mockSend} from \"./mock-send\"\nexport {\n  authzFn,\n  authzResolve,\n  authzResolveMany,\n  authzDeepResolveMany,\n  sig,\n  idof,\n} from \"./authz-fn\"\nexport {run} from \"./run\"\n"
  },
  {
    "path": "packages/sdk/src/test-utils/mock-send.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {isGetAccount, isGetBlock} from \"../interaction/interaction\"\n\nexport function mockAccountResponse(ix, numberOfKeys = 5) {\n  // prettier-ignore\n  invariant(ix.account, \"mockAccountResponse(ix) -- ix.account is missing\", ix)\n  // prettier-ignore\n  invariant( ix.account.addr, \"mockAccountResponse(ix) -- ix.account.addr is missing\", ix)\n\n  const address = ix.account.addr\n\n  return {\n    account: {\n      addr: address,\n      keys: Array.from({length: numberOfKeys}, (_, i) => ({\n        index: i,\n        sequenceNumber: 42,\n      })),\n    },\n  }\n}\n\nexport function mockGetBlockResponse(ix) {\n  return {\n    tag: \"GET_BLOCK\",\n    block: {\n      id: \"32\",\n    },\n  }\n}\n\nconst identity = v => v\n\nexport function mockSend(fallback = identity) {\n  return async function execSend(ix) {\n    ix = await ix\n    switch (true) {\n      case isGetAccount(ix):\n        return mockAccountResponse(ix)\n\n      case isGetBlock(ix):\n        return mockGetBlockResponse(ix)\n\n      default:\n        return fallback(ix)\n    }\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/test-utils/run.ts",
    "content": "import {build} from \"../build/build\"\nimport {resolve} from \"../resolve/resolve\"\nimport {ref} from \"../build/build-ref\"\nimport {Interaction} from \"@onflow/typedefs\"\n\n/**\n * Runs a set of functions on an interaction\n *\n * This is a utility function for testing that builds and resolves an interaction with the provided builder functions.\n * It automatically adds a reference block and then resolves the interaction for testing purposes.\n *\n * @param fns An array of functions to run on the interaction\n * @returns A promise that resolves to the resolved interaction\n *\n * @example\n * import { run } from \"@onflow/sdk\"\n * import * as fcl from \"@onflow/fcl\";\n *\n * // Test a simple script interaction\n * const result = await run([\n *   fcl.script`\n *     access(all) fun main(): Int {\n *       return 42\n *     }\n *   `\n * ]);\n *\n * console.log(result.cadence); // The Cadence script\n * console.log(result.tag); // \"SCRIPT\"\n *\n * // Test a transaction with arguments\n * const txResult = await run([\n *   fcl.transaction`\n *     transaction(amount: UFix64) {\n *       prepare(account: AuthAccount) {\n *         log(amount)\n *       }\n *     }\n *   `,\n *   fcl.args([fcl.arg(\"10.0\", fcl.t.UFix64)])\n * ]);\n *\n * console.log(txResult.message.arguments); // The resolved arguments\n */\nexport const run = (\n  fns: Array<(ix: Interaction) => Interaction | Promise<Interaction>> = []\n) => build([ref(\"123\"), ...fns]).then(resolve)\n"
  },
  {
    "path": "packages/sdk/src/transport/index.ts",
    "content": "export {send} from \"./send/send\"\nexport {subscribe} from \"./subscribe/subscribe\"\nexport {subscribeRaw} from \"./subscribe/subscribe-raw\"\nexport {SubscriptionsNotSupportedError} from \"./subscribe/errors\"\nexport * from \"./subscribe/types\"\n"
  },
  {
    "path": "packages/sdk/src/transport/send/send.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(1).toBe(1)\n})\n"
  },
  {
    "path": "packages/sdk/src/transport/send/send.ts",
    "content": "import {Buffer} from \"@onflow/rlp\"\nimport {initInteraction, pipe} from \"../../interaction/interaction\"\nimport * as ixModule from \"../../interaction/interaction\"\nimport {InteractionBuilderFn} from \"../../interaction/interaction\"\nimport {response} from \"../../response/response\"\nimport {SdkContext} from \"../../context/context\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {withGlobalContext} from \"../../context/global\"\nimport {createResolve} from \"../../resolve/resolve\"\n\nexport function createSend(context: SdkContext) {\n  async function send(\n    args:\n      | (InteractionBuilderFn | false)\n      | (InteractionBuilderFn | false)[] = [],\n    opts: any = {}\n  ): Promise<any> {\n    const transport = opts.transport || context.transport\n    const sendFn = transport.send?.bind?.(transport)\n    invariant(\n      !!sendFn,\n      `Required value for sdk.transport is not defined in config. See: ${\"https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21\"}`\n    )\n\n    const resolveFn =\n      opts.resolve || context.customResolver || createResolve(context)\n\n    opts.node = opts.node || context.accessNodeUrl\n\n    if (Array.isArray(args)) args = pipe(initInteraction(), args) as any\n    return sendFn(await resolveFn(args), {response, ix: ixModule, Buffer}, opts)\n  }\n\n  return send\n}\n\n/**\n * Sends arbitrary scripts, transactions, and requests to Flow.\n *\n * This method consumes an array of builders that are to be resolved and sent. The builders required to be included in the array depend on the interaction that is being built.\n *\n * WARNING: Must be used in conjunction with 'fcl.decode(response)' to get back correct keys and all values in JSON.\n *\n * @param args An array of builders (functions that take an interaction object and return a new interaction object)\n * @param opts Additional optional options for the request\n * @param opts.node Custom node endpoint to use for this request\n * @param opts.resolve Custom resolve function to use for processing the interaction\n * @returns A promise that resolves to a ResponseObject containing the data returned from the chain. Should always be decoded with fcl.decode() to get back appropriate JSON keys and values.\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // a script only needs to resolve the arguments to the script\n * const response = await fcl.send([fcl.script`${script}`, fcl.args(args)]);\n * // note: response values are encoded, call await fcl.decode(response) to get JSON\n *\n * // a transaction requires multiple 'builders' that need to be resolved prior to being sent to the chain - such as setting the authorizations.\n * const response = await fcl.send([\n *   fcl.transaction`\n *     ${transaction}\n *   `,\n *   fcl.args(args),\n *   fcl.proposer(proposer),\n *   fcl.authorizations(authorizations),\n *   fcl.payer(payer),\n *   fcl.limit(9999)\n * ]);\n * // note: response contains several values\n */\nexport const send = /* @__PURE__ */ withGlobalContext(createSend)\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/errors.ts",
    "content": "export class SubscriptionsNotSupportedError extends Error {\n  constructor() {\n    super(\n      `The current transport does not support subscriptions.  If you have provided a custom transport (e.g. via \\`sdk.transport\\` configuration), ensure that it implements the subscribe method.`\n    )\n    this.name = \"SubscriptionsNotSupportedError\"\n  }\n}\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/subscribe-raw.test.ts",
    "content": "import {subscribeRaw} from \"./subscribe-raw\"\nimport {\n  Subscription,\n  SubscriptionArgs,\n  SubscriptionTopic,\n} from \"@onflow/typedefs\"\nimport {createContext} from \"../../context/context\"\nimport {getGlobalContext} from \"../../context/global\"\n\njest.mock(\"../../context/global\")\n\ndescribe(\"subscribe\", () => {\n  beforeEach(() => {\n    jest.resetAllMocks()\n  })\n\n  test(\"subscribes to a topic and returns subscription from transport\", async () => {\n    const mockSub: jest.Mocked<Subscription> = {\n      unsubscribe: jest.fn(),\n    }\n    const mockTransport = {\n      subscribe: jest.fn().mockReturnValue(mockSub),\n      send: jest.fn(),\n    }\n    const context = createContext({\n      transport: mockTransport,\n      accessNodeUrl: \"http://localhost:8080\",\n      computeLimit: 1000,\n    })\n    jest.mocked(getGlobalContext).mockResolvedValue(context)\n\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const sub = subscribeRaw({topic, args, onData, onError})\n    await new Promise(setImmediate)\n\n    expect(mockTransport.subscribe).toHaveBeenCalledTimes(1)\n    expect(mockTransport.subscribe).toHaveBeenCalledWith(\n      {topic, args, onData: onData, onError},\n      {node: \"http://localhost:8080\"}\n    )\n\n    // Ensure that unsubscribe calls the transport's unsubscribe method\n    sub.unsubscribe()\n    await new Promise(setImmediate)\n    expect(mockSub.unsubscribe).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"reports error from global context\", async () => {\n    jest.mocked(getGlobalContext).mockRejectedValue(new Error(\"Test Error\"))\n\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    subscribeRaw({topic, args, onData, onError})\n    await new Promise(setImmediate)\n\n    expect(onError).toHaveBeenCalledTimes(1)\n    expect(onError).toHaveBeenCalledWith(new Error(\"Test Error\"))\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/subscribe-raw.ts",
    "content": "import {SdkTransport, SubscriptionTopic} from \"@onflow/typedefs\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {SubscribeRawParams} from \"./types\"\nimport {SdkContext} from \"../../context/context\"\nimport {getGlobalContext} from \"../../context/global\"\n\nexport function createSubscribeRawAsync(\n  contextPromise: Promise<SdkContext> | SdkContext\n) {\n  /**\n   * Subscribe to a topic without decoding the data.\n   * @param params - The parameters for the subscription.\n   * @param opts - Additional options for the subscription.\n   * @returns A promise that resolves once the subscription is active.\n   */\n  function subscribeRaw<T extends SubscriptionTopic>(\n    {topic, args, onData, onError}: SubscribeRawParams<T>,\n    opts: {\n      node?: string\n      transport?: SdkTransport\n    } = {}\n  ) {\n    async function subscribe() {\n      try {\n        const context = await contextPromise\n        const transport = opts.transport || context.transport\n        const node = opts.node || context.accessNodeUrl\n\n        invariant(\n          !!node,\n          `SDK Send Error: Either opts.node or \"accessNode.api\" in config must be defined.`\n        )\n\n        // Subscribe using the resolved transport\n        return transport.subscribe(\n          {\n            topic,\n            args,\n            onData,\n            onError,\n          },\n          {\n            node,\n            ...opts,\n          }\n        )\n      } catch (e) {\n        onError(e instanceof Error ? e : new Error(String(e)))\n        return\n      }\n    }\n\n    let subscriptionPromise = subscribe()\n    return {\n      unsubscribe: () => {\n        subscriptionPromise.then(sub => sub?.unsubscribe?.())\n      },\n    }\n  }\n\n  return subscribeRaw\n}\n\nexport function createSubscribeRaw(context: SdkContext) {\n  return createSubscribeRawAsync(context)\n}\n\n/**\n * Subscribe to a topic without decoding the data.\n *\n * This function creates a raw subscription to Flow blockchain data streams without automatic decoding.\n * It's useful when you need more control over data processing or want to handle raw responses directly.\n * For most use cases, consider using the `subscribe()` function instead which provides automatic decoding.\n *\n * Available topics include: `events`, `blocks`, `block_headers`, `block_digests`, `transaction_statuses`, `account_statuses`.\n *\n * @param params The parameters for the subscription including topic, arguments, and callbacks\n * @param params.topic The subscription topic (e.g., 'events', 'blocks', 'transaction_statuses')\n * @param params.args Parameters specific to the topic (e.g., event types, block height, transaction ID)\n * @param params.onData Callback function called with raw data when new messages are received\n * @param params.onError Callback function called if an error occurs during the subscription\n * @param opts Additional options for the subscription\n * @param opts.node Custom node endpoint to be used for the subscription\n * @param opts.transport Custom transport implementation for handling the connection\n * @returns A subscription object with an unsubscribe method\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { SubscriptionTopic } from \"@onflow/sdk\";\n *\n * // Subscribe to raw event data without automatic decoding\n * const rawSubscription = fcl.subscribeRaw({\n *   topic: SubscriptionTopic.EVENTS,\n *   args: {\n *     eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"]\n *   },\n *   onData: (rawData) => {\n *     console.log(\"Raw event data:\", rawData);\n *     // Handle raw data manually - no automatic decoding\n *   },\n *   onError: (error) => {\n *     console.error(\"Raw subscription error:\", error);\n *   }\n * });\n *\n * // Subscribe to raw block data\n * const blockSubscription = fcl.subscribeRaw({\n *   topic: SubscriptionTopic.BLOCKS,\n *   args: {\n *     blockStatus: \"finalized\"\n *   },\n *   onData: (rawBlock) => {\n *     console.log(\"Raw block data:\", rawBlock);\n *   },\n *   onError: (error) => {\n *     console.error(\"Error:\", error);\n *   }\n * });\n *\n * // Unsubscribe when done\n * rawSubscription.unsubscribe();\n */\nexport function subscribeRaw<T extends SubscriptionTopic>(\n  {topic, args, onData, onError}: SubscribeRawParams<T>,\n  opts: {\n    node?: string\n    transport?: SdkTransport\n  } = {}\n) {\n  const contextPromise = getGlobalContext()\n  return createSubscribeRawAsync(contextPromise)(\n    {\n      topic,\n      args,\n      onData,\n      onError,\n    },\n    opts\n  )\n}\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/subscribe.test.ts",
    "content": "import {\n  Subscription,\n  SubscriptionArgs,\n  SubscriptionTopic,\n  SdkTransport,\n} from \"@onflow/typedefs\"\nimport {subscribe} from \"./subscribe\"\nimport {createSubscribeRawAsync} from \"./subscribe-raw\"\n\njest.mock(\"./subscribe-raw\")\njest.mock(\"../../context/global\")\n\ndescribe(\"subscribe\", () => {\n  let mockSub: jest.Mocked<Subscription> = {\n    unsubscribe: jest.fn(),\n  }\n\n  beforeEach(() => {\n    jest.resetAllMocks()\n    jest\n      .mocked(createSubscribeRawAsync)\n      .mockReturnValueOnce(jest.fn().mockReturnValue(mockSub))\n  })\n\n  test(\"subscribes to a topic and returns a subscription\", async () => {\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const sub = subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    const mockSubscribedRaw = jest.mocked(createSubscribeRawAsync).mock\n      .results[0].value\n\n    expect(sub).toBe(mockSub)\n    expect(mockSubscribedRaw).toHaveBeenCalledTimes(1)\n    expect(mockSubscribedRaw).toHaveBeenCalledWith(\n      {topic, args, onData: expect.any(Function), onError},\n      {}\n    )\n  })\n\n  test(\"unsubscribes from a subscription\", async () => {\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const sub = subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    sub.unsubscribe()\n\n    expect(mockSub.unsubscribe).toHaveBeenCalledTimes(1)\n  })\n\n  test(\"subscribes to a topic with a node\", async () => {\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const node = \"http://localhost:8080\"\n\n    const sub = subscribe(\n      {\n        topic,\n        args,\n        onData,\n        onError,\n      },\n      {node}\n    )\n\n    const mockSubscribedRaw = jest.mocked(createSubscribeRawAsync).mock\n      .results[0].value\n\n    expect(sub).toBe(mockSub)\n    expect(mockSubscribedRaw).toHaveBeenCalledTimes(1)\n    expect(mockSubscribedRaw).toHaveBeenCalledWith(\n      {topic, args, onData: expect.any(Function), onError},\n      {node}\n    )\n  })\n\n  test(\"subscribes to a topic with custom node and transport\", async () => {\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {foo: \"bar\"} as SubscriptionArgs<any>\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const node = \"http://localhost:8080\"\n    const transport = {\n      send: jest.fn(),\n      subscribe: jest.fn().mockResolvedValue(mockSub),\n    } as jest.Mocked<SdkTransport>\n\n    const sub = subscribe(\n      {\n        topic,\n        args,\n        onData,\n        onError,\n      },\n      {node, transport}\n    )\n\n    const mockSubscribedRaw = jest.mocked(createSubscribeRawAsync).mock\n      .results[0].value\n\n    expect(sub).toBe(mockSub)\n    expect(mockSubscribedRaw).toHaveBeenCalledTimes(1)\n    expect(mockSubscribedRaw).toHaveBeenCalledWith(\n      {topic, args, onData: expect.any(Function), onError},\n      {node, transport}\n    )\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/subscribe.ts",
    "content": "import {SdkTransport, Subscription, SubscriptionTopic} from \"@onflow/typedefs\"\nimport {createSubscribeRawAsync} from \"./subscribe-raw\"\nimport {decodeResponse} from \"../../decode/decode\"\nimport {SubscribeParams} from \"./types\"\nimport {SdkContext} from \"../../context/context\"\nimport {getGlobalContext} from \"../../context/global\"\n\nexport function createSubscribeAsync(\n  contextPromise: Promise<SdkContext> | SdkContext\n) {\n  /**\n   * Subscribe to a topic and decode the data.\n   * @param params - The parameters for the subscription.\n   * @param opts - Additional options for the subscription.\n   * @returns A promise that resolves when the subscription is active.\n   */\n  function subscribe<T extends SubscriptionTopic>(\n    {topic, args, onData, onError}: SubscribeParams<T>,\n    opts: {\n      node?: string\n      transport?: SdkTransport\n    } = {}\n  ): Subscription {\n    const sub = createSubscribeRawAsync(contextPromise)(\n      {\n        topic,\n        args,\n        onData: data => {\n          decodeResponse(data)\n            .then(onData)\n            .catch(e => {\n              onError(new Error(`Failed to decode response: ${e.message}`))\n              sub?.unsubscribe?.()\n            })\n        },\n        onError,\n      },\n      opts\n    )\n\n    return sub\n  }\n\n  return subscribe\n}\n\nexport function createSubscribe(context: SdkContext) {\n  return createSubscribeAsync(context)\n}\n\n/**\n * Subscribe to real-time data from the Flow blockchain and automatically decode the responses.\n *\n * This is a utility function used for subscribing to real-time data from the WebSocket Streaming API. Data returned will be automatically decoded via the 'decode' function.\n *\n * Available topics include: `events`, `blocks`, `block_headers`, `block_digests`, `transaction_statuses`, `account_statuses`.\n *\n * @param params The parameters for the subscription including topic, arguments, and callbacks\n * @param params.topic The subscription topic (e.g., 'events', 'blocks', 'transaction_statuses')\n * @param params.args Parameters specific to the topic (e.g., event types, block height, transaction ID)\n * @param params.onData Callback function called with decoded data when new messages are received\n * @param params.onError Callback function called if an error occurs during the subscription\n * @param opts Additional options for the subscription\n * @param opts.node Custom node endpoint to be used for the subscription\n * @param opts.transport Custom transport implementation for handling the connection\n * @returns A subscription object that allows you to manage the subscription (e.g., to unsubscribe later)\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n * import { SubscriptionTopic } from \"@onflow/sdk\";\n *\n * // Subscribe to events\n * const subscription = fcl.subscribe({\n *   topic: SubscriptionTopic.EVENTS,\n *   args: {\n *     eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"]\n *   },\n *   onData: (events) => {\n *     console.log(\"Received events:\", events);\n *   },\n *   onError: (error) => {\n *     console.error(\"Subscription error:\", error);\n *   }\n * });\n *\n * // Subscribe to blocks\n * const blockSubscription = fcl.subscribe({\n *   topic: SubscriptionTopic.BLOCKS,\n *   args: {\n *     blockStatus: \"finalized\"\n *   },\n *   onData: (block) => {\n *     console.log(\"New block:\", block);\n *   },\n *   onError: (error) => {\n *     console.error(\"Block subscription error:\", error);\n *   }\n * });\n *\n * // Later, to unsubscribe:\n * subscription.unsubscribe();\n * blockSubscription.unsubscribe();\n */\nexport function subscribe<T extends SubscriptionTopic>(\n  {topic, args, onData, onError}: SubscribeParams<T>,\n  opts: {\n    node?: string\n    transport?: SdkTransport\n  } = {}\n): Subscription {\n  const contextPromise = getGlobalContext()\n  const sub = createSubscribeRawAsync(contextPromise)(\n    {\n      topic,\n      args,\n      onData: data => {\n        decodeResponse(data)\n          .then(onData)\n          .catch(e => {\n            onError(new Error(`Failed to decode response: ${e.message}`))\n            sub?.unsubscribe?.()\n          })\n      },\n      onError,\n    },\n    opts\n  )\n\n  return sub\n}\n"
  },
  {
    "path": "packages/sdk/src/transport/subscribe/types.ts",
    "content": "import {\n  SubscriptionTopic,\n  SubscriptionData,\n  SubscriptionArgs,\n  RawSubscriptionData,\n} from \"@onflow/typedefs\"\n\nexport type SubscribeParams<T extends SubscriptionTopic> = {\n  /**\n   * The topic to subscribe to.\n   */\n  topic: T\n  /**\n   * The arguments for the subscription.\n   */\n  args: SubscriptionArgs<T>\n  /**\n   * The callback to call when data is received.\n   */\n  onData: (data: SubscriptionData<T>) => void\n  /**\n   * The callback to call when a fatal error occurs.\n   */\n  onError: (error: Error) => void\n}\n\nexport type SubscribeRawParams<T extends SubscriptionTopic> = {\n  /**\n   * The topic to subscribe to.\n   */\n  topic: T\n  /**\n   * The arguments for the subscription.\n   */\n  args: SubscriptionArgs<T>\n  /**\n   * The callback to call when data is received.\n   */\n  onData: (data: RawSubscriptionData<T>) => void\n  /**\n   * The callback to call when a fatal error occurs.\n   */\n  onError: (error: Error) => void\n}\n"
  },
  {
    "path": "packages/sdk/src/wallet-utils/encode-signable.test.ts",
    "content": "import {\n  encodeMessageFromSignable,\n  UnableToDetermineMessageEncodingTypeForSignerAddress,\n} from \"./encode-signable\"\nimport {\n  encodeTransactionPayload as encodeInsideMessage,\n  encodeTransactionEnvelope as encodeOutsideMessage,\n} from \"../encode/encode\"\n\nconst MESSAGE = {\n  cadence: \"transaction()...\",\n  computeLimit: 156,\n  refBlock: \"123\",\n  arguments: [],\n  proposalKey: {address: \"02\", keyId: 1, sequenceNum: 123},\n  payer: \"01\",\n  authorizers: [\"02\"],\n  payloadSigs: [{address: \"02\", keyId: 1, sig: \"123\"}],\n}\n\nconst encodedPayerMessage = encodeOutsideMessage(MESSAGE)\nconst encodedNonPayerMessage = encodeInsideMessage(MESSAGE)\n\nconst VOUCHER = {\n  cadence: \"transaction()...\",\n  computeLimit: 156,\n  refBlock: \"123\",\n  arguments: [],\n  proposalKey: {address: \"0x02\", keyId: 1, sequenceNum: 123},\n  payer: \"0x01\",\n  authorizers: [\"0x02\"],\n  payloadSigs: [{address: \"0x02\", keyId: 1, sig: \"123\"}],\n}\n\nconst PAYER_SIGNABLE = {\n  f_type: \"Signable\",\n  message: encodedPayerMessage,\n  roles: {proposer: false, authorizer: false, payer: true, param: false},\n  interaction: {\n    tag: \"TRANSACTION\",\n  },\n  voucher: VOUCHER,\n}\n\nconst NON_PAYER_SIGNABLE = {\n  f_type: \"Signable\",\n  message: encodedNonPayerMessage,\n  roles: {proposer: true, authorizer: false, payer: false, param: false},\n  interaction: {\n    tag: \"TRANSACTION\",\n  },\n  voucher: VOUCHER,\n}\n\ndescribe(\"encode signable\", () => {\n  test(\"encode signable for payer included in signable\", () => {\n    const message = encodeMessageFromSignable(PAYER_SIGNABLE, \"0x01\")\n\n    expect(message).toBe(PAYER_SIGNABLE.message)\n  })\n\n  test(\"encode signable for non-payer included in signable\", () => {\n    const message = encodeMessageFromSignable(NON_PAYER_SIGNABLE, \"0x02\")\n\n    expect(message).toBe(NON_PAYER_SIGNABLE.message)\n  })\n\n  test(\"encode signable for address NOT included in signable\", () => {\n    const runTest = () => {\n      return encodeMessageFromSignable(NON_PAYER_SIGNABLE, \"0x09\")\n    }\n\n    expect(runTest).toThrow(\n      UnableToDetermineMessageEncodingTypeForSignerAddress\n    )\n  })\n\n  test(\"payload sig extensionData is forwarded for envelope encoding\", () => {\n    const withExt = {\n      ...VOUCHER,\n      payloadSigs: [\n        {address: \"0x02\", keyId: 1, sig: \"123\", extensionData: \"abcd\"},\n      ],\n    }\n\n    const signable = {\n      ...PAYER_SIGNABLE,\n      voucher: withExt,\n    }\n\n    // Should not throw when encoding envelope including an extension on payload sig\n    const message = encodeMessageFromSignable(signable as any, \"0x01\")\n    expect(typeof message).toBe(\"string\")\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/wallet-utils/encode-signable.ts",
    "content": "import {withPrefix, sansPrefix} from \"@onflow/util-address\"\nimport {\n  encodeTransactionPayload,\n  encodeTransactionEnvelope,\n} from \"../encode/encode\"\n\nexport interface PayloadSig {\n  address: string\n  keyId: number | string\n  sig: string\n  [key: string]: any\n}\n\nexport interface Voucher {\n  authorizers: string[]\n  proposalKey: {\n    address: string\n    keyId?: number | string\n    sequenceNum?: number\n    [key: string]: any\n  }\n  payer: string\n  cadence: string\n  refBlock: string\n  computeLimit: number\n  arguments: any[]\n  payloadSigs: PayloadSig[]\n}\n\nexport interface Signable {\n  message: string\n  addr?: string\n  keyId?: number\n  signature?: string\n  roles: Record<string, boolean>\n  voucher: Voucher\n  [key: string]: any\n}\n\nconst findPayloadSigners = (voucher: Voucher): string[] => {\n  // Payload Signers Are: (authorizers + proposer) - payer\n  const payload: Set<string> = new Set(voucher.authorizers)\n  payload.add(voucher.proposalKey.address)\n  payload.delete(voucher.payer)\n  return Array.from(payload).map(addr => withPrefix(addr))\n}\n\nconst findEnvelopeSigners = (voucher: Voucher): string[] => {\n  // Envelope Signers Are: (payer)\n  const envelope: Set<string> = new Set([voucher.payer])\n  return Array.from(envelope).map(addr => withPrefix(addr))\n}\n\nexport class UnableToDetermineMessageEncodingTypeForSignerAddress extends Error {\n  constructor(signerAddress: string) {\n    const msg = `\n        Encode Message From Signable Error: Unable to determine message encoding for signer addresss: ${signerAddress}. \n        Please ensure the address: ${signerAddress} is intended to sign the given transaction as specified by the transaction signable.\n      `.trim()\n    super(msg)\n    this.name = \"Unable To Determine Message Encoding For Signer Addresss\"\n  }\n}\n\n/**\n * Encodes a message from a signable object for a specific signer address.\n *\n * This function determines whether the signer should sign the transaction payload or envelope\n * based on their role in the transaction (authorizer, proposer, or payer), then encodes the\n * appropriate message for signing.\n *\n * Payload signers include authorizers and proposers (but not payers)\n * Envelope signers include only payers\n *\n * The encoded message is what gets signed by the account's private key to create the transaction signature.\n *\n * @param signable The signable object containing transaction data and voucher\n * @param signerAddress The address of the signer to encode the message for\n * @returns An encoded message string suitable for signing with the account's private key\n *\n * @throws {UnableToDetermineMessageEncodingTypeForSignerAddress} When the signer address is not found in authorizers, proposer, or payer roles\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // This function is typically used internally by authorization functions\n * // when implementing custom wallet connectors or signing flows\n *\n * const signable = {\n *   voucher: {\n *     cadence: \"transaction { prepare(acct: AuthAccount) {} }\",\n *     authorizers: [\"0x01\"],\n *     proposalKey: { address: \"0x01\", keyId: 0, sequenceNum: 42 },\n *     payer: \"0x02\",\n *     refBlock: \"a1b2c3\",\n *     computeLimit: 100,\n *     arguments: [],\n *     payloadSigs: []\n *   }\n * };\n *\n * // For an authorizer (payload signer)\n * const authorizerMessage = fcl.encodeMessageFromSignable(signable, \"0x01\");\n * console.log(\"Authorizer signs:\", authorizerMessage);\n *\n * // For a payer (envelope signer)\n * const payerMessage = fcl.encodeMessageFromSignable(signable, \"0x02\");\n * console.log(\"Payer signs:\", payerMessage);\n */\nexport const encodeMessageFromSignable = (\n  signable: Signable,\n  signerAddress: string\n): string => {\n  let payloadSigners = findPayloadSigners(signable.voucher)\n  let envelopeSigners = findEnvelopeSigners(signable.voucher)\n\n  const isPayloadSigner = payloadSigners.includes(withPrefix(signerAddress))\n  const isEnvelopeSigner = envelopeSigners.includes(withPrefix(signerAddress))\n\n  if (!isPayloadSigner && !isEnvelopeSigner) {\n    throw new UnableToDetermineMessageEncodingTypeForSignerAddress(\n      signerAddress\n    )\n  }\n\n  const message: any = {\n    cadence: signable.voucher.cadence,\n    refBlock: signable.voucher.refBlock,\n    computeLimit: signable.voucher.computeLimit,\n    arguments: signable.voucher.arguments,\n    proposalKey: {\n      ...signable.voucher.proposalKey,\n      address: sansPrefix(signable.voucher.proposalKey.address),\n    },\n    payer: sansPrefix(signable.voucher.payer),\n    authorizers: signable.voucher.authorizers.map(sansPrefix),\n    payloadSigs: signable.voucher.payloadSigs.map(ps => {\n      const base: any = {\n        ...ps,\n        address: sansPrefix(ps.address),\n      }\n      if ((ps as any).extensionData != null) {\n        base.extensionData = (ps as any).extensionData\n      }\n      return base\n    }),\n  }\n\n  return isPayloadSigner\n    ? encodeTransactionPayload(message)\n    : encodeTransactionEnvelope(message)\n}\n"
  },
  {
    "path": "packages/sdk/src/wallet-utils/index.ts",
    "content": "export {validateSignableTransaction} from \"./validate-tx\"\nexport {encodeMessageFromSignable} from \"./encode-signable\"\n"
  },
  {
    "path": "packages/sdk/src/wallet-utils/validate-tx.test.ts",
    "content": "import {validateSignableTransaction} from \".\"\nimport {\n  encodeTransactionPayload as encodeInsideMessage,\n  encodeTransactionEnvelope as encodeOutsideMessage,\n} from \"../encode/encode\"\n\nconst MESSAGE = {\n  cadence: \"\",\n  computeLimit: 156,\n  refBlock: \"123\",\n  arguments: [],\n  proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n  payer: \"0x01\",\n  authorizers: [\"0x01\"],\n  payloadSigs: [\n    {address: \"0x01\", keyId: 1, sig: \"123\"},\n    {address: \"0x01\", keyId: 1, sig: \"123\"},\n  ],\n}\n\nconst encodedPayerMessage = encodeOutsideMessage(MESSAGE)\n\nconst encodedNonPayerMessage = encodeInsideMessage(MESSAGE)\n\nconst VOUCHER = {\n  cadence: \"\",\n  computeLimit: 156,\n  refBlock: \"123\",\n  arguments: [],\n  proposalKey: {address: \"0x01\", keyId: 1, sequenceNum: 123},\n  payer: \"0x01\",\n  authorizers: [\"0x01\"],\n  payloadSigs: [\n    {address: \"0x01\", keyId: 1, sig: \"123\"},\n    {address: \"0x01\", keyId: 1, sig: \"123\"},\n  ],\n}\n\nconst PAYER_SIGNABLE = {\n  f_type: \"Signable\",\n  message: encodedPayerMessage,\n  roles: {proposer: false, authorizer: false, payer: true, param: false},\n  interaction: {\n    tag: \"TRANSACTION\",\n  },\n  voucher: VOUCHER,\n}\n\nconst NON_PAYER_SIGNABLE = {\n  f_type: \"Signable\",\n  message: encodedNonPayerMessage,\n  roles: {proposer: true, authorizer: false, payer: false, param: false},\n  interaction: {\n    tag: \"TRANSACTION\",\n  },\n  voucher: VOUCHER,\n}\n\ndescribe(\"validate signable\", () => {\n  test(\"validate payer tx in signable\", () => {\n    const result = validateSignableTransaction(PAYER_SIGNABLE)\n    expect(result).toBe(true)\n  })\n\n  test(\"validate nonpayer tx in signable\", () => {\n    const result = validateSignableTransaction(NON_PAYER_SIGNABLE)\n    expect(result).toBe(true)\n  })\n})\n"
  },
  {
    "path": "packages/sdk/src/wallet-utils/validate-tx.ts",
    "content": "import {\n  encodeTransactionPayload as encodeInsideMessage,\n  encodeTransactionEnvelope as encodeOutsideMessage,\n} from \"../encode/encode\"\nimport {invariant} from \"@onflow/util-invariant\"\nimport {Signable} from \"./encode-signable\"\nconst isPayer = (signable: Signable): boolean => {\n  return signable.roles.payer\n}\n\nconst getVoucher = (signable: Signable): any => {\n  return signable.voucher\n}\n\nconst getMessage = (signable: Signable): string => {\n  return signable.message\n}\n\nconst isExpectedMessage = (signable: Signable): boolean => {\n  return isPayer(signable)\n    ? encodeOutsideMessage(getVoucher(signable)) === getMessage(signable)\n    : encodeInsideMessage(getVoucher(signable)) === getMessage(signable)\n}\n\n/**\n * Validates that a signable transaction is properly formed and contains the expected message.\n *\n * This function verifies that the message in a signable object matches the expected encoded message\n * based on the signer's role (payer or non-payer). It ensures the integrity of the signing process\n * by confirming that the message to be signed corresponds correctly to the transaction data.\n *\n * For payers: Validates against the transaction envelope encoding\n * For non-payers (proposers/authorizers): Validates against the transaction payload encoding\n *\n * @param signable The signable object to validate\n * @param signable.roles Object indicating the signer's roles (payer, proposer, authorizer)\n * @param signable.voucher The voucher containing transaction data\n * @param signable.message The encoded message that should be signed\n * @returns True if the signable is valid and ready for signing\n *\n * @throws {Error} When the signable payload doesn't match the expected transaction encoding\n *\n * @example\n * import * as fcl from \"@onflow/fcl\";\n *\n * // This function is typically used internally by wallet connectors\n * // and authorization functions to ensure transaction integrity\n *\n * const signable = {\n *   roles: { payer: true, proposer: false, authorizer: false },\n *   voucher: {\n *     cadence: \"transaction { prepare(acct: AuthAccount) {} }\",\n *     proposalKey: { address: \"0x01\", keyId: 0, sequenceNum: 42 },\n *     payer: \"0x02\",\n *     authorizers: [\"0x01\"],\n *     // ... other voucher data\n *   },\n *   message: \"encoded_transaction_envelope_here\"\n * };\n *\n * try {\n *   const isValid = fcl.validateSignableTransaction(signable);\n *   console.log(\"Signable is valid:\", isValid);\n *   // Proceed with signing\n * } catch (error) {\n *   console.error(\"Invalid signable:\", error.message);\n *   // Handle validation failure\n * }\n */\nexport const validateSignableTransaction = (signable: Signable): boolean => {\n  invariant(isExpectedMessage(signable), \"Signable payload must be transaction\")\n\n  return true\n}\n"
  },
  {
    "path": "packages/sdk/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/transport-grpc/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/transport-grpc/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/transport-grpc/CHANGELOG.md",
    "content": "# @onflow/transport-grpc\n\n## 1.4.2-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/protobuf@1.3.1-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n\n## 1.4.1\n\n### Patch Changes\n\n- Updated dependencies [[`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f)]:\n  - @onflow/util-invariant@1.2.3\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Deprecate `@onflow/transport-grpc` & add \"not implemented\" error for subscribeEvents\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3), [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-address@1.2.2\n  - @onflow/protobuf@1.3.0\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/rlp@1.2.2\n\n## 1.4.0-alpha.6\n\n### Patch Changes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n\n## 1.4.0-alpha.5\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- Updated dependencies [[`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88)]:\n  - @onflow/protobuf@1.3.0-alpha.0\n\n## 1.3.2-alpha.4\n\n### Patch Changes\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n## 1.3.2-alpha.3\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n\n## 1.3.2-alpha.2\n\n### Patch Changes\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Deprecate @onflow/transport-grpc & add \"not implemented\" error for subscribeEvents\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-template@1.2.2-alpha.1\n  - @onflow/util-address@1.2.2-alpha.1\n  - @onflow/rlp@1.2.2-alpha.1\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/protobuf@1.2.2\n  - @onflow/rlp@1.2.1\n  - @onflow/util-address@1.2.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-template@1.2.1\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-template@1.2.0\n  - @onflow/util-address@1.2.0\n  - @onflow/rlp@1.2.0\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fixed duplicate signatures when sending transaction\n\n## 1.2.1\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f)]:\n  - @onflow/protobuf@1.2.1\n\n## 1.2.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f)]:\n  - @onflow/protobuf@1.2.1-alpha.0\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n- Updated dependencies [[`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/util-address@1.1.0\n  - @onflow/protobuf@1.2.0\n  - @onflow/rlp@1.1.0\n  - @onflow/util-invariant@1.1.0\n  - @onflow/util-template@1.1.0\n\n## 1.2.0-alpha.4\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/protobuf@1.2.0-alpha.2\n  - @onflow/rlp@1.1.0-alpha.2\n  - @onflow/util-address@1.1.0-alpha.5\n  - @onflow/util-invariant@1.1.0-alpha.2\n  - @onflow/util-template@1.1.0-alpha.2\n\n## 1.2.0-alpha.3\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.4\n  - @onflow/protobuf@1.2.0-alpha.1\n  - @onflow/rlp@1.1.0-alpha.1\n\n## 1.2.0-alpha.2\n\n### Patch Changes\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n## 1.2.0-alpha.1\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/protobuf@1.2.0-alpha.0\n  - @onflow/rlp@1.1.0-alpha.0\n  - @onflow/util-address@1.1.0-alpha.3\n  - @onflow/util-invariant@1.1.0-alpha.0\n  - @onflow/util-template@1.1.0-alpha.0\n\n## 1.2.0-alpha.0\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n### Patch Changes\n\n- Updated dependencies [[`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22)]:\n  - @onflow/util-address@1.1.0-alpha.0\n\n## 1.1.4\n\n### Patch Changes\n\n- [#1476](https://github.com/onflow/fcl-js/pull/1476) [`458e2914`](https://github.com/onflow/fcl-js/commit/458e291416fcd6237b4dfd82cc558ec0a0ef4d03) Thanks [@justinbarry](https://github.com/justinbarry)! - Remove logic to retry 503/504 http status responses\n\n## 1.1.3\n\n### Patch Changes\n\n- [#1466](https://github.com/onflow/fcl-js/pull/1466) [`d1ad4c02`](https://github.com/onflow/fcl-js/commit/d1ad4c02a62e09548554bbf75df2ce3b8bd3fca5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Retry on 503/504 http status responses\n\n## 1.1.2\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n- Updated dependencies [[`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0)]:\n  - @onflow/rlp@1.0.3\n  - @onflow/util-address@1.0.3\n  - @onflow/util-invariant@1.0.3\n  - @onflow/util-template@1.0.4\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/rlp@1.0.2\n  - @onflow/util-address@1.0.2\n  - @onflow/util-invariant@1.0.2\n  - @onflow/util-template@1.0.3\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/rlp@1.0.2-alpha.0\n  - @onflow/util-address@1.0.2-alpha.0\n  - @onflow/util-invariant@1.0.2-alpha.0\n  - @onflow/util-template@1.0.3-alpha.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1206](https://github.com/onflow/fcl-js/pull/1206) [`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845) Thanks [@jribbink](https://github.com/jribbink)! - Added blockId to transport-grpc transaction status\n\n### Patch Changes\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845)]:\n  - @onflow/util-template@1.0.2\n  - @onflow/protobuf@1.1.0\n\n## 1.1.0-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0)]:\n  - @onflow/util-template@1.0.2-alpha.0\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1206](https://github.com/onflow/fcl-js/pull/1206) [`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845) Thanks [@jribbink](https://github.com/jribbink)! - Added blockId to transport-grpc transaction status\n\n### Patch Changes\n\n- Updated dependencies [[`6ae4469c`](https://github.com/onflow/fcl-js/commit/6ae4469cdaa9590ef110ed1c0ec6928d9ac09845)]:\n  - @onflow/protobuf@1.1.0-alpha.0\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/rlp@1.0.1\n  - @onflow/util-address@1.0.1\n  - @onflow/util-invariant@1.0.1\n  - @onflow/util-template@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n- Updated dependencies [[`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/util-address@1.0.0\n  - @onflow/util-invariant@1.0.0\n  - @onflow/rlp@1.0.0\n  - @onflow/util-template@1.0.0\n  - @onflow/protobuf@1.0.0\n\n## 1.0.0-alpha.3\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/rlp@1.0.0-alpha.1\n  - @onflow/util-address@1.0.0-alpha.1\n  - @onflow/util-invariant@1.0.0-alpha.1\n  - @onflow/util-template@1.0.0-alpha.1\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n* 2022-04-05 -- **BREAKING** [@chasefleming](https://github.com/chasefleming): Remove the following from block response:\n\n  - `block.collectionGuarantees.signatures`\n  - `block.blockSeals.executionReceiptSignatures`\n  - `block.blockSeals.resultApprovalSignatures`\n  - `block.signatures`\n\n## 1.0.0-alpha.1\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- Updated dependencies [7469c5c3]\n- Updated dependencies\n\n  - @onflow/util-address@1.0.0-alpha.0\n  - @onflow/util-invariant@1.0.0-alpha.0\n  - @onflow/protobuf@1.0.0-alpha.0\n  - @onflow/rlp@1.0.0-alpha.0\n  - @onflow/util-template@1.0.0-alpha.0\n\n- 2022-03-16 -- [@bthaile](https://github.com/bthaile) Payer can now be an array.\n- 2022-02-11 -- Uses Buffer as provided by context injection\n\n## 0.0.2 -- 2022-02-02\n\n- 2022-02-02 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Adds statusString lookup based off of status field.\n\n## 0.0.1 -- 2022-01-13\n\n- 2022-01-13 -- [@JeffreyDoyle](https://github.com/JeffreyDoyle): Initial Implementation.\n"
  },
  {
    "path": "packages/transport-grpc/README.md",
    "content": "---\ntitle: Transport GRPC\ndescription: Sends an interaction to an access node via the GRPC Rest API and returns a response.\n---\n\n# Deprecated - DO NOT USE\n\nThis package is deprecated and will not receive updates for new features.  Please migrate your projects to use the [HTTP Transport] package (`@onflow/transport-http`) instead.\n\nLatest versions of FCL/JS-SDK will automatically use the HTTP Transport as long as the `sdk.transport` configuration key is not set.\n\n## Usage\n\n### Install\n\n```bash\nnpm install --save @onflow/transport-grpc\n```\n\n### Integration with FCL\n\nBy default `@onflow/fcl` defaults to using the HTTP Access Node endpoint via the [HTTP Transport](/packages/transport-http/) package (`@onflow/transport-http`).  This may be overridden, however.\n\nIf using the gRPC Access API, the `sdk.transport` configuration key must be populated as this value defaults to the HTTP API transport.  The SDK can be configured to use the gRPC API transport as follows:\n\n```javascript\nimport { config } from \"@onflow/fcl\"\nimport { send as transportGRPC } from \"@onflow/transport-grpc\"\n\nconfig({\n  \"accessNode.api\": \"https://access-testnet.onflow.org\",\n  \"sdk.transport\": transportGRPC\n})\n```\n\nThis will override the HTTP Transport and use the gRPC Transport instead.\n\n📖 **gRPC Access API URLs** can be found [here](https://developers.flow.com/concepts/nodes/access-api#flow-access-node-endpoints).  The public Flow gRPC access nodes are accessible at:\n- Testnet `https://access-testnet.onflow.org`\n- Mainnet `https://access-mainnet.onflow.org`\n- Local Emulator `127.0.0.1:3569`\n\nFor more information, please consult the [FCL-JS SDK guidelines](https://developers.flow.com/tooling/fcl-js/sdk-guidelines).\n\nFor information about installing and configuring FCL, see the [FCL Quick Start Tutorial](https://developers.flow.com/tutorials/flow-app-quickstart)."
  },
  {
    "path": "packages/transport-grpc/package.json",
    "content": "{\n  \"name\": \"@onflow/transport-grpc\",\n  \"version\": \"1.4.2-alpha.0\",\n  \"description\": \"Flow SDK GRPC Transport Module\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/sdk\": \"1.13.7\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/sdk-send-grpc.js\",\n  \"main\": \"dist/sdk-send-grpc.js\",\n  \"module\": \"dist/sdk-send-grpc.module.js\",\n  \"unpkg\": \"dist/sdk-send-grpc.umd.js\",\n  \"scripts\": {\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@improbable-eng/grpc-web\": \"^0.15.0\",\n    \"@improbable-eng/grpc-web-node-http-transport\": \"^0.15.0\",\n    \"@onflow/protobuf\": \"1.3.2\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-template\": \"1.2.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/sdk-send-grpc.js",
    "content": "export {sendExecuteScript} from \"./send-execute-script.js\"\nexport {sendGetAccount} from \"./send-get-account.js\"\n// @deprecated - will be removed in future versions\nimport * as logger from \"@onflow/util-logger\"\nlogger.log.deprecate({\n  pkg: \"transport-grpc\",\n  msg: `@onflow/transport-grpc is deprecated, please use @onflow/transport-http instead or simply remove the \\`sdk.transport\\` config option within the FCL/JS-SDK.`,\n  transition:\n    \"https://github.com/onflow/fcl-js/tree/master/packages/transport-grpc/README.md\",\n})\n\nexport {sendGetBlockHeader} from \"./send-get-block-header.js\"\nexport {sendGetBlock} from \"./send-get-block.js\"\nexport {sendGetCollection} from \"./send-get-collection.js\"\nexport {sendGetEvents} from \"./send-get-events.js\"\nexport {sendGetTransaction} from \"./send-get-transaction.js\"\nexport {sendGetTransactionStatus} from \"./send-get-transaction-status.js\"\nexport {sendPing} from \"./send-ping.js\"\nexport {sendTransaction} from \"./send-transaction.js\"\nexport {sendGetNetworkParameters} from \"./send-get-network-parameters.js\"\nexport {sendGetNodeVersionInfo} from \"./send-get-node-version-info.js\"\nexport {send} from \"./send-grpc.js\"\n"
  },
  {
    "path": "packages/transport-grpc/src/send-execute-script.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  ExecuteScriptAtLatestBlockRequest,\n  ExecuteScriptAtBlockIDRequest,\n  ExecuteScriptAtBlockHeightRequest,\n  AccessAPI,\n} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst argumentBuffer = (arg, context) =>\n  context.Buffer.from(JSON.stringify(arg), \"utf8\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nasync function sendExecuteScriptAtBlockIDRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new ExecuteScriptAtBlockIDRequest()\n\n  req.setBlockId(hexBuffer(ix.block.id, context))\n\n  const code = context.Buffer.from(ix.message.cadence, \"utf8\")\n  ix.message.arguments.forEach(arg =>\n    req.addArguments(argumentBuffer(ix.arguments[arg].asArgument, context))\n  )\n  req.setScript(code)\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.ExecuteScriptAtBlockID,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendExecuteScriptAtBlockHeightRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new ExecuteScriptAtBlockHeightRequest()\n\n  req.setBlockHeight(Number(ix.block.height))\n\n  const code = context.Buffer.from(ix.message.cadence, \"utf8\")\n  ix.message.arguments.forEach(arg =>\n    req.addArguments(argumentBuffer(ix.arguments[arg].asArgument, context))\n  )\n  req.setScript(code)\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.ExecuteScriptAtBlockHeight,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendExecuteScriptAtLatestBlockRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new ExecuteScriptAtLatestBlockRequest()\n\n  const code = context.Buffer.from(ix.message.cadence, \"utf8\")\n  ix.message.arguments.forEach(arg =>\n    req.addArguments(argumentBuffer(ix.arguments[arg].asArgument, context))\n  )\n  req.setScript(code)\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.ExecuteScriptAtLatestBlock,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.encodedData = JSON.parse(\n    context.Buffer.from(res.getValue_asU8()).toString(\"utf8\")\n  )\n\n  return ret\n}\n\nexport async function sendExecuteScript(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Execute Script Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Execute Script Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Execute Script Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  if (ix.block.id) {\n    return await sendExecuteScriptAtBlockIDRequest(ix, context, opts)\n  } else if (ix.block.height) {\n    return await sendExecuteScriptAtBlockHeightRequest(ix, context, opts)\n  } else {\n    return await sendExecuteScriptAtLatestBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-execute-script.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendExecuteScript} from \"./send-execute-script.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockId,\n  atBlockHeight,\n  build,\n  script,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst jsonToUInt8Array = json => {\n  var str = JSON.stringify(json, null, 0)\n  var ret = new Uint8Array(str.length)\n  for (var i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i)\n  }\n  return ret\n}\n\ndescribe(\"Send Execute Script\", () => {\n  test(\"ExecuteScriptAtLatestBlock\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedJSONCDC = {type: \"Int\", value: 123}\n\n    unaryMock.mockReturnValue({\n      getValue_asU8: () => jsonToUInt8Array(returnedJSONCDC),\n    })\n\n    let response = await sendExecuteScript(\n      await resolve(\n        await build([script`access(all) fun main(): Int { return 123 }`])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.ExecuteScriptAtLatestBlock)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockScript = unaryMockRequest.getScript()\n\n    expect(unaryMockScript).not.toBeUndefined()\n\n    expect(response.encodedData).toEqual(returnedJSONCDC)\n  })\n\n  test(\"ExecuteScriptAtBlockID\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedJSONCDC = {type: \"Int\", value: 123}\n\n    unaryMock.mockReturnValue({\n      getValue_asU8: () => jsonToUInt8Array(returnedJSONCDC),\n    })\n\n    const response = await sendExecuteScript(\n      await resolve(\n        await build([\n          script`access(all) fun main(): Int { return 123 }`,\n          atBlockId(\"abc123\"),\n        ])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.ExecuteScriptAtBlockID)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockScript = unaryMockRequest.getScript()\n    const unaryMockBlockID = unaryMockRequest.getBlockId()\n\n    expect(unaryMockScript).not.toBeUndefined()\n    expect(unaryMockBlockID).not.toBeUndefined()\n\n    expect(response.encodedData).toEqual(returnedJSONCDC)\n  })\n\n  test(\"ExecuteScriptAtBlockHeight\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedJSONCDC = {type: \"Int\", value: 123}\n\n    unaryMock.mockReturnValue({\n      getValue_asU8: () => jsonToUInt8Array(returnedJSONCDC),\n    })\n\n    const response = await sendExecuteScript(\n      await resolve(\n        await build([\n          script`access(all) fun main(): Int { return 123 }`,\n          atBlockHeight(123),\n        ])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.ExecuteScriptAtBlockHeight)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockScript = unaryMockRequest.getScript()\n    const unaryMockBlockHeight = unaryMockRequest.getBlockHeight()\n\n    expect(unaryMockScript).not.toBeUndefined()\n    expect(unaryMockBlockHeight).not.toBeUndefined()\n\n    expect(response.encodedData).toEqual(returnedJSONCDC)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-account.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  GetAccountAtLatestBlockRequest,\n  GetAccountAtBlockHeightRequest,\n  AccessAPI,\n} from \"@onflow/protobuf\"\nimport {sansPrefix, withPrefix} from \"@onflow/util-address\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst paddedHexBuffer = (hex, pad, context) =>\n  context.Buffer.from(hex.padStart(pad * 2, 0), \"hex\")\n\nconst addressBuffer = (addr, context) => paddedHexBuffer(addr, 8, context)\n\nconst HashAlgorithmNames = {\n  1: \"SHA2_256\",\n  2: \"SHA2_384\",\n  3: \"SHA3_256\",\n  4: \"SHA3_384\",\n  5: \"KMAC128_BLS_BLS12_381\",\n}\n\nconst SignatureAlgorithmNames = {\n  1: \"ECDSA_P256\",\n  2: \"ECDSA_secp256k1\",\n  3: \"BLS_BLS12_381\",\n}\n\nasync function sendGetAccountAtBlockHeightRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetAccountAtBlockHeightRequest()\n  req.setBlockHeight(Number(ix.block.height))\n  req.setAddress(addressBuffer(sansPrefix(ix.account.addr), context))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetAccountAtBlockHeight,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetAccountAtLatestBlockRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetAccountAtLatestBlockRequest()\n  req.setAddress(addressBuffer(sansPrefix(ix.account.addr), context))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetAccountAtLatestBlock,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  const account = res.getAccount()\n\n  let contractsMap\n  const contracts = (contractsMap = account.getContractsMap())\n    ? contractsMap.getEntryList().reduce(\n        (acc, contract) => ({\n          ...acc,\n          [contract[0]]: context.Buffer.from(\n            contract[1] || new UInt8Array()\n          ).toString(\"utf8\"),\n        }),\n        {}\n      )\n    : {}\n\n  ret.account = {\n    address: withPrefix(u8ToHex(account.getAddress_asU8(), context)),\n    balance: account.getBalance(),\n    code: context.Buffer.from(\n      account.getCode_asU8() || new UInt8Array()\n    ).toString(\"utf8\"),\n    contracts,\n    keys: account.getKeysList().map(publicKey => ({\n      index: publicKey.getIndex(),\n      publicKey: u8ToHex(publicKey.getPublicKey_asU8(), context),\n      signAlgo: publicKey.getSignAlgo(),\n      signAlgoString: SignatureAlgorithmNames[publicKey.getSignAlgo()], // New! Verify this field name for correctness.\n      hashAlgo: publicKey.getHashAlgo(),\n      hashAlgoString: HashAlgorithmNames[publicKey.getHashAlgo()], // New! Verify this field name for correctness.\n      weight: publicKey.getWeight(),\n      sequenceNumber: publicKey.getSequenceNumber(),\n      revoked: publicKey.getRevoked(),\n    })),\n  }\n\n  return ret\n}\n\nexport async function sendGetAccount(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Account Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Get Account Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Get Account Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  if (ix.block.height !== null) {\n    return await sendGetAccountAtBlockHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetAccountAtLatestBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-account.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetAccount} from \"./send-get-account.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  build,\n  getAccount,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\nconst strToUInt8Array = str => {\n  var ret = new Uint8Array(str.length)\n  for (var i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i)\n  }\n  return ret\n}\n\ndescribe(\"Send Get Account\", () => {\n  test(\"GetAccountAtBlockHeightRequest\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedAccount = {\n      address: \"0x1654653399040a61\",\n      code: \"contract\",\n      keys: [],\n      balance: 10,\n      contracts: {},\n    }\n\n    unaryMock.mockReturnValue({\n      getAccount: () => ({\n        getAddress_asU8: () => hexStrToUInt8Array(\"1654653399040a61\"),\n        getCode_asU8: () => strToUInt8Array(\"contract\"),\n        getKeysList: () => [],\n        getBalance: () => 10,\n        getContractsMap: () => ({\n          getEntryList: () => [],\n        }),\n      }),\n    })\n\n    const response = await sendGetAccount(\n      await resolve(\n        await build([getAccount(\"0x1654653399040a61\"), atBlockHeight(123)])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetAccountAtBlockHeight)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockAddress = unaryMockRequest.getAddress()\n    const unaryMockBlockHeight = unaryMockRequest.getBlockHeight()\n\n    expect(unaryMockAddress).not.toBeUndefined()\n    expect(unaryMockBlockHeight).not.toBeUndefined()\n\n    expect(response.account).toEqual(returnedAccount)\n  })\n\n  test(\"GetAccountAtLatestBlockRequest\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedAccount = {\n      address: \"0x1654653399040a61\",\n      code: \"contract\",\n      keys: [],\n      balance: 10,\n      contracts: {},\n    }\n\n    unaryMock.mockReturnValue({\n      getAccount: () => ({\n        getAddress_asU8: () => hexStrToUInt8Array(\"1654653399040a61\"),\n        getCode_asU8: () => strToUInt8Array(\"contract\"),\n        getKeysList: () => [],\n        getBalance: () => 10,\n        getContractsMap: () => ({\n          getEntryList: () => [],\n        }),\n      }),\n    })\n\n    const response = await sendGetAccount(\n      await resolve(await build([getAccount(\"0x1654653399040a61\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetAccountAtLatestBlock)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockAddress = unaryMockRequest.getAddress()\n\n    expect(unaryMockAddress).not.toBeUndefined()\n\n    expect(response.account).toEqual(returnedAccount)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-block-header.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  GetLatestBlockHeaderRequest,\n  GetBlockHeaderByIDRequest,\n  GetBlockHeaderByHeightRequest,\n  AccessAPI,\n} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nasync function sendGetBlockHeaderByIDRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetBlockHeaderByIDRequest()\n  req.setId(hexBuffer(ix.block.id, context))\n\n  const res = await unary(opts.node, AccessAPI.GetBlockHeaderByID, req, context)\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockHeaderByHeightRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetBlockHeaderByHeightRequest()\n  req.setHeight(Number(ix.block.height))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetBlockHeaderByHeight,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetLatestBlockHeaderRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetLatestBlockHeaderRequest()\n\n  if (ix.block?.isSealed) {\n    req.setIsSealed(ix.block.isSealed)\n  }\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetLatestBlockHeader,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  const blockHeader = res.getBlock()\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.blockHeader = {\n    id: u8ToHex(blockHeader.getId_asU8(), context),\n    parentId: u8ToHex(blockHeader.getParentId_asU8(), context),\n    height: blockHeader.getHeight(),\n    timestamp: blockHeader.getTimestamp().toDate().toISOString(),\n  }\n\n  return ret\n}\n\nexport async function sendGetBlockHeader(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Block Header Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Block Header Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Block Header Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionHasBlockID = ix.block.id !== null\n  const interactionHasBlockHeight = ix.block.height !== null\n\n  if (interactionHasBlockID) {\n    return await sendGetBlockHeaderByIDRequest(ix, context, opts)\n  } else if (interactionHasBlockHeight) {\n    return await sendGetBlockHeaderByHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetLatestBlockHeaderRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-block-header.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetBlockHeader} from \"./send-get-block-header.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  atBlockId,\n  build,\n  getBlockHeader,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Send Get Block Header\", () => {\n  test(\"GetBlockHeaderByID\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => dateNow,\n        }),\n      }),\n    })\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(), atBlockId(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetBlockHeaderByID)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockId = unaryMockRequest.getId()\n\n    expect(unaryMockId).not.toBeUndefined()\n\n    expect(response.blockHeader).toEqual(returnedBlockHeader)\n  })\n\n  test(\"GetBlockHeaderByHeight\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => dateNow,\n        }),\n      }),\n    })\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(), atBlockHeight(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetBlockHeaderByHeight)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockHeight = unaryMockRequest.getHeight()\n\n    expect(unaryMockHeight).not.toBeUndefined()\n\n    expect(response.blockHeader).toEqual(returnedBlockHeader)\n  })\n\n  test(\"GetLatestBlockHeader - isSealed = false\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => dateNow,\n        }),\n      }),\n    })\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetLatestBlockHeader)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockIsSealed = unaryMockRequest.getIsSealed()\n\n    expect(unaryMockIsSealed).toBe(false)\n\n    expect(response.blockHeader).toEqual(returnedBlockHeader)\n  })\n\n  test(\"GetLatestBlockHeader - isSealed = true\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => dateNow,\n        }),\n      }),\n    })\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(true)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetLatestBlockHeader)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockIsSealed = unaryMockRequest.getIsSealed()\n\n    expect(unaryMockIsSealed).toBe(true)\n\n    expect(response.blockHeader).toEqual(returnedBlockHeader)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-block.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  GetBlockByIDRequest,\n  GetBlockByHeightRequest,\n  GetLatestBlockRequest,\n  AccessAPI,\n} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nasync function sendGetBlockByIDRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetBlockByIDRequest()\n  req.setId(hexBuffer(ix.block.id, context))\n\n  const res = await unary(opts.node, AccessAPI.GetBlockByID, req, context)\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockByHeightRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetBlockByHeightRequest()\n  req.setHeight(Number(ix.block.height))\n\n  const res = await unary(opts.node, AccessAPI.GetBlockByHeight, req, context)\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetLatestBlockRequest()\n\n  if (ix.block?.isSealed) {\n    req.setIsSealed(ix.block.isSealed)\n  }\n\n  const res = await unary(opts.node, AccessAPI.GetLatestBlock, req, context)\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  const block = res.getBlock()\n\n  const collectionGuarantees = block.getCollectionGuaranteesList()\n  const blockSeals = block.getBlockSealsList()\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.block = {\n    id: u8ToHex(block.getId_asU8(), context),\n    parentId: u8ToHex(block.getParentId_asU8(), context),\n    height: block.getHeight(),\n    timestamp: block.getTimestamp().toDate().toISOString(),\n    collectionGuarantees: collectionGuarantees.map(collectionGuarantee => ({\n      collectionId: u8ToHex(\n        collectionGuarantee.getCollectionId_asU8(),\n        context\n      ),\n      signerIds: collectionGuarantee\n        .getSignerIdsList_asU8()\n        .map(id => u8ToHex(id, context)),\n    })),\n    blockSeals: blockSeals.map(blockSeal => ({\n      blockId: u8ToHex(blockSeal.getBlockId_asU8(), context),\n      executionReceiptId: u8ToHex(\n        blockSeal.getExecutionReceiptId_asU8(),\n        context\n      ),\n    })),\n  }\n\n  return ret\n}\n\nexport async function sendGetBlock(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Block Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Block Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Block Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionHasBlockID = ix.block.id !== null\n  const interactionHasBlockHeight = ix.block.height !== null\n\n  if (interactionHasBlockID) {\n    return await sendGetBlockByIDRequest(ix, context, opts)\n  } else if (interactionHasBlockHeight) {\n    return await sendGetBlockByHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-block.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetBlock} from \"./send-get-block.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  atBlockId,\n  build,\n  getBlock,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Send Get Block\", () => {\n  test(\"GetBlockByID\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => ({\n            toISOString: () => dateNow.toISOString(),\n          }),\n        }),\n        getCollectionGuaranteesList: () => [],\n        getBlockSealsList: () => [],\n        getSignaturesList: () => [],\n      }),\n    })\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(), atBlockId(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetBlockByID)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockBlockId = unaryMockRequest.getId()\n\n    expect(unaryMockBlockId).not.toBeUndefined()\n\n    expect(response.block).toEqual(returnedBlock)\n  })\n\n  test(\"GetBlockByHeight\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [\n        {\n          collectionId: \"abc32111\",\n          signerIds: [\"abc32121\"],\n        },\n      ],\n      blockSeals: [],\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => ({\n            toISOString: () => dateNow.toISOString(),\n          }),\n        }),\n        getCollectionGuaranteesList: () => [\n          {\n            getCollectionId_asU8: () => hexStrToUInt8Array(\"abc32111\"),\n            getSignerIdsList_asU8: () => [hexStrToUInt8Array(\"abc32121\")],\n          },\n        ],\n        getBlockSealsList: () => [],\n        getSignaturesList: () => [],\n      }),\n    })\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(), atBlockHeight(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetBlockByHeight)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockBlockHeight = unaryMockRequest.getHeight()\n\n    expect(unaryMockBlockHeight).not.toBeUndefined()\n\n    expect(response.block).toEqual(returnedBlock)\n  })\n\n  test(\"GetLatestBlock - isSealed = false\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => ({\n            toISOString: () => dateNow.toISOString(),\n          }),\n        }),\n        getCollectionGuaranteesList: () => [],\n        getBlockSealsList: () => [],\n        getSignaturesList: () => [],\n      }),\n    })\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetLatestBlock)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockIsSealed = unaryMockRequest.getIsSealed()\n\n    expect(unaryMockIsSealed).toBe(false)\n\n    expect(response.block).toEqual(returnedBlock)\n  })\n\n  test(\"GetLatestBlock - isSealed = true\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = {\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    }\n\n    unaryMock.mockReturnValue({\n      getBlock: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getParentId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getHeight: () => 123,\n        getTimestamp: () => ({\n          toDate: () => ({\n            toISOString: () => dateNow.toISOString(),\n          }),\n        }),\n        getCollectionGuaranteesList: () => [],\n        getBlockSealsList: () => [],\n        getSignaturesList: () => [],\n      }),\n    })\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(true)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetLatestBlock)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockIsSealed = unaryMockRequest.getIsSealed()\n\n    expect(unaryMockIsSealed).toBe(true)\n\n    expect(response.block).toEqual(returnedBlock)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-collection.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {GetCollectionByIDRequest, AccessAPI} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nexport async function sendGetCollection(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Collection Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Collection Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Collection Error: context.Buffer must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new GetCollectionByIDRequest()\n  req.setId(hexBuffer(ix.collection.id, context))\n\n  const res = await unary(opts.node, AccessAPI.GetCollectionByID, req, context)\n\n  const collection = res.getCollection()\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.collection = {\n    id: u8ToHex(collection.getId_asU8(), context),\n    transactionIds: collection\n      .getTransactionIdsList()\n      .map(x => u8ToHex(x, context)),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-collection.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetCollection} from \"./send-get-collection.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getCollection,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Send Get Collection\", () => {\n  test(\"GetCollection\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedCollection = {\n      id: \"a1b2c3\",\n      transactionIds: [\"a1b2c3\"],\n    }\n\n    unaryMock.mockReturnValue({\n      getCollection: () => ({\n        getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getTransactionIdsList: () => [hexStrToUInt8Array(\"a1b2c3\")],\n      }),\n    })\n\n    const response = await sendGetCollection(\n      await resolve(await build([getCollection(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetCollectionByID)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockCollectionId = unaryMockRequest.getId()\n\n    expect(unaryMockCollectionId).not.toBeUndefined()\n\n    expect(response.collection.id).toBe(returnedCollection.id)\n    expect(response.collection.transactionIds[0]).toBe(\n      returnedCollection.transactionIds[0]\n    )\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-events.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {\n  GetEventsForHeightRangeRequest,\n  GetEventsForBlockIDsRequest,\n  AccessAPI,\n} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nasync function sendGetEventsForHeightRangeRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetEventsForHeightRangeRequest()\n  req.setType(ix.events.eventType)\n\n  req.setStartHeight(Number(ix.events.start))\n  req.setEndHeight(Number(ix.events.end))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetEventsForHeightRange,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetEventsForBlockIDsRequest(ix, context, opts) {\n  const unary = opts.unary || defaultUnary\n\n  const req = new GetEventsForBlockIDsRequest()\n  req.setType(ix.events.eventType)\n\n  ix.events.blockIds.forEach(id => req.addBlockIds(hexBuffer(id, context)))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetEventsForBlockIDs,\n    req,\n    context\n  )\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  const results = res.getResultsList()\n  ret.events = results.reduce((blocks, result) => {\n    const blockId = u8ToHex(result.getBlockId_asU8(), context)\n    const blockHeight = result.getBlockHeight()\n    const blockTimestamp = result.getBlockTimestamp().toDate().toISOString()\n    const events = result.getEventsList()\n    events.forEach(event => {\n      blocks.push({\n        blockId,\n        blockHeight,\n        blockTimestamp,\n        type: event.getType(),\n        transactionId: u8ToHex(event.getTransactionId_asU8(), context),\n        transactionIndex: event.getTransactionIndex(),\n        eventIndex: event.getEventIndex(),\n        payload: JSON.parse(\n          context.Buffer.from(event.getPayload_asU8()).toString(\"utf8\")\n        ),\n      })\n    })\n    return blocks\n  }, [])\n\n  return ret\n}\n\nexport async function sendGetEvents(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Events Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Events Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Events Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionContainsBlockHeightRange = ix.events.start !== null\n  const interactionContainsBlockIDsList =\n    Array.isArray(ix.events.blockIds) && ix.events.blockIds.length > 0\n\n  invariant(\n    interactionContainsBlockHeightRange || interactionContainsBlockIDsList,\n    \"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified.\"\n  )\n\n  if (interactionContainsBlockHeightRange) {\n    return await sendGetEventsForHeightRangeRequest(ix, context, opts)\n  } else {\n    return await sendGetEventsForBlockIDsRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-events.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetEvents} from \"./send-get-events.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getEventsAtBlockHeightRange,\n  getEventsAtBlockIds,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst jsonToUInt8Array = json => {\n  var str = JSON.stringify(json, null, 0)\n  var ret = new Uint8Array(str.length)\n  for (var i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i)\n  }\n  return ret\n}\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Send Get Events\", () => {\n  test(\"GetEventsForBlockIDs\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedEvents = [\n      {\n        blockId: \"a1b2c3\",\n        blockHeight: 123,\n        blockTimestamp: dateNow.toISOString(),\n        type: \"MyEvent\",\n        transactionId: \"a1b2c3\",\n        transactionIndex: 123,\n        eventIndex: 456,\n        payload: {type: \"String\", value: \"Hello, Flow\"},\n      },\n    ]\n\n    unaryMock.mockReturnValue({\n      getResultsList: () => [\n        {\n          getBlockId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n          getBlockHeight: () => 123,\n          getBlockTimestamp: () => ({\n            toDate: () => ({\n              toISOString: () => dateNow.toISOString(),\n            }),\n          }),\n          getEventsList: () => [\n            {\n              getType: () => \"MyEvent\",\n              getTransactionId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n              getTransactionIndex: () => 123,\n              getEventIndex: () => 456,\n              getPayload_asU8: () =>\n                jsonToUInt8Array({type: \"String\", value: \"Hello, Flow\"}),\n            },\n          ],\n        },\n      ],\n    })\n\n    const response = await sendGetEvents(\n      await resolve(await build([getEventsAtBlockIds(\"MyEvent\", [\"a1b2c3\"])])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetEventsForBlockIDs)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockType = unaryMockRequest.getType()\n    const unaryMockBlockIds = unaryMockRequest.getBlockIdsList()\n\n    expect(unaryMockType).not.toBeUndefined()\n    expect(unaryMockBlockIds).not.toBeUndefined()\n    expect(unaryMockBlockIds.length).toBe(1)\n\n    expect(response.events[0]).toStrictEqual(returnedEvents[0])\n  })\n\n  test(\"GetEventsForHeightRange\", async () => {\n    const unaryMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedEvents = [\n      {\n        blockId: \"a1b2c3\",\n        blockHeight: 123,\n        blockTimestamp: dateNow.toISOString(),\n        type: \"MyEvent\",\n        transactionId: \"a1b2c3\",\n        transactionIndex: 123,\n        eventIndex: 456,\n        payload: {type: \"String\", value: \"Hello, Flow\"},\n      },\n    ]\n\n    unaryMock.mockReturnValue({\n      getResultsList: () => [\n        {\n          getBlockId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n          getBlockHeight: () => 123,\n          getBlockTimestamp: () => ({\n            toDate: () => ({\n              toISOString: () => dateNow.toISOString(),\n            }),\n          }),\n          getEventsList: () => [\n            {\n              getType: () => \"MyEvent\",\n              getTransactionId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n              getTransactionIndex: () => 123,\n              getEventIndex: () => 456,\n              getPayload_asU8: () =>\n                jsonToUInt8Array({type: \"String\", value: \"Hello, Flow\"}),\n            },\n          ],\n        },\n      ],\n    })\n\n    const response = await sendGetEvents(\n      await resolve(\n        await build([getEventsAtBlockHeightRange(\"MyEvent\", 123, 456)])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetEventsForHeightRange)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockType = unaryMockRequest.getType()\n    const unaryMockStartHeight = unaryMockRequest.getStartHeight()\n    const unaryMockEndHeight = unaryMockRequest.getEndHeight()\n\n    expect(unaryMockType).not.toBeUndefined()\n    expect(unaryMockStartHeight).not.toBeUndefined()\n    expect(unaryMockEndHeight).not.toBeUndefined()\n\n    expect(response.events[0]).toStrictEqual(returnedEvents[0])\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-network-parameters.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, GetNetworkParametersRequest} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nexport async function sendGetNetworkParameters(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Network Parameters Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Network Parameters Error: context.response must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new GetNetworkParametersRequest()\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetNetworkParameters,\n    req,\n    context\n  )\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  let chainId = res.getChainId()\n  ret.networkParameters = {\n    chainId: chainId,\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-network-parameters.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetNetworkParameters} from \"./send-get-network-parameters.js\"\nimport {\n  build,\n  getNetworkParameters,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Network Parameters\", () => {\n  test(\"GetNetworkParametersResult\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedNetworkParameters = {\n      chainId: \"flow-emulator\",\n    }\n\n    unaryMock.mockReturnValue({\n      getChainId: () => \"flow-emulator\",\n    })\n\n    const response = await sendGetNetworkParameters(\n      await resolve(await build([getNetworkParameters()])),\n      {\n        response: responseADT,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetNetworkParameters)\n\n    expect(response.networkParameters).toStrictEqual(returnedNetworkParameters)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-node-version-info.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, GetNodeVersionInfoRequest} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\n\nexport async function sendGetNodeVersionInfo(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Node Version Info Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Node Version Info Error: context.response must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new GetNodeVersionInfoRequest()\n\n  const res = await unary(opts.node, AccessAPI.GetNodeVersionInfo, req, context)\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  let nodeVersionInfo = res.getInfo()\n  ret.nodeVersionInfo = {\n    semver: nodeVersionInfo.getSemver(),\n    commit: nodeVersionInfo.getCommit(),\n    sporkId: u8ToHex(nodeVersionInfo.getSporkId_asU8(), context),\n    protocolVersion: parseInt(nodeVersionInfo.getProtocolVersion()),\n    sporkRootBlockHeight: parseInt(nodeVersionInfo.getSporkRootBlockHeight()),\n    nodeRootBlockHeight: parseInt(nodeVersionInfo.getNodeRootBlockHeight()),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-node-version-info.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetNodeVersionInfo} from \"./send-get-node-version-info\"\nimport {\n  build,\n  getNodeVersionInfo,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Network Parameters\", () => {\n  test(\"GetNetworkParametersResult\", async () => {\n    const unaryMock = jest.fn()\n\n    unaryMock.mockReturnValue({\n      getInfo: () => ({\n        getSemver: () => \"0.0.0\",\n        getCommit: () => \"0123456789abcdef\",\n        getSporkId_asU8: () => new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),\n        getProtocolVersion: () => \"999\",\n        getSporkRootBlockHeight: () => \"123\",\n        getNodeRootBlockHeight: () => \"456\",\n      }),\n    })\n\n    const response = await sendGetNodeVersionInfo(\n      await resolve(await build([getNodeVersionInfo()])),\n      {\n        Buffer,\n        response: responseADT,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetNodeVersionInfo)\n\n    expect(response.nodeVersionInfo).toStrictEqual({\n      semver: \"0.0.0\",\n      commit: \"0123456789abcdef\",\n      sporkId: \"00010203040506070809\",\n      protocolVersion: 999,\n      sporkRootBlockHeight: 123,\n      nodeRootBlockHeight: 456,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-transaction-status.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, GetTransactionRequest} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst STATUS_MAP = {\n  0: \"UNKNOWN\",\n  1: \"PENDING\",\n  2: \"FINALIZED\",\n  3: \"EXECUTED\",\n  4: \"SEALED\",\n  5: \"EXPIRED\",\n}\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst nonEmptyU8ToHex = (u8, context) =>\n  !u8.reduce((empty, b) => empty && !b, true) ? u8ToHex(u8, context) : null\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nexport async function sendGetTransactionStatus(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Transaction Status Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Transaction Status Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Transaction Status Error: context.Buffer must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new GetTransactionRequest()\n  req.setId(hexBuffer(ix.transaction.id, context))\n\n  const res = await unary(\n    opts.node,\n    AccessAPI.GetTransactionResult,\n    req,\n    context\n  )\n\n  let events = res.getEventsList()\n\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.transactionStatus = {\n    blockId: nonEmptyU8ToHex(res.getBlockId_asU8(), context),\n    status: res.getStatus(),\n    statusString: STATUS_MAP[res.getStatus()],\n    statusCode: res.getStatusCode(),\n    errorMessage: res.getErrorMessage(),\n    events: events.map(event => ({\n      type: event.getType(),\n      transactionId: u8ToHex(event.getTransactionId_asU8(), context),\n      transactionIndex: event.getTransactionIndex(),\n      eventIndex: event.getEventIndex(),\n      payload: JSON.parse(\n        context.Buffer.from(event.getPayload_asU8()).toString(\"utf8\")\n      ),\n    })),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-transaction-status.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetTransactionStatus} from \"./send-get-transaction-status.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getTransactionStatus,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst jsonToUInt8Array = json => {\n  var str = JSON.stringify(json, null, 0)\n  var ret = new Uint8Array(str.length)\n  for (var i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i)\n  }\n  return ret\n}\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Get Transaction Status\", () => {\n  test(\"GetTransactionResult\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedTransactionStatus = {\n      blockId: \"aafb34\",\n      status: 2,\n      statusString: \"FINALIZED\",\n      statusCode: 0,\n      errorMessage: \"No Error\",\n      events: [\n        {\n          type: \"MyEvent\",\n          transactionId: \"a1b2c3\",\n          transactionIndex: 123,\n          eventIndex: 456,\n          payload: {type: \"String\", value: \"Hello, Flow\"},\n        },\n      ],\n    }\n\n    unaryMock.mockReturnValue({\n      getBlockId_asU8: () => hexStrToUInt8Array(\"aafb34\"),\n      getStatus: () => 2,\n      getStatusCode: () => 0,\n      getErrorMessage: () => \"No Error\",\n      getEventsList: () => [\n        {\n          getType: () => \"MyEvent\",\n          getTransactionId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n          getTransactionIndex: () => 123,\n          getEventIndex: () => 456,\n          getPayload_asU8: () =>\n            jsonToUInt8Array({type: \"String\", value: \"Hello, Flow\"}),\n        },\n      ],\n    })\n\n    const response = await sendGetTransactionStatus(\n      await resolve(await build([getTransactionStatus(\"MyTxID\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetTransactionResult)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockId = unaryMockRequest.getId()\n\n    expect(unaryMockId).not.toBeUndefined()\n\n    expect(response.transactionStatus).toStrictEqual(returnedTransactionStatus)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-transaction.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, GetTransactionRequest} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\n\nexport async function sendGetTransaction(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Transaction Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Transaction Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Transaction Error: context.Buffer must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new GetTransactionRequest()\n  req.setId(hexBuffer(ix.transaction.id, context))\n\n  const res = await unary(opts.node, AccessAPI.GetTransaction, req, context)\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  const unwrapKey = key => ({\n    address: u8ToHex(key.getAddress_asU8(), context),\n    keyId: key.getKeyId(),\n    sequenceNumber: key.getSequenceNumber(),\n  })\n\n  const unwrapSignature = sig => ({\n    address: u8ToHex(sig.getAddress_asU8(), context),\n    keyId: sig.getKeyId(),\n    signature: u8ToHex(sig.getSignature_asU8(), context),\n  })\n\n  let transaction = res.getTransaction()\n  ret.transaction = {\n    script: context.Buffer.from(transaction.getScript_asU8()).toString(\"utf8\"),\n    args: transaction\n      .getArgumentsList()\n      .map(arg => JSON.parse(context.Buffer.from(arg).toString(\"utf8\"))),\n    referenceBlockId: u8ToHex(transaction.getReferenceBlockId_asU8(), context),\n    gasLimit: transaction.getGasLimit(),\n    proposalKey: unwrapKey(transaction.getProposalKey()),\n    payer: u8ToHex(transaction.getPayer_asU8(), context),\n    authorizers: transaction.getAuthorizersList().map(x => u8ToHex(x, context)),\n    payloadSignatures: transaction\n      .getPayloadSignaturesList()\n      .map(unwrapSignature),\n    envelopeSignatures: transaction\n      .getEnvelopeSignaturesList()\n      .map(unwrapSignature),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-get-transaction.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendGetTransaction} from \"./send-get-transaction.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getTransaction,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\nconst strToUInt8Array = str => {\n  var ret = new Uint8Array(str.length)\n  for (var i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i)\n  }\n  return ret\n}\n\ndescribe(\"Get Transaction\", () => {\n  test(\"GetTransactionResult\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedTransaction = {\n      script: \"Cadence Code\",\n      args: [],\n      referenceBlockId: \"a1b2c3\",\n      gasLimit: 123,\n      proposalKey: {\n        address: \"1654653399040a61\",\n        keyId: 1,\n        sequenceNumber: 1,\n      },\n      payer: \"1654653399040a61\",\n      authorizers: [],\n      payloadSignatures: [],\n      envelopeSignatures: [],\n    }\n\n    unaryMock.mockReturnValue({\n      getTransaction: () => ({\n        getScript_asU8: () => strToUInt8Array(\"Cadence Code\"),\n        getArgumentsList: () => [],\n        getReferenceBlockId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n        getGasLimit: () => 123,\n        getProposalKey: () => ({\n          getAddress_asU8: () => hexStrToUInt8Array(\"1654653399040a61\"),\n          getKeyId: () => 1,\n          getSequenceNumber: () => 1,\n        }),\n        getPayer_asU8: () => hexStrToUInt8Array(\"1654653399040a61\"),\n        getAuthorizersList: () => [],\n        getPayloadSignaturesList: () => [],\n        getEnvelopeSignaturesList: () => [],\n      }),\n    })\n\n    const response = await sendGetTransaction(\n      await resolve(await build([getTransaction(\"MyTxID\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.GetTransaction)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n    const unaryMockId = unaryMockRequest.getId()\n\n    expect(unaryMockId).not.toBeUndefined()\n\n    expect(response.transaction).toStrictEqual(returnedTransaction)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-grpc.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {sendTransaction} from \"./send-transaction.js\"\nimport {sendGetTransactionStatus} from \"./send-get-transaction-status.js\"\nimport {sendGetTransaction} from \"./send-get-transaction.js\"\nimport {sendExecuteScript} from \"./send-execute-script.js\"\nimport {sendGetAccount} from \"./send-get-account.js\"\nimport {sendGetEvents} from \"./send-get-events.js\"\nimport {sendGetBlock} from \"./send-get-block.js\"\nimport {sendGetBlockHeader} from \"./send-get-block-header.js\"\nimport {sendGetCollection} from \"./send-get-collection.js\"\nimport {sendPing} from \"./send-ping.js\"\nimport {sendGetNetworkParameters} from \"./send-get-network-parameters.js\"\nimport {sendGetNodeVersionInfo} from \"./send-get-node-version-info.js\"\n\nexport const send = async (ix, context = {}, opts = {}) => {\n  invariant(\n    opts.node,\n    `SDK Send Error: Either opts.node or \"accessNode.api\" in config must be defined.`\n  )\n  invariant(context.ix, `SDK Send Error: context.ix must be defined.`)\n\n  ix = await ix\n\n  // prettier-ignore\n  switch (true) {\n    case context.ix.isTransaction(ix):\n      return opts.sendTransaction ? opts.sendTransaction(ix, context, opts) : sendTransaction(ix, context, opts)\n    case context.ix.isGetTransactionStatus(ix):\n      return opts.sendGetTransactionStatus ? opts.sendGetTransactionStatus(ix, context, opts) : sendGetTransactionStatus(ix, context, opts)\n    case context.ix.isGetTransaction(ix):\n      return opts.sendGetTransaction ? opts.sendGetTransaction(ix, context, opts) : sendGetTransaction(ix, context, opts)\n    case context.ix.isScript(ix):\n      return opts.sendExecuteScript ? opts.sendExecuteScript(ix, context, opts) : sendExecuteScript(ix, context, opts)\n    case context.ix.isGetAccount(ix):\n      return opts.sendGetAccount ? opts.sendGetAccount(ix, context, opts) : sendGetAccount(ix, context, opts)\n    case context.ix.isGetEvents(ix):\n      return opts.sendGetEvents ? opts.sendGetEvents(ix, context, opts) : sendGetEvents(ix, context, opts)\n    case context.ix.isGetBlock(ix):\n      return opts.sendGetBlock ? opts.sendGetBlock(ix, context, opts) : sendGetBlock(ix, context, opts)\n    case context.ix.isGetBlockHeader(ix):\n      return opts.sendGetBlockHeader ? opts.sendGetBlockHeader(ix, context, opts) : sendGetBlockHeader(ix, context, opts)\n    case context.ix.isGetCollection(ix):\n      return opts.sendGetCollection ? opts.sendGetCollection(ix, context, opts) : sendGetCollection(ix, context, opts)\n    case context.ix.isPing(ix):\n      return opts.sendPing ? opts.sendPing(ix, context, opts) : sendPing(ix, context, opts)\n    case context.ix.isGetNetworkParameters(ix):\n      return opts.sendGetNetworkParameters ? opts.sendGetNetworkParameters(ix, context, opts) : sendGetNetworkParameters(ix, context, opts)\n    case context.ix.isSubscribeEvents?.(ix):\n      if (opts.sendSubscribeEvents)\n        return opts.sendSubscribeEvents(ix, context, opts)\n      else\n        throw new Error(`SDK Send Error: subscribeEvents is not supported by this transport.`)\n    case context.ix.isGetNodeVersionInfo?.(ix):\n      return opts.sendGetNodeVersionInfo ? opts.sendGetNodeVersionInfo(ix, context, opts) : sendGetNodeVersionInfo(ix, context, opts)\n    default:\n      return ix\n  }\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-ping.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, PingRequest} from \"@onflow/protobuf\"\nimport {unary as defaultUnary} from \"./unary\"\n\nexport async function sendPing(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Ping Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Ping Error: context.response must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const req = new PingRequest()\n\n  const res = await unary(opts.node, AccessAPI.Ping, req, context)\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-ping.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {sendPing} from \"./send-ping.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {build, ping, resolve, response as responseADT} from \"@onflow/sdk\"\n\ndescribe(\"Ping\", () => {\n  test(\"Ping\", async () => {\n    const unaryMock = jest.fn()\n\n    unaryMock.mockReturnValue({})\n\n    await sendPing(\n      await resolve(await build([ping()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.Ping)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n\n    expect(unaryMockRequest).not.toBeUndefined()\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/send-transaction.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {AccessAPI, Transaction, SendTransactionRequest} from \"@onflow/protobuf\"\nimport {sansPrefix} from \"@onflow/util-address\"\nimport {unary as defaultUnary} from \"./unary\"\n\nconst u8ToHex = (u8, context) => context.Buffer.from(u8).toString(\"hex\")\nconst paddedHexBuffer = (hex, pad, context) =>\n  context.Buffer.from(hex.padStart(pad * 2, 0), \"hex\")\nconst scriptBuffer = (script, context) => context.Buffer.from(script, \"utf8\")\nconst hexBuffer = (hex, context) => context.Buffer.from(hex, \"hex\")\nconst addressBuffer = (addr, context) => paddedHexBuffer(addr, 8, context)\nconst argumentBuffer = (arg, context) =>\n  context.Buffer.from(JSON.stringify(arg), \"utf8\")\n\nexport async function sendTransaction(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Transaction Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Transaction Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Transaction Error: context.Buffer must be defined.`\n  )\n\n  const unary = opts.unary || defaultUnary\n\n  ix = await ix\n\n  const tx = new Transaction()\n  tx.setScript(scriptBuffer(ix.message.cadence, context))\n  tx.setGasLimit(ix.message.computeLimit)\n  tx.setReferenceBlockId(\n    ix.message.refBlock ? hexBuffer(ix.message.refBlock, context) : null\n  )\n  tx.setPayer(\n    addressBuffer(\n      sansPrefix(\n        ix.accounts[Array.isArray(ix.payer) ? ix.payer[0] : ix.payer].addr\n      ),\n      context\n    )\n  )\n\n  ix.message.arguments.forEach(arg =>\n    tx.addArguments(argumentBuffer(ix.arguments[arg].asArgument, context))\n  )\n  ix.authorizations\n    .map(tempId => ix.accounts[tempId].addr)\n    .reduce((prev, current) => {\n      return prev.find(item => item === current) ? prev : [...prev, current]\n    }, [])\n    .forEach(addr =>\n      tx.addAuthorizers(addressBuffer(sansPrefix(addr), context))\n    )\n\n  const proposalKey = new Transaction.ProposalKey()\n  proposalKey.setAddress(\n    addressBuffer(sansPrefix(ix.accounts[ix.proposer].addr), context)\n  )\n  proposalKey.setKeyId(ix.accounts[ix.proposer].keyId)\n  proposalKey.setSequenceNumber(ix.accounts[ix.proposer].sequenceNum)\n\n  tx.setProposalKey(proposalKey)\n\n  // Apply Non Payer Signatures to Payload Signatures\n  for (let acct of Object.values(ix.accounts)) {\n    try {\n      if (!acct.role.payer && acct.signature != null) {\n        const sig = new Transaction.Signature()\n        sig.setAddress(addressBuffer(sansPrefix(acct.addr), context))\n        sig.setKeyId(acct.keyId)\n        sig.setSignature(hexBuffer(acct.signature, context))\n\n        const isSignatureExist = tx\n          .getPayloadSignaturesList()\n          .some(\n            existingSignature =>\n              existingSignature.getAddress().toString() ===\n                sig.getAddress().toString() &&\n              existingSignature.getKeyId() === sig.getKeyId() &&\n              existingSignature.getSignature().toString() ===\n                sig.getSignature().toString()\n          )\n        if (!isSignatureExist) {\n          tx.addPayloadSignatures(sig)\n        }\n      }\n    } catch (error) {\n      console.error(\"Trouble applying payload signature\", {acct, ix})\n      throw error\n    }\n  }\n\n  // Apply Payer Signatures to Envelope Signatures\n  for (let acct of Object.values(ix.accounts)) {\n    try {\n      if (acct.role.payer && acct.signature != null) {\n        const sig = new Transaction.Signature()\n        sig.setAddress(addressBuffer(sansPrefix(acct.addr), context))\n        sig.setKeyId(acct.keyId)\n        sig.setSignature(hexBuffer(acct.signature, context))\n        tx.addEnvelopeSignatures(sig)\n      }\n    } catch (error) {\n      console.error(\"Trouble applying envelope signature\", {acct, ix})\n      throw error\n    }\n  }\n\n  const req = new SendTransactionRequest()\n  req.setTransaction(tx)\n\n  var t1 = Date.now()\n  const res = await unary(opts.node, AccessAPI.SendTransaction, req, context)\n  var t2 = Date.now()\n\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.transactionId = u8ToHex(res.getId_asU8(), context)\n\n  if (typeof window !== \"undefined\" && typeof CustomEvent !== \"undefined\") {\n    window.dispatchEvent(\n      new CustomEvent(\"FLOW::TX\", {\n        detail: {txId: ret.transactionId, delta: t2 - t1},\n      })\n    )\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-grpc/src/send-transaction.test.js",
    "content": "import {AccessAPI} from \"@onflow/protobuf\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  authorizations,\n  build,\n  payer,\n  proposer,\n  ref,\n  resolve,\n  response as responseADT,\n  transaction,\n  voucherIntercept,\n  voucherToTxId,\n} from \"@onflow/sdk\"\nimport {sendTransaction} from \"./send-transaction\"\n\nconst hexStrToUInt8Array = hex => {\n  return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))\n}\n\ndescribe(\"Transaction\", () => {\n  test(\"SendTransaction\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedTransactionId = \"a1b2c3\"\n\n    unaryMock.mockReturnValue({\n      getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n    })\n\n    const response = await sendTransaction(\n      await resolve(\n        await build([\n          transaction`cadence transaction`,\n          proposer({\n            addr: \"f8d6e0586b0a20c7\",\n            keyId: 1,\n            sequenceNum: 123,\n            signingFunction: () => ({\n              addr: \"f8d6e0586b0a20c7\",\n              keyId: 1,\n              signature: \"abc123\",\n            }),\n            resolve: null,\n            roles: {\n              proposer: true,\n              authorizer: true,\n              payer: true,\n              param: false,\n            },\n          }),\n          payer({\n            addr: \"f8d6e0586b0a20c7\",\n            keyId: 1,\n            sequenceNum: 123,\n            signingFunction: () => ({\n              addr: \"f8d6e0586b0a20c7\",\n              keyId: 1,\n              signature: \"abc123\",\n            }),\n            resolve: null,\n            roles: {\n              proposer: true,\n              authorizer: true,\n              payer: true,\n              param: false,\n            },\n          }),\n          authorizations([\n            {\n              addr: \"f8d6e0586b0a20c7\",\n              keyId: 1,\n              sequenceNum: 123,\n              signingFunction: () => ({\n                addr: \"f8d6e0586b0a20c7\",\n                keyId: 1,\n                signature: \"abc123\",\n              }),\n              resolve: null,\n              roles: {\n                proposer: true,\n                authorizer: true,\n                payer: true,\n                param: false,\n              },\n            },\n          ]),\n          ref(\"abc123\"),\n          voucherIntercept(async voucher => {\n            voucherToTxId(voucher)\n          }),\n        ])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.SendTransaction)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n\n    expect(unaryMockRequest).not.toBeUndefined()\n\n    expect(response.transactionId).toBe(returnedTransactionId)\n  })\n\n  test(\"SendTransaction with duplicated payer\", async () => {\n    const unaryMock = jest.fn()\n\n    const returnedTransactionId = \"a1b2c3\"\n\n    unaryMock.mockReturnValue({\n      getId_asU8: () => hexStrToUInt8Array(\"a1b2c3\"),\n    })\n\n    const built = await build([\n      transaction`cadence transaction`,\n      proposer({\n        addr: \"abc\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"abc\",\n          keyId: 1,\n          signature: \"abc123\",\n        }),\n        resolve: null,\n        role: {\n          proposer: true,\n          authorizer: false,\n          payer: false,\n          param: false,\n        },\n      }),\n      payer({\n        addr: \"def\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"def\",\n          keyId: 1,\n          signature: \"def456\",\n        }),\n        resolve: null,\n        role: {\n          proposer: false,\n          authorizer: false,\n          payer: true,\n          param: false,\n        },\n      }),\n      authorizations([\n        {\n          addr: \"abc\",\n          keyId: 1,\n          sequenceNum: 123,\n          signingFunction: () => ({\n            addr: \"abc\",\n            keyId: 1,\n            signature: \"abc123\",\n          }),\n          resolve: null,\n          role: {\n            proposer: false,\n            authorizer: true,\n            payer: false,\n            param: false,\n          },\n        },\n      ]),\n      ref(\"aaaa\"),\n      voucherIntercept(async voucher => {\n        voucherToTxId(voucher)\n      }),\n    ])\n\n    const resolved = await resolve(built)\n\n    const response = await sendTransaction(\n      resolved,\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        unary: unaryMock,\n        node: \"localhost:3000\",\n      }\n    )\n\n    expect(unaryMock.mock.calls.length).toEqual(1)\n\n    const unaryMockArgs = unaryMock.mock.calls[0]\n\n    expect(unaryMockArgs.length).toEqual(4)\n\n    const unaryType = unaryMock.mock.calls[0][1]\n\n    expect(unaryType).toEqual(AccessAPI.SendTransaction)\n\n    const unaryMockRequest = unaryMock.mock.calls[0][2]\n\n    expect(unaryMockRequest).not.toBeUndefined()\n\n    expect(response.transactionId).toBe(returnedTransactionId)\n\n    expect(\n      unaryMockRequest.getTransaction().getPayloadSignaturesList()\n    ).toHaveLength(1)\n  })\n})\n"
  },
  {
    "path": "packages/transport-grpc/src/unary.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {grpc} from \"@improbable-eng/grpc-web\"\nimport {NodeHttpTransport} from \"@improbable-eng/grpc-web-node-http-transport\"\n\ngrpc.setDefaultTransport(NodeHttpTransport())\n\nexport async function unary(host, method, request, context) {\n  invariant(\n    context.config,\n    `SDK GRPC Unary Error: context.config must be defined.`\n  )\n  const metadataFromConfig = await context.config().get(\"grpc.metadata\", {})\n  return new Promise((resolve, reject) => {\n    grpc.unary(method, {\n      request: request,\n      host: host,\n      metadata: new grpc.Metadata(metadataFromConfig),\n      onEnd: ({status, statusMessage, message}) => {\n        if (status === grpc.Code.OK) {\n          resolve(message)\n        } else {\n          reject(new Error(statusMessage))\n        }\n      },\n    })\n  })\n}\n"
  },
  {
    "path": "packages/transport-grpc/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    // Types should go into this directory.\n    // Removing this would place the .d.ts files\n    // next to the .js files\n    \"outDir\": \"types\"\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"useBuiltIns\": false\n      }\n    ],\n    \"@babel/preset-typescript\"\n  ]\n}\n"
  },
  {
    "path": "packages/transport-http/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/transport-http/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/transport-http/CHANGELOG.md",
    "content": "# @onflow/transport-http\n\n## 1.15.6\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f75fb566c0ce53ee56d3c447c`](https://github.com/onflow/fcl-js/commit/9a982e62e45a2f6f75fb566c0ce53ee56d3c447c) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.15.5\n\n### Patch Changes\n\n- [#2765](https://github.com/onflow/fcl-js/pull/2765) [`0fe606e92ab3103dd29ba6a60c407c438aa86d9e`](https://github.com/onflow/fcl-js/commit/0fe606e92ab3103dd29ba6a60c407c438aa86d9e) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.15.4\n\n### Patch Changes\n\n- [#2763](https://github.com/onflow/fcl-js/pull/2763) [`61a68051a6d6732c84a918b298eec5aabd561da7`](https://github.com/onflow/fcl-js/commit/61a68051a6d6732c84a918b298eec5aabd561da7) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.15.3\n\n### Patch Changes\n\n- [#2761](https://github.com/onflow/fcl-js/pull/2761) [`aa737c359559d9f9f44d518805d5b1228aad9754`](https://github.com/onflow/fcl-js/commit/aa737c359559d9f9f44d518805d5b1228aad9754) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.15.2\n\n### Patch Changes\n\n- [#2759](https://github.com/onflow/fcl-js/pull/2759) [`efad6e114bd53e11347c261aaa0e826a6452fd69`](https://github.com/onflow/fcl-js/commit/efad6e114bd53e11347c261aaa0e826a6452fd69) Thanks [@mfbz](https://github.com/mfbz)! - Trigger Changeset Release workflow.\n\n## 1.15.1\n\n### Patch Changes\n\n- [#2741](https://github.com/onflow/fcl-js/pull/2741) [`d6e0a02145cd599fa22823ca83087ca096fb251d`](https://github.com/onflow/fcl-js/commit/d6e0a02145cd599fa22823ca83087ca096fb251d) Thanks [@jribbink](https://github.com/jribbink)! - Gracefully handle empty heartbeat data when streaming events\n\n## 1.15.0\n\n### Minor Changes\n\n- [#2664](https://github.com/onflow/fcl-js/pull/2664) [`50d3808b9fe8ee00db9349f571da77707df1f212`](https://github.com/onflow/fcl-js/commit/50d3808b9fe8ee00db9349f571da77707df1f212) Thanks [@jribbink](https://github.com/jribbink)! - Add support for scheduled transaction API changes, including UInt64 transaction IDs and automatic fallback to legacy polling when WebSocket subscriptions are not supported.\n\n## 1.14.0\n\n### Minor Changes\n\n- [#2638](https://github.com/onflow/fcl-js/pull/2638) [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960) Thanks [@jribbink](https://github.com/jribbink)! - Adds support for signature extension data introduced by [FLIP 264](https://github.com/onflow/flips/blob/main/protocol/20250203-webauthn-credential-support.md).\n\n  Users can now include signature extension data in their transactions by returning an additional `extensionData` property in their signing functions.\n\n  ```typescript\n  const authz = (ix: Interaction) => {\n    return {\n      addr: \"0x1234567890abcdef\",\n      keyId: 0,\n      signingFunction: (signable: Signable) => ({\n        signature: \"1234\",\n        extensionData: \"1234\",\n      }),\n    }\n  }\n  ```\n\n## 1.13.2\n\n### Patch Changes\n\n- [#2649](https://github.com/onflow/fcl-js/pull/2649) [`430bb0813bab6c2de59e152184256238bda20d99`](https://github.com/onflow/fcl-js/commit/430bb0813bab6c2de59e152184256238bda20d99) Thanks [@jribbink](https://github.com/jribbink)! - Renamed misnamed `startHeight` argument to `startBlockHeight` for event subscriptions. Type definitions will be broken to reflect this change, however the `startHeight` argument will still be accepted for backward compatibility.\n\n## 1.13.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/util-address@1.2.4\n  - @onflow/util-invariant@1.2.5\n  - @onflow/util-logger@1.3.4\n  - @onflow/util-template@1.2.4\n\n## 1.13.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new WebSocket streaming methods. The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Expose the `httpTransport` as a named export from `@onflow/transport-http` package. This follows the new object-style export for SDK transports and adds streaming support.\n\n### Patch Changes\n\n- [#2035](https://github.com/onflow/fcl-js/pull/2035) [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa) Thanks [@jribbink](https://github.com/jribbink)! - Add `parentVoterSignature` field to GetBlock request\n\n## 1.13.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add support for new WebSocket streaming methods. The following topics are now available:\n\n  - `blocks`\n  - `block_headers`\n  - `block_digests`\n  - `transaction_statues`\n  - `events`\n  - `account_statuses`\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Expose the `httpTransport` as a named export from `@onflow/transport-http` package. This follows the new object-style export for SDK transports and adds streaming support.\n\n### Patch Changes\n\n- [#2035](https://github.com/onflow/fcl-js/pull/2035) [`694cd76807b7ca4441d1f8425ac4f8426cbc18fa`](https://github.com/onflow/fcl-js/commit/694cd76807b7ca4441d1f8425ac4f8426cbc18fa) Thanks [@jribbink](https://github.com/jribbink)! - Add `parentVoterSignature` field to GetBlock request\n\n## 1.12.0\n\n### Minor Changes\n\n- [#2252](https://github.com/onflow/fcl-js/pull/2252) [`329ef42ddafde4c624f71dedf639e38c6ba31714`](https://github.com/onflow/fcl-js/commit/329ef42ddafde4c624f71dedf639e38c6ba31714) Thanks [@jribbink](https://github.com/jribbink)! - Default to soft-finality for all queries (get account, get block, get block header, execute script). Developers can manually override this setting on a per-query basis if required.\n\n  Because developers can now query against un-sealed blocks, it is now recommended to switch to waiting for soft-finality (\"executed\" status) when awaiting for transaction results whenever possible for significant latency improvements (~2.5x faster).\n\n  This can be done by switching from `fcl.tx(...).onceSealed()` to `fcl.tx(...).onceExecuted()` or updating listeners passed to `fcl.tx(...).subscribe()`.\n\n## 1.11.0\n\n### Minor Changes\n\n- [#2218](https://github.com/onflow/fcl-js/pull/2218) [`5b76b111ddb16ed607dc218714fdc51c21fdcdc8`](https://github.com/onflow/fcl-js/commit/5b76b111ddb16ed607dc218714fdc51c21fdcdc8) Thanks [@jribbink](https://github.com/jribbink)! - Default to executing scripts and querying accounts at latest finalized block\n\n## 1.10.5\n\n### Patch Changes\n\n- [#2049](https://github.com/onflow/fcl-js/pull/2049) [`4e907764cbbe688ea8fd1508968c2b095f00d79e`](https://github.com/onflow/fcl-js/commit/4e907764cbbe688ea8fd1508968c2b095f00d79e) Thanks [@jribbink](https://github.com/jribbink)! - Fix keyId for HTTP get transaction request\n\n## 1.10.4\n\n### Patch Changes\n\n- [#2039](https://github.com/onflow/fcl-js/pull/2039) [`bc47345ddfc44f0108672f91d8c948eb8e357e3d`](https://github.com/onflow/fcl-js/commit/bc47345ddfc44f0108672f91d8c948eb8e357e3d) Thanks [@jribbink](https://github.com/jribbink)! - Update cross-fetch to v4\n\n## 1.10.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4\n  - @onflow/util-template@1.2.3\n  - @onflow/util-address@1.2.3\n  - @onflow/util-logger@1.3.3\n\n## 1.10.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/util-template@1.2.3-alpha.0\n  - @onflow/util-address@1.2.3-alpha.0\n  - @onflow/util-logger@1.3.3-alpha.0\n\n## 1.10.2\n\n### Patch Changes\n\n- [#1965](https://github.com/onflow/fcl-js/pull/1965) [`91526e65`](https://github.com/onflow/fcl-js/commit/91526e65190d8c8ba67598e5df3b8b1c6c41292a) Thanks [@jribbink](https://github.com/jribbink)! - Fix `subscribeEvents` block timestamp\n\n## 1.10.1\n\n### Patch Changes\n\n- [#1882](https://github.com/onflow/fcl-js/pull/1882) [`dfc5472e`](https://github.com/onflow/fcl-js/commit/dfc5472e94c8237b048940ebc44742071f77f59d) Thanks [@jribbink](https://github.com/jribbink)! - Fix accessNode.api URL concatenation with paths in baseURL\n\n- Updated dependencies [[`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f)]:\n  - @onflow/util-invariant@1.2.3\n\n## 1.10.0\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - Typescript improvements\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for event streaming API interaction\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n### Patch Changes\n\n- [#1830](https://github.com/onflow/fcl-js/pull/1830) [`72e8f796`](https://github.com/onflow/fcl-js/commit/72e8f796caf8f62a829cba3641e395c20466547a) Thanks [@jribbink](https://github.com/jribbink)! - Use URL to join httpRequest hostname to path instead of string manipulation (allows for trailing slashes/less error prone)\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3), [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-address@1.2.2\n  - @onflow/util-invariant@1.2.2\n  - @onflow/util-template@1.2.2\n  - @onflow/util-logger@1.3.2\n\n## 1.10.0-alpha.5\n\n### Patch Changes\n\n- Updated dependencies [[`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3)]:\n  - @onflow/util-address@1.2.2-alpha.3\n\n## 1.10.0-alpha.4\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n## 1.10.0-alpha.3\n\n### Patch Changes\n\n- [#1830](https://github.com/onflow/fcl-js/pull/1830) [`72e8f796`](https://github.com/onflow/fcl-js/commit/72e8f796caf8f62a829cba3641e395c20466547a) Thanks [@jribbink](https://github.com/jribbink)! - Use URL to join httpRequest hostname to path instead of string manipulation (allows for trailing slashes/less error prone)\n\n- [#1832](https://github.com/onflow/fcl-js/pull/1832) [`037dc2f9`](https://github.com/onflow/fcl-js/commit/037dc2f9db9c22185e3c048c65e23e0efa70085f) Thanks [@jribbink](https://github.com/jribbink)! - Update access modifiers to support Cadence 1.0\n\n## 1.10.0-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/util-template@1.2.2-alpha.2\n  - @onflow/util-address@1.2.2-alpha.2\n  - @onflow/util-logger@1.3.2-alpha.2\n\n## 1.10.0-alpha.1\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - TS conversion\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add support for event streaming API interaction (subscribeEvents)\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/util-template@1.2.2-alpha.1\n  - @onflow/util-address@1.2.2-alpha.1\n  - @onflow/util-logger@1.3.2-alpha.1\n\n## 1.9.0\n\n### Minor Changes\n\n- [#1792](https://github.com/onflow/fcl-js/pull/1792) [`cb5d38c8`](https://github.com/onflow/fcl-js/commit/cb5d38c8f1a2de47a1932ea8e89e43171b179712) Thanks [@jribbink](https://github.com/jribbink)! - Export HTTPRequestError\n\n## 1.8.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-address@1.2.1\n  - @onflow/util-invariant@1.2.1\n  - @onflow/util-logger@1.3.1\n  - @onflow/util-template@1.2.1\n\n## 1.8.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/util-template@1.2.0\n  - @onflow/util-address@1.2.0\n  - @onflow/util-logger@1.3.0\n\n## 1.7.2\n\n### Patch Changes\n\n- [#1532](https://github.com/onflow/fcl-js/pull/1532) [`06846f8e`](https://github.com/onflow/fcl-js/commit/06846f8e9c1e2cdf10aa8dfdff6e6c5b31af81e5) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Fixed duplicate signatures when sending transaction\n\n## 1.7.1\n\n### Patch Changes\n\n- [#1767](https://github.com/onflow/fcl-js/pull/1767) [`f6681cfe`](https://github.com/onflow/fcl-js/commit/f6681cfebc5aab78cbf74f34b5655faa4f06a8c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix responseBody not being included in errors\n\n## 1.7.0\n\n### Minor Changes\n\n- [#1712](https://github.com/onflow/fcl-js/pull/1712) [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285) Thanks [@jribbink](https://github.com/jribbink)! - Add opts.enableRequestLogging flag\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/util-logger@1.2.1\n\n## 1.7.0-alpha.0\n\n### Minor Changes\n\n- [#1712](https://github.com/onflow/fcl-js/pull/1712) [`6fa3bdc4`](https://github.com/onflow/fcl-js/commit/6fa3bdc46dd077b57f501d802af5544393502285) Thanks [@jribbink](https://github.com/jribbink)! - Add opts.enableRequestLogging flag\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/util-logger@1.2.1-alpha.0\n\n## 1.6.0\n\n### Minor Changes\n\n- [#1580](https://github.com/onflow/fcl-js/pull/1580) [`82810ef0`](https://github.com/onflow/fcl-js/commit/82810ef000ebdf4dde4dbd7846d31dd335cd9cbb) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - - Adds support for retrying requests when an ETIMEDOUT error occurs.\n\n  - Adds a default 30 second timeout to all requests, after which they will be retried.\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n- [#1660](https://github.com/onflow/fcl-js/pull/1660) [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645) Thanks [@nialexsan](https://github.com/nialexsan)! - Switch to cross-fetch\n\n- Updated dependencies [[`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/util-address@1.1.0\n  - @onflow/util-invariant@1.1.0\n  - @onflow/util-logger@1.2.0\n  - @onflow/util-template@1.1.0\n\n## 1.6.0-alpha.7\n\n### Patch Changes\n\n- [#1660](https://github.com/onflow/fcl-js/pull/1660) [`9276f6ea`](https://github.com/onflow/fcl-js/commit/9276f6ea37367dfacce19bbffbad6fda56a1a645) Thanks [@nialexsan](https://github.com/nialexsan)! - Switch to cross-fetch\n\n## 1.6.0-alpha.6\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/util-address@1.1.0-alpha.5\n  - @onflow/util-invariant@1.1.0-alpha.2\n  - @onflow/util-logger@1.2.0-alpha.3\n  - @onflow/util-template@1.1.0-alpha.2\n\n## 1.6.0-alpha.5\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.1\n  - @onflow/util-address@1.1.0-alpha.4\n  - @onflow/util-logger@1.2.0-alpha.2\n\n## 1.6.0-alpha.4\n\n### Patch Changes\n\n- [#1608](https://github.com/onflow/fcl-js/pull/1608) [`0ec0c5d4`](https://github.com/onflow/fcl-js/commit/0ec0c5d46b780e2b277846f9271ab311aa048b19) Thanks [@nialexsan](https://github.com/nialexsan)! - prep for react-native package\n\n## 1.6.0-alpha.3\n\n### Minor Changes\n\n- [#1580](https://github.com/onflow/fcl-js/pull/1580) [`82810ef0`](https://github.com/onflow/fcl-js/commit/82810ef000ebdf4dde4dbd7846d31dd335cd9cbb) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - - Adds support for retrying requests when an ETIMEDOUT error occurs.\n  - Adds a default 30 second timeout to all requests, after which they will be retried.\n\n## 1.6.0-alpha.2\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/util-address@1.1.0-alpha.3\n  - @onflow/util-invariant@1.1.0-alpha.0\n  - @onflow/util-logger@1.2.0-alpha.1\n  - @onflow/util-template@1.1.0-alpha.0\n\n## 1.6.0-alpha.1\n\n### Minor Changes\n\n- [#1420](https://github.com/onflow/fcl-js/pull/1420) [`c20bc344`](https://github.com/onflow/fcl-js/commit/c20bc34448a22966d349b0b1c4c0f742ae93a355) Thanks [@huyndo](https://github.com/huyndo)! - Add GetNetworkParameters interaction and a util to get chain ID\n\n### Patch Changes\n\n- Updated dependencies [[`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22)]:\n  - @onflow/util-address@1.1.0-alpha.0\n\n## 1.5.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/util-logger@1.1.3-alpha.0\n\n## 1.5.0\n\n### Minor Changes\n\n- [#1362](https://github.com/onflow/fcl-js/pull/1362) [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe) Thanks [@jribbink](https://github.com/jribbink)! - Retry 429 (Too many requests) responses which are used for access node rate limiting\n\n### Patch Changes\n\n- [#1362](https://github.com/onflow/fcl-js/pull/1362) [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe) Thanks [@jribbink](https://github.com/jribbink)! - Catch JSON error when response body is empty\n\n* [#1339](https://github.com/onflow/fcl-js/pull/1339) [`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f) Thanks [@jribbink](https://github.com/jribbink)! - Ensure that acct.tempId is always created withPrefix\n\n## 1.5.0-alpha.1\n\n### Minor Changes\n\n- [#1362](https://github.com/onflow/fcl-js/pull/1362) [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe) Thanks [@jribbink](https://github.com/jribbink)! - Retry 429 (Too many requests) responses which are used for access node rate limiting\n\n### Patch Changes\n\n- [#1362](https://github.com/onflow/fcl-js/pull/1362) [`9a1eb2b3`](https://github.com/onflow/fcl-js/commit/9a1eb2b3dec369d4f35ec2aa8b753ec1230c0efe) Thanks [@jribbink](https://github.com/jribbink)! - Catch JSON error when response body is empty\n\n## 1.4.1-alpha.0\n\n### Patch Changes\n\n- [#1339](https://github.com/onflow/fcl-js/pull/1339) [`99e03af7`](https://github.com/onflow/fcl-js/commit/99e03af76e526593e5c989e43754ce23420e317f) Thanks [@jribbink](https://github.com/jribbink)! - Ensure that acct.tempId is always created withPrefix\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1324](https://github.com/onflow/fcl-js/pull/1324) [`45607fae`](https://github.com/onflow/fcl-js/commit/45607fae1d99adaa6e2c9ebbb8dc2f7e0c267033) Thanks [@jribbink](https://github.com/jribbink)! - Add http headers as option to in httpRequest\n\n### Patch Changes\n\n- [#1321](https://github.com/onflow/fcl-js/pull/1321) [`422914bc`](https://github.com/onflow/fcl-js/commit/422914bcdc4c1b44c61d3ec1850bf57114f31a6b) Thanks [@jribbink](https://github.com/jribbink)! - Make sendGetAccountAtLatestBlockRequest execute at latest sealed block instead of latest finalized block\n\n* [#1278](https://github.com/onflow/fcl-js/pull/1278) [`b9577b63`](https://github.com/onflow/fcl-js/commit/b9577b6355be06dec98f1e11101594fa65e66cf7) Thanks [@jribbink](https://github.com/jribbink)! - Add error message if using non-HTTP/REST endpoint via transport-http\n\n- [#1303](https://github.com/onflow/fcl-js/pull/1303) [`c83c4606`](https://github.com/onflow/fcl-js/commit/c83c4606f1c78e7addaadece89350b19cb5544d6) Thanks [@jribbink](https://github.com/jribbink)! - Removed @onflow/util-node-http-modules, added node-fetch\n\n* [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- [#1270](https://github.com/onflow/fcl-js/pull/1270) [`4d59f80c`](https://github.com/onflow/fcl-js/commit/4d59f80c0a8b45c82a28a05e6c579f4376107b86) Thanks [@jribbink](https://github.com/jribbink)! - Fix sendGetAccount throwing error if account has no keys\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/util-address@1.0.2\n  - @onflow/util-invariant@1.0.2\n  - @onflow/util-logger@1.1.1\n  - @onflow/util-template@1.0.3\n\n## 1.3.1-alpha.2\n\n### Patch Changes\n\n- [#1321](https://github.com/onflow/fcl-js/pull/1321) [`422914bc`](https://github.com/onflow/fcl-js/commit/422914bcdc4c1b44c61d3ec1850bf57114f31a6b) Thanks [@jribbink](https://github.com/jribbink)! - Make sendGetAccountAtLatestBlockRequest execute at latest sealed block instead of latest finalized block\n\n## 1.3.1-alpha.1\n\n### Patch Changes\n\n- [#1278](https://github.com/onflow/fcl-js/pull/1278) [`b9577b63`](https://github.com/onflow/fcl-js/commit/b9577b6355be06dec98f1e11101594fa65e66cf7) Thanks [@jribbink](https://github.com/jribbink)! - Add error message if using non-HTTP/REST endpoint via transport-http\n\n* [#1303](https://github.com/onflow/fcl-js/pull/1303) [`c83c4606`](https://github.com/onflow/fcl-js/commit/c83c4606f1c78e7addaadece89350b19cb5544d6) Thanks [@jribbink](https://github.com/jribbink)! - Removed @onflow/util-node-http-modules, added node-fetch\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/util-address@1.0.2-alpha.0\n  - @onflow/util-invariant@1.0.2-alpha.0\n  - @onflow/util-logger@1.1.1-alpha.1\n  - @onflow/util-template@1.0.3-alpha.0\n\n## 1.3.1-alpha.0\n\n### Patch Changes\n\n- [#1270](https://github.com/onflow/fcl-js/pull/1270) [`4d59f80c`](https://github.com/onflow/fcl-js/commit/4d59f80c0a8b45c82a28a05e6c579f4376107b86) Thanks [@jribbink](https://github.com/jribbink)! - Fix sendGetAccount throwing error if account has no keys\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1242](https://github.com/onflow/fcl-js/pull/1242) [`06279c1d`](https://github.com/onflow/fcl-js/commit/06279c1d27433893494b6a79b7f742ea9a7fab8e) Thanks [@jribbink](https://github.com/jribbink)! - Add request retry for 408 (Request Timeout) status code\n\n* [#1196](https://github.com/onflow/fcl-js/pull/1196) [`cd218e84`](https://github.com/onflow/fcl-js/commit/cd218e843acfc390049b391d36c447ce93668221) Thanks [@jribbink](https://github.com/jribbink)! - Added errorMessage property to HTTPRequestError to expose Access API errors when making requests\n\n### Patch Changes\n\n- [#1197](https://github.com/onflow/fcl-js/pull/1197) [`d9bc1cc6`](https://github.com/onflow/fcl-js/commit/d9bc1cc671f143d2f37cad6eb6b80123f1f3d760) Thanks [@jribbink](https://github.com/jribbink)! - Fix issue where httpRequest errors were thrown inside a promise and could not be caught on node\n\n* [#1218](https://github.com/onflow/fcl-js/pull/1218) [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix interaction arguments in http request body broken by prettier\n\n* Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0)]:\n  - @onflow/util-template@1.0.2\n\n## 1.3.0-alpha.3\n\n### Patch Changes\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0)]:\n  - @onflow/util-template@1.0.2-alpha.0\n\n## 1.3.0-alpha.2\n\n### Minor Changes\n\n- [#1242](https://github.com/onflow/fcl-js/pull/1242) [`06279c1d`](https://github.com/onflow/fcl-js/commit/06279c1d27433893494b6a79b7f742ea9a7fab8e) Thanks [@jribbink](https://github.com/jribbink)! - Add request retry for 408 (Request Timeout) status code\n\n## 1.3.0-alpha.1\n\n### Patch Changes\n\n- [#1218](https://github.com/onflow/fcl-js/pull/1218) [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4) Thanks [@jribbink](https://github.com/jribbink)! - Fix interaction arguments in http request body broken by prettier\n\n## 1.3.0-alpha.0\n\n### Minor Changes\n\n- [#1196](https://github.com/onflow/fcl-js/pull/1196) [`cd218e84`](https://github.com/onflow/fcl-js/commit/cd218e843acfc390049b391d36c447ce93668221) Thanks [@jribbink](https://github.com/jribbink)! - Added errorMessage property to HTTPRequestError to expose Access API errors when making requests\n\n### Patch Changes\n\n- [#1197](https://github.com/onflow/fcl-js/pull/1197) [`d9bc1cc6`](https://github.com/onflow/fcl-js/commit/d9bc1cc671f143d2f37cad6eb6b80123f1f3d760) Thanks [@jribbink](https://github.com/jribbink)! - Fix issue where httpRequest errors were thrown inside a promise and could not be caught on node\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1188](https://github.com/onflow/fcl-js/pull/1188) [`b873a0fa`](https://github.com/onflow/fcl-js/commit/b873a0fa401d46b831f089118e746ab91b264f6c) Thanks [@jribbink](https://github.com/jribbink)! - Added `statusCode` to `transactionStatus` (previously always 0)\n\n### Patch Changes\n\n- Updated dependencies [[`5fd10864`](https://github.com/onflow/fcl-js/commit/5fd10864c33ec5fb178b7cd85ef823ae08c4ff04)]:\n  - @onflow/util-node-http-modules@1.0.2\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1180](https://github.com/onflow/fcl-js/pull/1180) [`f348803d`](https://github.com/onflow/fcl-js/commit/f348803dbaaebad6d7081248b41f5582d5627d86) Thanks [@jribbink](https://github.com/jribbink)! - Added automatic retries for failed requests with 500,502,503,504 status code\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`48d2b11e`](https://github.com/onflow/fcl-js/commit/48d2b11e3c88fac8f503283fd080d161b38460a3), [`67bc4f61`](https://github.com/onflow/fcl-js/commit/67bc4f612193c6e703acfb09fc756a28c9c4f28a), [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/util-node-http-modules@1.0.1\n  - @onflow/util-address@1.0.1\n  - @onflow/util-invariant@1.0.1\n  - @onflow/util-template@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1138](https://github.com/onflow/fcl-js/pull/1138) [`b2c95e77`](https://github.com/onflow/fcl-js/commit/b2c95e776a3bbfd769778e0bae767fdd69ba6143) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Propagate up http error in node environment\n\n- [#1132](https://github.com/onflow/fcl-js/pull/1132) [`828a7b2b`](https://github.com/onflow/fcl-js/commit/828a7b2b4babb6485218e67e49f3a8ba9d4488fd) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Expose error returned from AN through HTTPRequestError\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n- Updated dependencies [[`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/util-address@1.0.0\n  - @onflow/util-invariant@1.0.0\n  - @onflow/util-node-http-modules@1.0.0\n  - @onflow/util-template@1.0.0\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/util-address@1.0.0-alpha.1\n  - @onflow/util-invariant@1.0.0-alpha.1\n  - @onflow/util-node-http-modules@1.0.0-alpha.1\n  - @onflow/util-template@1.0.0-alpha.1\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1129](https://github.com/onflow/fcl-js/pull/1129) [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Add blockId to GetTransactionStatus response\n\n* [#1138](https://github.com/onflow/fcl-js/pull/1138) [`b2c95e77`](https://github.com/onflow/fcl-js/commit/b2c95e776a3bbfd769778e0bae767fdd69ba6143) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Propagate up http error in node environment\n\n- [#1132](https://github.com/onflow/fcl-js/pull/1132) [`828a7b2b`](https://github.com/onflow/fcl-js/commit/828a7b2b4babb6485218e67e49f3a8ba9d4488fd) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Expose error returned from AN through HTTPRequestError\n\n* [#1115](https://github.com/onflow/fcl-js/pull/1115) [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - **BREAKING** Remove deprecated block builders, interaction types and send methods.\n\n* 2022-04-05 -- **BREAKING** [@chasefleming](https://github.com/chasefleming): Remove the following from block response:\n\n  - `block.collectionGuarantees.signatures`\n  - `block.blockSeals.executionReceiptSignatures`\n  - `block.blockSeals.resultApprovalSignatures`\n  - `block.signatures`\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- Updated dependencies [7469c5c3]\n- Updated dependencies\n\n  - @onflow/util-address@1.0.0-alpha.0\n  - @onflow/util-invariant@1.0.0-alpha.0\n  - @onflow/util-node-http-modules@1.0.0-alpha.0\n  - @onflow/util-template@1.0.0-alpha.0\n\n- 2022-03-16 -- [@bthaile](https://github.com/bthaile) Payer can now be an array.\n- 2022-02-25 -- Use node require to consume node standard libraries\n- 2022-02-11 -- Uses Buffer as provided by context injection\n\n### 0.0.6 -- 2022-02-04\n\n- 2022-02-04 -- Remove `0x` prefix from public keys in get account response.\n\n### 0.0.5 -- 2022-02-04\n\n- 2022-02-04 -- Decodes event payloads from base64\n\n### 0.0.3 -- 2022-02-02\n\n- 2022-02-03 -- Adds statusCode placeholder to get transaction status response.\n\n### 0.0.2 -- 2022-02-01\n\n- 2022-02-01 -- Removes signer_index field from envelope signature and payload signature.\n"
  },
  {
    "path": "packages/transport-http/README.md",
    "content": "---\ntitle: Transport HTTP\ndescription: Sends an interaction to an access node via the HTTP Rest API and returns a response.\n---\n\n# @onflow/transport-http\n\nA transport module which can send an interaction to an access node via the HTTP Rest api specification and return a response.\n\n## Status\n\n- **Last Updated:** Jan 13th 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** Medium\n\nThis package is working and in active development, breaking changes may happen.\n\n## Install\n\n```bash\nnpm install --save @onflow/transport-http\n```"
  },
  {
    "path": "packages/transport-http/package.json",
    "content": "{\n  \"name\": \"@onflow/transport-http\",\n  \"version\": \"1.15.6\",\n  \"description\": \"Flow SDK HTTP Transport Module\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/sdk\": \"1.13.7\",\n    \"@onflow/types\": \"1.5.0\",\n    \"jest\": \"^29.7.0\",\n    \"jest-websocket-mock\": \"^2.5.0\",\n    \"mock-socket\": \"^9.3.1\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"alpha\": \"npm publish --tag alpha\",\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/util-address\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\",\n    \"@onflow/util-logger\": \"1.3.4\",\n    \"@onflow/util-template\": \"1.2.4\",\n    \"abort-controller\": \"^3.0.0\",\n    \"buffer\": \"^6.0.3\",\n    \"cross-fetch\": \"^4.0.0\",\n    \"events\": \"^3.3.0\",\n    \"isomorphic-ws\": \"^5.0.0\",\n    \"ws\": \"^8.18.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/index.ts",
    "content": "export {sendExecuteScript} from \"./send/send-execute-script\"\nexport {sendGetAccount} from \"./send/send-get-account\"\nexport {sendGetBlockHeader} from \"./send/send-get-block-header\"\nexport {sendGetBlock} from \"./send/send-get-block\"\nexport {sendGetCollection} from \"./send/send-get-collection\"\nexport {sendGetEvents} from \"./send/send-get-events\"\nexport {sendGetTransaction} from \"./send/send-get-transaction\"\nexport {sendGetTransactionStatus} from \"./send/send-get-transaction-status\"\nexport {sendPing} from \"./send/send-ping\"\nexport {sendTransaction} from \"./send/send-transaction\"\nexport {sendGetNetworkParameters} from \"./send/send-get-network-parameters\"\nexport {sendGetNodeVersionInfo} from \"./send/send-get-node-version-info\"\nexport {connectSubscribeEvents} from \"./send/connect-subscribe-events\"\nexport {send} from \"./send/send-http\"\nexport {WebsocketError} from \"./send/connect-ws\"\nexport {HTTPRequestError} from \"./send/http-request.js\"\nexport {httpTransport} from \"./transport\"\n"
  },
  {
    "path": "packages/transport-http/src/send/connect-subscribe-events.test.ts",
    "content": "import {connectSubscribeEvents} from \"./connect-subscribe-events\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {response as responseADT} from \"@onflow/sdk\"\nimport {StreamConnection} from \"@onflow/typedefs\"\nimport EventEmitter from \"events\"\n\ndescribe(\"Subscribe Events\", () => {\n  let emitter\n  let mockStream: StreamConnection<{\n    data: {\n      events: any[]\n      heartbeat: {\n        blockId: string\n        blockHeight: number\n        blockTimestamp: number\n      }\n    }\n  }>\n  let connectWsMock\n\n  beforeEach(async () => {\n    connectWsMock = jest.fn(() => mockStream)\n    emitter = new EventEmitter()\n    mockStream = {\n      on: jest.fn((event, callback) => {\n        emitter.on(event, callback)\n      }) as any,\n      off: jest.fn((event, callback) => {\n        emitter.off(event, callback)\n      }) as any,\n      close: jest.fn(),\n    }\n\n    connectWsMock.mockReturnValue(mockStream)\n  })\n\n  test(\"should initiate socket conection with correct params\", async () => {\n    await connectSubscribeEvents(\n      {\n        tag: \"SUBSCRIBE_EVENTS\",\n        subscribeEvents: {\n          startBlockId: \"abc123\",\n          startHeight: 1,\n          eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n          addresses: [\"0x1\", \"0x2\"],\n          contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n          heartbeatInterval: 1000,\n        },\n      },\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        connectWs: connectWsMock,\n        node: \"http://localhost\",\n      }\n    )\n\n    expect(connectWsMock).toHaveBeenCalledWith({\n      hostname: \"http://localhost\",\n      path: \"/v1/subscribe_events\",\n      getParams: expect.any(Function),\n    })\n\n    const params = connectWsMock.mock.calls[0][0].getParams()\n    expect(params).toEqual({\n      start_block_id: \"abc123\",\n      start_height: 1,\n      event_types: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeat_interval: 1000,\n    })\n  })\n\n  test(\"should process events & heartbeat then map to response adt\", async () => {\n    const response = await connectSubscribeEvents(\n      {\n        tag: \"SUBSCRIBE_EVENTS\",\n        subscribeEvents: {\n          startBlockId: \"abc123\",\n          startHeight: 1,\n          eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n          addresses: [\"0x1\", \"0x2\"],\n          contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n          heartbeatInterval: 1,\n        },\n      },\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        connectWs: connectWsMock,\n        node: \"http://localhost\",\n      }\n    )\n\n    const mockPayload = Buffer.from(\n      JSON.stringify({\n        value: {\n          id: \"A.912d5440f7e3769e.FlowFees.FeesDeducted\",\n          fields: [\n            {\n              value: {value: \"0.00000119\", type: \"UFix64\"},\n              name: \"amount\",\n            },\n            {\n              value: {value: \"1.00000000\", type: \"UFix64\"},\n              name: \"inclusionEffort\",\n            },\n            {\n              value: {value: \"0.00000004\", type: \"UFix64\"},\n              name: \"executionEffort\",\n            },\n          ],\n        },\n        type: \"Event\",\n      })\n    ).toString(\"base64\")\n\n    let allData: any[] = []\n    response.streamConnection.on(\"data\", data => {\n      allData.push(data)\n    })\n\n    emitter.emit(\"data\", {\n      BlockID: \"abc123\",\n      Height: 1,\n      BlockTimestamp: \"1\",\n      Events: [\n        {\n          Type: \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\",\n          TransactionID: \"123abc\",\n          TransactionIndex: 1,\n          EventIndex: 1,\n          Payload: mockPayload,\n        },\n      ],\n    })\n\n    emitter.emit(\"data\", {\n      BlockID: \"def456\",\n      Height: 2,\n      BlockTimestamp: \"2\",\n      Events: [],\n    })\n\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(allData).toEqual([\n      {\n        ...responseADT(),\n        tag: \"SUBSCRIBE_EVENTS\",\n        events: [\n          {\n            type: \"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\",\n            transactionId: \"123abc\",\n            transactionIndex: 1,\n            eventIndex: 1,\n            blockId: \"abc123\",\n            blockHeight: 1,\n            blockTimestamp: \"1\",\n            payload: JSON.parse(Buffer.from(mockPayload, \"base64\").toString()),\n          },\n        ],\n        heartbeat: {\n          blockId: \"abc123\",\n          blockHeight: 1,\n          blockTimestamp: \"1\",\n        },\n      },\n      {\n        ...responseADT(),\n        tag: \"SUBSCRIBE_EVENTS\",\n        heartbeat: {\n          blockId: \"def456\",\n          blockHeight: 2,\n          blockTimestamp: \"2\",\n        },\n      },\n    ])\n  })\n\n  test(\"close should propagate the websocket connection\", async () => {\n    const response = await connectSubscribeEvents(\n      {\n        tag: \"SUBSCRIBE_EVENTS\",\n        subscribeEvents: {\n          startBlockId: \"abc123\",\n          startHeight: 1,\n          eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n          addresses: [\"0x1\", \"0x2\"],\n          contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n          heartbeatInterval: 1,\n        },\n      },\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        connectWs: connectWsMock,\n        node: \"http://localhost\",\n      }\n    )\n\n    response.streamConnection.close()\n\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(mockStream.close).toHaveBeenCalled()\n  })\n\n  test(\"should unsubscribe when the stream is closed\", async () => {\n    const response = await connectSubscribeEvents(\n      {\n        tag: \"SUBSCRIBE_EVENTS\",\n        subscribeEvents: {\n          startBlockId: \"abc123\",\n          startHeight: 1,\n          eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n          addresses: [\"0x1\", \"0x2\"],\n          contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n          heartbeatInterval: 1,\n        },\n      },\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        connectWs: connectWsMock,\n        node: \"http://localhost\",\n      }\n    )\n\n    response.streamConnection.close()\n\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(mockStream.close).toHaveBeenCalled()\n  })\n\n  test(\"getParams for next connection should use next block height if available\", async () => {\n    const response = await connectSubscribeEvents(\n      {\n        tag: \"SUBSCRIBE_EVENTS\",\n        subscribeEvents: {\n          startBlockId: \"abc123\",\n          eventTypes: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n          addresses: [\"0x1\", \"0x2\"],\n          contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n          heartbeatInterval: 1,\n        },\n      },\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        connectWs: connectWsMock,\n        node: \"http://localhost\",\n      }\n    )\n\n    // Expect same params as initial connection since no data has been received\n    expect(connectWsMock.mock.calls[0][0].getParams()).toEqual({\n      start_block_id: \"abc123\",\n      event_types: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeat_interval: 1,\n    })\n\n    // Expect next connection to use the next block height as it has seen a heartbeat\n    emitter.emit(\"data\", {\n      BlockID: \"abc123\",\n      Height: 1,\n      BlockTimestamp: \"1\",\n      Events: [],\n    })\n\n    expect(connectWsMock.mock.calls[0][0].getParams()).toEqual({\n      start_height: 2,\n      event_types: [\"A.7e60df042a9c0868.FlowToken.TokensWithdrawn\"],\n      addresses: [\"0x1\", \"0x2\"],\n      contracts: [\"A.7e60df042a9c0868.FlowToken\"],\n      heartbeat_interval: 1,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/connect-subscribe-events.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {connectWs as defaultConnectWs} from \"./connect-ws\"\nimport {EventEmitter} from \"events\"\nimport {BlockHeartbeat, Interaction, StreamConnection} from \"@onflow/typedefs\"\n\ntype RawSubscribeEventsStream = StreamConnection<{\n  data: {\n    events: any[]\n    heartbeat: BlockHeartbeat\n  }\n}>\n\nfunction constructData(ix: Interaction, context: any, data: any) {\n  const response = context.response()\n  response.tag = ix.tag\n\n  response.events =\n    data.Events?.length > 0\n      ? data.Events.map((event: any) => ({\n          blockId: data.BlockID,\n          blockHeight: Number(data.Height),\n          blockTimestamp: data.BlockTimestamp,\n          type: event.Type,\n          transactionId: event.TransactionID,\n          transactionIndex: Number(event.TransactionIndex),\n          eventIndex: Number(event.EventIndex),\n          payload: JSON.parse(\n            context.Buffer.from(event.Payload, \"base64\").toString()\n          ),\n        }))\n      : null\n  response.heartbeat = {\n    blockId: data.BlockID,\n    blockHeight: Number(data.Height),\n    blockTimestamp: data.BlockTimestamp,\n  }\n\n  return response\n}\n\nfunction constructResponse(ix: Interaction, context: any, stream: any) {\n  const response = context.response()\n  response.tag = ix.tag\n\n  response.streamConnection = stream\n\n  return response\n}\n\nexport async function connectSubscribeEvents(\n  ix: Interaction | Promise<Interaction>,\n  context: any = {},\n  opts: any = {}\n) {\n  invariant(opts.node, `SDK Send Get Events Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Events Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Events Error: context.Buffer must be defined.`\n  )\n\n  const resolvedIx = await ix\n\n  const connectWs: typeof defaultConnectWs = opts.connectWs || defaultConnectWs\n  const outputEmitter = new EventEmitter()\n  let lastBlockHeight: string | null = null\n\n  // Connect to the websocket & provide reconnection parameters\n  const connection = connectWs<any>({\n    hostname: opts.node,\n    path: `/v1/subscribe_events`,\n    getParams: () => {\n      const params: Record<string, any> = {\n        event_types: resolvedIx.subscribeEvents?.eventTypes,\n        addresses: resolvedIx.subscribeEvents?.addresses,\n        contracts: resolvedIx.subscribeEvents?.contracts,\n        heartbeat_interval: resolvedIx.subscribeEvents?.heartbeatInterval,\n      }\n\n      // If the lastBlockId is set, use it to resume the stream\n      if (lastBlockHeight) {\n        params.start_height = lastBlockHeight + 1\n      } else {\n        params.start_block_id = resolvedIx.subscribeEvents?.startBlockId\n        params.start_height = resolvedIx.subscribeEvents?.startHeight\n      }\n\n      return params\n    },\n  })\n\n  // Map the connection to a formatted response stream\n  connection.on(\"data\", (data: any) => {\n    const responseData = constructData(resolvedIx, context, data)\n    lastBlockHeight = responseData.heartbeat.blockHeight\n    outputEmitter.emit(\"data\", responseData)\n  })\n  connection.on(\"error\", (error: Error) => {\n    outputEmitter.emit(\"error\", error)\n  })\n  connection.on(\"close\", () => {\n    outputEmitter.emit(\"close\")\n  })\n\n  const responseStream: RawSubscribeEventsStream = {\n    on(event: \"data\" | \"error\" | \"close\" | \"open\", listener: any) {\n      outputEmitter.on(event, listener)\n      return this\n    },\n    off(event: \"data\" | \"error\" | \"close\" | \"open\", listener: any) {\n      outputEmitter.off(event, listener)\n      return this\n    },\n    close() {\n      connection.close()\n    },\n  }\n  return constructResponse(resolvedIx, context, responseStream)\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/connect-ws.test.ts",
    "content": "import {buildConnectionUrl, connectWs} from \"./connect-ws\"\nimport * as WebSocketModule from \"../subscribe/websocket\"\n\ndescribe(\"connectWs\", () => {\n  describe(\"buildConnectionUrl\", () => {\n    test(\"should build http url\", () => {\n      const url = buildConnectionUrl(\"http://example.com\", \"/events\", {\n        a: \"b\",\n        c: \"d\",\n      })\n      expect(url).toEqual(\"ws://example.com/events?a=b&c=d\")\n    })\n\n    test(\"should build https url\", () => {\n      const url = buildConnectionUrl(\"https://example.com\", \"/events\", {\n        a: \"b\",\n        c: \"d\",\n      })\n      expect(url).toEqual(\"wss://example.com/events?a=b&c=d\")\n    })\n\n    test(\"should preserve port\", () => {\n      const url = buildConnectionUrl(\"http://example.com:8080\", \"/events\", {\n        a: \"b\",\n        c: \"d\",\n      })\n      expect(url).toEqual(\"ws://example.com:8080/events?a=b&c=d\")\n    })\n\n    test(\"should build url with no params\", () => {\n      const url = buildConnectionUrl(\"http://example.com\", \"/events\")\n      expect(url).toEqual(\"ws://example.com/events\")\n    })\n\n    test(\"should build url with no path\", () => {\n      const url = buildConnectionUrl(\"http://example.com\")\n      expect(url).toEqual(\"ws://example.com/\")\n    })\n\n    test(\"should filter out null and undefined params\", () => {\n      const url = buildConnectionUrl(\"http://example.com\", \"/events\", {\n        a: \"b\",\n        c: null,\n        d: undefined,\n      })\n      expect(url).toEqual(\"ws://example.com/events?a=b\")\n    })\n\n    test(\"should build url with array params\", () => {\n      const url = buildConnectionUrl(\"http://example.com\", \"/events\", {\n        a: [\"b\", \"c\"],\n        b: [1, 2],\n      })\n      expect(url).toEqual(\"ws://example.com/events?a=b%2Cc&b=1%2C2\")\n    })\n  })\n\n  describe(\"connectWs\", () => {\n    let mockWs: {[key: number]: any} // get websocket by connection attempt index\n    let mockWebSocket: any // mock implementation of WebSocket (new WebSocket())\n\n    beforeEach(() => {\n      const mockWsStub = {\n        onmessage: () => {},\n        onopen: () => {},\n        onclose: () => {},\n        onerror: () => {},\n        close() {\n          return jest\n            .fn(() => {\n              this.onclose()\n              // Prevent handlers from being called after close\n              // This is so that we emulate the behavior of the real WebSocket\n              // And don't accidentally simulate events on a closed connection\n              this.onclose = () => {}\n              this.onmessage = () => {}\n              this.onopen = () => {}\n              this.onerror = () => {}\n            })\n            .bind(this)()\n        },\n      }\n\n      let wsIdx = 0\n      mockWs = new Proxy({} as any, {\n        get(target, name) {\n          let idx = Number(name)\n          if (!isNaN(idx)) {\n            target[idx] = target[idx] || {...mockWsStub}\n            return target[idx]\n          }\n          return null\n        },\n      })\n      mockWebSocket = jest.fn().mockImplementation(() => {\n        return mockWs[wsIdx++]\n      })\n      jest.spyOn(WebSocketModule, \"WebSocket\").mockImplementation(mockWebSocket)\n    })\n\n    test(\"should connect to the websocket\", () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n      })\n      expect(mockWebSocket).toHaveBeenCalledWith(\"ws://example.com/events?a=b\")\n    })\n\n    test(\"should emit data events\", () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n      })\n      const mockListener = jest.fn()\n      connection.on(\"data\", mockListener)\n      mockWs[0].onmessage({data: '{\"foo\": \"bar\"}'})\n      expect(mockListener).toHaveBeenCalledWith({foo: \"bar\"})\n    })\n\n    test(\"should retry on close\", async () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n        retryLimit: 1,\n        retryIntervalMs: 0,\n      })\n      const mockCloseListener = jest.fn()\n      connection.on(\"close\", mockCloseListener)\n      mockWs[0].onclose({\n        code: 1006,\n        reason: \"connection failed\",\n      })\n      await new Promise(resolve => setTimeout(resolve, 0))\n      expect(mockCloseListener).not.toHaveBeenCalled()\n\n      mockWs[1].onopen()\n      await new Promise(resolve => setTimeout(resolve, 0))\n      expect(mockCloseListener).not.toHaveBeenCalled()\n      expect(mockWebSocket.mock.calls.length).toEqual(2)\n    })\n\n    test(\"should emit close & error events on final retry\", async () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n        retryLimit: 1,\n        retryIntervalMs: 0,\n      })\n      const mockCloseListener = jest.fn()\n      const mockErrorListener = jest.fn()\n      connection.on(\"close\", mockCloseListener)\n      connection.on(\"error\", mockErrorListener) // error must be handled so process doesn't exit\n      mockWs[0].onclose({\n        code: 1006,\n        reason: \"connection failed\",\n      })\n\n      // Wait for retry\n      await new Promise(resolve => setTimeout(resolve, 10))\n      expect(mockCloseListener).not.toHaveBeenCalled()\n      expect(mockErrorListener).not.toHaveBeenCalled()\n\n      mockWs[1].onclose({\n        code: 1006,\n        reason: \"connection failed\",\n      })\n      await new Promise(resolve => setTimeout(resolve, 0))\n      expect(mockCloseListener).toHaveBeenCalled()\n      expect(mockErrorListener).toHaveBeenCalled()\n    })\n\n    test(\"retry count should reset on successful connection\", async () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n        retryLimit: 1,\n        retryIntervalMs: 0,\n      })\n      const mockCloseListener = jest.fn()\n      const mockErrorListener = jest.fn()\n      connection.on(\"close\", mockCloseListener)\n      connection.on(\"error\", mockErrorListener)\n\n      mockWs[0].onclose({\n        code: 1006,\n        reason: \"connection failed\",\n      })\n      await new Promise(resolve => setTimeout(resolve, 10))\n      expect(mockCloseListener).not.toHaveBeenCalled()\n      expect(mockErrorListener).not.toHaveBeenCalled()\n\n      mockWs[1].onopen()\n      await new Promise(resolve => setTimeout(resolve, 0))\n\n      mockWs[1].onclose({\n        code: 1006,\n        reason: \"connection failed\",\n      })\n      await new Promise(resolve => setTimeout(resolve, 0))\n\n      expect(mockCloseListener).not.toHaveBeenCalled()\n      expect(mockErrorListener).not.toHaveBeenCalled()\n    })\n\n    test(\"should remove listeners when closed\", async () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n      })\n      const mockListener = jest.fn()\n      connection.on(\"data\", mockListener)\n      connection.close()\n\n      await new Promise(resolve => setTimeout(resolve, 10))\n\n      mockWs[0].onmessage({data: '{\"foo\": \"bar\"}'})\n\n      expect(mockListener).not.toHaveBeenCalled()\n    })\n\n    test(\"should not retry when closed by user\", async () => {\n      const connection = connectWs({\n        hostname: \"http://example.com\",\n        path: \"/events\",\n        params: {a: \"b\"},\n        retryLimit: 1,\n        retryIntervalMs: 0,\n      })\n      const mockCloseListener = jest.fn()\n      connection.on(\"close\", mockCloseListener)\n      connection.close()\n\n      await new Promise(resolve => setTimeout(resolve, 10))\n      expect(mockCloseListener).toHaveBeenCalled()\n      expect(mockWebSocket.mock.calls.length).toEqual(1)\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/connect-ws.ts",
    "content": "import {EventEmitter} from \"events\"\nimport {safeParseJSON} from \"./utils\"\nimport {StreamConnection} from \"@onflow/typedefs\"\nimport {WebSocket} from \"../subscribe/websocket\"\n\nexport class WebsocketError extends Error {\n  code?: number\n  reason?: string\n  wasClean?: boolean\n\n  constructor({\n    code,\n    reason,\n    message,\n    wasClean,\n  }: {\n    code?: number\n    reason?: string\n    message?: string\n    wasClean?: boolean\n  }) {\n    const msg = `\n      connectWs: connection closed with error${message ? `: ${message}` : \"\"}\n      ${code ? `code: ${code}` : \"\"}\n      ${reason ? `reason: ${reason}` : \"\"}\n      ${wasClean ? `wasClean: ${wasClean}` : \"\"}\n    `\n    super(msg)\n    this.name = \"WebsocketError\"\n    this.code = code\n    this.reason = reason\n    this.wasClean = false\n  }\n}\n\ntype WebSocketConnection<T> = StreamConnection<{\n  data: T\n}>\n\nexport function connectWs<T>({\n  hostname,\n  path,\n  params,\n  getParams,\n  retryLimit = 5,\n  retryIntervalMs = 1000,\n}: {\n  hostname: string\n  path: string\n  params?: Record<string, string>\n  getParams?: () => Record<string, string> | undefined\n  retryLimit?: number\n  retryIntervalMs?: number\n}): WebSocketConnection<T> {\n  if (getParams && params) {\n    throw new Error(\"connectWs: cannot specify both params and getParams\")\n  }\n  let outputEmitter = new EventEmitter()\n\n  let retryCount = 0\n  const resolveParams = getParams || (() => params)\n  let close = () => {}\n\n  ;(function connect() {\n    let userClosed = false\n    let hasOpened = false\n\n    // Build a websocket connection with correct protocol & params\n    const url = buildConnectionUrl(hostname, path, resolveParams())\n    const ws = new WebSocket(url)\n\n    ws.onmessage = function (e) {\n      const data = safeParseJSON(e.data)\n      if (data) {\n        outputEmitter.emit(\"data\", data)\n      } else {\n        outputEmitter.emit(\n          \"error\",\n          new WebsocketError({message: \"invalid JSON data\"})\n        )\n        this.close()\n      }\n    }\n\n    ws.onclose = function (e) {\n      if (userClosed) {\n        outputEmitter.emit(\"close\")\n        outputEmitter.removeAllListeners()\n        return\n      }\n\n      if (!hasOpened) {\n        if (retryCount < retryLimit) {\n          retryCount++\n          setTimeout(connect, retryIntervalMs)\n        } else {\n          outputEmitter.emit(\n            \"error\",\n            new WebsocketError({\n              wasClean: e.wasClean,\n              code: e.code,\n              reason: e.reason,\n              message: \"failed to connect\",\n            })\n          )\n\n          // Emit close event on next tick so that the error event is emitted first\n          setTimeout(() => {\n            outputEmitter.emit(\"close\")\n            outputEmitter.removeAllListeners()\n          })\n        }\n      } else {\n        // If the connection was established before closing, attempt to reconnect\n        setTimeout(connect, retryIntervalMs)\n      }\n    }\n\n    ws.onopen = function () {\n      hasOpened = true\n      retryCount = 0\n    }\n\n    close = () => {\n      userClosed = true\n      ws.close()\n    }\n  })()\n\n  return {\n    on(event: \"data\" | \"close\" | \"error\", listener: any) {\n      outputEmitter.on(event, listener)\n      return this\n    },\n    off(event: \"data\" | \"close\" | \"error\", listener: any) {\n      outputEmitter.off(event, listener)\n      return this\n    },\n    close() {\n      close()\n    },\n  }\n}\n\nexport function buildConnectionUrl(\n  hostname: string,\n  path?: string,\n  params?: Record<\n    string,\n    string | number | string[] | number[] | null | undefined\n  >\n) {\n  const url = new URL(path || \"\", hostname)\n  if (url.protocol === \"https:\") {\n    url.protocol = \"wss:\"\n  } else if (url.protocol === \"http:\") {\n    url.protocol = \"ws:\"\n  }\n\n  Object.entries(params || {}).forEach(([key, value]) => {\n    if (value) {\n      let formattedValue: string\n      if (Array.isArray(value)) {\n        formattedValue = value.join(\",\")\n      } else {\n        formattedValue = value.toString()\n      }\n      url.searchParams.append(key, formattedValue)\n    }\n  })\n\n  return url.toString()\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/http-request.js",
    "content": "import * as logger from \"@onflow/util-logger\"\nimport fetchTransport from \"cross-fetch\"\nimport {safeParseJSON} from \"./utils\"\nimport {combineURLs} from \"../utils/combine-urls\"\n\nconst AbortController =\n  globalThis.AbortController || require(\"abort-controller\")\n\nexport class HTTPRequestError extends Error {\n  constructor({\n    error,\n    hostname,\n    path,\n    method,\n    requestBody,\n    responseBody,\n    responseStatusText,\n    statusCode,\n  }) {\n    const msg = `\n      HTTP Request Error: An error occurred when interacting with the Access API.\n      ${error ? `error=${error}` : \"\"}\n      ${hostname ? `hostname=${hostname}` : \"\"}\n      ${path ? `path=${path}` : \"\"}\n      ${method ? `method=${method}` : \"\"}\n      ${requestBody ? `requestBody=${requestBody}` : \"\"}\n      ${responseBody ? `responseBody=${responseBody}` : \"\"}\n      ${responseStatusText ? `responseStatusText=${responseStatusText}` : \"\"}\n      ${statusCode ? `statusCode=${statusCode}` : \"\"}\n    `\n    super(msg)\n\n    this.name = \"HTTP Request Error\"\n    this.statusCode = statusCode\n    this.errorMessage = error\n  }\n}\n\n/**\n * Creates an HTTP Request to be sent to a REST Access API via Fetch API.\n *\n * @param {object} options - Options for the HTTP Request\n * @param {String} options.hostname - Access API Hostname\n * @param {String} options.path - Path to the resource on the Access API\n * @param {String} options.method - HTTP Method\n * @param {object} options.body - HTTP Request Body\n * @param {object} [options.headers] - HTTP Request Headers\n * @param {boolean} [options.enableRequestLogging=true] - Enable/Disable request logging\n * @param {number} [options.retryLimit=5] - Number of times to retry request\n * @param {number} [options.retryIntervalMs=1000] - Time in milliseconds to wait before retrying request\n * @param {number} [options.timeoutLimit=30000] - Time in milliseconds to wait before timing out request\n *\n * @returns JSON object response from Access API.\n */\nexport async function httpRequest({\n  hostname,\n  path,\n  method,\n  body,\n  headers,\n  retryLimit = 5,\n  retryIntervalMs = 1000,\n  timeoutLimit = 30000,\n  enableRequestLogging = true,\n}) {\n  const bodyJSON = body ? JSON.stringify(body) : null\n\n  function makeRequest() {\n    const controller = new AbortController()\n    const fetchTimeout = setTimeout(() => {\n      controller.abort()\n    }, timeoutLimit)\n\n    return fetchTransport(combineURLs(hostname, path).toString(), {\n      method: method,\n      body: bodyJSON,\n      headers,\n      signal: controller.signal,\n    })\n      .then(async res => {\n        if (res.ok) {\n          return res.json()\n        }\n\n        const responseText = await res.text().catch(() => null)\n        const response = safeParseJSON(responseText)\n\n        throw new HTTPRequestError({\n          error: response?.message,\n          hostname,\n          path,\n          method,\n          requestBody: bodyJSON,\n          responseBody: responseText,\n          responseStatusText: res.statusText,\n          statusCode: res.status,\n        })\n      })\n      .catch(async e => {\n        if (e instanceof HTTPRequestError) {\n          throw e\n        }\n\n        if (e.name === \"AbortError\") {\n          throw e\n        }\n\n        // Show AN error for all network errors\n        if (enableRequestLogging) {\n          await logger.log({\n            title: \"Access Node Error\",\n            message: `The provided access node ${hostname} does not appear to be a valid REST/HTTP access node.\n  Please verify that you are not unintentionally using a GRPC access node.\n  See more here: https://docs.onflow.org/fcl/reference/sdk-guidelines/#connect`,\n            level: logger.LEVELS.error,\n          })\n        }\n\n        throw new HTTPRequestError({\n          error: e?.message,\n          hostname,\n          path,\n          method,\n          requestBody: bodyJSON,\n        })\n      })\n      .finally(() => {\n        clearTimeout(fetchTimeout)\n      })\n  }\n\n  async function requestLoop(retryAttempt = 0) {\n    try {\n      const resp = await makeRequest()\n      return resp\n    } catch (error) {\n      const retryStatusCodes = [408, 429, 500, 502, 503, 504]\n\n      if (\n        error.name === \"AbortError\" ||\n        retryStatusCodes.includes(error.statusCode)\n      ) {\n        return await new Promise((resolve, reject) => {\n          if (retryAttempt < retryLimit) {\n            if (enableRequestLogging) {\n              console.warn(\n                `Access node unavailable, retrying in ${retryIntervalMs} ms...`\n              )\n            }\n            setTimeout(() => {\n              resolve(requestLoop(retryAttempt + 1))\n            }, retryIntervalMs)\n          } else {\n            reject(error)\n          }\n        })\n      } else {\n        throw error\n      }\n    }\n  }\n\n  // Keep retrying request until server available or max attempts exceeded\n  return await requestLoop()\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/http-request.test.js",
    "content": "import * as fetchTransport from \"cross-fetch\"\nimport {log} from \"@onflow/util-logger\"\nimport {httpRequest} from \"./http-request\"\nimport {Readable} from \"stream\"\njest.mock(\"cross-fetch\")\njest.mock(\"@onflow/util-logger\")\n\nconst mockHttpResponse = ({\n  status = 200,\n  body: bodyText = \"\",\n  statusText = null,\n  ...args\n}) => {\n  const body = new Readable()\n  body.push(bodyText)\n  body.push(null)\n\n  const readStreamToString = readableStream => {\n    let res = \"\",\n      current\n    while ((current = readableStream.read())) res += current\n    return res\n  }\n\n  return {\n    ok: status >= 200 && status < 300,\n    status,\n    body,\n    async json() {\n      return JSON.parse(readStreamToString(this.body))\n    },\n    async text() {\n      return readStreamToString(this.body)\n    },\n    statusText,\n    ...args,\n  }\n}\n\ndescribe(\"httpRequest\", () => {\n  test(\"makes valid fetch request\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n    spy.mockImplementation(async () => ({\n      ok: true,\n      status: 200,\n      body: JSON.stringify({\n        foo: \"bar\",\n      }),\n      async json() {\n        return JSON.parse(this.body)\n      },\n    }))\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      headers: {\n        Authorization: \"Bearer 1RyXjsFJfU\",\n      },\n    }\n\n    await httpRequest(opts)\n\n    await expect(spy).toHaveBeenCalledWith(`https://example.com/foo/bar`, {\n      method: opts.method,\n      body: JSON.stringify(opts.body),\n      headers: opts.headers,\n      signal: expect.anything(),\n    })\n  })\n\n  test(\"strips trailing slash from hostname\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n    spy.mockImplementation(async () => ({\n      ok: true,\n      status: 200,\n      body: JSON.stringify({\n        foo: \"bar\",\n      }),\n      async json() {\n        return JSON.parse(this.body)\n      },\n    }))\n\n    const opts = {\n      hostname: \"https://example.com/\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      headers: {\n        Authorization: \"Bearer 1RyXjsFJfU\",\n      },\n    }\n\n    await httpRequest(opts)\n\n    await expect(spy).toHaveBeenCalledWith(`https://example.com/foo/bar`, {\n      method: opts.method,\n      body: JSON.stringify(opts.body),\n      headers: opts.headers,\n      signal: expect.anything(),\n    })\n  })\n\n  test(\"returns result of valid http response\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n    const responseBody = {\n      foo: \"bar\",\n    }\n    spy.mockImplementation(async () =>\n      mockHttpResponse({\n        status: 200,\n        body: JSON.stringify(responseBody),\n      })\n    )\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      headers: {\n        Authorization: \"Bearer 1RyXjsFJfU\",\n      },\n    }\n\n    const result = await httpRequest(opts)\n\n    await expect(result).toEqual(responseBody)\n  })\n\n  test(\"handles http error properly, throws HTTP error\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n    spy.mockImplementation(async () =>\n      mockHttpResponse({\n        status: 400,\n        body: JSON.stringify({foo: \"bar\"}),\n        statusText: \"foo bar\",\n      })\n    )\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      headers: {\n        Authorization: \"Bearer 1RyXjsFJfU\",\n      },\n    }\n\n    await expect(httpRequest(opts)).rejects.toThrow(\"HTTP Request Error:\")\n  })\n\n  test(\"retries retriable error\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n\n    const mockBadResponse = mockHttpResponse({\n      body: \"\",\n      status: 429, // 429 is a retriable error\n      statusText: \"Too many requests\",\n    })\n\n    const goodBody = {\n      foo: \"bar\",\n    }\n    const mockGoodResponse = mockHttpResponse({\n      body: JSON.stringify(goodBody),\n      status: 200,\n    })\n\n    spy.mockImplementation(async () => {\n      if (spy.mock.calls.length === 1) return mockBadResponse\n      return mockGoodResponse\n    })\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n    }\n\n    const response = await httpRequest(opts)\n\n    await expect(response).toEqual(goodBody)\n  })\n\n  test(\"retries on request timeout\", async () => {\n    const spy = jest.spyOn(fetchTransport, \"default\")\n\n    const mockBadResponse = mockHttpResponse({\n      body: \"\",\n      status: 500,\n      statusText: \"Error\",\n    })\n\n    const goodBody = {\n      foo: \"bar\",\n    }\n    const mockGoodResponse = mockHttpResponse({\n      body: JSON.stringify(goodBody),\n      status: 200,\n    })\n\n    spy.mockImplementation(async () => {\n      if (spy.mock.calls.length === 1) {\n        return new Promise((res, rej) =>\n          setTimeout(() => res(mockBadResponse), 2000)\n        )\n      }\n      return mockGoodResponse\n    })\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      timeoutLimit: 500,\n    }\n\n    const response = await httpRequest(opts)\n\n    await expect(response).toEqual(goodBody)\n  })\n\n  test(\"handles fetch error properly, displays AN error\", async () => {\n    const fetchSpy = jest.spyOn(fetchTransport, \"default\")\n\n    fetchSpy.mockImplementation(() =>\n      Promise.reject(\n        mockHttpResponse({\n          body: JSON.stringify({\n            foo: \"bar\",\n          }),\n          status: 400,\n          statusText: \"foo bar\",\n        })\n      )\n    )\n\n    const logMock = jest.mocked(log)\n    logMock.mockImplementation(() => {})\n\n    const opts = {\n      hostname: \"https://example.com\",\n      path: \"/foo/bar\",\n      body: \"abc123\",\n      method: \"POST\",\n      headers: {\n        Authorization: \"Bearer 1RyXjsFJfU\",\n      },\n    }\n\n    await expect(httpRequest(opts)).rejects.toThrow(\"HTTP Request Error:\")\n    expect(logMock.mock.calls[0][0].title).toBe(\"Access Node Error\")\n  })\n\n  afterEach(() => {\n    jest.restoreAllMocks()\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-execute-script.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nasync function sendExecuteScriptAtBlockIDRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/scripts?block_id=${ix.block.id}`,\n    method: \"POST\",\n    body: {\n      script: context.Buffer.from(ix.message.cadence).toString(\"base64\"),\n      arguments: ix.message.arguments.map(arg =>\n        context.Buffer.from(\n          JSON.stringify(ix.arguments[arg].asArgument)\n        ).toString(\"base64\")\n      ),\n    },\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendExecuteScriptAtBlockHeightRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/scripts?block_height=${ix.block.height}`,\n    method: \"POST\",\n    body: {\n      script: context.Buffer.from(ix.message.cadence).toString(\"base64\"),\n      arguments: ix.message.arguments.map(arg =>\n        context.Buffer.from(\n          JSON.stringify(ix.arguments[arg].asArgument)\n        ).toString(\"base64\")\n      ),\n    },\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendExecuteScriptAtLatestBlockRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/scripts?block_height=${ix.block.isSealed ? \"sealed\" : \"final\"}`,\n    method: \"POST\",\n    body: {\n      script: context.Buffer.from(ix.message.cadence).toString(\"base64\"),\n      arguments: ix.message.arguments.map(arg =>\n        context.Buffer.from(\n          JSON.stringify(ix.arguments[arg].asArgument)\n        ).toString(\"base64\")\n      ),\n    },\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  ret.encodedData = JSON.parse(context.Buffer.from(res, \"base64\").toString())\n\n  return ret\n}\n\nexport async function sendExecuteScript(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Execute Script Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Execute Script Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Execute Script Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  if (ix.block.id) {\n    return await sendExecuteScriptAtBlockIDRequest(ix, context, opts)\n  } else if (ix.block.height) {\n    return await sendExecuteScriptAtBlockHeightRequest(ix, context, opts)\n  } else {\n    return await sendExecuteScriptAtLatestBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-execute-script.test.js",
    "content": "import {sendExecuteScript} from \"./send-execute-script.js\"\nimport * as types from \"@onflow/types\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  arg,\n  args,\n  atBlockHeight,\n  atBlockId,\n  build,\n  resolve,\n  response as responseADT,\n  script,\n  atLatestBlock,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Execute Script\", () => {\n  test(\"ExecuteScriptAtLatestBlock - sealed\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedJSONCDC = Buffer.from(\n      JSON.stringify({type: \"Int\", value: 123})\n    ).toString(\"base64\")\n\n    httpRequestMock.mockReturnValue(returnedJSONCDC)\n\n    const cadence = \"access(all) fun main(a: Int): Int { return a }\"\n\n    let response = await sendExecuteScript(\n      await resolve(\n        await build([\n          script(cadence),\n          args([arg(123, types.Int)]),\n          atLatestBlock(true),\n        ])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/scripts?block_height=sealed\",\n      method: \"POST\",\n      body: {\n        script:\n          \"YWNjZXNzKGFsbCkgZnVuIG1haW4oYTogSW50KTogSW50IHsgcmV0dXJuIGEgfQ==\",\n        arguments: [\"eyJ0eXBlIjoiSW50IiwidmFsdWUiOiIxMjMifQ==\"],\n      },\n    })\n    expect(response.encodedData).toEqual(\n      JSON.parse(Buffer.from(returnedJSONCDC, \"base64\").toString())\n    )\n  })\n\n  test(\"ExecuteScriptAtLatestBlock - final\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedJSONCDC = Buffer.from(\n      JSON.stringify({type: \"Int\", value: 123})\n    ).toString(\"base64\")\n\n    httpRequestMock.mockReturnValue(returnedJSONCDC)\n\n    const cadence = \"access(all) fun main(a: Int): Int { return a }\"\n\n    let response = await sendExecuteScript(\n      await resolve(\n        await build([script(cadence), args([arg(123, types.Int)])])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/scripts?block_height=final\",\n      method: \"POST\",\n      body: {\n        script:\n          \"YWNjZXNzKGFsbCkgZnVuIG1haW4oYTogSW50KTogSW50IHsgcmV0dXJuIGEgfQ==\",\n        arguments: [\"eyJ0eXBlIjoiSW50IiwidmFsdWUiOiIxMjMifQ==\"],\n      },\n    })\n    expect(response.encodedData).toEqual(\n      JSON.parse(Buffer.from(returnedJSONCDC, \"base64\").toString())\n    )\n  })\n\n  test(\"ExecuteScriptAtBlockID\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedJSONCDC = Buffer.from(\n      JSON.stringify({type: \"Int\", value: 123})\n    ).toString(\"base64\")\n\n    httpRequestMock.mockReturnValue(returnedJSONCDC)\n\n    const cadence = \"access(all) fun main(): Int { return 123 }\"\n\n    let response = await sendExecuteScript(\n      await resolve(await build([script(cadence), atBlockId(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/scripts?block_id=123\",\n      method: \"POST\",\n      body: {\n        script: \"YWNjZXNzKGFsbCkgZnVuIG1haW4oKTogSW50IHsgcmV0dXJuIDEyMyB9\",\n        arguments: [],\n      },\n    })\n    expect(response.encodedData).toEqual(\n      JSON.parse(Buffer.from(returnedJSONCDC, \"base64\").toString())\n    )\n  })\n\n  test(\"ExecuteScriptAtBlockHeight\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedJSONCDC = Buffer.from(\n      JSON.stringify({type: \"Int\", value: 123})\n    ).toString(\"base64\")\n\n    httpRequestMock.mockReturnValue(returnedJSONCDC)\n\n    const cadence = \"access(all) fun main(): Int { return 123 }\"\n\n    let response = await sendExecuteScript(\n      await resolve(await build([script(cadence), atBlockHeight(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/scripts?block_height=123\",\n      method: \"POST\",\n      body: {\n        script: \"YWNjZXNzKGFsbCkgZnVuIG1haW4oKTogSW50IHsgcmV0dXJuIDEyMyB9\",\n        arguments: [],\n      },\n    })\n    expect(response.encodedData).toEqual(\n      JSON.parse(Buffer.from(returnedJSONCDC, \"base64\").toString())\n    )\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-account.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nconst HashAlgorithmIDs = {\n  SHA2_256: 1,\n  SHA2_384: 2,\n  SHA3_256: 3,\n  SHA3_384: 4,\n  KMAC128_BLS_BLS12_381: 5,\n}\n\nconst SignatureAlgorithmIDs = {\n  ECDSA_P256: 1,\n  ECDSA_secp256k1: 2,\n  BLS_BLS12_381: 3,\n}\n\nasync function sendGetAccountAtBlockHeightRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/accounts/${ix.account.addr}?block_height=${ix.block.height}&expand=contracts,keys`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetAccountAtLatestBlockRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/accounts/${ix.account.addr}?block_height=${ix.block.isSealed ? \"sealed\" : \"final\"}&expand=contracts,keys`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  const unwrapContracts = contracts => {\n    const c = {}\n    if (!contracts) return c\n    for (let key of Object.keys(contracts)) {\n      c[key] = context.Buffer.from(contracts[key], \"base64\").toString()\n    }\n    return c\n  }\n\n  ret.account = {\n    address: res.address,\n    balance: Number(res.balance),\n    code: \"\",\n    contracts: unwrapContracts(res.contracts),\n    keys:\n      res.keys?.map(key => ({\n        index: Number(key.index),\n        publicKey: key.public_key.replace(/^0x/, \"\"),\n        signAlgo: SignatureAlgorithmIDs[key.signing_algorithm],\n        signAlgoString: key.signing_algorithm,\n        hashAlgo: HashAlgorithmIDs[key.hashing_algorithm],\n        hashAlgoString: key.hashing_algorithm,\n        sequenceNumber: Number(key.sequence_number),\n        weight: Number(key.weight),\n        revoked: key.revoked,\n      })) ?? [],\n  }\n\n  return ret\n}\n\nexport async function sendGetAccount(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Account Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Account Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Account Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  if (ix.block.height !== null) {\n    return await sendGetAccountAtBlockHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetAccountAtLatestBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-account.test.js",
    "content": "import {sendGetAccount} from \"./send-get-account.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  atLatestBlock,\n  build,\n  getAccount,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Get Account\", () => {\n  test(\"GetAccountAtBlockHeightRequest\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedAccount = {\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: \"10\",\n      contracts: {},\n      code: null,\n    }\n\n    httpRequestMock.mockReturnValue(returnedAccount)\n\n    const response = await sendGetAccount(\n      await resolve(\n        await build([getAccount(\"0x1654653399040a61\"), atBlockHeight(123)])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/accounts/1654653399040a61?block_height=123&expand=contracts,keys\",\n      method: \"GET\",\n      body: null,\n    })\n    expect(response.account).toEqual({\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: 10,\n      contracts: {},\n      code: \"\",\n    })\n  })\n\n  test(\"GetAccountAtLatestBlockRequest - final\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedAccount = {\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: \"10\",\n      contracts: {},\n      code: null,\n    }\n\n    httpRequestMock.mockReturnValue(returnedAccount)\n\n    const response = await sendGetAccount(\n      await resolve(await build([getAccount(\"0x1654653399040a61\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/accounts/1654653399040a61?block_height=final&expand=contracts,keys\",\n      method: \"GET\",\n      body: null,\n    })\n    expect(response.account).toEqual({\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: 10,\n      contracts: {},\n      code: \"\",\n    })\n  })\n\n  test(\"GetAccountAtLatestBlockRequest - sealed\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedAccount = {\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: \"10\",\n      contracts: {},\n      code: null,\n    }\n\n    httpRequestMock.mockReturnValue(returnedAccount)\n\n    const response = await sendGetAccount(\n      await resolve(\n        await build([getAccount(\"0x1654653399040a61\"), atLatestBlock(true)])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/accounts/1654653399040a61?block_height=sealed&expand=contracts,keys\",\n      method: \"GET\",\n      body: null,\n    })\n    expect(response.account).toEqual({\n      address: \"0x1654653399040a61\",\n      keys: [],\n      balance: 10,\n      contracts: {},\n      code: \"\",\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-block-header.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nasync function sendGetBlockHeaderByIDRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks/${ix.block.id}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockHeaderByHeightRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks?height=${ix.block.height}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetLatestBlockHeaderRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const height = ix.block?.isSealed ? \"sealed\" : \"final\"\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks?height=${height}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  const block = res.length ? res[0] : null\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.blockHeader = {\n    id: block.header.id,\n    parentId: block.header.parent_id,\n    height: Number(block.header.height),\n    timestamp: block.header.timestamp,\n  }\n\n  return ret\n}\n\nexport async function sendGetBlockHeader(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Block Header Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Block Header Error: context.response must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionHasBlockID = ix.block.id !== null\n  const interactionHasBlockHeight = ix.block.height !== null\n\n  if (interactionHasBlockID) {\n    return await sendGetBlockHeaderByIDRequest(ix, context, opts)\n  } else if (interactionHasBlockHeight) {\n    return await sendGetBlockHeaderByHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetLatestBlockHeaderRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-block-header.test.js",
    "content": "import {sendGetBlockHeader} from \"./send-get-block-header.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  atBlockId,\n  build,\n  getBlockHeader,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Get Block Header\", () => {\n  test(\"GetBlockHeaderByID\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlockHeader)\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(), atBlockId(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks/a1b2c3\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.blockHeader).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    })\n  })\n\n  test(\"GetBlockHeaderByHeight\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlockHeader)\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(), atBlockHeight(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=123\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.blockHeader).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    })\n  })\n\n  test(\"GetLatestBlockHeader - isSealed = false\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlockHeader)\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=final\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.blockHeader).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    })\n  })\n\n  test(\"GetLatestBlockHeader - isSealed = true\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlockHeader = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: 123,\n          timestamp: dateNow.toISOString(),\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlockHeader)\n\n    const response = await sendGetBlockHeader(\n      await resolve(await build([getBlockHeader(true)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=sealed\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.blockHeader).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-block.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nasync function sendGetBlockByIDRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks/${ix.block.id}?expand=payload`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockByHeightRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks?height=${ix.block.height}&expand=payload`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetBlockRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const height = ix.block?.isSealed ? \"sealed\" : \"final\"\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/blocks?height=${height}&expand=payload`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  const block = res.length ? res[0] : null\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.block = {\n    id: block.header.id,\n    parentId: block.header.parent_id,\n    height: Number(block.header.height),\n    timestamp: block.header.timestamp,\n    parentVoterSignature: block.header.parent_voter_signature,\n    collectionGuarantees: block.payload.collection_guarantees.map(\n      collectionGuarantee => ({\n        collectionId: collectionGuarantee.collection_id,\n        signerIds: collectionGuarantee.signer_ids,\n      })\n    ),\n    blockSeals: block.payload.block_seals.map(blockSeal => ({\n      blockId: blockSeal.block_id,\n      executionReceiptId: blockSeal.result_id,\n    })),\n  }\n\n  return ret\n}\n\nexport async function sendGetBlock(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Block Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Block Error: context.response must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionHasBlockID = ix.block.id !== null\n  const interactionHasBlockHeight = ix.block.height !== null\n\n  if (interactionHasBlockID) {\n    return await sendGetBlockByIDRequest(ix, context, opts)\n  } else if (interactionHasBlockHeight) {\n    return await sendGetBlockByHeightRequest(ix, context, opts)\n  } else {\n    return await sendGetBlockRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-block.test.js",
    "content": "import {sendGetBlock} from \"./send-get-block.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  atBlockHeight,\n  atBlockId,\n  build,\n  getBlock,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Get Block\", () => {\n  test(\"GetBlockByID\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n        payload: {\n          collection_guarantees: [],\n          block_seals: [],\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlock)\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(), atBlockId(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks/a1b2c3?expand=payload\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.block).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    })\n  })\n\n  test(\"GetBlockByHeight\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n        payload: {\n          collection_guarantees: [],\n          block_seals: [],\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlock)\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(), atBlockHeight(123)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=123&expand=payload\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.block).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    })\n  })\n\n  test(\"GetLatestBlock - isSealed = false\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n        payload: {\n          collection_guarantees: [],\n          block_seals: [],\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlock)\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=final&expand=payload\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.block).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    })\n  })\n\n  test(\"GetLatestBlock - isSealed = true\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedBlock = [\n      {\n        header: {\n          id: \"a1b2c3\",\n          parent_id: \"a1b2c3\",\n          height: \"123\",\n          timestamp: dateNow.toISOString(),\n        },\n        payload: {\n          collection_guarantees: [],\n          block_seals: [],\n        },\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedBlock)\n\n    const response = await sendGetBlock(\n      await resolve(await build([getBlock(true)])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=sealed&expand=payload\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.block).toEqual({\n      id: \"a1b2c3\",\n      parentId: \"a1b2c3\",\n      height: 123,\n      timestamp: dateNow.toISOString(),\n      collectionGuarantees: [],\n      blockSeals: [],\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-collection.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nexport async function sendGetCollection(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Collection Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Collection Error: context.response must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/collections/${ix.collection.id}?expand=transactions`,\n    method: \"GET\",\n    body: null,\n  })\n\n  const ret = context.response()\n  ret.tag = ix.tag\n  ret.collection = {\n    id: res.id,\n    transactionIds: res.transactions.map(transaction => transaction.id),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-collection.test.js",
    "content": "import {sendGetCollection} from \"./send-get-collection.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getCollection,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Get Collection\", () => {\n  test(\"GetCollection\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedCollection = {\n      id: \"a1b2c3\",\n      transactions: [\n        {\n          id: \"a1b2c3\",\n        },\n      ],\n    }\n\n    httpRequestMock.mockReturnValue(returnedCollection)\n\n    const response = await sendGetCollection(\n      await resolve(await build([getCollection(\"a1b2c3\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/collections/a1b2c3?expand=transactions\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.collection.id).toBe(returnedCollection.id)\n    expect(response.collection.transactionIds[0]).toBe(\"a1b2c3\")\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-events.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nasync function sendGetEventsForHeightRangeRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/events?type=${ix.events.eventType}&start_height=${ix.events.start}&end_height=${ix.events.end}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nasync function sendGetEventsForBlockIDsRequest(ix, context, opts) {\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/events?type=${\n      ix.events.eventType\n    }&block_ids=${ix.events.blockIds.join(\",\")}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  return constructResponse(ix, context, res)\n}\n\nfunction constructResponse(ix, context, res) {\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  ret.events = []\n  res.forEach(block =>\n    block.events\n      ? block.events.forEach(event =>\n          ret.events.push({\n            blockId: block.block_id,\n            blockHeight: Number(block.block_height),\n            blockTimestamp: block.block_timestamp,\n            type: event.type,\n            transactionId: event.transaction_id,\n            transactionIndex: Number(event.transaction_index),\n            eventIndex: Number(event.event_index),\n            payload: JSON.parse(\n              context.Buffer.from(event.payload, \"base64\").toString()\n            ),\n          })\n        )\n      : null\n  )\n\n  return ret\n}\n\nexport async function sendGetEvents(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Get Events Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Get Events Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Events Error: context.Buffer must be defined.`\n  )\n\n  ix = await ix\n\n  const interactionContainsBlockHeightRange = ix.events.start !== null\n  const interactionContainsBlockIDsList =\n    Array.isArray(ix.events.blockIds) && ix.events.blockIds.length > 0\n\n  invariant(\n    interactionContainsBlockHeightRange || interactionContainsBlockIDsList,\n    \"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified.\"\n  )\n\n  if (interactionContainsBlockHeightRange) {\n    return await sendGetEventsForHeightRangeRequest(ix, context, opts)\n  } else {\n    return await sendGetEventsForBlockIDsRequest(ix, context, opts)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-events.test.js",
    "content": "import {sendGetEvents} from \"./send-get-events.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getEventsAtBlockHeightRange,\n  getEventsAtBlockIds,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Send Get Events\", () => {\n  test(\"GetEventsForBlockIDs\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedEvents = [\n      {\n        block_id: \"a1b2c3\",\n        block_height: \"123\",\n        block_timestamp: dateNow.toISOString(),\n        events: [\n          {\n            type: \"MyEvent\",\n            transaction_id: \"a1b2c3\",\n            transaction_index: \"123\",\n            event_index: \"456\",\n            payload: Buffer.from(\n              JSON.stringify({type: \"String\", value: \"Hello, Flow\"})\n            ).toString(\"base64\"),\n          },\n        ],\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedEvents)\n\n    const response = await sendGetEvents(\n      await resolve(await build([getEventsAtBlockIds(\"MyEvent\", [\"a1b2c3\"])])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/events?type=MyEvent&block_ids=a1b2c3\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.events[0]).toStrictEqual({\n      blockId: \"a1b2c3\",\n      blockHeight: 123,\n      blockTimestamp: dateNow.toISOString(),\n      type: \"MyEvent\",\n      transactionId: \"a1b2c3\",\n      transactionIndex: 123,\n      eventIndex: 456,\n      payload: {type: \"String\", value: \"Hello, Flow\"},\n    })\n  })\n\n  test(\"GetEventsForHeightRange\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const dateNow = new Date(Date.now())\n\n    const returnedEvents = [\n      {\n        block_id: \"a1b2c3\",\n        block_height: \"123\",\n        block_timestamp: dateNow.toISOString(),\n        events: [\n          {\n            type: \"MyEvent\",\n            transaction_id: \"a1b2c3\",\n            transaction_index: \"123\",\n            event_index: \"456\",\n            payload: Buffer.from(\n              JSON.stringify({type: \"String\", value: \"Hello, Flow\"})\n            ).toString(\"base64\"),\n          },\n        ],\n      },\n    ]\n\n    httpRequestMock.mockReturnValue(returnedEvents)\n\n    const response = await sendGetEvents(\n      await resolve(\n        await build([getEventsAtBlockHeightRange(\"MyEvent\", 123, 456)])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/events?type=MyEvent&start_height=123&end_height=456\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.events[0]).toStrictEqual({\n      blockId: \"a1b2c3\",\n      blockHeight: 123,\n      blockTimestamp: dateNow.toISOString(),\n      type: \"MyEvent\",\n      transactionId: \"a1b2c3\",\n      transactionIndex: 123,\n      eventIndex: 456,\n      payload: {type: \"String\", value: \"Hello, Flow\"},\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-network-parameters.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nexport async function sendGetNetworkParameters(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Network Parameters Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Network Parameters Error: context.response must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  ix = await ix\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/network/parameters`,\n    method: \"GET\",\n    body: null,\n    enableRequestLogging: opts.enableRequestLogging ?? true,\n  })\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  ret.networkParameters = {\n    chainId: res.chain_id,\n  }\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-network-parameters.test.js",
    "content": "import {sendGetNetworkParameters} from \"./send-get-network-parameters.js\"\nimport {\n  build,\n  getNetworkParameters,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Network Parameters\", () => {\n  test(\"GetNetworkParameters\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedNetworkParameters = {\n      chain_id: \"flow-emulator\",\n    }\n\n    httpRequestMock.mockReturnValue(returnedNetworkParameters)\n\n    const response = await sendGetNetworkParameters(\n      await resolve(await build([getNetworkParameters()])),\n      {\n        response: responseADT,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/network/parameters\",\n      method: \"GET\",\n      body: null,\n      enableRequestLogging: true,\n    })\n\n    expect(response.networkParameters).toStrictEqual({\n      chainId: \"flow-emulator\",\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-node-version-info.test.ts",
    "content": "import {sendGetNodeVersionInfo} from \"./send-get-node-version-info\"\nimport {\n  build,\n  getNodeVersionInfo,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Node Version Info\", () => {\n  test(\"GetNodeVersionInfo\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedNodeVersionInfo = {\n      semver: \"v0.33.11-access-register-cache\",\n      commit: \"4ffc02f147654ef3a936ab1b435e00a5d5d37701\",\n      spork_id:\n        \"709530929e4968daff19c303ef1fc5f0a7649b3a1ce7d5ee5202056969524c94\",\n      protocol_version: \"32\",\n      spork_root_block_height: \"65264619\",\n      node_root_block_height: \"65264619\",\n    }\n\n    httpRequestMock.mockReturnValue(returnedNodeVersionInfo)\n\n    const response = await sendGetNodeVersionInfo(\n      await resolve(await build([getNodeVersionInfo()])),\n      {\n        response: responseADT,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost:8888\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost:8888\",\n      path: \"/v1/node_version_info\",\n      method: \"GET\",\n    })\n\n    expect(response.nodeVersionInfo).toStrictEqual({\n      semver: \"v0.33.11-access-register-cache\",\n      commit: \"4ffc02f147654ef3a936ab1b435e00a5d5d37701\",\n      sporkId:\n        \"709530929e4968daff19c303ef1fc5f0a7649b3a1ce7d5ee5202056969524c94\",\n      protocolVersion: 32,\n      sporkRootBlockHeight: 65264619,\n      nodeRootBlockHeight: 65264619,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-node-version-info.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\nimport {Interaction} from \"@onflow/typedefs\"\n\nexport async function sendGetNodeVersionInfo(\n  ix: Interaction | Promise<Interaction>,\n  context: any = {},\n  opts: any = {}\n) {\n  invariant(\n    opts.node,\n    `SDK Send Get Node Version Info Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Node Verison Info Error: context.response must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  ix = await ix\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/node_version_info`,\n    method: \"GET\",\n  })\n\n  let ret = context.response()\n  ret.tag = ix.tag\n\n  ret.nodeVersionInfo = {\n    semver: res.semver,\n    commit: res.commit,\n    sporkId: res.spork_id,\n    protocolVersion: parseInt(res.protocol_version),\n    sporkRootBlockHeight: parseInt(res.spork_root_block_height),\n    nodeRootBlockHeight: parseInt(res.node_root_block_height),\n  }\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-transaction-status.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nconst STATUS_MAP = {\n  UNKNOWN: 0,\n  PENDING: 1,\n  FINALIZED: 2,\n  EXECUTED: 3,\n  SEALED: 4,\n  EXPIRED: 5,\n}\n\nexport async function sendGetTransactionStatus(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Transaction Status Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Transaction Status Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Transaction Status Error: context.Buffer must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  ix = await ix\n\n  const blockId = ix && ix.block && ix.block.id\n  const path = blockId\n    ? `/v1/transaction_results/${ix.transaction.id}?block_id=${encodeURIComponent(\n        blockId\n      )}`\n    : `/v1/transaction_results/${ix.transaction.id}`\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path,\n    method: \"GET\",\n    body: null,\n  })\n\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.transactionStatus = {\n    blockId: res.block_id,\n    status: STATUS_MAP[res.status.toUpperCase()] || \"\",\n    statusString: res.status.toUpperCase(),\n    statusCode: res.status_code,\n    errorMessage: res.error_message,\n    events: res.events.map(event => ({\n      type: event.type,\n      transactionId: event.transaction_id,\n      transactionIndex: Number(event.transaction_index),\n      eventIndex: Number(event.event_index),\n      payload: JSON.parse(\n        context.Buffer.from(event.payload, \"base64\").toString()\n      ),\n    })),\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-transaction-status.test.js",
    "content": "import {sendGetTransactionStatus} from \"./send-get-transaction-status.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getTransactionStatus,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Transaction Status\", () => {\n  test(\"GetTransactionResult\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransactionStatus = {\n      blockId: \"abc123\",\n      status: \"Pending\",\n      status_code: 0,\n      error_message: \"No Error\",\n      computation_used: \"100\",\n      block_id: \"abc123\",\n      events: [\n        {\n          type: \"MyEvent\",\n          transaction_id: \"a1b2c3\",\n          transaction_index: \"123\",\n          event_index: \"456\",\n          payload: Buffer.from(\n            JSON.stringify({type: \"String\", value: \"Hello, Flow\"})\n          ).toString(\"base64\"),\n        },\n      ],\n    }\n\n    httpRequestMock.mockReturnValue(returnedTransactionStatus)\n\n    const response = await sendGetTransactionStatus(\n      await resolve(await build([getTransactionStatus(\"MyTxID\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transaction_results/MyTxID\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.transactionStatus).toStrictEqual({\n      blockId: \"abc123\",\n      status: 1,\n      statusString: \"PENDING\",\n      statusCode: 0,\n      errorMessage: \"No Error\",\n      events: [\n        {\n          type: \"MyEvent\",\n          transactionId: \"a1b2c3\",\n          transactionIndex: 123,\n          eventIndex: 456,\n          payload: {type: \"String\", value: \"Hello, Flow\"},\n        },\n      ],\n    })\n  })\n\n  test(\"GetTransactionResult with decimal transaction id passes through\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransactionStatus = {\n      status: \"Sealed\",\n      status_code: 0,\n      error_message: \"\",\n      computation_used: \"100\",\n      block_id: \"abc123\",\n      events: [],\n    }\n\n    httpRequestMock.mockReturnValue(returnedTransactionStatus)\n\n    await sendGetTransactionStatus(\n      await resolve(await build([getTransactionStatus(\"12453151\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transaction_results/12453151\",\n      method: \"GET\",\n      body: null,\n    })\n  })\n\n  test(\"GetTransactionResult with block_id query when atBlockId is provided\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransactionStatus = {\n      status: \"Sealed\",\n      status_code: 0,\n      error_message: \"\",\n      computation_used: \"100\",\n      block_id: \"blockABC\",\n      events: [],\n    }\n\n    httpRequestMock.mockReturnValue(returnedTransactionStatus)\n\n    const response = await sendGetTransactionStatus(\n      await resolve(\n        await build([\n          getTransactionStatus(\"MyTxID\"),\n          // set block id through existing builder\n          ix => ({...ix, block: {...ix.block, id: \"blockABC\"}}),\n        ])\n      ),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transaction_results/MyTxID?block_id=blockABC\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.transactionStatus.blockId).toBe(\"blockABC\")\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-transaction.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nexport async function sendGetTransaction(ix, context = {}, opts = {}) {\n  invariant(\n    opts.node,\n    `SDK Send Get Transaction Error: opts.node must be defined.`\n  )\n  invariant(\n    context.response,\n    `SDK Send Get Transaction Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Get Transaction Error: context.Buffer must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  ix = await ix\n\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/transactions/${ix.transaction.id}`,\n    method: \"GET\",\n    body: null,\n  })\n\n  const unwrapKey = key => ({\n    address: key.address,\n    keyId: Number(key.key_index),\n    sequenceNumber: Number(key.sequence_number),\n  })\n\n  const unwrapSignature = sig => ({\n    address: sig.address,\n    keyId: Number(sig.key_index),\n    signature: sig.signature,\n    ...(sig.extension_data\n      ? {\n          extensionData: context.Buffer.from(\n            sig.extension_data,\n            \"base64\"\n          ).toString(\"hex\"),\n        }\n      : {}),\n  })\n\n  const unwrapArg = arg =>\n    JSON.parse(context.Buffer.from(arg, \"base64\").toString())\n\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.transaction = {\n    script: context.Buffer.from(res.script, \"base64\").toString(),\n    args: [...res.arguments.map(unwrapArg)],\n    referenceBlockId: res.reference_block_id,\n    gasLimit: Number(res.gas_limit),\n    payer: res.payer,\n    proposalKey: res.proposal_key\n      ? unwrapKey(res.proposal_key)\n      : res.proposal_key,\n    authorizers: res.authorizers,\n    payloadSignatures: [...res.payload_signatures.map(unwrapSignature)],\n    envelopeSignatures: [...res.envelope_signatures.map(unwrapSignature)],\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-get-transaction.test.js",
    "content": "import {sendGetTransaction} from \"./send-get-transaction.js\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {\n  build,\n  getTransaction,\n  resolve,\n  response as responseADT,\n} from \"@onflow/sdk\"\n\ndescribe(\"Get Transaction\", () => {\n  test(\"GetTransactionResult\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransaction = {\n      script: \"Q2FkZW5jZSBDb2Rl\",\n      arguments: [],\n      reference_block_id: \"a1b2c3\",\n      gas_limit: \"123\",\n      proposal_key: {\n        address: \"1654653399040a61\",\n        key_index: \"1\",\n        signer_index: \"0\",\n        sequence_number: \"1\",\n      },\n      payer: \"1654653399040a61\",\n      authorizers: [],\n      payload_signatures: [\n        {\n          address: \"1654653399040a61\",\n          key_index: \"1\",\n          signature: \"001122\",\n          extension_data: Buffer.from(\"abcd\", \"hex\").toString(\"base64\"),\n        },\n      ],\n      envelope_signatures: [\n        {\n          address: \"1654653399040a61\",\n          key_index: \"1\",\n          signature: \"aabbcc\",\n          extension_data: Buffer.from(\"deadbeef\", \"hex\").toString(\"base64\"),\n        },\n      ],\n    }\n\n    httpRequestMock.mockReturnValue(returnedTransaction)\n\n    const response = await sendGetTransaction(\n      await resolve(await build([getTransaction(\"MyTxID\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transactions/MyTxID\",\n      method: \"GET\",\n      body: null,\n    })\n\n    expect(response.transaction).toStrictEqual({\n      script: \"Cadence Code\",\n      args: [],\n      referenceBlockId: \"a1b2c3\",\n      gasLimit: 123,\n      proposalKey: {\n        address: \"1654653399040a61\",\n        keyId: 1,\n        sequenceNumber: 1,\n      },\n      payer: \"1654653399040a61\",\n      authorizers: [],\n      payloadSignatures: [\n        {\n          address: \"1654653399040a61\",\n          keyId: 1,\n          signature: \"001122\",\n          extensionData: \"abcd\",\n        },\n      ],\n      envelopeSignatures: [\n        {\n          address: \"1654653399040a61\",\n          keyId: 1,\n          signature: \"aabbcc\",\n          extensionData: \"deadbeef\",\n        },\n      ],\n    })\n  })\n\n  test(\"GetTransaction with decimal transaction id passes through\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransaction = {\n      script: \"Q2FkZW5jZSBDb2Rl\",\n      arguments: [],\n      reference_block_id: \"a1b2c3\",\n      gas_limit: \"123\",\n      proposal_key: {\n        address: \"1654653399040a61\",\n        key_index: \"1\",\n        signer_index: \"0\",\n        sequence_number: \"1\",\n      },\n      payer: \"1654653399040a61\",\n      authorizers: [],\n      payload_signatures: [],\n      envelope_signatures: [],\n    }\n\n    httpRequestMock.mockReturnValue(returnedTransaction)\n\n    await sendGetTransaction(\n      await resolve(await build([getTransaction(\"12453151\")])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transactions/12453151\",\n      method: \"GET\",\n      body: null,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-http.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {sendTransaction} from \"./send-transaction.js\"\nimport {sendGetTransactionStatus} from \"./send-get-transaction-status.js\"\nimport {sendGetTransaction} from \"./send-get-transaction.js\"\nimport {sendExecuteScript} from \"./send-execute-script.js\"\nimport {sendGetAccount} from \"./send-get-account.js\"\nimport {sendGetEvents} from \"./send-get-events.js\"\nimport {connectSubscribeEvents} from \"./connect-subscribe-events.js\"\nimport {sendGetBlock} from \"./send-get-block.js\"\nimport {sendGetBlockHeader} from \"./send-get-block-header.js\"\nimport {sendGetCollection} from \"./send-get-collection.js\"\nimport {sendPing, ISendPingContext} from \"./send-ping.js\"\nimport {sendGetNetworkParameters} from \"./send-get-network-parameters.js\"\nimport {Interaction} from \"@onflow/typedefs\"\nimport {sendGetNodeVersionInfo} from \"./send-get-node-version-info.js\"\n\ninterface InteractionModule {\n  isTransaction: (ix: Interaction) => boolean\n  isGetTransactionStatus: (ix: Interaction) => boolean\n  isGetTransaction: (ix: Interaction) => boolean\n  isScript: (ix: Interaction) => boolean\n  isGetAccount: (ix: Interaction) => boolean\n  isGetEvents: (ix: Interaction) => boolean\n  isGetBlock: (ix: Interaction) => boolean\n  isGetBlockHeader: (ix: Interaction) => boolean\n  isGetCollection: (ix: Interaction) => boolean\n  isPing: (ix: Interaction) => boolean\n  isGetNetworkParameters: (ix: Interaction) => boolean\n  isSubscribeEvents?: (ix: Interaction) => boolean\n  isGetNodeVersionInfo?: (ix: Interaction) => boolean\n}\ninterface IContext extends ISendPingContext {\n  ix: InteractionModule\n}\n\ninterface IOptsCommon {\n  node?: string\n}\n\ninterface IOpts extends IOptsCommon {\n  sendTransaction?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetTransactionStatus?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetTransaction?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendExecuteScript?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetAccount?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetEvents?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetBlockHeader?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetCollection?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendPing?: (ix: Interaction, context: IContext, opts: IOptsCommon) => void\n  sendGetBlock?: (ix: Interaction, context: IContext, opts: IOptsCommon) => void\n  sendGetNetworkParameters?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  connectSubscribeEvents?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetNodeVersionInfo?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n}\n\nexport const send = async (\n  ix: Interaction | Promise<Interaction>,\n  context: IContext,\n  opts: IOpts = {}\n) => {\n  invariant(\n    Boolean(opts?.node),\n    `SDK Send Error: Either opts.node or \"accessNode.api\" in config must be defined.`\n  )\n  invariant(Boolean(context.ix), `SDK Send Error: context.ix must be defined.`)\n\n  ix = await ix\n\n  // prettier-ignore\n  switch (true) {\n    case context.ix.isTransaction(ix):\n      return opts.sendTransaction ? opts.sendTransaction(ix, context, opts) : sendTransaction(ix, context, opts)\n    case context.ix.isGetTransactionStatus(ix):\n      return opts.sendGetTransactionStatus ? opts.sendGetTransactionStatus(ix, context, opts) : sendGetTransactionStatus(ix, context, opts)\n    case context.ix.isGetTransaction(ix):\n      return opts.sendGetTransaction ? opts.sendGetTransaction(ix, context, opts) : sendGetTransaction(ix, context, opts)\n    case context.ix.isScript(ix):\n      return opts.sendExecuteScript ? opts.sendExecuteScript(ix, context, opts) : sendExecuteScript(ix, context, opts)\n    case context.ix.isGetAccount(ix):\n      return opts.sendGetAccount ? opts.sendGetAccount(ix, context, opts) : sendGetAccount(ix, context, opts)\n    case context.ix.isGetEvents(ix):\n      return opts.sendGetEvents ? opts.sendGetEvents(ix, context, opts) : sendGetEvents(ix, context, opts)\n    case context.ix.isSubscribeEvents?.(ix):\n      return opts.connectSubscribeEvents ? opts.connectSubscribeEvents(ix, context, opts) : connectSubscribeEvents(ix, context, opts)\n    case context.ix.isGetBlock(ix):\n      return opts.sendGetBlock ? opts.sendGetBlock(ix, context, opts) : sendGetBlock(ix, context, opts)\n    case context.ix.isGetBlockHeader(ix):\n      return opts.sendGetBlockHeader ? opts.sendGetBlockHeader(ix, context, opts) : sendGetBlockHeader(ix, context, opts)\n    case context.ix.isGetCollection(ix):\n      return opts.sendGetCollection ? opts.sendGetCollection(ix, context, opts) : sendGetCollection(ix, context, opts)\n    case context.ix.isPing(ix):\n      return opts.sendPing ? opts.sendPing(ix, context, opts) : sendPing(ix, context, opts)\n    case context.ix.isGetNetworkParameters(ix):\n      return opts.sendGetNetworkParameters ? opts.sendGetNetworkParameters(ix, context, opts) : sendGetNetworkParameters(ix, context, opts)\n    case context.ix.isGetNodeVersionInfo?.(ix):\n      return opts.sendGetNodeVersionInfo ? opts.sendGetNodeVersionInfo(ix, context, opts) : sendGetNodeVersionInfo(ix, context, opts)\n    default:\n      return ix\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-ping.test.ts",
    "content": "import {sendPing} from \"./send-ping\"\nimport {Buffer} from \"@onflow/rlp\"\nimport {build, ping, resolve, response as responseADT} from \"@onflow/sdk\"\n\ndescribe(\"Ping\", () => {\n  test(\"Ping\", async () => {\n    const httpRequestMock = jest.fn()\n\n    httpRequestMock.mockReturnValue({})\n\n    await sendPing(\n      await resolve(await build([ping()])),\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/blocks?height=sealed\",\n      method: \"GET\",\n      body: null,\n    })\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/send-ping.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\nimport {Interaction} from \"@onflow/typedefs\"\n\nexport interface ISendPingContext {\n  response?: Function\n}\n\ninterface ISendPingOpts {\n  node?: string\n  httpRequest?: any\n}\n\nexport async function sendPing(\n  ix: Interaction,\n  context: ISendPingContext = {},\n  opts: ISendPingOpts = {}\n) {\n  invariant(\n    Boolean(opts.node),\n    `SDK Send Ping Error: opts.node must be defined.`\n  )\n  invariant(\n    Boolean(context.response),\n    `SDK Send Ping Error: context.response must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  await httpRequest({\n    hostname: opts.node,\n    path: \"/v1/blocks?height=sealed\",\n    method: \"GET\",\n    body: null,\n  })\n\n  let ret = typeof context?.response === \"function\" ? context.response() : {}\n  ret.tag = ix.tag\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-transaction.js",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {sansPrefix} from \"@onflow/util-address\"\nimport {httpRequest as defaultHttpRequest} from \"./http-request.js\"\n\nconst idof = acct => `${withPrefix(acct.addr)}-${acct.keyId}`\n\nexport async function sendTransaction(ix, context = {}, opts = {}) {\n  invariant(opts.node, `SDK Send Transaction Error: opts.node must be defined.`)\n  invariant(\n    context.response,\n    `SDK Send Transaction Error: context.response must be defined.`\n  )\n  invariant(\n    context.Buffer,\n    `SDK Send Transaction Error: context.Buffer must be defined.`\n  )\n\n  const httpRequest = opts.httpRequest || defaultHttpRequest\n\n  ix = await ix\n\n  // Apply Non Payer Signatures to Payload Signatures\n  let payloadSignatures = []\n  for (let acct of Object.values(ix.accounts)) {\n    try {\n      if (!acct.role.payer && acct.signature != null) {\n        const signature = {\n          address: sansPrefix(acct.addr),\n          key_index: String(acct.keyId),\n          signature: context.Buffer.from(acct.signature, \"hex\").toString(\n            \"base64\"\n          ),\n        }\n        if (acct.extensionData != null) {\n          const b64 = context.Buffer.from(acct.extensionData, \"hex\").toString(\n            \"base64\"\n          )\n          if (b64 != null) signature.extension_data = b64\n        }\n        if (\n          !payloadSignatures.find(\n            existingSignature =>\n              existingSignature.address === signature.address &&\n              existingSignature.key_index === signature.key_index &&\n              existingSignature.signature === signature.signature\n          )\n        ) {\n          payloadSignatures.push(signature)\n        }\n      }\n    } catch (error) {\n      console.error(\"SDK HTTP Send Error: Trouble applying payload signature\", {\n        acct,\n        ix,\n      })\n      throw error\n    }\n  }\n\n  // Apply Payer Signatures to Envelope Signatures\n  let envelopeSignatures = {}\n  for (let acct of Object.values(ix.accounts)) {\n    try {\n      if (acct.role.payer && acct.signature != null) {\n        let id = acct.tempId || idof(acct)\n        envelopeSignatures[id] = envelopeSignatures[id] || {\n          address: sansPrefix(acct.addr),\n          key_index: String(acct.keyId),\n          signature: context.Buffer.from(acct.signature, \"hex\").toString(\n            \"base64\"\n          ),\n        }\n        if (acct.extensionData != null) {\n          const b64 = context.Buffer.from(acct.extensionData, \"hex\").toString(\n            \"base64\"\n          )\n          if (b64 != null) envelopeSignatures[id].extension_data = b64\n        }\n      }\n    } catch (error) {\n      console.error(\n        \"SDK HTTP Send Error: Trouble applying envelope signature\",\n        {acct, ix}\n      )\n      throw error\n    }\n  }\n  envelopeSignatures = Object.values(envelopeSignatures)\n\n  var t1 = Date.now()\n  const res = await httpRequest({\n    hostname: opts.node,\n    path: `/v1/transactions`,\n    method: \"POST\",\n    body: {\n      script: context.Buffer.from(ix.message.cadence).toString(\"base64\"),\n      arguments: [\n        ...ix.message.arguments.map(arg =>\n          context.Buffer.from(\n            JSON.stringify(ix.arguments[arg].asArgument)\n          ).toString(\"base64\")\n        ),\n      ],\n      reference_block_id: ix.message.refBlock ? ix.message.refBlock : null,\n      gas_limit: String(ix.message.computeLimit),\n      payer: sansPrefix(\n        ix.accounts[Array.isArray(ix.payer) ? ix.payer[0] : ix.payer].addr\n      ),\n      proposal_key: {\n        address: sansPrefix(ix.accounts[ix.proposer].addr),\n        key_index: String(ix.accounts[ix.proposer].keyId),\n        sequence_number: String(ix.accounts[ix.proposer].sequenceNum),\n      },\n      authorizers: ix.authorizations\n        .map(tempId => ix.accounts[tempId].addr)\n        .reduce((prev, current) => {\n          return prev.find(item => item === current) ? prev : [...prev, current]\n        }, [])\n        .map(sansPrefix),\n      payload_signatures: payloadSignatures,\n      envelope_signatures: envelopeSignatures,\n    },\n  })\n  var t2 = Date.now()\n\n  let ret = context.response()\n  ret.tag = ix.tag\n  ret.transactionId = res.id\n\n  if (typeof window !== \"undefined\" && typeof CustomEvent !== \"undefined\") {\n    window.dispatchEvent(\n      new CustomEvent(\"FLOW::TX\", {\n        detail: {txId: ret.transactionId, delta: t2 - t1},\n      })\n    )\n  }\n\n  return ret\n}\n"
  },
  {
    "path": "packages/transport-http/src/send/send-transaction.test.js",
    "content": "import {Buffer} from \"@onflow/rlp\"\nimport {\n  authorizations,\n  build,\n  limit,\n  payer,\n  proposer,\n  ref,\n  resolve,\n  response as responseADT,\n  transaction,\n  voucherIntercept,\n  voucherToTxId,\n} from \"@onflow/sdk\"\nimport {sendTransaction} from \"./send-transaction\"\n\ndescribe(\"Transaction\", () => {\n  test(\"SendTransaction\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransactionId = \"a1b2c3\"\n\n    httpRequestMock.mockReturnValue({id: returnedTransactionId})\n\n    const built = await build([\n      transaction`cadence transaction`,\n      proposer({\n        addr: \"abc\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"abc\",\n          keyId: 1,\n          signature: \"abc123\",\n        }),\n        resolve: null,\n        role: {\n          proposer: true,\n          authorizer: false,\n          payer: false,\n          param: false,\n        },\n      }),\n      payer({\n        addr: \"def\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"def\",\n          keyId: 1,\n          signature: \"def456\",\n        }),\n        resolve: null,\n        role: {\n          proposer: false,\n          authorizer: false,\n          payer: true,\n          param: false,\n        },\n      }),\n      authorizations([\n        {\n          addr: \"abc\",\n          keyId: 1,\n          sequenceNum: 123,\n          signingFunction: () => ({\n            addr: \"abc\",\n            keyId: 1,\n            signature: \"abc123\",\n          }),\n          resolve: null,\n          role: {\n            proposer: false,\n            authorizer: true,\n            payer: false,\n            param: false,\n          },\n        },\n      ]),\n      ref(\"aaaa\"),\n      limit(500),\n      voucherIntercept(async voucher => {\n        voucherToTxId(voucher)\n      }),\n    ])\n\n    const resolved = await resolve(built)\n\n    const response = await sendTransaction(\n      resolved,\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const httpRequestMockArgs = httpRequestMock.mock.calls[0]\n\n    expect(httpRequestMockArgs.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transactions\",\n      method: \"POST\",\n      body: {\n        script: \"Y2FkZW5jZSB0cmFuc2FjdGlvbg==\",\n        arguments: [],\n        reference_block_id: \"aaaa\",\n        gas_limit: \"500\",\n        payer: \"def\",\n        proposal_key: {\n          address: \"abc\",\n          key_index: \"1\",\n          sequence_number: \"123\",\n        },\n        authorizers: [\"abc\"],\n        payload_signatures: [\n          {\n            address: \"abc\",\n            key_index: \"1\",\n            signature: \"q8Ej\",\n          },\n        ],\n        envelope_signatures: [\n          {\n            address: \"def\",\n            key_index: \"1\",\n            signature: \"3vRW\",\n          },\n        ],\n      },\n    })\n\n    expect(response.transactionId).toBe(returnedTransactionId)\n  })\n\n  test(\"SendTransaction with extensionData encodes extension_data\", async () => {\n    const httpRequestMock = jest.fn()\n\n    const returnedTransactionId = \"a1b2c3\"\n\n    httpRequestMock.mockReturnValue({id: returnedTransactionId})\n\n    const built = await build([\n      transaction`cadence transaction`,\n      proposer({\n        addr: \"abc\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"abc\",\n          keyId: 1,\n          signature: \"abc123\",\n          extensionData: \"abcd\",\n        }),\n        resolve: null,\n        role: {\n          proposer: true,\n          authorizer: false,\n          payer: false,\n          param: false,\n        },\n      }),\n      payer({\n        addr: \"def\",\n        keyId: 1,\n        sequenceNum: 123,\n        signingFunction: () => ({\n          addr: \"def\",\n          keyId: 1,\n          signature: \"def456\",\n          extensionData: \"deadbeef\",\n        }),\n        resolve: null,\n        role: {\n          proposer: false,\n          authorizer: false,\n          payer: true,\n          param: false,\n        },\n      }),\n      authorizations([\n        {\n          addr: \"abc\",\n          keyId: 1,\n          sequenceNum: 123,\n          signingFunction: () => ({\n            addr: \"abc\",\n            keyId: 1,\n            signature: \"abc123\",\n          }),\n          resolve: null,\n          role: {\n            proposer: false,\n            authorizer: true,\n            payer: false,\n            param: false,\n          },\n        },\n      ]),\n      ref(\"aaaa\"),\n      limit(500),\n      voucherIntercept(async voucher => {\n        voucherToTxId(voucher)\n      }),\n    ])\n\n    const resolved = await resolve(built)\n\n    const response = await sendTransaction(\n      resolved,\n      {\n        response: responseADT,\n        Buffer,\n      },\n      {\n        httpRequest: httpRequestMock,\n        node: \"localhost\",\n      }\n    )\n\n    expect(httpRequestMock.mock.calls.length).toEqual(1)\n\n    const valueSent = httpRequestMock.mock.calls[0][0]\n\n    expect(valueSent).toEqual({\n      hostname: \"localhost\",\n      path: \"/v1/transactions\",\n      method: \"POST\",\n      body: {\n        script: \"Y2FkZW5jZSB0cmFuc2FjdGlvbg==\",\n        arguments: [],\n        reference_block_id: \"aaaa\",\n        gas_limit: \"500\",\n        payer: \"def\",\n        proposal_key: {\n          address: \"abc\",\n          key_index: \"1\",\n          sequence_number: \"123\",\n        },\n        authorizers: [\"abc\"],\n        payload_signatures: [\n          {\n            address: \"abc\",\n            key_index: \"1\",\n            signature: \"q8Ej\",\n            extension_data: \"q80=\",\n          },\n        ],\n        envelope_signatures: [\n          {\n            address: \"def\",\n            key_index: \"1\",\n            signature: \"3vRW\",\n            extension_data: \"3q2+7w==\",\n          },\n        ],\n      },\n    })\n\n    expect(response.transactionId).toBe(returnedTransactionId)\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/send/utils.js",
    "content": "export function safeParseJSON(data) {\n  try {\n    return JSON.parse(data)\n  } catch {\n    return null\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/account-statuses.test.ts",
    "content": "import {accountStatusesHandler} from \"./account-statuses\"\n\ndescribe(\"accountStatusesHandler\", () => {\n  it(\"should handle messages with account events\", () => {\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const subscriber = accountStatusesHandler.createSubscriber(\n      {accountAddresses: [\"0x1234\"]},\n      onData,\n      onError\n    )\n\n    subscriber.onData({\n      block_id: \"block123\",\n      height: \"12345\",\n      account_events: {\n        \"0x1234\": [\n          {\n            type: \"flow.AccountKeyAdded\",\n            transaction_id: \"tx123\",\n            transaction_index: \"0\",\n            event_index: \"0\",\n            payload: Buffer.from(JSON.stringify({value: \"test\"})).toString(\n              \"base64\"\n            ),\n          },\n        ],\n      },\n      message_index: \"0\",\n    })\n\n    expect(onData).toHaveBeenCalledTimes(1)\n    expect(onData).toHaveBeenCalledWith({\n      accountStatusEvent: {\n        accountAddress: \"0x1234\",\n        blockId: \"block123\",\n        blockHeight: 12345,\n        type: \"flow.AccountKeyAdded\",\n        transactionId: \"tx123\",\n        transactionIndex: 0,\n        eventIndex: 0,\n        payload: {value: \"test\"},\n      },\n    })\n  })\n\n  it(\"should handle heartbeat messages without account_events field\", () => {\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const subscriber = accountStatusesHandler.createSubscriber(\n      {accountAddresses: [\"0x1234\"], startBlockHeight: 100},\n      onData,\n      onError\n    )\n\n    const heartbeat: any = {\n      block_id: \"block123\",\n      height: \"12345\",\n      message_index: \"0\",\n    }\n\n    expect(() => subscriber.onData(heartbeat)).not.toThrow()\n    expect(onData).not.toHaveBeenCalled()\n    expect(subscriber.getConnectionArgs().start_block_height).toBe(12346)\n  })\n\n  it(\"should sort events by transaction and event index\", () => {\n    const onData = jest.fn()\n\n    const subscriber = accountStatusesHandler.createSubscriber(\n      {accountAddresses: [\"0x1234\"]},\n      onData,\n      jest.fn()\n    )\n\n    subscriber.onData({\n      block_id: \"block123\",\n      height: \"12345\",\n      account_events: {\n        \"0x1234\": [\n          {\n            type: \"flow.Event\",\n            transaction_id: \"tx1\",\n            transaction_index: \"1\",\n            event_index: \"0\",\n            payload: Buffer.from(JSON.stringify({value: \"second\"})).toString(\n              \"base64\"\n            ),\n          },\n          {\n            type: \"flow.Event\",\n            transaction_id: \"tx1\",\n            transaction_index: \"0\",\n            event_index: \"0\",\n            payload: Buffer.from(JSON.stringify({value: \"first\"})).toString(\n              \"base64\"\n            ),\n          },\n        ],\n      },\n      message_index: \"0\",\n    })\n\n    expect(onData).toHaveBeenCalledTimes(2)\n    expect(onData.mock.calls[0][0].accountStatusEvent.payload.value).toBe(\n      \"first\"\n    )\n    expect(onData.mock.calls[1][0].accountStatusEvent.payload.value).toBe(\n      \"second\"\n    )\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/account-statuses.ts",
    "content": "import {\n  RawSubscriptionData,\n  SubscriptionArgs,\n  SubscriptionTopic,\n} from \"@onflow/typedefs\"\nimport {createSubscriptionHandler} from \"./types\"\n\ntype AccountStatusesArgs = SubscriptionArgs<SubscriptionTopic.ACCOUNT_STATUSES>\n\ntype AccountStatusesData =\n  RawSubscriptionData<SubscriptionTopic.ACCOUNT_STATUSES>\n\ntype AccountStatusesArgsDto = {\n  start_block_id?: string\n  start_block_height?: number\n  event_types?: string[]\n  addresses?: string[]\n  account_addresses?: string[]\n}\n\ntype AccountStatusesDataDto = {\n  block_id: string\n  height: string\n  account_events?: {\n    [address: string]: {\n      type: string\n      transaction_id: string\n      transaction_index: string\n      event_index: string\n      payload: string\n    }[]\n  }\n  message_index: string\n}\n\nexport const accountStatusesHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.ACCOUNT_STATUSES\n  Args: AccountStatusesArgs\n  Data: AccountStatusesData\n  ArgsDto: AccountStatusesArgsDto\n  DataDto: AccountStatusesDataDto\n}>({\n  topic: SubscriptionTopic.ACCOUNT_STATUSES,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: AccountStatusesArgs = {\n      ...initialArgs,\n    }\n\n    return {\n      onData(rawData: AccountStatusesDataDto) {\n        // The API may send messages without an account_events field when there are no events (heartbeat)\n        // Process events if they exist\n        if (rawData.account_events) {\n          const data: AccountStatusesData[] = []\n\n          // Collect all events from all accounts\n          for (const [address, events] of Object.entries(\n            rawData.account_events\n          )) {\n            for (const event of events) {\n              // Parse the raw data\n              const parsedData: AccountStatusesData = {\n                accountStatusEvent: {\n                  accountAddress: address,\n                  blockId: rawData.block_id,\n                  blockHeight: Number(rawData.height),\n                  type: event.type,\n                  transactionId: event.transaction_id,\n                  transactionIndex: Number(event.transaction_index),\n                  eventIndex: Number(event.event_index),\n                  payload: JSON.parse(\n                    Buffer.from(event.payload, \"base64\").toString()\n                  ),\n                },\n              }\n\n              data.push(parsedData)\n            }\n          }\n\n          // Sort the messages by increasing transaction and event index\n          data.sort((a, b) => {\n            const txIndexDiff =\n              a.accountStatusEvent.transactionIndex -\n              b.accountStatusEvent.transactionIndex\n            if (txIndexDiff !== 0) return txIndexDiff\n\n            return (\n              a.accountStatusEvent.eventIndex - b.accountStatusEvent.eventIndex\n            )\n          })\n\n          // Emit all the messages\n          for (const message of data) {\n            onData(message)\n          }\n        }\n\n        // Always update resume args (for both heartbeat and event messages)\n        resumeArgs = {\n          ...resumeArgs,\n          startBlockHeight: Number(BigInt(rawData.height) + BigInt(1)),\n          startBlockId: undefined,\n        }\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        let encodedArgs: AccountStatusesArgsDto = {\n          event_types: resumeArgs.eventTypes,\n          addresses: resumeArgs.addresses,\n          account_addresses: resumeArgs.accountAddresses,\n        }\n\n        if (\"startBlockHeight\" in resumeArgs && resumeArgs.startBlockHeight) {\n          return {\n            ...encodedArgs,\n            start_block_height: resumeArgs.startBlockHeight,\n          }\n        }\n\n        if (\"startBlockId\" in resumeArgs && resumeArgs.startBlockId) {\n          return {\n            ...encodedArgs,\n            start_block_id: resumeArgs.startBlockId,\n          }\n        }\n\n        return encodedArgs\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/block-digests.ts",
    "content": "import {\n  SubscriptionTopic,\n  SubscriptionArgs,\n  RawSubscriptionData,\n} from \"@onflow/typedefs\"\nimport {BlockArgsDto, createSubscriptionHandler} from \"./types\"\n\ntype BlockDigestsArgs = SubscriptionArgs<SubscriptionTopic.BLOCK_DIGESTS>\n\ntype BlockDigestsData = RawSubscriptionData<SubscriptionTopic.BLOCK_DIGESTS>\n\ntype BlockDigestsDataDto = {\n  block_id: string\n  height: string\n  timestamp: string\n}\n\ntype BlockDigestsArgsDto = BlockArgsDto\n\nexport const blockDigestsHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.BLOCK_DIGESTS\n  Args: BlockDigestsArgs\n  Data: BlockDigestsData\n  ArgsDto: BlockDigestsArgsDto\n  DataDto: BlockDigestsDataDto\n}>({\n  topic: SubscriptionTopic.BLOCK_DIGESTS,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: BlockDigestsArgs = {\n      ...initialArgs,\n    }\n\n    return {\n      onData(data: BlockDigestsDataDto) {\n        // Parse the raw data\n        const parsedData: BlockDigestsData = {\n          blockDigest: {\n            id: data.block_id,\n            height: Number(data.height),\n            timestamp: data.timestamp,\n          },\n        }\n\n        // Update the resume args\n        resumeArgs = {\n          blockStatus: resumeArgs.blockStatus,\n          startBlockId: String(BigInt(data.height) + BigInt(1)),\n        }\n\n        onData(parsedData)\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        let encodedArgs: BlockDigestsArgsDto = {\n          block_status: resumeArgs.blockStatus,\n        }\n\n        if (\"startBlockHeight\" in resumeArgs && resumeArgs.startBlockHeight) {\n          return {\n            ...encodedArgs,\n            start_block_height: resumeArgs.startBlockHeight,\n          }\n        }\n\n        if (\"startBlockId\" in resumeArgs && resumeArgs.startBlockId) {\n          return {\n            ...encodedArgs,\n            start_block_id: resumeArgs.startBlockId,\n          }\n        }\n\n        return encodedArgs\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/block-headers.ts",
    "content": "import {\n  SubscriptionArgs,\n  RawSubscriptionData,\n  SubscriptionTopic,\n} from \"@onflow/typedefs\"\nimport {BlockArgsDto, createSubscriptionHandler} from \"./types\"\n\ntype BlockHeadersArgs = SubscriptionArgs<SubscriptionTopic.BLOCK_HEADERS>\n\ntype BlockHeadersData = RawSubscriptionData<SubscriptionTopic.BLOCK_HEADERS>\n\ntype BlockHeadersArgsDto = BlockArgsDto\n\ntype BlockHeadersDataDto = {\n  id: string\n  parent_id: string\n  height: string\n  timestamp: string\n  parent_voter_signature: string\n}\n\nexport const blockHeadersHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.BLOCK_HEADERS\n  Args: BlockHeadersArgs\n  Data: BlockHeadersData\n  ArgsDto: BlockHeadersArgsDto\n  DataDto: BlockHeadersDataDto\n}>({\n  topic: SubscriptionTopic.BLOCK_HEADERS,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: BlockHeadersArgs = {\n      ...initialArgs,\n    }\n\n    return {\n      onData(data: BlockHeadersDataDto) {\n        // Parse the raw data\n        const parsedData: BlockHeadersData = {\n          blockHeader: {\n            id: data.id,\n            parentId: data.parent_id,\n            height: Number(data.height),\n            timestamp: data.timestamp,\n            parentVoterSignature: data.parent_voter_signature,\n          },\n        }\n\n        // Update the resume args\n        resumeArgs = {\n          blockStatus: resumeArgs.blockStatus,\n          startBlockHeight: Number(BigInt(data.height) + BigInt(1)),\n        }\n\n        onData(parsedData)\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        let encodedArgs: BlockHeadersArgsDto = {\n          block_status: resumeArgs.blockStatus,\n        }\n\n        if (\"startBlockHeight\" in resumeArgs && resumeArgs.startBlockHeight) {\n          return {\n            ...encodedArgs,\n            start_block_height: resumeArgs.startBlockHeight,\n          }\n        }\n\n        if (\"startBlockId\" in resumeArgs && resumeArgs.startBlockId) {\n          return {\n            ...encodedArgs,\n            start_block_id: resumeArgs.startBlockId,\n          }\n        }\n\n        return encodedArgs\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/blocks.ts",
    "content": "import {\n  RawSubscriptionData,\n  SubscriptionArgs,\n  SubscriptionTopic,\n} from \"@onflow/typedefs\"\nimport {createSubscriptionHandler, BlockArgsDto} from \"./types\"\n\ntype BlocksArgs = SubscriptionArgs<SubscriptionTopic.BLOCKS>\n\ntype BlocksData = RawSubscriptionData<SubscriptionTopic.BLOCKS>\n\ntype BlocksDataDto = {\n  header: {\n    id: string\n    parent_id: string\n    height: string\n    timestamp: string\n    parent_voter_signature: string\n  }\n  payload: {\n    collection_guarantees: {\n      collection_id: string\n      signer_indices: string[]\n    }[]\n    block_seals: {\n      block_id: string\n      result_id: string\n    }[]\n  }\n}\n\nexport const blocksHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.BLOCKS\n  Args: BlocksArgs\n  Data: BlocksData\n  ArgsDto: BlockArgsDto\n  DataDto: BlocksDataDto\n}>({\n  topic: SubscriptionTopic.BLOCKS,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: BlocksArgs = {\n      ...initialArgs,\n    }\n\n    return {\n      onData(data: BlocksDataDto) {\n        // Parse the raw data\n        const parsedData: BlocksData = {\n          block: {\n            id: data.header.id,\n            parentId: data.header.parent_id,\n            height: Number(data.header.height),\n            timestamp: data.header.timestamp,\n            parentVoterSignature: data.header.parent_voter_signature,\n            collectionGuarantees: data.payload.collection_guarantees.map(\n              guarantee => ({\n                collectionId: guarantee.collection_id,\n                signerIds: guarantee.signer_indices,\n              })\n            ),\n            blockSeals: data.payload.block_seals.map(seal => ({\n              blockId: seal.block_id,\n              executionReceiptId: seal.result_id,\n            })),\n          },\n        }\n\n        // Update the resume args\n        resumeArgs = {\n          blockStatus: resumeArgs.blockStatus,\n          startBlockHeight: Number(BigInt(data.header.height) + BigInt(1)),\n        }\n\n        onData(parsedData)\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        let encodedArgs: BlockArgsDto = {\n          block_status: resumeArgs.blockStatus,\n        }\n\n        if (\"startBlockHeight\" in resumeArgs && resumeArgs.startBlockHeight) {\n          return {\n            ...encodedArgs,\n            start_block_height: String(resumeArgs.startBlockHeight),\n          }\n        }\n\n        if (\"startBlockId\" in resumeArgs && resumeArgs.startBlockId) {\n          return {\n            ...encodedArgs,\n            start_block_id: resumeArgs.startBlockId,\n          }\n        }\n\n        return encodedArgs\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/events.test.ts",
    "content": "import {eventsHandler} from \"./events\"\n\ndescribe(\"eventsHandler\", () => {\n  it(\"should handle messages with events\", () => {\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const subscriber = eventsHandler.createSubscriber(\n      {eventTypes: [\"A.Contract.Event\"]},\n      onData,\n      onError\n    )\n\n    subscriber.onData({\n      block_id: \"block123\",\n      block_height: \"12345\",\n      block_timestamp: \"2024-01-01T00:00:00Z\",\n      events: [\n        {\n          type: \"A.Contract.Event\",\n          transaction_id: \"tx123\",\n          transaction_index: \"0\",\n          event_index: \"0\",\n          payload: Buffer.from(JSON.stringify({value: \"test\"})).toString(\n            \"base64\"\n          ),\n        },\n      ],\n    })\n\n    expect(onData).toHaveBeenCalledTimes(1)\n    expect(onData).toHaveBeenCalledWith({\n      event: {\n        blockId: \"block123\",\n        blockHeight: 12345,\n        blockTimestamp: \"2024-01-01T00:00:00Z\",\n        type: \"A.Contract.Event\",\n        transactionId: \"tx123\",\n        transactionIndex: 0,\n        eventIndex: 0,\n        payload: {value: \"test\"},\n      },\n    })\n  })\n\n  it(\"should handle heartbeat messages without events field\", () => {\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const subscriber = eventsHandler.createSubscriber(\n      {eventTypes: [\"A.Contract.Event\"], startBlockHeight: 100},\n      onData,\n      onError\n    )\n\n    const heartbeat: any = {\n      block_id: \"block123\",\n      block_height: \"12345\",\n      block_timestamp: \"2024-01-01T00:00:00Z\",\n    }\n\n    expect(() => subscriber.onData(heartbeat)).not.toThrow()\n    expect(onData).not.toHaveBeenCalled()\n    expect(subscriber.getConnectionArgs().start_block_height).toBe(\"12346\")\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/events.ts",
    "content": "import {\n  SubscriptionTopic,\n  SubscriptionArgs,\n  RawSubscriptionData,\n} from \"@onflow/typedefs\"\nimport {createSubscriptionHandler} from \"./types\"\n\ntype EventsArgs = SubscriptionArgs<SubscriptionTopic.EVENTS>\n\ntype EventsData = RawSubscriptionData<SubscriptionTopic.EVENTS>\n\nexport type EventsArgsDto = (\n  | {\n      start_block_id: string\n    }\n  | {\n      start_block_height: number\n    }\n  | {}\n) & {\n  event_types?: string[]\n  addresses?: string[]\n  contracts?: string[]\n}\n\ntype EventsDataDto = {\n  block_id: string\n  block_height: string\n  block_timestamp: string\n  events?: {\n    type: string\n    transaction_id: string\n    transaction_index: string\n    event_index: string\n    payload: string\n  }[]\n}\n\nexport const eventsHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.EVENTS\n  Args: EventsArgs\n  Data: EventsData\n  ArgsDto: EventsArgsDto\n  DataDto: EventsDataDto\n}>({\n  topic: SubscriptionTopic.EVENTS,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: EventsArgs = {\n      ...initialArgs,\n    }\n\n    // Legacy support for startHeight, to be removed in the future\n    // Existing users may see type errors if they use startHeight,\n    // but this should be a smooth transition.\n    if (\"startHeight\" in resumeArgs && resumeArgs.startHeight) {\n      resumeArgs.startBlockHeight = resumeArgs.startHeight as number\n      delete resumeArgs.startHeight\n    }\n\n    return {\n      onData(rawData: EventsDataDto) {\n        // The API may send messages without an events field when there are no events in a block\n        // Handle this gracefully by checking if events exists and is an array\n        if (rawData.events && Array.isArray(rawData.events)) {\n          for (const event of rawData.events) {\n            // Parse the raw data\n            const result: EventsData = {\n              event: {\n                blockId: rawData.block_id,\n                blockHeight: Number(rawData.block_height),\n                blockTimestamp: rawData.block_timestamp,\n                type: event.type,\n                transactionId: event.transaction_id,\n                transactionIndex: Number(event.transaction_index),\n                eventIndex: Number(event.event_index),\n                payload: JSON.parse(\n                  Buffer.from(event.payload, \"base64\").toString()\n                ),\n              },\n            }\n\n            onData(result)\n          }\n        }\n\n        // Update the resume args\n        resumeArgs = {\n          ...resumeArgs,\n          startBlockHeight: Number(BigInt(rawData.block_height) + BigInt(1)),\n          startBlockId: undefined,\n        }\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        let encodedArgs: EventsArgsDto = {\n          event_types: resumeArgs.eventTypes,\n          addresses: resumeArgs.addresses,\n          contracts: resumeArgs.contracts,\n        }\n\n        if (\"startBlockHeight\" in resumeArgs && resumeArgs.startBlockHeight) {\n          return {\n            ...encodedArgs,\n            start_block_height: String(resumeArgs.startBlockHeight),\n          }\n        }\n\n        if (\"startBlockId\" in resumeArgs && resumeArgs.startBlockId) {\n          return {\n            ...encodedArgs,\n            start_block_id: String(resumeArgs.startBlockId),\n          }\n        }\n\n        return encodedArgs\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/transaction-statuses.ts",
    "content": "import {\n  RawSubscriptionData,\n  SubscriptionArgs,\n  SubscriptionTopic,\n} from \"@onflow/typedefs\"\nimport {createSubscriptionHandler} from \"./types\"\nimport {Buffer} from \"buffer\"\n\nconst STATUS_MAP = {\n  UNKNOWN: 0,\n  PENDING: 1,\n  FINALIZED: 2,\n  EXECUTED: 3,\n  SEALED: 4,\n  EXPIRED: 5,\n}\n\ntype TransactionStatusesArgs =\n  SubscriptionArgs<SubscriptionTopic.TRANSACTION_STATUSES>\n\ntype TransactionStatusesData =\n  RawSubscriptionData<SubscriptionTopic.TRANSACTION_STATUSES>\n\ntype TransactionStatusesArgsDto = {\n  tx_id: string\n}\n\ntype TransactionStatusesDataDto = {\n  transaction_result: {\n    block_id: string\n    collection_id: string\n    execution: string\n    status: string\n    status_code: 0 | 1\n    error_message: string\n    computation_used: string\n    events: {\n      type: string\n      transaction_id: string\n      transaction_index: string\n      event_index: string\n      payload: string\n    }[]\n  }\n}\n\nexport const transactionStatusesHandler = createSubscriptionHandler<{\n  Topic: SubscriptionTopic.TRANSACTION_STATUSES\n  Args: TransactionStatusesArgs\n  Data: TransactionStatusesData\n  ArgsDto: TransactionStatusesArgsDto\n  DataDto: TransactionStatusesDataDto\n}>({\n  topic: SubscriptionTopic.TRANSACTION_STATUSES,\n  createSubscriber: (initialArgs, onData, onError) => {\n    let resumeArgs: TransactionStatusesArgs = {\n      ...initialArgs,\n    }\n\n    return {\n      onData(data: TransactionStatusesDataDto) {\n        // Parse the raw data\n        const parsedData: TransactionStatusesData = {\n          transactionStatus: {\n            blockId: data.transaction_result.block_id,\n            status:\n              STATUS_MAP[\n                data.transaction_result.status.toUpperCase() as keyof typeof STATUS_MAP\n              ],\n            statusString: data.transaction_result.status.toUpperCase(),\n            statusCode: data.transaction_result.status_code,\n            errorMessage: data.transaction_result.error_message,\n            events: data.transaction_result.events.map(event => ({\n              type: event.type,\n              transactionId: event.transaction_id,\n              transactionIndex: Number(event.transaction_index),\n              eventIndex: Number(event.event_index),\n              payload: JSON.parse(\n                Buffer.from(event.payload, \"base64\").toString()\n              ),\n            })),\n          },\n        }\n\n        onData(parsedData)\n      },\n      onError(error: Error) {\n        onError(error)\n      },\n      getConnectionArgs() {\n        return {\n          tx_id: resumeArgs.transactionId,\n        }\n      },\n    }\n  },\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/handlers/types.ts",
    "content": "export interface SubscriptionHandler<\n  T extends {\n    Topic: string\n    Args: any\n    Data: any\n    ArgsDto: any\n    DataDto: any\n  },\n> {\n  readonly topic: T[\"Topic\"]\n  createSubscriber(\n    initialArgs: T[\"Args\"],\n    onData: (data: T[\"Data\"]) => void,\n    onError: (error: Error) => void\n  ): DataSubscriber<T[\"ArgsDto\"], T[\"DataDto\"]>\n}\n\nexport interface DataSubscriber<ArgsDto, DataDto> {\n  /**\n   * The callback to call when a data is received\n   */\n  onData(data: DataDto): void\n\n  /**\n   * The callback to call when an error is received\n   */\n  onError(error: Error): void\n\n  /**\n   * Get the arguments to connect or reconnect to the subscription\n   */\n  getConnectionArgs(): ArgsDto\n}\n\nexport function createSubscriptionHandler<\n  T extends {\n    Topic: string\n    Args: any\n    Data: any\n    ArgsDto: any\n    DataDto: any\n  },\n>(handler: SubscriptionHandler<T>): SubscriptionHandler<T> {\n  return handler\n}\n\nexport type BlockArgsDto =\n  | {\n      block_status?: \"finalized\" | \"sealed\"\n      start_block_id?: string\n    }\n  | {\n      block_status?: \"finalized\" | \"sealed\"\n      start_block_height?: number\n    }\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/models.ts",
    "content": "export enum Action {\n  LIST_SUBSCRIPTIONS = \"list_subscriptions\",\n  SUBSCRIBE = \"subscribe\",\n  UNSUBSCRIBE = \"unsubscribe\",\n}\nexport interface BaseMessageRequest {\n  action: Action\n  subscription_id: string\n}\n\nexport interface BaseMessageResponse {\n  action?: Action\n  error?: {\n    code: number\n    message: string\n  }\n  subscription_id: string\n}\n\nexport interface ListSubscriptionsMessageRequest extends BaseMessageRequest {\n  action: Action.LIST_SUBSCRIPTIONS\n}\n\nexport interface ListSubscriptionsMessageResponse extends BaseMessageResponse {\n  action: Action.LIST_SUBSCRIPTIONS\n  subscriptions?: SubscriptionEntry[]\n}\n\nexport interface SubscribeMessageRequest extends BaseMessageRequest {\n  action: Action.SUBSCRIBE\n  topic: string\n  arguments: Record<string, any>\n}\n\nexport interface SubscribeMessageResponse extends BaseMessageResponse {\n  action: Action.SUBSCRIBE\n  topic: string\n}\n\nexport interface UnsubscribeMessageRequest extends BaseMessageRequest {\n  action: Action.UNSUBSCRIBE\n}\n\nexport type UnsubscribeMessageResponse = BaseMessageResponse & {\n  action: Action.UNSUBSCRIBE\n  id: string\n}\n\nexport type SubscriptionEntry = {\n  id: string\n  topic: string\n  arguments: Record<string, any>\n}\n\nexport type MessageRequest =\n  | ListSubscriptionsMessageRequest\n  | SubscribeMessageRequest\n  | UnsubscribeMessageRequest\n\nexport type MessageResponse =\n  | ListSubscriptionsMessageResponse\n  | SubscribeMessageResponse\n  | UnsubscribeMessageResponse\n\nexport type SubscriptionDataMessage = {\n  subscription_id: string\n  payload: any\n}\nexport class SocketError extends Error {\n  code: number\n\n  private constructor(code: number, message: string) {\n    super(message)\n    this.name = \"SocketError\"\n    this.code = code\n  }\n\n  static fromMessage(error: {code: number; message: string}) {\n    return new SocketError(error.code, error.message)\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/subscribe.test.ts",
    "content": "import {SubscriptionTopic} from \"@onflow/typedefs\"\nimport {subscribe} from \"./subscribe\"\nimport {SubscriptionManager} from \"./subscription-manager\"\n\njest.mock(\"./subscription-manager\", () => ({\n  SubscriptionManager: jest.fn().mockImplementation(() => {\n    subscribe: jest.fn().mockReturnValue({unsubscribe: jest.fn()})\n  }) as any,\n}))\n\ndescribe(\"subscribe\", () => {\n  beforeEach(() => {\n    jest.resetAllMocks()\n  })\n\n  test(\"subscribes to a topic with correct arguments\", () => {\n    jest.mocked(SubscriptionManager).mockImplementation(\n      () =>\n        ({\n          subscribe: jest.fn().mockReturnValue({unsubscribe: jest.fn()}),\n        }) as any\n    )\n\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    const sub = subscribe(\n      {\n        topic: SubscriptionTopic.BLOCKS,\n        args: {blockStatus: \"sealed\"},\n        onData,\n        onError,\n      },\n      {\n        node: \"wss://localhost:8080\",\n      }\n    )\n\n    expect(SubscriptionManager).toHaveBeenCalledTimes(1)\n    expect(SubscriptionManager).toHaveBeenCalledWith(expect.any(Array), {\n      node: \"wss://localhost:8080/v1/ws\",\n    })\n    const instance = jest.mocked(SubscriptionManager).mock.results[0].value\n\n    expect(instance.subscribe).toHaveBeenCalledTimes(1)\n    expect(instance.subscribe).toHaveBeenCalledWith({\n      topic: SubscriptionTopic.BLOCKS,\n      args: {blockStatus: \"sealed\"},\n      onData,\n      onError,\n    })\n\n    const mockSub = instance.subscribe.mock.results[0].value\n\n    expect(sub).toBeDefined()\n    expect(sub).toBe(mockSub)\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/subscribe.ts",
    "content": "import {\n  SubscriptionTopic,\n  SubscriptionArgs,\n  Subscription,\n  RawSubscriptionData,\n} from \"@onflow/typedefs\"\nimport {SubscriptionManager} from \"./subscription-manager\"\nimport {blocksHandler} from \"./handlers/blocks\"\nimport {blockHeadersHandler} from \"./handlers/block-headers\"\nimport {blockDigestsHandler} from \"./handlers/block-digests\"\nimport {accountStatusesHandler} from \"./handlers/account-statuses\"\nimport {transactionStatusesHandler} from \"./handlers/transaction-statuses\"\nimport {eventsHandler} from \"./handlers/events\"\nimport {combineURLs} from \"../utils/combine-urls\"\n\nconst SUBSCRIPTION_HANDLERS = [\n  blocksHandler,\n  blockHeadersHandler,\n  blockDigestsHandler,\n  accountStatusesHandler,\n  transactionStatusesHandler,\n  eventsHandler,\n]\n\n// Map of SubscriptionManager instances by access node URL\nlet subscriptionManagerMap: Map<\n  string,\n  SubscriptionManager<typeof SUBSCRIPTION_HANDLERS>\n> = new Map()\n\nexport function subscribe<T extends SubscriptionTopic>(\n  {\n    topic,\n    args,\n    onData,\n    onError,\n  }: {\n    topic: T\n    args: SubscriptionArgs<T>\n    onData: (data: RawSubscriptionData<T>) => void\n    onError: (error: Error) => void\n  },\n  opts: {node: string}\n): Subscription {\n  // Get the SubscriptionManager instance for the access node, or create a new one\n  const node = getWsUrl(opts.node)\n  const manager =\n    subscriptionManagerMap.get(node) ||\n    new SubscriptionManager(SUBSCRIPTION_HANDLERS, {node})\n  subscriptionManagerMap.set(node, manager)\n\n  return manager.subscribe({\n    topic,\n    args,\n    onData: onData as any,\n    onError,\n  })\n}\n\nfunction getWsUrl(node: string) {\n  const url = new URL(combineURLs(node, \"/v1/ws\"))\n  if (url.protocol === \"https:\") {\n    url.protocol = \"wss:\"\n  } else if (url.protocol === \"http:\") {\n    url.protocol = \"ws:\"\n  }\n  return url.toString()\n}\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/subscription-manager.test.ts",
    "content": "import WS from \"jest-websocket-mock\"\nimport {WebSocket as mockSocket} from \"mock-socket\"\nimport {\n  Action,\n  SubscribeMessageRequest,\n  SubscribeMessageResponse,\n  SubscriptionDataMessage,\n} from \"./models\"\nimport {\n  SubscriptionManager,\n  SubscriptionManagerConfig,\n} from \"./subscription-manager\"\nimport {SubscriptionTopic} from \"@onflow/typedefs\"\nimport {DataSubscriber, SubscriptionHandler} from \"./handlers/types\"\n\njest.mock(\"./websocket\", () => ({\n  WebSocket: mockSocket,\n}))\n\ndescribe(\"SubscriptionManager\", () => {\n  let mockWs: WS\n  let mockSubscriber: jest.Mocked<DataSubscriber<any, any>>\n  let mockHandler: jest.Mocked<SubscriptionHandler<any>>\n  const mockConnectionArgs = {mock: \"connection args\"}\n\n  beforeEach(() => {\n    jest.resetAllMocks()\n\n    mockWs = new WS(\"wss://localhost:8080\")\n    mockSubscriber = {\n      onData: jest.fn(),\n      onError: jest.fn(),\n      getConnectionArgs: jest.fn().mockReturnValue(mockConnectionArgs),\n    }\n    mockHandler = {\n      topic: \"topic\",\n      createSubscriber: jest.fn().mockReturnValue(mockSubscriber),\n    }\n  })\n\n  afterEach(() => {\n    WS.clean()\n  })\n\n  test(\"does not connect to the socket when no subscriptions are made\", async () => {\n    new SubscriptionManager([mockHandler], {node: \"wss://localhost:8080\"})\n\n    await new Promise(resolve => setTimeout(resolve, 0))\n    expect(mockWs.server.clients).toHaveLength(0)\n  })\n\n  test(\"disconnects from the socket when the last subscription is removed\", async () => {\n    const config: SubscriptionManagerConfig = {\n      node: \"wss://localhost:8080\",\n    }\n    const subscriptionManager = new SubscriptionManager([mockHandler], config)\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {key: \"value\"} as any\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    let serverPromise = (async () => {\n      await mockWs.connected\n\n      const msg = (await mockWs.nextMessage) as string\n      const data = JSON.parse(msg) as SubscribeMessageRequest\n      expect(data).toEqual({\n        action: \"subscribe\",\n        subscription_id: \"0\",\n        topic,\n        arguments: mockConnectionArgs,\n      })\n\n      const response: SubscribeMessageResponse = {\n        subscription_id: \"0\",\n        action: Action.SUBSCRIBE,\n        topic,\n      }\n      mockWs.send(JSON.stringify(response))\n    })()\n\n    const subscription = subscriptionManager.subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    await serverPromise\n\n    expect(subscription).toBeDefined()\n    expect(subscription.unsubscribe).toBeInstanceOf(Function)\n\n    subscription.unsubscribe()\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    await mockWs.closed\n    expect(mockWs.server.clients).toHaveLength(0)\n  })\n\n  test(\"subscribes, receives data, and unsubscribes\", async () => {\n    const config: SubscriptionManagerConfig = {\n      node: \"wss://localhost:8080\",\n    }\n    const subscriptionManager = new SubscriptionManager([mockHandler], config)\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {key: \"value\"} as any\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    let serverPromise = (async () => {\n      await mockWs.connected\n\n      const msg = (await mockWs.nextMessage) as string\n      const data = JSON.parse(msg) as SubscribeMessageRequest\n      expect(data).toEqual({\n        action: \"subscribe\",\n        subscription_id: \"0\",\n        topic,\n        arguments: mockConnectionArgs,\n      })\n\n      const response: SubscribeMessageResponse = {\n        subscription_id: \"0\",\n        action: Action.SUBSCRIBE,\n        topic,\n      }\n      mockWs.send(JSON.stringify(response))\n    })()\n\n    const subscription = subscriptionManager.subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    await serverPromise\n\n    expect(subscription).toBeDefined()\n    expect(subscription.unsubscribe).toBeInstanceOf(Function)\n\n    serverPromise = (async () => {\n      const data = {\n        subscription_id: \"0\",\n        payload: {key: \"value\"},\n      } as SubscriptionDataMessage\n      mockWs.send(JSON.stringify(data))\n    })()\n\n    await serverPromise\n\n    expect(mockSubscriber.onData).toHaveBeenCalledTimes(1)\n    expect(mockSubscriber.onData).toHaveBeenCalledWith({\n      key: \"value\",\n    })\n    expect(mockSubscriber.onError).toHaveBeenCalledTimes(0)\n\n    // Unsubscribe from the only subscription\n    subscription.unsubscribe()\n\n    // Connection should be closed as there are no more subscriptions\n    await mockWs.closed\n  })\n\n  test(\"reconnects to stream on close\", async () => {\n    const config: SubscriptionManagerConfig = {\n      node: \"wss://localhost:8080\",\n    }\n    const subscriptionManager = new SubscriptionManager([mockHandler], config)\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {key: \"value\"} as any\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    let serverPromise = (async () => {\n      await mockWs.connected\n\n      const msg = (await mockWs.nextMessage) as string\n      const data = JSON.parse(msg) as SubscribeMessageRequest\n      expect(data).toEqual({\n        action: \"subscribe\",\n        subscription_id: \"0\",\n        topic,\n        arguments: mockConnectionArgs,\n      })\n\n      const response: SubscribeMessageResponse = {\n        subscription_id: \"0\",\n        action: Action.SUBSCRIBE,\n        topic,\n      }\n      mockWs.send(JSON.stringify(response))\n    })()\n\n    const subscription = subscriptionManager.subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    await serverPromise\n\n    expect(subscription).toBeDefined()\n    expect(subscription.unsubscribe).toBeInstanceOf(Function)\n    expect(mockHandler.createSubscriber).toHaveBeenCalledTimes(1)\n    expect(mockHandler.createSubscriber).toHaveBeenCalledWith(\n      args,\n      onData,\n      onError\n    )\n\n    serverPromise = (async () => {\n      const data = {\n        subscription_id: \"0\",\n        payload: {key: \"value\"},\n      } as SubscriptionDataMessage\n      mockWs.send(JSON.stringify(data))\n    })()\n\n    await serverPromise\n\n    expect(mockSubscriber.onData).toHaveBeenCalledTimes(1)\n    expect(mockSubscriber.onData).toHaveBeenCalledWith({\n      key: \"value\",\n    })\n    expect(mockSubscriber.onError).toHaveBeenCalledTimes(0)\n\n    // Close the connection and create a new one\n    mockWs.close()\n    mockWs = new WS(\"wss://localhost:8080\")\n\n    serverPromise = (async () => {\n      await mockWs.connected\n\n      const msg = (await mockWs.nextMessage) as string\n      const data = JSON.parse(msg) as SubscribeMessageRequest\n      expect(data).toEqual({\n        subscription_id: \"0\",\n        action: \"subscribe\",\n        topic,\n        arguments: mockConnectionArgs,\n      })\n\n      const response: SubscribeMessageResponse = {\n        subscription_id: \"0\",\n        action: Action.SUBSCRIBE,\n        topic,\n      }\n      mockWs.send(JSON.stringify(response))\n    })()\n\n    await serverPromise\n\n    // Wait for client to register the new subscription\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    serverPromise = (async () => {\n      const data = {\n        subscription_id: \"0\",\n        payload: {key: \"value2\"},\n      } as SubscriptionDataMessage\n      mockWs.send(JSON.stringify(data))\n    })()\n\n    await serverPromise\n\n    expect(mockSubscriber.onData).toHaveBeenCalledTimes(2)\n    expect(mockSubscriber.onData.mock.calls[1]).toEqual([\n      {\n        key: \"value2\",\n      },\n    ])\n  })\n\n  test(\"reports error connecting to socket\", async () => {\n    const config: SubscriptionManagerConfig = {\n      node: \"wss://localhost:8080\",\n      reconnectOptions: {\n        reconnectAttempts: 1,\n        initialReconnectDelay: 1,\n        maxReconnectDelay: 1,\n      },\n    }\n    const subscriptionManager = new SubscriptionManager([mockHandler], config)\n    const topic = \"topic\" as SubscriptionTopic\n    const args = {key: \"value\"} as any\n    const onData = jest.fn()\n    const onError = jest.fn()\n\n    mockWs.error({\n      code: 1006,\n      reason: \"Connection failed\",\n      wasClean: false,\n    })\n\n    subscriptionManager.subscribe({\n      topic,\n      args,\n      onData,\n      onError,\n    })\n\n    await new Promise(resolve => setTimeout(resolve, 1000))\n\n    expect(mockSubscriber.onError).toHaveBeenCalledTimes(1)\n    expect(mockSubscriber.onError).toHaveBeenCalledWith(\n      new Error(\"WebSocket closed\")\n    )\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/subscription-manager.ts",
    "content": "import {\n  Action,\n  MessageRequest,\n  MessageResponse,\n  SocketError,\n  SubscriptionDataMessage,\n  UnsubscribeMessageResponse,\n} from \"./models\"\nimport {Subscription} from \"@onflow/typedefs\"\nimport {WebSocket} from \"./websocket\"\nimport {DataSubscriber, SubscriptionHandler} from \"./handlers/types\"\nimport * as logger from \"@onflow/util-logger\"\n\nconst WS_OPEN = 1\n\ntype DeepRequired<T> = Required<{\n  [K in keyof T]: DeepRequired<T[K]>\n}>\n\ntype InferHandler<T> = T extends SubscriptionHandler<infer H> ? H : never\n\ninterface SubscriptionInfo<ArgsDto = any, DataDto = any> {\n  // ID for the subscription\n  id: string\n  // The topic of the subscription\n  topic: string\n  // Data provider for the subscription\n  subscriber: DataSubscriber<ArgsDto, DataDto>\n}\n\nexport interface SubscriptionManagerConfig {\n  /**\n   * The URL of the node to connect to\n   */\n  node: string\n  /**\n   * Options for reconnecting to the server\n   */\n  reconnectOptions?: {\n    /**\n     * The initial delay in milliseconds before reconnecting\n     * @default 500\n     */\n    initialReconnectDelay?: number\n    /**\n     * The maximum number of reconnection attempts\n     * @default 5\n     */\n    reconnectAttempts?: number\n    /**\n     * The maximum delay in milliseconds between reconnection attempts\n     * @default 5000\n     */\n    maxReconnectDelay?: number\n  }\n}\n\nexport class SubscriptionManager<Handlers extends SubscriptionHandler<any>[]> {\n  private counter = 0\n  private socket: WebSocket | null = null\n  private subscriptions: SubscriptionInfo[] = []\n  private config: DeepRequired<SubscriptionManagerConfig>\n  private reconnectAttempts = 0\n  private handlers: SubscriptionHandler<any>[]\n  private connectPromise: Promise<void> | null = null\n  private closeConnection: (() => void) | null = null\n\n  constructor(handlers: Handlers, config: SubscriptionManagerConfig) {\n    this.config = {\n      ...config,\n      reconnectOptions: {\n        initialReconnectDelay: 500,\n        reconnectAttempts: 5,\n        maxReconnectDelay: 5000,\n        ...config.reconnectOptions,\n      },\n    }\n    this.handlers = handlers\n  }\n\n  subscribe<T extends Handlers[number]>(opts: {\n    topic: InferHandler<T>[\"Topic\"]\n    args: InferHandler<T>[\"Args\"]\n    onData: (data: InferHandler<T>[\"Data\"]) => void\n    onError: (error: Error) => void\n  }): Subscription {\n    const idPromise = this._subscribe(opts)\n\n    return {\n      unsubscribe: () => {\n        // Unsubscribe when the ID is available\n        idPromise.then(id => id && this.unsubscribe(id))\n      },\n    }\n  }\n\n  private async _subscribe<T extends Handlers[number]>(opts: {\n    topic: InferHandler<T>[\"Topic\"]\n    args: InferHandler<T>[\"Args\"]\n    onData: (data: InferHandler<T>[\"Data\"]) => void\n    onError: (error: Error) => void\n  }): Promise<string | null> {\n    // Get the data provider for the topic\n    const topicHandler = this.getHandler(opts.topic)\n    const subscriber = topicHandler.createSubscriber(\n      opts.args,\n      opts.onData,\n      opts.onError\n    )\n\n    let sub: SubscriptionInfo | null = null\n    try {\n      // Connect the socket if it's not already open\n      await this.connect()\n\n      // Track the subscription locally\n      sub = {\n        id: String(this.counter++),\n        topic: opts.topic,\n        subscriber: subscriber,\n      }\n      this.subscriptions.push(sub)\n\n      // Send the subscribe message\n      const response = await this.sendSubscribe(sub)\n      if (response.error) {\n        throw new Error(`Failed to subscribe to topic ${sub.topic}`, {\n          cause: SocketError.fromMessage(response.error),\n        })\n      }\n    } catch (e) {\n      // Unsubscribe if there was an error\n      subscriber.onError(e instanceof Error ? e : new Error(String(e)))\n      if (sub) this.unsubscribe(sub.id)\n      return null\n    }\n\n    return sub.id\n  }\n\n  private unsubscribe(id: string): void {\n    // Get the subscription\n    const sub = this.subscriptions.find(sub => sub.id === id)\n    if (!sub) return\n\n    // Remove the subscription\n    this.subscriptions = this.subscriptions.filter(sub => sub.id !== id)\n\n    // Close the socket if there are no more subscriptions\n    if (this.subscriptions.length === 0) {\n      this.closeConnection?.()\n      return\n    }\n\n    // Otherwise, the unsubscribe message\n    this.sendUnsubscribe(sub).catch(e => {\n      console.error(`Error while unsubscribing from topic: ${e}`)\n    })\n  }\n\n  // Lazy connect to the socket when the first subscription is made\n  private async connect() {\n    if (this.connectPromise) {\n      return this.connectPromise\n    }\n    this.connectPromise = new Promise<void>((resolve, reject) => {\n      // If the socket is already open, do nothing\n      if (this.socket?.readyState === WS_OPEN) {\n        resolve()\n        return\n      }\n\n      this.socket = new WebSocket(this.config.node)\n      const onMessage = (event: MessageEvent) => {\n        const message = JSON.parse(event.data) as\n          | MessageResponse\n          | SubscriptionDataMessage\n\n        // Error message\n        if (\"action\" in message && message.error) {\n          const sub = this.subscriptions.find(\n            sub => sub.id === message.subscription_id\n          )\n          if (sub) {\n            sub.subscriber.onError(\n              new Error(\n                `Failed to subscribe to topic ${sub.topic}: ${message.error.message}`\n              )\n            )\n            // Remove the subscription\n            this.subscriptions = this.subscriptions.filter(\n              sub => sub.id !== message.subscription_id\n            )\n          }\n          return\n        }\n\n        const sub = this.subscriptions.find(\n          sub => sub.id === message.subscription_id\n        )\n        if (sub) {\n          if (!(\"action\" in message) && message.subscription_id === sub.id) {\n            sub.subscriber.onData(message.payload)\n          }\n        }\n      }\n      const onClose = () => {\n        this.handleSocketError(new Error(\"WebSocket closed\"))\n          .then(() => {\n            resolve()\n          })\n          .catch(e => {\n            reject(e)\n          })\n      }\n      const onOpen = () => {\n        resolve()\n      }\n\n      this.socket.addEventListener(\"message\", onMessage)\n      this.socket.addEventListener(\"close\", onClose)\n      this.socket.addEventListener(\"open\", onOpen)\n\n      this.closeConnection = () => {\n        this.socket?.removeEventListener(\"message\", onMessage)\n        this.socket?.removeEventListener(\"close\", onClose)\n        this.socket?.removeEventListener(\"open\", onOpen)\n\n        this.socket?.close()\n        this.socket = null\n        this.closeConnection = null\n        this.connectPromise = null\n      }\n    })\n\n    return this.connectPromise\n  }\n\n  private async handleSocketError(error: any) {\n    // Cleanup the connection\n    this.closeConnection?.()\n\n    // Validate the number of reconnection attempts\n    if (\n      ++this.reconnectAttempts >= this.config.reconnectOptions.reconnectAttempts\n    ) {\n      logger.log({\n        level: logger.LEVELS.error,\n        title: \"WebSocket Error\",\n        message: `Failed to reconnect to the server after ${this.reconnectAttempts + 1} attempts: ${error}`,\n      })\n\n      this.subscriptions.forEach(sub => {\n        sub.subscriber.onError(\n          new Error(\n            `Failed to reconnect to the server after ${this.reconnectAttempts + 1} attempts: ${error}`\n          )\n        )\n      })\n      this.subscriptions = []\n      this.reconnectAttempts = 0\n\n      throw error\n    } else {\n      logger.log({\n        level: logger.LEVELS.warn,\n        title: \"WebSocket Error\",\n        message: `WebSocket error, reconnecting in ${this.backoffInterval}ms: ${error}`,\n      })\n\n      // Delay the reconnection\n      await new Promise(resolve => setTimeout(resolve, this.backoffInterval))\n\n      // Try to reconnect\n      await this.connect()\n\n      // Restore subscriptions\n      await Promise.all(\n        this.subscriptions.map(async sub => {\n          await this.sendSubscribe(sub).catch(e => {\n            sub.subscriber.onError(\n              new Error(`Failed to restore subscription: ${e}`)\n            )\n            // Remove the subscription\n            this.subscriptions = this.subscriptions.filter(s => s.id !== sub.id)\n          })\n        })\n      )\n\n      this.reconnectAttempts = 0\n    }\n  }\n\n  private async sendSubscribe(sub: SubscriptionInfo) {\n    // Send the subscription message\n    const request: MessageRequest = {\n      action: Action.SUBSCRIBE,\n      topic: sub.topic,\n      arguments: sub.subscriber.getConnectionArgs(),\n      subscription_id: String(sub.id),\n    }\n\n    const response = await this.request(request)\n    if (response.error) {\n      throw new Error(`Failed to subscribe to topic ${sub.topic}`, {\n        cause: SocketError.fromMessage(response.error),\n      })\n    }\n    return response\n  }\n\n  private async sendUnsubscribe(sub: SubscriptionInfo) {\n    // Send the unsubscribe message if the subscription has a remote id\n    const request: MessageRequest = {\n      action: Action.UNSUBSCRIBE,\n      subscription_id: sub.id,\n    }\n    this.socket?.send(JSON.stringify(request))\n\n    const response: UnsubscribeMessageResponse = (await this.request(\n      request\n    )) as UnsubscribeMessageResponse\n    if (response.error) {\n      throw new Error(`Failed to unsubscribe from topic ${sub.topic}`, {\n        cause: SocketError.fromMessage(response.error),\n      })\n    }\n\n    return response\n  }\n\n  private async request(request: MessageRequest): Promise<MessageResponse> {\n    let cleanup = () => {}\n\n    return await new Promise<MessageResponse>((resolve, reject) => {\n      if (!this.socket) {\n        reject(new Error(\"WebSocket is not connected\"))\n        return\n      }\n\n      // Set the cleanup function to remove the event listeners\n      cleanup = () => {\n        this.socket?.removeEventListener(\"error\", onError)\n        this.socket?.removeEventListener(\"message\", onMessage)\n        this.socket?.removeEventListener(\"close\", onClose)\n      }\n\n      // Bind event listeners\n      this.socket.addEventListener(\"error\", onError)\n      this.socket.addEventListener(\"message\", onMessage)\n      this.socket.addEventListener(\"close\", onClose)\n\n      // Send the request\n      this.socket.send(JSON.stringify(request))\n\n      function onError(e: WebSocketEventMap[\"error\"]) {\n        reject(new Error(`WebSocket error: ${e}`))\n      }\n\n      function onClose() {\n        reject(new Error(\"WebSocket closed\"))\n      }\n\n      function onMessage(event: MessageEvent) {\n        const data = JSON.parse(event.data) as MessageResponse\n        if (data.subscription_id === request.subscription_id) {\n          resolve(data)\n        }\n      }\n    }).finally(() => {\n      cleanup()\n    })\n  }\n\n  private getHandler(topic: string) {\n    const handler = this.handlers.find(handler => handler.topic === topic)\n    if (!handler) {\n      throw new Error(`No handler found for topic ${topic}`)\n    }\n    return handler\n  }\n\n  /**\n   * Calculate the backoff interval for reconnection attempts\n   * @returns The backoff interval in milliseconds\n   */\n  private get backoffInterval() {\n    return Math.min(\n      this.config.reconnectOptions.maxReconnectDelay,\n      this.config.reconnectOptions.initialReconnectDelay *\n        2 ** this.reconnectAttempts\n    )\n  }\n}\n"
  },
  {
    "path": "packages/transport-http/src/subscribe/websocket.ts",
    "content": "import _WebSocket from \"isomorphic-ws\"\n\nexport const WebSocket = _WebSocket as (new (\n  url: string | URL,\n  protocols?: string | string[] | undefined\n) => WebSocket) &\n  WebSocket\n"
  },
  {
    "path": "packages/transport-http/src/transport.ts",
    "content": "import {SdkTransport} from \"@onflow/typedefs\"\nimport {send} from \"./send/send-http\"\nimport {subscribe} from \"./subscribe/subscribe\"\n\nexport const httpTransport: SdkTransport = {\n  send,\n  subscribe,\n}\n"
  },
  {
    "path": "packages/transport-http/src/utils/combine-urls.test.ts",
    "content": "import {combineURLs} from \"./combine-urls\"\n\ndescribe(\"combineUrls\", () => {\n  test(\"base url (no slash, no path), relative url (no slash)\", () => {\n    const baseURL = \"https://example.com\"\n    const relativeURL = \"users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/users\")\n  })\n\n  test(\"base url (no slash, no path), relative url (with slash)\", () => {\n    const baseURL = \"https://example.com\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/users\")\n  })\n\n  test(\"base url (no slash, with path), relative url (no slash)\", () => {\n    const baseURL = \"https://example.com/api\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/api/users\")\n  })\n\n  test(\"base url (no slash, with path), relative url (with slash)\", () => {\n    const baseURL = \"https://example.com/api\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/api/users\")\n  })\n\n  test(\"base url (with slash, no path), relative url (no slash)\", () => {\n    const baseURL = \"https://example.com/\"\n    const relativeURL = \"users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/users\")\n  })\n\n  test(\"base url (with slash, no path), relative url (with slash)\", () => {\n    const baseURL = \"https://example.com/\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/users\")\n  })\n\n  test(\"base url (with slash, with path), relative url (no slash)\", () => {\n    const baseURL = \"https://example.com/api/\"\n    const relativeURL = \"users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/api/users\")\n  })\n\n  test(\"base url (with slash, with path), relative url (with slash)\", () => {\n    const baseURL = \"https://example.com/api/\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/api/users\")\n  })\n\n  test(\"base url (with slash, with path), relative url (with slash)\", () => {\n    const baseURL = \"https://example.com/api/\"\n    const relativeURL = \"/users\"\n    const combinedURL = combineURLs(baseURL, relativeURL)\n    expect(combinedURL).toBe(\"https://example.com/api/users\")\n  })\n\n  test(\"base url, no relative url\", () => {\n    const baseURL = \"https://example.com/api\"\n    const combinedURL = combineURLs(baseURL)\n    expect(combinedURL).toBe(\"https://example.com/api\")\n  })\n})\n"
  },
  {
    "path": "packages/transport-http/src/utils/combine-urls.ts",
    "content": "/**\n * This file was taken from the Axios project and modified to work with TypeScript/ES6 modules.\n *\n * The original file can be found on GitHub:\n * https://github.com/axios/axios/blob/fe7d09bb08fa1c0e414956b7fc760c80459b0a43/lib/helpers/combineURLs.js\n *\n * The original license is included below:\n *\n * Copyright (c) 2014 Matt Zabriskie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param baseURL The base URL\n * @param relativeURL The relative URL\n * @returns The combined URL\n */\nexport function combineURLs(baseURL: string, relativeURL?: string): string {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, \"\") + \"/\" + relativeURL.replace(/^\\/+/, \"\")\n    : baseURL\n}\n"
  },
  {
    "path": "packages/transport-http/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/typedefs/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/typedefs/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\"plugin:jsdoc/recommended\"],\n  \"plugins\": [\"jsdoc\"],\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"rules\": {\n    \"jsdoc/require-jsdoc\": [\n      \"error\",\n      {\n        \"publicOnly\": true\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/typedefs/.npmignore",
    "content": "*\r\n\r\n!dist/**\r\n!types/**\r\n!package.json\r\n!README.md\r\n"
  },
  {
    "path": "packages/typedefs/CHANGELOG.md",
    "content": "# @onflow/typedefs\n\n## 1.8.0\n\n### Minor Changes\n\n- [#2638](https://github.com/onflow/fcl-js/pull/2638) [`d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960`](https://github.com/onflow/fcl-js/commit/d9d994cdaca8fe82cce0a3bcf48b5b4f7d3dc960) Thanks [@jribbink](https://github.com/jribbink)! - Adds support for signature extension data introduced by [FLIP 264](https://github.com/onflow/flips/blob/main/protocol/20250203-webauthn-credential-support.md).\n\n  Users can now include signature extension data in their transactions by returning an additional `extensionData` property in their signing functions.\n\n  ```typescript\n  const authz = (ix: Interaction) => {\n    return {\n      addr: \"0x1234567890abcdef\",\n      keyId: 0,\n      signingFunction: (signable: Signable) => ({\n        signature: \"1234\",\n        extensionData: \"1234\",\n      }),\n    }\n  }\n  ```\n\n## 1.7.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.7.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n## 1.7.0-alpha.0\n\n### Minor Changes\n\n- [#2534](https://github.com/onflow/fcl-js/pull/2534) [`8b5086024e0295649bb4266aa0cafbcb2e4171b7`](https://github.com/onflow/fcl-js/commit/8b5086024e0295649bb4266aa0cafbcb2e4171b7) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-core package to TypeScript\n\n- [#2535](https://github.com/onflow/fcl-js/pull/2535) [`e8293cb2c752b340793d2342450a022d79c14edc`](https://github.com/onflow/fcl-js/commit/e8293cb2c752b340793d2342450a022d79c14edc) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl package to TypeScript\n\n- [#2536](https://github.com/onflow/fcl-js/pull/2536) [`14ff4a2f04362d7b8a10b444321ffd0c17b20f76`](https://github.com/onflow/fcl-js/commit/14ff4a2f04362d7b8a10b444321ffd0c17b20f76) Thanks [@mfbz](https://github.com/mfbz)! - Refactored fcl-react-native package to TypeScript\n\n## 1.6.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add typedefs for streaming API\n\n- [#2352](https://github.com/onflow/fcl-js/pull/2352) [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0) Thanks [@mfbz](https://github.com/mfbz)! - Refactored onflow/sdk package to improve TypeScript support\n\n## 1.6.0-alpha.0\n\n### Minor Changes\n\n- [#2201](https://github.com/onflow/fcl-js/pull/2201) [`b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab`](https://github.com/onflow/fcl-js/commit/b9c4ed3b95c2dc73698e45f353a6ef9a48f23cab) Thanks [@jribbink](https://github.com/jribbink)! - Add typedefs for streaming API\n\n- [#2352](https://github.com/onflow/fcl-js/pull/2352) [`4d3bb084c1442552d6a1de1f53435d1aa3f600b0`](https://github.com/onflow/fcl-js/commit/4d3bb084c1442552d6a1de1f53435d1aa3f600b0) Thanks [@mfbz](https://github.com/mfbz)! - Refactored onflow/sdk package to improve TypeScript support\n\n## 1.5.0\n\n### Minor Changes\n\n- [#2393](https://github.com/onflow/fcl-js/pull/2393) [`e10f1db63a8a9cc86a56e312d7d7e3a2089d4a3a`](https://github.com/onflow/fcl-js/commit/e10f1db63a8a9cc86a56e312d7d7e3a2089d4a3a) Thanks [@mfbz](https://github.com/mfbz)! - Changed typedefs types to interfaces for code standardization\n\n## 1.4.1\n\n### Patch Changes\n\n- [#2216](https://github.com/onflow/fcl-js/pull/2216) [`ae0ddb755a4c099df1558900192d395543ffccec`](https://github.com/onflow/fcl-js/commit/ae0ddb755a4c099df1558900192d395543ffccec) Thanks [@jribbink](https://github.com/jribbink)! - Expose all available arguments to `EventFilter` type (`startBlockId`, `startBlockHeight`, `heartbeatInterval`)\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add missing field to TransactionStatus type\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add FvmErrorCode enum for categorizing transaction/script execution errors\n\n- [#1981](https://github.com/onflow/fcl-js/pull/1981) [`dda32df052801ee5e70b703a19c246f36bbd31c2`](https://github.com/onflow/fcl-js/commit/dda32df052801ee5e70b703a19c246f36bbd31c2) Thanks [@jribbink](https://github.com/jribbink)! - Add missing fields to Provider type\n\n### Patch Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Fix CurrentUser services type\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.4.0-alpha.2\n\n### Patch Changes\n\n- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Fix CurrentUser services type\n\n## 1.4.0-alpha.1\n\n### Minor Changes\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add missing field to TransactionStatus type\n\n- [#1893](https://github.com/onflow/fcl-js/pull/1893) [`b9f49494d5b3faed1bc24005adc6ba312f653a21`](https://github.com/onflow/fcl-js/commit/b9f49494d5b3faed1bc24005adc6ba312f653a21) Thanks [@jribbink](https://github.com/jribbink)! - Add FvmErrorCode enum for categorizing transaction/script execution errors\n\n## 1.4.0-alpha.0\n\n### Minor Changes\n\n- [#1981](https://github.com/onflow/fcl-js/pull/1981) [`dda32df052801ee5e70b703a19c246f36bbd31c2`](https://github.com/onflow/fcl-js/commit/dda32df052801ee5e70b703a19c246f36bbd31c2) Thanks [@jribbink](https://github.com/jribbink)! - Add missing fields to Provider type\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1918](https://github.com/onflow/fcl-js/pull/1918) [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5) Thanks [@jribbink](https://github.com/jribbink)! - Miscellaneous TypeScript fixes\n\n## 1.3.1-alpha.0\n\n### Patch Changes\n\n- [#1918](https://github.com/onflow/fcl-js/pull/1918) [`bc78da0c`](https://github.com/onflow/fcl-js/commit/bc78da0c283ba0fef2680f040eb69b46e8923fa5) Thanks [@jribbink](https://github.com/jribbink)! - Miscellaneous TypeScript fixes\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - Typescript improvements\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add types for general stream connections & event streaming API\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.3.0-alpha.4\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n## 1.3.0-alpha.3\n\n### Minor Changes\n\n- [#1855](https://github.com/onflow/fcl-js/pull/1855) [`80db8166`](https://github.com/onflow/fcl-js/commit/80db816620d7643c35a0fca7149c15de92f7bc88) Thanks [@jribbink](https://github.com/jribbink)! - Add GetNodeVersionInfo SDK Interaction\n\n## 1.3.0-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.3.0-alpha.1\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - TS conversion\n\n- [#1794](https://github.com/onflow/fcl-js/pull/1794) [`acf90a78`](https://github.com/onflow/fcl-js/commit/acf90a7841f843227d5d9edb450ef08322c77c4d) Thanks [@jribbink](https://github.com/jribbink)! - Add types for general stream connections & event streaming API\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1666](https://github.com/onflow/fcl-js/pull/1666) [`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd) Thanks [@nialexsan](https://github.com/nialexsan)! - React Native support\n\n- [#1724](https://github.com/onflow/fcl-js/pull/1724) [`f3f0288a`](https://github.com/onflow/fcl-js/commit/f3f0288a9ba7a363140c2eb92c84483c4719684a) Thanks [@jribbink](https://github.com/jribbink)! - Fix statusString typedef\n\n## 1.1.1-alpha.1\n\n### Patch Changes\n\n- [#1724](https://github.com/onflow/fcl-js/pull/1724) [`f3f0288a`](https://github.com/onflow/fcl-js/commit/f3f0288a9ba7a363140c2eb92c84483c4719684a) Thanks [@jribbink](https://github.com/jribbink)! - Fix statusString typedef\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- [#1666](https://github.com/onflow/fcl-js/pull/1666) [`090963f3`](https://github.com/onflow/fcl-js/commit/090963f3ff6d4557f90a451a1ff5a723656f87dd) Thanks [@nialexsan](https://github.com/nialexsan)! - React Native support\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1639](https://github.com/onflow/fcl-js/pull/1639) [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for fcl.tx\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1644](https://github.com/onflow/fcl-js/pull/1644) [`a669ea39`](https://github.com/onflow/fcl-js/commit/a669ea39570044f692d064af7d4c7e7fff766ccb) Thanks [@nialexsan](https://github.com/nialexsan)! - fixed signUserMessage return type\n\n## 1.1.0-alpha.6\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.5\n\n### Minor Changes\n\n- [#1639](https://github.com/onflow/fcl-js/pull/1639) [`434c2f48`](https://github.com/onflow/fcl-js/commit/434c2f4887c7d8fd0101ff79cc901d0c66795065) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for fcl.tx\n\n### Patch Changes\n\n- [#1644](https://github.com/onflow/fcl-js/pull/1644) [`a669ea39`](https://github.com/onflow/fcl-js/commit/a669ea39570044f692d064af7d4c7e7fff766ccb) Thanks [@nialexsan](https://github.com/nialexsan)! - fixed signUserMessage return type\n\n## 1.1.0-alpha.4\n\n### Minor Changes\n\n- [#1591](https://github.com/onflow/fcl-js/pull/1591) [`7b122a49`](https://github.com/onflow/fcl-js/commit/7b122a49b47b2f261e67d4b08d0d8d32d35d3a72) Thanks [@chasefleming](https://github.com/chasefleming)! - Create typedefs package for JSDoc typedefs and TypeScript types\n\n## 1.1.0-alpha.3\n"
  },
  {
    "path": "packages/typedefs/README.md",
    "content": "JSDoc typedefs and TypeScript types.\n\n```typescript\n\nimport {CurrentUser} from \"@onflow/typedefs\"\n\nconst newUser: CurrentUser = { \n  addr: null,\n  cid: null,\n  expiresAt: null,\n  f_type: 'User',\n  f_vsn: '1.0.0',\n  loggedIn: null,\n  services: []\n}\n\n```\n"
  },
  {
    "path": "packages/typedefs/package.json",
    "content": "{\n  \"name\": \"@onflow/typedefs\",\n  \"version\": \"1.8.0\",\n  \"description\": \"Flow JS Type Defs\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/node\": \"^18.19.57\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"jest-esm-transformer\": \"1.0.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/typedefs.js\",\n  \"module\": \"dist/typedefs.module.js\",\n  \"unpkg\": \"dist/typedefs.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  }\n}\n"
  },
  {
    "path": "packages/typedefs/src/fvm-errors.ts",
    "content": "/**\n * Error codes defined by the Flow Virtual Machine (FVM) for various types of errors that can occur during transaction execution\n */\nexport enum FvmErrorCode {\n  // We use -1 for unknown error in FCL because FVM defines error codes as uint16\n  // This means we have no risk of collision with FVM error codes\n  UNKNOWN_ERROR = -1,\n  // tx validation errors 1000 - 1049\n  // Deprecated: no longer in use\n  TX_VALIDATION_ERROR = 1000,\n  // Deprecated: No longer used.\n  INVALID_TX_BYTE_SIZE_ERROR = 1001,\n  // Deprecated: No longer used.\n  INVALID_REFERENCE_BLOCK_ERROR = 1002,\n  // Deprecated: No longer used.\n  EXPIRED_TRANSACTION_ERROR = 1003,\n  // Deprecated: No longer used.\n  INVALID_SCRIPT_ERROR = 1004,\n  // Deprecated: No longer used.\n  INVALID_GAS_LIMIT_ERROR = 1005,\n  INVALID_PROPOSAL_SIGNATURE_ERROR = 1006,\n  INVALID_PROPOSAL_SEQ_NUMBER_ERROR = 1007,\n  INVALID_PAYLOAD_SIGNATURE_ERROR = 1008,\n  INVALID_ENVELOPE_SIGNATURE_ERROR = 1009,\n\n  // base errors 1050 - 1100\n  // Deprecated: No longer used.\n  FVM_INTERNAL_ERROR = 1050,\n  VALUE_ERROR = 1051,\n  INVALID_ARGUMENT_ERROR = 1052,\n  INVALID_ADDRESS_ERROR = 1053,\n  INVALID_LOCATION_ERROR = 1054,\n  ACCOUNT_AUTHORIZATION_ERROR = 1055,\n  OPERATION_AUTHORIZATION_ERROR = 1056,\n  OPERATION_NOT_SUPPORTED_ERROR = 1057,\n  BLOCK_HEIGHT_OUT_OF_RANGE_ERROR = 1058,\n\n  // execution errors 1100 - 1200\n  // Deprecated: No longer used.\n  EXECUTION_ERROR = 1100,\n  CADENCE_RUNTIME_ERROR = 1101,\n  // Deprecated: No longer used.\n  ENCODING_UNSUPPORTED_VALUE = 1102,\n  STORAGE_CAPACITY_EXCEEDED = 1103,\n  // Deprecated: No longer used.\n  GAS_LIMIT_EXCEEDED_ERROR = 1104,\n  EVENT_LIMIT_EXCEEDED_ERROR = 1105,\n  LEDGER_INTERACTION_LIMIT_EXCEEDED_ERROR = 1106,\n  STATE_KEY_SIZE_LIMIT_ERROR = 1107,\n  STATE_VALUE_SIZE_LIMIT_ERROR = 1108,\n  TRANSACTION_FEE_DEDUCTION_FAILED_ERROR = 1109,\n  COMPUTATION_LIMIT_EXCEEDED_ERROR = 1110,\n  MEMORY_LIMIT_EXCEEDED_ERROR = 1111,\n  COULD_NOT_DECODE_EXECUTION_PARAMETER_FROM_STATE = 1112,\n  SCRIPT_EXECUTION_TIMED_OUT_ERROR = 1113,\n  SCRIPT_EXECUTION_CANCELLED_ERROR = 1114,\n  EVENT_ENCODING_ERROR = 1115,\n  INVALID_INTERNAL_STATE_ACCESS_ERROR = 1116,\n  // 1117 was never deployed and is free to use\n  INSUFFICIENT_PAYER_BALANCE = 1118,\n\n  // accounts errors 1200 - 1250\n  // Deprecated: No longer used.\n  ACCOUNT_ERROR = 1200,\n  ACCOUNT_NOT_FOUND_ERROR = 1201,\n  ACCOUNT_PUBLIC_KEY_NOT_FOUND_ERROR = 1202,\n  ACCOUNT_ALREADY_EXISTS_ERROR = 1203,\n  // Deprecated: No longer used.\n  FROZEN_ACCOUNT_ERROR = 1204,\n  // Deprecated: No longer used.\n  ACCOUNT_STORAGE_NOT_INITIALIZED_ERROR = 1205,\n  ACCOUNT_PUBLIC_KEY_LIMIT_ERROR = 1206,\n\n  // contract errors 1250 - 1300\n  // Deprecated: No longer used.\n  CONTRACT_ERROR = 1250,\n  CONTRACT_NOT_FOUND_ERROR = 1251,\n  // Deprecated: No longer used.\n  CONTRACT_NAMES_NOT_FOUND_ERROR = 1252,\n\n  // fvm std lib errors 1300-1400\n  EVM_EXECUTION_ERROR = 1300,\n}\n"
  },
  {
    "path": "packages/typedefs/src/index.test.js",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/typedefs/src/index.ts",
    "content": "export interface Account {\n  /**\n   * The address of the account\n   */\n  address: string\n  /**\n   * The FLOW balance of the account in 10^8\n   */\n  balance: number\n  /**\n   * The code of any Cadence contracts stored in the account\n   */\n  code: number\n  /**\n   * Any contracts deployed to this account\n   */\n  contracts: Record<string, string>\n  /**\n   * The keys associated with the account\n   */\n  keys: Array<AccountKey>\n}\n\nexport interface AccountKey {\n  /**\n   * The index of the key in the account\n   */\n  index: number\n  /**\n   * The public key of the account key\n   */\n  publicKey: string\n  /**\n   * The signature algorithm used by the key\n   */\n  signAlgo: SignatureAlgorithm\n  /**\n   * The signature algorithm used by the key as a string\n   */\n  signAlgoString: string\n  /**\n   * The hashing algorithm used by the key\n   */\n  hashAlgo: HashAlgorithm\n  /**\n   * The hashing algorithm used by the key as a string\n   */\n  hashAlgoString: string\n  /**\n   * The sequence number of the key\n   */\n  sequenceNumber: number\n  /**\n   * The weight of the key\n   */\n  weight: number\n  /**\n   * Whether or not the key has been revoked\n   */\n  revoked: boolean\n}\n\nexport enum SignatureAlgorithm {\n  ECDSA_P256 = 1,\n  ECDSA_secp256k1 = 2,\n  BLS_BLS12_381 = 3,\n}\n\nexport enum HashAlgorithm {\n  SHA2_256 = 1,\n  SHA2_384 = 2,\n  SHA3_256 = 3,\n  SHA3_384 = 4,\n  KMAC128_BLS_BLS12_381 = 5,\n}\n\nexport interface Block {\n  /**\n   * The id of the block\n   */\n  id: string\n  /**\n   * The id of the parent block\n   */\n  parentId: string\n  /**\n   * The height of the block\n   */\n  height: number\n  /**\n   * Time related fields\n   */\n  timestamp: string\n  /**\n   * The parent voter signature of the block\n   */\n  parentVoterSignature: string\n  /**\n   * Contains the ids of collections included in the block\n   */\n  collectionGuarantees: Array<CollectionGuarantee>\n  /**\n   * The details of which nodes executed and sealed the blocks\n   */\n  blockSeals: Array<BlockSeal>\n}\nexport interface CollectionGuarantee {\n  /**\n   * The id of the block\n   */\n  collectionId: string\n  /**\n   * The signer ids of the block\n   */\n  signerIds: Array<string>\n}\nexport interface BlockSeal {\n  /**\n   * The id of the block\n   */\n  blockId: string\n  /**\n   * The execution receipt id of the block\n   */\n  executionReceiptId: string\n}\n/**\n * BlockDigest holds lightweight block information which includes only block id, block height and block timestamp.\n */\nexport interface BlockDigest {\n  /**\n   * The id of the block\n   */\n  id: string\n  /**\n   * The height of the block\n   */\n  height: number\n  /**\n   * Timestamp of the block\n   */\n  timestamp: string\n}\n/**\n * Header contains all meta-data for a block, as well as a hash representing\n * the combined payload of the entire block. It is what consensus nodes agree\n * on after validating the contents against the payload hash.\n */\nexport interface BlockHeader {\n  /**\n   * The id of the block\n   */\n  id: string\n  /**\n   * The id of the parent block\n   */\n  parentId: string\n  /**\n   * The height of the block\n   */\n  height: number\n  /**\n   * The timestamp of the block\n   */\n  timestamp: string\n  /**\n   * The parent voter signature of the block\n   */\n  parentVoterSignature: string\n}\nexport interface CompositeSignature {\n  /**\n   * A type identifier used internally by FCL\n   */\n  f_type: string\n  /**\n   * FCL protocol version\n   */\n  f_vsn: string\n  /**\n   * Flow Address (sans prefix)\n   */\n  addr: string\n  /**\n   * Key ID\n   */\n  keyId: number\n  /**\n   * Signature as a hex string\n   */\n  signature: string\n  /**\n   * Optional signature extension data for alternative schemes (e.g., WebAuthn)\n   */\n  extensionData?: string\n}\nexport interface CurrentUser {\n  /**\n   * The public address of the current user\n   */\n  addr?: string\n  /**\n   * A wallet specified content identifier for user metadata\n   */\n  cid?: string\n  /**\n   * A wallet specified time-frame for a valid session\n   */\n  expiresAt?: number\n  /**\n   * A type identifier used internally by FCL\n   */\n  f_type: string\n  /**\n   * FCL protocol version\n   */\n  f_vsn: string\n  /**\n   * Whether or not the current user is logged in\n   */\n  loggedIn?: boolean\n  /**\n   * A list of trusted services that express ways of interacting with the current user's identity\n   */\n  services: Array<Service>\n}\nexport interface Event {\n  /**\n   * ID of the block that contains the event.\n   */\n  blockId: string\n  /**\n   * Height of the block that contains the event.\n   */\n  blockHeight: number\n  /**\n   * The timestamp of when the block was sealed in a DateString format. eg. '2021-06-25T13:42:04.227Z'\n   */\n  blockTimestamp: string\n  /**\n   * A string containing the event name.\n   */\n  type: string\n  /**\n   * Can be used to query transaction information, eg. via a Flow block explorer.\n   */\n  transactionId: string\n  /**\n   * Used to prevent replay attacks.\n   */\n  transactionIndex: number\n  /**\n   * Used to prevent replay attacks.\n   */\n  eventIndex: number\n  /**\n   * The data emitted from the event.\n   */\n  data: any\n}\nexport interface AccountStatusEvent extends Omit<Event, \"blockTimestamp\"> {\n  /**\n   * The address of the account which the event is associated with.\n   */\n  accountAddress: string\n}\nexport interface Key {\n  /**\n   * Sequence number of key used by the proposer of this transaction\n   */\n  sequenceNumber: number\n  /**\n   * The ID of the key in the account used by the proposer of this transaction\n   */\n  keyId: number\n  /**\n   * The address of the proposer of this transaction\n   */\n  address: string\n}\nexport interface Service {\n  /**\n   * A type identifier used internally by FCL\n   */\n  f_type: string\n  /**\n   * FCL protocol version\n   */\n  f_vsn: string\n  /**\n   * Service type\n   */\n  type: string\n  /**\n   * Service method\n   */\n  method: string\n  /**\n   * Service uid\n   */\n  uid?: string\n  /**\n   * Service endpoint\n   */\n  endpoint: string\n  /**\n   * Service provider object\n   */\n  provider: Provider\n  /**\n   * Service parameters\n   */\n  params: Record<string, string>\n  /**\n   * Service data\n   */\n  data?: Record<string, any>\n  /**\n   * Service headers\n   */\n  headers?: Record<string, string>\n}\nexport interface Signature {\n  /**\n   * Sequence number of the key used to perform this signature.\n   */\n  sequenceNumber: string\n  /**\n   * ID of the key in the account used to perform this signature.\n   */\n  keyId: number\n  /**\n   * The signature represented as a hex string.\n   */\n  signature: string\n}\nexport interface Transaction {\n  /**\n   * The Cadence code used to execute this transaction.\n   */\n  script: string\n  /**\n   * The JSON-CDC encoded arguments passed in to the transaction.\n   */\n  args: Array<string>\n  /**\n   * The reference block id for this transaction.\n   */\n  referenceBlockId: string\n  /**\n   * The gas limit for the transaction.\n   */\n  gasLimit: number\n  /**\n   * The key used by the proposer of this transaction.\n   */\n  proposalKey: Key\n  /**\n   * Sequence number of the key used by the proposer of this transaction.\n   */\n  sequenceNumber: string\n  /**\n   * The ID of the key in the account used by the proposer of this transaction.\n   */\n  keyId: number\n  /**\n   * The address of the proposer of this transaction.\n   */\n  address: string\n  /**\n   * Address of the payer of the transaction.\n   */\n  payer: string\n  /**\n   * Address of the proposer of this transaction.\n   */\n  proposer: string\n  /**\n   * Array of addresses of authorizers of this transaction.\n   */\n  authorizers: Array<string>\n  /**\n   * The payload signatures for the transaction.\n   */\n  payloadSignatures: Array<Signature>\n  /**\n   * The envelope signatures for the transaction.\n   */\n  envelopeSignatures: Array<Signature>\n}\nexport interface TransactionStatus {\n  /**\n   * The ID of the Block the transaction is included in.\n   */\n  blockId: string\n  /**\n   * The execution status of the transaction\n   */\n  status: TransactionExecutionStatus\n  /**\n   * The status as as descriptive text (e.g. \"FINALIZED\").\n   */\n  statusString: string\n  /**\n   * The result of the transaction, if executed (i.e. 0 for success, 1 for failure)\n   */\n  statusCode: 0 | 1\n  /**\n   * The error message of the transaction.\n   */\n  errorMessage: string\n  /**\n   * The events for this result.\n   */\n  events: Array<Event>\n}\n/**\n * The execution status of the transaction.\n */\nexport enum TransactionExecutionStatus {\n  UNKNOWN = 0,\n  PENDING = 1,\n  FINALIZED = 2,\n  EXECUTED = 3,\n  SEALED = 4,\n  EXPIRED = 5,\n}\n/*\n * The Provider type describes a Wallet Provider associated with a specific Service.\n */\nexport interface Provider {\n  /**\n   * The blockchain address of the Wallet provider.\n   */\n  address?: string\n  /**\n   * The name of the Wallet provider.\n   */\n  name?: string\n  /**\n   * The icon of the Wallet provider (may be a URL or a data URI).\n   */\n  icon?: string\n  /**\n   * A brief description of the Wallet provider.\n   */\n  description?: string\n  /**\n   * The preferred color to represent the Wallet provider (e.g., for UI styling).\n   */\n  color?: string\n  /**\n   * The support email address of the Wallet provider.\n   */\n  supportEmail?: string\n  /**\n   * The website URL of the Wallet provider.\n   */\n  website?: string\n  /**\n   * Indicates whether the Wallet provider is installed (if applicable).\n   */\n  is_installed?: boolean\n  /**\n   * Indicates whether the Wallet provider requires installation (if applicable).\n   */\n  requires_install?: boolean\n  /**\n   * The install link for the Wallet provider.\n   */\n  install_link?: string\n}\nexport interface NodeVersionInfo {\n  /**\n   * The semver version of the node.\n   */\n  semver: string\n  /**\n   * The commit hash of the node.\n   */\n  commit: string\n  /**\n   * The spork id of the node.\n   */\n  sporkId: string\n  /**\n   * The protocol version of the node.\n   */\n  protocolVersion: number\n  /**\n   * The spork root block height of the node.\n   */\n  sporkRootBlockHeight: number\n  /**\n   * The node root block height of the node.\n   */\n  nodeRootBlockHeight: number\n}\n\nexport interface StreamConnection<ChannelMap extends {[name: string]: any}> {\n  on<C extends keyof ChannelMap>(\n    channel: C,\n    listener: (data: ChannelMap[C]) => void\n  ): this\n  on(event: \"close\", listener: () => void): this\n  on(event: \"error\", listener: (err: any) => void): this\n  off<C extends keyof ChannelMap>(\n    event: C,\n    listener: (data: ChannelMap[C]) => void\n  ): this\n  off(event: \"close\", listener: () => void): this\n  off(event: \"error\", listener: (err: any) => void): this\n  close(): void\n}\n\nexport interface EventFilter {\n  /**\n   * The event types to listen for\n   */\n  eventTypes?: string[]\n  /**\n   * The addresses to listen for\n   */\n  addresses?: string[]\n  /**\n   * The contracts to listen for\n   */\n  contracts?: string[]\n  /**\n   * The block ID to start listening for events\n   */\n  startBlockId?: string\n  /**\n   * The block height to start listening for events\n   */\n  startHeight?: number\n  /**\n   * The interval in milliseconds to send a heartbeat to the Access Node\n   */\n  heartbeatInterval?: number\n}\n\nexport interface BlockHeartbeat {\n  /**\n   * The ID of the block\n   */\n  blockId: string\n  /**\n   * The height of the block\n   */\n  blockHeight: number\n  /**\n   * The timestamp of the block\n   */\n  timestamp: string\n}\n\nexport type EventStream = StreamConnection<{\n  events: Event[]\n  heartbeat: BlockHeartbeat\n}>\n\nexport * from \"./interaction\"\nexport * from \"./fvm-errors\"\nexport {type SdkTransport} from \"./transport\"\nexport {\n  type SubscriptionArgs,\n  type SubscriptionData,\n  type RawSubscriptionData,\n  type Subscription,\n  SubscriptionTopic,\n} from \"./subscriptions\"\n"
  },
  {
    "path": "packages/typedefs/src/interaction.ts",
    "content": "/**\n * Represents different types of interactions with the Flow blockchain\n */\nexport enum InteractionTag {\n  UNKNOWN = \"UNKNOWN\",\n  SCRIPT = \"SCRIPT\",\n  TRANSACTION = \"TRANSACTION\",\n  GET_TRANSACTION_STATUS = \"GET_TRANSACTION_STATUS\",\n  GET_ACCOUNT = \"GET_ACCOUNT\",\n  GET_EVENTS = \"GET_EVENTS\",\n  PING = \"PING\",\n  GET_TRANSACTION = \"GET_TRANSACTION\",\n  GET_BLOCK = \"GET_BLOCK\",\n  GET_BLOCK_HEADER = \"GET_BLOCK_HEADER\",\n  GET_COLLECTION = \"GET_COLLECTION\",\n  GET_NETWORK_PARAMETERS = \"GET_NETWORK_PARAMETERS\",\n  SUBSCRIBE_EVENTS = \"SUBSCRIBE_EVENTS\",\n  GET_NODE_VERSION_INFO = \"GET_NODE_VERSION_INFO\",\n}\n\n/**\n * Status of an interaction with the Flow blockchain\n */\nexport enum InteractionStatus {\n  BAD = \"BAD\",\n  OK = \"OK\",\n}\n\n/**\n * Represents different roles in a transaction\n */\nexport enum TransactionRole {\n  AUTHORIZER = \"authorizer\",\n  PAYER = \"payer\",\n  PROPOSER = \"proposer\",\n}\n\n/**\n * Represents different kinds of interaction resolvers\n */\nexport enum InteractionResolverKind {\n  ARGUMENT = \"ARGUMENT\",\n  ACCOUNT = \"ACCOUNT\",\n}\n\nexport interface InteractionAccount {\n  /**\n   * The kind of interaction resolver\n   */\n  kind: InteractionResolverKind.ACCOUNT\n  /**\n   * Temporary identifier for the account\n   */\n  tempId: string\n  /**\n   * The address of the account\n   */\n  addr: string | null\n  /**\n   * The key ID used for signing\n   */\n  keyId: number | string | null\n  /**\n   * The sequence number for the account key\n   */\n  sequenceNum: number | null\n  /**\n   * The signature for the account\n   */\n  signature: string | null\n  /**\n   * Optional extension data for alternative signature schemes (e.g., WebAuthn)\n   */\n  extensionData?: string | null\n  /**\n   * Function used for signing\n   */\n  signingFunction: any | null\n  /**\n   * Resolver function for the account\n   */\n  resolve: any | null\n  /**\n   * Role of the account in the transaction\n   */\n  role: {\n    /**\n     * Whether this account is a proposer\n     */\n    proposer: boolean\n    /**\n     * Whether this account is an authorizer\n     */\n    authorizer: boolean\n    /**\n     * Whether this account is a payer\n     */\n    payer: boolean\n    /**\n     * Whether this account is a parameter\n     */\n    param?: boolean\n  }\n  /**\n   * Authorization details for the account\n   */\n  authorization: any\n}\n\nexport interface Interaction {\n  /**\n   * The type of interaction\n   */\n  tag: InteractionTag\n  /**\n   * Assigned values for the interaction\n   */\n  assigns: Record<string, any>\n  /**\n   * The status of the interaction\n   */\n  status: InteractionStatus\n  /**\n   * Reason for the current status\n   */\n  reason: string | null\n  /**\n   * Accounts involved in the interaction\n   */\n  accounts: Record<string, InteractionAccount>\n  /**\n   * Parameters for the interaction\n   */\n  params: Record<string, any>\n  /**\n   * Arguments for the interaction\n   */\n  arguments: Record<string, any>\n  /**\n   * Message details for the interaction\n   */\n  message: {\n    /**\n     * The Cadence code to execute\n     */\n    cadence: string\n    /**\n     * Reference block for the transaction\n     */\n    refBlock: string\n    /**\n     * Compute limit for the transaction\n     */\n    computeLimit: number\n    /**\n     * The proposer of the transaction\n     */\n    proposer: string\n    /**\n     * The payer of the transaction\n     */\n    payer: string\n    /**\n     * The authorizations for the transaction\n     */\n    authorizations: string[]\n    /**\n     * Parameters for the message\n     */\n    params: Record<string, any>[]\n    /**\n     * Arguments for the message\n     */\n    arguments: string[]\n  }\n  /**\n   * The proposer of the transaction\n   */\n  proposer: string | null\n  /**\n   * The authorizations for the transaction\n   */\n  authorizations: string[]\n  /**\n   * The payer(s) of the transaction\n   */\n  payer: string[]\n  /**\n   * Event-related information\n   */\n  events: {\n    /**\n     * The type of event to listen for\n     */\n    eventType: string | null\n    /**\n     * Start block for event listening\n     */\n    start: string | number | null\n    /**\n     * End block for event listening\n     */\n    end: string | number | null\n    /**\n     * Specific block IDs to listen for events\n     */\n    blockIds: string[]\n  }\n  /**\n   * Transaction-related information\n   */\n  transaction: {\n    /**\n     * The ID of the transaction\n     */\n    id: string | null\n  }\n  /**\n   * Block-related information\n   */\n  block: {\n    /**\n     * The ID of the block\n     */\n    id: string | null\n    /**\n     * The height of the block\n     */\n    height: string | number | null\n    /**\n     * Whether the block is sealed\n     */\n    isSealed: boolean | null\n  }\n  /**\n   * Account-related information\n   */\n  account: {\n    /**\n     * The address of the account\n     */\n    addr: string | null\n  }\n  /**\n   * Collection-related information\n   */\n  collection: {\n    /**\n     * The ID of the collection\n     */\n    id: string | null\n  }\n  /**\n   * Event subscription information\n   */\n  subscribeEvents: {\n    /**\n     * The event types to subscribe to\n     */\n    eventTypes: string[] | null\n    /**\n     * The addresses to listen for events\n     */\n    addresses: string[] | null\n    /**\n     * The contracts to listen for events\n     */\n    contracts: string[] | null\n    /**\n     * The starting block ID for event subscription\n     */\n    startBlockId: string | null\n    /**\n     * The starting block height for event subscription\n     */\n    startHeight: number | null\n    /**\n     * The heartbeat interval for event subscription\n     */\n    heartbeatInterval: number | null\n  }\n}\n"
  },
  {
    "path": "packages/typedefs/src/subscriptions.ts",
    "content": "import {\n  AccountStatusEvent,\n  Block,\n  BlockDigest,\n  BlockHeader,\n  Event,\n  EventFilter,\n  TransactionExecutionStatus,\n  TransactionStatus,\n} from \".\"\n\n/**\n * Represents different topics that can be subscribed to for real-time data from the Flow blockchain\n */\nexport enum SubscriptionTopic {\n  BLOCKS = \"blocks\",\n  BLOCK_HEADERS = \"block_headers\",\n  BLOCK_DIGESTS = \"block_digests\",\n  ACCOUNT_STATUSES = \"account_statuses\",\n  TRANSACTION_STATUSES = \"transaction_statuses\",\n  EVENTS = \"events\",\n}\n\n/**\n * The data returned by a subscription, which will vary depending on the topic\n */\nexport type SubscriptionData<T extends SubscriptionTopic> =\n  SubscriptionDataMap[T]\n\n/**\n * Raw data returned by a subscription, which will vary depending on the topic and is not decoded\n */\nexport type RawSubscriptionData<T extends SubscriptionTopic> =\n  RawSubscriptionDataMap[T]\n\n/**\n * Arguments for a subscription, which will vary depending on the topic\n */\nexport type SubscriptionArgs<T extends SubscriptionTopic> =\n  SubscriptionArgsMap[T]\n\n/**\n * A subscription object that allows managing the subscription lifecycle\n */\nexport type Subscription = {\n  /**\n   * Function to unsubscribe from the subscription\n   */\n  unsubscribe: () => void\n}\n\ntype SubscriptionArgsMap = {\n  [SubscriptionTopic.BLOCKS]: BlockSubscriptionArgs\n  [SubscriptionTopic.BLOCK_HEADERS]: BlockSubscriptionArgs\n  [SubscriptionTopic.BLOCK_DIGESTS]: BlockSubscriptionArgs\n  [SubscriptionTopic.ACCOUNT_STATUSES]: AccountStatusSubscriptionArgs\n  [SubscriptionTopic.TRANSACTION_STATUSES]: TransactionStatusSubscriptionArgs\n  [SubscriptionTopic.EVENTS]: EventSubscriptionArgs\n}\n\ntype SubscriptionDataMap = {\n  [SubscriptionTopic.EVENTS]: Event\n  [SubscriptionTopic.BLOCKS]: Block\n  [SubscriptionTopic.BLOCK_HEADERS]: BlockHeader\n  [SubscriptionTopic.BLOCK_DIGESTS]: BlockHeader\n  [SubscriptionTopic.ACCOUNT_STATUSES]: AccountStatusEvent\n  [SubscriptionTopic.TRANSACTION_STATUSES]: TransactionStatus\n}\n\ntype RawSubscriptionDataMap = {\n  [SubscriptionTopic.EVENTS]: {\n    event: Omit<Event, \"data\"> & {\n      payload: {\n        type: string\n        value: any\n      }\n    }\n  }\n  [SubscriptionTopic.BLOCKS]: {\n    block: Block\n  }\n  [SubscriptionTopic.BLOCK_HEADERS]: {\n    blockHeader: BlockHeader\n  }\n  [SubscriptionTopic.BLOCK_DIGESTS]: {\n    blockDigest: BlockDigest\n  }\n  [SubscriptionTopic.ACCOUNT_STATUSES]: {\n    accountStatusEvent: Omit<Event, \"data\" | \"blockTimestamp\"> & {\n      payload: {\n        type: string\n        value: any\n      }\n      accountAddress: string\n    }\n  }\n  [SubscriptionTopic.TRANSACTION_STATUSES]: {\n    transactionStatus: {\n      blockId: string\n      status: TransactionExecutionStatus\n      statusString: string\n      statusCode: 0 | 1\n      errorMessage: string\n      events: {\n        type: string\n        transactionId: string\n        transactionIndex: number\n        eventIndex: number\n        payload: {\n          type: string\n          value: any\n        }\n      }[]\n    }\n  }\n}\n\ntype BlockSubscriptionArgs =\n  | {\n      blockStatus: \"finalized\" | \"sealed\"\n      startBlockId?: string\n    }\n  | {\n      blockStatus: \"finalized\" | \"sealed\"\n      startBlockHeight?: number\n    }\n\ntype AccountStatusSubscriptionArgs = {\n  startBlockId?: string\n  startBlockHeight?: number\n  eventTypes?: string[]\n  addresses?: string[]\n  accountAddresses?: string[]\n}\n\ntype TransactionStatusSubscriptionArgs = {\n  transactionId: string\n}\n\ntype EventSubscriptionArgs = {\n  eventTypes?: string[]\n  addresses?: string[]\n  contracts?: string[]\n  startBlockId?: string\n  startBlockHeight?: number\n  heartbeatInterval?: number\n}\n"
  },
  {
    "path": "packages/typedefs/src/transport.ts",
    "content": "import {Interaction} from \"./interaction\"\nimport {\n  RawSubscriptionData,\n  Subscription,\n  SubscriptionArgs,\n  SubscriptionTopic,\n} from \"./subscriptions\"\n\ninterface InteractionModule {\n  isTransaction: (ix: Interaction) => boolean\n  isGetTransactionStatus: (ix: Interaction) => boolean\n  isGetTransaction: (ix: Interaction) => boolean\n  isScript: (ix: Interaction) => boolean\n  isGetAccount: (ix: Interaction) => boolean\n  isGetEvents: (ix: Interaction) => boolean\n  isGetBlock: (ix: Interaction) => boolean\n  isGetBlockHeader: (ix: Interaction) => boolean\n  isGetCollection: (ix: Interaction) => boolean\n  isPing: (ix: Interaction) => boolean\n  isGetNetworkParameters: (ix: Interaction) => boolean\n  isSubscribeEvents?: (ix: Interaction) => boolean\n  isGetNodeVersionInfo?: (ix: Interaction) => boolean\n}\ninterface IContext {\n  ix: InteractionModule\n}\ninterface IOptsCommon {\n  node?: string\n}\n\ninterface IOpts extends IOptsCommon {\n  sendTransaction?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetTransactionStatus?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetTransaction?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendExecuteScript?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetAccount?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetEvents?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetBlockHeader?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetCollection?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendPing?: (ix: Interaction, context: IContext, opts: IOptsCommon) => void\n  sendGetBlock?: (ix: Interaction, context: IContext, opts: IOptsCommon) => void\n  sendGetNetworkParameters?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  connectSubscribeEvents?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n  sendGetNodeVersionInfo?: (\n    ix: Interaction,\n    context: IContext,\n    opts: IOptsCommon\n  ) => void\n}\n\ntype SubscribeFn = <T extends SubscriptionTopic>(\n  params: {\n    topic: T\n    args: SubscriptionArgs<T>\n    onData: (data: RawSubscriptionData<T>) => void\n    onError: (error: Error) => void\n  },\n  opts: {node: string}\n) => Subscription\n\ntype SendFn = (\n  ix: Interaction | Promise<Interaction>,\n  context: IContext,\n  opts: IOpts\n) => Promise<any>\n\n/**\n * Transport interface for the Flow SDK that provides methods for sending interactions and subscribing to data\n */\nexport type SdkTransport = {\n  /**\n   * Function to send an interaction to the Flow blockchain\n   */\n  send: SendFn\n  /**\n   * Function to subscribe to real-time data from the Flow blockchain\n   */\n  subscribe: SubscribeFn\n}\n"
  },
  {
    "path": "packages/typedefs/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/types/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/types/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/types/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"overrides\": [\n    {\n      \"files\": [\"**/*.test.ts\"],\n      \"env\": {\n        \"jest\": true\n      },\n      \"rules\": {\n        \"jsdoc/require-jsdoc\": 0\n      }\n    }\n  ],\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": 0\n  }\n}\n"
  },
  {
    "path": "packages/types/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/types/CHANGELOG.md",
    "content": "# @onflow/types\n\n## 1.5.0\n\n### Minor Changes\n\n- [#2689](https://github.com/onflow/fcl-js/pull/2689) [`bfb2665f759dd406fdd12900dd5bbdf7619dbc73`](https://github.com/onflow/fcl-js/commit/bfb2665f759dd406fdd12900dd5bbdf7619dbc73) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Added support for UFix128 and Fix128 types to @onflow/types package and decoder support to @onflow/sdk package. These fixed-point number types have been added to the Flow protocol and are now available for use in Cadence transactions and scripts. UFix128 and Fix128 support up to 24 decimal places of precision.\n\n  The decoder in @onflow/sdk now properly handles UFix128 and Fix128 values when decoding responses from Flow scripts and transactions.\n\n## 1.4.2\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/util-logger@1.3.4\n\n## 1.4.1\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-logger@1.3.3\n\n## 1.4.1-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-logger@1.3.3-alpha.0\n\n## 1.4.0\n\n### Minor Changes\n\n- [#1863](https://github.com/onflow/fcl-js/pull/1863) [`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074) Thanks [@jribbink](https://github.com/jribbink)! - Update SDK encoding/decoding for Cadence 1.0 JSON-CDC changes\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - Typescript improvements\n\n### Patch Changes\n\n- [#1837](https://github.com/onflow/fcl-js/pull/1837) [`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f) Thanks [@bthaile](https://github.com/bthaile)! - Update fcl query template type to allow for object and string\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-logger@1.3.2\n\n## 1.3.0-alpha.3\n\n### Patch Changes\n\n- [#1837](https://github.com/onflow/fcl-js/pull/1837) [`45d3c30c`](https://github.com/onflow/fcl-js/commit/45d3c30c8965512dde41f10d1c64c813811c3c0f) Thanks [@bthaile](https://github.com/bthaile)! - Update fcl query template type to allow for object and string\n\n## 1.3.0-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-logger@1.3.2-alpha.2\n\n## 1.3.0-alpha.1\n\n### Minor Changes\n\n- [#1802](https://github.com/onflow/fcl-js/pull/1802) [`699303cf`](https://github.com/onflow/fcl-js/commit/699303cfd5e0545267632c9236f8c91833ce1259) Thanks [@nialexsan](https://github.com/nialexsan)! - TS conversion\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-logger@1.3.2-alpha.1\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-logger@1.3.1\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert @onflow/types to TypeScript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-logger@1.3.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.2\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.1\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.0.5\n\n### Patch Changes\n\n- [#1468](https://github.com/onflow/fcl-js/pull/1468) [`f14cfb61`](https://github.com/onflow/fcl-js/commit/f14cfb61abcb877b3c8924508df593c6621413b4) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - Adds Enum type support\n\n## 1.0.4\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.3-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n- 2022-03-04 -- Deprecated Number as value for [U]Int* and Word* types.\n\n### 0.0.6 -- 2021-11-16\n\n- 2021-11-16 Added `t.Path`\n\n### 0.0.5 -- 2021-07-22\n\n- 2021-07-22 -- Declaring a `UFix64` value without prodviding a correctly formatted fractional throws an error.\n\n### 0.0.4 -- 2020-08-24\n\n- 2020-08-19 -- Deprecates numbers as values passed in for UFix64 and Fix64 types\n\n### 0.0.3 -- 2020-07-10\n\n- 2020-07-10 -- Required version bump.\n\n### 0.0.2 -- 2020-06-30\n\n- 2020-06-29 -- Stringifies int values to conform to JSON-CDC spec.\n\n### 0.0.1 -- 2020-06-19\n\n- 2020-06-19 -- Changes asParam to asArgument\n- 2020-06-11 -- Added a type for each of the types suppored by JSON-CDC\n- 2020-04-18 -- VSN jest 25.1.0 -> 25.3.0\n- 2020-04-18 -- VSN microbundle 0.11.0 -> 0.12.0-next.8\n\n### 0.0.1 -- 2020-04-17\n\n- _2020-04-17_ Added `t.Identity`\n"
  },
  {
    "path": "packages/types/README.md",
    "content": "---\ntitle: Types\ndescription: Translates JavaScript values into equivalent Cadence compatible values\n---\n\n\n\n## Status\n\n- **Last Updated:** July 10 2020\n- **Stable:** Yes\n- **Risk of Breaking Change:** Medium\n\n## Install\n\n```bash\nnpm install --save @onflow/types\n```\n\n## Usage\n\n### Transactions\n\n```javascript\nimport * as sdk from \"@onflow/sdk\"\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.transaction`\n    transaction(to: Address, amount: UFix64) {\n      execute {\n        let addr: Address = to\n        let value: UFix64 = amount\n      }\n    }\n  `,\n  sdk.args([\n    sdk.arg(to, t.Address),\n    sdk.arg(amount, t.UFix64),\n  ]),\n])\n```\n\n### Scripts\n\n```javascript\nimport * as sdk from \"@onflow/sdk\"\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.script`\n    pub fun main(a: Int, b: Int): Int {\n      return a + b\n    }\n  `,\n  sdk.args([\n    sdk.arg(1, t.Int),\n    sdk.arg(2, t.Int),\n  ]),\n])\n```\n\n# Available Types\n\n### UInt\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(1, t.UInt) ])\n])\n```\n\n### Int\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(1, t.Int) ])\n])\n```\n\n### UInt8\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(8, t.UInt8) ])\n])\n```\n\n### Int8\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(8, t.Int8) ])\n])\n```\n\n### UInt16\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(16, t.UInt16) ])\n])\n```\n\n### Int16\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(16, t.Int16) ])\n])\n```\n\n### UInt32\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(32, t.UInt32) ])\n])\n```\n\n### Int32\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(32, t.Int32) ])\n])\n```\n\n### UInt64\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(64, t.UInt64) ])\n])\n```\n\n### Int64\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(64, t.Int64) ])\n])\n```\n\n### UInt128\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(128, t.UInt128) ])\n])\n```\n\n### Int128\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(128, t.Int128) ])\n])\n```\n\n### UInt256\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(256, t.UInt256) ])\n])\n```\n\n### Int256\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(256, t.Int256) ])\n])\n```\n\n### Word8\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(8, t.Word8) ])\n])\n```\n\n### Word16\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(16, t.Word16) ])\n])\n```\n\n### Word32\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(32, t.Word32) ])\n])\n```\n\n### Word64\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(64, t.Word64) ])\n])\n```\n\n### Word128\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(128, t.Word128) ])\n])\n```\n\n### Word256\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(256, t.Word256) ])\n])\n```\n\n### UFix64\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"64.123\", t.UFix64) ])\n])\n```\n\n### Fix64\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"64.123\", t.Fix64) ])\n])\n```\n\n### UFix128\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"128.123456789012345678901234\", t.UFix128) ])\n])\n```\n\n### Fix128\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"128.123456789012345678901234\", t.Fix128) ])\n])\n```\n\n### String\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"Flow\", t.String) ])\n])\n```\n\n### Character\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"c\", t.Character) ])\n])\n```\n\n### Bool\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(true, t.Bool) ])\n])\n```\n\n### Address\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"0xABC123DEF456\", t.Address) ])\n])\n```\n\n\n\n### Optional\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(\"Flow\", t.Optional(t.String)) ])\n])\n\nsdk.build([\n  sdk.args([ sdk.arg(null, t.Optional(t.String)) ])\n])\n```\n\n\n### Array\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg([\"First\", \"Second\"], t.Array(t.String)) ])\n])\n\nsdk.build([\n  sdk.args([ sdk.arg([\"First\", 2], t.Array([t.String, t.Int])) ])\n])\n```\n\n### Dictionary\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      [\n        {key: 1, value: \"one\"},\n        {key: 2, value: \"two\"},\n      ],\n      t.Dictionary({key: t.Int, value: t.String})\n    )\n  ])\n])\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      [\n        {key: \"a\", value: \"one\"},\n        {key: \"b\", value: \"two\"},\n      ],\n      t.Dictionary({key: t.String, value: t.String})\n    )\n  ])\n])\n```\n\n### Path\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      {\n        domain: \"public\"                // public | private | storage\n        identifier: \"flowTokenVault\"\n      },\n      t.Path\n    )\n  ])\n])\n```\n\n# Exist but not supported\n\nThe following, while technically possible, are impractical. We strongly recommend not using them as arguments for transactions or scripts.\n\n### Void\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg(null, t.Void) ])\n])\n```\n\n### Event\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      {\n        fields: [{name: \"wasTheCodeClean?\", value: \"absolutely\"}],\n      },\n      t.Event(\"0xABC123DEF456.JeffWroteSomeJS\", [{value: t.String}]),\n    )\n  ])\n])\n```\n\n\n### Reference\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg({address: \"0xABC123DEF456\", type: \"0xABC123DEF456.CryptoKitty\"}, t.Reference) ])\n])\n```\n\n### Struct\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      {\n        fields: [{name: \"CryptoKitty_name\", value: \"Lil' Jimmy The CryptoKitty\"}],\n      },\n      t.Struct(\"0xABC123DEF456.CryptoKitty\", [{value: t.String}])\n    )\n  ])\n])\n```\n\n### Resource\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([\n    sdk.arg(\n      {\n        fields: [{name: \"Jeffysaur_Name\", value: \"Mr Jeff The Dinosaur\"}],\n      }\n      t.Resource(\"0x01.Jeffysaur\", [{value: t.String}]),\n    )\n  ])\n])\n```\n\n### InclusiveRange\n\n```javascript\nimport * as t from \"@onflow/types\"\n\nsdk.build([\n  sdk.args([ sdk.arg({start: \"1\", end: \"10\", step: \"1\"}, t.InclusiveRange(t.Int)) ])\n])\n```\n"
  },
  {
    "path": "packages/types/WARNINGS.md",
    "content": "# Warnings\n\n## 0002 [U]Int* and Word* as Number\n\n- **Date:** March 4 2022\n- **Issue:** [#283](https://github.com/onflow/fcl-js/issues/283)\n- **Type:** Deprecation of accepting JavaScript numbers as values for [U]Int* and Word* as Number types.\n\n[U]Int* and Word* types will no longer accept Number as values for them in the near future.\n\nPlease only pass String as value for [U]Int* and Word* types.\n\n\n## 0001 [U]Fix64 as Number\n\n- **Date:** August 19 2020\n- **Issue:** [#283](https://github.com/onflow/fcl-js/issues/283)\n- **Type:** Deprecation of accepting JavaScript numbers as values for Fix64 and UFix64 types.\n\nFix64 and UFix64 types will no longer accept numbers as values for them in the near future.\n\nPlease pass only strings as values for Fix64 and UFix64 types. \n"
  },
  {
    "path": "packages/types/package.json",
    "content": "{\n  \"name\": \"@onflow/types\",\n  \"version\": \"1.5.0\",\n  \"description\": \"Utilities to transform javascript values into Cadence understandable values\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/types.ts\",\n  \"main\": \"dist/types.js\",\n  \"module\": \"dist/types.module.js\",\n  \"unpkg\": \"dist/types.umd.js\",\n  \"types\": \"types/types.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \" npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint src\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/util-logger\": \"1.3.4\"\n  }\n}\n"
  },
  {
    "path": "packages/types/src/types.test.ts",
    "content": "import * as t from \"./types\"\n\nregisterTest([t.Int, \"1\", {type: \"Int\", value: \"1\"}, \"1\"])\nregisterTest([t.UInt, \"1\", {type: \"UInt\", value: \"1\"}, \"1\"])\nregisterTest([t.Int8, \"8\", {type: \"Int8\", value: \"8\"}, \"8\"])\nregisterTest([t.UInt8, \"8\", {type: \"UInt8\", value: \"8\"}, \"8\"])\nregisterTest([t.Int16, \"16\", {type: \"Int16\", value: \"16\"}, \"16\"])\nregisterTest([t.UInt16, \"16\", {type: \"UInt16\", value: \"16\"}, \"16\"])\nregisterTest([t.Int32, \"32\", {type: \"Int32\", value: \"32\"}, \"32\"])\nregisterTest([t.UInt32, \"32\", {type: \"UInt32\", value: \"32\"}, \"32\"])\nregisterTest([t.Int64, \"64\", {type: \"Int64\", value: \"64\"}, \"64\"])\nregisterTest([t.UInt64, \"64\", {type: \"UInt64\", value: \"64\"}, \"64\"])\nregisterTest([t.Int128, \"128\", {type: \"Int128\", value: \"128\"}, \"128\"])\nregisterTest([t.UInt128, \"128\", {type: \"UInt128\", value: \"128\"}, \"128\"])\nregisterTest([t.Int256, \"256\", {type: \"Int256\", value: \"256\"}, \"256\"])\nregisterTest([t.UInt256, \"256\", {type: \"UInt256\", value: \"256\"}, \"256\"])\nregisterTest([t.Word8, \"8\", {type: \"Word8\", value: \"8\"}, \"8\"])\nregisterTest([t.Word16, \"16\", {type: \"Word16\", value: \"16\"}, \"16\"])\nregisterTest([t.Word32, \"32\", {type: \"Word32\", value: \"32\"}, \"32\"])\nregisterTest([t.Word64, \"64\", {type: \"Word64\", value: \"64\"}, \"64\"])\nregisterTest([t.Word128, \"128\", {type: \"Word128\", value: \"128\"}, \"128\"])\nregisterTest([t.Word256, \"256\", {type: \"Word256\", value: \"256\"}, \"256\"])\nregisterTest([t.UFix64, \"64\", {type: \"UFix64\", value: \"64\"}, \"64\", true])\nregisterTest([t.Fix64, \"64\", {type: \"Fix64\", value: \"64\"}, \"64\", true])\nregisterTest([\n  t.UFix64,\n  \"64.000000001\",\n  {type: \"UFix64\", value: \"64.000000001\"},\n  \"64.000000001\",\n  true,\n])\nregisterTest([\n  t.Fix64,\n  \"64.000000001\",\n  {type: \"Fix64\", value: \"64.000000001\"},\n  \"64.000000001\",\n  true,\n])\nregisterTest([\n  t.UFix64,\n  \"64.0\",\n  {type: \"UFix64\", value: \"64.00000000\"},\n  \"64.0\",\n  false,\n])\nregisterTest([\n  t.Fix64,\n  \"64.0\",\n  {type: \"Fix64\", value: \"64.00000000\"},\n  \"64.0\",\n  false,\n])\nregisterTest([t.UFix128, \"128\", {type: \"UFix128\", value: \"128\"}, \"128\", true])\nregisterTest([t.Fix128, \"128\", {type: \"Fix128\", value: \"128\"}, \"128\", true])\nregisterTest([\n  t.UFix128,\n  \"128.000000000000000001\",\n  {type: \"UFix128\", value: \"128.000000000000000001000000\"},\n  \"128.000000000000000001\",\n  false,\n])\nregisterTest([\n  t.Fix128,\n  \"128.000000000000000001\",\n  {type: \"Fix128\", value: \"128.000000000000000001000000\"},\n  \"128.000000000000000001\",\n  false,\n])\nregisterTest([\n  t.UFix128,\n  \"128.0\",\n  {type: \"UFix128\", value: \"128.000000000000000000000000\"},\n  \"128.0\",\n  false,\n])\nregisterTest([\n  t.Fix128,\n  \"128.0\",\n  {type: \"Fix128\", value: \"128.000000000000000000000000\"},\n  \"128.0\",\n  false,\n])\nregisterTest([\n  t.String,\n  \"Go with the Flow\",\n  {type: \"String\", value: \"Go with the Flow\"},\n  \"Go with the Flow\",\n])\nregisterTest([t.Character, \"c\", {type: \"Character\", value: \"c\"}, \"c\"])\nregisterTest([t.Bool, true, {type: \"Bool\", value: true}, true])\nregisterTest([t.Address, \"0x1\", {type: \"Address\", value: \"0x1\"}, \"0x1\"])\nregisterTest([t.Void, null, {type: \"Void\", value: null}, null])\nregisterTest([\n  t.Optional(t.String),\n  null,\n  {type: \"Optional\", value: null},\n  null,\n])\nregisterTest([\n  t.Optional(t.String),\n  \"test\",\n  {type: \"Optional\", value: {type: \"String\", value: \"test\"}},\n  \"test\",\n])\nregisterTest([\n  t.Reference,\n  {address: \"0x01\", type: \"0x01.CryptoKitty\"},\n  {type: \"Reference\", value: {address: \"0x01\", type: \"0x01.CryptoKitty\"}},\n  {address: \"0x01\", type: \"0x01.CryptoKitty\"},\n])\nregisterTest([\n  t.Array(t.String),\n  [\"test\"],\n  {type: \"Array\", value: [{type: \"String\", value: \"test\"}]},\n  [\"test\"],\n])\nregisterTest([\n  t.Array([t.String, t.String]),\n  [\"test1\", \"test2\"],\n  {\n    type: \"Array\",\n    value: [\n      {type: \"String\", value: \"test1\"},\n      {type: \"String\", value: \"test2\"},\n    ],\n  },\n  [\"test1\", \"test2\"],\n])\nregisterTest([\n  t.Dictionary([\n    {key: t.Int, value: t.String},\n    {key: t.Int, value: t.String},\n  ]),\n  [\n    {key: \"1\", value: \"one\"},\n    {key: \"2\", value: \"two\"},\n  ],\n  {\n    type: \"Dictionary\",\n    value: [\n      {key: {type: \"Int\", value: \"1\"}, value: {type: \"String\", value: \"one\"}},\n      {key: {type: \"Int\", value: \"2\"}, value: {type: \"String\", value: \"two\"}},\n    ],\n  },\n  [\n    {key: \"1\", value: \"one\"},\n    {key: \"2\", value: \"two\"},\n  ],\n])\nregisterTest([\n  t.Dictionary({key: t.Int, value: t.String}),\n  {key: \"1\", value: \"one\"},\n  {\n    type: \"Dictionary\",\n    value: [\n      {key: {type: \"Int\", value: \"1\"}, value: {type: \"String\", value: \"one\"}},\n    ],\n  },\n  {key: \"1\", value: \"one\"},\n])\nregisterTest([\n  t.Struct(\"0x01.Jeffysaur\", [{value: t.String}]),\n  {fields: [{name: \"Jeffysaur_Name\", value: \"Mr Jeff The Dinosaur\"}]},\n  {\n    type: \"Struct\",\n    value: {\n      id: \"0x01.Jeffysaur\",\n      fields: [\n        {\n          name: \"Jeffysaur_Name\",\n          value: {type: \"String\", value: \"Mr Jeff The Dinosaur\"},\n        },\n      ],\n    },\n  },\n  {fields: [{name: \"Jeffysaur_Name\", value: \"Mr Jeff The Dinosaur\"}]},\n])\nregisterTest([\n  t.Enum(\"0x01.SuperEnum\", [{value: t.String}]),\n  {fields: [{name: \"SuperKey1\", value: \"SuperValue1\"}]},\n  {\n    type: \"Enum\",\n    value: {\n      id: \"0x01.SuperEnum\",\n      fields: [\n        {name: \"SuperKey1\", value: {type: \"String\", value: \"SuperValue1\"}},\n      ],\n    },\n  },\n  {fields: [{name: \"SuperKey1\", value: \"SuperValue1\"}]},\n])\nregisterTest([\n  t.Event(\"0x01.JeffWroteSomeJS\", [{value: t.String}]),\n  {fields: [{name: \"wasTheCodeClean?\", value: \"absolutely\"}]},\n  {\n    type: \"Event\",\n    value: {\n      id: \"0x01.JeffWroteSomeJS\",\n      fields: [\n        {\n          name: \"wasTheCodeClean?\",\n          value: {type: \"String\", value: \"absolutely\"},\n        },\n      ],\n    },\n  },\n  {fields: [{name: \"wasTheCodeClean?\", value: \"absolutely\"}]},\n])\nregisterTest([\n  t.Resource(\"0x01.Jeffysaur\", [{value: t.String}]),\n  {fields: [{name: \"Jeffysaur_Name\", value: \"Mr Jeff The Dinosaur\"}]},\n  {\n    type: \"Resource\",\n    value: {\n      id: \"0x01.Jeffysaur\",\n      fields: [\n        {\n          name: \"Jeffysaur_Name\",\n          value: {type: \"String\", value: \"Mr Jeff The Dinosaur\"},\n        },\n      ],\n    },\n  },\n  {fields: [{name: \"Jeffysaur_Name\", value: \"Mr Jeff The Dinosaur\"}]},\n])\nregisterTest([\n  t.Path,\n  {\n    domain: \"public\" as \"storage\" | \"private\" | \"public\",\n    identifier: \"flowTokenVault\",\n  },\n  {type: \"Path\", value: {domain: \"public\", identifier: \"flowTokenVault\"}},\n  {\n    domain: \"public\" as \"storage\" | \"private\" | \"public\",\n    identifier: \"flowTokenVault\",\n  },\n])\nregisterTest([\n  t.Path,\n  {\n    domain: \"notValidDomain\" as \"storage\" | \"private\" | \"public\",\n    identifier: \"flowTokenVault\",\n  },\n  {\n    type: \"Path\",\n    value: {\n      domain: \"notValidDomain\" as \"storage\" | \"private\" | \"public\",\n      identifier: \"flowTokenVault\",\n    },\n  },\n  {\n    domain: \"notValidDomain\" as \"storage\" | \"private\" | \"public\",\n    identifier: \"flowTokenVault\",\n  },\n  true,\n])\nregisterTest([\n  t.InclusiveRange(t.Int),\n  {\n    start: 5,\n    end: 10,\n    step: 1,\n  },\n  {\n    type: \"InclusiveRange\",\n    value: {\n      start: {type: \"Int\", value: \"5\"},\n      end: {type: \"Int\", value: \"10\"},\n      step: {type: \"Int\", value: \"1\"},\n    },\n  },\n  {\n    start: 5,\n    end: 10,\n    step: 1,\n  },\n])\n\nfunction registerTest<X, Y extends string, Z>([\n  cast,\n  input,\n  asArgument,\n  asInjection,\n  shouldError = false,\n]: readonly [\n  t.TypeDescriptor<X, t.JsonCdc<Y, Z>>,\n  X,\n  t.JsonCdc<Y, Z>,\n  X,\n  boolean?,\n]) {\n  describe(cast.label, () => {\n    test(`t.${cast.label}.asArgument(${input})`, () => {\n      if (shouldError) {\n        expect(() => cast.asArgument(input)).toThrow()\n      } else {\n        expect(cast.asArgument(input)).toStrictEqual(asArgument)\n      }\n    })\n    test(`t.${cast.label}.asInjection(${input})`, () => {\n      expect(cast.asInjection(input)).toStrictEqual(asInjection)\n    })\n  })\n}\n"
  },
  {
    "path": "packages/types/src/types.ts",
    "content": "import {log} from \"@onflow/util-logger\"\n\nexport type JsonCdc<L extends string, T> = {\n  type: L\n  value: T\n}\n\ntype JsonCdcLabel<X extends JsonCdc<string, unknown>> =\n  X extends JsonCdc<infer L, unknown> ? L : never\n\nexport interface TypeDescriptor<T, V extends JsonCdc<string, unknown>> {\n  label: JsonCdcLabel<V>\n  asArgument: (x: T) => V\n  asInjection: (x: T) => T\n}\n\nexport type TypeDescriptorInput<\n  X extends TypeDescriptor<any, JsonCdc<string, unknown>>,\n> = X extends TypeDescriptor<infer T, JsonCdc<string, unknown>> ? T : never\n\nexport interface PathValue {\n  domain: \"storage\" | \"private\" | \"public\"\n  identifier: string\n}\n\n/**\n * @deprecated Reference values cannot be imported into the Cadence interpreter, will be removed in future versions\n */\nexport interface ReferenceValue {\n  type: string\n  address: string\n}\n\n/**\n * Creates a type descriptor for a given type\n * @param label - The label for the type\n * @param asArgument - A function that converts the type to a JsonCdcType\n * @param asInjection - A function which returns the argument as is\n * @returns A type descriptor\n * @internal\n */\nconst typedef = <T, V extends JsonCdc<string, unknown>>(\n  label: JsonCdcLabel<V>,\n  asArgument: (x: T) => V,\n  asInjection: (x: T) => T\n): TypeDescriptor<T, V> => ({\n  label,\n  asArgument,\n  asInjection: (x: T) => {\n    log.deprecate({\n      pkg: \"@onflow/types\",\n      subject: `Passing in ${label} as value for ${label}`,\n      message: `Going forward, use ${label} as value for ${label}.`,\n    })\n    return asInjection(x)\n  },\n})\n\nconst isArray = <T>(d: unknown): d is T[] => Array.isArray(d)\nconst isObj = (d: unknown): d is object => typeof d === \"object\"\nconst isNull = (d: unknown): d is null | undefined => d == null\nconst isBoolean = (d: unknown): d is boolean => typeof d === \"boolean\"\nconst isNumber = (d: unknown): d is number => typeof d === \"number\"\nconst isInteger = (d: unknown): d is number => Number.isInteger(d)\nconst isString = (d: unknown): d is string => typeof d === \"string\"\n\nconst throwTypeError = (msg: unknown): never => {\n  throw new Error(\"Type Error: \" + msg)\n}\n\nconst numberValuesDeprecationNotice = (type: string) => {\n  log.deprecate({\n    pkg: \"@onflow/types\",\n    subject: `Passing in Number as value for ${type}`,\n    message: `Going forward, use String as value for ${type}.`,\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0002-[U]Int*-and-Word*-as-Number\",\n  })\n}\n\nlet identityDeprecationShown = false\n/**\n * @deprecated will be removed in v2.0.0\n */\nexport const Identity = {\n  label: \"Identity\",\n  asArgument: <T>(v: T) => {\n    if (!identityDeprecationShown) {\n      log.deprecate({\n        pkg: \"@onflow/types\",\n        subject: \"Identity\",\n        message:\n          \"Identity type is deprecated and will be removed in v2.0.0.  Please remove it from your code.\",\n      })\n      identityDeprecationShown = true\n    }\n    return v\n  },\n  asInjection: <T>(v: T) => v,\n}\n\nexport const UInt = typedef(\n  \"UInt\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt\")\n      return {\n        type: \"UInt\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected Positive Integer for type Unsigned Int\")\n  },\n  v => v\n)\n\nexport const Int = typedef(\n  \"Int\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int\")\n      return {\n        type: \"Int\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected Integer for type Int\")\n  },\n  v => v\n)\n\nexport const UInt8 = typedef(\n  \"UInt8\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt8\")\n      return {\n        type: \"UInt8\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt8\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt8\")\n  },\n  v => v\n)\n\nexport const Int8 = typedef(\n  \"Int8\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int8\")\n      return {\n        type: \"Int8\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int8\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive integer for Int8\")\n  },\n  v => v\n)\n\nexport const UInt16 = typedef(\n  \"UInt16\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt16\")\n      return {\n        type: \"UInt16\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt16\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt16\")\n  },\n  v => v\n)\n\nexport const Int16 = typedef(\n  \"Int16\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int16\")\n      return {\n        type: \"Int16\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int16\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive integer for Int16\")\n  },\n  v => v\n)\n\nexport const UInt32 = typedef(\n  \"UInt32\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt32\")\n      return {\n        type: \"UInt32\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt32\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt32\")\n  },\n  v => v\n)\n\nexport const Int32 = typedef(\n  \"Int32\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int32\")\n      return {\n        type: \"Int32\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int32\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive integer for Int32\")\n  },\n  v => v\n)\n\nexport const UInt64 = typedef(\n  \"UInt64\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt64\")\n      return {\n        type: \"UInt64\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt64\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt64\")\n  },\n  v => v\n)\n\nexport const Int64 = typedef(\n  \"Int64\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int64\")\n      return {\n        type: \"Int64\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int64\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive integer for Int64\")\n  },\n  v => v\n)\n\nexport const UInt128 = typedef(\n  \"UInt128\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt128\")\n      return {\n        type: \"UInt128\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt128\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt128\")\n  },\n  v => v\n)\n\nexport const Int128 = typedef(\n  \"Int128\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int128\")\n      return {\n        type: \"Int128\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int128\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive integer for Int128\")\n  },\n  v => v\n)\n\nexport const UInt256 = typedef(\n  \"UInt256\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"UInt256\")\n      return {\n        type: \"UInt256\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"UInt256\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for UInt256\")\n  },\n  v => v\n)\n\nexport const Int256 = typedef(\n  \"Int256\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Int256\")\n      return {\n        type: \"Int256\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Int256\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected integer for Int256\")\n  },\n  v => v\n)\n\nexport const Word8 = typedef(\n  \"Word8\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word8\")\n      return {\n        type: \"Word8\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word8\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word8\")\n  },\n  v => v\n)\n\nexport const Word16 = typedef(\n  \"Word16\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word16\")\n      return {\n        type: \"Word16\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word16\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word16\")\n  },\n  v => v\n)\n\nexport const Word32 = typedef(\n  \"Word32\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word32\")\n      return {\n        type: \"Word32\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word32\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word32\")\n  },\n  v => v\n)\n\nexport const Word64 = typedef(\n  \"Word64\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word64\")\n      return {\n        type: \"Word64\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word64\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word64\")\n  },\n  v => v\n)\n\nexport const Word128 = typedef(\n  \"Word128\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word128\")\n      return {\n        type: \"Word128\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word128\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word128\")\n  },\n  v => v\n)\n\nexport const Word256 = typedef(\n  \"Word256\",\n  (v: number | string) => {\n    if (isNumber(v) && isInteger(v)) {\n      numberValuesDeprecationNotice(\"Word256\")\n      return {\n        type: \"Word256\",\n        value: v.toString(),\n      }\n    }\n    if (isString(v)) {\n      return {\n        type: \"Word256\",\n        value: v,\n      }\n    }\n    return throwTypeError(\"Expected positive number for Word256\")\n  },\n  v => v\n)\n\nconst UFix64AndFix64NumberDeprecationNotice = () => {\n  log.deprecate({\n    subject: \"Passing in Numbers as values for Fix64 and UFix64 types\",\n    pkg: \"@onflow/types\",\n    transition:\n      \"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0001-[U]Fix64-as-Number\",\n  })\n}\n\nexport const UFix64 = typedef(\n  \"UFix64\",\n  (v: number | string) => {\n    if (isString(v)) {\n      const vParts = v.split(\".\")\n      if (vParts.length !== 2) {\n        return throwTypeError(\n          `Expected one decimal but found ${vParts.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`\n        )\n      }\n      if (vParts[1].length == 0 || vParts[1].length > 8) {\n        return throwTypeError(\n          `Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${vParts[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`\n        )\n      }\n\n      // make sure the number is extended to 8 decimal places so it matches cadence encoding of UFix values\n      vParts[1] = vParts[1].padEnd(8, \"0\")\n      v = vParts.join(\".\")\n\n      return {\n        type: \"UFix64\",\n        value: v,\n      }\n    } else if (isNumber(v)) {\n      UFix64AndFix64NumberDeprecationNotice()\n      return {\n        type: \"UFix64\",\n        value: v.toString(),\n      }\n    }\n    return throwTypeError(\"Expected String for UFix64\")\n  },\n  v => v\n)\n\nexport const Fix64 = typedef(\n  \"Fix64\",\n  (v: number | string) => {\n    if (isString(v)) {\n      const vParts = v.split(\".\")\n      if (vParts.length !== 2) {\n        return throwTypeError(\n          `Expected one decimal but found ${vParts.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`\n        )\n      }\n      if (vParts[1].length == 0 || vParts[1].length > 8) {\n        return throwTypeError(\n          `Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${vParts[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`\n        )\n      }\n\n      // make sure the number is extended to 8 decimal places so it matches cadence encoding of Fix64 values\n      vParts[1] = vParts[1].padEnd(8, \"0\")\n      v = vParts.join(\".\")\n\n      return {\n        type: \"Fix64\",\n        value: v,\n      }\n    } else if (isNumber(v)) {\n      UFix64AndFix64NumberDeprecationNotice()\n      return {\n        type: \"Fix64\",\n        value: v.toString(),\n      }\n    }\n    return throwTypeError(\"Expected String for Fix64\")\n  },\n  v => v\n)\n\nexport const UFix128 = typedef(\n  \"UFix128\",\n  (v: number | string) => {\n    if (isString(v)) {\n      const vParts = v.split(\".\")\n      if (vParts.length !== 2) {\n        return throwTypeError(\n          `Expected one decimal but found ${vParts.length} in the [U]Fix128 value. Find out more about [U]Fix128 types here: https://cadencelanguage.com/docs/language/values-and-types/fixed-point-nums-ints`\n        )\n      }\n      if (vParts[1].length == 0 || vParts[1].length > 24) {\n        return throwTypeError(\n          `Expected at least one digit, and at most 24 digits following the decimal of the [U]Fix128 value but found ${vParts[1].length} digits. Find out more about [U]Fix128 types here: https://cadencelanguage.com/docs/language/values-and-types/fixed-point-nums-ints`\n        )\n      }\n\n      // make sure the number is extended to 24 decimal places so it matches cadence encoding of UFix128 values\n      vParts[1] = vParts[1].padEnd(24, \"0\")\n      v = vParts.join(\".\")\n\n      return {\n        type: \"UFix128\",\n        value: v,\n      }\n    } else if (isNumber(v)) {\n      UFix64AndFix64NumberDeprecationNotice()\n      return {\n        type: \"UFix128\",\n        value: v.toString(),\n      }\n    }\n    return throwTypeError(\"Expected String for UFix128\")\n  },\n  v => v\n)\n\nexport const Fix128 = typedef(\n  \"Fix128\",\n  (v: number | string) => {\n    if (isString(v)) {\n      const vParts = v.split(\".\")\n      if (vParts.length !== 2) {\n        return throwTypeError(\n          `Expected one decimal but found ${vParts.length} in the [U]Fix128 value. Find out more about [U]Fix128 types here: https://cadencelanguage.com/docs/language/values-and-types/fixed-point-nums-ints`\n        )\n      }\n      if (vParts[1].length == 0 || vParts[1].length > 24) {\n        return throwTypeError(\n          `Expected at least one digit, and at most 24 digits following the decimal of the [U]Fix128 value but found ${vParts[1].length} digits. Find out more about [U]Fix128 types here: https://cadencelanguage.com/docs/language/values-and-types/fixed-point-nums-ints`\n        )\n      }\n\n      // make sure the number is extended to 24 decimal places so it matches cadence encoding of Fix128 values\n      vParts[1] = vParts[1].padEnd(24, \"0\")\n      v = vParts.join(\".\")\n\n      return {\n        type: \"Fix128\",\n        value: v,\n      }\n    } else if (isNumber(v)) {\n      UFix64AndFix64NumberDeprecationNotice()\n      return {\n        type: \"Fix128\",\n        value: v.toString(),\n      }\n    }\n    return throwTypeError(\"Expected String for Fix128\")\n  },\n  v => v\n)\n\nexport const String = typedef(\n  \"String\",\n  (v: string) => {\n    if (isString(v))\n      return {\n        type: \"String\",\n        value: v,\n      }\n    return throwTypeError(\"Expected String for type String\")\n  },\n  v => v\n)\n\nexport const Character = typedef(\n  \"Character\",\n  (v: string) => {\n    if (isString(v))\n      return {\n        type: \"Character\",\n        value: v,\n      }\n    return throwTypeError(\"Expected Character for type Character\")\n  },\n  v => v\n)\n\nexport const Bool = typedef(\n  \"Bool\",\n  (v: boolean) => {\n    if (isBoolean(v))\n      return {\n        type: \"Bool\",\n        value: v,\n      }\n    return throwTypeError(\"Expected Boolean for type Bool\")\n  },\n  v => v\n)\n\nexport const Address = typedef(\n  \"Address\",\n  (v: string) => {\n    if (isString(v))\n      return {\n        type: \"Address\",\n        value: v,\n      }\n    return throwTypeError(\"Expected Address for type Address\")\n  },\n  v => v\n)\n\nexport const Void = typedef(\n  \"Void\",\n  (v?: null) => {\n    if (!v || isNull(v))\n      return {\n        type: \"Void\",\n        value: null,\n      }\n    return throwTypeError(\"Expected Void for type Void\")\n  },\n  v => v\n)\n\nexport const Optional = <T extends TypeDescriptor<any, any>>(children: T) =>\n  typedef(\n    \"Optional\",\n    (v?: TypeDescriptorInput<T> | null) => ({\n      type: \"Optional\",\n      value: isNull(v) ? null : children.asArgument(v),\n    }),\n    v => v\n  )\n\n/**\n * @deprecated Reference values cannot be imported into the Cadence interpreter, will be removed in future versions\n */\nexport const Reference = typedef(\n  \"Reference\",\n  (v: ReferenceValue) => {\n    if (isObj(v))\n      return {\n        type: \"Reference\",\n        value: v,\n      }\n    return throwTypeError(\"Expected Object for type Reference\")\n  },\n  v => v\n)\n\nexport const _Array = <T extends TypeDescriptor<any, any>>(\n  children: T[] | T = []\n) =>\n  typedef(\n    \"Array\",\n    (v: TypeDescriptorInput<T>[]) => {\n      return {\n        type: \"Array\",\n        value: isArray(children)\n          ? children.map((c, i) => c.asArgument(v[i]))\n          : v.map(x => children.asArgument(x)),\n      }\n    },\n    v => v\n  )\n\nexport {_Array as Array}\n\nexport const Dictionary = <\n  K extends TypeDescriptor<any, any>,\n  V extends TypeDescriptor<any, any>,\n>(\n  children:\n    | {\n        key: K\n        value: V\n      }[]\n    | {\n        key: K\n        value: V\n      } = []\n) =>\n  typedef(\n    \"Dictionary\",\n    (\n      v:\n        | {key: TypeDescriptorInput<K>; value: TypeDescriptorInput<V>}[]\n        | {key: TypeDescriptorInput<K>; value: TypeDescriptorInput<V>}\n    ) => {\n      const vIsArray = isArray(v)\n      const childrenIsArray = isArray(children)\n\n      if (isObj(v))\n        return {\n          type: \"Dictionary\",\n          value:\n            childrenIsArray && vIsArray\n              ? children.map((c, i) => ({\n                  key: c.key.asArgument(v[i].key),\n                  value: c.value.asArgument(v[i].value),\n                }))\n              : vIsArray && !childrenIsArray\n                ? v.map(x => ({\n                    key: children.key.asArgument(x.key),\n                    value: children.value.asArgument(x.value),\n                  }))\n                : !vIsArray && !childrenIsArray\n                  ? [\n                      {\n                        key: children.key.asArgument(v.key),\n                        value: children.value.asArgument(v.value),\n                      },\n                    ]\n                  : throwTypeError(\"Invalid arguments for Dictionary.\"),\n        }\n      return throwTypeError(\"Expected Object for type Dictionary\")\n    },\n    v => v\n  )\n\nexport const Event = <V extends TypeDescriptor<any, any>>(\n  id: string,\n  fields: {value: V}[] | {value: V} = []\n) =>\n  typedef(\n    \"Event\",\n    (v: {fields: {name: string; value: TypeDescriptorInput<V>}[]}) => {\n      if (isObj(v))\n        return {\n          type: \"Event\",\n          value: {\n            id: id,\n            fields: isArray(fields)\n              ? fields.map((c, i) => ({\n                  name: v.fields[i].name,\n                  value: c.value.asArgument(v.fields[i].value),\n                }))\n              : v.fields.map(x => ({\n                  name: x.name,\n                  value: fields.value.asArgument(x.value),\n                })),\n          },\n        }\n      return throwTypeError(\"Expected Object for type Event\")\n    },\n    v => v\n  )\n\nexport const Resource = <V extends TypeDescriptor<any, any>>(\n  id: string,\n  fields: {value: V}[] | {value: V} = []\n) =>\n  typedef(\n    \"Resource\",\n    (v: {fields: {name: string; value: TypeDescriptorInput<V>}[]}) => {\n      if (isObj(v))\n        return {\n          type: \"Resource\",\n          value: {\n            id: id,\n            fields: isArray(fields)\n              ? fields.map((c, i) => ({\n                  name: v.fields[i].name,\n                  value: c.value.asArgument(v.fields[i].value),\n                }))\n              : v.fields.map(x => ({\n                  name: x.name,\n                  value: fields.value.asArgument(x.value),\n                })),\n          },\n        }\n      return throwTypeError(\"Expected Object for type Resource\")\n    },\n    v => v\n  )\n\nexport const Struct = <V extends TypeDescriptor<any, any>>(\n  id: string,\n  fields: {value: V}[] | {value: V} = []\n) =>\n  typedef(\n    \"Struct\",\n    (v: {fields: {name: string; value: TypeDescriptorInput<V>}[]}) => {\n      if (isObj(v))\n        return {\n          type: \"Struct\",\n          value: {\n            id: id,\n            fields: isArray(fields)\n              ? fields.map((c, i) => ({\n                  name: v.fields[i].name,\n                  value: c.value.asArgument(v.fields[i].value),\n                }))\n              : v.fields.map(x => ({\n                  name: x.name,\n                  value: fields.value.asArgument(x.value),\n                })),\n          },\n        }\n      return throwTypeError(\"Expected Object for type Struct\")\n    },\n    v => v\n  )\n\nexport const Enum = <V extends TypeDescriptor<any, any>>(\n  id: string,\n  fields: {value: V}[] | {value: V} = []\n) =>\n  typedef(\n    \"Enum\",\n    (v: {fields: {name: string; value: TypeDescriptorInput<V>}[]}) => {\n      if (isObj(v))\n        return {\n          type: \"Enum\",\n          value: {\n            id: id,\n            fields: isArray(fields)\n              ? fields.map((c, i) => ({\n                  name: v.fields[i].name,\n                  value: c.value.asArgument(v.fields[i].value),\n                }))\n              : v.fields.map(x => ({\n                  name: x.name,\n                  value: fields.value.asArgument(x.value),\n                })),\n          },\n        }\n      return throwTypeError(\"Expected Object for type Enum\")\n    },\n    v => v\n  )\n\nexport const Path = typedef(\n  \"Path\",\n  (v: PathValue) => {\n    if (isObj(v)) {\n      if (!isString(v.domain)) {\n        return throwTypeError(\n          `Expected a string for the Path domain but found ${v.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`\n        )\n      }\n\n      if (\n        !(\n          v.domain === \"storage\" ||\n          v.domain === \"private\" ||\n          v.domain === \"public\"\n        )\n      ) {\n        return throwTypeError(\n          `Expected either \"storage\", \"private\" or \"public\" as the Path domain but found ${v.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`\n        )\n      }\n\n      if (!isString(v.identifier)) {\n        return throwTypeError(\n          `Expected a string for the Path identifier but found ${v.identifier}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`\n        )\n      }\n\n      return {\n        type: \"Path\",\n        value: {\n          domain: v.domain,\n          identifier: v.identifier,\n        },\n      }\n    }\n    return throwTypeError(\"Expected Object for type Path\")\n  },\n  v => v\n)\n\n/**\n * InclusiveRange type\n *\n * @param t - A TypeDescriptor for the type of the range, must be a number (UInt32, Int32, etc.)\n * @returns A TypeDescriptor for an InclusiveRange of the given type\n *\n * @example\n * ```javascript\n * import * as fcl from \"@onflow/fcl\"\n * import {InclusiveRange, UInt32} from \"@onflow/types\"\n *\n * const someArg = fcl.arg({start: 1, end: 5, step: 1}, InclusiveRange(UInt32))\n * ```\n */\nexport const InclusiveRange = <T extends TypeDescriptor<any, any>>(t: T) =>\n  typedef(\n    \"InclusiveRange\",\n    (v: {\n      start: TypeDescriptorInput<T>\n      end: TypeDescriptorInput<T>\n      step: TypeDescriptorInput<T>\n    }) => {\n      if (isObj(v)) {\n        const {start, end, step} = v\n\n        return {\n          type: \"InclusiveRange\",\n          value: {\n            start: t.asArgument(start),\n            end: t.asArgument(end),\n            step: t.asArgument(step),\n          },\n        }\n      }\n      return throwTypeError(\"Expected Object for type InclusiveRange\")\n    },\n    v => v\n  )\n"
  },
  {
    "path": "packages/types/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-actor/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-actor/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-actor/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": \"off\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-actor/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-actor/CHANGELOG.md",
    "content": "# @onflow/util-actor\n\n## 1.3.5\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.4\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.4-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.3\n\n### Patch Changes\n\n- [#1886](https://github.com/onflow/fcl-js/pull/1886) [`fe5e1b3d`](https://github.com/onflow/fcl-js/commit/fe5e1b3d330b7734740cceb9a873d1b680f28175) Thanks [@jribbink](https://github.com/jribbink)! - Fix broken util-actor when multiple versions are running at once\n\n## 1.3.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.3.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.3.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Enhance TS support for @onflow/util-actor\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- [#1631](https://github.com/onflow/fcl-js/pull/1631) [`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG [fcl-actor] -- Upgrade queue-microtask to latest\n\n## 1.2.0-alpha.3\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.2.0-alpha.2\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.2.0-alpha.1\n\n### Patch Changes\n\n- [#1631](https://github.com/onflow/fcl-js/pull/1631) [`35052784`](https://github.com/onflow/fcl-js/commit/3505278418e64045248c04fd21f0c09ddbb3132e) Thanks [@JeffreyDoyle](https://github.com/JeffreyDoyle)! - PKG [fcl-actor] -- Upgrade queue-microtask to latest\n\n## 1.2.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.1.2\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1243](https://github.com/onflow/fcl-js/pull/1243) [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d) Thanks [@jribbink](https://github.com/jribbink)! - Add error handling to actors. Second argument of callback is now an error object and fatal errors can be thrown with ctx.fatalError(e).\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1243](https://github.com/onflow/fcl-js/pull/1243) [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d) Thanks [@jribbink](https://github.com/jribbink)! - Add error handling to actors. Second argument of callback is now an error object and fatal errors can be thrown with ctx.fatalError(e).\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1143](https://github.com/onflow/fcl-js/pull/1143) [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60) Thanks [@gregsantos](https://github.com/gregsantos)! - Internal update to util-actor\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.2\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1143](https://github.com/onflow/fcl-js/pull/1143) [`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60) Thanks [@gregsantos](https://github.com/gregsantos)! - Internal update to util-actor\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n### 0.0.2 -- 2020-08-13\n\n- 2020-08-13 -- Added exported fn `subscriber(address, spawnFn, callback)`\n- 2020-08-13 -- Added exported fn `snapshoter(address, spawnFn)`\n- 2020-08-13 -- Added `ctx.sendSelf()`\n- 2020-08-13 -- Added `ctx.subscriberCount()`\n- 2020-08-13 -- Added `ctx.hasSubs()`\n\n### 0.0.1 -- 2020-07-17\n\n- 2020-07-17 -- Initial Implementation\n"
  },
  {
    "path": "packages/util-actor/README.md",
    "content": "### Actor\n\n> Asynchronous self-contained isolated state, can only be comunicated with via a first-in/first-out message queue called a mailbox.\n\nPlease see the tests for examples.\n\nAs this is an unstable internal tool used by the SDK and FCl, using it directly from your code is a massive risk.\n\nWe will have documentation once we consider this utility stable.\n"
  },
  {
    "path": "packages/util-actor/package.json",
    "content": "{\n  \"name\": \"@onflow/util-actor\",\n  \"version\": \"1.3.5\",\n  \"description\": \"A mechanism for forcing order/transitions of scoped async state\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"queue-microtask\": \"1.2.3\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/actor.js\",\n  \"module\": \"dist/actor.module.js\",\n  \"unpkg\": \"dist/actor.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint src --ext .ts\"\n  }\n}\n"
  },
  {
    "path": "packages/util-actor/src/index.test.ts",
    "content": "import {spawn, send, kill, ActorContext} from \"./\"\n\nconst COUNT = \"COUNT\"\nconst DUMP = \"DUMP\"\nconst INC = \"INC\"\nconst KEYS = \"KEYS\"\nconst UPDATED = \"UPDATED\"\nconst SUBSCRIBE = \"SUBSCRIBE\"\nconst UNSUBSCRIBE = \"UNSUBSCRIBE\"\n\nconst counterLogic = async (ctx: ActorContext) => {\n  ctx.put(COUNT, 0)\n\n  __loop: while (1) {\n    const letter = await ctx.receive()\n    const data = letter.data\n\n    switch (letter.tag) {\n      case SUBSCRIBE:\n        ctx.subscribe(letter.from)\n        ctx.send(letter.from!, UPDATED, ctx.get(COUNT, 0))\n        continue __loop\n\n      case UNSUBSCRIBE:\n        ctx.unsubscribe(letter.from)\n        continue __loop\n\n      case INC:\n        ctx.update(COUNT, c => c + (data.delta || 1))\n        ctx.broadcast(UPDATED, ctx.get(COUNT, 0))\n        continue __loop\n\n      case DUMP:\n        letter.reply(ctx.get(COUNT, 0))\n        continue __loop\n\n      case KEYS:\n        letter.reply(ctx.keys())\n        continue __loop\n\n      default:\n        console.error(\"Sad Message recieved by Counter\", letter)\n    }\n  }\n}\n\nconst counter = (name: string) => spawn(counterLogic, name)\nconst dump = (addr: string) =>\n  send(addr, DUMP, null, {expectReply: true, timeout: 100})\nconst inc = (addr: string, delta = 1) => send(addr, INC, {delta})\n\nconst subscribe = (addr: string, callback: (data: any) => void) => {\n  const EXIT = \"@EXIT\"\n  const self = spawn(async ctx => {\n    ctx.send(addr, SUBSCRIBE)\n    while (1) {\n      const letter = await ctx.receive()\n      if (letter.tag === EXIT) {\n        ctx.send(addr, UNSUBSCRIBE)\n        return\n      }\n      callback(letter.data)\n    }\n  })\n  return () => send(self, EXIT)\n}\n\n// Waits for the v8 MicroTask queue to drain.\n// for testing purposes this needs to be run before and after most\n// subscribing and unsubscribing tasks.\nconst idle = async () => new Promise(resolve => setTimeout(resolve, 0))\n\ndescribe(\"golden path\", () => {\n  describe(\"init, send, receive\", () => {\n    test(\"rpc initial value\", async () => {\n      const c = counter(\"\")\n      expect(await dump(c)).toBe(0)\n      kill(c)\n    })\n\n    test(\"send message and rpc value\", async () => {\n      const c = counter(\"value\")\n      inc(c, 5)\n      expect(await dump(c)).toBe(5)\n      kill(c)\n    })\n\n    test(\"named\", async () => {\n      const c = counter(\"NAMED\")\n      expect(c).toBe(\"NAMED\")\n      expect(await dump(\"NAMED\")).toBe(0)\n      inc(c)\n      expect(await dump(c)).toBe(1)\n      kill(c)\n    })\n\n    test(\"kvs keys\", async () => {\n      const c = counter(\"RPC-KVS-KEYS\")\n      expect(\n        await send(c, KEYS, null, {expectReply: true, timeout: 10})\n      ).toEqual([COUNT])\n    })\n  })\n\n  test(\"rough reactive subscribers\", async () => {\n    const c = counter(\"REACTIVE\")\n\n    // Do some work before we subscribe\n    inc(c)\n    inc(c)\n\n    // Subscribe. Subscribers should be called with broadcast value.\n    await idle()\n    const fn1 = jest.fn()\n    const fn2 = jest.fn()\n    const unsub1 = subscribe(c, fn1)\n    const unsub2 = subscribe(c, fn2)\n    await idle()\n\n    // Do some more work. Every time we do the work subscribers should be called with broadcast value.\n    inc(c)\n    inc(c)\n\n    // Unsubscribe one of the subscribers. It should no longer receive broadcast values.\n    await idle()\n    unsub1()\n    await idle()\n\n    // Do some more work. Only one of our subscribers should be receiving broadcast values.\n    inc(c)\n    inc(c)\n\n    // Unsubscribe our other subscriber. Now nothing should be receiving broadcast values.\n    await idle()\n    unsub2()\n    await idle()\n\n    inc(c)\n    inc(c)\n    await idle()\n\n    expect(fn1).toHaveBeenCalledTimes(3)\n    expect(fn1).toHaveBeenNthCalledWith(1, 2)\n    expect(fn1).toHaveBeenLastCalledWith(4)\n\n    expect(fn2).toHaveBeenCalledTimes(5)\n    expect(fn2).toHaveBeenNthCalledWith(1, 2)\n    expect(fn2).toHaveBeenLastCalledWith(6)\n\n    kill(c)\n  })\n\n  test(\"actors with same name only spawn once\", async () => {\n    const fn = jest.fn()\n\n    const c1 = spawn(fn, 0)\n    const c2 = spawn(fn, 0)\n\n    await idle()\n    expect(c1).toBe(c2)\n    expect(fn).toHaveBeenCalledTimes(1)\n  })\n})\n"
  },
  {
    "path": "packages/util-actor/src/index.ts",
    "content": "import {mailbox as createMailbox, type IMailbox} from \"./mailbox\"\n\nlet promise: any\nconst _queueMicrotask = (cb: any) =>\n  (promise || (promise = Promise.resolve())).then(cb).catch((err: any) =>\n    setTimeout(() => {\n      throw err\n    }, 0)\n  )\n\nexport const INIT = \"INIT\"\nexport const SUBSCRIBE = \"SUBSCRIBE\"\nexport const UNSUBSCRIBE = \"UNSUBSCRIBE\"\nexport const UPDATED = \"UPDATED\"\nexport const SNAPSHOT = \"SNAPSHOT\"\nexport const EXIT = \"EXIT\"\nexport const TERMINATE = \"TERMINATE\"\nconst DUMP = \"DUMP\"\nconst INC = \"INC\"\nconst KEYS = \"KEYS\"\n\ninterface IRegistryRecord {\n  addr: string\n  mailbox: IMailbox<Letter>\n  subs: Set<string>\n  kvs: Record<string, any>\n  error: any\n}\ninterface IRoot {\n  FCL_REGISTRY: Record<string, IRegistryRecord> | null\n}\n\nexport type ActorContext = ReturnType<typeof createCtx>\n\nexport type Letter = {\n  to: string\n  from?: string\n  tag: string\n  data: any\n  timeout: number\n  reply: (data: any) => void\n  reject: (error: any) => void\n}\nexport type HandlerFn = (\n  ctx: ActorContext,\n  letter: Letter,\n  data: any\n) => Promise<void> | void\nexport type SpawnFn = (address?: string) => void\nexport interface ActorHandlers {\n  [INIT]?: (ctx: ActorContext) => Promise<void> | void\n  [SUBSCRIBE]?: HandlerFn\n  [UNSUBSCRIBE]?: HandlerFn\n  [UPDATED]?: HandlerFn\n  [SNAPSHOT]?: HandlerFn\n  [EXIT]?: HandlerFn\n  [TERMINATE]?: HandlerFn\n  [DUMP]?: HandlerFn\n  [INC]?: HandlerFn\n  [KEYS]?: HandlerFn\n  [key: string]: HandlerFn | undefined\n}\n\nconst root: IRoot = (typeof self === \"object\" &&\n  self.self === self &&\n  (self as unknown as IRoot)) ||\n  (typeof global === \"object\" &&\n    global.global === global &&\n    (global as unknown as IRoot)) ||\n  (typeof window === \"object\" &&\n    window.window === window &&\n    (window as unknown as IRoot)) || {FCL_REGISTRY: null}\n\nroot.FCL_REGISTRY = root.FCL_REGISTRY == null ? {} : root.FCL_REGISTRY\n\nconst FCL_REGISTRY = root.FCL_REGISTRY\nlet pid = 0b0\n\nconst DEFAULT_TIMEOUT = 5000\n\nexport function send<T>(\n  addr: string,\n  tag: string,\n  data?: Record<string, any> | null,\n  opts?: {expectReply?: true; timeout?: number; from?: string}\n): Promise<T>\nexport function send(\n  addr: string,\n  tag: string,\n  data?: Record<string, any> | null,\n  opts?: {expectReply?: false; timeout?: number; from?: string}\n): Promise<boolean>\nexport function send<T>(\n  addr: string,\n  tag: string,\n  data?: Record<string, any> | null,\n  opts: {expectReply?: boolean; timeout?: number; from?: string} = {\n    expectReply: false,\n  }\n): Promise<T | boolean> {\n  return new Promise<T | boolean>((resolve, reject) => {\n    const expectReply = opts.expectReply || false\n    const timeout = opts.timeout != null ? opts.timeout : DEFAULT_TIMEOUT\n\n    if (expectReply && timeout) {\n      setTimeout(\n        () =>\n          reject(new Error(`Timeout: ${timeout}ms passed without a response.`)),\n        timeout\n      )\n    }\n\n    const payload = {\n      to: addr,\n      from: opts.from,\n      tag,\n      data,\n      timeout,\n      reply: resolve,\n      reject,\n    }\n\n    try {\n      if (FCL_REGISTRY[addr]) {\n        FCL_REGISTRY[addr].mailbox.deliver(payload)\n      }\n      if (!expectReply) {\n        resolve(true)\n      }\n    } catch (error) {\n      console.error(\n        \"FCL.Actor -- Could Not Deliver Message\",\n        payload,\n        FCL_REGISTRY[addr],\n        error\n      )\n      reject(error)\n    }\n  })\n}\n\nexport const kill = (addr: string) => {\n  delete FCL_REGISTRY[addr]\n}\n\nconst fromHandlers =\n  <Handlers extends ActorHandlers>(handlers: Handlers) =>\n  async (ctx: ActorContext) => {\n    if (typeof handlers[INIT] === \"function\") await handlers[INIT](ctx)\n    __loop: while (1) {\n      const letter = await ctx.receive()\n      try {\n        if (letter.tag === EXIT) {\n          if (typeof handlers[TERMINATE] === \"function\") {\n            await handlers[TERMINATE](ctx, letter, letter.data || {})\n          }\n          break __loop\n        }\n        await handlers[letter.tag as any]?.(ctx, letter, letter.data || {})\n      } catch (error) {\n        console.error(`${ctx.self()} Error`, letter, error)\n      } finally {\n        continue __loop\n      }\n    }\n  }\n\nconst parseAddr = (addr: string | number | null): string => {\n  if (addr == null) {\n    while (FCL_REGISTRY[String(pid)]) {\n      pid++\n    }\n    return String(pid)\n  }\n  return String(addr)\n}\n\nexport const spawn = <Handlers extends ActorHandlers>(\n  fnOrHandlers: ((ctx: ActorContext) => Promise<void>) | Handlers,\n  rawAddr: string | number | null = null\n) => {\n  const addr = parseAddr(rawAddr)\n  if (FCL_REGISTRY[addr] != null) return addr\n\n  FCL_REGISTRY[addr] = {\n    addr,\n    mailbox: createMailbox(),\n    subs: new Set(),\n    kvs: {},\n    error: null,\n  }\n\n  const ctx = createCtx(addr)\n\n  let fn: (ctx: ActorContext) => Promise<void>\n  if (typeof fnOrHandlers === \"object\")\n    fn = fromHandlers<Handlers>(fnOrHandlers)\n  else fn = fnOrHandlers\n\n  _queueMicrotask(async () => {\n    await fn(ctx)\n    kill(addr)\n  })\n\n  return addr\n}\n\nconst createCtx = (addr: string) => ({\n  self: () => addr,\n  receive: () => FCL_REGISTRY[addr].mailbox.receive(),\n  send: (\n    to: string | null | undefined,\n    tag: string,\n    data?: any,\n    opts: Record<string, any> = {}\n  ) => {\n    if (to == null) return\n    opts.from = addr\n    return send(to, tag, data, opts)\n  },\n  sendSelf: (tag: string, data?: any, opts: Record<string, any> = {}) => {\n    if (FCL_REGISTRY[addr]) send(addr, tag, data, opts)\n  },\n  broadcast: (tag: string, data: any, opts: Record<string, any> = {}) => {\n    opts.from = addr\n    for (const to of FCL_REGISTRY[addr].subs) send(to, tag, data, opts)\n  },\n  subscribe: (sub?: string | null) =>\n    sub != null && FCL_REGISTRY[addr].subs.add(sub),\n  unsubscribe: (sub?: string | null) =>\n    sub != null && FCL_REGISTRY[addr].subs.delete(sub),\n  subscriberCount: () => FCL_REGISTRY[addr].subs.size,\n  hasSubs: () => !!FCL_REGISTRY[addr].subs.size,\n  put: <T>(key: string, value: T) => {\n    if (key != null) FCL_REGISTRY[addr].kvs[key] = value\n  },\n  get: <T>(key: string, fallback: T | undefined = undefined) => {\n    const value = FCL_REGISTRY[addr].kvs[key]\n    return value == null ? fallback : value\n  },\n  delete: (key: string) => {\n    delete FCL_REGISTRY[addr].kvs[key]\n  },\n  update: <T, U>(key: string, fn: (x: T) => U) => {\n    if (key != null)\n      FCL_REGISTRY[addr].kvs[key] = fn(FCL_REGISTRY[addr].kvs[key])\n  },\n  keys: () => {\n    return Object.keys(FCL_REGISTRY[addr].kvs)\n  },\n  all: () => {\n    return FCL_REGISTRY[addr].kvs\n  },\n  where: (pattern: RegExp) => {\n    return Object.keys(FCL_REGISTRY[addr].kvs).reduce((acc, key) => {\n      return pattern.test(key)\n        ? {...acc, [key]: FCL_REGISTRY[addr].kvs[key]}\n        : acc\n    }, {})\n  },\n  merge: (data: Record<string, any> = {}) => {\n    Object.keys(data).forEach(key => (FCL_REGISTRY[addr].kvs[key] = data[key]))\n  },\n  fatalError: (error: Error) => {\n    FCL_REGISTRY[addr].error = error\n    for (const to of FCL_REGISTRY[addr].subs) send(to, UPDATED)\n  },\n})\n\n// Returns an unsubscribe function\n// A SUBSCRIBE handler will need to be created to handle the subscription event\n//\n//  [SUBSCRIBE]: (ctx, letter) => {\n//    ctx.subscribe(letter.from)\n//    ctx.send(letter.from, UPDATED, ctx.all())\n//  }\n//\nexport function subscriber<T>(\n  address: string,\n  spawnFn: SpawnFn,\n  callback: (data: T | null, error: Error | null) => void\n) {\n  spawnFn(address)\n  const self = spawn(async (ctx: ActorContext) => {\n    ctx.send(address, SUBSCRIBE)\n    while (1) {\n      const letter = await ctx.receive()\n      const error = FCL_REGISTRY[address].error\n      if (letter.tag === EXIT) {\n        ctx.send(address, UNSUBSCRIBE)\n        return\n      }\n      if (error) {\n        callback(null, error)\n        ctx.send(address, UNSUBSCRIBE)\n        return\n      }\n\n      callback(letter.data, null)\n    }\n  })\n  return () => send(self, EXIT)\n}\n\n// Returns a promise that returns a result\n// A SNAPSHOT handler will need to be created to handle the snapshot event\n//\n//  [SNAPSHOT]: (ctx, letter) => {\n//    letter.reply(ctx.all())\n//  }\n//\nexport function snapshoter<T>(address: string, spawnFn: SpawnFn) {\n  spawnFn(address)\n  return send<T>(address, SNAPSHOT, null, {\n    expectReply: true,\n    timeout: 0,\n  })\n}\n"
  },
  {
    "path": "packages/util-actor/src/mailbox/README.md",
    "content": "### Mailbox\n\n> An async first-in/first-out queue, used to enforce order of the actors.\n\n```javascript\nimport {mailbox} from \"...\"\n\nconst m = mailbox()\n\nm.deliver(\"foo\")\nm.deliver(\"bar\")\nm.deliver(\"baz\")\n\nawait m.receive() // \"foo\"\nawait m.receive() // \"bar\"\nawait m.receive() // \"baz\"\n```\n"
  },
  {
    "path": "packages/util-actor/src/mailbox/index.test.ts",
    "content": "import {mailbox as genMailbox} from \"./\"\n\ntest(\"send and receive\", async () => {\n  const m = genMailbox()\n  m.deliver(\"TEST\")\n  expect(await m.receive()).toBe(\"TEST\")\n})\n\ntest(\"first in -- first out\", async () => {\n  const m = genMailbox()\n  const msgx = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\"]\n  for (const msg of msgx) m.deliver(msg)\n  for (const msg of msgx) expect(await m.receive()).toBe(msg)\n})\n\ntest(\"many mailboxes\", async () => {\n  const m1 = genMailbox()\n  const m2 = genMailbox()\n  const m3 = genMailbox()\n  const m4 = genMailbox()\n\n  const m1x = [\"A\", \"B\", \"C\"]\n  const m2x = [\"1\", \"2\", \"3\"]\n  const m3x = [\"X\", \"Y\", \"Z\"]\n  const m4x = [\"7\", \"8\", \"9\"]\n\n  for (const msg of m1x) m1.deliver(msg)\n  for (const msg of m2x) m2.deliver(msg)\n  for (const msg of m3x) m3.deliver(msg)\n  for (const msg of m4x) m4.deliver(msg)\n\n  for (const msg of m1x) expect(await m1.receive()).toBe(msg)\n  for (const msg of m2x) expect(await m2.receive()).toBe(msg)\n  for (const msg of m3x) expect(await m3.receive()).toBe(msg)\n  for (const msg of m4x) expect(await m4.receive()).toBe(msg)\n})\n"
  },
  {
    "path": "packages/util-actor/src/mailbox/index.ts",
    "content": "export interface IMailbox<T> {\n  deliver(msg: T): Promise<void>\n  receive(): Promise<T>\n}\nexport const mailbox = <T>(): IMailbox<T> => {\n  const queue: T[] = []\n  let next: ((msg: T) => void) | undefined\n\n  return {\n    async deliver(msg: T) {\n      queue.push(msg)\n      if (next) {\n        next(queue.shift() as T)\n        next = undefined\n      }\n    },\n\n    receive(): Promise<T> {\n      return new Promise<T>(function innerReceive(resolve) {\n        const msg = queue.shift()\n        if (msg) return resolve(msg)\n        next = resolve\n      })\n    },\n  }\n}\n"
  },
  {
    "path": "packages/util-actor/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-address/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-address/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-address/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/util-address/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-address/CHANGELOG.md",
    "content": "# @onflow/util-address\n\n## 1.2.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.2-alpha.3\n\n### Patch Changes\n\n- [#1859](https://github.com/onflow/fcl-js/pull/1859) [`7ed491c5`](https://github.com/onflow/fcl-js/commit/7ed491c5d2335fbbff04444d41f1f1580763d8d3) Thanks [@jribbink](https://github.com/jribbink)! - TypeScript Fixes\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1547](https://github.com/onflow/fcl-js/pull/1547) [`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for util-address package\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n- [#1494](https://github.com/onflow/fcl-js/pull/1494) [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc to util-address package.\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.5\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.4\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.3\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n## 1.1.0-alpha.1\n\n### Minor Changes\n\n- [#1547](https://github.com/onflow/fcl-js/pull/1547) [`2d143bc7`](https://github.com/onflow/fcl-js/commit/2d143bc7b30f59e9f9289eee020cfaae74b4f4e1) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for util-address package\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1494](https://github.com/onflow/fcl-js/pull/1494) [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc to util-address package.\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d) Thanks [@justinbarry](https://github.com/justinbarry)! - Update @onflow/types dependency to match most current version\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- 7469c5c3: Update @onflow/types dependency to match most current version\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n### 0.0.0 -- 2020-09-29\n\n- 2020-09-29 -- Initial port from FCL.\n"
  },
  {
    "path": "packages/util-address/README.md",
    "content": "```javascript\n\nimport {withPrefix, sansPrefix, display} from \"@onflow/util-address\"\n\nconst address = \"0xc88ff43f1a87c679\"\nassert(sansPrefix(address), \"c88ff43f1a87c679\")\n\nassert(withPrefix(address), address)\nassert(withPrefix(sansPrefix(address)), address)\n\nconst Comp = ({ address }) => {\n  return <div>\n    <strong>Flow Address</strong>\n    <span>{display(address)}</span>\n  </div>\n}\n\n```\n"
  },
  {
    "path": "packages/util-address/package.json",
    "content": "{\n  \"name\": \"@onflow/util-address\",\n  \"version\": \"1.2.4\",\n  \"description\": \"Flow JS SDK Util -- Address\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/node\": \"^18.19.57\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/util-address.js\",\n  \"module\": \"dist/util-address.module.js\",\n  \"unpkg\": \"dist/util-address.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  }\n}\n"
  },
  {
    "path": "packages/util-address/src/index.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/util-address/src/index.ts",
    "content": "/**\n * @description Removes 0x from address if present\n * @param address - Flow address\n * @returns Flow address without 0x prefix\n */\nexport function sansPrefix(address: null): null\nexport function sansPrefix(address: string): string\nexport function sansPrefix(address: string | null): string | null\n/**\n * @description Removes 0x from address if present\n * @param address - Flow address\n * @returns Flow address without 0x prefix\n */\nexport function sansPrefix(address: string | null): string | null {\n  if (address == null) return null\n  return address.replace(/^0x/, \"\").replace(/^Fx/, \"\")\n}\n\n/**\n * @description Adds 0x to address if not already present\n * @param address - Flow address\n * @returns Flow address with 0x prefix\n */\nexport function withPrefix(address: null): null\nexport function withPrefix(address: string): string\nexport function withPrefix(address: string | null): string | null\n/**\n * @description Adds 0x to address if not already present\n * @param address - Flow address\n * @returns Flow address with 0x prefix\n */\nexport function withPrefix(address: string | null): string | null {\n  if (address == null) return null\n  return \"0x\" + sansPrefix(address)\n}\n\n/**\n * @description Adds 0x to address if not already present\n * @param address - Flow address\n * @returns Flow address with 0x prefix\n */\nexport function display(address: string | null): string | null {\n  return withPrefix(address)\n}\n"
  },
  {
    "path": "packages/util-address/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-encode-key/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-encode-key/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-encode-key/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"],\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/util-encode-key/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-encode-key/CHANGELOG.md",
    "content": "# @onflow/util-encode-key\n\n## 1.2.5\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/rlp@1.2.4\n  - @onflow/util-invariant@1.2.5\n\n## 1.2.4\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4\n  - @onflow/rlp@1.2.3\n\n## 1.2.4-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-invariant@1.2.4-alpha.0\n  - @onflow/rlp@1.2.3-alpha.0\n\n## 1.2.3\n\n### Patch Changes\n\n- Updated dependencies [[`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f)]:\n  - @onflow/util-invariant@1.2.3\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2\n  - @onflow/rlp@1.2.2\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-invariant@1.2.2-alpha.2\n  - @onflow/rlp@1.2.2-alpha.2\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-invariant@1.2.2-alpha.1\n  - @onflow/rlp@1.2.2-alpha.1\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/rlp@1.2.1\n  - @onflow/util-invariant@1.2.1\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-invariant@1.2.0\n  - @onflow/rlp@1.2.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n- [#1558](https://github.com/onflow/fcl-js/pull/1558) [`a829f9c2`](https://github.com/onflow/fcl-js/commit/a829f9c2357cd2bcddff03a7257df51e8045eed0) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for util-encode-key package\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/rlp@1.1.0\n  - @onflow/util-invariant@1.1.0\n\n## 1.1.0-alpha.4\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/rlp@1.1.0-alpha.2\n  - @onflow/util-invariant@1.1.0-alpha.2\n\n## 1.1.0-alpha.3\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/util-invariant@1.1.0-alpha.1\n  - @onflow/rlp@1.1.0-alpha.1\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/rlp@1.1.0-alpha.0\n  - @onflow/util-invariant@1.1.0-alpha.0\n\n## 1.1.0-alpha.1\n\n### Minor Changes\n\n- [#1575](https://github.com/onflow/fcl-js/pull/1575) [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb) Thanks [@chasefleming](https://github.com/chasefleming)! - Exclude tests from type gen\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1558](https://github.com/onflow/fcl-js/pull/1558) [`a829f9c2`](https://github.com/onflow/fcl-js/commit/a829f9c2357cd2bcddff03a7257df51e8045eed0) Thanks [@chasefleming](https://github.com/chasefleming)! - Add types for util-encode-key package\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n- Updated dependencies [[`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0)]:\n  - @onflow/rlp@1.0.3\n  - @onflow/util-invariant@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/rlp@1.0.2\n  - @onflow/util-invariant@1.0.2\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/rlp@1.0.2-alpha.0\n  - @onflow/util-invariant@1.0.2-alpha.0\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/rlp@1.0.1\n  - @onflow/util-invariant@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d) Thanks [@justinbarry](https://github.com/justinbarry)! - Update @onflow/types dependency to match most current version\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n* Updated dependencies [[`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/util-invariant@1.0.0\n  - @onflow/rlp@1.0.0\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/rlp@1.0.0-alpha.1\n  - @onflow/util-invariant@1.0.0-alpha.1\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- 7469c5c3: Update @onflow/types dependency to match most current version\n- Updated dependencies [7469c5c3]\n- Updated dependencies\n\n  - @onflow/util-invariant@1.0.0-alpha.0\n  - @onflow/rlp@1.0.0-alpha.0\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n### 0.0.2 -- 2021-02-18\n\n- 2021-02-18 -- FIX issue with how things were being passed into rlp\n\n### 0.0.1 -- 2020-11-26\n\n- 2020-11-26 -- VSN `@onflow/rlp` 0.0.0 -> 0.0.3\n\n### 0.0.0 -- 2020-10-07\n\n- 2020-10-07 -- init\n"
  },
  {
    "path": "packages/util-encode-key/README.md",
    "content": "# Encode Key\n\nEncodes public keys so that the Flow Blockchain can use them.\n\nYou can learn more about keys, curves, hashes, weights and signing here: https://github.com/onflow/flow/blob/master/docs/content/concepts/accounts-and-keys.md#supported-signature--hash-algorithms\n\n```javascript\nimport { template as addNewKey } from \"@onflow/six-add-new-key\"\nimport * as fcl from \"@onflow/fcl\"\n\nimport {encodeKey, ECDSA_P256, SHA3_256} from \"@onflow/util-encode-key\"\n\n// The key you want to use to sign transactions later\nconst PUBLIC_KEY = \"0bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5\"\n\nconst ENCODED_KEY = encodeKey(\n  PLUBLIC_KEY, // The key to encode (DER Hex)\n  ECDSA_P256,  // The curve Flow needs to use with your key [ECDSA_P256|ECDSA_secp256k1]\n  SHA3_256,    // The hashing algorythm Flow needs to use with your key [SHA2_256|SHA3_256]\n  1000         // The weight you want this key to have [Range: 0..1000]\n)\n\nconst authz = fcl.currentUser().authorization\n\nconst resp = await fcl.send([\n  addNewKey({\n    publicKey: [ENCODED_KEY],\n    proposer: authz,\n    payer: authz,\n    authorization: authz\n  })\n])\n\n```\n\n"
  },
  {
    "path": "packages/util-encode-key/package.json",
    "content": "{\n  \"name\": \"@onflow/util-encode-key\",\n  \"version\": \"1.2.5\",\n  \"description\": \"Flow JS SDK Util -- Encode Key\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@types/node\": \"^18.19.57\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^4.9.5\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/util-encode-key.js\",\n  \"module\": \"dist/util-encode-key.module.js\",\n  \"unpkg\": \"dist/util-encode-key.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"npm run lint && fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\",\n    \"lint\": \"eslint .\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/rlp\": \"1.2.4\",\n    \"@onflow/util-invariant\": \"1.2.5\"\n  }\n}\n"
  },
  {
    "path": "packages/util-encode-key/src/__snapshots__/index.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`key:0 curve:0 hash:0 weight:0 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5020180\"`;\n\nexports[`key:0 curve:0 hash:0 weight:1 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5020120\"`;\n\nexports[`key:0 curve:0 hash:0 weight:2 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b50201820200\"`;\n\nexports[`key:0 curve:0 hash:0 weight:3 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b502018203e8\"`;\n\nexports[`key:0 curve:0 hash:1 weight:0 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5020380\"`;\n\nexports[`key:0 curve:0 hash:1 weight:1 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5020320\"`;\n\nexports[`key:0 curve:0 hash:1 weight:2 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b50203820200\"`;\n\nexports[`key:0 curve:0 hash:1 weight:3 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b502038203e8\"`;\n\nexports[`key:0 curve:1 hash:0 weight:0 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5030180\"`;\n\nexports[`key:0 curve:1 hash:0 weight:1 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5030120\"`;\n\nexports[`key:0 curve:1 hash:0 weight:2 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b50301820200\"`;\n\nexports[`key:0 curve:1 hash:0 weight:3 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b503018203e8\"`;\n\nexports[`key:0 curve:1 hash:1 weight:0 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5030380\"`;\n\nexports[`key:0 curve:1 hash:1 weight:1 1`] = `\"f845b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5030320\"`;\n\nexports[`key:0 curve:1 hash:1 weight:2 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b50303820200\"`;\n\nexports[`key:0 curve:1 hash:1 weight:3 1`] = `\"f847b8400bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b503038203e8\"`;\n\nexports[`key:1 curve:0 hash:0 weight:0 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47020180\"`;\n\nexports[`key:1 curve:0 hash:0 weight:1 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47020120\"`;\n\nexports[`key:1 curve:0 hash:0 weight:2 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f470201820200\"`;\n\nexports[`key:1 curve:0 hash:0 weight:3 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f4702018203e8\"`;\n\nexports[`key:1 curve:0 hash:1 weight:0 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47020380\"`;\n\nexports[`key:1 curve:0 hash:1 weight:1 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47020320\"`;\n\nexports[`key:1 curve:0 hash:1 weight:2 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f470203820200\"`;\n\nexports[`key:1 curve:0 hash:1 weight:3 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f4702038203e8\"`;\n\nexports[`key:1 curve:1 hash:0 weight:0 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47030180\"`;\n\nexports[`key:1 curve:1 hash:0 weight:1 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47030120\"`;\n\nexports[`key:1 curve:1 hash:0 weight:2 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f470301820200\"`;\n\nexports[`key:1 curve:1 hash:0 weight:3 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f4703018203e8\"`;\n\nexports[`key:1 curve:1 hash:1 weight:0 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47030380\"`;\n\nexports[`key:1 curve:1 hash:1 weight:1 1`] = `\"f845b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47030320\"`;\n\nexports[`key:1 curve:1 hash:1 weight:2 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f470303820200\"`;\n\nexports[`key:1 curve:1 hash:1 weight:3 1`] = `\"f847b84092b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f4703038203e8\"`;\n\nexports[`key:2 curve:0 hash:0 weight:0 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa020180\"`;\n\nexports[`key:2 curve:0 hash:0 weight:1 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa020120\"`;\n\nexports[`key:2 curve:0 hash:0 weight:2 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa0201820200\"`;\n\nexports[`key:2 curve:0 hash:0 weight:3 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa02018203e8\"`;\n\nexports[`key:2 curve:0 hash:1 weight:0 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa020380\"`;\n\nexports[`key:2 curve:0 hash:1 weight:1 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa020320\"`;\n\nexports[`key:2 curve:0 hash:1 weight:2 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa0203820200\"`;\n\nexports[`key:2 curve:0 hash:1 weight:3 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa02038203e8\"`;\n\nexports[`key:2 curve:1 hash:0 weight:0 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa030180\"`;\n\nexports[`key:2 curve:1 hash:0 weight:1 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa030120\"`;\n\nexports[`key:2 curve:1 hash:0 weight:2 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa0301820200\"`;\n\nexports[`key:2 curve:1 hash:0 weight:3 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa03018203e8\"`;\n\nexports[`key:2 curve:1 hash:1 weight:0 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa030380\"`;\n\nexports[`key:2 curve:1 hash:1 weight:1 1`] = `\"f845b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa030320\"`;\n\nexports[`key:2 curve:1 hash:1 weight:2 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa0303820200\"`;\n\nexports[`key:2 curve:1 hash:1 weight:3 1`] = `\"f847b840da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa03038203e8\"`;\n"
  },
  {
    "path": "packages/util-encode-key/src/index.test.ts",
    "content": "import {encodeKey, ECDSA_P256, ECDSA_secp256k1, SHA2_256, SHA3_256} from \"./\"\n\nconst PUBLIC_KEYS = [\n  \"0bfcd8790c3ce88f3fac9d4bd23514f48bf0cdd1f6c3c8bdf87b11489b1bbeca1ef805ec2ee76451e9bdb265284f78febaeacbc8b0827e0a7baafee4e655d0b5\",\n  \"92b3189b1a3b5d01fd807efbda46524d2ae4802b4c4a24ae571fd02da4bf9b8855ee51c7710f6a5b39f1097677dbb8c36a8268fa90011edc94d9d6028d8c9f47\",\n  \"da19babe1066af1a75139b43c4f7ee2872d12d1ebdb21fd5d471ae74eb26f1912513ef59057086208c1ed0583f8eac714c90f6412f08f1d86f0ddf69189a13aa\",\n]\n\nconst CURVES = [ECDSA_P256, ECDSA_secp256k1]\n\nconst HASHINGS = [SHA2_256, SHA3_256]\n\nconst WEIGHTS = [0, 32, 512, 1000]\n\nfor (const [key_index, key] of PUBLIC_KEYS.entries()) {\n  for (const [curve_index, curve] of CURVES.entries()) {\n    for (const [hash_index, hash] of HASHINGS.entries()) {\n      for (const [weight_index, weight] of WEIGHTS.entries()) {\n        test(`key:${key_index} curve:${curve_index} hash:${hash_index} weight:${weight_index}`, () => {\n          expect(encodeKey(key, curve, hash, weight)).toMatchSnapshot()\n        })\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/util-encode-key/src/index.ts",
    "content": "import {invariant} from \"@onflow/util-invariant\"\nimport {encode} from \"@onflow/rlp\"\n\n// Curves\n\nexport const ECDSA_P256 = 2\nexport const ECDSA_secp256k1 = 3\nconst VALID_CURVES = new Set([ECDSA_P256, ECDSA_secp256k1])\n\n// Hashing\n\nexport const SHA2_256 = 1\nexport const SHA3_256 = 3\nconst VALID_HASHINGS = new Set([SHA2_256, SHA3_256])\n\n/**\n * Encodes a key into a hex string\n * @param key - The key to encode (DER Hex)\n * @param curve - The curve Flow needs to use with your key [ECDSA_P256|ECDSA_secp256k1]\n * @param hash - The hashing algorythm Flow needs to use with your key [SHA2_256|SHA3_256]\n * @param weight - The weight you want this key to have [Range: 0..1000]\n * @returns The encoded key\n * @throws {Error} - Throws if the key is not a string\n * @throws {Error} - Throws if the key is not in the correct format\n * @throws {Error} - Throws if the curve is not a number\n * @throws {Error} - Throws if the curve is not a valid curve\n * @throws {Error} - Throws if the hash is not a number\n * @throws {Error} - Throws if the hash is not a valid hashing algorithm\n * @throws {Error} - Throws if the weight is not between 0 and 1000\n * @example\n * import {encodeKey, ECDSA_P256, SHA3_256} from \"@onflow/util-encode-key\"\n * encodeKey(\"aabbccdd\", ECDSA_P256, SHA3_256, 1000) // => \"aabbccdd0201000\"\n */\nexport function encodeKey(\n  key: string,\n  curve: number,\n  hash: number,\n  weight = 1000\n): string {\n  invariant(\n    typeof key === \"string\",\n    \"encodeKey(key, curve, hash, weight) -- invalid key (expecting type of string)\"\n  )\n  invariant(\n    /^[0-9a-z]+$/.test(key),\n    \"encodeKey(key, curve, hash, weight) -- invalid key (incorrect format)\"\n  )\n  invariant(\n    typeof curve === \"number\",\n    \"encodeKey(key, curve, hash, weight) -- invalid curve (expecting type of number)\"\n  )\n  invariant(\n    VALID_CURVES.has(curve),\n    \"encodeKey(key, curve, hash, weight) -- invalid curve (value not included in set of valid curves)\"\n  )\n  invariant(\n    typeof hash === \"number\",\n    \"encodeKey(key, curve, hash, weight) -- invalid hash (expecting typeof number)\"\n  )\n  invariant(\n    VALID_HASHINGS.has(hash),\n    \"encodeKey(key, curve, hash, weight) -- invalid hash (value not included in set of valid hashings)\"\n  )\n  invariant(\n    weight >= 0 && weight <= 1000,\n    \"encodeKey(key, curve, hash, weight) -- weight needs to be between (inclusive of) 0 and 1000\"\n  )\n\n  return encode([Buffer.from(key, \"hex\"), curve, hash, weight]).toString(\"hex\")\n}\n"
  },
  {
    "path": "packages/util-encode-key/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-invariant/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/util-invariant/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-invariant/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-invariant/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-invariant/CHANGELOG.md",
    "content": "# @onflow/util-invariant\n\n## 1.2.5\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.4\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.4-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1874](https://github.com/onflow/fcl-js/pull/1874) [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f) Thanks [@jribbink](https://github.com/jribbink)! - Add TypeScript assertion signature to invariant function\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.2\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.1\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`2768d1fa`](https://github.com/onflow/fcl-js/commit/2768d1fac5c74f7fc81cd0810fb7f30b68f8ab6d) Thanks [@justinbarry](https://github.com/justinbarry)! - Update @onflow/types dependency to match most current version\n\n* [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- 7469c5c3: Update @onflow/types dependency to match most current version\n\n- YYYY-MM-DD **BREAKING?** -- description\n\n### 0.0.0 -- 2020-09-29\n\n- 2020-09-29 -- Initial port from FCL.\n"
  },
  {
    "path": "packages/util-invariant/README.md",
    "content": "```javascript\nimport {invariant} from \"@onflow/util-invariant\"\n\nfunction add(a, b) {\n  invariant(typeof a === \"number\", \"add(a, b) -- `a` needs to be a number\", { a, b })\n  invariant(typeof b === \"number\", \"add(a, b) -- `b` needs to be a number\", { a, b })\n  return a + b\n}\n```\n"
  },
  {
    "path": "packages/util-invariant/package.json",
    "content": "{\n  \"name\": \"@onflow/util-invariant\",\n  \"version\": \"1.2.5\",\n  \"description\": \"Flow JS SDK Util -- Invariant\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@onflow/types\": \"1.5.0\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/util-invariant.js\",\n  \"module\": \"dist/util-invariant.module.js\",\n  \"unpkg\": \"dist/util-invariant.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  }\n}\n"
  },
  {
    "path": "packages/util-invariant/src/index.test.ts",
    "content": "test(\"placeholder\", () => {\n  expect(0).toBe(0)\n})\n"
  },
  {
    "path": "packages/util-invariant/src/index.ts",
    "content": "/**\n * Asserts fact is true, otherwise throw an error with invariant message\n * @param fact\n * @param msg\n * @param rest\n */\nexport function invariant(\n  fact: boolean,\n  msg: string,\n  ...rest: any[]\n): asserts fact {\n  if (!fact) {\n    const error = new Error(`INVARIANT ${msg}`)\n    error.stack = error.stack\n      ?.split(\"\\n\")\n      ?.filter(d => !/at invariant/.test(d))\n      ?.join(\"\\n\")\n    console.error(\"\\n\\n---\\n\\n\", error, \"\\n\\n\", ...rest, \"\\n\\n---\\n\\n\")\n    throw error\n  }\n}\n"
  },
  {
    "path": "packages/util-invariant/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-logger/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-logger/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-logger/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-logger/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-logger/CHANGELOG.md",
    "content": "# @onflow/util-logger\n\n## 1.3.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.3.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.3.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.3.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.3.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.3.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1771](https://github.com/onflow/fcl-js/pull/1771) [`5edbd823`](https://github.com/onflow/fcl-js/commit/5edbd823b1a6d25eb7bb52dc55338f95beae73b1) Thanks [@jribbink](https://github.com/jribbink)! - Fix @onflow/util-logger <-> @onflow/config circular dependency\n\n## 1.2.1\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6)]:\n  - @onflow/config@1.1.1\n\n## 1.2.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`6193bd42`](https://github.com/onflow/fcl-js/commit/6193bd420371494a975f19fd001af6af012bd72f), [`fefb578a`](https://github.com/onflow/fcl-js/commit/fefb578ae96a112164c561fa3e0a490008d8a5f6)]:\n  - @onflow/config@1.1.1-alpha.0\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9), [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e), [`de7ffa47`](https://github.com/onflow/fcl-js/commit/de7ffa4768ea19e9378e7db74c85750b6554027c), [`bbdeea32`](https://github.com/onflow/fcl-js/commit/bbdeea32f024d6eea4a74c94023e01688a38b6cb), [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106), [`544d8ebb`](https://github.com/onflow/fcl-js/commit/544d8ebb298ce1be8491d5609729110211b83242), [`48ff4330`](https://github.com/onflow/fcl-js/commit/48ff43303c30bab86274bd281f6af28affdb2f25), [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4), [`f68c1433`](https://github.com/onflow/fcl-js/commit/f68c14337b5470b4d79ec682f7bb41ddeae2e020), [`a4a1c7bf`](https://github.com/onflow/fcl-js/commit/a4a1c7bf0be9facb213f56a91d1a66b60bdea64b)]:\n  - @onflow/config@1.1.0\n\n## 1.2.0-alpha.3\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- Updated dependencies [[`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e)]:\n  - @onflow/config@1.1.0-alpha.8\n\n## 1.2.0-alpha.2\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n- Updated dependencies [[`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106)]:\n  - @onflow/config@1.1.0-alpha.7\n\n## 1.2.0-alpha.1\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- Updated dependencies [[`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4)]:\n  - @onflow/config@1.1.0-alpha.4\n\n## 1.1.3-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`e10e3c9c`](https://github.com/onflow/fcl-js/commit/e10e3c9c1f611e7dfd8a0bf7292473c71c2e04b9)]:\n  - @onflow/config@1.1.0-alpha.0\n\n## 1.1.2\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n- Updated dependencies [[`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0)]:\n  - @onflow/config@1.0.4\n\n## 1.1.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/config@1.0.3\n\n## 1.1.1-alpha.1\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n- Updated dependencies [[`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6)]:\n  - @onflow/config@1.0.3-alpha.0\n\n## 1.1.1-alpha.0\n\n### Patch Changes\n\n- Updated dependencies []:\n  - @onflow/sdk@1.1.1-alpha.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Add log.deprecate function for standardized deprecation warnings. Set default log level to warn.\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`90d5163a`](https://github.com/onflow/fcl-js/commit/90d5163a7723dd529324a271ea8accaa43a3d7be), [`45951f1a`](https://github.com/onflow/fcl-js/commit/45951f1af310d302ee708e43d1a939265f404d2c), [`cc422a78`](https://github.com/onflow/fcl-js/commit/cc422a781d0e87ba8945c336902bbc9542d5b4c4), [`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314), [`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5), [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb)]:\n  - @onflow/sdk@1.1.0\n\n## 1.1.0-alpha.2\n\n### Minor Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Add log.deprecate function for standardized deprecation warnings. Set default log level to warn.\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0)]:\n  - @onflow/sdk@1.1.0-alpha.3\n\n## 1.0.2-alpha.1\n\n### Patch Changes\n\n- Updated dependencies [[`e0d3a377`](https://github.com/onflow/fcl-js/commit/e0d3a377260338a37518f0ad2a52dcc618fd9bc5)]:\n  - @onflow/sdk@1.1.0-alpha.2\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- Updated dependencies [[`1654ebbe`](https://github.com/onflow/fcl-js/commit/1654ebbe45ea5e4ca13536ed2139520ce21ee314), [`d1765950`](https://github.com/onflow/fcl-js/commit/d176595021681e660ae0a06161340833280091fb)]:\n  - @onflow/sdk@1.0.2-alpha.0\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n- Updated dependencies [[`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4)]:\n  - @onflow/sdk@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`700433d5`](https://github.com/onflow/fcl-js/commit/700433d50d4156183b09b13781f7f74f23882586), [`6ff970df`](https://github.com/onflow/fcl-js/commit/6ff970dfc04281c86043e1cf8f5bceb633dc4186), [`7287ff14`](https://github.com/onflow/fcl-js/commit/7287ff14d20e19270ff345cd8b274ad5c8509eb7), [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8), [`f7a985b3`](https://github.com/onflow/fcl-js/commit/f7a985b3cb64ed80c7354f97177ae7ef006530fe), [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854)]:\n  - @onflow/sdk@1.0.0\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n- Updated dependencies [[`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8)]:\n  - @onflow/sdk@1.0.0-alpha.2\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n### Patch Changes\n\n- Updated dependencies\n\n  - @onflow/sdk@1.0.0-alpha.0\n\n- 2022-03-30 -- Create logger package\n"
  },
  {
    "path": "packages/util-logger/README.md",
    "content": "# @onflow/util-logger\n\nLogger for FCL-JS.\n\n# Status\n\n- **Last Updated:** March 30 2022\n- **Stable:** Yes\n- **Risk of Breaking Change:** No\n\n# Install\n\n```bash\nnpm install --save @onflow/util-logger\n```\n\n# Usage\n\n## Logger Levels\n\n| Name    | Value |\n| ------- | ----- |\n| `error` |   1   |\n| `warn`  |   2   |\n| `log`   |   3   |\n| `info`  |   4   |\n| `debug` |   5   |\n\n```javascript\nimport * as logger from \"@onflow/util-logger\"\n\n// This will fire if the config \"logger.level\" value is set to the error level or above\nlogger.log({\n  title: \"Title of error\", \n  message: \"Message body\", \n  level: logger.LEVELS.error\n})\n```\n\n## Deprecation\n\nThis package also exposes a useful method for logging deprecation warnings via `log.deprecate`.  The function accepts an object with the following keys as its parameters.\n\n - `pkg` (optional) - The package which the deprecated feature belongs to (i.e. `FCL/SDK`, `@onflow/util-invariant`, etc.).  If not provided it defaults to an empty string and will not show in the notice.\n - `subject` (optional) - The feature that is being deprecated (i.e. `\"Passing a start and end into getEvents\"`).\n - `transition`  (optional) - The URL to the transition guide for the deprecation\n - `level` (optional) - The [logger level](https://github.com/onflow/fcl-js/tree/master/packages/util-logger#logger-levels) of the deprecation notice (default LEVELS.warn)\n - `message` (optional) - An additional message to provide the user about the deprecation.  Will ap\n - `callback` (optional) -\n\nDeprecation notice format:\n```javascript\n `${pkg} Deprecation Notice\n============================\n\n${subject} is deprecated and will cease to work in future releases of ${pkg}.\n${message}\nYou can learn more (including a guide on common transition paths) here: ${transition}\n\n============================`\n```\nThe lines with `subject`, `message`, and `transition` will not appear if these values are not provided.  \n  \nExample usage:\n```javascript\nimport * as logger from \"@onflow/util-logger\"\n\nlogger.log.deprecate({\n  pkg: \"FCL/SDK\",\n  subject: \"Passing a start and end into getEvents\",\n  transition:\n    \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder\",\n})\n```\n"
  },
  {
    "path": "packages/util-logger/package.json",
    "content": "{\n  \"name\": \"@onflow/util-logger\",\n  \"version\": \"1.3.4\",\n  \"description\": \"Logger for FCL-JS\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/util-logger.ts\",\n  \"main\": \"dist/util-logger.js\",\n  \"module\": \"dist/util-logger.module.js\",\n  \"unpkg\": \"dist/util-logger.umd.js\",\n  \"types\": \"types/util-logger.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  },\n  \"peerDependencies\": {\n    \"@onflow/util-config\": \">1.1.1\"\n  },\n  \"peerDependenciesMeta\": {\n    \"@onflow/util-config\": {\n      \"optional\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/util-logger/src/util-logger.test.ts",
    "content": "import {config} from \"@onflow/config\"\nimport * as logger from \"./util-logger\"\n\ndescribe(\"logger.LEVELS\", () => {\n  it(\"should return correct number for level\", () => {\n    expect(logger.LEVELS.error).toEqual(1)\n    expect(logger.LEVELS.warn).toEqual(2)\n    expect(logger.LEVELS.log).toEqual(3)\n    expect(logger.LEVELS.info).toEqual(4)\n    expect(logger.LEVELS.debug).toEqual(5)\n  })\n})\n\ndescribe(\"logger\", () => {\n  let configRef\n  const loggerLevelConfigKey = \"logger.level\"\n  const testArgs = {\n    title: \"test title\",\n    message: \"test message\",\n  }\n\n  beforeEach(() => {\n    configRef = config()\n    logger.setConfig(config)\n  })\n\n  it(\"should not fire logger if config level is less than log level\", async () => {\n    const consoleSpy = jest.spyOn(console, \"log\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, 0)\n\n    await logger.log({...testArgs, level: 1})\n    expect(consoleSpy).not.toHaveBeenCalled()\n  })\n\n  it(\"should fire logger if config level is less than log level and always is true\", async () => {\n    const consoleSpy = jest.spyOn(console, \"warn\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, 0)\n\n    await logger.log({...testArgs, level: 2, always: true})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level log\", async () => {\n    const consoleSpy = jest.spyOn(console, \"log\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, 0)\n\n    await logger.log({...testArgs, level: 0})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level error\", async () => {\n    const consoleSpy = jest.spyOn(console, \"error\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, logger.LEVELS.error)\n\n    await logger.log({...testArgs, level: logger.LEVELS.error})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level warn\", async () => {\n    const consoleSpy = jest.spyOn(console, \"warn\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, logger.LEVELS.warn)\n\n    await logger.log({...testArgs, level: logger.LEVELS.warn})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level log\", async () => {\n    const consoleSpy = jest.spyOn(console, \"log\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, logger.LEVELS.log)\n\n    await logger.log({...testArgs, level: logger.LEVELS.log})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level info\", async () => {\n    const consoleSpy = jest.spyOn(console, \"info\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, logger.LEVELS.info)\n\n    await logger.log({...testArgs, level: logger.LEVELS.info})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n\n  it(\"should call correct console method for level debug\", async () => {\n    const consoleSpy = jest.spyOn(console, \"debug\").mockImplementation()\n    configRef.put(loggerLevelConfigKey, logger.LEVELS.debug)\n\n    await logger.log({...testArgs, level: logger.LEVELS.debug})\n    expect(consoleSpy).toHaveBeenCalled()\n  })\n})\n"
  },
  {
    "path": "packages/util-logger/src/util-logger.ts",
    "content": "interface IConfig {\n  get: <T>(key: string) => T\n}\n\ntype Config = (IConfig & (() => IConfig)) | null\n\n// Config dependency injected into logger to break circular dependency\nlet config: Config = null\nexport const setConfig = (_config: any) => {\n  config = _config\n}\n\n/**\n * The levels of the logger\n */\nexport enum LEVELS {\n  debug = 5,\n  info = 4,\n  log = 3,\n  warn = 2,\n  error = 1,\n}\n\n/**\n * Builds a message formatted for the logger\n * @param options - The options for the log\n * @param options.title - The title of the log\n * @param options.message - The message of the log\n * @returns The message formatted for the logger\n * @example\n * buildLoggerMessageArgs({ title: \"My Title\", message: \"My Message\" })\n */\nconst buildLoggerMessageArgs = (options: {\n  title: string\n  message: string\n}): string[] => {\n  const {title, message} = options\n  return [\n    `\n    %c${title}\n    ============================\n\n    ${message}\n\n    ============================\n    `\n      .replace(/\\n[^\\S\\r\\n]+/g, \"\\n\")\n      .trim(),\n    \"font-weight:bold;font-family:monospace;\",\n  ]\n}\n\n/**\n * Logs messages based on the level of the message and the level set in the config\n * @param options - The options for the log\n * @param options.title - The title of the log\n * @param options.message - The message of the log\n * @param options.level - The level of the log\n * @param options.always - Whether to always show the log\n * @example\n * log({ title: \"My Title\", message: \"My Message\", level: LEVELS.warn, always: false })\n */\nexport const log = async (options: {\n  title: string\n  message: string\n  level: number\n  always?: boolean\n}) => {\n  const {title, message, level, always} = options\n  const configLoggerLevel =\n    (await config?.()?.get<number>(\"logger.level\")) ?? LEVELS.warn\n\n  // If config level is below message level then don't show it\n  if (!always && configLoggerLevel < level) return\n\n  const loggerMessageArgs = buildLoggerMessageArgs({title, message})\n\n  switch (level) {\n    case LEVELS.debug:\n      console.debug(...loggerMessageArgs)\n      break\n    case LEVELS.info:\n      console.info(...loggerMessageArgs)\n      break\n    case LEVELS.warn:\n      console.warn(...loggerMessageArgs)\n      break\n    case LEVELS.error:\n      console.error(...loggerMessageArgs)\n      break\n    default:\n      console.log(...loggerMessageArgs)\n  }\n}\n\n/**\n * Logs a deprecation notice.  If a callback is provided this function returns a function that will call the callback and log the deprecation notice, otherwise it just logs the deprecation notice.\n * @param options - The options for the log\n * @param options.pkg - The package that is being deprecated\n * @param options.subject - The subject of the deprecation\n * @param options.transition - The transition path for the deprecation\n * @param options.level - The level of the log\n * @param options.message - The message of the log\n * @param options.callback - A callback to run after the log\n * @returns A function that will call the callback and log the deprecation notice if the callback is provided\n * @example\n * // Logs a deprecation notice\n * log.deprecate({ pkg: \"@onflow/fcl\", subject: \"Some item\", transition: \"https://github.com/onflow/flow-js-sdk\", message: \"Descriptive message\", level: LEVELS.warn, callback: () => {} })\n * @example\n * function someFunction() { ... }\n * const deprecatedFunction = log.deprecate({ pkg: \"@onflow/fcl\", subject: \"Some item\", transition: \"https://github.com/foo/bar/TRANSITIONS.md\", message: \"Descriptive message\", level: LEVELS.warn, callback: someFunction })\n * deprecatedFunction() // Calls someFunction and logs the deprecation notice\n */\nlog.deprecate = <T, U>(options: {\n  pkg?: string\n  subject?: string\n  transition?: string\n  level?: number\n  message?: string\n  callback?: (...args: T[]) => U\n}): ((...args: T[]) => Promise<U>) | Promise<void> => {\n  const {\n    pkg,\n    subject,\n    transition,\n    level = LEVELS.warn,\n    message = \"\",\n    callback = null,\n  } = options\n\n  const capitalizeFirstLetter = (str: string) => {\n    return str.charAt(0).toUpperCase() + str.slice(1)\n  }\n\n  const logMessage = () =>\n    log({\n      title: `${pkg ? pkg + \" \" : \"\"}Deprecation Notice`,\n      message: `\n      ${\n        subject\n          ? `${capitalizeFirstLetter(\n              subject\n            )} is deprecated and will cease to work in future releases${\n              pkg ? \" of \" + pkg : \"\"\n            }.`\n          : \"\"\n      }${message ? \"\\n\" + message : \"\"}${\n        transition\n          ? `\\nYou can learn more (including a guide on common transition paths) here: ${transition}`\n          : \"\"\n      }\n    `.trim(),\n      level,\n    })\n\n  if (typeof callback === \"function\") {\n    return async (...args: T[]) => {\n      await logMessage()\n      return await callback(...args)\n    }\n  }\n  return logMessage()\n}\n"
  },
  {
    "path": "packages/util-logger/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-rpc/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-rpc/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-rpc/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-rpc/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-rpc/CHANGELOG.md",
    "content": "# @onflow/util-rpc\n\n## 0.0.3\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 0.0.2\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 0.0.2-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 0.0.1\n\n- Initial release\n"
  },
  {
    "path": "packages/util-rpc/README.md",
    "content": "# @onflow/util-rpc\n\nLightweight utility for creating transport-agnostic, bidirectional JSON-RPC channels.\n\n# Status\n\n- **Last Updated:** Aug 6th, 2024\n- **Stable:** No\n- **Risk of Breaking Change:** Yes\n\n# Install\n\n```bash\nnpm install --save @onflow/util-rpc\n```\n\n# Usage\n\n```javascript\nimport {RpcClient} from \"@onflow/util-rpc\"\n\nconst rpc = new RpcClient(...)\nrpc.connect(...)\n```\n"
  },
  {
    "path": "packages/util-rpc/package.json",
    "content": "{\n  \"name\": \"@onflow/util-rpc\",\n  \"version\": \"0.0.3\",\n  \"description\": \"Lightweight utility for creating transport-agnostic, bidirectional JSON-RPC channels.\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation <support@flowfoundation.org>\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/index.ts\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"unpkg\": \"dist/index.umd.js\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  }\n}\n"
  },
  {
    "path": "packages/util-rpc/src/index.ts",
    "content": "export {RpcClient} from \"./rpc-client\"\nexport type {RpcNotification, RpcRequest} from \"./rpc-client\"\nexport {RpcError, RpcErrorCode} from \"./rpc-error\"\n"
  },
  {
    "path": "packages/util-rpc/src/messages.ts",
    "content": "export type RpcRequestMessage = {\n  jsonrpc: \"2.0\"\n  id: number\n  method: string\n  params: any\n}\n\nexport type RpcNotificationMessage = {\n  jsonrpc: \"2.0\"\n  method: string\n  params: any\n}\n\nexport type RpcResponseMessage = {\n  jsonrpc: \"2.0\"\n  id: number\n  result: any\n}\n\nexport type RpcErrorMessage = {\n  jsonrpc: \"2.0\"\n  id: number\n  error: {\n    code: number\n    message: string\n    data?: any\n  }\n}\n\nexport type RpcMessage =\n  | RpcRequestMessage\n  | RpcNotificationMessage\n  | RpcResponseMessage\n  | RpcErrorMessage\n"
  },
  {
    "path": "packages/util-rpc/src/rpc-client.test.ts",
    "content": "import {RpcClient} from \"./rpc-client\"\nimport {RpcError, RpcErrorCode} from \"./rpc-error\"\n\ndescribe(\"rpc client\", () => {\n  test(\"request\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [],\n    })\n\n    a.on(\"test\", msg => {\n      return {hello: msg}\n    })\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    const result = await b.request(\"test\", {world: \"world\"})\n    expect(result).toEqual({hello: {world: \"world\"}})\n  })\n\n  test(\"request error\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [],\n    })\n\n    a.on(\"test\", async msg => {\n      throw new RpcError(RpcErrorCode.INTERNAL_ERROR, \"test error\")\n    })\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    try {\n      await b.request(\"test\", {})\n      fail(\"should throw\")\n    } catch (error) {\n      expect(error).toBeInstanceOf(RpcError)\n      expect(error.code).toBe(RpcErrorCode.INTERNAL_ERROR)\n      expect(error.message).toBe(\"test error\")\n    }\n  })\n\n  test(\"request method not found\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [],\n    })\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    try {\n      await a.request(\"foobar\", {})\n      fail(\"should throw\")\n    } catch (error) {\n      expect(error).toBeInstanceOf(RpcError)\n      expect(error.code).toBe(RpcErrorCode.METHOD_NOT_FOUND)\n      expect(error.message).toBe(\"Method not found: foobar\")\n    }\n  })\n\n  test(\"notify\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [\"something\"],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [],\n    })\n\n    let subFn = jest.fn()\n    a.subscribe(\"something\", subFn)\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    b.notify(\"something\", {hello: \"world\"})\n\n    await new Promise(resolve => setTimeout(resolve, 0))\n\n    expect(subFn).toHaveBeenCalledTimes(1)\n    expect(subFn).toHaveBeenCalledWith({hello: \"world\"})\n  })\n\n  test(\"get notifications\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [\"something\"],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [\"something2\"],\n    })\n\n    let subFn = jest.fn()\n    a.subscribe(\"something\", subFn)\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    expect(await a.getAvailableNotifications()).toContain(\"something2\")\n    expect(await b.getAvailableNotifications()).toContain(\"something\")\n  })\n\n  test(\"get requests\", async () => {\n    const a = new RpcClient<any, any>({\n      notifications: [],\n    })\n    const b = new RpcClient<any, any>({\n      notifications: [],\n    })\n\n    a.on(\"test\", () => ({}))\n    b.on(\"test2\", () => ({}))\n\n    a.connect({\n      send: b.receive.bind(b),\n    })\n    b.connect({\n      send: a.receive.bind(a),\n    })\n\n    expect(await a.getAvailableRequests()).toContain(\"test2\")\n    expect(await b.getAvailableRequests()).toContain(\"test\")\n  })\n})\n"
  },
  {
    "path": "packages/util-rpc/src/rpc-client.ts",
    "content": "import {RpcMessage, RpcNotificationMessage, RpcRequestMessage} from \"./messages\"\nimport {RpcError, RpcErrorCode} from \"./rpc-error\"\n\nexport type RpcRequest<P, R> = {\n  type: \"request\"\n  params: P\n  result: R\n}\n\nexport type RpcNotification<P> = {\n  type: \"notification\"\n  params: P\n}\n\nenum ReservedRpcMethods {\n  HELLO = \"rpc_hello\",\n}\n\ntype RequestHandler<T = any> = (params: T) => any\ntype NotificationHandler<T = any> = (params: T) => void\n\ntype PeerInfo = {\n  requests: string[]\n  notifications: string[]\n}\n\nexport class RpcClient<\n  PeerRequests extends Record<string, RpcRequest<any, any>>,\n  PeerNotifications extends Record<string, RpcNotification<any>>,\n> {\n  private id = 0\n\n  private setSend: (send: (msg: RpcMessage) => void) => void = () => {}\n  private _send: Promise<(msg: RpcMessage) => void> = new Promise(resolve => {\n    this.setSend = resolve\n  })\n\n  private resolvePeerInfo!: (info: PeerInfo) => void\n  private rejectPeerInfo!: (error: Error) => void\n  private peerInfo: Promise<PeerInfo> = new Promise((resolve, reject) => {\n    this.resolvePeerInfo = resolve\n    this.rejectPeerInfo = reject\n  })\n\n  private enabledNotifications: string[] = []\n  private requestHandlers: Record<string, RequestHandler> = {} as any\n  private subscriptions: Record<string, Set<NotificationHandler>> = {} as any\n  private messageListeners: ((msg: any) => void)[] = []\n\n  constructor({notifications}: {notifications?: string[]}) {\n    this.enabledNotifications = notifications || []\n    this.on(ReservedRpcMethods.HELLO, (info: PeerInfo) => {\n      this.resolvePeerInfo(info)\n      return this.ownInfo()\n    })\n  }\n\n  connect({send}: {send: (msg: RpcMessage) => void}) {\n    this.setSend(send)\n    this.requestWithoutConnection(ReservedRpcMethods.HELLO, this.ownInfo())\n      .then(info => {\n        this.resolvePeerInfo(info)\n      })\n      .catch(this.rejectPeerInfo)\n  }\n\n  private ownInfo(): PeerInfo {\n    return {\n      requests: Object.keys(this.requestHandlers),\n      notifications: this.enabledNotifications,\n    }\n  }\n\n  private async send(msg: RpcMessage) {\n    return (await this._send)(msg)\n  }\n\n  receive(msg: RpcMessage) {\n    if (msg?.jsonrpc !== \"2.0\") {\n      return\n    }\n\n    if (\"method\" in msg) {\n      if (\"id\" in msg) {\n        this.handleRequest(msg)\n      } else {\n        this.handleNotification(msg)\n      }\n    }\n\n    this.messageListeners.forEach(listener => listener(msg))\n  }\n\n  private async handleRequest(msg: RpcRequestMessage) {\n    const handler = this.requestHandlers[msg.method]\n    if (handler) {\n      try {\n        const result = await handler(msg.params)\n        this.send({\n          jsonrpc: \"2.0\",\n          id: msg.id,\n          result,\n        })\n      } catch (error: any) {\n        if (error instanceof RpcError) {\n          this.send({\n            jsonrpc: \"2.0\",\n            id: msg.id,\n            error: {\n              code: error.code,\n              message: error.message,\n              data: error.data,\n            },\n          })\n        } else {\n          this.send({\n            jsonrpc: \"2.0\",\n            id: msg.id,\n            error: {\n              code: RpcErrorCode.INTERNAL_ERROR,\n              message: error?.message,\n            },\n          })\n        }\n      }\n    } else {\n      this.send({\n        jsonrpc: \"2.0\",\n        id: msg.id,\n        error: {\n          code: RpcErrorCode.METHOD_NOT_FOUND,\n          message: `Method not found: ${msg.method}`,\n        },\n      })\n    }\n  }\n\n  private handleNotification(msg: RpcNotificationMessage) {\n    if (this.subscriptions[msg.method]) {\n      this.subscriptions[msg.method].forEach(handler => handler(msg.params))\n    }\n  }\n\n  private onMessage(listener: (msg: any) => void) {\n    this.messageListeners.push(listener)\n    return () => {\n      this.messageListeners = this.messageListeners.filter(l => l !== listener)\n    }\n  }\n\n  async notify<R extends keyof PeerNotifications & string>(\n    method: R,\n    params: PeerNotifications[R][\"params\"]\n  ) {\n    await this.onceConnected()\n\n    this.send({\n      jsonrpc: \"2.0\",\n      method,\n      params,\n    })\n  }\n\n  async request<R extends keyof PeerRequests & string>(\n    method: R,\n    params: PeerRequests[R][\"params\"]\n  ): Promise<PeerRequests[R][\"result\"]> {\n    await this.onceConnected()\n    return this.requestWithoutConnection(method, params)\n  }\n\n  private async requestWithoutConnection<R extends keyof PeerRequests & string>(\n    method: R,\n    params: PeerRequests[R][\"params\"]\n  ): Promise<PeerRequests[R][\"result\"]> {\n    const id = this.id++\n\n    let unsub = () => {}\n    const result = new Promise<PeerRequests[R][\"result\"]>((resolve, reject) => {\n      unsub = this.onMessage(msg => {\n        if (msg.id === id && (\"result\" in msg || \"error\" in msg)) {\n          if (msg.error) {\n            const rpcError = new RpcError(\n              msg.error.code,\n              msg.error.message,\n              msg.error.data\n            )\n            reject(rpcError)\n          }\n          resolve(msg.result)\n        }\n      })\n    }).finally(unsub)\n\n    this.send({\n      jsonrpc: \"2.0\",\n      method,\n      params,\n      id,\n    })\n\n    return result\n  }\n\n  on(method: string, handler: RequestHandler) {\n    this.requestHandlers[method] = handler\n  }\n\n  subscribe<R extends string>(method: R, handler: RequestHandler<any>) {\n    this.subscriptions[method] = this.subscriptions[method] || new Set()\n    this.subscriptions[method].add(handler)\n  }\n\n  unsubscribe<R extends string>(method: R, handler: RequestHandler<any>) {\n    this.subscriptions[method]?.delete(handler)\n  }\n\n  async onceConnected() {\n    return this.peerInfo.then(() => {})\n  }\n\n  async getAvailableRequests() {\n    return this.peerInfo.then(info => info.requests)\n  }\n\n  async getAvailableNotifications() {\n    return this.peerInfo.then(info => info.notifications)\n  }\n}\n"
  },
  {
    "path": "packages/util-rpc/src/rpc-error.ts",
    "content": "export enum RpcErrorCode {\n  INVALID_REQUEST = -32600,\n  METHOD_NOT_FOUND = -32601,\n  INVALID_PARAMS = -32602,\n  INTERNAL_ERROR = -32603,\n  PARSE_ERROR = -32700,\n}\n\nexport class RpcError extends Error {\n  constructor(\n    public code: RpcErrorCode,\n    public message: string,\n    public data?: any\n  ) {\n    super(message)\n  }\n}\n"
  },
  {
    "path": "packages/util-rpc/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-semver/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"]]\n}\n"
  },
  {
    "path": "packages/util-semver/CHANGELOG.md",
    "content": "# @onflow/util-semver\n\n## 1.0.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.0.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n"
  },
  {
    "path": "packages/util-semver/package.json",
    "content": "{\n  \"name\": \"@onflow/util-semver\",\n  \"version\": \"1.0.4\",\n  \"description\": \"A lightweight semver implementation for use in FCL\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.module.js\",\n  \"source\": \"src/index.ts\",\n  \"types\": \"types/index.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"devDependencies\": {\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/onflow/fcl-js.git\"\n  },\n  \"author\": \"Flow Blockchain\",\n  \"license\": \"Apache-2.0\",\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"homepage\": \"https://flow.com\"\n}\n"
  },
  {
    "path": "packages/util-semver/src/compare-identifiers.js",
    "content": "/*\ncompareIdentifiers was taken from semver package, which is licensed under ISC\n\nGitHub: https://github.com/npm/node-semver/\nNPM: https://www.npmjs.com/package/semver\nLicense: https://github.com/npm/node-semver/blob/main/LICENSE\n\nThe ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nconst numeric = /^[0-9]+$/\nexport const compareIdentifiers = (a, b) => {\n  const anum = numeric.test(a)\n  const bnum = numeric.test(b)\n\n  if (anum && bnum) {\n    a = +a\n    b = +b\n  }\n\n  return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1\n}\n"
  },
  {
    "path": "packages/util-semver/src/compare.js",
    "content": "import {compareIdentifiers} from \"./compare-identifiers\"\n\n// Official Semver Regex https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst VERSION_REGEX =\n  /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n\n/**\n * Compares two semver versions\n * @param {string} a - The first version to compare\n * @param {string} b - The second version to compare\n * @returns {number} - Returns 1 if a is greater than b, -1 if a is less than b, and 0 if they are equal\n */\nexport const compare = (a, b) => {\n  if (typeof a !== \"string\" || typeof b !== \"string\")\n    throw new Error(\"Invalid input\")\n\n  const vsnA = a.match(VERSION_REGEX)\n  const vsnB = b.match(VERSION_REGEX)\n\n  if (!vsnA || !vsnB) throw new Error(\"Invalid input\")\n\n  for (let i = 1; i <= 3; i++) {\n    // If either is greater than the other, return\n    if (parseInt(vsnA[i]) > parseInt(vsnB[i])) return 1\n    if (parseInt(vsnA[i]) < parseInt(vsnB[i])) return -1\n  }\n\n  // If equal, compare prerelease\n  if (vsnA[4] && vsnB[4]) {\n    const prereleaseA = (vsnA[4] || \"\").split(\".\")\n    const prereleaseB = (vsnB[4] || \"\").split(\".\")\n\n    for (let i = 0; i < Math.max(prereleaseA.length, prereleaseB.length); i++) {\n      // If one identifier has more fields than the other & the rest is equal, the one with more fields is greater\n      if (prereleaseA[i] === undefined) return -1\n      if (prereleaseB[i] === undefined) return 1\n\n      // Compare field identifiers\n      const cmp = compareIdentifiers(prereleaseA[i], prereleaseB[i])\n      if (cmp !== 0) return cmp\n    }\n  }\n\n  return 0\n}\n"
  },
  {
    "path": "packages/util-semver/src/compare.test.js",
    "content": "import {compare} from \"./compare\"\n\n// taken from semver.org\nconst sortOrder = [\n  \"1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0\",\n  \"1.0.0 < 2.0.0 < 2.1.0 < 2.1.1\",\n  \"1.0.0-alpha < 1.0.0\",\n]\n\ndescribe(\"semver compare\", () => {\n  // Check that examples are sorted properly\n  sortOrder.forEach((order, i) => {\n    const items = order.split(\" < \")\n    test(`sorts order #${i} correctly`, () => {\n      expect([...items].sort(compare)).toEqual(items)\n    })\n  })\n\n  test(`compares equivalent versions properly`, () => {\n    expect(compare(\"1.0.0\", \"1.0.0\")).toBe(0)\n    expect(compare(\"1.0.0+build\", \"1.0.0\")).toBe(0)\n    expect(compare(\"1.0.0+build\", \"1.0.0+otherbuild\")).toBe(0)\n  })\n\n  test(`throws on invalid input`, () => {\n    expect(() => compare(\"1.0.0\", \"\")).toThrow()\n    expect(() => compare(\"\", \"1.0.0\")).toThrow()\n    expect(() => compare(\"\", \"\")).toThrow()\n    expect(() => compare(\"1.0.0\", null)).toThrow()\n    expect(() => compare(null, \"1.0.0\")).toThrow()\n    expect(() => compare(\"1.0.a\", \"1.0.0\")).toThrow()\n  })\n})\n"
  },
  {
    "path": "packages/util-semver/src/index.ts",
    "content": "export {compare} from \"./compare\"\n"
  },
  {
    "path": "packages/util-semver/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "packages/util-template/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-template/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-template/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-template/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-template/CHANGELOG.md",
    "content": "# @onflow/util-template\n\n## 1.2.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a)]:\n  - @onflow/util-logger@1.3.4\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-logger@1.3.3\n\n## 1.2.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n- Updated dependencies [[`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7)]:\n  - @onflow/util-logger@1.3.3-alpha.0\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1), [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a), [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-logger@1.3.2\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n- Updated dependencies [[`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a)]:\n  - @onflow/util-logger@1.3.2-alpha.2\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n- Updated dependencies [[`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4)]:\n  - @onflow/util-logger@1.3.2-alpha.1\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n- Updated dependencies [[`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9)]:\n  - @onflow/util-logger@1.3.1\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n### Patch Changes\n\n- Updated dependencies [[`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42), [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42)]:\n  - @onflow/util-logger@1.3.0\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.2\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.1\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.0.4\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.3-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate)\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n"
  },
  {
    "path": "packages/util-template/README.md",
    "content": "# template\n\nUtility to help with string interop in SDK and FCL\n\n## Usage\n\n```javascript\nimport {templar} from \"onflow/template\"\n\nconst template = templar`\nFrom: ${o => o.from}\nTo: ${o => o.to}\nMessage: ${o => o.msg}\n`\n\nconst letter = template({\n  from: \"Bob the Builder\",\n  to: \"Postman Pat\",\n  msg: \"Please pick up your black and white cat.\",\n})\n\n// prettier-ignore\nassert( letter, `\nFrom: Bob the Builder\nTo: Postman Pat\nMessage: Please pick up your black and white cat.\n`)\n```\n\n```javascript\nimport {templar} from \"@onflow/template\"\n\nconst template1 = templar`\na: ${o => o.a}\nb: ${o => o.b}\n`\n\nconst template2 = templar`\nx: ${o => o.x}\ny: ${o => o.y}\n`\n\nconst template3 = templar`\n${template1}\n${template2}\noh hello!\n${template1}\n${template2}\n`\n\nconst rawr = template3({a: \"A\", b: \"B\", x: \"X\", y: \"Y\"})\n\n// prettier-ignore\nassert(rawr, `\na: A\nb: B\nx: X\ny: Y\noh hello!\na: A\nb: B\nx: X\ny: Y\n`)\n```\n\n## Examples\n\n**Role your own graphql library**\n\n```javascript\n// gql.js\nimport {templar} from \"@onflow/template\"\n\nexport const gql = templar\n\nexport const gqlr = (...args) => (opts = {}) => {\n  const params = opts.params || {}\n  const headers = opts.headers || {}\n  const endpoint = opts.endpoint || \"\"\n\n  return fetch(endpoint, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...headers,\n    },\n    body: JSON.stringify({\n      query: gql(...args)(params),\n    }),\n  }).then(d => d.json())\n}\n\n// somewhere-else.js\nimport React, {useEffect, useState} from \"react\"\nimport {gqlr, gql} from \"./gql\"\n\nconst USER = gql`\n  fragment USER on User {\n    username\n  }\n`\n\nconst query = gqlr`\n  query {\n    me { ...USER }\n  }\n  ${USER}\n`\n\nexport const Username = () => {\n  const [username, setUsername] = useState(null)\n\n  useEffect(() => {\n    query({\n      endpoint: \"http://...\",\n      headers: {authorization: \"bearer ...\"},\n    }).then(response => setUsername(response.data.me.username))\n  }, [])\n\n  return username == null ? null : username\n}\n```\n\n**Role your own pipeline thing?**\n\n```javascript\nconst pipe = (fns = []) => token => {\n  return fns.reduce((token, fn) => fn(token), token)\n}\n\nconst param = (key, value) => token => {\n  token.params = token.parms || {}\n  token.params[key] = value\n  return token\n}\n\nconst script = (...args) => token => {\n  token.type = \"script\"\n  token.value = templar(...args)(token.params)\n  return token\n}\n\nconst query = (...args) => token => {\n  token.type = \"query\"\n  token.value = templar(...args)(token.parms)\n  return token\n}\n\nconst desc = (...args) => token => {\n  token.description = templar(...args)(token.params)\n  return token\n}\n\nconst rawr = pipe([\n  param(\"msg\", \"woot woot im a boot\"),\n  script`\n    pub fun main() {\n      log(\"msg: ${o => o.msg}\")\n    }\n  `,\n  desc`\n    the message: ${o => o.msg}\n  `,\n])\n\nassert(rawr, {\n  params: {\n    msg: \"woot woot im a boot\",\n  },\n  type: \"script\",\n  code: `\n    pub fun main() {\n      log(\"msg: woot woot im a boot\")\n    }\n  `,\n  description: `\n    the message: woot woot im a boot\n  `,\n})\n```\n"
  },
  {
    "path": "packages/util-template/package.json",
    "content": "{\n  \"name\": \"@onflow/util-template\",\n  \"version\": \"1.2.4\",\n  \"description\": \"Template Literal used for Cadence Interop\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/template.ts\",\n  \"main\": \"dist/template.js\",\n  \"module\": \"dist/template.module.js\",\n  \"unpkg\": \"dist/template.umd.js\",\n  \"types\": \"types/template.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\",\n    \"@onflow/util-logger\": \"1.3.4\"\n  }\n}\n"
  },
  {
    "path": "packages/util-template/src/__snapshots__/template.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`template input type vs output type t71(\\`\\`) -> function 1`] = `\"function\"`;\n\nexports[`template input type vs output type template(template\\`\\`) -> function 1`] = `\"function\"`;\n\nexports[`template input type vs output type template\\`\\` -> function 1`] = `\"function\"`;\n\nexports[`template interop function template(template\\`\\${o=>o.a}\\`)(o) -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template interop function template\\`\\${o=>o.a}\\`(o) -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template interop more template template(template\\`x\\${template\\`y\\${(_o: typeof o) => _o.a}\\`}\\`)(o) -> 'xyabc' 1`] = `\"xyabc\"`;\n\nexports[`template interop more template template\\`x\\${template\\`y\\${o=>o.a}\\`}\\`(o) => 'xyabc' 1`] = `\"xyabc\"`;\n\nexports[`template interop more template template\\`x\\${template\\`y\\${template\\`z\\${o=>o.a}\\`}\\`}\\`(o) => 'xyabc' 1`] = `\"xyzabc\"`;\n\nexports[`template interop nested functions template\\`\\${fn}\\`(o) -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template no interop template('abc')() -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template no interop template(template\\`abc\\`)() -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template no interop template\\`abc\\`() -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template only interop template(template\\`\\${'abc'}\\`)() -> 'abc' 1`] = `\"abc\"`;\n\nexports[`template only interop template\\`\\${'abc'}\\`() -> 'abc' 1`] = `\"abc\"`;\n"
  },
  {
    "path": "packages/util-template/src/template.test.ts",
    "content": "import {template, interleave} from \"./template\"\n\ndescribe(\"interleave\", () => {\n  ;[\n    [[], [], []],\n    [[1], [], [1]],\n    [[], [1], []],\n    [[1], [2], [1, 2]],\n    [\n      [1, 2, 3],\n      [4, 5, 6],\n      [1, 4, 2, 5, 3, 6],\n    ],\n    [\n      [1, 2, 3],\n      [4, 5],\n      [1, 4, 2, 5, 3],\n    ],\n  ].forEach(([a, b, c]) => {\n    test(`interleave([${a}], [${b}]) -> [${c}]`, () => {\n      expect(interleave(a, b)).toStrictEqual(c)\n    })\n  })\n})\n\nconst _ = (msg: string, a: unknown, b?: unknown) => {\n  if (b == null) {\n    test(msg, () => expect(a).toMatchSnapshot())\n  } else {\n    test(msg, () => expect(a).toBe(b))\n  }\n}\nconst t = <T>(v: T) => typeof v\n\ndescribe(\"template\", () => {\n  describe(\"input type vs output type\", () => {\n    _(\"template`` -> function\", t(template``))\n    _(\"t71(``) -> function\", t(template(\"words\")))\n    _(\"template(template``) -> function\", t(template(template``)))\n  })\n\n  describe(\"no interop\", () => {\n    _(\"template`abc`() -> 'abc'\", template`abc`())\n    _(\"template('abc')() -> 'abc'\", template(\"abc\")())\n    _(\"template(template`abc`)() -> 'abc'\", template(template`abc`)())\n  })\n\n  describe(\"only interop\", () => {\n    _(\"template`${'abc'}`() -> 'abc'\", template`${\"abc\"}`())\n    _(\"template(template`${'abc'}`)() -> 'abc'\", template(template`${\"abc\"}`)())\n  })\n\n  describe(\"interop function\", () => {\n    const o = {a: \"abc\"}\n    _(\"template`${o=>o.a}`(o) -> 'abc'\", template`${(_o: typeof o) => _o.a}`(o))\n    _(\n      \"template(template`${o=>o.a}`)(o) -> 'abc'\",\n      template(template`${(_o: typeof o) => _o.a}`)(o)\n    )\n  })\n\n  describe(\"interop more template\", () => {\n    const o = {a: \"abc\"}\n    _(\n      \"template`x${template`y${o=>o.a}`}`(o) => 'xyabc'\",\n      template`x${template`y${(_o: typeof o) => _o.a}`}`(o)\n    )\n    _(\n      \"template`x${template`y${template`z${o=>o.a}`}`}`(o) => 'xyabc'\",\n      template`x${template`y${template`z${(_o: typeof o) => _o.a}`}`}`(o)\n    )\n    _(\n      \"template(template`x${template`y${(_o: typeof o) => _o.a}`}`)(o) -> 'xyabc'\",\n      template(template`x${template`y${(_o: typeof o) => _o.a}`}`)(o)\n    )\n  })\n\n  describe(\"interop nested functions\", () => {\n    const fn = () => () => () => () => () => (f: typeof o) => f.a\n    const o = {a: \"abc\"}\n    _(\"template`${fn}`(o) -> 'abc'\", template`${fn}`(o))\n  })\n\n  describe(\"template takes a string\", () => {\n    const str = \"woot woot im a boot\"\n    _(\"template(str)() -> str\", template(str)(), str)\n  })\n\n  describe(\"object can have non string values\", () => {\n    const data = {a: 1, b: NaN, c: undefined, d: null, e: false, f: true}\n    const tx = template`a:${(o: typeof data) => o.a}|b:${(o: typeof data) =>\n      o.b}|c:${(o: typeof data) => o.c}|d:${(o: typeof data) => o.d}|e:${(\n      o: typeof data\n    ) => o.e}|f:${(o: typeof data) => o.f}`\n    _(\"template(data)\", tx(data), \"a:1|b:NaN|c:undefined|d:null|e:false|f:true\")\n  })\n})\n"
  },
  {
    "path": "packages/util-template/src/template.ts",
    "content": "import {log} from \"@onflow/util-logger\"\n\n/**\n * Interleaves two arrays\n * @param a - The first array\n * @param b - The second array\n * @param c - The target array\n * @returns The interleaved array\n */\nexport function interleave<A, B>(\n  a: A[] = [],\n  b: B[] = [],\n  c: (A | B)[] = []\n): (A | B)[] {\n  if (!a.length && !b.length) return c\n  if (!a.length) return c\n  if (!b.length) {\n    c.push(...a)\n    return c\n  }\n\n  const [aHead, ...aRest] = a\n  const [bHead, ...bRest] = b\n\n  if (aHead !== undefined) c.push(aHead)\n  if (bHead !== undefined) c.push(bHead)\n\n  return interleave(aRest, bRest, c)\n}\n\n/**\n * Recursively apply a value to a function\n * @param d - The value to apply\n * @returns A function that takes a function and applies the value to it\n */\nfunction recApply<T, U>(d: T): (x: U) => string {\n  return function (arg1) {\n    if (typeof arg1 === \"function\") {\n      log.deprecate({\n        pkg: \"FCL/SDK\",\n        subject: \"Interopolation of functions into template literals\",\n        transition:\n          \"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params\",\n      })\n      return recApply(d)(arg1(d))\n    }\n    return String(arg1)\n  }\n}\n\n/**\n * Creates a template function\n * @param head - A string, template string array, or template function\n * @param rest - The rest of the arguments\n * @returns A template function\n *\n * @example\n * import { template } from \"@onflow/util-template\"\n *\n * // String template\n * const simpleTemplate = template(\"Hello, World!\");\n * console.log(simpleTemplate()); // \"Hello, World!\"\n *\n * // Template literal with interpolation\n * const name = \"Alice\";\n * const greeting = template`Hello, ${name}!`;\n * console.log(greeting()); // \"Hello, Alice!\"\n *\n * // Cadence script template\n * const cadenceScript = template`\n *   access(all) fun main(greeting: String): String {\n *     return greeting.concat(\", from Flow!\")\n *   }\n * `;\n * console.log(cadenceScript()); // The Cadence script as a string\n *\n * // Used with FCL for dynamic Cadence code\n * import * as fcl from \"@onflow/fcl\";\n *\n * const contractAddress = \"0x123456789abcdef0\";\n * const scriptTemplate = fcl.cadence`\n *   import MyContract from ${contractAddress}\n *\n *   access(all) fun main(): String {\n *     return MyContract.getMessage()\n *   }\n * `;\n */\nexport function template(\n  head: string | TemplateStringsArray | ((x?: unknown) => string),\n  ...rest: unknown[]\n): (x?: unknown) => string {\n  if (typeof head === \"string\") return () => head\n  if (typeof head === \"function\") return head\n  return (x: unknown) =>\n    interleave([...head], rest.map(recApply(x)))\n      .join(\"\")\n      .trim()\n}\n"
  },
  {
    "path": "packages/util-template/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  },\n  \"exclude\": [\"src/__snapshots__\"]\n}\n"
  },
  {
    "path": "packages/util-uid/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/util-uid/.browserslistrc",
    "content": "defaults and supports es6-module\nmaintained node versions\n"
  },
  {
    "path": "packages/util-uid/.eslintrc.json",
    "content": "{\n  \"env\": {\n    \"browser\": true,\n    \"es2021\": true,\n    \"jest\": true,\n    \"node\": true\n  },\n  \"extends\": [\n    \"plugin:jsdoc/recommended-typescript\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\"\n  ],\n  \"plugins\": [\"jsdoc\", \"@typescript-eslint\"],\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": \"latest\",\n    \"sourceType\": \"module\"\n  },\n  \"ignorePatterns\": [\"**/dist/\"]\n}\n"
  },
  {
    "path": "packages/util-uid/.npmignore",
    "content": "src/\n"
  },
  {
    "path": "packages/util-uid/CHANGELOG.md",
    "content": "# @onflow/util-uid\n\n## 1.2.4\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426f125610f8043aea1a70e143a94a`](https://github.com/onflow/fcl-js/commit/d5f242b217426f125610f8043aea1a70e143a94a) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.3-alpha.0\n\n### Patch Changes\n\n- [#1983](https://github.com/onflow/fcl-js/pull/1983) [`18d24c8bad7efa0d8741d74f0cf299f89b3622c7`](https://github.com/onflow/fcl-js/commit/18d24c8bad7efa0d8741d74f0cf299f89b3622c7) Thanks [@jribbink](https://github.com/jribbink)! - Update dependencies\n\n## 1.2.2\n\n### Patch Changes\n\n- [#1821](https://github.com/onflow/fcl-js/pull/1821) [`b9c078ce`](https://github.com/onflow/fcl-js/commit/b9c078ce87869c2b41dff07b861cea09a294c6a1) Thanks [@nialexsan](https://github.com/nialexsan)! - Split packages into `@onflow/fcl`, `@onflow/fcl-core`, and `@onflow/fcl-react-native`.\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - Pin internal dependencies to exact versions\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.2-alpha.2\n\n### Patch Changes\n\n- [#1827](https://github.com/onflow/fcl-js/pull/1827) [`e74c4a60`](https://github.com/onflow/fcl-js/commit/e74c4a60f38f366874aa1391ca1c890a7ad3a42a) Thanks [@nialexsan](https://github.com/nialexsan)! - pin versions\n\n## 1.2.2-alpha.1\n\n### Patch Changes\n\n- [#1814](https://github.com/onflow/fcl-js/pull/1814) [`0d09d838`](https://github.com/onflow/fcl-js/commit/0d09d8386c2fc472833df7152467d477f36dddc4) Thanks [@jribbink](https://github.com/jribbink)! - Fix type declarations not fully being generated\n\n## 1.2.1\n\n### Patch Changes\n\n- [#1807](https://github.com/onflow/fcl-js/pull/1807) [`9430d723`](https://github.com/onflow/fcl-js/commit/9430d7232c272f4acb55f5bcff7be82cef9704d9) Thanks [@jribbink](https://github.com/jribbink)! - Fix versioning & actor bug\n\n## 1.2.0\n\n### Minor Changes\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript\n\n- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`8881394b`](https://github.com/onflow/fcl-js/commit/8881394bc11fea507e330a4c507ef304fe456c42) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build\n\n## 1.1.0\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n- [#1496](https://github.com/onflow/fcl-js/pull/1496) [`687f45ec`](https://github.com/onflow/fcl-js/commit/687f45ec25e613399f031497634c4102935d114d) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc for util-uid package.\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.3\n\n### Patch Changes\n\n- [#1663](https://github.com/onflow/fcl-js/pull/1663) [`62dfafa9`](https://github.com/onflow/fcl-js/commit/62dfafa9c7adc3933822b0d3171d6eb025f1719e) Thanks [@nialexsan](https://github.com/nialexsan)! - Upgrade jest to v29.5 and update tests accordingly. Change build to transpile with ESM modules.\n\n## 1.1.0-alpha.2\n\n### Patch Changes\n\n- [#1658](https://github.com/onflow/fcl-js/pull/1658) [`2512b5c5`](https://github.com/onflow/fcl-js/commit/2512b5c53dff708fca97cd8afdbb1f4a46b2f106) Thanks [@nialexsan](https://github.com/nialexsan)! - Align jest version\n\n## 1.1.0-alpha.1\n\n### Minor Changes\n\n- [#1577](https://github.com/onflow/fcl-js/pull/1577) [`d9a49531`](https://github.com/onflow/fcl-js/commit/d9a495316cd03ed0de99e0f01d1b8850a1f0eec4) Thanks [@chasefleming](https://github.com/chasefleming)! - Add npmignore file for build\n\n## 1.1.0-alpha.0\n\n### Minor Changes\n\n- [#1496](https://github.com/onflow/fcl-js/pull/1496) [`687f45ec`](https://github.com/onflow/fcl-js/commit/687f45ec25e613399f031497634c4102935d114d) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc for util-uid package.\n\n## 1.0.3\n\n### Patch Changes\n\n- [#1436](https://github.com/onflow/fcl-js/pull/1436) [`87771cd6`](https://github.com/onflow/fcl-js/commit/87771cd6db2cea13787502522a292e75ce43c4f0) Thanks [@justinbarry](https://github.com/justinbarry)! - Upgrade @onflow/fcl-bundle 1.2.0-alpha.0 -> 1.2.0\n\n## 1.0.2\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.2-alpha.0\n\n### Patch Changes\n\n- [#1227](https://github.com/onflow/fcl-js/pull/1227) [`352f1460`](https://github.com/onflow/fcl-js/commit/352f1460a2f34d228a74fa4bbc6fcf6e68a968b6) Thanks [@jribbink](https://github.com/jribbink)! - Switch to fcl-bundle instead of microbundle for build scripts\n\n## 1.0.1\n\n### Patch Changes\n\n- [#1178](https://github.com/onflow/fcl-js/pull/1178) [`9e7e4cfb`](https://github.com/onflow/fcl-js/commit/9e7e4cfbc026765019653b0e891e63a2d789ceb4) Thanks [@jribbink](https://github.com/jribbink)! - Add --no-compress to watch scripts for easier debugging\n\n## 1.0.0\n\n### Major Changes\n\n- [#1100](https://github.com/onflow/fcl-js/pull/1100) [`ced27ea8`](https://github.com/onflow/fcl-js/commit/ced27ea855988f02f1312c7b732aa107a410c854) Thanks [@justinbarry](https://github.com/justinbarry)! - Release 1.0.0 alpha\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.1\n\n### Patch Changes\n\n- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.\n\n## 1.0.0-alpha.0\n\n### Major Changes\n\n- Release 1.0.0 alpha\n\n- YYYY-MM-DD **BREAKING?** -- description\n- 2020-07-17 -- Initial Implementation\n"
  },
  {
    "path": "packages/util-uid/README.md",
    "content": "# @onflow/util-rpc\n\nLightweight utility for transport-agnostic, bidirectional RPC communication.\n\n# Status\n\n- **Last Updated:** Aug 6th, 2024\n- **Stable:** No\n- **Risk of Breaking Change:** Yes\n\n# Install\n\n```bash\nnpm install --save @onflow/util-rpc\n```\n\n# Usage\n\n```javascript\nimport {RpcClient} from \"@onflow/util-rpc\"\n\nconst uniqueIdentifier = new RpcClient(...)\n```\n"
  },
  {
    "path": "packages/util-uid/package.json",
    "content": "{\n  \"name\": \"@onflow/util-uid\",\n  \"version\": \"1.2.4\",\n  \"description\": \"Utilities to generate Unique Identifiers\",\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Flow Foundation\",\n  \"homepage\": \"https://flow.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+ssh://git@github.com/onflow/fcl-js.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/onflow/fcl-js/issues\"\n  },\n  \"devDependencies\": {\n    \"@babel/preset-typescript\": \"^7.25.7\",\n    \"@onflow/fcl-bundle\": \"1.7.1\",\n    \"@types/jest\": \"^29.5.13\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.57.2\",\n    \"@typescript-eslint/parser\": \"^8.57.2\",\n    \"eslint\": \"^8.57.1\",\n    \"eslint-plugin-jsdoc\": \"^46.10.1\",\n    \"jest\": \"^29.7.0\"\n  },\n  \"source\": \"src/util-uid.ts\",\n  \"main\": \"dist/util-uid.js\",\n  \"module\": \"dist/util-uid.module.js\",\n  \"unpkg\": \"dist/util-uid.umd.js\",\n  \"types\": \"types/util-uid.d.ts\",\n  \"scripts\": {\n    \"prepublishOnly\": \"npm test && npm run build\",\n    \"test\": \"jest\",\n    \"build\": \"fcl-bundle\",\n    \"test:watch\": \"jest --watch\",\n    \"start\": \"fcl-bundle --watch\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime\": \"^7.25.7\"\n  }\n}\n"
  },
  {
    "path": "packages/util-uid/src/util-uid.test.ts",
    "content": "import {uid} from \"./util-uid\"\n\ntest(\"it should generate a unique 32 character alphanumeric string\", () => {\n  const set = new Set()\n  for (let i = 0; i < 1000; i++) {\n    const id = uid()\n    expect(id).toMatch(/^[a-zA-Z0-9]{32}$/)\n    expect(set.has(id)).toBe(false)\n    set.add(id)\n  }\n  expect(set.size).toBe(1000)\n})\n"
  },
  {
    "path": "packages/util-uid/src/util-uid.ts",
    "content": "const HEX = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\nconst T = HEX.length\n\n/**\n * Generates a random unique identifier\n * @returns 32 character alphanumeric string\n */\nexport function uid(): string {\n  let str = \"\",\n    num = 32\n  while (num--) str += HEX[(Math.random() * T) | 0]\n  return str\n}\n"
  },
  {
    "path": "packages/util-uid/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig\",\n  // Change this to match your project\n  \"include\": [\"src/**/*\"],\n  \"compilerOptions\": {\n    \"declarationDir\": \"types\",\n    \"rootDir\": \"src\"\n  }\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  // Change this to match your project\n  \"exclude\": [\"**/*.test.ts\", \"**/*.test.js\"],\n  \"compilerOptions\": {\n    \"moduleResolution\": \"Bundler\",\n    \"module\": \"ESNext\",\n    \"target\": \"ES2015\",\n    // Useful for error cause\n    \"lib\": [\"ES2015\", \"WebWorker\", \"DOM\", \"ES2022.Error\"],\n    \"types\": [\"node\", \"jest\"],\n    // Tells TypeScript to read JS files, as\n    // normally they are ignored as source files\n    \"allowJs\": true,\n    // Generate d.ts files\n    \"declaration\": true,\n    // This compiler run should\n    // only output d.ts files\n    \"emitDeclarationOnly\": true,\n    // go to js file when using IDE functions like\n    // \"Go to Definition\" in VSCode\n    \"declarationMap\": false,\n    \"strict\": true,\n    \"allowSyntheticDefaultImports\": true\n  }\n}\n"
  }
]