Constructors

Properties

primaryType: string

The primary type for the structured [[types]].

This is derived automatically from the [[types]], since no recursion is possible, once the DAG for the types is consturcted internally, the primary type must be the only remaining type with no parent nodes.

Accessors

Methods

  • @_ignore:

    Parameters

    • type: string
    • value: any
    • callback: (type: string, data: any) => any

    Returns any

  • Return the fulled encoded %%value%% for the [[types]].

    Parameters

    • value: Record<string, any>

    Returns string

  • Return the encoded %%value%% for the %%type%%.

    Parameters

    • type: string
    • value: any

    Returns string

  • Return the full type for %%name%%.

    Parameters

    • name: string

    Returns string

  • Returnthe encoder for the specific %%type%%.

    Parameters

    • type: string

    Returns (value: any) => string

  • Return the hash of the fully encoded %%value%% for the [[types]].

    Parameters

    • value: Record<string, any>

    Returns string

  • Returns the hash of %%value%% for the type of %%name%%.

    Parameters

    • name: string
    • value: Record<string, any>

    Returns string

  • Call %%calback%% for each value in %%value%%, passing the type and component within %%value%%.

    This is useful for replacing addresses or other transformation that may be desired on each component, based on its type.

    Parameters

    • value: Record<string, any>
    • callback: (type: string, data: any) => any

    Returns any

  • Return the hashed struct for %%value%% using %%types%% and %%name%%.

    Parameters

    • name: string
    • types: Record<string, TypedDataField[]>
    • value: Record<string, any>

    Returns string