{"kind":"code","props":{"deps":{"Hex":{"$jig":"727e7b423b7ee40c0b5be87fba7fa5673ea2d20a74259040a7295d9c32a90011_o1"}},"location":"_o1","nonce":2,"origin":"312985bd960ae4c59856b3089b04017ede66506ea181333eec7c9bb88b11c490_o2","owner":"1PytriYokKN3GpKw84L4vvrGBwUvTYzCpx","satoshis":0},"src":"class Tx {\n  constructor (rawtx) {\n    const b = Hex.stringToBytes(rawtx)\n    let i = 0\n\n    function u8 () { return b[i++] }\n    function u16 () { return u8() + u8() * 256 }\n    function u32 () { return u16() + u16() * 256 * 256 }\n    function u64 () { return u32() + u32() * 256 * 256 * 256 * 256 }\n    function varint () { const b0 = u8(); return b0 === 0xff ? u64() : b0 === 0xfe ? u32() : b0 === 0xfd ? u16() : b0 }\n    function txid () { const h = Hex.bytesToString(b.slice(i, i + 32).reverse()); i += 32; return h }\n    function script () { const n = varint(); const h = Hex.bytesToString(b.slice(i, i + n)); i += n; return h }\n\n    this.version = u32()\n\n    const nin = varint()\n    this.inputs = []\n    for (let vin = 0; vin < nin; vin++) {\n      this.inputs.push({\n        prevTxId: txid(),\n        outputIndex: u32(),\n        script: script(),\n        sequenceNumber: u32()\n      })\n    }\n\n    const nout = varint()\n    this.outputs = []\n    for (let vout = 0; vout < nout; vout++) {\n      this.outputs.push({\n        satoshis: u64(),\n        script: script()\n      })\n    }\n\n    this.nLockTime = u32()\n  }\n}","version":"04"}