Class DescriptorDataBuilder
Methods
setAccount
- setAccount(accountId: string): this
setAlias
- setAlias(a: string, tld?: string): this
-
Parameters
-
a: string
-
Optional tld: string
Returns this
setAvatar
- setAvatar(ipfsCid: string, imageMimeTye: string): this
-
Parameters
-
ipfsCid: string
-
imageMimeTye: string
Returns this
setBackground
- setBackground(ipfsCid: string, imageMimeTye: string): this
-
Parameters
-
ipfsCid: string
-
imageMimeTye: string
Returns this
setCustomField
- setCustomField(fieldName: string, value: string): this
-
Parameters
-
fieldName: string
-
value: string
Returns this
setDescription
- setDescription(d: string): this
setExtension
- setExtension(e: string): this
setHomePage
- setHomePage(url: string): this
setName
- setName(name: string): this
setSendRule
- setSendRule(regex: string): this
setSocialMediaLinks
- setSocialMediaLinks(urls: string[]): this
Descriptor Data Builder
const descriptorData = DescriptorDataBuilder .create('Some name') .setBackground('QmUFc4dyX7TJn5dPxp8CrcDeedoV18owTBUWApYMuF6Koc', 'image/jpeg') .setAvatar('QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR', 'image/gif') .setSocialMediaLinks(['https://somelink.com']) .setAlias('alias','tld') // or just 'alias' (without tld - default: signum) .setCustomField('xc', 'value') .setDescription('description') .setExtension('QmUFc4dyX7TJn5dPxp8CrcDeedoV18owTBUWApYMuF6Koc') .setHomePage('https://homepage.com') .setType('oth') .setSendRule('^[a-Z]{3}$') .build();
Creates SRC44-compliant DescriptorData object to be used as description in Smart Contracts, Account Info, and/or Aliases