> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Progress exits

> 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.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json post /api/v1/exits/progress
openapi: 3.1.0
info:
  title: barkd REST API
  description: >-
    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.
  contact:
    name: Second Team
    email: hello@second.tech
  license:
    name: MIT
    identifier: MIT
  version: 0.6.0
servers: []
security:
  - bearer: []
tags:
  - name: boards
    description: Move on-chain bitcoin onto the Ark protocol.
  - name: exits
    description: Move bitcoin back on-chain without server cooperation.
  - name: fees
    description: Estimate fees for wallet operations before executing them.
  - name: history
    description: Inspect and annotate wallet movement history.
  - name: lightning
    description: Create Lightning invoices and track receives.
  - name: onchain
    description: Manage barkd's on-chain bitcoin wallet.
  - name: wallet
    description: Manage Ark balances and VTXOs, send payments via Ark, LN, and on-chain.
  - name: bitcoin
    description: Query bitcoin network data.
  - name: notifications
    description: Receive real-time notifications from barkd.
paths:
  /api/v1/exits/progress:
    post:
      tags:
        - exits
      summary: Progress exits
      description: >-
        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.
      operationId: exit_progress
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExitProgressRequest'
        required: true
      responses:
        '200':
          description: Returns the exit progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExitProgressResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    ExitProgressRequest:
      type: object
      properties:
        fee_rate:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Sets the desired fee-rate in sats/kvB to use broadcasting exit
            transactions
          minimum: 0
        wait:
          type:
            - boolean
            - 'null'
          description: Wait until the exit is completed
    ExitProgressResponse:
      type: object
      required:
        - exits
        - done
      properties:
        claimable_height:
          type:
            - integer
            - 'null'
          format: int32
          description: Block height at which all exit outputs will be spendable
          minimum: 0
        done:
          type: boolean
          description: Whether all transactions have been confirmed
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ExitError'
              description: >-
                Top-level error that prevented progress from running cleanly
                this round. Per-exit

                problems live on each `ExitProgressStatus`; this slot is for
                failures that can't

                be attributed to a specific VTXO (e.g. the chain source becoming
                unavailable, or

                the exit manager failing to refresh its view of pending
                transactions).
        exits:
          type: array
          items:
            $ref: '#/components/schemas/ExitProgressStatus'
          description: Status of each pending exit transaction
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ExitError:
      oneOf:
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - ancestor-retrieval-failure
        - type: object
          required:
            - height
            - error
            - type
          properties:
            error:
              type: string
            height:
              $ref: '#/components/schemas/u32'
            type:
              type: string
              enum:
                - block-retrieval-failure
        - type: object
          required:
            - vtxo
            - state
            - type
          properties:
            state:
              $ref: '#/components/schemas/ExitStateKind'
            type:
              type: string
              enum:
                - cannot-cancel-exit
            vtxo:
              type: string
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - claim-missing-inputs
        - type: object
          required:
            - needed
            - output
            - type
          properties:
            needed:
              type: integer
              format: int64
              minimum: 0
            output:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - claim-fee-exceeds-output
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - claim-missing-signable-clause
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - claim-signing-error
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - cyclic-exit-transactions
            vtxo:
              type: string
        - type: object
          required:
            - vtxo_id
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - database-vtxo-store-failure
            vtxo_id:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - database-child-retrieval-failure
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - database-child-store-failure
        - type: object
          required:
            - vtxo
            - dust
            - type
          properties:
            dust:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - dust-limit
            vtxo:
              type: integer
              format: int64
              minimum: 0
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - exit-package-broadcast-failure
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - exit-package-finalize-failure
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - exit-package-store-failure
        - type: object
          required:
            - vtxo
            - txid
            - type
          properties:
            txid:
              type: string
            type:
              type: string
              enum:
                - exit-tx-already-broadcast
            vtxo:
              type: string
        - type: object
          required:
            - needed
            - available
            - type
          properties:
            available:
              type: integer
              format: int64
              minimum: 0
            needed:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - insufficient-confirmed-funds
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - internal-error
        - type: object
          required:
            - txid
            - status
            - error
            - type
          properties:
            error:
              type: string
            status:
              $ref: '#/components/schemas/ExitTxStatus'
            txid:
              type: string
            type:
              type: string
              enum:
                - invalid-exit-transaction-status
        - type: object
          required:
            - tip
            - error
            - type
          properties:
            error:
              type: string
            tip:
              $ref: '#/components/schemas/u32'
            type:
              type: string
              enum:
                - invalid-locktime
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - invalid-wallet-state
        - type: object
          required:
            - txid
            - type
          properties:
            txid:
              type: string
            type:
              type: string
              enum:
                - missing-anchor-output
        - type: object
          required:
            - txid
            - type
          properties:
            txid:
              type: string
            type:
              type: string
              enum:
                - missing-exit-transaction
        - type: object
          required:
            - vtxo
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - non-standard-vtxo
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - movement-registration-failure
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - not-exiting
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - tip-retrieval-failure
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - transaction-retrieval-failure
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - vtxo-not-claimable
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - vtxo-script-pub-key-invalid
    ExitProgressStatus:
      type: object
      required:
        - vtxo_id
        - state
      properties:
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ExitError'
              description: Any error that occurred during the exit process
        state:
          $ref: '#/components/schemas/ExitState'
          description: The current state of the exit transaction
        vtxo_id:
          type: string
          description: The ID of the VTXO that is being unilaterally exited
    u32:
      type: integer
      format: int32
      minimum: 0
    ExitStateKind:
      type: string
      description: >-
        A flat, data-free discriminator for [ExitState]. The serde
        representation matches

        [ExitState]'s `type` tag (kebab-case).
      enum:
        - start
        - processing
        - awaiting-delta
        - claimable
        - claim-in-progress
        - claimed
        - vtxo-already-spent
        - canceled
    ExitTxStatus:
      oneOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - verify-inputs
        - type: object
          required:
            - txids
            - type
          properties:
            txids:
              type: array
              items:
                type: string
            type:
              type: string
              enum:
                - awaiting-input-confirmation
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - awaiting-cpfp-broadcast
        - type: object
          required:
            - child_txid
            - origin
            - type
          properties:
            child_txid:
              type: string
            origin:
              $ref: '#/components/schemas/ExitTxOrigin'
            type:
              type: string
              enum:
                - awaiting-confirmation
        - type: object
          required:
            - child_txid
            - block
            - origin
            - type
          properties:
            block:
              $ref: '#/components/schemas/BlockRef'
            child_txid:
              type: string
            origin:
              $ref: '#/components/schemas/ExitTxOrigin'
            type:
              type: string
              enum:
                - confirmed
    ExitState:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/ExitStartState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - start
        - allOf:
            - $ref: '#/components/schemas/ExitProcessingState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - processing
        - allOf:
            - $ref: '#/components/schemas/ExitAwaitingDeltaState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - awaiting-delta
        - allOf:
            - $ref: '#/components/schemas/ExitClaimableState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claimable
        - allOf:
            - $ref: '#/components/schemas/ExitClaimInProgressState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claim-in-progress
        - allOf:
            - $ref: '#/components/schemas/ExitClaimedState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claimed
        - allOf:
            - $ref: '#/components/schemas/ExitVtxoAlreadySpentState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - vtxo-already-spent
        - allOf:
            - $ref: '#/components/schemas/ExitCanceledState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - canceled
      description: >-
        A utility type to wrap ExitState children so they can be easily
        serialized. This also helps with

        debugging a lot!
    ExitTxOrigin:
      oneOf:
        - type: object
          required:
            - type
          properties:
            confirmed_in:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/BlockRef'
            type:
              type: string
              enum:
                - wallet
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - mempool
        - type: object
          required:
            - confirmed_in
            - type
          properties:
            confirmed_in:
              $ref: '#/components/schemas/BlockRef'
            type:
              type: string
              enum:
                - block
    BlockRef:
      type: object
      description: >-
        Reference to a block in the blockchain.


        Contains the block height and hash. Serializes as an object with
        `height` and `hash` fields.
      required:
        - height
        - hash
      properties:
        hash:
          type: string
        height:
          $ref: '#/components/schemas/u32'
    ExitStartState:
      type: object
      required:
        - tip_height
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitProcessingState:
      type: object
      required:
        - tip_height
        - transactions
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/ExitTx'
    ExitAwaitingDeltaState:
      type: object
      required:
        - tip_height
        - confirmed_block
        - claimable_height
      properties:
        claimable_height:
          $ref: '#/components/schemas/u32'
        confirmed_block:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimableState:
      type: object
      required:
        - tip_height
        - claimable_since
      properties:
        claimable_since:
          $ref: '#/components/schemas/BlockRef'
        last_scanned_block:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimInProgressState:
      type: object
      required:
        - tip_height
        - claimable_since
        - claim_txid
      properties:
        claim_txid:
          type: string
        claimable_since:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimedState:
      type: object
      required:
        - tip_height
        - txid
        - block
      properties:
        block:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
        txid:
          type: string
    ExitVtxoAlreadySpentState:
      type: object
      description: JSON mirror of [bark::exit::ExitVtxoAlreadySpentState].
      required:
        - tip_height
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitCanceledState:
      type: object
      description: JSON mirror of [bark::exit::ExitCanceledState].
      required:
        - tip_height
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitTx:
      type: object
      required:
        - txid
        - status
      properties:
        status:
          $ref: '#/components/schemas/ExitTxStatus'
        txid:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````