UNPKG

@dashevo/wallet-lib

Version:
16 lines (15 loc) 283 B
module.exports = { varIntSizeBytesFromLength: (length) => { let bytes = 1; if (length >= 0xfd) { bytes += 2; if (length >= 0xffff) { bytes += 2; if (length >= 0xffffffff) { bytes += 4; } } } return bytes; }, };