/* 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 { ChildTransactionInfo } from './ChildTransactionInfo'; import { ChildTransactionInfoFromJSON, ChildTransactionInfoFromJSONTyped, ChildTransactionInfoToJSON, ChildTransactionInfoToJSONTyped, } from './ChildTransactionInfo'; import type { TransactionInfo } from './TransactionInfo'; import { TransactionInfoFromJSON, TransactionInfoFromJSONTyped, TransactionInfoToJSON, TransactionInfoToJSONTyped, } from './TransactionInfo'; /** * * @export * @interface ExitTransactionPackage */ export interface ExitTransactionPackage { /** * The child transaction used to spend, and thus confirm, the exit anchor output * @type {ChildTransactionInfo} * @memberof ExitTransactionPackage */ child?: ChildTransactionInfo | null; /** * The actual unilateral exit transaction containing an anchor output and a spendable amount * @type {TransactionInfo} * @memberof ExitTransactionPackage */ exit: TransactionInfo; } /** * Check if a given object implements the ExitTransactionPackage interface. */ export function instanceOfExitTransactionPackage(value: object): value is ExitTransactionPackage { if (!('exit' in value) || value['exit'] === undefined) return false; return true; } export function ExitTransactionPackageFromJSON(json: any): ExitTransactionPackage { return ExitTransactionPackageFromJSONTyped(json, false); } export function ExitTransactionPackageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExitTransactionPackage { if (json == null) { return json; } return { 'child': json['child'] == null ? undefined : ChildTransactionInfoFromJSON(json['child']), 'exit': TransactionInfoFromJSON(json['exit']), }; } export function ExitTransactionPackageToJSON(json: any): ExitTransactionPackage { return ExitTransactionPackageToJSONTyped(json, false); } export function ExitTransactionPackageToJSONTyped(value?: ExitTransactionPackage | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'child': ChildTransactionInfoToJSON(value['child']), 'exit': TransactionInfoToJSON(value['exit']), }; }