Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
230 stars 124 forks source link

expose payment_cred for addresses #646

Open teebaumcrypto opened 10 months ago

teebaumcrypto commented 10 months ago

inner struct is private, so add a helper function to get payment credentials, byron does not support it, so it throws an error.

lisicky commented 9 months ago

Hi @teebaumcrypto ! Thanks for this PR too. In this case I suggest to return Option type instead Error. And also since we use wasm bingen, we don't return a reference, you need to change your code to return a copy of struct. And it would be better if you add a couple of simple tests

teebaumcrypto commented 9 months ago

@lisicky appreciate your time looking through it. that's why the code is full of clones, because of the wasm bingen, this does make sense.