@cosmjs/tendermint-rpc
Advanced tools
Comparing version 0.30.0 to 0.30.1
@@ -46,10 +46,16 @@ "use strict"; | ||
static async connect(endpoint) { | ||
let rpcClient; | ||
if (typeof endpoint === "object") { | ||
return Tendermint34Client.create(new rpcclients_1.HttpClient(endpoint)); | ||
rpcClient = new rpcclients_1.HttpClient(endpoint); | ||
} | ||
else { | ||
const useHttp = endpoint.startsWith("http://") || endpoint.startsWith("https://"); | ||
const rpcClient = useHttp ? new rpcclients_1.HttpClient(endpoint) : new rpcclients_1.WebsocketClient(endpoint); | ||
return Tendermint34Client.create(rpcClient); | ||
rpcClient = useHttp ? new rpcclients_1.HttpClient(endpoint) : new rpcclients_1.WebsocketClient(endpoint); | ||
} | ||
// For some very strange reason I don't understand, tests start to fail on some systems | ||
// (our CI) when skipping the status call before doing other queries. Sleeping a little | ||
// while did not help. Thus we query the version as a way to say "hi" to the backend, | ||
// even in cases where we don't use the result. | ||
const _version = await this.detectVersion(rpcClient); | ||
return Tendermint34Client.create(rpcClient); | ||
} | ||
@@ -60,7 +66,2 @@ /** | ||
static async create(rpcClient) { | ||
// For some very strange reason I don't understand, tests start to fail on some systems | ||
// (our CI) when skipping the status call before doing other queries. Sleeping a little | ||
// while did not help. Thus we query the version as a way to say "hi" to the backend, | ||
// even in cases where we don't use the result. | ||
const _version = await this.detectVersion(rpcClient); | ||
return new Tendermint34Client(rpcClient); | ||
@@ -67,0 +68,0 @@ } |
@@ -46,10 +46,16 @@ "use strict"; | ||
static async connect(endpoint) { | ||
let rpcClient; | ||
if (typeof endpoint === "object") { | ||
return Tendermint37Client.create(new rpcclients_1.HttpClient(endpoint)); | ||
rpcClient = new rpcclients_1.HttpClient(endpoint); | ||
} | ||
else { | ||
const useHttp = endpoint.startsWith("http://") || endpoint.startsWith("https://"); | ||
const rpcClient = useHttp ? new rpcclients_1.HttpClient(endpoint) : new rpcclients_1.WebsocketClient(endpoint); | ||
return Tendermint37Client.create(rpcClient); | ||
rpcClient = useHttp ? new rpcclients_1.HttpClient(endpoint) : new rpcclients_1.WebsocketClient(endpoint); | ||
} | ||
// For some very strange reason I don't understand, tests start to fail on some systems | ||
// (our CI) when skipping the status call before doing other queries. Sleeping a little | ||
// while did not help. Thus we query the version as a way to say "hi" to the backend, | ||
// even in cases where we don't use the result. | ||
const _version = await this.detectVersion(rpcClient); | ||
return Tendermint37Client.create(rpcClient); | ||
} | ||
@@ -60,7 +66,2 @@ /** | ||
static async create(rpcClient) { | ||
// For some very strange reason I don't understand, tests start to fail on some systems | ||
// (our CI) when skipping the status call before doing other queries. Sleeping a little | ||
// while did not help. Thus we query the version as a way to say "hi" to the backend, | ||
// even in cases where we don't use the result. | ||
const _version = await this.detectVersion(rpcClient); | ||
return new Tendermint37Client(rpcClient); | ||
@@ -67,0 +68,0 @@ } |
{ | ||
"name": "@cosmjs/tendermint-rpc", | ||
"version": "0.30.0", | ||
"version": "0.30.1", | ||
"description": "Tendermint RPC clients", | ||
@@ -45,9 +45,9 @@ "contributors": [ | ||
"dependencies": { | ||
"@cosmjs/crypto": "^0.30.0", | ||
"@cosmjs/encoding": "^0.30.0", | ||
"@cosmjs/json-rpc": "^0.30.0", | ||
"@cosmjs/math": "^0.30.0", | ||
"@cosmjs/socket": "^0.30.0", | ||
"@cosmjs/stream": "^0.30.0", | ||
"@cosmjs/utils": "^0.30.0", | ||
"@cosmjs/crypto": "^0.30.1", | ||
"@cosmjs/encoding": "^0.30.1", | ||
"@cosmjs/json-rpc": "^0.30.1", | ||
"@cosmjs/math": "^0.30.1", | ||
"@cosmjs/socket": "^0.30.1", | ||
"@cosmjs/stream": "^0.30.1", | ||
"@cosmjs/utils": "^0.30.1", | ||
"axios": "^0.21.2", | ||
@@ -89,5 +89,5 @@ "readonly-date": "^1.0.0", | ||
"typescript": "~4.6", | ||
"webpack": "^5.32.0", | ||
"webpack": "^5.76.0", | ||
"webpack-cli": "^4.6.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
4947
305466
Updated@cosmjs/crypto@^0.30.1
Updated@cosmjs/encoding@^0.30.1
Updated@cosmjs/json-rpc@^0.30.1
Updated@cosmjs/math@^0.30.1
Updated@cosmjs/socket@^0.30.1
Updated@cosmjs/stream@^0.30.1
Updated@cosmjs/utils@^0.30.1