/** * 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 { Address, OnchainBalance, OnchainDrainRequest, OnchainSendManyRequest, OnchainSendRequest, Send, UtxoInfo, WalletTxInfo } from '../models/index'; export interface OnchainDrainOperationRequest { onchainDrainRequest: OnchainDrainRequest; } export interface OnchainSendOperationRequest { onchainSendRequest: OnchainSendRequest; } export interface OnchainSendManyOperationRequest { onchainSendManyRequest: OnchainSendManyRequest; } /** * */ export declare class OnchainApi extends runtime.BaseAPI { /** * Creates request options for onchainAddress without sending the request */ onchainAddressRequestOpts(): Promise; /** * Generates a new on-chain receiving address. Each call returns the next unused address from the wallet\'s HD keychain. * Generate on-chain address */ onchainAddressRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Generates a new on-chain receiving address. Each call returns the next unused address from the wallet\'s HD keychain. * Generate on-chain address */ onchainAddress(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise
; /** * Creates request options for onchainBalance without sending the request */ onchainBalanceRequestOpts(): Promise; /** * Returns the current on-chain wallet balance, broken down by confirmation status. The `trusted_spendable_sat` field is the sum of `confirmed_sat` and `trusted_pending_sat`—the balance that can be safely spent without risk of double-spend. * Get on-chain balance */ onchainBalanceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns the current on-chain wallet balance, broken down by confirmation status. The `trusted_spendable_sat` field is the sum of `confirmed_sat` and `trusted_pending_sat`—the balance that can be safely spent without risk of double-spend. * Get on-chain balance */ onchainBalance(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for onchainDrain without sending the request */ onchainDrainRequestOpts(requestParameters: OnchainDrainOperationRequest): Promise; /** * Sends the entire on-chain wallet balance to the specified address. The recipient receives the full balance minus transaction fees. Broadcasts immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Drain on-chain wallet */ onchainDrainRaw(requestParameters: OnchainDrainOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Sends the entire on-chain wallet balance to the specified address. The recipient receives the full balance minus transaction fees. Broadcasts immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Drain on-chain wallet */ onchainDrain(requestParameters: OnchainDrainOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for onchainSend without sending the request */ onchainSendRequestOpts(requestParameters: OnchainSendOperationRequest): Promise; /** * Sends the specified amount to an on-chain address. Broadcasts the transaction immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Send on-chain payment */ onchainSendRaw(requestParameters: OnchainSendOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Sends the specified amount to an on-chain address. Broadcasts the transaction immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Send on-chain payment */ onchainSend(requestParameters: OnchainSendOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for onchainSendMany without sending the request */ onchainSendManyRequestOpts(requestParameters: OnchainSendManyOperationRequest): Promise; /** * Batches multiple payments into a single on-chain transaction. Each destination is formatted as `address:amount`. Broadcasts the transaction immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Send to multiple addresses */ onchainSendManyRaw(requestParameters: OnchainSendManyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Batches multiple payments into a single on-chain transaction. Each destination is formatted as `address:amount`. Broadcasts the transaction immediately at a fee rate targeting confirmation within three blocks and returns the transaction ID. * Send to multiple addresses */ onchainSendMany(requestParameters: OnchainSendManyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for onchainSync without sending the request */ onchainSyncRequestOpts(): Promise; /** * Syncs the on-chain wallet state with the chain source. Fetches new blocks and transactions, updates the UTXO set, and re-submits any stale unconfirmed transactions to the mempool. * Sync on-chain wallet */ onchainSyncRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Syncs the on-chain wallet state with the chain source. Fetches new blocks and transactions, updates the UTXO set, and re-submits any stale unconfirmed transactions to the mempool. * Sync on-chain wallet */ onchainSync(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for onchainTransactions without sending the request */ onchainTransactionsRequestOpts(): Promise; /** * Returns all on-chain wallet transactions, ordered from oldest to newest. Each entry includes the raw transaction, its fee (when known), the wallet\'s net balance change, and confirmation status. The fee is `null` for inbound or collaboratively-funded transactions whose foreign prevouts BDK has not indexed. * List on-chain transactions */ onchainTransactionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns all on-chain wallet transactions, ordered from oldest to newest. Each entry includes the raw transaction, its fee (when known), the wallet\'s net balance change, and confirmation status. The fee is `null` for inbound or collaboratively-funded transactions whose foreign prevouts BDK has not indexed. * List on-chain transactions */ onchainTransactions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates request options for onchainUtxos without sending the request */ onchainUtxosRequestOpts(): Promise; /** * Returns all UTXOs in the on-chain wallet. Each entry includes the outpoint, amount, and confirmation height (if confirmed). * List on-chain UTXOs */ onchainUtxosRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns all UTXOs in the on-chain wallet. Each entry includes the outpoint, amount, and confirmation height (if confirmed). * List on-chain UTXOs */ onchainUtxos(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; }