private CalculatedOmniFeeInfo InvokeEstimateFinalFee( Coin fromCoin, List <UnspentCoin> feeUnspentCoins, Money dustCostBTC = null, FeeRate estimateFeeRate = null, TxOut opReturnOutput = null, BitcoinAddress toAddress = null, BitcoinAddress feeAddress = null) { dustCostBTC = dustCostBTC ?? this.DustCostBTC; estimateFeeRate = estimateFeeRate ?? this.EstimateFeeRate; opReturnOutput = opReturnOutput ?? this.OpReturnOutput; toAddress = toAddress ?? this.ToAddress; feeAddress = feeAddress ?? this.FeeAddress; var result = TxManager.EstimateFinalFee(toAddress, feeAddress, fromCoin, feeUnspentCoins, dustCostBTC, estimateFeeRate, opReturnOutput); return(result); }
private OmniTransactionBuildResult InvokeBuild( List <UnspentCoin> fromUnspentCoin, List <UnspentCoin> feeUnspentCoins, Money dustCostBTC = null, FeeRate estimateFeeRate = null, TxOut opReturnOutput = null, BitcoinAddress fromAddress = null, BitcoinAddress toAddress = null, BitcoinAddress feeAddress = null) { dustCostBTC = dustCostBTC ?? this.DustCostBTC; estimateFeeRate = estimateFeeRate ?? this.EstimateFeeRate; opReturnOutput = opReturnOutput ?? this.OpReturnOutput; fromAddress = fromAddress ?? this.FromAddress; toAddress = toAddress ?? this.ToAddress; feeAddress = feeAddress ?? this.FeeAddress; var result = TxManager.Build(fromAddress, toAddress, feeAddress, fromUnspentCoin, feeUnspentCoins, dustCostBTC, estimateFeeRate, opReturnOutput); return(result); }
private async void SignAndSendTx() { if ((PwdMethod && Password == null) || (PrivKeyMethod && string.IsNullOrWhiteSpace(PrivKey))) { return; } if (PwdMethod) { var pwd = SecureStringHelper.SecureStringToString(Password); await TxManager.SignAndSendUSDTTransaction(pwd, this.Transaction.ToHex(), this.SpentCoins, this.OperationId); } else { var keys = new List <string> { PrivKey, FeePrivKey }; await TxManager.SignAndSendTransactionByPrivateKey(keys, this.Transaction.ToHex(), this.SpentCoins, this.OperationId); } this.EventAggregator.GetEvent <TransactionCreated>().Publish(); this.FinishInteraction?.Invoke(); }