JasonSato (OP)
Newbie
Offline
Activity: 11
Merit: 4
|
|
May 01, 2022, 05:01:43 PM |
|
I've tested almost all bitcoin wallets in Windows. Is it possible to make a transaction with a python script?
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
BlackHatCoiner
Legendary
Online
Activity: 1470
Merit: 7064
Farewell, Leo
|
|
May 01, 2022, 05:34:44 PM |
|
What do the wallets have to do with this? Have you tried python-bitcointx[1] or pybitcointools[2]? I just did a search and these came up. And I know little about python. [1] https://pypi.org/project/python-bitcointx/[2] https://bitcoin.stackexchange.com/questions/46735/how-can-i-sign-transaction-hex-with-python-libraryIf you want my recommendation, use bitcoin.stackexchange.com a lot. It's useful for bitcoin related technical stuff.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
Husires
Legendary
Offline
Activity: 1554
Merit: 1278
|
|
May 01, 2022, 05:54:53 PM |
|
Yes, you need to Install bitcoin python library pip install bitcoin then generate your private key using my_key= = random_key() then your public key using my_pubkey= privtopub(my_private_key) then your address my_address=pubtoaddr(my_public_key) then you can send it using tx_hex = make_transaction( inputs=[[your_address, your_private_key]], to='receiver address', amount=BTC, miner_fee=0.0001 ) my_key= = random_key() my_pubkey= privtopub(my_private_key) my_address=pubtoaddr(my_public_key) tx_hex = make_transaction( inputs=[[my_address, my_key]], to='receiver address', amount=BTC, miner_fee=0.0001 )
it is better to do it with test net follow this https://dev.to/nownodes/how-to-make-a-bitcoin-transaction-with-python-54k4
|
|
|
|
JasonSato (OP)
Newbie
Offline
Activity: 11
Merit: 4
|
|
May 01, 2022, 06:12:22 PM |
|
Thanks for the tips Honestly, I don't fully trust those software wallets. I want to know how to use a python script to make a tx with my private key and address.
|
|
|
|
BlackHatCoiner
Legendary
Online
Activity: 1470
Merit: 7064
Farewell, Leo
|
|
May 01, 2022, 06:21:21 PM |
|
Honestly, I don't fully trust those software wallets. Which ones and why? Every wallet from bitcoin.org is open-source; if you want to verify the code, then so be it. If you don't want or can't understand it, then you'll have to take everyone's word for it. It doesn't make sense to not trust reputable open-source software. That's bitcoin in the end.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
JasonSato (OP)
Newbie
Offline
Activity: 11
Merit: 4
|
|
May 01, 2022, 06:49:18 PM |
|
Which ones and why? Every wallet from bitcoin.org is open-source; if you want to verify the code, then so be it. If you don't want or can't understand it, then you'll have to take everyone's word for it. It doesn't make sense to not trust reputable open-source software. That's bitcoin in the end. I didn't mean that hot wallets are not reliable at all! Somehow I want to make my transactions in my own way
|
|
|
|
garlonicon
|
|
May 01, 2022, 07:42:58 PM |
|
If you know what are you doing, then of course you can. You can write a transaction even in a notepad, use custom scripts, and make your own stuff. It is an incredible world with a lot of treasures and puzzles, also you can do things that are hard or impossible in typical GUI wallets, for example transaction mining, see 000000000fdf0c619cd8e0d512c7e2c0da5a5808e60f12f1e0d01522d2986a51.
|
Hold your horses before deploying blockchain-related things. You don't want to deploy SHA-1 collision without deploying hardened SHA-1. Once you reveal some code, and make it Open Source, there is no "undo" button. Once you share some idea, there is no way to erase it from reader's memory.
|
|
|
|
JasonSato (OP)
Newbie
Offline
Activity: 11
Merit: 4
|
|
May 02, 2022, 10:16:46 AM |
|
Hi Thanks for the tip. I'm looking for the best script to sign and broadcast a tx with python.
|
|
|
|
|
NotATether
Legendary
Offline
Activity: 1554
Merit: 6532
bitcoincleanup.com / bitmixlist.org
|
|
May 05, 2022, 11:02:37 AM |
|
~ You can write a transaction even in a notepad ~
Not that it's particularly advisable. A hex editor is probably more suitable than a text editor given that BTC transactions are byte-oriented and not some markup language.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
n0nce
|
|
May 07, 2022, 05:17:23 PM |
|
Thanks for the tips Honestly, I don't fully trust those software wallets. I want to know how to use a python script to make a tx with my private key and address. Oh this is a very bad idea. By typing your seed phrase or private key into a Python script, it could be stolen by an attacker (now or in the future). Your backup software might create a file system backup without you noticing or you might use an HDD from which deleted files can be recovered even a long time in the future, so writing a seed to disk is always highly discouraged (by me). And your secondary risk will be loss of funds due to an error in your code. The open-source wallets BlackHatCoiner linked for you, have been reviewed, tested and improved over years by hundreds of developers; I don't see why they would be worse than your own custom script. Especially if you don't write everything by yourself, but trust one of the libraries linked above, you can just as well use a tried-and-tested open-source wallet (that most probably uses the exact same library). For educational purposes, I get it and would recommend the same things that the others recommended above. But since you specifically mentioned you intend to use this with real mainnet funds, I wanted to type out a little disclaimer.
|
|
|
|
DireWolfM14
Copper Member
Legendary
Offline
Activity: 2142
Merit: 4224
Join the world-leading crypto sportsbook NOW!
|
|
July 12, 2022, 03:58:23 AM |
|
Honestly, I don't fully trust those software wallets.
By running pip install bitcoin you're installing a software wallet, it's just lighter and runs with python. That's how bitcoin works, you need software. Unless you write your own software wallet, you'll have to trust someone else's.
|
|
|
|
NotATether
Legendary
Offline
Activity: 1554
Merit: 6532
bitcoincleanup.com / bitmixlist.org
|
|
July 12, 2022, 04:32:53 AM |
|
Unless you write your own software wallet, you'll have to trust someone else's.
This is really a "don't try this at home" kind of thing because there are so many bugs that can possibly creep inside a DIY wallet, that if you got no time to fix them, they could be exploited against other users who happen to trust your wallet.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
DireWolfM14
Copper Member
Legendary
Offline
Activity: 2142
Merit: 4224
Join the world-leading crypto sportsbook NOW!
|
|
July 12, 2022, 08:52:33 PM |
|
Unless you write your own software wallet, you'll have to trust someone else's.
This is really a "don't try this at home" kind of thing because there are so many bugs that can possibly creep inside a DIY wallet, that if you got no time to fix them, they could be exploited against other users who happen to trust your wallet. Whatchu talkin' 'bout? Really, what can go wrong?
All kidding aside, of course I was being facetious. I don't recommend you attempt write your own wallet software unless you are a competent programmer working as a member of competent team. Even the best of us can overlook simple issues that can cause major damage.
|
|
|
|
n0nce
|
|
July 22, 2022, 08:40:39 PM |
|
Honestly, I don't fully trust those software wallets.
By running pip install bitcoin you're installing a software wallet, it's just lighter and runs with python. That's how bitcoin works, you need software. Unless you write your own software wallet, you'll have to trust someone else's. I guess for eliminating all trust and only needing to sign transactions, you could write a very small subsection of what I'd call a software wallet all from scratch. I'd start with a reference of the transaction format: https://en.bitcoin.it/wiki/TransactionCreate it according to spec and then submit it to the mempool of your node using bitcoin-cli sendrawtransaction. In case you do trust Bitcoin Core, another idea would be to just issue calls to bitcoin-cli from Python ( os.popen()). Or you could use Bitcoin's RPC interface. https://stackoverflow.com/questions/42183776/bitcoin-json-rpc-with-python-requests-module
|
|
|
|
|