/* 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 { ExitTxOrigin } from './ExitTxOrigin'; import { ExitTxOriginFromJSON, ExitTxOriginFromJSONTyped, ExitTxOriginToJSON, ExitTxOriginToJSONTyped, } from './ExitTxOrigin'; import type { BlockRef } from './BlockRef'; import { BlockRefFromJSON, BlockRefFromJSONTyped, BlockRefToJSON, BlockRefToJSONTyped, } from './BlockRef'; /** * * @export * @interface ExitTxStatusOneOf4 */ export interface ExitTxStatusOneOf4 { /** * * @type {BlockRef} * @memberof ExitTxStatusOneOf4 */ block: BlockRef; /** * * @type {string} * @memberof ExitTxStatusOneOf4 */ childTxid: string; /** * * @type {ExitTxOrigin} * @memberof ExitTxStatusOneOf4 */ origin: ExitTxOrigin; /** * * @type {ExitTxStatusOneOf4TypeEnum} * @memberof ExitTxStatusOneOf4 */ type: ExitTxStatusOneOf4TypeEnum; } /** * @export */ export const ExitTxStatusOneOf4TypeEnum = { Confirmed: 'confirmed' } as const; export type ExitTxStatusOneOf4TypeEnum = typeof ExitTxStatusOneOf4TypeEnum[keyof typeof ExitTxStatusOneOf4TypeEnum]; /** * Check if a given object implements the ExitTxStatusOneOf4 interface. */ export function instanceOfExitTxStatusOneOf4(value: object): value is ExitTxStatusOneOf4 { if (!('block' in value) || value['block'] === undefined) return false; if (!('childTxid' in value) || value['childTxid'] === undefined) return false; if (!('origin' in value) || value['origin'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function ExitTxStatusOneOf4FromJSON(json: any): ExitTxStatusOneOf4 { return ExitTxStatusOneOf4FromJSONTyped(json, false); } export function ExitTxStatusOneOf4FromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitTxStatusOneOf4 { if (json == null) { return json; } return { 'block': BlockRefFromJSON(json['block']), 'childTxid': json['child_txid'], 'origin': ExitTxOriginFromJSON(json['origin']), 'type': json['type'], }; } export function ExitTxStatusOneOf4ToJSON(json: any): ExitTxStatusOneOf4 { return ExitTxStatusOneOf4ToJSONTyped(json, false); } export function ExitTxStatusOneOf4ToJSONTyped(value?: ExitTxStatusOneOf4 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'block': BlockRefToJSON(value['block']), 'child_txid': value['childTxid'], 'origin': ExitTxOriginToJSON(value['origin']), 'type': value['type'], }; }