Options
All
  • Public
  • Public/Protected
  • All
Menu

Node http repository.

since

1.0

Hierarchy

Implements

Index

Constructors

constructor

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

Properties

Protected Optional Readonly fetchApi

fetchApi: any

fetch function to be used when performing rest requests.

Protected Readonly url

url: string

Base catapult-rest url

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

getNodeHealth

getNodeInfo

getNodePeers

  • getNodePeers(): Observable<NodeInfo[]>

getNodeRoles

  • getNodeRoles(roleType: number): RoleType[]

getNodeTime

getServerInfo

getStorageInfo

getUnlockedAccount

  • getUnlockedAccount(): Observable<string[]>

Private toNodeInfo

  • toNodeInfo(nodeInfo: NodeInfoDTO): NodeInfo

Static errorHandling

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

Generated using TypeDoc