bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Better names for methods

Open Ademan opened this issue 1 year ago • 3 comments

It looks like LocalUtxo was renamed to LocalOutput in master, which seems like a great improvement in clarity. I came across #665 trying to determine whether or not Wallet::get_utxo actually returns unspent outputs or not. I'd propose renaming the rest of the wallet API (and database API) to reflect this type change in 1.x

Ademan avatar Dec 27 '23 15:12 Ademan

Maybe this is better labeled as a discussion.

Ademan avatar Dec 27 '23 15:12 Ademan

Is the proposal here to find places in the new 1.0 APIs where we return LocalOutput and make sure the function names and docs are updated to not use the terms unspent ? I found a couple cases of this in the bdk crate:

  • [ ] LocalOutput struct docs
  • [ ] Utxo enum docs ? I'm not 100% sure this one is wrong

Are there other places that need fixing?

notmandatory avatar Dec 27 '23 20:12 notmandatory

Feel free to leave suggestions on #1221 as well, where the idea is to come up with more idiomatic names

ValuedMammal avatar Feb 05 '24 02:02 ValuedMammal

A small change but I think we should push to 2.0 milestone.

notmandatory avatar Mar 20 '24 02:03 notmandatory

get_utxos seems in fact getting utxos

nondiremanuel avatar Mar 21 '24 23:03 nondiremanuel