input-output-hk / js-chain-libs

chain-libs javascript SDK
Apache License 2.0
18 stars 14 forks source link

Add as_bytes and from_bytes for Input #103

Closed SebastienGllmt closed 4 years ago

SebastienGllmt commented 4 years ago

Need to be able to serialize inputs for Yoroi so I added these functions

Note 1: This includes a breaking change where get_type now returns an enum. This matches the pattern with the rest of the codebase

Note 2: I didn't add similar functions for Output because it looks like chain-libs doesn't have a serialization format for outputs and probably that's something the Rust team needs to decide and not me.