Bitcoin Forum
November 15, 2018, 04:03:08 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to spend from a segwit address in Bitcoin Core?  (Read 59 times)
#BitcoinCore
Sr. Member
****
Offline Offline

Activity: 602
Merit: 328


✪FOXBIT | Exchange✪


View Profile
January 08, 2018, 06:13:09 PM
 #1

And if I can no longer spend the balance of a segwit address on the bitcoin core, let's say the database corrupts and I do not want to wait for the wallet to sync until the core bitcoin recognizes the segwit rule turned on August 21 (was that date even? ), how can I export the private key and redem script of the segwit address in another wallet or create a raw transaction using this information? Or I can only spend from a segwit address created in bitcoin core and I can only spend it on bitcoin core?






███████████   ▄▄███████▄▄    ▄█▄      ▄█▄   █████████▄▄   ████  ██████████████
████▀▀▀▀▀▀▀  █████████████  ▀████▄  ▄████▀  ████▀▀▀▀████  ████  ▀▀▀▀▀████▀▀▀▀▀
████        ███████████████   ▀████████▀    ████    ▄███  ████       ████
█████████   ███████████████     ██████      ███████████   ████       ████
████▀▀▀▀▀   ███████████████   ▄████████▄    ████    ▀███  ████       ████
████        ▄█████████████  ▄████▀  ▀████▄  ████▄▄▄▄████  ████       ████
████      ▄███ ▀▀██████▀▀    ▀█▀      ▀█▀   █████████▀▀   ████       ████
         ▐███▌       ▄▄▄▄
         ▐█████▄▄▄███▀  ▀█▄
          ▀██████████▄▀▀▀▀█▄
            ▀█████▀▀
██
║║
║║
║║
██
██
██
║║
║║
║║
██
██
║║
║║
║║
██
██
██
║║
║║
║║
██

▄████████████████▄
███████████▀▀▀▀███
█████████▀     ███
█████████   ██████
███████        ███
█████████   ██████
█████████   ██████
▀████████   █████▀



 █████████████████
████████▀██████████
████████   ▀███████
████████   ▄███████
████████▄██████████
 █████████████████
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542297788
Hero Member
*
Offline Offline

Posts: 1542297788

View Profile Personal Message (Offline)

Ignore
1542297788
Reply with quote  #2

1542297788
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1582
Merit: 1739


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
January 08, 2018, 07:54:22 PM
 #2

The private key is enough to determine the segwit address, although you may need to tell whatever other wallet software you choose to use to generate such a segwit address.

Thirdspace
Hero Member
*****
Offline Offline

Activity: 798
Merit: 609


Mixing reinvented for your privacy | chipmixer.com


View Profile
January 08, 2018, 11:01:21 PM
 #3

The private key is enough to determine the segwit address, although you may need to tell whatever other wallet software you choose to use to generate such a segwit address.
I was playing around with iancoleman BIP39 tool, if I choose derivation path BIP49 it generates HD wallet segwit addresses
but I don't see redeem script for any of the addresses, can you tell me how to generate redeem script based on private key
because if I want to use coinb.in to create tx, I need redeem script to retrieve the segwit address' utxo
can you point me in the right direction on this matter

#BitcoinCore
Sr. Member
****
Offline Offline

Activity: 602
Merit: 328


✪FOXBIT | Exchange✪


View Profile
January 08, 2018, 11:15:37 PM
 #4

The private key is enough to determine the segwit address, although you may need to tell whatever other wallet software you choose to use to generate such a segwit address.
I was playing around with iancoleman BIP39 tool, if I choose derivation path BIP49 it generates HD wallet segwit addresses
but I don't see redeem script for any of the addresses, can you tell me how to generate redeem script based on private key
because if I want to use coinb.in to create tx, I need redeem script to retrieve the segwit address' utxo
can you point me in the right direction on this matter
  import the private key of any bip49 address you want in the Bitcoin core v0.15.1 wallet, you will see that it will import a legacy address (starting with 1xxxx), copy the imported address, open the bitcoin core console, type: addwitnessaddress "paste-the-address-here"

You will see that the bitcoin core will return an address that starts with 3xxxxxxx which is the same one that is listed in iancoleman.io/bip39/ that starts with 3xxxx

Note that you must have the core bitcoin synchronized to add a legacy address to the segwit, both legacy and segwti addresses share the same private key...






███████████   ▄▄███████▄▄    ▄█▄      ▄█▄   █████████▄▄   ████  ██████████████
████▀▀▀▀▀▀▀  █████████████  ▀████▄  ▄████▀  ████▀▀▀▀████  ████  ▀▀▀▀▀████▀▀▀▀▀
████        ███████████████   ▀████████▀    ████    ▄███  ████       ████
█████████   ███████████████     ██████      ███████████   ████       ████
████▀▀▀▀▀   ███████████████   ▄████████▄    ████    ▀███  ████       ████
████        ▄█████████████  ▄████▀  ▀████▄  ████▄▄▄▄████  ████       ████
████      ▄███ ▀▀██████▀▀    ▀█▀      ▀█▀   █████████▀▀   ████       ████
         ▐███▌       ▄▄▄▄
         ▐█████▄▄▄███▀  ▀█▄
          ▀██████████▄▀▀▀▀█▄
            ▀█████▀▀
██
║║
║║
║║
██
██
██
║║
║║
║║
██
██
║║
║║
║║
██
██
██
║║
║║
║║
██

▄████████████████▄
███████████▀▀▀▀███
█████████▀     ███
█████████   ██████
███████        ███
█████████   ██████
█████████   ██████
▀████████   █████▀



 █████████████████
████████▀██████████
████████   ▀███████
████████   ▄███████
████████▄██████████
 █████████████████
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!