{"id":15676892,"url":"https://github.com/shadowy-pycoder/bitcoin_message_tool","last_synced_at":"2025-06-24T06:03:00.390Z","repository":{"id":166037245,"uuid":"594040614","full_name":"shadowy-pycoder/bitcoin_message_tool","owner":"shadowy-pycoder","description":"Bitcoin message signing/verification tool","archived":false,"fork":false,"pushed_at":"2024-02-28T03:18:55.000Z","size":110,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T07:55:07.597Z","etag":null,"topics":["bitcoin","cli-app","ecdsa","ecdsa-signature"],"latest_commit_sha":null,"homepage":"","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/shadowy-pycoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-27T13:11:05.000Z","updated_at":"2025-01-04T20:04:15.000Z","dependencies_parsed_at":"2024-02-28T04:27:12.585Z","dependency_job_id":"c7dd89c7-d060-4501-a18c-ee51c4067fce","html_url":"https://github.com/shadowy-pycoder/bitcoin_message_tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowy-pycoder%2Fbitcoin_message_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowy-pycoder%2Fbitcoin_message_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowy-pycoder%2Fbitcoin_message_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowy-pycoder%2Fbitcoin_message_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowy-pycoder","download_url":"https://codeload.github.com/shadowy-pycoder/bitcoin_message_tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252791587,"owners_count":21804802,"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","cli-app","ecdsa","ecdsa-signature"],"created_at":"2024-10-03T16:06:56.572Z","updated_at":"2025-05-07T00:34:47.539Z","avatar_url":"https://github.com/shadowy-pycoder.png","language":"Python","readme":"Bitcoin Message Tool\n======\n\nBitcoin Message Tool\n\nA lightweight CLI tool for signing and verification of bitcoin messages.\nBitcoin message is the most straightforward and natural way to prove ownership over\na given address without revealing any confidential information.\n\nThis tool closely follows specification described in BIP137:\n\nPlease note that \"since this format includes P2PKH keys, it is backwards compatible, \nbut keep in mind some software has checks for ranges of headers and will report the newer \nsegwit header types as errors.\"\n\nMore info: https://github.com/bitcoin/bips/blob/master/bip-0137.mediawiki\n\nInstallation\n------------\n\nTo install with pip, run:\n\n    pip install bitcoin-message-tool\n\nQuickstart Guide\n----------------\n\n    Usage:\n\n    python -m bitcoin_message_tool -h\n\n    or\n\n    python bmt.py -h\n    usage: python3 bmt.py [-h] {sign,verify} ...\n\n    Bitcoin message signing/verification tool\n\n    positional arguments:\n    {sign,verify}\n\n    options:\n    -h, --help     show this help message and exit\n\nMessage signing:\n\n    python bmt.py sign -h\n    usage: python3 \u003capplication\u003e sign [-h] -p -a {p2pkh,p2wpkh-p2sh,p2wpkh} -m [MESSAGE ...] [-d] [-e] [-v]\n\n    options:\n    -h, --help            show this help message and exit\n\n    Sign messsage:\n    -p, --privkey         private key in wallet import format (WIF)\n    -a {p2pkh,p2wpkh-p2sh,p2wpkh}, --addr_type {p2pkh,p2wpkh-p2sh,p2wpkh}\n                            type of bitcoin address\n    -m [MESSAGE ...], --message [MESSAGE ...]\n                            Message to sign\n    -d, --deterministic   sign deterministtically (RFC6979)\n    -e, --electrum        create Electrum-like signature\n    -v, --verbose         print prettified message\n\nExample 1:\nNon-deterministic signature for compressed private key and p2pkh address\n\n    $python bmt.py sign -p -a p2pkh -m ECDSA is the most fun I have ever experienced\n\n    PrivateKey(WIF): \u003cinsert private key here\u003e\n\nOutput:\n\n    Bitcoin address: 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL\n    Message: ECDSA is the most fun I have ever experienced\n    Signature: IBuc5GXSJCr6m7KevsBAoCiX8ToOjW2CDZMr6PCEbiHwQJ237LZTj/REbDHI1/yelY6uBWEWXiOWoGnajlgvO/A=\n\nExample 2:\nDeterministic signature for compressed private key and p2pkh address\n\n    $python bmt.py sign -p -a p2pkh -m ECDSA is the most fun I have ever experienced -d\n\n    PrivateKey(WIF): \u003cinsert private key here\u003e\n\nOutput:\n\n    Bitcoin address: 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL\n    Message: ECDSA is the most fun I have ever experienced\n    Signature: HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLapfa43JjyrRqdSA0pxs=\n\nExample 3:\nDeterministic signature for compressed private key and p2pkh address (verbose mode)\n\n    $python bmt.py sign -p -a p2pkh -m ECDSA is the most fun I have ever experienced -d -v\n\n    PrivateKey(WIF): \u003cinsert private key here\u003e\n\nOutput:\n\n    -----BEGIN BITCOIN SIGNED MESSAGE-----\n    ECDSA is the most fun I have ever experienced\n    -----BEGIN BITCOIN SIGNATURE-----\n    175A5YsPUdM71mnNCC3i8faxxYJgBonjWL\n\n    HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLapfa43JjyrRqdSA0pxs=\n    -----END BITCOIN SIGNATURE-----\n\nExample 4:\nUncompressed private keys can't produce addresses other than 'p2pkh'\n\n    python bmt.py sign -p -m ECDSA is the most fun I have ever experienced -a 'p2wpkh'  -d -v\n\n    PrivateKey(WIF): \u003cinsert private key here\u003e\n\nOutput:\n\n    Traceback (most recent call last):\n    ...\n    PrivateKeyError: ('Need WIF-compressed private key for this address type:', 'p2wpkh')\n\nMessage verification:\n\n    python bmt.py verify -h\n    usage: python3 \u003capplication\u003e verify [-h] -a ADDRESS -m [MESSAGE ...] -s SIGNATURE [-e] [-v] [-r]\n\n    options:\n    -h, --help            show this help message and exit\n\n    Verify messsage:\n    -a ADDRESS, --address ADDRESS\n                            specify bitcoin address\n    -m [MESSAGE ...], --message [MESSAGE ...]\n                            Message to verify\n    -s SIGNATURE, --signature SIGNATURE\n                            bitcoin signature in base64 format\n    -e, --electrum        verify Electrum-like signature\n    -v, --verbose         print full message\n    -r, --recpub          recover public key\n\nExample 1:\nStandard message verification\n\n    python bmt.py verify -a 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL \\\n    \u003e -m ECDSA is the most fun I have ever experienced \\\n    \u003e -s HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLapfa43JjyrRqdSA0pxs=\n\nOutput:\n\n    True\n\nExample 2:\nMessage verification in verbose mode\n\n    python bmt.py verify -a 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL \\\n    \u003e -m ECDSA is the most fun I have ever experienced \\\n    \u003e -s HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLapfa43JjyrRqdSA0pxs= \\\n    \u003e -v\n\nOutput:\n\n    True\n    Message verified to be from 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL\n\nExample 3:\nDisplay a recovered public key\n\n    python bmt.py verify -a 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL \\\n    \u003e -m ECDSA is the most fun I have ever experienced \\\n    \u003e -s HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLapfa43JjyrRqdSA0pxs= \\\n    \u003e --recpub\n\nOutput:\n\n    True\n    024aeaf55040fa16de37303d13ca1dde85f4ca9baa36e2963a27a1c0c1165fe2b1\n\nExample 4:\nError message\n\n    python bmt.py verify -a 175A5YsPUdM71mnNCC3i8faxxYJgBonjWL \\\n    \u003e -m ECDSA is the most fun I have ever experienced \\\n    \u003e -s HyiLDcQQ1p2bKmyqM0e5oIBQtKSZds4kJQ+VbZWpr0kYA6Qkam2MlUeTr+lm1teUGHuLaffa43Jj= -v -r \\\n\nOutput:\n\n    Traceback (most recent call last):\n    ...\n    SignatureError: ('Signature must be 65 bytes long:', 57)\n\nContribute\n----------\n\nIf you'd like to contribute to bitcoin_message_signer, check out https://github.com/shadowy-pycoder/bitcoin_message_tool\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowy-pycoder%2Fbitcoin_message_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowy-pycoder%2Fbitcoin_message_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowy-pycoder%2Fbitcoin_message_tool/lists"}