/* 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 { ExitTxStatus } from './ExitTxStatus'; import { ExitTxStatusFromJSON, ExitTxStatusFromJSONTyped, ExitTxStatusToJSON, ExitTxStatusToJSONTyped, } from './ExitTxStatus'; /** * * @export * @interface ExitErrorOneOf18 */ export interface ExitErrorOneOf18 { /** * * @type {string} * @memberof ExitErrorOneOf18 */ error: string; /** * * @type {ExitTxStatus} * @memberof ExitErrorOneOf18 */ status: ExitTxStatus; /** * * @type {string} * @memberof ExitErrorOneOf18 */ txid: string; /** * * @type {ExitErrorOneOf18TypeEnum} * @memberof ExitErrorOneOf18 */ type: ExitErrorOneOf18TypeEnum; } /** * @export */ export const ExitErrorOneOf18TypeEnum = { InvalidExitTransactionStatus: 'invalid-exit-transaction-status' } as const; export type ExitErrorOneOf18TypeEnum = typeof ExitErrorOneOf18TypeEnum[keyof typeof ExitErrorOneOf18TypeEnum]; /** * Check if a given object implements the ExitErrorOneOf18 interface. */ export function instanceOfExitErrorOneOf18(value: object): value is ExitErrorOneOf18 { if (!('error' in value) || value['error'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('txid' in value) || value['txid'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function ExitErrorOneOf18FromJSON(json: any): ExitErrorOneOf18 { return ExitErrorOneOf18FromJSONTyped(json, false); } export function ExitErrorOneOf18FromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitErrorOneOf18 { if (json == null) { return json; } return { 'error': json['error'], 'status': ExitTxStatusFromJSON(json['status']), 'txid': json['txid'], 'type': json['type'], }; } export function ExitErrorOneOf18ToJSON(json: any): ExitErrorOneOf18 { return ExitErrorOneOf18ToJSONTyped(json, false); } export function ExitErrorOneOf18ToJSONTyped(value?: ExitErrorOneOf18 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'error': value['error'], 'status': ExitTxStatusToJSON(value['status']), 'txid': value['txid'], 'type': value['type'], }; }