Bitcoin Forum
April 27, 2024, 11:19:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Initiate a transaction from a PK  (Read 151 times)
Lacrim (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 7


View Profile
April 04, 2022, 01:21:11 PM
 #1

Hi. Is there any library or even third party API that allows to initiate a transaction and send funds just by using private keys? I want a lightweight solution that doesn't require running a full node or downloading the blockchain.
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714216783
Hero Member
*
Offline Offline

Posts: 1714216783

View Profile Personal Message (Offline)

Ignore
1714216783
Reply with quote  #2

1714216783
Report to moderator
1714216783
Hero Member
*
Offline Offline

Posts: 1714216783

View Profile Personal Message (Offline)

Ignore
1714216783
Reply with quote  #2

1714216783
Report to moderator
1714216783
Hero Member
*
Offline Offline

Posts: 1714216783

View Profile Personal Message (Offline)

Ignore
1714216783
Reply with quote  #2

1714216783
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 04, 2022, 01:25:46 PM
Merited by pooya87 (2), ABCbits (1)
 #2

If you value security, I'd suggest downloading a wallet like electrum (from electrum.org). The initial sync of a new wallet can take a few minutes and a few MB but it's a lot faster than bitcoin core.

There are websites too that can be used for signing transactions with private keys but you'd need good browser security and a good understanding of bitcoin to use them, like coinb.in
NeuroticFish
Legendary
*
Offline Offline

Activity: 3654
Merit: 6366


Looking for campaign manager? Contact icopress!


View Profile
April 04, 2022, 01:32:24 PM
 #3

Hi. Is there any library or even third party API that allows to initiate a transaction and send funds just by using private keys? I want a lightweight solution that doesn't require running a full node or downloading the blockchain.

I've seen today a topic about an open source web wallet that doesn't need local blockchain: https://bitcointalk.org/index.php?topic=5392903.0
It does calls to various servers and block explorers to do the job, so privacy is zero.

It's a HD wallet, so it works based on a seed, not PK. But it's open source; I don't know, it may be close enough to what you need, and if not, at least it can be a source of inspiration.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
stanner.austin
Member
**
Offline Offline

Activity: 67
Merit: 53


View Profile
April 04, 2022, 01:47:38 PM
 #4

Very simple with python
example code.

Code:
#!python3

from bit import Key
from bit.format import bytes_to_wif

#for compressed private key address.
compressedkey = Key.from_hex("hex key data") # or from int compressedkey = Key.from_int(intdata)
compressedkey.create_transaction([], leftover='addressofyourchoicetorecieveall')

#for uncompressed private key address.
uncompressedkey = Key(bytes_to_wif(bytes.fromhex("hexdata"),compressed=False)) # or from int uncompressedkey = Key(bytes_to_wif(Key.from_int(intdata),compressed=False))
uncompressedkey.create_transaction([], leftover='addressofyourchoicetorecieveall')

More details at https://ofek.dev/bit/
LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16557


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
April 04, 2022, 02:40:07 PM
Merited by pooya87 (2)
 #5

If you value security, I'd suggest downloading a wallet like electrum (from electrum.org).
To avoid exposing your private key to an online computer, this is much safer:
I was considering Electrum, only downside is that when creating a wallet, seed creation is exposed
Online:
Install Electrum on your PC.
Import your address to create a watch-only wallet.
Preview the transaction, Copy the unsigned transaction. Put it on a USB stick.

Offline and running without hard drive storage:
Get a Linux LIVE DVD. Use Knoppix or Tails for instance, or any other distribution that comes with Electrum pre-installed.
Unplug your internet cable. Close the curtains. Reboot your computer and start up from that DVD. Don't enter any wireless connection password. Keep it offline.
Start Electrum. Import your private key.
Copy your unsigned transaction from the USB stick, load it into Electrum.
CHECK the transaction in Electrum. Check the fees, check the amount, check all destination addresses (character by character).
If all is okay, sign the transaction. Copy it back to your USB stick.
Turn off the computer. That wipes the Live LINUX from memory and all traces are gone.

Online:
Use your normal online Electrum to (check again and) broadcast the transaction.

Bonus:
After moving all your Bitcoin, and once the transaction confirmed, check if you own Forkcoins.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7407


Crypto Swap Exchange


View Profile
April 05, 2022, 11:34:19 AM
Merited by pooya87 (2)
 #6

OP, do you mind sharing why exactly you need create to create a transaction from PK using library/3rd party API? It sounds like XY problem and we could suggest better solution if you tell what's your goal.

If you value security, I'd suggest downloading a wallet like electrum (from electrum.org). The initial sync of a new wallet can take a few minutes and a few MB but it's a lot faster than bitcoin core.

Electrum also support CLI[1] if OP use-case involve server which doesn't have GUI. The documentation doesn't mention all command though, so you need to run electrum help or check the source code[2]

[1] https://electrum.readthedocs.io/en/latest/cmdline.html
[2] https://github.com/spesmilo/electrum/blob/master/electrum/commands.py

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!