Operations
Last updated
Last updated
The format for Operations mentioned in this document has not been updated yet. Please refer to the latest indexer specifications and official inscription tools of B137.
In this section, we will provide a detailed explanation of various operations of the B137 protocol. For ease of understanding, the Bitcoin script will be simplified in the presentation, such as displaying text in plain text form, whereas actual transactions would require encoding first.
Operation | Description |
---|---|
The DID_MINT
operation is used to create a certain number of B137-DID inscriptions. At the Bitcoin script level, it can be represented as follows:
Where<TICK>
should be filled with the BRC20 token name of the B137-DID, and <AMOUNT>
represents the number of inscriptions being minted in this operation, with a maximum of 1000 per transaction.
DID_UPDATE
operation is used to set or update the name for a given B137-DID inscription. At the Bitcoin script level, it can be represented as follows:
As illustrated in the Bitcoin script above, you can update the following content of the B137 inscription during the DID_UPDATE
operation:
Which B137-DID inscription you want to name?
What name you want to assign to the corresponding inscription?
To ensure the validity of this operation, there are several points to note:
You must ensure that the address initiating the transaction is the holder of the B137-DID inscription specified in inscription_did.
You must ensure that the new name has not been taken by another B137-DID inscription.
Other rules described in the Core Concept / B137-DID section, such as character set limitations, must be adhered to.
If the transaction for this operation is confirmed on the Bitcoin network and does not meet the above conditions, the operation will be considered invalid, even if the conditions are met later.
DID_BIND
operation is used to establish a binding relationship between a B137-DID inscription and a B137-TLD inscription. At the Bitcoin script level, it can be represented as follows:
In the context of the DID_BIND
operation, the inscription_did
field specifies the index of the B137-DID inscription, and the inscription_tld
field specifies the index of the B137-TLD inscription. At the time of initiating the operation, the following conditions must be met:
The address initiating the transaction must be the holder of the B137-DID inscription specified in inscription_did
.
The B137-TLD inscription specified in inscription_tld
must have had a name set before the transaction is initiated.
In this transaction, the correct amount of satoshis corresponding to the royalty set by the B137-TLD inscription must be sent to the holder of the B137-TLD inscription.
If the transaction for this operation is confirmed on the Bitcoin network and does not meet the above conditions, the operation will be considered invalid, and even if the conditions are met later, the operation will still be deemed invalid.
TLD_OPEN
operation is used to set a name for a B137-TLD inscription. At the Bitcoin script level, it can be represented as follows:
As explained in the TLD_OPEN
operation, the inscription_tld
field specifies the index of the B137-TLD inscription, the name
field specifies the name to be set, and the royalty
field specifies the royalty, which is in satoshis, with a minimum value of 0.
At the time of initiating the transaction, the following conditions must be met:
The address initiating the transaction must be the holder of the B137-TLD inscription specified in inscription_tld
.
The B137-TLD inscription has not previously had a name set.
Other rules described in the Core Concept / B137-TLD section, such as character set limitations, must be adhered to.
If the transaction for this operation is confirmed on the Bitcoin network and does not meet the above conditions, the operation will be considered invalid, and even if the conditions are met later, the operation will still be deemed invalid.
TLD_UPDATE
operation is used to update the royalty amount for a B137-TLD inscription. At the Bitcoin script level, it can be represented as follows:
the inscription_tld
field specifies the index of the B137-TLD inscription, and the royalty
specifies the royalty, which is in satoshis, with a minimum value of 0.
When initiating the transaction, it is necessary to ensure that the address initiating the transaction is the holder of the B137-TLD inscription specified in inscription_tld
. If the transaction for this operation is confirmed on the Bitcoin network and does not meet this condition, the operation will be considered invalid, even if the condition is met later.
Additionally, to prevent unexpected DID_BIND operation failures due to royalty amount changes, all royalty amounts confirmed on the Bitcoin mainnet have a minimum survival period of 24 hours from the time of transaction confirmation. Royalties within this survival period are considered valid royalty amounts.
Delegators can aggregate operations by collecting user transactions, thereby reducing the on-chain costs for user actions. DELEGATE_BATCH will be used for the on-chain execution of batch operations.
For more details, please refer to: Batch
Mint a certain number of B137-DID inscriptions.
Set or update the name for a given B137-DID inscription.
Bind a B137-DID inscription to a B137-TLD inscription.
Set a name for a B137-TLD inscription.
Update the royalty amount for a B137-TLD inscription.
Batch operations applicable to Delegators.