/* 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 { ExitProgressStatus } from './ExitProgressStatus'; import { ExitProgressStatusFromJSON, ExitProgressStatusFromJSONTyped, ExitProgressStatusToJSON, ExitProgressStatusToJSONTyped, } from './ExitProgressStatus'; import type { ExitError } from './ExitError'; import { ExitErrorFromJSON, ExitErrorFromJSONTyped, ExitErrorToJSON, ExitErrorToJSONTyped, } from './ExitError'; /** * * @export * @interface ExitProgressResponse */ export interface ExitProgressResponse { /** * Block height at which all exit outputs will be spendable * @type {number} * @memberof ExitProgressResponse */ claimableHeight?: number | null; /** * Whether all transactions have been confirmed * @type {boolean} * @memberof ExitProgressResponse */ done: boolean; /** * Top-level error that prevented progress from running cleanly this round. Per-exit * problems live on each `ExitProgressStatus`; this slot is for failures that can't * be attributed to a specific VTXO (e.g. the chain source becoming unavailable, or * the exit manager failing to refresh its view of pending transactions). * @type {ExitError} * @memberof ExitProgressResponse */ error?: ExitError | null; /** * Status of each pending exit transaction * @type {Array} * @memberof ExitProgressResponse */ exits: Array; } /** * Check if a given object implements the ExitProgressResponse interface. */ export function instanceOfExitProgressResponse(value: object): value is ExitProgressResponse { if (!('done' in value) || value['done'] === undefined) return false; if (!('exits' in value) || value['exits'] === undefined) return false; return true; } export function ExitProgressResponseFromJSON(json: any): ExitProgressResponse { return ExitProgressResponseFromJSONTyped(json, false); } export function ExitProgressResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitProgressResponse { if (json == null) { return json; } return { 'claimableHeight': json['claimable_height'] == null ? undefined : json['claimable_height'], 'done': json['done'], 'error': json['error'] == null ? undefined : ExitErrorFromJSON(json['error']), 'exits': ((json['exits'] as Array).map(ExitProgressStatusFromJSON)), }; } export function ExitProgressResponseToJSON(json: any): ExitProgressResponse { return ExitProgressResponseToJSONTyped(json, false); } export function ExitProgressResponseToJSONTyped(value?: ExitProgressResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'claimable_height': value['claimableHeight'], 'done': value['done'], 'error': ExitErrorToJSON(value['error']), 'exits': ((value['exits'] as Array).map(ExitProgressStatusToJSON)), }; }