@cityofzion/bs-solana 2.0.3 → 2.0.5
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/BSSolana.d.ts +1 -1
- package/dist/BSSolana.js +3 -3
- package/package.json +2 -2
package/dist/BSSolana.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class BSSolana<N extends string = string> implements IBSSolana<N>
|
|
|
22
22
|
tokenService: ITokenService;
|
|
23
23
|
constructor(name: N, network?: TBSNetwork<TBSSolanaNetworkId>, getLedgerTransport?: TGetLedgerTransport<N>);
|
|
24
24
|
setNetwork(network: TBSNetwork<TBSSolanaNetworkId>): void;
|
|
25
|
-
|
|
25
|
+
pingNode(url: string): Promise<TPingNetworkResponse>;
|
|
26
26
|
validateAddress(address: string): boolean;
|
|
27
27
|
validateKey(key: string): boolean;
|
|
28
28
|
generateAccountFromMnemonic(mnemonic: string, index: number): TBSAccount<N>;
|
package/dist/BSSolana.js
CHANGED
|
@@ -106,14 +106,14 @@ class BSSolana {
|
|
|
106
106
|
__classPrivateFieldSet(this, _BSSolana_connection, new web3_js_1.default.Connection(this.network.url), "f");
|
|
107
107
|
}
|
|
108
108
|
// This method is done manually because we need to ensure that the request is aborted after timeout
|
|
109
|
-
|
|
109
|
+
pingNode(url) {
|
|
110
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
const abortController = new AbortController();
|
|
112
112
|
const timeout = setTimeout(() => {
|
|
113
113
|
abortController.abort();
|
|
114
114
|
}, 5000);
|
|
115
115
|
const timeStart = Date.now();
|
|
116
|
-
const response = yield axios_1.default.post(
|
|
116
|
+
const response = yield axios_1.default.post(url, {
|
|
117
117
|
jsonrpc: '2.0',
|
|
118
118
|
id: 1234,
|
|
119
119
|
method: 'getBlockHeight',
|
|
@@ -122,7 +122,7 @@ class BSSolana {
|
|
|
122
122
|
const latency = Date.now() - timeStart;
|
|
123
123
|
return {
|
|
124
124
|
latency,
|
|
125
|
-
url
|
|
125
|
+
url,
|
|
126
126
|
height: response.data.result,
|
|
127
127
|
};
|
|
128
128
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-solana",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@ledgerhq/hw-transport": "~6.31.11",
|
|
22
22
|
"@metaplex-foundation/js": "~0.20.1",
|
|
23
23
|
"date-fns": "~4.1.0",
|
|
24
|
-
"@cityofzion/blockchain-service": "1.
|
|
24
|
+
"@cityofzion/blockchain-service": "1.22.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@ledgerhq/hw-transport-node-hid": "~6.29.12",
|