Caravan Documentation
    Preparing search index...

    Function getWitnessSize

    • Calculates the value of a multisig witness given m-of-n values

      According to Bitcoin Optech calculator (https://bitcoinops.org/en/tools/calc-size/):

      • P2WSH 2-of-3 witness: 63.5 vbytes (254 bytes / 4)
      • Format: (1) size(0) (empty) + (73) size(72) ecdsa_signature + (73) size(72) ecdsa_signature + (106) size(105) redeem_script

      Witness structure:

      • Witness item count (varint)
      • Size
      • m signatures, each with size prefix
      • Redeem script with size prefix

      Parameters

      • m: any
      • n: any

      Returns any