21 Commits

Author SHA1 Message Date
Alekos Filini
18254110c6
Merge commit 'refs/pull/348/head' of github.com:bitcoindevkit/bdk 2021-06-11 11:41:23 +02:00
Tobin Harding
12de13b95c
Remove redundant borrows
Clippy emits:

  warning: this expression borrows a reference

As suggested remove the borrows from the front of vars that are already references.
2021-06-10 13:16:07 +10:00
Riccardo Casatta
bfef2e3cfe
Implements RPC Backend 2021-06-03 10:55:58 +02:00
Steve Myers
12ae1c3479
Update license to Apache 2.0 or MIT, copyright to Bitcoin Dev Kit Developers 2021-03-03 13:23:25 -08:00
Thomas Eizinger
fdde0e691e
Make constructor functions on FeeRate const
This allows `FeeRate`s to be stored inside `const`s.

For example:

const MY_FEE_RATE: FeeRate = FeeRate::from_sat_per_vb(10.0);

Unfortunately, floating point maths inside const expressions is
still unstable, hence we cannot make `from_btc_per_kvb` const.
2021-03-01 11:04:39 +11:00
LLFourn
d9a102afa9
Improve docs of satisfaction_weight 2021-02-26 13:33:52 +11:00
LLFourn
1fbfeabd77
Added add_foreign_utxo
To allow adding UTXOs external to the current wallet.
The caller must provide the psbt::Input so we can create a coherent PSBT
at the end and so this is compatible with existing PSBT workflows.

Main changes:

- There are now two types of UTXOs, local and foreign reflected in a
`Utxo` enum.
- `WeightedUtxo` now captures floating `(Utxo, usize)` tuples
- `CoinSelectionResult` now has methods on it for distinguishing between
local amount included vs total.
2021-02-26 13:33:52 +11:00
LLFourn
a7183f34ef
s/UTXO/LocalUtxo/g
Since this struct has a "keychain" it is not a general "UTXO" but a
local wallet UTXO.
2021-02-26 13:33:52 +11:00
Steve Myers
8cfbf1f0a2
[docs] Add more docs to 'types.rs' 2020-12-16 15:12:47 -08:00
Alekos Filini
1713d621d4
Rename ScriptType to KeychainKind
This avoids confusion with the "type of script".
2020-12-14 17:14:24 +01:00
Alekos Filini
aed2414cad
Merge commit 'refs/pull/214/head' of github.com:bitcoindevkit/bdk 2020-12-07 11:57:32 +01:00
Riccardo Casatta
95bfe7c983
[docs] types.rs 2020-12-05 13:25:58 +01:00
LLFourn
8dcb75dfa4
Replace UTXO::is_internal with script_type
This means less conversion and logic mapping from bool to ScriptType and
back again.
2020-12-04 10:46:25 +11:00
Steve Myers
aea9abff8a
[ci] Fix clippy warnings, enable clippy checks 2020-10-10 10:31:07 -07:00
Alekos Filini
7065c1fed6
Write more docs 2020-09-04 11:44:49 +02:00
Alekos Filini
c0867a6adc
General cleanup for the docs 2020-08-31 15:04:27 +02:00
Alekos Filini
d61e974dbe
Add the license to every file 2020-08-31 11:48:25 +02:00
Alekos Filini
9e5023670e
[tests] Add a proc macro to generate tests for OnlineBlockchain types 2020-08-10 17:18:17 +02:00
Alekos Filini
8d9ccf8d0b
[wallet] Allow limiting the use of internal utxos in TxBuilder 2020-08-10 17:18:13 +02:00
Alekos Filini
1a4e1bd96c
Wallet logic 2020-04-07 11:16:53 +02:00
Alekos Filini
4919ff148b
Move everything in the root 2020-02-07 12:27:10 +01:00