/* 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'; /** * The different balances of a Bark wallet, broken down by state. * * All amounts are in sats. * @export * @interface Balance */ export interface Balance { /** * Sats from an incoming Lightning payment that can be claimed but * have not yet been swept into a spendable VTXO. * @type {number} * @memberof Balance */ claimableLightningReceiveSat: number; /** * Sats in board transactions that are waiting for sufficient * on-chain confirmations before becoming spendable. * @type {number} * @memberof Balance */ pendingBoardSat: number; /** * Sats held in VTXOs whose unilateral exit chain is confirmed on-chain but which * haven't yet been drained to the onchain wallet. Equivalent to the sum of * `Exited` VTXOs whose exit state hasn't reached `Claimed`. * `null` if the exit subsystem is unavailable. * @type {number} * @memberof Balance */ pendingExitSat?: number | null; /** * Sats locked in VTXOs forfeited for a round that has not yet * completed. * @type {number} * @memberof Balance */ pendingInRoundSat: number; /** * Sats locked in an outgoing Lightning payment that has not yet * settled. * @type {number} * @memberof Balance */ pendingLightningSendSat: number; /** * Sats that are immediately spendable, either in-round or * out-of-round. * @type {number} * @memberof Balance */ spendableSat: number; } /** * Check if a given object implements the Balance interface. */ export function instanceOfBalance(value: object): value is Balance { if (!('claimableLightningReceiveSat' in value) || value['claimableLightningReceiveSat'] === undefined) return false; if (!('pendingBoardSat' in value) || value['pendingBoardSat'] === undefined) return false; if (!('pendingInRoundSat' in value) || value['pendingInRoundSat'] === undefined) return false; if (!('pendingLightningSendSat' in value) || value['pendingLightningSendSat'] === undefined) return false; if (!('spendableSat' in value) || value['spendableSat'] === undefined) return false; return true; } export function BalanceFromJSON(json: any): Balance { return BalanceFromJSONTyped(json, false); } export function BalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Balance { if (json == null) { return json; } return { 'claimableLightningReceiveSat': json['claimable_lightning_receive_sat'], 'pendingBoardSat': json['pending_board_sat'], 'pendingExitSat': json['pending_exit_sat'] == null ? undefined : json['pending_exit_sat'], 'pendingInRoundSat': json['pending_in_round_sat'], 'pendingLightningSendSat': json['pending_lightning_send_sat'], 'spendableSat': json['spendable_sat'], }; } export function BalanceToJSON(json: any): Balance { return BalanceToJSONTyped(json, false); } export function BalanceToJSONTyped(value?: Balance | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'claimable_lightning_receive_sat': value['claimableLightningReceiveSat'], 'pending_board_sat': value['pendingBoardSat'], 'pending_exit_sat': value['pendingExitSat'], 'pending_in_round_sat': value['pendingInRoundSat'], 'pending_lightning_send_sat': value['pendingLightningSendSat'], 'spendable_sat': value['spendableSat'], }; }