Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DtoMapping

Hierarchy

  • DtoMapping

Index

Constructors

constructor

Methods

Static assign

  • assign<T>(object: T, attributes: any): T
  • Creates a copy of the first object adding the attributes of the second object.

    Type parameters

    • T

    Parameters

    • object: T

      the object to be cloned

    • attributes: any

      the extra attributes to be added to the object.

    Returns T

    a copy of the first object with the new attributes added.

Static extractAccountRestrictionFromDto

  • extractAccountRestrictionFromDto(accountRestrictions: AccountRestrictionsInfoDTO): AccountRestrictions

Static mapEnum

  • mapEnum<E1, E2>(value: undefined | E1): E2
  • Map one enum type to another by value

    Type parameters

    • E1

    • E2

    Parameters

    • value: undefined | E1

      enum value to be mapped

    Returns E2

Static parseServerDuration

  • parseServerDuration(serverValue: string): Duration
  • It parse a server time/duration configuration like: - 1000ms 1000 milliseconds - 15s 15 seconds

    • 5m 5 minutes - 2h 2 hours - 10d 10 days

    into a @{@link Duration} object

    Parameters

    • serverValue: string

      time.

    Returns Duration

    an instant from that value.

Static toAddress

  • This method knows how to convert an address payload sent by Rest to Address.

    Currently rest sends hex encoded addresses, it is desired to use base32 encoded addresses.

    This method handles both format, encoded (deprecated) and base32 encoded addresses.

    Clients using this SDK will be able to process both payloads.

    Parameters

    • value: string

      the address in encoded (6823BB7C3C089D996585466380EDBDC19D4959184893E38C) format or decoded/plain format (SB3KUBHATFCPV7UZQLWAQ2EUR6SIHBSBEOEDDDF3)

    Returns Address

    the Address object.

Static toMerkleStateInfo

Static toSimpleHex

  • toSimpleHex(serverHex: string): string
  • It converts a server Hex like 0x017D'1694'0477'B3F5 to 017D16940477B3F5

    Parameters

    • serverHex: string

    Returns string

Generated using TypeDoc