Options
All
  • Public
  • Public/Protected
  • All
Menu
class

MetadataService

package

Governable

subpackage

Services

since

v1.0.0

description

Class that describes a service to facilitate the handling and processes with network-wide metadata.

Hierarchy

Index

Constructors

constructor

Properties

Protected context

context: Context

Static SORT_ORDER

SORT_ORDER: string[] = Object.keys(MetadataService.KNOWN_METADATAS)
static
access

public

description

Entries are sorted by index of appearance.

Methods

Protected formatMetadata

  • function

    Governable.MetadataService.formatMetadata()

    access

    protected

    description

    Helper function to format metadata entries

    see

    {FormattedMetadata}

    Parameters

    • metadata: Metadata

    Returns FormattedMetadata

    The formatted metadata object.

readMetadataFromNetwork

  • function

    Governable.MetadataService.readTransactionFromNetwork()

    access

    public

    description

    Gets metadata given a distributed organization target public account address.

    Parameters

    • target: Address

    Returns Promise<MetadataBucket>

    The transaction or nothing.

Protected sortPredicate

Protected toDictionary

  • function

    Governable.MetadataService.toDictionary()

    access

    protected

    description

    Helper function to build a key-value pair of a metadata entry.

    Parameters

    Returns object

    The entry as a key-value pair.

    • [k: string]: string

Static getKnownMetadataKey

  • getKnownMetadataKey(hexKey: string): string
  • function

    Governable.MetadataService.getKnownMetadataKey()

    static
    access

    public

    description

    Helper function to retrieve known mosaic metadata keys

    Parameters

    • hexKey: string

      The hexadecimal scoped metadata key.

    Returns string

    The snake-case representation if exists.

Object literals

Static KNOWN_METADATAS

KNOWN_METADATAS: object
static
access

public

description

Known metadata keys

XXX1

XXX1: string = "dao_name"

XXX2

XXX2: string = "dao_code"

XXX3

XXX3: string = "dao_website_uri"

XXX4

XXX4: string = "dao_contact_uri"

XXX5

XXX5: string = "dao_description"

XXX6

XXX6: string = "dao_image_uri"

Generated using TypeDoc