  This paper presents libtxsize, a library to estimate the size requirements of
arbitrary Bitcoin transactions. To account for different use cases, the library
provides estimates in bytes, virtual bytes, and weight units. In addition to
all currently existing input, output, and witness types, the library also
supports estimates for the anticipated Pay-to-Taproot transaction type, so that
estimates can be used as input for models attempting to quantify the impact of
Taproot on Bitcoin's scalability. libtxsize is based on analytic models, whose
credibility is established through first-principle analysis of transaction
types as well as exhaustive empirical validation. Consequently, the paper can
also serve as reference for different Bitcoin data and transaction types, their
semantics, and their size requirements (both from an analytic and empirical
point of view).
