DDO Fields interactions
After creating DDO instance based on DDO's version, we can interact with the DDO fields through the following methods:
getDDOFields()
which returns DDO fields such as:id: The Decentralized Identifier (DID) of the asset.
version: The version of the DDO.
metadata: The metadata describing the asset.
services: An array of services associated with the asset.
credentials: An array of verifiable credentials.
chainId: The blockchain chain ID where the asset is registered.
nftAddress: The address of the NFT representing the asset.
getAssetFields()
which returns Asset fields such as:datatokens (optional): The datatokens associated with the asset.
indexedMetadata (optional): Encapsulates data about blockchain asset related event, NFT, stats (pricing of the asset, number of orders per asset), purgatory (if the asset belongs or not in the purgatory).
event (optional): The last event related to the asset.
nft (optional): Information about the NFT representing the asset.
purgatory (optional): Purgatory status of the asset, if applicable.
stats (optional): Statistical information about the asset (e.g., usage, views).Example of indexedMetadata
getDDOData()
which simply retruns asRecord<string, any>
the full DDO structure including DDO and Asset fields.getDid()
which returns only the Decentralized Identifier (DID), asstring
, of the asset.
Usage of DDO Manager Functions
Execute script
Last updated
Was this helpful?