/* tslint:disable */ /* eslint-disable */ /** * barkd REST API * A simple REST API for barkd, a wallet daemon for integrating bitcoin payments into your app over HTTP. Supports self-custodial Lightning, Ark, and on-chain out of the box. barkd is a long-running daemon best suited for always-on or high-connectivity environments like nodes, servers, desktops, and point-of-sale terminals. All endpoints return JSON. Amounts are denominated in satoshis. * * The version of the OpenAPI document: 0.6.1 * Contact: hello@second.tech * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { ExitState } from './ExitState'; import { ExitStateFromJSON, ExitStateFromJSONTyped, ExitStateToJSON, ExitStateToJSONTyped, } from './ExitState'; import type { ExitError } from './ExitError'; import { ExitErrorFromJSON, ExitErrorFromJSONTyped, ExitErrorToJSON, ExitErrorToJSONTyped, } from './ExitError'; /** * * @export * @interface ExitProgressStatus */ export interface ExitProgressStatus { /** * Any error that occurred during the exit process * @type {ExitError} * @memberof ExitProgressStatus */ error?: ExitError | null; /** * The current state of the exit transaction * @type {ExitState} * @memberof ExitProgressStatus */ state: ExitState; /** * The ID of the VTXO that is being unilaterally exited * @type {string} * @memberof ExitProgressStatus */ vtxoId: string; } /** * Check if a given object implements the ExitProgressStatus interface. */ export function instanceOfExitProgressStatus(value: object): value is ExitProgressStatus { if (!('state' in value) || value['state'] === undefined) return false; if (!('vtxoId' in value) || value['vtxoId'] === undefined) return false; return true; } export function ExitProgressStatusFromJSON(json: any): ExitProgressStatus { return ExitProgressStatusFromJSONTyped(json, false); } export function ExitProgressStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitProgressStatus { if (json == null) { return json; } return { 'error': json['error'] == null ? undefined : ExitErrorFromJSON(json['error']), 'state': ExitStateFromJSON(json['state']), 'vtxoId': json['vtxo_id'], }; } export function ExitProgressStatusToJSON(json: any): ExitProgressStatus { return ExitProgressStatusToJSONTyped(json, false); } export function ExitProgressStatusToJSONTyped(value?: ExitProgressStatus | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'error': ExitErrorToJSON(value['error']), 'state': ExitStateToJSON(value['state']), 'vtxo_id': value['vtxoId'], }; }