Bitcoin Forum
November 07, 2024, 09:02:27 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to spend from a segwit address in Bitcoin Core?  (Read 210 times)
Forsyth Jones (OP)
Hero Member
*****
Offline Offline

Activity: 1344
Merit: 920


Duelbits - Play for Free | Win for Real


View Profile WWW
January 08, 2018, 06:13:09 PM
Last edit: January 08, 2018, 06:25:40 PM by #BitcoinCore
Merited by ABCbits (1)
 #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?

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
January 08, 2018, 07:54:22 PM
Merited by ABCbits (1)
 #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: 1232
Merit: 738


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

Forsyth Jones (OP)
Hero Member
*****
Offline Offline

Activity: 1344
Merit: 920


Duelbits - Play for Free | Win for Real


View Profile WWW
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...

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
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!