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