@cityofzion/bs-neo3 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BSNeo3.d.ts +1 -1
- package/dist/BSNeo3.js +3 -3
- package/package.json +2 -2
package/dist/BSNeo3.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class BSNeo3<N extends string = string> implements IBSNeo3<N> {
|
|
|
29
29
|
walletConnectService: IWalletConnectService;
|
|
30
30
|
constructor(name: N, network?: TBSNetwork<TBSNeo3NetworkId>, getLedgerTransport?: TGetLedgerTransport<N>);
|
|
31
31
|
setNetwork(network: TBSNetwork<TBSNeo3NetworkId>): void;
|
|
32
|
-
|
|
32
|
+
pingNode(url: string): Promise<TPingNetworkResponse>;
|
|
33
33
|
generateSigningCallback(account: TBSAccount<N>): Promise<{
|
|
34
34
|
neonJsAccount: wallet.Account;
|
|
35
35
|
signingCallback: api.SigningFunction;
|
package/dist/BSNeo3.js
CHANGED
|
@@ -78,14 +78,14 @@ class BSNeo3 {
|
|
|
78
78
|
this.walletConnectService = new WalletConnectServiceNeo3_1.WalletConnectServiceNeo3(this);
|
|
79
79
|
}
|
|
80
80
|
// This method is done manually because we need to ensure that the request is aborted after timeout
|
|
81
|
-
|
|
81
|
+
pingNode(url) {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
83
|
const abortController = new AbortController();
|
|
84
84
|
const timeout = setTimeout(() => {
|
|
85
85
|
abortController.abort();
|
|
86
86
|
}, 5000);
|
|
87
87
|
const timeStart = Date.now();
|
|
88
|
-
const response = yield axios_1.default.post(
|
|
88
|
+
const response = yield axios_1.default.post(url, {
|
|
89
89
|
jsonrpc: '2.0',
|
|
90
90
|
method: 'getblockcount',
|
|
91
91
|
params: [],
|
|
@@ -95,7 +95,7 @@ class BSNeo3 {
|
|
|
95
95
|
const latency = Date.now() - timeStart;
|
|
96
96
|
return {
|
|
97
97
|
latency,
|
|
98
|
-
url
|
|
98
|
+
url,
|
|
99
99
|
height: response.data.result,
|
|
100
100
|
};
|
|
101
101
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neo3",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@cityofzion/neon-core": "~5.7.0",
|
|
16
16
|
"@cityofzion/neon-dappkit": "~0.6.0",
|
|
17
17
|
"axios": "~1.12.2",
|
|
18
|
-
"@cityofzion/blockchain-service": "1.22.
|
|
18
|
+
"@cityofzion/blockchain-service": "1.22.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@cityofzion/neon-dappkit-types": "~0.5.0",
|