Esempio n. 1
0
 public static Gen <KeyPath> KeyPath() =>
 from raw in Gen.NonEmptyListOf(PrimitiveGenerator.RandomBytes(4))
 let flattenBytes = raw.ToList().Aggregate((a, b) => a.Concat(b))
                    select Bitcoin3.KeyPath.FromBytes(flattenBytes);
Esempio n. 2
0
 public static Gen <uint256> Hash256() =>
 from bytes in PrimitiveGenerator.RandomBytes(32)
 select new uint256(bytes);
Esempio n. 3
0
 public static Gen <uint160> Hash160() =>
 from bytes in PrimitiveGenerator.RandomBytes(20)
 select new uint160(bytes);
 private static Gen <Op> PushOnlyOpcode() =>
 from bytes in PrimitiveGenerator.RandomBytes(4)
 select Op.GetPushOp(bytes);