(inputScript: Uint8Array)
| 201 | |
| 202 | // ////////// SIZE CALCULATIONS /////////////////////////////////////////////// |
| 203 | export function getInputSize(inputScript: Uint8Array): number { |
| 204 | const scriptSize = inputScript.byteLength; |
| 205 | const varIntSize = scriptSize > 252 ? 3 : 1; |
| 206 | return 32 + 4 + varIntSize + scriptSize + 4; |
| 207 | } |
| 208 | |
| 209 | export function getTxSizeWithoutInputs(outputs: Output[]): number { |
| 210 | // Transaction format: |