Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DescriptorDataBuilder

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

Hierarchy

  • DescriptorDataBuilder

Index

Methods

build

setAccount

  • setAccount(accountId: string): this

setAlias

  • setAlias(a: string, tld?: string): this

setAvatar

  • setAvatar(ipfsCid: string, imageMimeTye: string): this

setBackground

  • setBackground(ipfsCid: string, imageMimeTye: string): this

setCustomField

  • setCustomField(fieldName: string, value: string): this

setDescription

  • setDescription(d: string): this

setExtension

  • setExtension(e: string): this

setHomePage

  • setHomePage(url: string): this

setId

  • setId(id: string): this

setName

  • setName(name: string): this

setSendRule

  • setSendRule(regex: string): this

setSocialMediaLinks

  • setSocialMediaLinks(urls: string[]): this

setType

Static create

Static createWith