@solana/web3.js
Advanced tools
Comparing version 0.16.0 to 0.16.1
{ | ||
"coverage": "100%", | ||
"expectCount": 148, | ||
"actualCount": 148, | ||
"expectCount": 149, | ||
"actualCount": 149, | ||
"files": { | ||
@@ -22,4 +22,4 @@ "src/account.js": { | ||
"src/connection.js": { | ||
"expectCount": 52, | ||
"actualCount": 52, | ||
"expectCount": 53, | ||
"actualCount": 53, | ||
"undocumentLines": [] | ||
@@ -26,0 +26,0 @@ }, |
{ | ||
"name": "@solana/web3.js", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"description": "Solana Javascript API", | ||
@@ -107,3 +107,3 @@ "keywords": [ | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"flow-bin": "0.99.1", | ||
"flow-bin": "0.101.0", | ||
"flow-typed": "2.5.1", | ||
@@ -110,0 +110,0 @@ "fs-file-tree": "1.0.7", |
@@ -174,2 +174,15 @@ // @flow | ||
); | ||
/** | ||
* @ignore | ||
*/ | ||
const GetClusterNodes_015 = jsonRpcResult( | ||
struct.list([ | ||
struct({ | ||
id: 'string', | ||
gossip: 'string', | ||
tpu: struct.union(['null', 'string']), | ||
rpc: struct.union(['null', 'string']), | ||
}), | ||
]), | ||
); | ||
@@ -432,2 +445,20 @@ /** | ||
const unsafeRes = await this._rpcRequest('getClusterNodes', []); | ||
// Legacy v0.15 response. TODO: Remove in August 2019 | ||
try { | ||
const res_015 = GetClusterNodes_015(unsafeRes); | ||
if (res_015.error) { | ||
console.log('no', res_015.error); | ||
throw new Error(res_015.error.message); | ||
} | ||
return res_015.result.map(node => { | ||
node.pubkey = node.id; | ||
node.id = undefined; | ||
return node; | ||
}); | ||
} catch (e) { | ||
// Not legacy format | ||
} | ||
// End Legacy v0.15 response | ||
const res = GetClusterNodes(unsafeRes); | ||
@@ -434,0 +465,0 @@ if (res.error) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
17109565
523397