/** * Copyright (c) 2022 Signum Network */ import { Descriptor, SRC44Descriptor, SRC44DescriptorType } from './typings'; import { Amount } from '@signumjs/util'; /** * Descriptor Data * * SRC44-compliant Descriptor Data to be used as description in Smart Contracts, Account Info, and/or Aliases. * Use {@link DescriptorDataBuilder} to construct from the scratch, or use this to parse json data * */ export declare class DescriptorData { private data; private readonly strict; private constructor(); /** * Leaky abstraction to get access to the pure raw SRC44 descriptor data * @return the raw SRC44 object. */ get raw(): SRC44Descriptor; get version(): number; get name(): string; /** * The alias may have a tld, which then returns the alias as `alias:tld` */ get alias(): string; get id(): string; get account(): string; get description(): string; get type(): SRC44DescriptorType; get extension(): string; get avatar(): import("./typings").IpfsMediaType; get background(): import("./typings").IpfsMediaType; get sendRule(): RegExp; get homePage(): string; get socialMediaLinks(): string[]; /** * Creates a bare minimum, but strict, SRC44 descriptor instance. * @param name The name */ static create(name?: string): DescriptorData; /** * Creates/Parses a SRC44 compliant descriptor string * @param jsonString The SRC44 compliant string. See also {@link stringify} * @param strict If true, the standard check is more strictly * @return A new instance of DescriptorData * @throws SRC44ParseException in case of errors */ static parse(jsonString: string, strict?: boolean): DescriptorData; /** * Clones the current instance. * @return A copied instance of DescriptorData */ clone(): DescriptorData; /** * Merges another descriptor data instance into this one. This operation _mutates_ this instance. * @param data data to be merged * @return The merged result. */ merge(data: DescriptorData): this; /** * Gets a custom field (inline extension) * @param fieldName */ getCustomField(fieldName: string): unknown; /** * Gets a more human friendly version of the data */ get(): Descriptor; /** * Validates the current descriptor data. * @throws in case of invalid data. */ validate(): void; /** * @return The SRC44 string to be set with Signum Accounts, Contracts and/or Aliases * @throws if the string exceeds 1000 bytes. */ stringify(): string; /** * Estimates the minimum transaction fee for the given payload * @param baseFee The baseFee for calculation in planck. Default is 0.2 SIGNA = 20000000 Planck * @return fee in Planck */ estimateFeePlanck(baseFee?: number): string; estimateFee(text: string, baseFee: Amount): Amount; }