public override HashVersion GetHashVersion(Network network) { if (Redeem == null) { return(base.GetHashVersion(network)); } else { return(ScriptCoin.Create(network, this, Redeem).GetHashVersion(network)); } }
public override Script GetScriptCode(Network network) { if (_OverrideScriptCode != null) { return(_OverrideScriptCode); } if (Redeem == null) { return(base.GetScriptCode(network)); } else { return(ScriptCoin.Create(network, this, Redeem).GetScriptCode(network)); } }
public ScriptCoin TryToScriptCoin(Script redeemScript) { if (redeemScript == null) { throw new ArgumentNullException(nameof(redeemScript)); } var scriptCoin = this as ScriptCoin; if (scriptCoin != null) { return(scriptCoin); } if (!ScriptCoin.IsCoherent(TxOut.ScriptPubKey, redeemScript, out var error)) { return(null); } return(new ScriptCoin(this, redeemScript)); }
//public static RPCResponse SendCommandNoThrows(this RPCClient client, string commandName, params object[] parameters) //{ // return client.SendCommand(new RPCRequest // { // Method = commandName, // Params = parameters // }, throwIfRPCError: false); //} //public static Task<RPCResponse> SendCommandNoThrowsAsync(this RPCClient client, string commandName, params object[] parameters) //{ // return client.SendCommandAsync(new RPCRequest // { // Method = commandName, // Params = parameters // }, throwIfRPCError: false); //} public static ScriptCoin Clone(this ScriptCoin scriptCoin) { return(new ScriptCoin(scriptCoin, scriptCoin.Redeem)); }