rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
48 lines (47 loc) • 1.84 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.ConstructionPreprocessResponseToJSON = exports.ConstructionPreprocessResponseFromJSONTyped = exports.ConstructionPreprocessResponseFromJSON = void 0;
const runtime_1 = require("../runtime");
const _1 = require("./");
function ConstructionPreprocessResponseFromJSON(json) {
return ConstructionPreprocessResponseFromJSONTyped(json, false);
}
exports.ConstructionPreprocessResponseFromJSON = ConstructionPreprocessResponseFromJSON;
function ConstructionPreprocessResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
options: !runtime_1.exists(json, 'options') ? undefined : json['options'],
required_public_keys: !runtime_1.exists(json, 'required_public_keys')
? undefined
: json['required_public_keys'].map(_1.AccountIdentifierFromJSON),
};
}
exports.ConstructionPreprocessResponseFromJSONTyped = ConstructionPreprocessResponseFromJSONTyped;
function ConstructionPreprocessResponseToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
options: value.options,
required_public_keys: value.required_public_keys === undefined ? undefined : value.required_public_keys.map(_1.AccountIdentifierToJSON),
};
}
exports.ConstructionPreprocessResponseToJSON = ConstructionPreprocessResponseToJSON;