rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
48 lines (47 loc) • 1.65 kB
JavaScript
;
/* 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.EventsBlocksRequestToJSON = exports.EventsBlocksRequestFromJSONTyped = exports.EventsBlocksRequestFromJSON = void 0;
const runtime_1 = require("../runtime");
const _1 = require("./");
function EventsBlocksRequestFromJSON(json) {
return EventsBlocksRequestFromJSONTyped(json, false);
}
exports.EventsBlocksRequestFromJSON = EventsBlocksRequestFromJSON;
function EventsBlocksRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
network_identifier: _1.NetworkIdentifierFromJSON(json['network_identifier']),
offset: !runtime_1.exists(json, 'offset') ? undefined : json['offset'],
limit: !runtime_1.exists(json, 'limit') ? undefined : json['limit'],
};
}
exports.EventsBlocksRequestFromJSONTyped = EventsBlocksRequestFromJSONTyped;
function EventsBlocksRequestToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
network_identifier: _1.NetworkIdentifierToJSON(value.network_identifier),
offset: value.offset,
limit: value.limit,
};
}
exports.EventsBlocksRequestToJSON = EventsBlocksRequestToJSON;