GoUpNumber / gun

The Go Up Number Wallet
BSD Zero Clause License
49 stars 9 forks source link

Add gun broadcast command #64

Closed LLFourn closed 2 years ago

LLFourn commented 2 years ago

We need to be able to broadcast a signed transaction. The most important bit is that we can broadcast PSBTs but I guess we should also support broadcasting a raw transaction hex. I think the command should be:

gun broadcast [<tx-file>]

<tx-file> can be a path to either a PSBT encoded as base64 or binary. Or it can be a raw consensus encoded transaction. If <tx-file> is - gun should read it from STDIN.

If is missing and psbt-output-dir from https://github.com/LLFourn/gun/issues/62 is set then gun should go through each .psbt file in psbt-output-dir and broadcast it if it looks finalized.

LLFourn commented 2 years ago

I'm closing this issue for now since I'm not sure we need it (yet).