namecoin / namecoin-core

Namecoin full node + wallet based on the current Bitcoin Core codebase.
https://www.namecoin.org/
MIT License
455 stars 146 forks source link

"namerawtransaction" equivalent for PSBT API #361

Closed JeremyRand closed 4 years ago

JeremyRand commented 4 years ago

Is your feature request related to a problem? Please describe.

In the raw transaction API, creating a transaction with a name output is done as follows:

  1. Create a transaction with a currency output via createrawtransaction.
  2. Add a name operation to that output using namerawtransaction.

Unfortunately, the latter operation does not have any analogue currently in the PSBT API. Thus AFAICT it is not possible to create name transactions via the PSBT API right now.

Describe the solution you'd like

It would be useful to add a namepsbt RPC method that does what namerawtransaction does, but for PSBT's.

Describe alternatives you've considered

I considered adding name information to createpsbt itself, but it makes the syntax rather unwieldy.

Additional context

This is relevant to atomic name trades.

JeremyRand commented 4 years ago

@domob1812 Is this something that Xaya would find relevant?

domob1812 commented 4 years ago

Yes, that's definitely something useful for Xaya as well. I can work on this, ETA a week or two maybe (depending a bit on how much time I find and what I need to do for other things).