@liskhq/lisk-api-client
Advanced tools
Comparing version 6.1.0-rc.0 to 6.1.0
import { EventCallback } from './types'; | ||
export declare const CONNECTION_TIMEOUT = 5000; | ||
export declare const RESPONSE_TIMEOUT = 10000; | ||
export declare class WSChannel { | ||
@@ -3,0 +5,0 @@ isAlive: boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WSChannel = void 0; | ||
exports.WSChannel = exports.RESPONSE_TIMEOUT = exports.CONNECTION_TIMEOUT = void 0; | ||
const WebSocket = require("isomorphic-ws"); | ||
const events_1 = require("events"); | ||
const utils_1 = require("./utils"); | ||
const CONNECTION_TIMEOUT = 2000; | ||
const RESPONSE_TIMEOUT = 3000; | ||
exports.CONNECTION_TIMEOUT = 5000; | ||
exports.RESPONSE_TIMEOUT = 10000; | ||
class WSChannel { | ||
@@ -43,3 +43,3 @@ constructor(url) { | ||
try { | ||
await (0, utils_1.promiseWithTimeout)([connectHandler, errorHandler], CONNECTION_TIMEOUT, `Could not connect in ${CONNECTION_TIMEOUT}ms`); | ||
await (0, utils_1.promiseWithTimeout)([connectHandler, errorHandler], exports.CONNECTION_TIMEOUT, `Could not connect in ${exports.CONNECTION_TIMEOUT}ms`); | ||
} | ||
@@ -73,3 +73,3 @@ catch (err) { | ||
this._ws.close(); | ||
await (0, utils_1.promiseWithTimeout)([closeHandler], CONNECTION_TIMEOUT, `Could not disconnect in ${CONNECTION_TIMEOUT}ms`); | ||
await (0, utils_1.promiseWithTimeout)([closeHandler], exports.CONNECTION_TIMEOUT, `Could not disconnect in ${exports.CONNECTION_TIMEOUT}ms`); | ||
} | ||
@@ -91,3 +91,3 @@ async invoke(actionName, params) { | ||
this._requestCounter += 1; | ||
return (0, utils_1.promiseWithTimeout)([response.promise], RESPONSE_TIMEOUT, `Response not received in ${RESPONSE_TIMEOUT}ms`); | ||
return (0, utils_1.promiseWithTimeout)([response.promise], exports.RESPONSE_TIMEOUT, `Response not received in ${exports.RESPONSE_TIMEOUT}ms`); | ||
} | ||
@@ -94,0 +94,0 @@ subscribe(eventName, cb) { |
{ | ||
"name": "@liskhq/lisk-api-client", | ||
"version": "6.1.0-rc.0", | ||
"version": "6.1.0", | ||
"description": "An API client for the Lisk network", | ||
@@ -38,6 +38,6 @@ "author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>", | ||
"dependencies": { | ||
"@liskhq/lisk-codec": "^0.5.0-rc.0", | ||
"@liskhq/lisk-cryptography": "^4.1.0-rc.0", | ||
"@liskhq/lisk-transactions": "^6.1.0-rc.0", | ||
"@liskhq/lisk-validator": "^0.9.0-rc.0", | ||
"@liskhq/lisk-codec": "^0.5.0", | ||
"@liskhq/lisk-cryptography": "^4.1.0", | ||
"@liskhq/lisk-transactions": "^6.1.0", | ||
"@liskhq/lisk-validator": "^0.9.0", | ||
"isomorphic-ws": "4.0.1", | ||
@@ -48,3 +48,3 @@ "ws": "8.11.0", | ||
"devDependencies": { | ||
"@liskhq/lisk-chain": "^0.6.0-rc.0", | ||
"@liskhq/lisk-chain": "^0.6.0", | ||
"@types/jest": "29.2.3", | ||
@@ -69,3 +69,3 @@ "@types/jest-when": "3.5.2", | ||
}, | ||
"gitHead": "fef17823eb43545360c106386ff20bf0928636bb" | ||
"gitHead": "eff5d4688a080762c7e7af054bd4bc270e38eb3b" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
102942
1339
0