Create Bitcoin transactions with embedded OP_RETURN messages. This tool allows you to permanently store text messages on the Bitcoin blockchain while sending BTC to any address.
- β OP_RETURN Message Embedding - Store up to 80 bytes of data on-chain
- β Interactive UI - User-friendly interface in Google Colab
- β CLI Version - Command-line interface for desktop use
- β Automatic Change Calculation - Returns remaining funds to sender
- β Testnet & Mainnet Support - Test safely before going live
- β Transaction Export - Save RawTX to file for broadcasting
- β Real-time Message Length Validation - Prevents errors before creation
- Installation- Usage - Google Colab Version - Python CLI Version- Broadcasting Transaction- Requirements- Examples- Security- Contributing- License---
- Python 3.6 or higher
- Gitgit clone https://github.com/zoeir/Bitcoin-Message-Transaction.git
cd Bitcoin-Message-Transactionpip install ipywidgets zmq urllib3 requests pycryptodomeπ Google Colab Version
https://colab.research.google.com/drive/1tw9y8FXSwaEYYfNnC7jwiqTdVatUiqIV
Perfect for users who want a graphical interface without installing anything locally.
Navigate to Google Colab
Click File β New Notebook
Copy and paste this code into the first cell:
!pip install ipywidgets zmq urllib3 requests pycryptodome
!git clone https://github.com/zoeir/Bitcoin-Message-Transaction.git > /dev/null 2>&1
%cd Bitcoin-Message-TransactionRun the cell (press Shift + Enter)
In a new cell, copy the entire content of colab.py and run it.
An interactive form will appear with the following fields:
| Field | Description | Example |
|-------|-------------|---------|
| π **Private Key (WIF)** | Your Bitcoin private key in WIF format | `5J64pq77XjeacCezwmAr2V1s7snvvJkuAz8sENxw7xCkikceV6e` |
| π **UTXO TXID** | Transaction ID containing your funds | `2a29fdb4e188f827da3c3175856b3ed95819b323bb303a46b8036534e78c76db` |
| π’ **UTXO Index** | Output index (usually 0) | `0` |
| π° **UTXO Value** | Amount in satoshi | `30352330` |
| πΈ **Transaction Fee** | Network fee (500-10000 sat) | `1000` |
| π€ **Send Amount** | Amount to send in satoshi | `600` |
| π **Recipient Address** | Destination Bitcoin address | `1LdRcdxfbSnmCYYNdeYpUnztiYzVfBEQeC` |
| π¬ **Message** | Your text message (max 80 bytes) | `Hello Bitcoin!` |
| π§ͺ **Use Testnet** | Enable for testing | βοΈ Checked |Click "Create Bitcoin Transaction" button
The output will display:
- β Your BTC Address- β Recipient Address - β Send Amount- β Transaction Fee- β Change Returned- β OP_RETURN Message- β RawTX (Hex) β Copy this for broadcasting---
For users who prefer command-line interface on their desktop/laptop.
cd Bitcoin-Message-Transactionpython3 main.pyThe script will ask for:
=================================
BITCOIN MESSAGE TRANSACTION CREATOR
Enter your Private Key (WIF): 5J64pq77Xjeac...
--- UTXO Information ---
Enter UTXO TXID: 2a29fdb4e188f827...
Enter UTXO Index (default 0): 0
Enter UTXO Value (satoshi): 30352330
--- Transaction Details ---
Enter Recipient Address: 1LdRcdxfbSnmCYYNdeYpUnztiYzVfBEQeC
Enter Send Amount (satoshi): 600
Enter Transaction Fee (satoshi, default 1000): 1000
--- OP_RETURN Message ---
Enter your message (up to 80 bytes): Hello Bitcoin!
--- Network Selection ---
Use Testnet? (y/n, default y): y============================================================
BITCOIN TRANSACTION (OP_RETURN)
Your BTC Address: 14NWDXkQwcGN1Pd9fboL8npVynD5SfyJAE
Recipient Address: 1LdRcdxfbSnmCYYNdeYpUnztiYzVfBEQeC
Send Amount: 600 satoshi
Transaction Fee: 1000 satoshi
Change Returned: 30350730 satoshi
OP_RETURN Message: Hello Bitcoin!
RawTX (Hex):
0100000001db768ce7346503b8463a30bb23b31958d93e6b8575313cda..
============================================================β Transaction saved to file: RawTX_OP_RETURN.txt
After creating your transaction, broadcast it using any of these services:
| Service | URL |
|---|---|
| π Bitcoin Message | bitcoinmessage.ru |
Steps:
- Copy your RawTX (Hex) from the output
- Visit any broadcast service above
- Paste the RawTX into the form
- Click "Broadcast" or "Push"
- Wait for confirmation
pycryptodome- Cryptographic libraryipywidgets(Colab only) - Interactive widgetsIPython(Colab only) - Display utilities
This tool requires modules from Bitcoin-Message-Transaction:
secp256k1.py- Elliptic curve operationssighash.py- Transaction signing
Message: "Hello from the blockchain!" Send Amount: 1000 satoshi Fee: 1000 satoshi
Message: "Document hash: 5d41402abc4b2a76b9719d911017c592" Send Amount: 546 satoshi (dust limit) Fee: 2000 satoshi
Message: "github.com/zoeir/Bitcoin-Message-Transaction/ - Verified 2025" Send Amount: 600 satoshi Fee: 1500 satoshi
- Never share your private key with anyone
- Test on Testnet first before using real BTC
- Double-check addresses before broadcasting
- Backup your private keys securely offline
- Use secure connections when broadcasting transactions
- OP_RETURN data is permanent and cannot be deleted
- β Use testnet for testing
- β Verify recipient address multiple times
- β Start with small amounts
- β Keep private keys in encrypted storage
- β Never commit private keys to Git
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/zoeir/Bitcoin-Message-Transaction.git
cd Bitcoin-Message-Transaction
pip install -r requirements.txtPlease use the GitHub Issues page to report bugs or request features.
---## π LicenseThis project is licensed under the MIT License - see the LICENSE file for details. ---## π Acknowledgments- Bitcoin Core developers
- Bitcoin-Message-Transaction repository
- Python cryptography community---## π Support- π Website: bitcoinmessage.ru
- π§ Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions---## β Star HistoryIf you find this project useful, please consider giving it a star! β---Made with β€οΈ for the Bitcoin community---## πΈ Screenshots
