UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

58 lines (57 loc) 2.14 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.AllowToJSON = exports.AllowFromJSONTyped = exports.AllowFromJSON = void 0; const runtime_1 = require("../runtime"); const _1 = require("./"); function AllowFromJSON(json) { return AllowFromJSONTyped(json, false); } exports.AllowFromJSON = AllowFromJSON; function AllowFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { operation_statuses: json['operation_statuses'].map(_1.OperationStatusFromJSON), operation_types: json['operation_types'], errors: json['errors'].map(_1.ModelErrorFromJSON), historical_balance_lookup: json['historical_balance_lookup'], timestamp_start_index: !runtime_1.exists(json, 'timestamp_start_index') ? undefined : json['timestamp_start_index'], call_methods: json['call_methods'], balance_exemptions: json['balance_exemptions'].map(_1.BalanceExemptionFromJSON), mempool_coins: json['mempool_coins'], }; } exports.AllowFromJSONTyped = AllowFromJSONTyped; function AllowToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { operation_statuses: value.operation_statuses.map(_1.OperationStatusToJSON), operation_types: value.operation_types, errors: value.errors.map(_1.ModelErrorToJSON), historical_balance_lookup: value.historical_balance_lookup, timestamp_start_index: value.timestamp_start_index, call_methods: value.call_methods, balance_exemptions: value.balance_exemptions.map(_1.BalanceExemptionToJSON), mempool_coins: value.mempool_coins, }; } exports.AllowToJSON = AllowToJSON;