Skip to main content

Mixin Inscription API

In this post We'll explain inscription. For Inscription deploy or inscribe, you can refer to this doc https://github.com/MixinNetwork/mixin/blob/master/INSCRIPTION.md

In default, the memo of the transaction is less than 256 bytes, if the memo large than that, we need to use Mixin Object Storage, refer to https://github.com/MixinNetwork/mixin/blob/master/STORAGE.md

info
  1. How to distinguish between common transaction and inscription transaction, we introduced it in Safe API, if a transaction has inscription_hash, it means it's an Inscription transaction.
  2. Inscription transaction is also an UTXO transaction. And if you want transfer a Collectible, you must spent UTXO not split or combine, it means there can only 1 input and 1 output for a inscription transaction.
  3. If you release Collectible careless, you can occupy it again following the Inscription docs above by a new occupancy transaction.

Inscription include two sections

  1. Collection of inscription
  2. Collectible of inscription

How to get the detail of collection

Fetch the collection detail by the deploy transaction hash, or the kernel_asset_id of the asset.

Endpoint URL

GET https://api.mixin.one/safe/inscriptions/collections/:hash
Response
{
"data": [
{
"type": "COLLECTION-TYPE",
"collection_hash": "HASH-VALUE",
"supply": "SUPPLY-NUMBER",
"unit": "UNIT-NAME",
"symbol": "SYMBOL",
"name": "COLLECTION-NAME",
"description": "DESCRIPTION-TEXT",
"icon_url": "URL",
"treasury": {
"ratio": "RATIO-VALUE",
"recipient": "RECIPIENT-ADDRESS"
},
"asset_key": "ASSET-KEY",
"created_at": "RFC3339NANO-TIMESTAMP",
"updated_at": "RFC3339NANO-TIMESTAMP"
}
]
}

How to get the detail of the collectible

Fetch the collectible by the inscription hash

Endpoint URL

GET https://api.mixin.one/safe/inscriptions/items/:hash
Response
{
"data": [
{
"type": "ITEM-TYPE",
"inscription_hash": "HASH-VALUE",
"collection_hash": "COLLECTION-HASH-VALUE",
"sequence": SEQUENCE-NUMBER,
"content_type": "CONTENT-TYPE",
"content_url": "CONTENT-URL",
"recipient": "RECIPIENT-ADDRESS",
"occupied_by": "OCCUPIED-BY-ADDRESS",
"created_at": "RFC3339NANO-TIMESTAMP",
"updated_at": "RFC3339NANO-TIMESTAMP"
}
]
}