Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 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()
     }));
 }
Ejemplo n.º 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());
     }
 }