0
First of all hi and thanks for your support and your time.
I want to calculate the fees of a blocktrail transaction with blocktrail SDK, before making the transaction, in order to let the recipient pay fees.
Here is what I tried:
$FEES = $wallet->coinSelection(\Blocktrail\SDK\Wallet::normalizeOutputsStruct(['66f4dec6ab29cd056ce1814c6fdfee05e1524b36' =>'100000']),false,false,\Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY;
echo "$FEES";
$fee = $FEES['fee'];
echo "$fee";
But this don't work, it says this: Fatal error: Uncaught Blocktrail\SDK\Exceptions\BlocktrailSDKException: Address not recognized how can I fix this error? Thanks for read, hope that you'll have a nice day :)
Thanks for reply, but it still don't work, same error – user10148040 – 2018-07-29T12:51:28.450
hmm One thing I would want to verify next would be that the
coinSelectionpart of your code is definitely choosing bitcoin? – Fuzzybear – 2018-07-29T12:56:52.720Yes, it is bitcoin, the only thing is that I'm using the bitcoin testnet, that I have initialized before, $client = new BlocktrailSDK("api", "api", "BTC", true); – user10148040 – 2018-07-29T12:59:53.663
66f4dec6ab29cd056ce1814c6fdfee05e1524b36 is a bitcoin test net address – user10148040 – 2018-07-29T13:04:22.543
might be you need to specify the testnet on the fee transaction as well... what are the
false,falseparts submitted after the address? though i would have expected that to have worked with the bitcoin address starting with the 1. So not sure, have you tried speaking directly to their support? – Fuzzybear – 2018-07-29T14:13:27.490