forked from ElementsProject/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge ElementsProject#600: PSBT for Confidential Assets
3127c65 Add legacy help text for walletprocesspsbt suggesting to use new RPCs instead. (Glenn Willen) d39925b Disable PSBT RPCs when not in g_con_elementsmode. (Glenn Willen) 2848b52 PSBT for Confidential Assets (Glenn Willen) f87684a Add convenience method GetNonIssuanceBlindingData (Glenn Willen) Pull request description: This PR extends the PSBT format and RPCs to handle Confidential Assets transactions. New fields in PSBT inputs: Unblinded value, Value blinder, Unblinded asset, Asset blinder. New fields in PSBT outputs: Recipient blinding pubkey, Value commitment, Value blinder, Asset commitment, Asset blinder, Nonce commitment, Range proof, Surjection proof. We preserve the existing invariant that the unsigned transaction inside a PSBT never changes during the process; all updates that need to be applied to produce the final signed transaction are accumulated in the PSBT fields listed above. The process is as follows: * Create a PSBT using `converttopsbt` [deprecated], `walletcreatefundedpsbt`, `createpsbt` * At this point, the output pubkey fields will be filled, for any outputs to confidential addresses. * Input fields may be filled, if the wallet was used; otherwise they will be filled in the next step. * Incremental creation of the unsigned transaction itself is OUTSIDE the scope of this work. The unsigned transaction must be fully populated with inputs and outputs before the PSBT is created. * Transactions with peg-in, issuance, or reissuance outputs are NOT supported at this time. * If necessary, update the psbt with input data using `walletfillpsbtdata`. * This is like the old `walletprocesspsbt` RPC [deprecated], which tried to both fill and sign the PSBT (which is not workable in the Confidential Assets setting.) * Once all inputs have had necessary data updated, possibly using multiple wallets if necessary, any wallet can be used to blind the transaction using `blindpsbt`. * This uses the input blinding data, along with the output blinding pubkeys, to compute the output blinding data. * Incremental blinding is not supported. All input blinding data must be available when `blindpsbt` is called. * Then, the blinded PSBT must be signed using `walletsignpsbt`. As with updating, this can be done by multiple wallets as necessary for the inputs being signed. * Once all signatures are present, `finalizepsbt` is used to create the final transaction in the regular transaction format, as before. * Then `sendrawtransaction` is used, which will check to make sure that blinding was performed properly before sending. Tree-SHA512: 2844a1545383cdab6025b90791c9e66f280d988bd40e37354c831b309c4c41eead144ca6d69c956cac40e849978c3450d1a22910f51ca3c6245236b29c05faa8
- Loading branch information
Showing
21 changed files
with
1,214 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.