@cityofzion/bs-neo-legacy 1.13.5 → 1.13.7
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/BSNeoLegacy.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class BSNeoLegacy<N extends string = string> implements IBSNeoLeg
|
|
|
32
32
|
signingCallback: TSigningCallback;
|
|
33
33
|
}>;
|
|
34
34
|
setNetwork(network: TBSNetwork<TBSNeoLegacyNetworkId>): void;
|
|
35
|
-
|
|
35
|
+
pingNode(url: string): Promise<TPingNetworkResponse>;
|
|
36
36
|
validateAddress(address: string): boolean;
|
|
37
37
|
validateEncrypted(key: string): boolean;
|
|
38
38
|
validateKey(key: string): boolean;
|
package/dist/BSNeoLegacy.js
CHANGED
|
@@ -108,14 +108,14 @@ class BSNeoLegacy {
|
|
|
108
108
|
this.neo3NeoLegacyMigrationService = new Neo3NeoLegacyMigrationService_1.Neo3NeoLegacyMigrationService(this);
|
|
109
109
|
}
|
|
110
110
|
// This method is done manually because we need to ensure that the request is aborted after timeout
|
|
111
|
-
|
|
111
|
+
pingNode(url) {
|
|
112
112
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
113
|
const abortController = new AbortController();
|
|
114
114
|
const timeout = setTimeout(() => {
|
|
115
115
|
abortController.abort();
|
|
116
116
|
}, 5000);
|
|
117
117
|
const timeStart = Date.now();
|
|
118
|
-
const response = yield axios_1.default.post(
|
|
118
|
+
const response = yield axios_1.default.post(url, {
|
|
119
119
|
jsonrpc: '2.0',
|
|
120
120
|
method: 'getblockcount',
|
|
121
121
|
params: [],
|
|
@@ -125,7 +125,7 @@ class BSNeoLegacy {
|
|
|
125
125
|
const latency = Date.now() - timeStart;
|
|
126
126
|
return {
|
|
127
127
|
latency,
|
|
128
|
-
url
|
|
128
|
+
url,
|
|
129
129
|
height: response.data.result,
|
|
130
130
|
};
|
|
131
131
|
});
|
|
@@ -13,6 +13,5 @@ export declare class DoraBDSNeoLegacy<N extends string> implements IBlockchainDa
|
|
|
13
13
|
getContract(contractHash: string): Promise<ContractResponse>;
|
|
14
14
|
getTokenInfo(tokenHash: string): Promise<TBSToken>;
|
|
15
15
|
getBalance(address: string): Promise<TBalanceResponse[]>;
|
|
16
|
-
getUnclaimed(address: string): Promise<string>;
|
|
17
16
|
getBlockHeight(): Promise<number>;
|
|
18
17
|
}
|
|
@@ -252,15 +252,6 @@ class DoraBDSNeoLegacy {
|
|
|
252
252
|
return yield Promise.all(promises);
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
getUnclaimed(address) {
|
|
256
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
-
var _a;
|
|
258
|
-
const { rpc } = BSNeoLegacyNeonJsSingletonHelper_1.BSNeoLegacyNeonJsSingletonHelper.getInstance();
|
|
259
|
-
const rpcClient = new rpc.RPCClient(__classPrivateFieldGet(this, _DoraBDSNeoLegacy_service, "f").network.url);
|
|
260
|
-
const response = yield rpcClient.getUnclaimed(address);
|
|
261
|
-
return ((_a = response === null || response === void 0 ? void 0 : response.unclaimed) !== null && _a !== void 0 ? _a : 0).toFixed(__classPrivateFieldGet(this, _DoraBDSNeoLegacy_service, "f").claimToken.decimals);
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
255
|
getBlockHeight() {
|
|
265
256
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
257
|
const { rpc } = BSNeoLegacyNeonJsSingletonHelper_1.BSNeoLegacyNeonJsSingletonHelper.getInstance();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neo-legacy",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "Coz",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@cityofzion/dora-ts": "~0.5.1",
|
|
13
13
|
"@cityofzion/neon-js": "4.8.3",
|
|
14
14
|
"axios": "~1.12.2",
|
|
15
|
-
"@cityofzion/blockchain-service": "1.
|
|
15
|
+
"@cityofzion/blockchain-service": "1.22.2"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/jest": "~30.0.0",
|