Rust API client for bark-rest-client
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.
Overview
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
- API version: 0.2.5
- Package version: 0.2.5
- Generator version: 7.17.0
- Build package:
org.openapitools.codegen.languages.RustClientCodegen
Installation
Put the package under your project folder in a directory named bark-rest-client and add the following to Cargo.toml under [dependencies]:
bark-rest-client = { path = "./bark-rest-client" }
Documentation for API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BitcoinApi | tip | GET /api/v1/bitcoin/tip | Get bitcoin tip height |
| BoardsApi | board_all | POST /api/v1/boards/board-all | Board all on-chain bitcoin |
| BoardsApi | board_amount | POST /api/v1/boards/board-amount | Board a specific amount |
| BoardsApi | get_pending_boards | GET /api/v1/boards/pending | List pending boards |
| DefaultApi | ping | GET /ping | Ping |
| ExitsApi | exit_claim_all | POST /api/v1/exits/claim/all | Claim all exited VTXOs |
| ExitsApi | exit_claim_vtxos | POST /api/v1/exits/claim/vtxos | Claim specific exited VTXOs |
| ExitsApi | exit_progress | POST /api/v1/exits/progress | Progress exits |
| ExitsApi | exit_start_all | POST /api/v1/exits/start/all | Start exit for all VTXOs |
| ExitsApi | exit_start_vtxos | POST /api/v1/exits/start/vtxos | Start exit for specific VTXOs |
| ExitsApi | get_all_exit_status | GET /api/v1/exits/status | List all exit statuses |
| ExitsApi | get_exit_status_by_vtxo_id | GET /api/v1/exits/status/{vtxo_id} | Get exit status |
| FeesApi | board_fee | GET /api/v1/fees/board | Estimate board fee |
| FeesApi | lightning_receive_fee | GET /api/v1/fees/lightning/receive | Estimate Lightning receive fee |
| FeesApi | lightning_send_fee | GET /api/v1/fees/lightning/pay | Estimate Lightning send fee |
| FeesApi | offboard_all_fee | GET /api/v1/fees/offboard-all | Estimate offboard-all fee |
| FeesApi | onchain_fee_rates | GET /api/v1/fees/onchain | Get on-chain fee rates |
| FeesApi | send_onchain_fee | GET /api/v1/fees/send-onchain | Estimate send-onchain fee |
| HistoryApi | list | GET /api/v1/history | Get wallet history |
| HistoryApi | update_metadata | POST /api/v1/history/{id}/metadata | Patch movement metadata |
| LightningApi | cancel_receive | DELETE /api/v1/lightning/receives/{identifier} | Cancel a pending receive |
| LightningApi | generate_invoice | POST /api/v1/lightning/receives/invoice | Create a BOLT11 invoice |
| LightningApi | get_receive_status | GET /api/v1/lightning/receives/{identifier} | Get receive status |
| LightningApi | list_receive_statuses | GET /api/v1/lightning/receives | List all pending receive statuses |
| LightningApi | pay | POST /api/v1/lightning/pay | Send a Lightning payment |
| NotificationsApi | websocket_ticket | GET /api/v1/notifications/ws/ticket | Create a websocket ticket |
| OnchainApi | onchain_address | POST /api/v1/onchain/addresses/next | Generate on-chain address |
| OnchainApi | onchain_balance | GET /api/v1/onchain/balance | Get on-chain balance |
| OnchainApi | onchain_drain | POST /api/v1/onchain/drain | Drain on-chain wallet |
| OnchainApi | onchain_send | POST /api/v1/onchain/send | Send on-chain payment |
| OnchainApi | onchain_send_many | POST /api/v1/onchain/send-many | Send to multiple addresses |
| OnchainApi | onchain_sync | POST /api/v1/onchain/sync | Sync on-chain wallet |
| OnchainApi | onchain_transactions | GET /api/v1/onchain/transactions | List on-chain transactions |
| OnchainApi | onchain_utxos | GET /api/v1/onchain/utxos | List on-chain UTXOs |
| WalletApi | address | POST /api/v1/wallet/addresses/next | Generate Ark address |
| WalletApi | ark_info | GET /api/v1/wallet/ark-info | Get Ark server info |
| WalletApi | balance | GET /api/v1/wallet/balance | Get wallet balance |
| WalletApi | connected | GET /api/v1/wallet/connected | Check server connection |
| WalletApi | create_wallet | POST /api/v1/wallet/create | Create a wallet |
| WalletApi | get_vtxo | GET /api/v1/wallet/vtxos/{id} | Get VTXO detail |
| WalletApi | get_vtxo_encoded | GET /api/v1/wallet/vtxos/{id}/encoded | Get encoded VTXO |
| WalletApi | history | GET /api/v1/wallet/history | Get wallet history (deprecated) |
| WalletApi | import_vtxo | POST /api/v1/wallet/import-vtxo | Import a VTXO |
| WalletApi | mnemonic | GET /api/v1/wallet/mnemonic | Get wallet mnemonic |
| WalletApi | movements | GET /api/v1/wallet/movements | List movements (deprecated) |
| WalletApi | next_round | GET /api/v1/wallet/next-round | Get next round time |
| WalletApi | offboard_all | POST /api/v1/wallet/offboard/all | Offboard all VTXOs |
| WalletApi | offboard_vtxos | POST /api/v1/wallet/offboard/vtxos | Offboard specific VTXOs |
| WalletApi | peek_address | GET /api/v1/wallet/addresses/index/{index} | Get Ark address by index |
| WalletApi | pending_rounds | GET /api/v1/wallet/rounds | List round participations |
| WalletApi | refresh_all | POST /api/v1/wallet/refresh/all | Refresh all VTXOs |
| WalletApi | refresh_counterparty | POST /api/v1/wallet/refresh/counterparty | Refresh received VTXOs |
| WalletApi | refresh_vtxos | POST /api/v1/wallet/refresh/vtxos | Refresh specific VTXOs |
| WalletApi | send | POST /api/v1/wallet/send | Send a payment |
| WalletApi | send_onchain | POST /api/v1/wallet/send-onchain | Send on-chain from Ark balance |
| WalletApi | sync | POST /api/v1/wallet/sync | Sync wallet |
| WalletApi | sync_mailbox | POST /api/v1/wallet/sync/mailbox | Sync mailbox only |
| WalletApi | vtxos | GET /api/v1/wallet/vtxos | List VTXOs |
| WalletApi | wallet_delete | DELETE /api/v1/wallet | |
| WalletApi | wallet_exists | GET /api/v1/wallet |
Documentation For Models
- Address
- ArkAddressResponse
- ArkInfo
- BadRequestError
- Balance
- BarkNetwork
- BitcoindAuth
- BitcoindAuthOneOf
- BitcoindAuthOneOf1
- BitcoindAuthOneOf1UserPass
- BitcoindAuthOneOfCookie
- BlockRef
- BoardFees
- BoardRequest
- ChainSourceConfig
- ChainSourceConfigOneOf
- ChainSourceConfigOneOf1
- ChainSourceConfigOneOf1Esplora
- ChainSourceConfigOneOfBitcoind
- ChildTransactionInfo
- ConnectedResponse
- CreateWalletRequest
- CreateWalletResponse
- EncodedVtxoResponse
- ExitAwaitingDeltaState
- ExitClaimAllRequest
- ExitClaimInProgressState
- ExitClaimResponse
- ExitClaimVtxosRequest
- ExitClaimableState
- ExitClaimedState
- ExitError
- ExitErrorOneOf
- ExitErrorOneOf1
- ExitErrorOneOf10
- ExitErrorOneOf11
- ExitErrorOneOf12
- ExitErrorOneOf13
- ExitErrorOneOf14
- ExitErrorOneOf15
- ExitErrorOneOf16
- ExitErrorOneOf17
- ExitErrorOneOf18
- ExitErrorOneOf19
- ExitErrorOneOf2
- ExitErrorOneOf20
- ExitErrorOneOf21
- ExitErrorOneOf22
- ExitErrorOneOf23
- ExitErrorOneOf24
- ExitErrorOneOf25
- ExitErrorOneOf3
- ExitErrorOneOf4
- ExitErrorOneOf5
- ExitErrorOneOf6
- ExitErrorOneOf7
- ExitErrorOneOf8
- ExitErrorOneOf9
- ExitProcessingState
- ExitProgressRequest
- ExitProgressResponse
- ExitProgressStatus
- ExitStartRequest
- ExitStartResponse
- ExitStartState
- ExitState
- ExitStateOneOf
- ExitStateOneOf1
- ExitStateOneOf2
- ExitStateOneOf3
- ExitStateOneOf4
- ExitStateOneOf5
- ExitStatusRequest
- ExitTransactionPackage
- ExitTransactionStatus
- ExitTx
- ExitTxOrigin
- ExitTxOriginOneOf
- ExitTxOriginOneOf1
- ExitTxOriginOneOf2
- ExitTxStatus
- ExitTxStatusOneOf
- ExitTxStatusOneOf1
- ExitTxStatusOneOf2
- ExitTxStatusOneOf3
- ExitTxStatusOneOf4
- FeeEstimateQuery
- FeeEstimateResponse
- FeeInfo
- FeeSchedule
- ImportVtxoRequest
- InternalServerError
- InvoiceInfo
- LightningInvoiceRequest
- LightningPayRequest
- LightningPayResponse
- LightningReceiveFees
- LightningReceiveInfo
- LightningSendFees
- MailboxSyncResponse
- MnemonicResponse
- Movement
- MovementDestination
- MovementStatus
- MovementSubsystem
- MovementTimestamp
- NextRoundStart
- NotFoundError
- OffboardAllFeeEstimateQuery
- OffboardAllRequest
- OffboardFees
- OffboardResult
- OffboardVtxosRequest
- OnchainBalance
- OnchainDrainRequest
- OnchainFeeRatesResponse
- OnchainSendManyRequest
- OnchainSendRequest
- PaymentMethod
- PendingBoardInfo
- PendingRoundInfo
- PpmExpiryFeeEntry
- RefreshFees
- RefreshRequest
- RoundParticipationInfo
- RoundStatus
- RoundStatusOneOf
- RoundStatusOneOf1
- RoundStatusOneOf2
- RoundStatusOneOf3
- RoundStatusOneOf4
- RoundStatusOneOf5
- Send
- SendOnchainFeeEstimateQuery
- SendOnchainRequest
- SendRequest
- SendResponse
- TipResponse
- TransactionInfo
- UtxoInfo
- VtxoInfo
- VtxoRequestInfo
- VtxoStateInfo
- VtxoStateInfoOneOf
- VtxoStateInfoOneOf1
- VtxoStateInfoOneOf2
- VtxosQuery
- WalletDeleteRequest
- WalletDeleteResponse
- WalletExistsResponse
- WalletNotification
- WalletNotificationOneOf
- WalletNotificationOneOf1
- WalletNotificationOneOf2
- WalletTxInfo
- WalletVtxoInfo
To get access to the crate's generated documentation, use:
cargo doc --open