Bitcoin Forum
April 01, 2026, 09:20:00 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the proper way?  (Read 263 times)
junior_clk (OP)
Jr. Member
*
Offline Offline

Activity: 31
Merit: 2


View Profile
June 25, 2025, 07:12:28 AM
 #1

Hi
I got a start9 full server with electrum
A offline laptop with sparrow and a online with sparrow connection to the start9 node
And a Tresor Safe 5

I used to mine in 2011, so it is a legacy address starting with a 3  P2SH as discribed in BIP13/16? its single key
I got the 64 character private key and/or WIF
never made a transaction so I don't know the UTXO

On what laptop should I do what to make a PSBT and sweep everything to the hardware wallet?
I understand that the offline laptop is for signing

nc50lc
Legendary
*
Offline Offline

Activity: 3094
Merit: 8539


Self-proclaimed Genius


View Profile
June 26, 2025, 08:24:17 AM
Merited by ABCbits (2), mcdouglasx (2)
 #2

I used to mine in 2011, so it is a legacy address starting with a 3  P2SH as discribed in BIP13/16? its single key
I got the 64 character private key and/or WIF
never made a transaction so I don't know the UTXO
If that WIF starts with "5", "K" or "L", then it's WIF.
If you mean it's just the 64characters, the private key is hexadecimal and needs to be encoded to WIF before it can be imported to your offline machine.

For the latter, one option is to download Bitaddress source code (GitHub Link) then transfer and extract that to your offline machine,
You can start its html file using any non-dated browser.
From there, you can go to "Wallet Details" tab where you can encode your private key to WIF. (finish the 'Generating Bitcoin Address' procedure first)
You may import both compressed and uncompressed WIF to your offline wallet.

BTW, last time I checked, Sparrow doesn't support single-key import so your next best option is Electrum since you're using an Electrum server.
For that, you can follow these instructions (with screenshots): /index.php?topic=5524213.msg64885706#msg64885706
Notes: use your WIF in place of the mentioned "mini-private key"
And in the online machine, you may create a dummy wallet to be able to set your server in the network settings (green/red circle icon) before you create the imported watch-only wallet. Or launch it with -1 -s <server:port> to immediately set your own server on start.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
apogio
Legendary
*
Offline Offline

Activity: 1106
Merit: 2394


View Profile
June 27, 2025, 03:28:29 PM
 #3

BTW, last time I checked, Sparrow doesn't support single-key import so your next best option is Electrum since you're using an Electrum server.

Yes, Sparrow supports only sweeping, whereas Electrum supports importing as well. Essentially, I 'd argue that sweeping is better for maintainability, as it allows you to upgrade your address type from legacy to bech32 easily and safely.

mcdouglasx
Hero Member
*****
Offline Offline

Activity: 952
Merit: 532



View Profile WWW
June 27, 2025, 04:40:56 PM
 #4

I got the 64 character private key and/or WIF

WIF keys do not contain 64 characters, they are between 51 or 52 Base58Check characters, I suppose you have a Hexadecimal PK, I leave a script to go from a hexadecimal PK to WIF.

Code:
import hashlib

B58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def b58_encode(data: bytes) -> str:

    num = int.from_bytes(data, 'big')
    encoded = ''
    while num > 0:
        num, remainder = divmod(num, 58)
        encoded = B58_ALPHABET[remainder] + encoded

    padding = 0
    for byte in data:
        if byte == 0:
            padding += 1
        else:
            break
    return '1' * padding + encoded

def hex2wif(hex_Pk: str, compressed=True, mainnet=True) -> str:
    hex_Pk = hex_Pk.rjust(64, '0')
    prefix = b'\x80' if mainnet else b'\xEF'
    suffix = b'\x01' if compressed else b''
    payload = prefix + bytes.fromhex(hex_Pk) + suffix
    checksum = hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4]
    wif = payload + checksum
    return b58_encode(wif)

if __name__ == '__main__':
    
    Pk_HEX_str = '1'
    print('PrivateKey(hex):', "0x"+Pk_HEX_str.rjust(64, '0'))
    print('Compressed WIF:', hex2wif(Pk_HEX_str, compressed=True))
    print('Uncompressed WIF:', hex2wif(Pk_HEX_str, compressed=False))
nc50lc
Legendary
*
Offline Offline

Activity: 3094
Merit: 8539


Self-proclaimed Genius


View Profile
June 28, 2025, 04:08:49 AM
Merited by apogio (1)
 #5

BTW, last time I checked, Sparrow doesn't support single-key import so your next best option is Electrum since you're using an Electrum server.
-snip- Essentially, I 'd argue that sweeping is better for maintainability, as it allows you to upgrade your address type from legacy to bech32 easily and safely.
Very simple and easy indeed, sweep doesn't have the option to type or paste the private key offline though.

For convenience and for small amount, sweep should be good enough.
But if safety is the concern, I'd still go for cold-storage import.

