示例#1
0
        public static Arbitrary <Tuple <BitcoinAddress, Network> > BitcoinAddressWithNetworkArb()
        {
            var tupleGen = from n in ChainParamsGenerator.NetworkGen()
                           from addr in RandomAddress(n)
                           select Tuple.Create(addr, n);

            return(Arb.From <Tuple <BitcoinAddress, Network> >(tupleGen));
        }
        public static Arbitrary <Tuple <Transaction, Network> > TransactionAndNetworkArb()
        {
            var result = from n in ChainParamsGenerator.NetworkGen()
                         from tx in TX(n)
                         select Tuple.Create(tx, n);

            return(Arb.From(result));
        }
示例#3
0
 public static Gen <PSBT> SanePSBT() =>
 from network in ChainParamsGenerator.NetworkGen()
 from psbt in SanePSBT(network)
 select psbt;
示例#4
0
 public static Gen <BitcoinAddress> Bech32Address() =>
 from n in ChainParamsGenerator.NetworkGen()
 from addr in Bech32Address(n)
 select addr;
 public static Gen <Transaction> TX() =>
 from network in ChainParamsGenerator.NetworkGen()
 from tx in TX(network)
 select tx;
示例#6
0
 public static Gen <BitcoinExtKey> BitcoinExtKey() =>
 from extKey in ExtKey()
 from network in ChainParamsGenerator.NetworkGen()
 select new BitcoinExtKey(extKey, network);