{"id":26872158,"url":"https://github.com/1200wd/bitcoinlib","last_synced_at":"2025-05-14T02:04:54.704Z","repository":{"id":38620229,"uuid":"51910101","full_name":"1200wd/bitcoinlib","owner":"1200wd","description":"The Python BitcoinLib provides developers with a wide range of tools to work with Bitcoin: manage wallets, private keys and addresses. Interact with the blockchain. And create complex transactions and scripts.","archived":false,"fork":false,"pushed_at":"2025-05-10T20:40:41.000Z","size":10912,"stargazers_count":668,"open_issues_count":19,"forks_count":225,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-10T21:30:27.844Z","etag":null,"topics":["bitcoin","bitcoin-keys-manager","bitcoin-scripts","bitcoin-transaction","bitcoin-wallet","cryptocurrency","dogecoin","library","litecoin","mnemonic","python","wallet"],"latest_commit_sha":null,"homepage":"http://bitcoinlib.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1200wd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","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":"2016-02-17T09:18:22.000Z","updated_at":"2025-05-07T01:38:02.000Z","dependencies_parsed_at":"2023-10-01T17:00:15.409Z","dependency_job_id":"8b740a76-e40f-4d70-a9af-4bf07770c2ac","html_url":"https://github.com/1200wd/bitcoinlib","commit_stats":{"total_commits":3233,"total_committers":26,"mean_commits":"124.34615384615384","dds":"0.011444478812248637","last_synced_commit":"4d270c50767a40e6719e81ac51c57c7754e6dc41"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1200wd%2Fbitcoinlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1200wd%2Fbitcoinlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1200wd%2Fbitcoinlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1200wd%2Fbitcoinlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1200wd","download_url":"https://codeload.github.com/1200wd/bitcoinlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253486443,"owners_count":21916136,"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","bitcoin-keys-manager","bitcoin-scripts","bitcoin-transaction","bitcoin-wallet","cryptocurrency","dogecoin","library","litecoin","mnemonic","python","wallet"],"created_at":"2025-03-31T08:21:21.655Z","updated_at":"2025-05-14T02:04:54.681Z","avatar_url":"https://github.com/1200wd.png","language":"Python","readme":"Python Bitcoin Library\n======================\n\nThe Python BitcoinLib is a library that provides developers with a wide range of tools to work with Bitcoin.\n\nWith BitcoinLib you can:\n - Create and manage wallets\n - Use various key-structures for your wallet such as HD (Hierarchical Deterministic) wallets following the BIP32 standard\n - Interact with the Blockchain, retrieve and decode blockchain data\n - Build, sign and verify transactions and signatures. This could be a standard segwit transactions but also multisig, nulldata or custom made transactions\n - Create, analyse and run Bitcoin scripts\n - Generate Bitcoin addresses and represent them in different address formats like P2PKH, P2SH, Bech32, etc\n - Create private keys and work with Mnemonic password phrases\n - Uses external Service providers to fetch address, transaction, utxo and blockchain data. Or connect to you local `Bitcoin core \u003chttps://bitcoinlib.readthedocs.io/en/latest/source/_static/manuals.setup-bitcoind-connection.html\u003e`_, `Bcoin \u003chttps://bitcoinlib.readthedocs.io/en/latest/source/_static/manuals.setup-bcoin.html\u003e`_ or `Blockbook \u003chttps://bitcoinlib.readthedocs.io/en/latest/source/_static/manuals.setup-blockbook.html\u003e`_ node.\n - Can be extended to support other cryptocurrencies by configuring custom parameters. At the moment Litecoin and Dogecoin are also supported.\n\n\n.. image:: https://github.com/1200wd/bitcoinlib/actions/workflows/unittests.yaml/badge.svg\n    :target: https://github.com/1200wd/bitcoinlib/actions/workflows/unittests.yaml\n    :alt: Unittests\n.. image:: https://img.shields.io/pypi/v/bitcoinlib.svg\n    :target: https://pypi.org/pypi/bitcoinlib/\n    :alt: PyPi\n.. image:: https://readthedocs.org/projects/bitcoinlib/badge/?version=latest\n    :target: http://bitcoinlib.readthedocs.io/en/latest/?badge=latest\n    :alt: RTD\n.. image:: https://coveralls.io/repos/github/1200wd/bitcoinlib/badge.svg?branch=installation-documentation-update\n    :target: https://coveralls.io/github/1200wd/bitcoinlib?branch=master\n    :alt: Coveralls\n\n\nInstall\n-------\n\nInstall required packages on Ubuntu or related Linux systems:\n\n.. code-block:: bash\n\n    $ sudo apt install build-essential python3-dev libgmp3-dev\n\nThen install using pip\n\n.. code-block:: bash\n\n    $ pip install bitcoinlib\n\nCheck out the `more detailed installation instructions \u003chttps://bitcoinlib.readthedocs.io/en/latest/source/_static/manuals.install.html\u003e`_ to read how to install on other systems or for\ntroubleshooting.\n\nIf you are using docker you can check some Dockerfiles to create images in the\n`docker \u003chttps://github.com/1200wd/bitcoinlib/tree/master/docker\u003e`_ directory.\n\nDocumentation\n-------------\n\nRead the full documentation at: http://bitcoinlib.readthedocs.io/\n\n\nExample\n-------\n\nThe bitcoin library contains a wallet implementation using SQLite3 or SQLAlchemy to import, create and manage\nkeys in a Hierarchical Deterministic way.\n\nExample: Create wallet and generate new address (key) to receive bitcoins\n\n.. code-block:: pycon\n\n   \u003e\u003e\u003e from bitcoinlib.wallets import Wallet\n   \u003e\u003e\u003e w = Wallet.create('Wallet1')\n   \u003e\u003e\u003e w.get_key().address\n   'bc1qk25wwkvz3am9smmm3372xct5s7cwf0hmnq8szj'\n\nNow send a small transaction to your wallet and use the scan() method to update transactions and UTXO's\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e w.scan()\n    \u003e\u003e\u003e w.info()  # Shows wallet information, keys, transactions and UTXO's\n\nWhen your wallet received a payment and has unspent transaction outputs, you can send bitcoins easily.\nIf successful a transaction ID is returned\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e t = w.send_to('bc1qemtr8ywkzg483g8m34ukz2l4pl3730776vzq54', '0.001 BTC', offline=False)\n    'b7feea5e7c79d4f6f343b5ca28fa2a1fcacfe9a2b7f44f3d2fd8d6c2d82c4078'\n    \u003e\u003e\u003e t.info  # Shows transaction information and send results\n\n\nMore Examples and Use Cases\n---------------------------\n\nYou can find many more examples in the `documentation \u003chttps://bitcoinlib.readthedocs.io/en/latest/\u003e`_\nfor instance about the `Wallet.create() \u003chttps://bitcoinlib.readthedocs.io/en/latest/source/bitcoinlib.wallets.html#bitcoinlib.wallets.Wallet.create\u003e`_ method.\n\nThere are many working examples on how to create wallets, specific transactions, encrypted databases, parse the\nblockchain, connect to specific service providers in the `examples directory \u003chttps://github.com/1200wd/bitcoinlib/tree/master/examples\u003e`_ in the source code of this library.\n\nSome more specific examples can be found on the `Coineva website \u003chttps://coineva.com/category/bitcoinlib.html\u003e`_.\n\nBitcoinLib is used at `Blocksmurfer Explorer \u003chttps://blocksmurfer.io/\u003e`_ and many other repositories:\nhttps://github.com/1200wd/bitcoinlib/network/dependents\n\n\nContact\n-------\n\nIf you have any questions, encounter a problem or want to share an idea, please use `Github Discussions\n\u003chttps://github.com/1200wd/bitcoinlib/discussions\u003e`_\n\n\nImplements the following Bitcoin Improvement Proposals\n------------------------------------------------------\n- Hierarchical Deterministic Wallets (BIP0032)\n- Passphrase-protected private key (BIP0038)\n- Mnemonic code for generating deterministic keys (BIP0039)\n- Purpose Field for Deterministic Wallets (BIP0043)\n- Multi-Account Hierarchy for Deterministic Wallets (BIP0044)\n- Structure for Deterministic P2SH Multisignature Wallets (BIP0045)\n- Bech32/base32 address format for native v0-16 witness outputs (BIP0173)\n- Native and P2SH nested Segregated Witness transactions (BIP0141 and BIP0143)\n- Bech32m format for v1+ witness addresses (BIP0350)\n- and many more...\n\n\nFuture / Roadmap\n----------------\n\n- Fully support timelocks\n- Support Taproot and Schnorr signatures\n- Support advanced scripts\n- Support for Trezor wallet or other hardware wallets\n- Allow to scan full blockchain\n- Integrate simple SPV client\n\n\nDisclaimer\n----------\n\nThis library is still in development, please use at your own risk and test sufficiently before using it in a\nproduction environment.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1200wd%2Fbitcoinlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1200wd%2Fbitcoinlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1200wd%2Fbitcoinlib/lists"}