@cosmjs/tendermint-rpc
Advanced tools
Comparing version 0.31.0 to 0.31.1
@@ -284,3 +284,13 @@ "use strict"; | ||
function decodeSyncInfo(data) { | ||
const earliestBlockHeight = data.earliest_block_height | ||
? (0, inthelpers_1.apiToSmallInt)(data.earliest_block_height) | ||
: undefined; | ||
const earliestBlockTime = data.earliest_block_time | ||
? (0, dates_1.fromRfc3339WithNanoseconds)(data.earliest_block_time) | ||
: undefined; | ||
return { | ||
earliestAppHash: data.earliest_app_hash ? (0, encoding_1.fromHex)(data.earliest_app_hash) : undefined, | ||
earliestBlockHash: data.earliest_block_hash ? (0, encoding_1.fromHex)(data.earliest_block_hash) : undefined, | ||
earliestBlockHeight: earliestBlockHeight || undefined, | ||
earliestBlockTime: earliestBlockTime?.getTime() ? earliestBlockTime : undefined, | ||
latestBlockHash: (0, encoding_1.fromHex)((0, encodings_1.assertNotEmpty)(data.latest_block_hash)), | ||
@@ -287,0 +297,0 @@ latestAppHash: (0, encoding_1.fromHex)((0, encodings_1.assertNotEmpty)(data.latest_app_hash)), |
@@ -268,2 +268,6 @@ import { ReadonlyDate } from "readonly-date"; | ||
export interface SyncInfo { | ||
readonly earliestAppHash?: Uint8Array; | ||
readonly earliestBlockHash?: Uint8Array; | ||
readonly earliestBlockHeight?: number; | ||
readonly earliestBlockTime?: ReadonlyDate; | ||
readonly latestBlockHash: Uint8Array; | ||
@@ -270,0 +274,0 @@ readonly latestAppHash: Uint8Array; |
@@ -284,3 +284,13 @@ "use strict"; | ||
function decodeSyncInfo(data) { | ||
const earliestBlockHeight = data.earliest_block_height | ||
? (0, inthelpers_1.apiToSmallInt)(data.earliest_block_height) | ||
: undefined; | ||
const earliestBlockTime = data.earliest_block_time | ||
? (0, dates_1.fromRfc3339WithNanoseconds)(data.earliest_block_time) | ||
: undefined; | ||
return { | ||
earliestAppHash: data.earliest_app_hash ? (0, encoding_1.fromHex)(data.earliest_app_hash) : undefined, | ||
earliestBlockHash: data.earliest_block_hash ? (0, encoding_1.fromHex)(data.earliest_block_hash) : undefined, | ||
earliestBlockHeight: earliestBlockHeight || undefined, | ||
earliestBlockTime: earliestBlockTime?.getTime() ? earliestBlockTime : undefined, | ||
latestBlockHash: (0, encoding_1.fromHex)((0, encodings_1.assertNotEmpty)(data.latest_block_hash)), | ||
@@ -287,0 +297,0 @@ latestAppHash: (0, encoding_1.fromHex)((0, encodings_1.assertNotEmpty)(data.latest_app_hash)), |
@@ -273,2 +273,6 @@ import { ReadonlyDate } from "readonly-date"; | ||
export interface SyncInfo { | ||
readonly earliestAppHash?: Uint8Array; | ||
readonly earliestBlockHash?: Uint8Array; | ||
readonly earliestBlockHeight?: number; | ||
readonly earliestBlockTime?: ReadonlyDate; | ||
readonly latestBlockHash: Uint8Array; | ||
@@ -275,0 +279,0 @@ readonly latestAppHash: Uint8Array; |
{ | ||
"name": "@cosmjs/tendermint-rpc", | ||
"version": "0.31.0", | ||
"version": "0.31.1", | ||
"description": "Tendermint RPC clients", | ||
@@ -45,9 +45,9 @@ "contributors": [ | ||
"dependencies": { | ||
"@cosmjs/crypto": "^0.31.0", | ||
"@cosmjs/encoding": "^0.31.0", | ||
"@cosmjs/json-rpc": "^0.31.0", | ||
"@cosmjs/math": "^0.31.0", | ||
"@cosmjs/socket": "^0.31.0", | ||
"@cosmjs/stream": "^0.31.0", | ||
"@cosmjs/utils": "^0.31.0", | ||
"@cosmjs/crypto": "^0.31.1", | ||
"@cosmjs/encoding": "^0.31.1", | ||
"@cosmjs/json-rpc": "^0.31.1", | ||
"@cosmjs/math": "^0.31.1", | ||
"@cosmjs/socket": "^0.31.1", | ||
"@cosmjs/stream": "^0.31.1", | ||
"@cosmjs/utils": "^0.31.1", | ||
"axios": "^0.21.2", | ||
@@ -54,0 +54,0 @@ "readonly-date": "^1.0.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
308192
4975
Updated@cosmjs/crypto@^0.31.1
Updated@cosmjs/encoding@^0.31.1
Updated@cosmjs/json-rpc@^0.31.1
Updated@cosmjs/math@^0.31.1
Updated@cosmjs/socket@^0.31.1
Updated@cosmjs/stream@^0.31.1
Updated@cosmjs/utils@^0.31.1