Open kyranjamie opened 5 months ago
Currently, regardless of whether the broadcast flag is true or false, we return the PSBT hex in all cases.
broadcast
Developers broadcasting PSBTs almost always need to know the txid.
txid
In the case of broadcast: true, we should delay the response to the page until the transaction has broadcast successfully.
broadcast: true
So:
{ hex: string; txid: string }
broadcast: false
{ hex: string }
This should be typed as a discriminating boolean literal in @leather-wallet/types
@leather-wallet/types
This has been requested by the Hermetica team
I presume we can label this effort small?
Currently, regardless of whether the
broadcast
flag is true or false, we return the PSBT hex in all cases.Developers broadcasting PSBTs almost always need to know the
txid
.In the case of
broadcast: true
, we should delay the response to the page until the transaction has broadcast successfully.So:
broadcast: true
then return{ hex: string; txid: string }
broadcast: false
then return{ hex: string }
This should be typed as a discriminating boolean literal in
@leather-wallet/types