{"id":13801424,"url":"https://github.com/diybitcoinhardware/embit","last_synced_at":"2025-05-13T11:31:12.686Z","repository":{"id":38339934,"uuid":"235800674","full_name":"diybitcoinhardware/embit","owner":"diybitcoinhardware","description":"A minimal bitcoin library for MicroPython and Python3 with a focus on embedded systems","archived":false,"fork":false,"pushed_at":"2025-05-06T11:49:56.000Z","size":3082,"stargazers_count":94,"open_issues_count":19,"forks_count":36,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-06T12:55:15.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://embit.rocks","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diybitcoinhardware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-23T13:29:55.000Z","updated_at":"2025-04-13T18:08:26.000Z","dependencies_parsed_at":"2023-11-10T21:25:02.438Z","dependency_job_id":"cc69243f-90bd-4f4c-ba71-cf939200853c","html_url":"https://github.com/diybitcoinhardware/embit","commit_stats":{"total_commits":178,"total_committers":9,"mean_commits":19.77777777777778,"dds":0.0674157303370787,"last_synced_commit":"4402e17e335327d0ed214e31c458d62ea95b9899"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diybitcoinhardware%2Fembit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diybitcoinhardware%2Fembit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diybitcoinhardware%2Fembit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diybitcoinhardware%2Fembit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diybitcoinhardware","download_url":"https://codeload.github.com/diybitcoinhardware/embit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253932826,"owners_count":21986456,"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":[],"created_at":"2024-08-04T00:01:22.679Z","updated_at":"2025-05-13T11:31:09.601Z","avatar_url":"https://github.com/diybitcoinhardware.png","language":"Python","readme":"# embit\n\nA minimal bitcoin library for MicroPython and Python3 with a focus on embedded systems.\n\nShould remain minimal to fit in a microcontroller. Also easy to audit.\n\nExamples can be found in [`examples/`](./examples) folder.\n\nDocumentation: https://embit.rocks/\n\nSupport the project: `bc1qd4flfrxjctls9ya244u39hd67pcprhvka723gv`\n\n# Requirements\n\n## MicroPython\n\nRequires a custom MicroPython build with extended [`hashlib`](https://github.com/diybitcoinhardware/f469-disco/tree/master/usermods/uhashlib) module and [`secp256k1`](https://github.com/diybitcoinhardware/secp256k1-embedded) bindings.\n\nTo install copy the content of `embit` folder to the board. To save some space you can remove files `embit/util/ctypes_secp256k1.py` and `embit/util/pyhashlib.py` - they are used only in Python3.\n\n## Python 3\n\nTo install run `pip3 install embit`.\n\nTo install in development mode (editable) clone and run `pip3 install -e .` from the root folder.\n\nPyPi installation includes prebuilt libraries for common platforms (win, macos, linux, raspi) - see [`src/embit/util/prebuilt/`](./src/embit/util/prebuilt/) folder. Library is built from [libsecp-zkp](https://github.com/ElementsProject/secp256k1-zkp) fork for Liquid support, but will work with pure [libsecp256k1](https://github.com/bitcoin-core/secp256k1) as well - just Liquid functionality doesn't work. If it fails to use the prebuilt or system library it will fallback to pure python implementation.\n\nIf you want to build the lib yourself, see: [Building secp256k1 for `embit`](/secp256k1/README.md).\n\n\n## Using non-English BIP39 wordlists\n[BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md) defines wordlists for:\n* English\n* Japanese\n* Korean\n* Spanish\n* Chinese (Simplified)\n* Chinese (Traditional)\n* French\n* Italian\n* Czech\n* Portuguese\n\n`embit` assumes English and does not include the other wordlists in order to keep this as slim as possible.\n\nHowever, you can override this default by providing an alternate wordlist to any of the mnemonic-handling methods:\n```\nspanish_wordlist = [\n    \"ábaco\",\n    \"abdomen\",\n    \"abeja\",\n    \"abierto\",\n    \"abogado\",\n    \"abono\",\n    \"aborto\",\n    \"abrazo\",\n    \"abrir\",\n    \"abuelo\",\n    ...\n]\n\nmnemonic_is_valid(mnemonic, wordlist=spanish_wordlist)\nmnemonic_to_seed(mnemonic, wordlist=spanish_wordlist)\nmnemonic_to_bytes(mnemonic, wordlist=spanish_wordlist)\nmnemonic_from_bytes(bytes_data, wordlist=spanish_wordlist)\n```\n\n\n# Development\n\nInstall in developer mode with dev dependencies:\n\n```sh\npip install -e .[dev]\n```\n\nInstall pre-commit hook:\n\n```sh\npre-commit install\n```\n\nRun tests with desktop python:\n\n```sh\npytest\n```\n\nRun tests with micropython:\n\n```sh\ncd tests\nmicropython ./run_tests.py\n```\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiybitcoinhardware%2Fembit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiybitcoinhardware%2Fembit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiybitcoinhardware%2Fembit/lists"}