libwally-core
libwally-core copied to clipboard
Using of the term `entropy` is unconsistent and misleading
Functions like wally_tx_add_elements_raw_input
are expecting entropy
as an argument. The doc says that this is "Entropy for the asset tag calculation."
The man for wally_tx_elements_issuance_generate_entropy
says "Calculate the asset entropy from a prevout and the Ricardian contract hash."
Actually entropy
in wally_tx_add_elements_raw_input
is contract_hash
argument to wally_tx_elements_issuance_generate_entropy
.
I think this is all very confusing, and I suggest at least to mention explicitly what is expected as entropy
here.
Or maybe clarify variable names.
@Sosthene00 I agree this is confusing. Once the elements PSBT support is finalised in the elements codebase, and https://github.com/ElementsProject/libwally-core/pull/218 updated to reflect it, I hope to standardise the naming between elements txs and the PSBT code since this will be an API change anyway.
If you encounter any other specific examples that caused you confusion please feel free to document them here and I'll try to make sure they are covered under that work.