ElementsProject / libwally-core

Useful primitives for wallets
Other
282 stars 135 forks source link

Improved debugging for wally_psbt_sign_bip32 #378

Open Sjors opened 1 year ago

Sjors commented 1 year ago

I'm trying to leverage the new wally_psbt_sign_bip32 function, but having a hard time debugging things, since it only returns WALLY_EINVAL.

https://github.com/Sjors/libwally-swift/pull/85

Different error codes for different failure modes would make this easier. Alternatively, having more helper methods to sanity check inputs could help debugging too. E.g. I ended up calling wally_psbt_get_id (which succeeds) since it calls some common code with wally_psbt_sign_bip32 to narrow down the failure.