Bitcoin Forum
May 06, 2024, 06:44:28 AM *
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?
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714977868
Hero Member
*
Offline Offline

Posts: 1714977868

View Profile Personal Message (Offline)

Ignore
1714977868
Reply with quote  #2

1714977868
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: 6581


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: 6581


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!