Bitcoin Core rounds fee rate down. It is better to under-measure your rate and pay an extra 0.0023 satoshi/byte than be over-measuring and miss some cut off for some miner etc.
Using psbt.extractTransaction().virtualSize() is sufficient. Creating a proxy for it will just create a cached Transaction internally anyways, so why bother?
More of a question than an issue report.
I was wondering why the
feeRate
was rounded here: https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/psbt.js#L1143It could also be useful to have a getter for the
virtualSize
. Similar togetFeeRate
.