Samourai-Wallet / whirlpool-client-cli

Command line Whirlpool client
Other
16 stars 13 forks source link

Feature request: Set sat/byte miner fees for tx0, and pool mining fees #5

Open Technifocal opened 5 years ago

Technifocal commented 5 years ago

I'd like to see two new features added to the tx0 creation API call.

  1. sat/byte value that affects the actual tx0 transaction
  2. An overfund by value that configures how much more than the poolsize each UTXO should be valued at. This value should be sanity checked against the pool's mustMixBalanceMin and mustMixBalanceMax.

For example, on the tx0 API call, two new parameters could be added:

feeSatPerByte

and

mixUtxoOverspend

and an API query (in bash for the lowest fee) might look like:

OVERSPEND="$(($(http --body 'http://127.0.0.1:8899/rest/pools' "apiKey:${API_KEY}" | jq '.pools[] | select(.denomination == 1000000) | .mustMixBalanceMin')-1000000))"
http "http://localhost:8899/rest/utxos/${hash}:${index}/tx0" "apiKey:${API_KEY}" 'poolId=0.01btc' 'feeSatPerByte=2' "mixUtxoOverspend=${OVERSPEND}"