@bfchain/bnrtc2-client-api
Advanced tools
Comparing version 2.0.13 to 2.0.14
@@ -45,4 +45,5 @@ import "@bfchain/bnrtc2-client-typings"; | ||
delPeers(hosts: string[]): Promise<boolean>; | ||
clearPeers(): Promise<boolean>; | ||
getPeers(): Promise<string[]>; | ||
} | ||
//# sourceMappingURL=api.d.ts.map |
@@ -231,2 +231,14 @@ "use strict"; | ||
} | ||
clearPeers() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const url = this._getUrl(this.baseHttpUrl, const_1.API_PATH.HTTP_API_PATH_SERVER_CLEAR_PEERS); | ||
return this.httpFetch(url) | ||
.then((res) => __awaiter(this, void 0, void 0, function* () { | ||
return yield this.httpBoolResult(res); | ||
})) | ||
.catch((e) => { | ||
return this.httpFetchError(e, false); | ||
}); | ||
}); | ||
} | ||
getPeers() { | ||
@@ -233,0 +245,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -9,2 +9,3 @@ export declare const DEFAULT_BASE_API_HOSTNAME = "127.0.0.1"; | ||
HTTP_API_PATH_SERVER_DEL_PEERS = "/bnrtc2/server/deletePeers", | ||
HTTP_API_PATH_SERVER_CLEAR_PEERS = "/bnrtc2/server/clearPeers", | ||
HTTP_API_PATH_SERVER_GET_PEERS = "/bnrtc2/server/getPeers", | ||
@@ -11,0 +12,0 @@ HTTP_API_PATH_SERVER_GET_SERVER_CONFIG = "/bnrtc2/server/serverConfig", |
@@ -13,2 +13,3 @@ "use strict"; | ||
API_PATH["HTTP_API_PATH_SERVER_DEL_PEERS"] = "/bnrtc2/server/deletePeers"; | ||
API_PATH["HTTP_API_PATH_SERVER_CLEAR_PEERS"] = "/bnrtc2/server/clearPeers"; | ||
API_PATH["HTTP_API_PATH_SERVER_GET_PEERS"] = "/bnrtc2/server/getPeers"; | ||
@@ -15,0 +16,0 @@ API_PATH["HTTP_API_PATH_SERVER_GET_SERVER_CONFIG"] = "/bnrtc2/server/serverConfig"; |
{ | ||
"name": "@bfchain/bnrtc2-client-api", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"main": "./build/index.js", | ||
@@ -8,3 +8,3 @@ "types": "./build/index.d.ts", | ||
"dependencies": { | ||
"@bfchain/bnrtc2-client-typings": "^2.0.13", | ||
"@bfchain/bnrtc2-client-typings": "^2.0.14", | ||
"@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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
16509
375
1