{"id":13632247,"url":"https://github.com/tahowallet/extension","last_synced_at":"2025-05-13T22:04:45.533Z","repository":{"id":36983167,"uuid":"345237700","full_name":"tahowallet/extension","owner":"tahowallet","description":"Taho, the community owned and operated Web3 wallet.","archived":false,"fork":false,"pushed_at":"2025-03-27T04:39:19.000Z","size":85906,"stargazers_count":3147,"open_issues_count":338,"forks_count":397,"subscribers_count":51,"default_branch":"main","last_synced_at":"2025-04-29T13:46:14.333Z","etag":null,"topics":["bitcoin","cryptocurrency","dapp","ethereum","wallet","web3"],"latest_commit_sha":null,"homepage":"https://taho.xyz","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tahowallet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-07T02:03:14.000Z","updated_at":"2025-04-09T11:48:14.000Z","dependencies_parsed_at":"2023-09-23T16:20:46.891Z","dependency_job_id":"2a28e827-2b67-4d84-9e07-93de26d3c288","html_url":"https://github.com/tahowallet/extension","commit_stats":{"total_commits":7111,"total_committers":67,"mean_commits":"106.13432835820896","dds":0.8311067360427506,"last_synced_commit":"fa852d4e11b3334915f079169f909d41a4664dff"},"previous_names":[],"tags_count":154,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahowallet%2Fextension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahowallet%2Fextension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahowallet%2Fextension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahowallet%2Fextension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tahowallet","download_url":"https://codeload.github.com/tahowallet/extension/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036816,"owners_count":22003653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","cryptocurrency","dapp","ethereum","wallet","web3"],"created_at":"2024-08-01T22:02:57.624Z","updated_at":"2025-05-13T22:04:45.511Z","avatar_url":"https://github.com/tahowallet.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":["Flutter SDK / Libraries"],"readme":"# Taho Extension\n\n\u003cimg alt=\"The community owned \u0026 operated wallet.\"\n     src=\"./github_cover@2x.png\"\n     width=\"630\" /\u003e\n\n[Taho](https://blog.taho.xyz/a-community-owned-wallet-for-the-new-internet/)\nis a community owned and operated Web3 wallet, built as a\n[browser extension](https://browserext.github.io/browserext/).\n\n## Why not MetaMask?\n\nToday's Web3 landscape is dominated by a [single wallet](https://metamask.io/)\nand a [single infrastructure provider](https://infura.io/), both owned by a\n[single conglomerate](https://consensys.net/). These facts undermine the\ncensorship resistance of Ethereum today... and they're also against Web3's\nspirit of community ownership.\n\nWe can do better.\n\nTaho will be\n\n- Fairly launched ⚖️\n- Sustainably aligned with users 🤲\n- Wholly owned by the community 👪\n\n## Quickstart\n\nTry this.\n\n```sh\n$ nvm use\n$ nvm install\n$ npm install -g yarn # if you don't have yarn globally installed\n$ yarn install # install all dependencies; rerun with --ignore-scripts if\n               # scrypt node-gyp failures prevent the install from completing\n$ yarn start # start a continuous webpack build that will auto-update with changes\n```\n\nOnce the build is running, you can install the extension in your browser of choice:\n\n- [Firefox instructions](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)\n- [Chrome, Brave, Edge, and Opera instructions](https://developer.chrome.com/docs/extensions/mv3/getstarted/#manifest)\n  - Note that these instructions are for Chrome, but substituting\n    `brave://extensions` or `edge://extensions` or `opera://extensions` for `chrome://extensions`\n    depending on browser should get you to the same buttons.\n\nExtension bundles for each browser are in `dist/\u003cbrowser\u003e`.\n\nBy default, the `yarn start` command rebuilds the extension for each browser on\nsave. You can target a particular browser by specifying it in the command, e.g.\nto only rebuild the Firefox extension on change:\n\n```sh\n# On change, rebuild the firefox extension but not others.\n$ yarn start --config-name firefox\n# On change, rebuild the firefox and brave extensions but not others.\n$ yarn start --config-name firefox --config-name brave\n# On change, rebuild the chrome\n$ yarn start --config-name chrome\n```\n\n### Note for some Linux distributions\n\nIn some Linux distributions such as Ubuntu 20.04, you need to explicitly\ntell npm where your `python3` executable is located before running the above\ncommands successfully:\n\n```sh\n$ npm config set python /usr/bin/python3\n```\n\n## Package Structure, Build Structure, and Threat Model\n\nThe extension is built as two packages, `background` and `ui`. `background`\ncontains the bulk of the extension's [background script](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background),\nwhile `ui` contains the code powering extension popups.\n\nThese are separate packages in order to emphasize the difference in attack\nsurface and clearly separate the threat models of each. In particular, `ui`\nis considered untrusted code, while `background` is considered trusted code.\nOnly `background` should interact with key material regularly, while `ui` should\nonly interact with key material via a carefully maintained API.\n\nThe `background` package is also intended to minimize external dependencies\nwhere possible, reducing the surface exposed to a supply chain attack.\nDependencies are generally version-pinned, and `yarn` is used to ensure the\nintegrity of builds.\n\n## Building and Developing\n\nBuilds are designed to be run from the top level of the repository.\n\n### Development Setup\n\nIf you’re on macOS, install Homebrew and run `scripts/macos-setup.sh`. Note\nthat if you don’t have Homebrew or you’re not on macOS, the below information\ndetails what you’ll need. The script additionally sets up pre-commit hooks.\n\n```\n$ ./scripts/macos-setup.sh\n```\n\n### Validators\n\nIf you need to create or update a validation function then:\n\n- You need to write the schema in the `.ts` file to have correct typing.\n- Add the new schema with the validator function name to the `generate-validators.ts` file\n- You need to update the `jtd-validators.d.ts` or `json-validators.d.ts` files with the typing definition\n- run `yarn run generate:validators`\n- import it in your code and happy validating :)\n\nThis setup is necessary so we don't need to include `unsafe-eval` in the CSP policy.\n\n#### Required Software\n\nIf you can't use the macOS setup script, here is the software you'll need to\ninstall:\n\n- `jq`: [Instructions](https://stedolan.github.io/jq/download/)\n- `nvm`: [Instructions](https://github.com/nvm-sh/nvm#installing-and-updating)\n- `pre-commit`: [Instructions](https://pre-commit.com/#install)\n\n#### Installing pre-commit hooks\n\nBefore committing code to this repository or a fork/branch that you intend to\nsubmit for inclusion, please make sure you've installed the pre-commit hooks\nby running `pre-commit install`. The macOS setup script does this for you.\n\n#### Local mainnet fork setup for development\n\nFor more detailed description see `./dev-utils/local-chain/README.md`\n\nQuick Start:\n\n```\n$ cd dev-utils/local-chain\n$ yarn install\n$ yarn start\n```\n\n### Commit signing\n\nCommits on the Taho repository are all required to be signed.\nNo PR will be merged if it has unsigned commits. See the\n[GitHub documentation on commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)\nto get it set up.\n\n### Releasing a version\n\nThis repository uses `yarn version` to create new versions. Typical usage:\n\n```sh\n$ yarn version --patch # bump patch version, e.g. 0.0.5-\u003e0.0.6\n$ yarn version --minor # bump minor version, e.g. 0.1.5-\u003e0.2.0\n```\n\nMajor releases generally require more discussion than this automation allows,\nbut can be managed the same way.\n\nBumping a version in this way will do a few things:\n\n- Ensure the commit is running on the correct branch (`release-\u003cnew-version\u003e`)\n  for review. If you are on a different branch, the script attempts to switch\n  to a new branch based on the latest origin/main. Releases should generally\n  only add version bumps to the main branch.\n- Synchronize the extension manifest version to the updated package version.\n- Commit, tag, and push the new version and branch.\n\nOnce the branch is pushed, you should open a pull request. This will do any\nfurther processing, including potentially managing automated submission of the\nnew version to extension directories (as relevant).\n\n### Additional Scripts\n\n```sh\n$ yarn build # create a production build of the extension\n```\n\nThe build script will generate a ZIP file for each browser bundle under the\n`dist/` directory.\n\n```sh\n$ yarn lint # lint all sources in all projects\n$ yarn lint-fix # auto-fix any auto-fixable lint issues\n$ yarn test # run all tests in all projects\n\n```\n\n#### A note on `git blame`\n\nBecause lint configurations can occasionally evolve in a way that hits many\nfiles in the repository at once and obscures the functional blame readout for\nfiles, this repository has a `.git-blame-ignore-revs` file. This file can be\nused to run `git blame` while skipping over the revisions it lists, as\ndescribed in [the Pro Git book\nreference](https://www.git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt)\nand [this Moxio blog\npost](https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame).\n\nTo make use of this, you can do one of the following:\n\n- Run `git config --global blame.ignoreRevsFile .git-blame-ignore-revs` to\n  configure git to globally look for such a file. The filename is relatively\n  standard across projects, so this should save time for other projects that\n  use a similar setup.\n- Run `git config blame.ignoreRevsFile .git-blame-ignore-revs` to configure\n  your local checkout to always ignore these files.\n- Add `--ignore-revs-file .git-blame-ignore-revs` to your `git blame`\n  invocation to ignore the file one time.\n\nThe GitHub UI does not yet ignore these commits, though there is a\n[community thread requesting the\nfeature](https://github.community/t/support-ignore-revs-file-in-githubs-blame-view/3256).\nIn the meantime, the GitHub blame UI does allow you to zoom to the previous\nround of changes on a given line, which relieves much of the annoyance; see\n[the GitHub blame docs for\nmore](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file).\n\n## Architecture\n\nHere is a light architecture diagram describing the relationship between\nservices (in the API package) and the interface and browser notifications:\n\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐\n│                                                                                                     │\n│   ____                  _                                                                           │\n│  / ___|  ___ _ ____   _(_) ___ ___  ___                                                             │\n│  \\___ \\ / _ \\ '__\\ \\ / / |/ __/ _ \\/ __|                                       ┌────────────────────┼──┐\n│   ___) |  __/ |   \\ V /| | (_|  __/\\__ \\                                       │                    │  │\n│  |____/ \\___|_|    \\_/ |_|\\___\\___||___/                                       │                    │  │   ┌─────────────────┐\n│                                                                     Chain                           │  │   │External Services│\n│                                                                     - Blocks      ━━━━━━━━━━━━┓     │  │   │                 │\n│                 ┌────subscribe (incoming or outgoing tx status)───▶ - Transactions            ┃     │  │   │  Local node     │\n│                 │                                                                             ┃     │  │   │                 │\n│                 │                                                                             ┃     │  │   │  Alchemy        │\n│                 │                                                                             ┃     │  ├───▶                 │\n│                 │                                                    Indexing                 ┃     │  │   │  BlockNative    │\n│                 │                                                    - Accounts               ┃     │  │   │                 │\n│                 │                                                    - ERC-20 balances    ━━━━╋─────┼──┘   │  CoinGecko      │\n│                 ├───subscribe (eg balance changes), get balances───▶ - ERC-721 ownership      ┃     │      │                 │\n│                 │                                                    - Governance proposals   ┃     │      │                 │\n│                 │                                                    - On-chain prices        ┃     │      └─────────────────┘\n│                 │                                                                             ┃     │\n│                 │                                                                             ┃     │      ┌────────────────┐\n│                 │                                                   Internal Signer           ┃     │      │                │\n│                 ├──────list accounts, sign tx, sign message───────▶ - Native  ────────────────╋─────┼──────▶   Extension    │\n│                 │                                                   - Remote                  ┃     │      │  Storage API   │\n│      ┌──────────┴──────────┐                                                                  ┃     │      │                │\n│      │                     │                                                                  ┃     │      └────────────────┘\n│      │                     │                                                                  ┃     │\n│      │     Wallet API      │──────┐                                 Preferences  ━━━━━━━━━━━━━┫     │\n│      │                     │      │                                                           ┃     │      ┌────────────────┐\n│      │                     │      │                                                           ┃     │      │                │\n│      └──────────▲──────────┘      │                                 Notifications             ┃     │      │                │\n│                 │                 │                                 - Ephemeral               ┣━━━━━╋━━━━━━▶   IndexedDB    │\n│                 │                 └──────pull and subscribe───────▶ - Application      ━━━━━━━┛     │      │                │\n│                 │                                                   - Security-critical             │      │                │\n│             subscribe                                                          │                    │      └────────────────┘\n│              and get                                                           │                    │\n│                 │                                                              │                    │\n│                 │                                                            push                   │\n│                 │                                                              │                    │\n└─────────────────▼──────────────────────────────────────────────────────────────┼────────────────────┘\n┌──────────────────────────────────┐                             ┌───────────────▼───────────────┐\n│                                  │                             │                               │\n│                                  │                             │                               │\n│         Wallet interface         │                             │     Browser notifications     │\n│                                  │                             │                               │\n│                                  │                             │                               │\n└──────────────────────────────────┘                             └───────────────────────────────┘\n                   ┌───────────────┐\n                   │               │\n                   │ Internal dApp │\n                   │               │\n                   └───────────────┘\n                   ┌──────┐ ┌──────┐\n                   │ Earn │ │ Swap │\n                   └──────┘ └──────┘\n```\n\n## File Structure\n\nExtension content lives directly under the root directory alongside\nproject-level configuration and utilities, including GitHub-specific\nfunctionality in `.github`. Extension content should be minimal, and\nlargely simply glue together UI and wallet code. Manifest information\nis managed in the `manifest/` subdirectory as described below.\n\nHere is a light guide to the directory structure:\n\n```\n.github/ # GitHub-specific tooling\n\npackage.json      # private extension package\nwebpack.config.js # Webpack build for extension\n\nsrc/ # extension source files\n  background.js # entry file for the background extension script; should be\n                # minimal and call in to @tallyho/tally-wallet\n  ui.js         # entry file for the frontend UI; should be minimal and bind\n                # the functionality in @tallyho/tally-ui\n\ndist/ # output directory for builds\n  brave/   # browser-specific\n  chrome/  # build\n  edge/    # directories\n  firefox/\n  brave.zip  # browser-specific\n  chrome.zip # production\n  edge.zip   # bundles\n  firefox.zip\n\nbuild-utils/ # build-related helpers, used in webpack.config.js\n  *.js\ndev-utils/          # dev-mode helpers for the extension\n  extension-reload.js # LiveReload support for the extension.\nmanifest/         # extension manifest data\n  manifest.json             # common manifest data for all browsers\n  manifest.chrome.json      # manifest adjustments for Chrome\n  manifest.dev.json         # manifest adjustments for dev environment\n  manifest.firefox.dev.json # manifest adjustments for Firefox in dev\n\nbackground/ # @tallyho/tally-background package with trusted wallet core\n  package.json\n\nui/ # @tallyho/tally-ui package\n  package.json\n```\n\n## Firefox store build\n\nFirefox requires to upload source code if minifier is used and to be able to compile identical output to the uploaded package. Our builds are environment dependent at the moment because of the minification and source map process. Long term solution will be to upgrade our build process to be able to produce identical file assets, but until then we use Docker.\n\n1. Install and setup container manger, like at [nerdctl](https://github.com/containerd/nerdctl),[podman](https://podman.io/) or [docker](https://www.docker.com/)\n2. Clone git repository\n\n```sh\ngit clone https://github.com:tallycash/extension.git tallyho-firefox\n```\n\n3. Change the directory\n\n```sh\ncd tallyho-firefox\ngit checkout tags/latest_release-tag\n```\n\n4. Fill the production keys `.env.prod` file\n\n5. Run build script\n\n```sh\n./firefox-build.sh\n```\n\n6. Archive it\n\n```sh\nzip -r tallyho-firefox.zip dist/firefox\n```\n\n7. You can delete everything if you want except for the archive\n\n## Localization\n\nTaho currently only supports English as the default language. We distill english strings to [\\_locales](https://github.com/tallycash/extension/blob/main/ui/_locales/en/messages.json) to prepare for localization.\n\nFor other languages, we will use language code defined in [Support locales](https://developer.chrome.com/docs/webstore/i18n/#choosing-locales-to-support). We will use [weblate](https://hosted.weblate.org/projects/tallycash/extension/) for crowd translation, and will commit back to the github periodically after these translations are QA'ed.\n\n\u003ca href=\"https://hosted.weblate.org/engage/tallycash/\"\u003e\n\u003cimg src=\"https://hosted.weblate.org/widgets/tallycash/-/svg-badge.svg\" alt=\"Translation status\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahowallet%2Fextension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahowallet%2Fextension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahowallet%2Fextension/lists"}