@bfchain/bnrtc2-client-api
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -31,3 +31,3 @@ import "@bfchain/bnrtc2-client-typings"; | ||
getServerConfig(): Promise<Bnrtc2.Bnrtc2ServerConfig | undefined>; | ||
getDwebServiceConfig(): Promise<Bnrtc2.Bnrtc2DwebServiceConfig | undefined>; | ||
getServiceInfo(service: string): Promise<Bnrtc2.Bnrtc2ServiceInfo | undefined>; | ||
getServiceAddresses(service: string): Promise<string[]>; | ||
@@ -34,0 +34,0 @@ connectAddress(address: string): Promise<boolean>; |
@@ -59,3 +59,3 @@ "use strict"; | ||
const result = yield res.json(); | ||
return result.result == true; | ||
return (result === null || result === void 0 ? void 0 : result.result) == true; | ||
} | ||
@@ -126,5 +126,5 @@ catch (e) { | ||
} | ||
getDwebServiceConfig() { | ||
getServiceInfo(service) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const url = this._getUrl(this.baseHttpUrl, const_1.API_PATH.HTTP_API_PATH_SERVER_GET_SERVICE_DWEB_CONFIG); | ||
const url = this._getUrl(this.baseHttpUrl, const_1.API_PATH.HTTP_API_PATH_SERVER_GET_SERVICE_INFO, { service }); | ||
return this.httpFetch(url).then((res) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -131,0 +131,0 @@ return yield this.httpJson(res); |
@@ -11,3 +11,3 @@ export declare const DEFAULT_BASE_API_HOSTNAME = "127.0.0.1"; | ||
HTTP_API_PATH_SERVER_GET_SERVER_CONFIG = "/bnrtc2/server/serverConfig", | ||
HTTP_API_PATH_SERVER_GET_SERVICE_DWEB_CONFIG = "/bnrtc2/server/service/dweb/config", | ||
HTTP_API_PATH_SERVER_GET_SERVICE_INFO = "/bnrtc2/server/getServiceInfo", | ||
HTTP_API_PATH_SERVER_GET_SERVICE_ADDRESSES = "/bnrtc2/server/getServiceAddresses", | ||
@@ -14,0 +14,0 @@ HTTP_API_PATH_SERVER_CONNECT_ADDRESS = "/bnrtc2/server/connectAddress", |
@@ -15,3 +15,3 @@ "use strict"; | ||
API_PATH["HTTP_API_PATH_SERVER_GET_SERVER_CONFIG"] = "/bnrtc2/server/serverConfig"; | ||
API_PATH["HTTP_API_PATH_SERVER_GET_SERVICE_DWEB_CONFIG"] = "/bnrtc2/server/service/dweb/config"; | ||
API_PATH["HTTP_API_PATH_SERVER_GET_SERVICE_INFO"] = "/bnrtc2/server/getServiceInfo"; | ||
API_PATH["HTTP_API_PATH_SERVER_GET_SERVICE_ADDRESSES"] = "/bnrtc2/server/getServiceAddresses"; | ||
@@ -18,0 +18,0 @@ API_PATH["HTTP_API_PATH_SERVER_CONNECT_ADDRESS"] = "/bnrtc2/server/connectAddress"; |
{ | ||
"name": "@bfchain/bnrtc2-client-api", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"main": "./build/index.js", | ||
@@ -8,3 +8,3 @@ "types": "./build/index.d.ts", | ||
"dependencies": { | ||
"@bfchain/bnrtc2-client-typings": "^2.0.7", | ||
"@bfchain/bnrtc2-client-typings": "^2.0.8", | ||
"@bfcs/util-evt": "^0.0.1-alpha.2" | ||
@@ -11,0 +11,0 @@ }, |
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
13276