I'm doing a transaction of BTC using bitcore-lib nodejs package. when I set 1 satoshi fee per byte it shows an error like "Fee is too small: expected more than x but got y". Is there any way to get that x value to set fee?
let tx = bitcore.Transaction();
tx.from(utxos);
tx.to(toAddress,sendAmountInSatoshi);
tx.change(fromAddress);
tx.fee(fee);
tx.sign(pKey);
If you are using the bitcoin testnet make sure to include the minimum amount of fees which is 3000 satoshis.
You can set the fees as low as you want in the livenet, but the testnet require this as the minimum amount so as to ensure people continue mining on the testnet to help the developer community.
Cheers!