Class TransactionFactory

Factory for creating NEM transactions.

Constructors

  • Creates a factory for the specified network.

    Parameters

    • network: Network

      NEM network.

    • Optional typeRuleOverrides: Map<string, Function>

      Type rule overrides.

    Returns TransactionFactory

Accessors

  • get ruleNames(): string[]
  • Gets rule names with registered hints.

    Returns string[]

    Rule names with registered hints.

Methods

  • Creates a transaction from a transaction descriptor.

    Parameters

    • transactionDescriptor: object

      Transaction descriptor.

    • Optional autosort: boolean

      When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

    Returns models.Transaction

    Newly created transaction.

  • Attaches a signature to a transaction.

    Parameters

    Returns string

    JSON transaction payload.

  • Deserializes a transaction from a binary payload.

    Parameters

    • payload: Uint8Array

      Binary payload.

    Returns models.Transaction

    Deserialized transaction.

  • Looks up the friendly name for the specified transaction.

    Parameters

    Returns string

    Transaction friendly name.