Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor API pain-points #141

Open
sanket1729 opened this issue Jul 29, 2022 · 1 comment
Open

Minor API pain-points #141

sanket1729 opened this issue Jul 29, 2022 · 1 comment

Comments

@sanket1729
Copy link
Member

sanket1729 commented Jul 29, 2022

These are things that are easy to workaround downstream, but would one-liner if we had upstream support. I will update the list as I find more things:

  1. Direct API for calculating assetid and token id directly from prevouts during initial issuance. This currently a multi step process which requires dealing calling the AssetId::generate_asset_entropy() API.
  2. Display implementations of Explicit Asset should add the 0x01 prefix
  3. Add FromStr implementation for confidential::Asset/Value/Nonce. Currently, we need to decode a bytes and call encode::deserialize. It would be great to have methods for a) from_slice/to_vec() b) Display/FromStr c) FromHex/ToHex.
  4. Implement auto-derives for Error data structures. For example: UnBlindError.
  5. Separate out TxOut::unblind API into two APIs. TxOut::unblind_from_prf. This will also it to re-use it for psbt logic too
@apoelstra
Copy link
Member

Even in rust-bitcoin we have serialize_hex but not deserialize_hex for some reason, which often requires this decode-then-deserialize thing. I think the reason was something dumb like not having a good error return type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants