Parsed records are the core of DAS, and the flexibility of parsed records is also the source of DAS's great scalability. A parsed record is a key-value pair, and DAS supports an infinite number of parsed records. As shown above, different applications will read different parse records to do different jobs. Therefore, it is important to manage the namespace of the key of the parsed record. The namespace usage specification is essentially a protocol that can be followed to enable good collaboration between applications.
The key of a parsed record is a hierarchical structure using
.separated by a hierarchy, such as
custom_key.bitcc_config, etc. Among them,
custom_keyare called primary namespaces;
bitcc_configare called secondary namespaces.
DAS has strict constraints on the use of namespaces at the contract level, and currently provides four first-level namespaces.
- addressThis namespace is generally used to store the user's digital assets receipt address, such as
address.eth, etc. Also, there is a whitelist inside the contract that has built-in mainstream digital assets symbols as legal key.
- profileThis namespace is generally used to store users' personal information, such as
profile.facebook, etc. Also, there is a whitelist inside the contract with built-in mainstream social network names as legitimate key.
- dwebThis namespace is generally used to store decentralized network-related content, such as
dweb.resilio, etc. Also, there is a dweb.resilio inside the contract. Also, there is a whitelist inside the contract with the mainstream decentralized storage protocol built-in name as a legal key.
- custom_keyThis namespace is not constrained, and developers can create any name and number of sub-namespaces under this space and define their meaning. For example,
Note that the DAS contract does not verify the legitimacy of the value of the parsed record, the DAS just provides a convention. For example, a user would normally set the value of
address.btcto a BTC address. However, the application should check if this value is really a legitimate BTC address when using this value.
Currently DAS only provides four level 1 namespaces
custom_key, but this is not the final result. the DAS team will gradually add more level 1 namespaces. If you think some namespaces should be added to allow better collaboration between applications. You can report in Github Issues.
Last modified 1yr ago