getAssetPacket returns the embedded Packet, or null if not present.
getEmulatorPacket returns the embedded EmulatorPacket, or null if not present.
getPacketByType returns the first packet matching the given type tag, or null.
Returns all embedded packets in insertion order. Used when callers need to rebuild an Extension from an existing one (e.g. appending a new packet).
serialize encodes the extension as an OP_RETURN script.
Layout: OP_RETURN |
txOut returns the extension as a zero-value OP_RETURN transaction output.
StaticcreateStaticfromfromBytes parses an Extension from a raw OP_RETURN script.
StaticfromfromTx searches the transaction outputs for an extension blob and parses it. Throws ExtensionNotFoundError if none is found.
StaticisisExtension returns true if the script is an OP_RETURN whose push data begins with the ARK magic bytes.
Extension is a set of typed packets encoded in an OP_RETURN output.
Wire format: OP_RETURN | | ARK(3B) | [type(1B) | varint_len | data]...