/** * 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 * as runtime from '../runtime'; import type { ExitCancelResponse, ExitClaimAllRequest, ExitClaimResponse, ExitClaimVtxosRequest, ExitProgressRequest, ExitProgressResponse, ExitStartRequest, ExitStartResponse, ExitTransactionStatus } from '../models/index'; export interface ExitCancelRequest { vtxoId: string; } export interface ExitClaimAllOperationRequest { exitClaimAllRequest: ExitClaimAllRequest; } export interface ExitClaimVtxosOperationRequest { exitClaimVtxosRequest: ExitClaimVtxosRequest; } export interface ExitProgressOperationRequest { exitProgressRequest: ExitProgressRequest; } export interface ExitStartVtxosRequest { exitStartRequest: ExitStartRequest; } export interface GetAllExitStatusRequest { history?: boolean; transactions?: boolean; } export interface GetExitStatusByVtxoIdRequest { vtxoId: string; history?: boolean; transactions?: boolean; } export interface GetExitStatusByVtxoIdDeprecatedRequest { vtxoId: string; history?: boolean; transactions?: boolean; } export interface GetFinishedExitsRequest { history?: boolean; transactions?: boolean; } export interface GetLiveExitStatusRequest { history?: boolean; transactions?: boolean; } /** * */ export declare class ExitsApi extends runtime.BaseAPI { /** * Creates request options for exitCancel without sending the request */ exitCancelRequestOpts(requestParameters: ExitCancelRequest): Promise; /** * Aborts an in-progress emergency exit while it is still safe to do so—before its final transaction has been broadcast. Exit transactions are ordered topologically and only the final one moves the VTXO on-chain, so an exit can still be canceled even after its shared ancestor transactions are in the mempool or a block. Canceling leaves the VTXO spendable, so a fresh exit can be started for it later. Before canceling, the endpoint verifies directly against the chain that the final transaction hasn\'t been broadcast; nothing is rebroadcast in the process. Canceling an already-canceled exit succeeds as a no-op, so retries are safe. Note the daemon auto-progresses exits at the cadence defined by `SLOW_INTERVAL`, so cancel promptly once an exit reaches a state you no longer wish to pursue. * Cancel an exit */ exitCancelRaw(requestParameters: ExitCancelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Aborts an in-progress emergency exit while it is still safe to do so—before its final transaction has been broadcast. Exit transactions are ordered topologically and only the final one moves the VTXO on-chain, so an exit can still be canceled even after its shared ancestor transactions are in the mempool or a block. Canceling leaves the VTXO spendable, so a fresh exit can be started for it later. Before canceling, the endpoint verifies directly against the chain that the final transaction hasn\'t been broadcast; nothing is rebroadcast in the process. Canceling an already-canceled exit succeeds as a no-op, so retries are safe. Note the daemon auto-progresses exits at the cadence defined by `SLOW_INTERVAL`, so cancel promptly once an exit reaches a state you no longer wish to pursue. * Cancel an exit */ exitCancel(requestParameters: ExitCancelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for exitClaimAll without sending the request */ exitClaimAllRequestOpts(requestParameters: ExitClaimAllOperationRequest): Promise; /** * Sweeps all claimable exit outputs into a single on-chain transaction sent to the specified address. Unlike `progress`, the daemon does not claim automatically—this endpoint must be called manually. Poll the `status` endpoint or call `progress` and check for `done: true` to know when VTXOs are ready to claim. This is the final step of the emergency exit process—the bitcoin is not considered back on-chain until this transaction confirms. * Claim all exited VTXOs */ exitClaimAllRaw(requestParameters: ExitClaimAllOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Sweeps all claimable exit outputs into a single on-chain transaction sent to the specified address. Unlike `progress`, the daemon does not claim automatically—this endpoint must be called manually. Poll the `status` endpoint or call `progress` and check for `done: true` to know when VTXOs are ready to claim. This is the final step of the emergency exit process—the bitcoin is not considered back on-chain until this transaction confirms. * Claim all exited VTXOs */ exitClaimAll(requestParameters: ExitClaimAllOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for exitClaimVtxos without sending the request */ exitClaimVtxosRequestOpts(requestParameters: ExitClaimVtxosOperationRequest): Promise; /** * Sweeps the specified claimable exit outputs into a single on-chain transaction sent to the specified address. Unlike `progress`, the daemon does not claim automatically—this endpoint must be called manually. Poll the `status` endpoint or call `progress` and check for `done: true` to know when VTXOs are ready to claim. This is the final step of the emergency exit process—the bitcoin is not considered back on-chain until this transaction confirms. * Claim specific exited VTXOs */ exitClaimVtxosRaw(requestParameters: ExitClaimVtxosOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Sweeps the specified claimable exit outputs into a single on-chain transaction sent to the specified address. Unlike `progress`, the daemon does not claim automatically—this endpoint must be called manually. Poll the `status` endpoint or call `progress` and check for `done: true` to know when VTXOs are ready to claim. This is the final step of the emergency exit process—the bitcoin is not considered back on-chain until this transaction confirms. * Claim specific exited VTXOs */ exitClaimVtxos(requestParameters: ExitClaimVtxosOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for exitProgress without sending the request */ exitProgressRequestOpts(requestParameters: ExitProgressOperationRequest): Promise; /** * Triggers all in-progress exits to advance. The daemon already progresses exits automatically in the background—use this endpoint when you want immediate progress rather than waiting for the next automatic cycle. On each call, the endpoint syncs transaction statuses, advances the exit state machine, and creates or fee-bumps CPFP children for any exit transactions that need them. The on-chain wallet must have sufficient bitcoin to cover transaction fees. * Progress exits */ exitProgressRaw(requestParameters: ExitProgressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Triggers all in-progress exits to advance. The daemon already progresses exits automatically in the background—use this endpoint when you want immediate progress rather than waiting for the next automatic cycle. On each call, the endpoint syncs transaction statuses, advances the exit state machine, and creates or fee-bumps CPFP children for any exit transactions that need them. The on-chain wallet must have sufficient bitcoin to cover transaction fees. * Progress exits */ exitProgress(requestParameters: ExitProgressOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for exitStartAll without sending the request */ exitStartAllRequestOpts(): Promise; /** * Registers all wallet VTXOs for emergency exit. The daemon automatically progresses registered exits in the background at the cadence defined by `SLOW_INTERVAL`, creating and broadcasting the required transactions in sequence. Once all exit transactions are confirmed and the timelock has elapsed, call `claim` to sweep the resulting outputs to an on-chain address. * Start exit for all VTXOs */ exitStartAllRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Registers all wallet VTXOs for emergency exit. The daemon automatically progresses registered exits in the background at the cadence defined by `SLOW_INTERVAL`, creating and broadcasting the required transactions in sequence. Once all exit transactions are confirmed and the timelock has elapsed, call `claim` to sweep the resulting outputs to an on-chain address. * Start exit for all VTXOs */ exitStartAll(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for exitStartVtxos without sending the request */ exitStartVtxosRequestOpts(requestParameters: ExitStartVtxosRequest): Promise; /** * Registers the specified VTXOs for emergency exit. The daemon automatically progresses registered exits in the background at the cadence defined by `SLOW_INTERVAL`, creating and broadcasting the required transactions in sequence. Once all exit transactions are confirmed and the timelock has elapsed, call `claim` to sweep the resulting outputs to an on-chain address. * Start exit for specific VTXOs */ exitStartVtxosRaw(requestParameters: ExitStartVtxosRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Registers the specified VTXOs for emergency exit. The daemon automatically progresses registered exits in the background at the cadence defined by `SLOW_INTERVAL`, creating and broadcasting the required transactions in sequence. Once all exit transactions are confirmed and the timelock has elapsed, call `claim` to sweep the resulting outputs to an on-chain address. * Start exit for specific VTXOs */ exitStartVtxos(requestParameters: ExitStartVtxosRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for getAllExitStatus without sending the request */ getAllExitStatusRequestOpts(requestParameters: GetAllExitStatusRequest): Promise; /** * Returns every exit, live and finished. Optionally includes each exit\'s state history and its transactions with their CPFP children. * List all exit statuses */ getAllExitStatusRaw(requestParameters: GetAllExitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns every exit, live and finished. Optionally includes each exit\'s state history and its transactions with their CPFP children. * List all exit statuses */ getAllExitStatus(requestParameters?: GetAllExitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates request options for getAllExitStatusDeprecated without sending the request * @deprecated */ getAllExitStatusDeprecatedRequestOpts(): Promise; /** * Deprecated: redirects to `GET /exits/status/all`. * List all exit statuses (deprecated) * @deprecated */ getAllExitStatusDeprecatedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Deprecated: redirects to `GET /exits/status/all`. * List all exit statuses (deprecated) * @deprecated */ getAllExitStatusDeprecated(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for getExitStatusByVtxoId without sending the request */ getExitStatusByVtxoIdRequestOpts(requestParameters: GetExitStatusByVtxoIdRequest): Promise; /** * Returns the exit status for the given VTXO, live or finished. Optionally includes the state history and the exit transactions with their CPFP children. * Get VTXO exit status */ getExitStatusByVtxoIdRaw(requestParameters: GetExitStatusByVtxoIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns the exit status for the given VTXO, live or finished. Optionally includes the state history and the exit transactions with their CPFP children. * Get VTXO exit status */ getExitStatusByVtxoId(requestParameters: GetExitStatusByVtxoIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for getExitStatusByVtxoIdDeprecated without sending the request * @deprecated */ getExitStatusByVtxoIdDeprecatedRequestOpts(requestParameters: GetExitStatusByVtxoIdDeprecatedRequest): Promise; /** * Deprecated: use `GET /exits/status/vtxo/{vtxo_id}` instead. * Get exit status (deprecated) * @deprecated */ getExitStatusByVtxoIdDeprecatedRaw(requestParameters: GetExitStatusByVtxoIdDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Deprecated: use `GET /exits/status/vtxo/{vtxo_id}` instead. * Get exit status (deprecated) * @deprecated */ getExitStatusByVtxoIdDeprecated(requestParameters: GetExitStatusByVtxoIdDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for getFinishedExits without sending the request */ getFinishedExitsRequestOpts(requestParameters: GetFinishedExitsRequest): Promise; /** * Returns exits that reached a terminal state: claimed, aborted because the VTXO was already spent, or canceled. Finished exits are dropped from active tracking—they are never progressed—but they\'re retained for auditing and surfaced here. * List finished exits */ getFinishedExitsRaw(requestParameters: GetFinishedExitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns exits that reached a terminal state: claimed, aborted because the VTXO was already spent, or canceled. Finished exits are dropped from active tracking—they are never progressed—but they\'re retained for auditing and surfaced here. * List finished exits */ getFinishedExits(requestParameters?: GetFinishedExitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates request options for getLiveExitStatus without sending the request */ getLiveExitStatusRequestOpts(requestParameters: GetLiveExitStatusRequest): Promise; /** * Returns exits that are still progressing. Optionally includes each exit\'s state history and its transactions with their CPFP children. * List live exit statuses */ getLiveExitStatusRaw(requestParameters: GetLiveExitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns exits that are still progressing. Optionally includes each exit\'s state history and its transactions with their CPFP children. * List live exit statuses */ getLiveExitStatus(requestParameters?: GetLiveExitStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; }