Options
All
  • Public
  • Public/Protected
  • All
Menu

Network http repository.

since

1.0

Hierarchy

Implements

Index

Constructors

constructor

  • new NetworkHttp(url: string, fetchApi?: any): NetworkHttp

Properties

Protected Optional Readonly fetchApi

fetchApi: any

Private Readonly networkRoutesApi

networkRoutesApi: NetworkRoutesApi

Protected Readonly url

url: string

Methods

Protected call

  • call<D, M>(remoteCall: Promise<D>, mapper: (value: D) => M): Observable<M>
  • This method knows how to call, convert and handle exception when doing remote http operations.

    Type parameters

    • D

    • M

    Parameters

    • remoteCall: Promise<D>

      the remote call

    • mapper: (value: D) => M

      the mapper from dto to the model object.

        • (value: D): M
        • Parameters

          • value: D

          Returns M

    Returns Observable<M>

config

  • config(): Configuration

createNetworkTypeObservable

getNetworkName

getNetworkProperties

  • Returns the content from a catapult-server network configuration file (resources/config-network.properties). To enable this feature, the REST setting "network.propertiesFilePath" must define where the file is located. This is adjustable via the configuration file (rest/resources/rest.json) per REST instance.

    summary

    Get the network properties

    Returns Observable<NetworkConfiguration>

getNetworkType

getRentalFees

  • Returns the estimated effective rental fees for namespaces and mosaics. This endpoint is only available if the REST instance has access to catapult-server resources/config-network.properties file. To activate this feature, add the setting "network.propertiesFilePath" in the configuration file (rest/resources/rest.json).

    summary

    Get rental fees information

    Returns Observable<RentalFees>

getTransactionFees

  • Returns information about the average, median, highest and lower fee multiplier over the last "numBlocksTransactionFeeStats". The setting "numBlocksTransactionFeeStats" is adjustable via a configuration file (rest/resources/rest.json) per REST instance.

    summary

    Get transaction fees information

    Returns Observable<TransactionFees>

Private mapNetworkConfigurationDto

Static errorHandling

  • errorHandling(error: any): Promise<Error>

Generated using TypeDoc