UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

48 lines (47 loc) 1.69 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.AccountBalanceResponseToJSON = exports.AccountBalanceResponseFromJSONTyped = exports.AccountBalanceResponseFromJSON = void 0; const runtime_1 = require("../runtime"); const _1 = require("./"); function AccountBalanceResponseFromJSON(json) { return AccountBalanceResponseFromJSONTyped(json, false); } exports.AccountBalanceResponseFromJSON = AccountBalanceResponseFromJSON; function AccountBalanceResponseFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { block_identifier: _1.BlockIdentifierFromJSON(json['block_identifier']), balances: json['balances'].map(_1.AmountFromJSON), metadata: !runtime_1.exists(json, 'metadata') ? undefined : json['metadata'], }; } exports.AccountBalanceResponseFromJSONTyped = AccountBalanceResponseFromJSONTyped; function AccountBalanceResponseToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { block_identifier: _1.BlockIdentifierToJSON(value.block_identifier), balances: value.balances.map(_1.AmountToJSON), metadata: value.metadata, }; } exports.AccountBalanceResponseToJSON = AccountBalanceResponseToJSON;