Bitcoin Forum
May 08, 2024, 02:21:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I process a PSBT created with createpsbt using bitcoin-cli?  (Read 113 times)
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 03:19:00 PM
Last edit: December 10, 2022, 03:36:55 PM by Jodmapht
Merited by ABCbits (2)
 #1

Hi,

I am trying to move from creating a transaction using createrawtransaction on a networked computer and sigining it using signrawtransactionwithkey on a non-connected computer to using psbts. The createpsbt function seems to work fine, but I don't know how I can sign it in the other system using the key? There is no "processpsbtwithkey" function?
1715178072
Hero Member
*
Offline Offline

Posts: 1715178072

View Profile Personal Message (Offline)

Ignore
1715178072
Reply with quote  #2

1715178072
Report to moderator
1715178072
Hero Member
*
Offline Offline

Posts: 1715178072

View Profile Personal Message (Offline)

Ignore
1715178072
Reply with quote  #2

1715178072
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715178072
Hero Member
*
Offline Offline

Posts: 1715178072

View Profile Personal Message (Offline)

Ignore
1715178072
Reply with quote  #2

1715178072
Report to moderator
Edwardard
Hero Member
*****
Offline Offline

Activity: 1050
Merit: 681



View Profile WWW
December 10, 2022, 03:47:23 PM
Merited by ABCbits (1)
 #2

There is no "processpsbtwithkey" function?
No such RPC.

Try these:
 
Code:
walletprocesspsbt
:(Updater, Signer, Finalizer)
Code:
finalizepsbt
: (Finalizer, extractor)

Refer : PSBT Howto for Bitcoin Core.
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 04:49:04 PM
 #3

There is no "processpsbtwithkey" function?
No such RPC.

Try these:
 
Code:
walletprocesspsbt
:(Updater, Signer, Finalizer)
Code:
finalizepsbt
: (Finalizer, extractor)

Refer : PSBT Howto for Bitcoin Core.

I don't have a wallet on the non-connected computer, I just want to provide the PSBT and the private key as an input to sign the transaction...
Edwardard
Hero Member
*****
Offline Offline

Activity: 1050
Merit: 681



View Profile WWW
December 10, 2022, 05:28:47 PM
Last edit: December 10, 2022, 07:11:18 PM by Edwardard
 #4

just want to provide the PSBT and the private key as an input to sign the transaction...
You mean a signrawtransactionwithkey type RPC call for psbt ? I guess, we don't have any for now. walletprocesspsbt is the only way, unfortunately.

EDIT
Is there any plan to add such functionality? Thanks!
Sry, not sure!
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 05:41:09 PM
Last edit: December 10, 2022, 08:41:21 PM by Jodmapht
 #5

just want to provide the PSBT and the private key as an input to sign the transaction...
You mean a signrawtransactionwithkey type RPC call for psbt ? I guess, we don't have any for now. walletprocesspsbt is the only way, unfortunately.

Yes exactly, it would be very useful for offline signature of PSBTs. Is there any plan to add such functionality? I am right that as opposed to an unsigned raw transaction, a PSBT contains all the required information to sign it offline (excluding the private key)? Thanks!
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
December 11, 2022, 05:22:15 AM
Merited by DaveF (1), ABCbits (1)
 #6

There is a proposal for a descriptorprocesspsbt RPC that would do signing.

Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 13, 2022, 02:47:43 PM
 #7

There is a proposal for a descriptorprocesspsbt RPC that would do signing.

Ok thank you. And normally this should work to sign a PBST offline without any access to txindex or the mempool, similarly to signrawtransaction?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
December 13, 2022, 06:11:35 PM
Merited by Jodmapht (1)
 #8

Ok thank you. And normally this should work to sign a PBST offline without any access to txindex or the mempool, similarly to signrawtransaction?
As long as the PSBT is updated with all of the necessary data.

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!