rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
49 lines (48 loc) • 1.62 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Rosetta
* Build Once. Integrate Your Blockchain Everywhere.
*
* The version of the OpenAPI document: 1.4.10
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SyncStatusToJSON = exports.SyncStatusFromJSONTyped = exports.SyncStatusFromJSON = void 0;
const runtime_1 = require("../runtime");
function SyncStatusFromJSON(json) {
return SyncStatusFromJSONTyped(json, false);
}
exports.SyncStatusFromJSON = SyncStatusFromJSON;
function SyncStatusFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
current_index: !runtime_1.exists(json, 'current_index') ? undefined : json['current_index'],
target_index: !runtime_1.exists(json, 'target_index') ? undefined : json['target_index'],
stage: !runtime_1.exists(json, 'stage') ? undefined : json['stage'],
synced: !runtime_1.exists(json, 'synced') ? undefined : json['synced'],
};
}
exports.SyncStatusFromJSONTyped = SyncStatusFromJSONTyped;
function SyncStatusToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
current_index: value.current_index,
target_index: value.target_index,
stage: value.stage,
synced: value.synced,
};
}
exports.SyncStatusToJSON = SyncStatusToJSON;