🆔
MetaID
English
English
  • â„šī¸Overview
    • Overview
    • Terms
  • 📑MetaID Specification
    • Protocol Spec
    • MetaID Tree
      • MetaID Tree
      • Info Node
      • File Node
      • FT Node
      • NFT Node
      • Protocols Node
      • Follow Node
    • MetaID Envelope
    • Privacy Model
    • About PIN
    • About PoP
    • Host
    • MetaAccess
    • MetaName
    • Examples
  • đŸ’ģMetaID App Node
    • Introduction
    • Compile and Run
    • JSON API
    • Browser
    • MetaID PIN Conventions
    • PIN Data Structure
  • âš™ī¸MetaID SDK
    • Get Started
    • Core API
    • Quick Example
  • â›“ī¸Cross-chain
    • Cross-chain
    • Unified UTXO Chain
  • đŸĒĒAbout MetaID
    • History About MetaID
    • FAQ
    • MetaID Philosophy
    • MetaID Resources
  • 📃FT & NFT Protocols
    • MRC-20
    • MRC-721
Powered by GitBook
On this page
  1. MetaID Specification

MetaID Envelope

Envelope

The MetaID content is entirely on-chain, and the MetaID envelope format currently supports two schemes:

1. Taproot-Script:

By utilizing the Taproot-Script "commit/reveal" scheme, the MetaID envelope is placed in the Taproot script of the input, containing various operations that can be legally executed on MetaID. The convention is to use OP_FALSE OP_IF ... OP_ENDIF to place any non-executable content in the Taproot spending script. The byte " metaid " (6D6574616964 in hexadecimal) is used to identify the envelope as a MetaID protocol.

Taproot-Script Envelope format:

OP_FALSE
OP_IF
	<metaid_flag>
	<operation>
	<path>
	<encryption>
	<version>
	<content-type>
	<payload>
OP_ENDIF

2. Locking-Script:

By utilizing the OpReturn opcode, data is placed after it. The MetaID envelope is placed in the Locking-Script of the transaction output, containing various operations that can be legally executed on MetaID. The convention is to use OP_RETURN to place any non-executable content in the locking output script. The byte " metaid " (6D6574616964 in hexadecimal) is used to indicate that the envelope belongs to the MetaID protocol.

Locking-Script Envelope format:

OP_0
OP_RETURN
	<metaid_flag> 
	<operation>
	<path>
	<encryption>
	<version>
	<content-type>
	<payload>

The envelope must appear after OP_RETURN in the output script and at index 1 of the output. The first satoshi of the UTXO at index 0 is used to carry the envelope content.

Note: If both Taproot-Script and Data-script envelopes exist in the same transaction, the Taproot-Script format takes precedence.

PreviousFollow NodeNextPrivacy Model

Last updated 1 year ago

📑