PIN Data Structure

The MAN indexer extracts MetaID protocol data from the reveal scripts of Taproot transactions. For detailed protocol information, please refer to the MetaID Specification section.

PIN Data Structure

type PinInscription struct {
	Id                 string `json:"id"`
	Number             int64  `json:"number"`
	RootTxId           string `json:"rootTxId"`
	MetaId             string `json:"metaid"`
	Address            string `json:"address"`
	CreateAddress      string `json:"createAddress"`
	Output             string `json:"output"`
	OutputValue        int64  `json:"outputValue"`
	Timestamp          int64  `json:"timestamp"`
	GenesisFee         int64  `json:"genesisFee"`
	GenesisHeight      int64  `json:"genesisHeight"`
	GenesisTransaction string `json:"genesisTransaction"`
	TxIndex            int    `json:"txIndex"`
	TxInIndex          uint32 `json:"txInIndex"`
	TxInOffset         uint64 `json:"txInOffset"`
	Operation          string `json:"operation"`
	Path               string `json:"path"`
	ParentPath         string `json:"parentPath"`
	OriginalPath       string `json:"originalPath"`
	Encryption         string `json:"encryption"`
	Version            string `json:"version"`
	ContentType        string `json:"contentType"`
	ContentTypeDetect  string `json:"contentTypeDetect"`
	ContentBody        []byte `json:"contentBody"`
	ContentLength      uint64 `json:"contentLength"`
	ContentSummary     string `json:"contentSummary"`
	Status             int    `json:"status"`
	OriginalId         string `json:"originalId"`
	IsTransfered       bool   `json:"isTransfered"`
	Preview            string `json:"preview"`
	Content            string `json:"content"`
	Pop                string `json:"pop"`
}

PIN Indexing Rules

General

  1. Flag Recognition: The flag is metaid.

  2. Case Sensitivity: Case insensitive. The indexer can store all data in lowercase.

Operation

  1. The pinid of an init type PIN is a user's MetaID.

  2. init and create operations follow the first-come, first-served principle.

  3. Within the same block, the order of init and create operations is not distinguished. The indexer should process init type PINs first to establish the metaid.

Path

  1. For the same path, init and create PINs are indexed by the oldest entry, while modify and revoke operations consider the most recent entry.

  2. modify and revoke operations must act on already included PINs. These operations are valid only for already included PINs, even within the same block.

  3. Non-init PIN paths must fall within the following default paths for a MetaID:

    (1) /info

    (2) /protocols

    (3) /file

    (4) /ft

    (5) /nft

    (6) /follow

  4. Paths for modify and revoke operations should specify the target PIN using @pinId.

PIN Status Codes

For more information, please refer to the MAN source code:

Last updated