示例#1
0
        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()
     }));
 }
示例#3
0
 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());
     }
 }