On a side note, it's concerning that OP mentioned a single-key P2SH in the OP which isn't usually used by wallets. (and he's not replying)
I only know one wallet that uses single-sig P2SH that's not SegWit: Armory can generate P2SH-P2PK addresses.
Anyways, he doesn't know the UTXO so I guess he's just guessing there.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
apogio
Legendary
*
Offline Offline

Activity: 1106
Merit: 2394


View Profile
June 28, 2025, 01:11:36 PM
 #6

Very simple and easy indeed, sweep doesn't have the option to type or paste the private key offline though.

For convenience and for small amount, sweep should be good enough.
But if safety is the concern, I'd still go for cold-storage import.

I 've never actually tried it, because I was involved much later, when HD wallets were established as the go-to option.
Cold storage import is super simple. Just Electrum on an offline device and... done...

VashaUdacha777
Member
**
Offline Offline

Activity: 644
Merit: 93

_C_A_R_P_E _D_I_E_M_


View Profile WWW
June 29, 2025, 10:34:24 AM
 #7

Hello! If I understood your problem correctly !
Create a wallet on the online laptop (Sparrow, connected to node) using your legacy address.
Discover UTXOs by importing the private key or address.
Create a PSBT that sweeps all funds to your hardware wallet.
Transfer the PSBT to the offline laptop.
Sign with the private key (on offline Sparrow).
Transfer back to the online laptop and broadcast via your node.
I hope the forum will help you. Roll Eyes

████████    betpanda.io   │   ANONYMOUS & INSTANT CRYPTO CASINO    ████████
██   ♦ ♦ ♦ ♦ ♦ ♦ ♦   SLOT GAMES   ♦   SPORTS   ♦   LIVE CASINO   ♦ ♦ ♦ ♦ ♦ ♦ ♦   ██
█      Regional Sponsor of the Argentina National Team      █
nc50lc
Legendary
*
Offline Offline

Activity: 3094
Merit: 8539


Self-proclaimed Genius


View Profile
June 29, 2025, 11:32:10 AM
Merited by ABCbits (2)
 #8

Sign with the private key (on offline Sparrow).
Please expand this step.
This is important for him to know how to "sign in" with his private key in Sparrow.

Create a wallet on the online laptop (Sparrow, connected to node) using your legacy address.
This as well, you must be specific on the step that you're providing OP.
How exactly can he create a wallet using his legacy address.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
junior_clk (OP)
Jr. Member
*
Offline Offline

Activity: 31
Merit: 2


View Profile
June 30, 2025, 12:12:55 AM
 #9

about the priv key of 64 characters, I was wrong.
I used sha256 on my secret key thats 16 characters.

Did some more research the 16 characters starting with a 7 and the other 15 are capital ranging from A to Z, that I wrote down as SecretKey
and in Bitcoin 0.3.24 refers to SriptSig
That's compliant to, what seemed the most secure at the time, a java PRNG seed

When I used that "secretkey" base64 to hex it gave me a output of ECA then a few numbers CD and again a few numbers

Why I think/believe its P2SH, when that wasn't a thing in 2011
I imported the address I noted down in 2011 in bitcoin 0.29
Then I used getaddressinfo the scriptPubKey gave a914 the 40 characters that is 20 byte hash of script and ended with 87
nc50lc
Legendary
*
Offline Offline

Activity: 3094
Merit: 8539


Self-proclaimed Genius


View Profile
June 30, 2025, 04:50:32 AM
 #10

Did some more research the 16 characters starting with a 7 and the other 15 are capital ranging from A to Z, that I wrote down as SecretKey
and in Bitcoin 0.3.24 refers to SriptSig
"ScriptSig" isn't something that's only brought-up in that old version, it's in the older and the latest versions and it's not a secret key.
It's something that satisfies the condition(s) of a locking script, usually containing the signature specifically created for the particular transaction where it's included.

Anyways, since this isn't about restoring a private key, this isn't any different from your other topics then.
Since you're mistaken on the 64-character key you mentioned here, we can consider this thread [SOLVED] and just continue on your other thread where that "SecretKey" is first mentioned

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
SilverCryptoBullet
Sr. Member
****
Offline Offline

Activity: 994
Merit: 258



View Profile
June 30, 2025, 06:01:47 AM
 #11

If that WIF starts with "5", "K" or "L", then it's WIF.
If you mean it's just the 64characters, the private key is hexadecimal and needs to be encoded to WIF before it can be imported to your offline machine.
More information for OP on it.
List of address prefixes
Bitcoin keys and addresses.











██
██
██████
R


▀▀██████▄▄
████████████████
▀█████▀▀▀█████
████████▌███▐████
▄█████▄▄▄█████
████████████████
▄▄██████▀▀
LLBIT
██████
██
██
██████
██
██
██
██
██
██
██
██
██
██
██
██████
██████████████
 
 TH#1 SOLANA CASINO 
██████████████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
████████████▄
▀▀██████▀▀███
██▄▄▀▀▄▄████
████████████
██████████
███▀████████
▄▄█████████
████████████
████████████
████████████
████████████
█████████████
████████████▀
████████████▄
▀▀▀▀▀▀▀██████
████████████
███████████
██▄█████████
████▄███████
████████████
█░▀▀████████
▀▀██████████
█████▄█████
████▀▄▀████
▄▄▄▄▄▄▄██████
████████████▀
[
[
5,000+
GAMES
INSTANT
WITHDRAWALS
][
][
HUGE
   REWARDS   
VIP
PROGRAM
]
]
████
██
██
██
██
██
██
██
██
██
██
██
████
████████████████████████████████████████████████
 
PLAY NOW
 

████████████████████████████████████████████████
████
██
██
██
██
██
██
██
██
██
██
██
████
nc50lc
Legendary
*
Offline Offline

Activity: 3094
Merit: 8539


Self-proclaimed Genius


View Profile
June 30, 2025, 06:39:58 AM
 #12

If that WIF starts with "5", "K" or "L", then it's WIF.
If you mean it's just the 64characters, the private key is hexadecimal and needs to be encoded to WIF before it can be imported to your offline machine.
More information for OP on it.
There's no need for that, OP already replied (2 posts above yours) that it's not a private key but a SHA256 hash of his alleged "SecretKey".
And I've instructed him to just continue on his other thread since this thread's issue is essentially solved already with that information.

(I've asked a Mod to lock this topic since OP already created a topic regarding that elusive SecretKey: link)

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
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!