/* 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.2 * 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'; /** * A fee breakdown for unilaterally (emergency) exiting a set of VTXOs. * @export * @interface EmergencyExitFeeEstimateResponse */ export interface EmergencyExitFeeEstimateResponse { /** * The fee for the single batched transaction that drains the matured exit outputs (in * satoshis). Paid later out of the recovered value. * @type {number} * @memberof EmergencyExitFeeEstimateResponse */ claimFeeSat: number; /** * The CPFP fees to broadcast every not-yet-confirmed exit transaction (in satoshis). Paid now * from confirmed on-chain funds. * @type {number} * @memberof EmergencyExitFeeEstimateResponse */ exitBroadcastFeeSat: number; /** * The fee rate the exit-broadcast leg was priced at (sat/vB). Unless an explicit fee rate was * supplied, the claim leg is priced separately at the chain's `regular` rate. * @type {number} * @memberof EmergencyExitFeeEstimateResponse */ feeRateSatPerVb: number; /** * Whether the wallet's current on-chain balance covers the full serial exit-broadcast walk. * @type {boolean} * @memberof EmergencyExitFeeEstimateResponse */ fundable: boolean; /** * The sum of the broadcast and claim fees (in satoshis). * @type {number} * @memberof EmergencyExitFeeEstimateResponse */ totalFeeSat: number; /** * The number of exit transactions that still need to be broadcast and CPFP-bumped. * @type {number} * @memberof EmergencyExitFeeEstimateResponse */ txsToBroadcast: number; } /** * Check if a given object implements the EmergencyExitFeeEstimateResponse interface. */ export function instanceOfEmergencyExitFeeEstimateResponse(value: object): value is EmergencyExitFeeEstimateResponse { if (!('claimFeeSat' in value) || value['claimFeeSat'] === undefined) return false; if (!('exitBroadcastFeeSat' in value) || value['exitBroadcastFeeSat'] === undefined) return false; if (!('feeRateSatPerVb' in value) || value['feeRateSatPerVb'] === undefined) return false; if (!('fundable' in value) || value['fundable'] === undefined) return false; if (!('totalFeeSat' in value) || value['totalFeeSat'] === undefined) return false; if (!('txsToBroadcast' in value) || value['txsToBroadcast'] === undefined) return false; return true; } export function EmergencyExitFeeEstimateResponseFromJSON(json: any): EmergencyExitFeeEstimateResponse { return EmergencyExitFeeEstimateResponseFromJSONTyped(json, false); } export function EmergencyExitFeeEstimateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmergencyExitFeeEstimateResponse { if (json == null) { return json; } return { 'claimFeeSat': json['claim_fee_sat'], 'exitBroadcastFeeSat': json['exit_broadcast_fee_sat'], 'feeRateSatPerVb': json['fee_rate_sat_per_vb'], 'fundable': json['fundable'], 'totalFeeSat': json['total_fee_sat'], 'txsToBroadcast': json['txs_to_broadcast'], }; } export function EmergencyExitFeeEstimateResponseToJSON(json: any): EmergencyExitFeeEstimateResponse { return EmergencyExitFeeEstimateResponseToJSONTyped(json, false); } export function EmergencyExitFeeEstimateResponseToJSONTyped(value?: EmergencyExitFeeEstimateResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'claim_fee_sat': value['claimFeeSat'], 'exit_broadcast_fee_sat': value['exitBroadcastFeeSat'], 'fee_rate_sat_per_vb': value['feeRateSatPerVb'], 'fundable': value['fundable'], 'total_fee_sat': value['totalFeeSat'], 'txs_to_broadcast': value['txsToBroadcast'], }; }