Configuration object for the transaction
OptionaladdressType?: MultisigAddressTypeThe type of address used (P2SH, P2SH_P2WSH, P2WSH, P2WPKH)
Optionalm?: numberNumber of required signatures (for multisig)
Optionaln?: numberTotal number of possible signers (for multisig)
OptionalnumInputs?: numberNumber of inputs in the transaction
OptionalnumOutputs?: numberNumber of outputs in the transaction
The estimated virtual size (vsize) of the transaction in vbytes
Estimates the virtual size (vsize) of a transaction.
This function calculates the estimated vsize for different address types, including P2SH, P2SH_P2WSH, P2WSH, and P2WPKH. The vsize is crucial for fee estimation in Bitcoin transactions, especially for SegWit transactions where the witness data is discounted.
Calculation Method:
References: