UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

45 lines (44 loc) 1.48 kB
"use strict"; /* 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.PartialBlockIdentifierToJSON = exports.PartialBlockIdentifierFromJSONTyped = exports.PartialBlockIdentifierFromJSON = void 0; const runtime_1 = require("../runtime"); function PartialBlockIdentifierFromJSON(json) { return PartialBlockIdentifierFromJSONTyped(json, false); } exports.PartialBlockIdentifierFromJSON = PartialBlockIdentifierFromJSON; function PartialBlockIdentifierFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { index: !runtime_1.exists(json, 'index') ? undefined : json['index'], hash: !runtime_1.exists(json, 'hash') ? undefined : json['hash'], }; } exports.PartialBlockIdentifierFromJSONTyped = PartialBlockIdentifierFromJSONTyped; function PartialBlockIdentifierToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { index: value.index, hash: value.hash, }; } exports.PartialBlockIdentifierToJSON = PartialBlockIdentifierToJSON;