/* 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 { BlockRef } from './BlockRef'; import { BlockRefFromJSON, BlockRefFromJSONTyped, BlockRefToJSON, BlockRefToJSONTyped, } from './BlockRef'; /** * * @export * @interface ExitStateOneOf4 */ export interface ExitStateOneOf4 { /** * * @type {string} * @memberof ExitStateOneOf4 */ claimTxid: string; /** * * @type {BlockRef} * @memberof ExitStateOneOf4 */ claimableSince: BlockRef; /** * * @type {number} * @memberof ExitStateOneOf4 */ tipHeight: number; /** * * @type {ExitStateOneOf4TypeEnum} * @memberof ExitStateOneOf4 */ type: ExitStateOneOf4TypeEnum; } /** * @export */ export const ExitStateOneOf4TypeEnum = { ClaimInProgress: 'claim-in-progress' } as const; export type ExitStateOneOf4TypeEnum = typeof ExitStateOneOf4TypeEnum[keyof typeof ExitStateOneOf4TypeEnum]; /** * Check if a given object implements the ExitStateOneOf4 interface. */ export function instanceOfExitStateOneOf4(value: object): value is ExitStateOneOf4 { if (!('claimTxid' in value) || value['claimTxid'] === undefined) return false; if (!('claimableSince' in value) || value['claimableSince'] === undefined) return false; if (!('tipHeight' in value) || value['tipHeight'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function ExitStateOneOf4FromJSON(json: any): ExitStateOneOf4 { return ExitStateOneOf4FromJSONTyped(json, false); } export function ExitStateOneOf4FromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitStateOneOf4 { if (json == null) { return json; } return { 'claimTxid': json['claim_txid'], 'claimableSince': BlockRefFromJSON(json['claimable_since']), 'tipHeight': json['tip_height'], 'type': json['type'], }; } export function ExitStateOneOf4ToJSON(json: any): ExitStateOneOf4 { return ExitStateOneOf4ToJSONTyped(json, false); } export function ExitStateOneOf4ToJSONTyped(value?: ExitStateOneOf4 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'claim_txid': value['claimTxid'], 'claimable_since': BlockRefToJSON(value['claimableSince']), 'tip_height': value['tipHeight'], 'type': value['type'], }; }