Batch
Last updated
Last updated
The format for Operations mentioned in this document has not been updated yet. Please refer to the latest indexer and official inscription tools of B137.
In the Core Concept and Operations sections, we have gained an understanding of the core operations of B137. Through these operations, we can create B137-DID and B137-TLD.
You can assign a name to your B137-DID using the DID_UPDATE operation or bind a TLD to your held B137-DID through the DID_BIND operation. While this may seem sufficient, there is an undeniable issue – transactions on the Bitcoin network are slow and expensive. If you simply want to set a name for your B137-DID, you may need to pay transaction fees amounting to tens of dollars. For some users, this cost is prohibitive, potentially hindering the widespread adoption of B137.
To address this, we have introduced Batch operations and the Delegator role to the B137 protocol.
Users holding BRC137-DELEGATOR assets ( ) will become Delegators.
Delegators have the capability to gather user transactions and batch them for on-chain submission. In this process:
Users must sign the operations they wish to execute with their private keys and submit them to the Delegator.
The Delegator collects the signed transactions from users. During this process, the Delegator may charge a certain fee to the users submitting transactions.
After collecting a sufficient number of transactions, the Delegator submits them to the Bitcoin blockchain network.
The B137 indexer monitors transactions on the network and, upon identifying aggregated transactions from BRC137 Delegators, sequentially executes the relevant operations within them.
The Delegator submits aggregated transactions through the DELEGATE_BATCH operation. At the Bitcoin script level, it can be represented as follows:
In this context, <DATA>
adopts the following data structure and is encoded using the cbor format:
The Delegator has the discretion to determine how many data entries to include in <DATA>
. However, it is important to note that records with timeout values in the array smaller than the current transaction timestamp will be ignored.
When collecting transactions, the Delegator needs to guide users to perform ECDSA signatures on the following data structure:
For the current v1 version, only the DID_UPDATE and DID_BIND operations are supported.