UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

70 lines (69 loc) 3.32 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.SearchTransactionsRequestToJSON = exports.SearchTransactionsRequestFromJSONTyped = exports.SearchTransactionsRequestFromJSON = void 0; const runtime_1 = require("../runtime"); const _1 = require("./"); function SearchTransactionsRequestFromJSON(json) { return SearchTransactionsRequestFromJSONTyped(json, false); } exports.SearchTransactionsRequestFromJSON = SearchTransactionsRequestFromJSON; function SearchTransactionsRequestFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { network_identifier: _1.NetworkIdentifierFromJSON(json['network_identifier']), operator: !runtime_1.exists(json, 'operator') ? undefined : _1.OperatorFromJSON(json['operator']), max_block: !runtime_1.exists(json, 'max_block') ? undefined : json['max_block'], offset: !runtime_1.exists(json, 'offset') ? undefined : json['offset'], limit: !runtime_1.exists(json, 'limit') ? undefined : json['limit'], transaction_identifier: !runtime_1.exists(json, 'transaction_identifier') ? undefined : _1.TransactionIdentifierFromJSON(json['transaction_identifier']), account_identifier: !runtime_1.exists(json, 'account_identifier') ? undefined : _1.AccountIdentifierFromJSON(json['account_identifier']), coin_identifier: !runtime_1.exists(json, 'coin_identifier') ? undefined : _1.CoinIdentifierFromJSON(json['coin_identifier']), currency: !runtime_1.exists(json, 'currency') ? undefined : _1.CurrencyFromJSON(json['currency']), status: !runtime_1.exists(json, 'status') ? undefined : json['status'], type: !runtime_1.exists(json, 'type') ? undefined : json['type'], address: !runtime_1.exists(json, 'address') ? undefined : json['address'], success: !runtime_1.exists(json, 'success') ? undefined : json['success'], }; } exports.SearchTransactionsRequestFromJSONTyped = SearchTransactionsRequestFromJSONTyped; function SearchTransactionsRequestToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { network_identifier: _1.NetworkIdentifierToJSON(value.network_identifier), operator: _1.OperatorToJSON(value.operator), max_block: value.max_block, offset: value.offset, limit: value.limit, transaction_identifier: _1.TransactionIdentifierToJSON(value.transaction_identifier), account_identifier: _1.AccountIdentifierToJSON(value.account_identifier), coin_identifier: _1.CoinIdentifierToJSON(value.coin_identifier), currency: _1.CurrencyToJSON(value.currency), status: value.status, type: value.type, address: value.address, success: value.success, }; } exports.SearchTransactionsRequestToJSON = SearchTransactionsRequestToJSON;