UNPKG

rosetta-sdk-typescript

Version:

Typescript SDK to create and interact with Rosetta API implementations.

50 lines (49 loc) 2.01 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.ConstructionPayloadsRequestToJSON = exports.ConstructionPayloadsRequestFromJSONTyped = exports.ConstructionPayloadsRequestFromJSON = void 0; const runtime_1 = require("../runtime"); const _1 = require("./"); function ConstructionPayloadsRequestFromJSON(json) { return ConstructionPayloadsRequestFromJSONTyped(json, false); } exports.ConstructionPayloadsRequestFromJSON = ConstructionPayloadsRequestFromJSON; function ConstructionPayloadsRequestFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { network_identifier: _1.NetworkIdentifierFromJSON(json['network_identifier']), operations: json['operations'].map(_1.OperationFromJSON), metadata: !runtime_1.exists(json, 'metadata') ? undefined : json['metadata'], public_keys: !runtime_1.exists(json, 'public_keys') ? undefined : json['public_keys'].map(_1.PublicKeyFromJSON), }; } exports.ConstructionPayloadsRequestFromJSONTyped = ConstructionPayloadsRequestFromJSONTyped; function ConstructionPayloadsRequestToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { network_identifier: _1.NetworkIdentifierToJSON(value.network_identifier), operations: value.operations.map(_1.OperationToJSON), metadata: value.metadata, public_keys: value.public_keys === undefined ? undefined : value.public_keys.map(_1.PublicKeyToJSON), }; } exports.ConstructionPayloadsRequestToJSON = ConstructionPayloadsRequestToJSON;