psbt: add type-to-string that prints b64 string

Re-uses code from what was the bitcoin_tx_to_psbt_b64
This commit is contained in:
niftynei
2020-05-29 12:12:29 -05:00
committed by Christian Decker
parent c100de6d93
commit 5ecacf3dd0
4 changed files with 29 additions and 9 deletions

View File

@@ -4,6 +4,7 @@
#include "utils.h"
#include <ccan/autodata/autodata.h>
#include <secp256k1.h>
#include <wally_psbt.h>
/* This must match the type_to_string_ cases. */
union printable_types {
@@ -35,6 +36,7 @@ union printable_types {
const struct amount_sat *amount_sat;
const struct fee_states *fee_states;
const char *charp_;
const struct wally_psbt *wally_psbt;
};
#define type_to_string(ctx, type, ptr) \