/** Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with `AddressIndex.NEW`. Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. */
/** URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with `ssl://` or `tcp://` and include a port, e.g. `ssl://electrum.blockstream.info:60002`. */
varurl:String,
/** URL of the socks5 proxy server or a Tor service. */
varsocks5:String?,
/** Request retry count. */
varretry:UByte,
/** Request timeout (seconds). */
vartimeout:UByte?,
/** Stop searching addresses for transactions after finding an unused gap of this length. */
varstopGap:ULong
)
/**
*ConfigurationforanEsplorablockchain.
*/
dataclassEsploraConfig(
/** Base URL of the esplora service, e.g. `https://blockstream.info/api/`. */
varbaseUrl:String,
/** Optional URL of the proxy to use to make requests to the Esplora server. */
varproxy:String?,
/** Number of parallel requests sent to the esplora service (default: 4). */
varconcurrency:UByte?,
/** Stop searching addresses for transactions after finding an unused gap of this length. */
/** Fee value (sats) if available. The availability of the fee depends on the backend. It’s never None with an Electrum server backend, but it could be None with a Bitcoin RPC node without txindex that receive funds while offline. */
varfee:ULong?,
/** Received value (sats) Sum of owned outputs of this transaction. */
varreceived:ULong,
/** Sent value (sats) Sum of owned inputs of this transaction. */
varsent:ULong,
/** Transaction id. */
vartxid:String
/** If the transaction is confirmed, [BlockTime] contains height and timestamp of the block containing the transaction. This property is null for unconfirmed transactions. */
/** Return a derived address using the external descriptor, see [AddressIndex] for available address index selection strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) then the same address will always be returned for any [AddressIndex]. */
/** Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates on the internal database, which first needs to be [Wallet.sync] manually. */
fungetBalance():ULong{}
/** Sign a transaction with all the wallet’s signers. */
/** Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. */
funlistTransactions():List<TransactionDetails>{}
/** Get the Bitcoin network the wallet is using. */
funnetwork():Network{}
/** Sync the internal database with the blockchain. */
/** Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, which first needs to be [Wallet.sync] manually. */
/** Send a new progress update. The progress value should be in the range 0.0 - 100.0, and the message value is an optional text message that can be displayed to the user. */
/** Add a utxo to the internal list of unspendable utxos. It’s important to note that the "must-be-spent" utxos added with [TxBuilder.addUtxo] have priority over this. See the Rust docs of the two linked methods for more details. */
/** Add an outpoint to the internal list of UTXOs that must be spent. These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. */
funaddUtxo(outpoint:OutPoint):TxBuilder{}
/** Add the list of outpoints to the internal list of UTXOs that must be spent. If an error occurs while adding any of the UTXOs then none of them are added and the error is returned. These have priority over the "unspendable" utxos, meaning that if a utxo is present both in the "utxos" and the "unspendable" list, it will be spent. */
funaddUtxos(outpoints:List<OutPoint>):TxBuilder{}
/** Do not spend change outputs. This effectively adds all the change outputs to the "unspendable" list. See [TxBuilder.unspendable]. */
fundoNotSpendChange():TxBuilder{}
/** Only spend utxos added by [add_utxo]. The wallet will not add additional utxos to the transaction even if they are needed to make the transaction valid. */
funmanuallySelectedOnly():TxBuilder{}
/** Only spend change outputs. This effectively adds all the non-change outputs to the "unspendable" list. See [TxBuilder.unspendable]. */
funonlySpendChange():TxBuilder{}
/** Replace the internal list of unspendable utxos with a new list. It’s important to note that the "must-be-spent" utxos added with [TxBuilder.addUtxo] have priority over these. See the Rust docs of the two linked methods for more details. */
/** Spend all the available inputs. This respects filters like [TxBuilder.unspendable] and the change policy. */
fundrainWallet():TxBuilder{}
/** Sets the address to drain excess coins to. Usually, when there are excess coins they are sent to a change address generated by the wallet. This option replaces the usual change address with an arbitrary ScriptPubKey of your choosing. Just as with a change output, if the drain output is not needed (the excess coins are too small) it will not be included in the resulting transaction. The only difference is that it is valid to use [drainTo] without setting any ordinary recipients with [addRecipient] (but it is perfectly fine to add recipients as well). If you choose not to set any recipients, you should either provide the utxos that the transaction should spend via [addUtxos], or set [drainWallet] to spend all of them. When bumping the fees of a transaction made with this option, you probably want to use [BumpFeeTxBuilder.allowShrinking] to allow this output to be reduced to pay for the extra fees. */
fundrainTo(address:String):TxBuilder{}
/** Enable signaling RBF. This will use the default `nsequence` value of `0xFFFFFFFD`. */
funenableRbf():TxBuilder{}
/** Enable signaling RBF with a specific nSequence value. This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given `nsequence` is lower than the CSV value. If the `nsequence` is higher than `0xFFFFFFFD` an error will be thrown, since it would not be a valid nSequence to signal RBF. */
/** Explicitly tells the wallet that it is allowed to reduce the amount of the output matching this script_pubkey in order to bump the transaction fee. Without specifying this the wallet will attempt to find a change output to shrink instead. Note that the output may shrink to below the dust limit and therefore be removed. If it is preserved then it is currently not guaranteed to be in the same position as it was originally. Returns an error if script_pubkey can’t be found among the recipients of the transaction we are bumping. */
/** Enable signaling RBF. This will use the default `nsequence` value of `0xFFFFFFFD`. */
funenableRbf():BumpFeeTxBuilder{}
/** Enable signaling RBF with a specific nSequence value. This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given `nsequence` is lower than the CSV value. If the `nsequence` is higher than `0xFFFFFFFD` an error will be thrown, since it would not be a valid nSequence to signal RBF. */