ordspv
    Preparing search index...

    Function parseEnvelopesFromScript

    • Parse all envelopes out of one tapscript: an instruction-for-instruction port of ord's RawEnvelope::from_tapscript (envelope.rs @ 7effaaaf):

      • A single forward cursor plays the role of ord's shared Instructions iterator. A failed attempt never rewinds: instructions it consumed (including empty pushes inside a failed payload) are skipped by the outer scan, not re-considered as envelope starts.
      • stuttered is ASSIGNED (not or-ed) after every failed attempt (a later failure at a non-empty-push instruction clears it) and is NOT reset when an envelope succeeds; ord only writes it in the failure branch.
      • Any script parse error (truncated push) discards the entire tapscript, envelopes already parsed included (ord: from_tapscript returns Err, and from_transaction drops the input's envelopes).

      Parameters

      • script: Uint8Array

      Returns Omit<RawEnvelope, "input" | "index" | "offsetInInput">[]