Representation of a transfer's memo or a registerData transaction's data, which enforces that:

  • the byte length is <= 256

Hierarchy

  • DataBlob

Constructors

Properties

Methods

Constructors

Properties

__type: TypedJsonDiscriminator = JSON_DISCRIMINATOR

Having a private field prevents similar structured objects to be considered the same type (similar to nominal typing).

data: Buffer
fromTypedJSON: ((json: TypedJson<string>) => string | DataBlob) = ...

Type declaration

    • (json: TypedJson<string>): string | DataBlob
    • Takes a TypedJson object and converts it to instance of type DataBlob.

      Throws

      • If unexpected JSON string is passed.

      Returns

      The parsed instance.

      Parameters

      • json: TypedJson<string>

        The typed JSON to convert.

      Returns string | DataBlob

Methods

  • Takes a hex-string and converts it to an instance of type DataBlob. The method expects the string to be prefixed with a 2-byte length like the one returned by toJSON.

    Returns

    The parsed instance.

    Parameters

    • value: string

      Hex-string to be converted to a DataBlob.

    Returns DataBlob

Generated using TypeDoc