Example #1
0
 public BitcoinPubKeyAddress(string str, Network expectedNetwork = null)
     : base(Validate(str, ref expectedNetwork), expectedNetwork)
 {
     _addr = ParseAddress(str, expectedNetwork);
     Hash  = new KeyId(_addr.Hash);
 }
Example #2
0
 /// <summary>
 ///     Creates a new public key instance.
 ///     Since, CashAddr allows lower-case or upper-case addresses,
 ///     str argument is expected to store user supplied value instead of addr.ToString().
 /// </summary>
 /// <param name="str"></param>
 /// <param name="addr"></param>
 internal BitcoinPubKeyAddress(string str, BchAddr.BchAddrData addr)
     : base(str, addr.Network)
 {
     _addr = addr;
     Hash  = new KeyId(_addr.Hash);
 }
Example #3
0
 /// <summary>
 ///     Creates a new script key instance.
 ///     Since, CashAddr allows lower-case or upper-case addresses,
 ///     str argument is expected to store user supplied value instead of addr.ToString().
 /// </summary>
 /// <param name="str"></param>
 /// <param name="addr"></param>
 internal BitcoinScriptAddress(string str, BchAddr.BchAddrData addr)
     : base(str, addr.Network)
 {
     _addr = addr;
     Hash  = new ScriptId(_addr.Hash);
 }