rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
71 lines (65 loc) • 2.26 kB
text/typescript
/* 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.
*/
import { NetworkIdentifier, NetworkIdentifierFromJSON, NetworkIdentifierToJSON, Signature, SignatureFromJSON, SignatureToJSON } from './';
/**
* ConstructionCombineRequest is the input to the `/construction/combine` endpoint. It contains the unsigned transaction blob returned by `/construction/payloads` and all required signatures to create a network transaction.
* @export
* @interface ConstructionCombineRequest
*/
export interface ConstructionCombineRequest {
/**
*
* @type {NetworkIdentifier}
* @memberof ConstructionCombineRequest
*/
network_identifier: NetworkIdentifier;
/**
*
* @type {string}
* @memberof ConstructionCombineRequest
*/
unsigned_transaction: string;
/**
*
* @type {Array<Signature>}
* @memberof ConstructionCombineRequest
*/
signatures: Array<Signature>;
}
export function ConstructionCombineRequestFromJSON(json: any): ConstructionCombineRequest {
return ConstructionCombineRequestFromJSONTyped(json, false);
}
export function ConstructionCombineRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConstructionCombineRequest {
if (json === undefined || json === null) {
return json;
}
return {
network_identifier: NetworkIdentifierFromJSON(json['network_identifier']),
unsigned_transaction: json['unsigned_transaction'],
signatures: (json['signatures'] as Array<any>).map(SignatureFromJSON),
};
}
export function ConstructionCombineRequestToJSON(value?: ConstructionCombineRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
network_identifier: NetworkIdentifierToJSON(value.network_identifier),
unsigned_transaction: value.unsigned_transaction,
signatures: (value.signatures as Array<any>).map(SignatureToJSON),
};
}