private static PSBT CanRoundtripPSBT(PSBT psbt) { var psbtBefore = psbt.ToString(); psbt = psbt.Clone(); var psbtAfter = psbt.ToString(); Assert.Equal(psbtBefore, psbtAfter); return(psbt); }
private IActionResult ViewPSBT(PSBT psbt, string fileName, IEnumerable <string> errors = null) { return(View(nameof(WalletPSBT), new WalletPSBTViewModel() { Decoded = psbt.ToString(), FileName = fileName ?? string.Empty, PSBT = psbt.ToBase64(), Errors = errors?.ToList() })); }
public static void WritePSBT(this InvocationContext ctx, PSBT psbt) { if (ctx.ParseResult.ValueForOption <bool>("json")) { ctx.Console.Out.Write(psbt.ToString()); } else { ctx.Console.Out.Write(psbt.ToBase64()); } }