UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

47 lines (46 loc) 1.34 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.CurrencyToJSON = exports.CurrencyFromJSONTyped = exports.CurrencyFromJSON = void 0; const runtime_1 = require("../runtime"); function CurrencyFromJSON(json) { return CurrencyFromJSONTyped(json, false); } exports.CurrencyFromJSON = CurrencyFromJSON; function CurrencyFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { symbol: json['symbol'], decimals: json['decimals'], metadata: !runtime_1.exists(json, 'metadata') ? undefined : json['metadata'], }; } exports.CurrencyFromJSONTyped = CurrencyFromJSONTyped; function CurrencyToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { symbol: value.symbol, decimals: value.decimals, metadata: value.metadata, }; } exports.CurrencyToJSON = CurrencyToJSON;