create account

클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli] by jchoy

View this thread on: hive.blogpeakd.comecency.com
· @jchoy ·
클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]
안녕하세요 스티밋 여러분!
최근 Bitcoin Core Client를 사용해 보고 있습니다.
Ubuntu Testnet에서 여러가지를 실험해보고 있었는데...
<center>![](https://steemitimages.com/DQmX37smZgrUvscZYP4nDMYfMBuMFjj66gKHkiZADB51n82/image.png)
?
![](https://steemitimages.com/DQmQ9B9kjZrTQokEkRFh6PDwKP8vRksCnMGqgDbUUBXa7ZD/image.png)
;;;;;
![](https://steemitimages.com/DQmVV5o8ra6fgB5ThKmc1N543ygk1yfMzaYdmMKbfFuTwwi/image.png)</center>
<code>signrawtransactionwithkey</code>와 <code>signrawtransactionwithwallet</code>를 검색해봐도 뭐가 없더군요ㅠㅠ

그래서 직접 해보고 정리 글을 남깁니다.

먼저, 사전 준비 작업으로 raw Tx를 하나 생성합니다. (<code>createrawtransaction</code>)
raw transaction 사인 전과 후 작업은 아래 링크를 참고해 주세요
Please check this <a href = 'https://stackoverflow.com/questions/38493893/heres-how-to-send-raw-transaction-btc-using-bitcoin-cli-command'>Link</a> to create a raw transaction.

<center>![](https://steemitimages.com/DQmTGfa6EpVnqY3yrxozrSc9zTQE4zjZRwS5cNt8PPodVJh/image.png)</center>
hex_createrawtransaction = 02000...00000 즉, 새로 생성된 raw tx의 hex값입니다.
이걸 원래는 <code>signrawtransaction</code>으로 서명 했으나, 이제는 아니죠!

<h2><code>signrawtransactionwithkey</code></h2>
<code>signrawtransactionwithkey</code> : 해당 utxo의 privatekey(WIF encoded)로 sign
Format
<code>$ bitcoin-cli signrawtransactionwithkey <hex_createrawtransaction> ‘[privateKey1, …]’</code>

Example
<center>![](https://steemitimages.com/DQmPXtYGLQbfLxMeTZkZbK3WeV8Q9nrNupjPKQykCb87SZa/image.png)</center>

Result
<center>![](https://steemitimages.com/DQmVEtcCYvBXBebzv3wQNGuvAQwvGL5whhtUQTHLa1GzSmo/image.png)</center>

<h2><code>signrawtransactionwithwallet</code></h2>

<code>signrawtransactionwithwallet</code> : 기존 <code>signrawtransaction</code>과 유사합니다.
사실, <code>signrawtransaction</code> == <code>signrawtransactionwithwallet</code> 이라 봐도 무관하지 않을까...싶네요
Format
<code>$ bitcoin-cli signrawtransactionwithwallet <hex_createrawtransaction></code>

그래서 이건 예시 생략합니다! 결과도 동일합니다. 궁금하신 분들은 위 Link에서 보시기 바랍니다.

이후 tx send 과정은 같습니다. 이 역시 위 Link를 참고바랍니다.
👍  , ,
properties (23)
authorjchoy
permlinksignrawtransaction-deprecated-bitcoin-cli
categorykr
json_metadata{"tags":["kr","coinkorea","bitcoin","blockchain","cryptocurrency"],"image":["https://steemitimages.com/DQmX37smZgrUvscZYP4nDMYfMBuMFjj66gKHkiZADB51n82/image.png","https://steemitimages.com/DQmQ9B9kjZrTQokEkRFh6PDwKP8vRksCnMGqgDbUUBXa7ZD/image.png","https://steemitimages.com/DQmVV5o8ra6fgB5ThKmc1N543ygk1yfMzaYdmMKbfFuTwwi/image.png","https://steemitimages.com/DQmTGfa6EpVnqY3yrxozrSc9zTQE4zjZRwS5cNt8PPodVJh/image.png","https://steemitimages.com/DQmPXtYGLQbfLxMeTZkZbK3WeV8Q9nrNupjPKQykCb87SZa/image.png","https://steemitimages.com/DQmVEtcCYvBXBebzv3wQNGuvAQwvGL5whhtUQTHLa1GzSmo/image.png"],"links":["https://stackoverflow.com/questions/38493893/heres-how-to-send-raw-transaction-btc-using-bitcoin-cli-command"],"app":"steemit/0.1","format":"markdown"}
created2018-03-14 03:54:06
last_update2018-03-14 03:54:06
depth0
children5
last_payout2018-03-21 03:54:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,922
author_reputation169,213,258,815
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id44,279,857
net_rshares1,228,250,610
author_curate_reward""
vote details (3)
@egonspace · (edited)
예전의 signrawtransaction이 signrawtransactionwithkey와 ...withwallet으로 쪼개진 것입니다. 예전 걸로는 private key를 줘도 되고 안줘도 됐었고, 안주면 wallet으로 사인했었습니다. 지금은 명시적으로 함수를 나눠서 private로 사인하려면 ...withkey를, 아니면 ...withwallet을 사용하라고 나눈 것 같습니다.
👍  
properties (23)
authoregonspace
permlinkre-jchoy-signrawtransaction-deprecated-bitcoin-cli-20180314t044506189z
categorykr
json_metadata{"tags":["kr"],"app":"steemit/0.1"}
created2018-03-14 04:45:12
last_update2018-03-14 04:46:00
depth1
children1
last_payout2018-03-21 04:45:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length215
author_reputation2,796,714,206
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id44,287,836
net_rshares609,865,957
author_curate_reward""
vote details (1)
@jchoy ·
네 그렇더군요. 확실히 명시적으로 나눠 함수 목적성이 분명해진 것 같습니다. bitcoin core도 doc 업데이트를 잘 해주면 좋을텐데 아쉽네요.
properties (22)
authorjchoy
permlinkre-egonspace-re-jchoy-signrawtransaction-deprecated-bitcoin-cli-20180314t051755146z
categorykr
json_metadata{"tags":["kr"],"app":"steemit/0.1"}
created2018-03-14 05:17:54
last_update2018-03-14 05:17:54
depth2
children0
last_payout2018-03-21 05:17:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length83
author_reputation169,213,258,815
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id44,292,719
net_rshares0
@ipostbtcprice ·
For future viewers: price of bitcoin at the moment of posting is 9251.90USD
properties (22)
authoripostbtcprice
permlinkre-signrawtransaction-deprecated-bitcoin-cli-20180314t035420
categorykr
json_metadata""
created2018-03-14 03:54:21
last_update2018-03-14 03:54:21
depth1
children0
last_payout2018-03-21 03:54:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length75
author_reputation-836,550,928,480
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id44,279,901
net_rshares0
@steemitboard ·
Congratulations @jchoy! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@jchoy/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table>

<sub>_[Click here to view your Board](https://steemitboard.com/@jchoy)_</sub>


> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-jchoy-20190201t060600000z
categorykr
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-02-01 06:06:00
last_update2019-02-01 06:06:00
depth1
children0
last_payout2019-02-08 06:06:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length528
author_reputation38,975,615,169,260
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,242,556
net_rshares0
@steemitboard ·
Congratulations @jchoy! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@jchoy/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@jchoy) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=jchoy)_</sub>


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-jchoy-20200201t064939000z
categorykr
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2020-02-01 06:49:39
last_update2020-02-01 06:49:39
depth1
children0
last_payout2020-02-08 06:49:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length608
author_reputation38,975,615,169,260
root_title"클라이언트 기능 변경 signrawtransaction deprecated [bitcoin-cli]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id94,983,848
net_rshares0