Supporting Privacy Inscriptions on the Incognito blockchain requires the implementation of two main components:
- Introducing a new transaction type used to write inscription data to the blockchain.
- Developing an indexer that reads inscription data from the blockchain and organizes it in its database for easy querying by clients.
In this discussion, we will delve into the detailed implementation of these components.
Creating Privacy Inscriptions
Similar to existing Incognito features like swap and bridge, creating a new privacy inscription on the Incognito blockchain involves initiating a transaction with specific metadata. This metadata contains the inscription content and the receiver’s one-time address (OTA), as described below:
Once the transaction is included in a Shard chain, the inscription request information is sent to the Beacon chain for on-chain persistence. Each inscription is incrementally added to the Beacon chain’s database and represented by an incremental number.
After the inscription is successfully added to the Beacon chain, a new token with an amount of 1 will be minted to the designated OTA by the Shard chain that initially received the inscription creation request.
The complete workflow is illustrated in the following diagram:
As you may realize, by utilizing Incognito’s privacy primitives, transactions involving privacy inscriptions benefit from all the characteristics of a privacy Incognito transaction:
Despite being identified by a token ID, no one can ascertain which inscription is being sent in a transfer transaction because the token ID remains undisclosed in an Incognito privacy transaction, thanks to confidential assets.
Unlinkability and untraceability for transactions involving created inscriptions are also guaranteed due to ring-signature and one-time address support.
In this version, the size limit of an Incognito inscription is relatively large, 1 MB, but applications will not necessarily be limited by this number once the recursive inscriptions feature is supported, which will be discussed in another topic.
Querying Privacy Inscriptions
To facilitate easier and faster querying of privacy inscriptions, an indexer needs to be implemented. This indexer will sync all privacy inscriptions from the Incognito blockchain, parse their content (especially file format and file content), and store them in its own database.
The indexed data can then be accessed by any clients, with the Incognito website (along with its wallet) being the first client to have the following features:
- Ability to inscribe a new inscription
- View all inscribed inscriptions
- View details of an inscription
- View “my” inscriptions in the Incognito web wallet
- Transfer an inscription
(visual design updates for these features will be covered in another topic)
We are excited to receive feedback and thoughts from you.