Instantiates the client. Mind the dependency of the ledger client.
Tries to resolve an account by its alias Name
The account, if resolvable (alias exists, and points to an account), or null
Branded Assets are constructed indirectly to allow already existing Tokens/Assets to have additional (brand) data. Branded Assets link an alias with SRC44 compliant data checking for identity of issuer and alias owner. Only if those match, the descriptor data is being returned.
If the token issuer is a contract, then the contracts creator is being used for identity matching Due to the indirection it's possible to have multiple brands.
See also setAssetBranding
An array of descriptors/brands - can be empty
Branded Contracts are almost identical with Branded Assets. See getAssetBranding and setContractBranding
The contract Id
An array of descriptors/brands - can be empty
Gets the descriptor data from an account. It also resolved referenced alias descriptor
The account id
The fetched Descriptor data. It might throw exceptions if it has no compatible data.
Gets descriptor data from an alias.
The unique alias name (can have a TLD attached using :
, like myalias:mytld
)
Gets the descriptor data from an asset/token. It also resolved referenced alias descriptor
Asset descriptions are immutable and can be set only on issuance. As this client does not issue assets, no setters/updaters are provided
The token/asset id
The fetched Descriptor data. It might throw exceptions if it has no compatible data.
Gets the descriptor data from a contract. It also resolved referenced alias descriptor
Contract descriptions are immutable and can be set only on contract deployment. As this client does not deploy contracts, no setters/updaters for contracts are provided
The contract id
The fetched Descriptor data. It might throw exceptions if it has no compatible data.
Sets an accounts descriptor data.
If feePlanck
is not given, the minimum costs will be calculated automatically
The arguments
Sets an alias descriptor data.
If feePlanck
is not given, the minimum costs will be calculated automatically
The arguments
Creates a brand for an asset. See also getAssetBranding
If the asset is issued by a contract, the contracts creator is being checked for ownership.
The args
Transaction Id if successful
Set contract branding. See getContractBranding
The args
Descriptor Data Client
const ledger = LedgerClientFactory.create({nodeHost: "https://europe.signum.network"}) const client = new DescriptorDataClient(ledger); const descriptorData = DescriptorDataBuilder .create('ohager') .setType('hum') .setBackground('QmUFc4dyX7TJn5dPxp8CrcDeedoV18owTBUWApYMuF6Koc', 'image/jpeg') .setAvatar('QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR', 'image/gif') .setSocialMediaLinks(['https://somelink.com']) .setDescription('Just a humble dev...') .setHomePage('https://digital-independence.dev') .build(); const transaction = await client.setAccountDescriptor({ descriptorData: DescriptorDataBuilder.create('descriptor').build(), senderPublicKey: '497d559d18d989b8....ed2716a4b2121902', senderPrivateKey: '**********************************' });
A helper class to get Descriptor information from accounts, contracts, assets, and/or aliases. It even resolves Descriptor data from referenced aliases. Furthermore, it helps on updating descriptor data according to SRC44 specifications.