import { SRC44DescriptorType } from './typings'; import { DescriptorData } from './DescriptorData'; /** * Descriptor Data Builder * * ```ts * 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 {@link DescriptorData} object to be used as description in Smart Contracts, Account Info, and/or Aliases * */ export declare class DescriptorDataBuilder { private constructor(); private data; /** * Creates the builder instance. See also {@link DescriptorDataBuilder.build} * @param name The name for the descriptor/profile */ static create(name?: string): DescriptorDataBuilder; /** * Creates the builder instance from an existing {@link DescriptorData} * @param descriptor The descriptor data */ static createWith(descriptor: DescriptorData): DescriptorDataBuilder; setName(name: string): this; setSendRule(regex: string): this; setAccount(accountId: string): this; setId(id: string): this; setHomePage(url: string): this; setSocialMediaLinks(urls: string[]): this; setAlias(a: string, tld?: string): this; setType(t: SRC44DescriptorType): this; setExtension(e: string): this; setAvatar(ipfsCid: string, imageMimeTye: string): this; setBackground(ipfsCid: string, imageMimeTye: string): this; setDescription(d: string): this; setCustomField(fieldName: string, value: string): this; /** * Builds the final {@link DescriptorData} instance. See also {@link DescriptorDataBuilder.create} */ build(): DescriptorData; }