@loopring-web/loopring-sdk / Exports / WsAPI

Class: WsAPI

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WsAPI(param, timeout?)

Parameters

Name Type Default value
param InitParam undefined
timeout number 3000

Inherited from

BaseAPI.constructor

Defined in

api/base_api.ts:86

Properties

baseUrl

Protected baseUrl: string = ""

Inherited from

BaseAPI.baseUrl

Defined in

api/base_api.ts:37


chainId

Protected chainId: ChainId = ChainId.MAINNET

Inherited from

BaseAPI.chainId

Defined in

api/base_api.ts:38


KEY_MESSAGE

Static KEY_MESSAGE: string = KEY_MESSAGE

Inherited from

BaseAPI.KEY_MESSAGE

Defined in

api/base_api.ts:36

Methods

genErr

genErr(err): RESULT_INFO

Parameters

Name Type
err Error

Returns

RESULT_INFO

Inherited from

BaseAPI.genErr

Defined in

api/base_api.ts:39


getAvailableBroker

getAvailableBroker(): Promise<{ broker: string }>

Returns

Promise<{ broker: string }>

Inherited from

BaseAPI.getAvailableBroker

Defined in

api/base_api.ts:97


getCounterFactualInfo

getCounterFactualInfo<T>(request): Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Type parameters

Name Type
T extends unknown

Parameters

Name Type
request GetCounterFactualInfoRequest

Returns

Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Inherited from

BaseAPI.getCounterFactualInfo

Defined in

api/base_api.ts:108


getWsKey

getWsKey(): Promise<any>

Returns

Promise<any>

Defined in

api/ws_api.ts:13


makeReq

Protected makeReq(): Request

Returns

Request

Inherited from

BaseAPI.makeReq

Defined in

api/base_api.ts:151


returnTxHash

Protected returnTxHash<T>(raw_data): RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
raw_data T

Returns

RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Inherited from

BaseAPI.returnTxHash

Defined in

api/base_api.ts:66


setBaseUrl

setBaseUrl(baseUrl): void

Parameters

Name Type
baseUrl string

Returns

void

Inherited from

BaseAPI.setBaseUrl

Defined in

api/base_api.ts:147


setChainId

setChainId(chainId): void

Parameters

Name Type
chainId ChainId

Returns

void

Inherited from

BaseAPI.setChainId

Defined in

api/base_api.ts:142

results matching ""

    No results matching ""