/** * use the API to get the best inputs to use based on the outputs * * @param array[] $outputs * @param bool $lockUTXO * @param bool $allowZeroConf * @param string $feeStrategy * @param null|int $forceFee * @return array */ public function coinSelection($outputs, $lockUTXO = true, $allowZeroConf = false, $feeStrategy = self::FEE_STRATEGY_OPTIMAL, $forceFee = null) { $result = $this->sdk->coinSelection($this->identifier, $outputs, $lockUTXO, $allowZeroConf, $feeStrategy, $forceFee); $this->optimalFeePerKB = $result['fees'][self::FEE_STRATEGY_OPTIMAL]; $this->lowPriorityFeePerKB = $result['fees'][self::FEE_STRATEGY_LOW_PRIORITY]; $this->feePerKBAge = time(); return $result; }
/** * use the API to get the best inputs to use based on the outputs * * @param array[] $outputs * @param bool $lockUTXO * @param bool $allowZeroConf * @param null|int $forceFee * @return array */ public function coinSelection($outputs, $lockUTXO = true, $allowZeroConf = false, $forceFee = null) { return $this->sdk->coinSelection($this->identifier, $outputs, $lockUTXO, $allowZeroConf, $forceFee); }