@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @param $options ['primary_private_key' => key] OR ['passphrase' => pass] |
| 194 | 194 | * @param callable $fn |
| 195 | - * @return bool |
|
| 195 | + * @return boolean|null |
|
| 196 | 196 | * @throws \Exception |
| 197 | 197 | */ |
| 198 | 198 | public function unlock($options, callable $fn = null) { |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | /** |
| 334 | - * @param string|BIP32Path $path |
|
| 334 | + * @param BIP32Path $path |
|
| 335 | 335 | * @return BIP32Key|false |
| 336 | 336 | * @throws \Exception |
| 337 | 337 | * |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | /** |
| 359 | 359 | * get address for the specified path |
| 360 | 360 | * |
| 361 | - * @param string|BIP32Path $path |
|
| 361 | + * @param string $path |
|
| 362 | 362 | * @return string |
| 363 | 363 | */ |
| 364 | 364 | public function getAddressByPath($path) { |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | /** |
| 396 | 396 | * @param BIP32Key $key |
| 397 | - * @param string|BIP32Path $path |
|
| 397 | + * @param BIP32Path $path |
|
| 398 | 398 | * @return string |
| 399 | 399 | */ |
| 400 | 400 | protected function getAddressFromKey(BIP32Key $key, $path) { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | /** |
| 438 | - * @param string|BIP32Path $path |
|
| 438 | + * @param BIP32Path $path |
|
| 439 | 439 | * @return BIP32Key |
| 440 | 440 | * @throws \Exception |
| 441 | 441 | */ |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | * 'fund' the txBuilder with UTXOs (modified in place) |
| 570 | 570 | * |
| 571 | 571 | * @param TransactionBuilder $txBuilder |
| 572 | - * @param bool|true $lockUTXOs |
|
| 572 | + * @param boolean $lockUTXOs |
|
| 573 | 573 | * @param bool|false $allowZeroConf |
| 574 | 574 | * @param null|int $forceFee |
| 575 | 575 | * @return TransactionBuilder |
@@ -683,6 +683,10 @@ discard block |
||
| 683 | 683 | return [$inputs, $send]; |
| 684 | 684 | } |
| 685 | 685 | |
| 686 | + /** |
|
| 687 | + * @param integer $optimalFeePerKB |
|
| 688 | + * @param integer $lowPriorityFeePerKB |
|
| 689 | + */ |
|
| 686 | 690 | public function determineFeeAndChange(TransactionBuilder $txBuilder, $optimalFeePerKB, $lowPriorityFeePerKB) { |
| 687 | 691 | $send = $txBuilder->getOutputs(); |
| 688 | 692 | $utxos = $txBuilder->getUtxos(); |
@@ -795,7 +799,7 @@ discard block |
||
| 795 | 799 | * |
| 796 | 800 | * @param int $utxoCnt number of unspent inputs in transaction |
| 797 | 801 | * @param int $outputCnt number of outputs in transaction |
| 798 | - * @return float |
|
| 802 | + * @return integer |
|
| 799 | 803 | * @access public reminder that people might use this! |
| 800 | 804 | */ |
| 801 | 805 | public static function estimateFee($utxoCnt, $outputCnt) { |
@@ -817,7 +821,7 @@ discard block |
||
| 817 | 821 | /** |
| 818 | 822 | * @param int $txinSize |
| 819 | 823 | * @param int $txoutSize |
| 820 | - * @return float |
|
| 824 | + * @return integer |
|
| 821 | 825 | */ |
| 822 | 826 | public static function estimateSize($txinSize, $txoutSize) { |
| 823 | 827 | return 4 + 4 + $txinSize + 4 + $txoutSize + 4; // version + txinVarInt + txin + txoutVarInt + txout + locktime |
@@ -827,7 +831,7 @@ discard block |
||
| 827 | 831 | * only supports estimating size for P2PKH/P2SH outputs |
| 828 | 832 | * |
| 829 | 833 | * @param int $outputCnt number of outputs in transaction |
| 830 | - * @return float |
|
| 834 | + * @return integer |
|
| 831 | 835 | */ |
| 832 | 836 | public static function estimateSizeOutputs($outputCnt) { |
| 833 | 837 | return ($outputCnt * 34); |
@@ -881,7 +885,7 @@ discard block |
||
| 881 | 885 | * |
| 882 | 886 | * @param UTXO[] $utxos |
| 883 | 887 | * @param array[] $outputs |
| 884 | - * @param $feeStrategy |
|
| 888 | + * @param string $feeStrategy |
|
| 885 | 889 | * @param $optimalFeePerKB |
| 886 | 890 | * @param $lowPriorityFeePerKB |
| 887 | 891 | * @return int |