Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fees estimation #101

Open
EshanMaini opened this issue Jan 22, 2018 · 2 comments
Open

Fees estimation #101

EshanMaini opened this issue Jan 22, 2018 · 2 comments

Comments

@EshanMaini
Copy link

Hii
i am using this method to send BTC
$wallet->pay(array($address => $value), null, false, true);

i want to get the transaction fees estimate before sending the transaction.
is there any method available to do this?

@n0n0n0n0
Copy link

did you solve it?

@AlexKirsanoff
Copy link

AlexKirsanoff commented Apr 1, 2018

My solution:

$feeStrategy = \Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY; // your fee type

$address; // your address
$satoshi; // your amount in satoshi

$fee = $wallet->coinSelection(
\Blocktrail\SDK\Wallet::normalizeOutputsStruct([$address => $satoshi]),
false, false,
$feeStrategy
)['fee'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants