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

Move RawBytesEncoding and standardize use #340

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

rooooooooob
Copy link
Contributor

Fixes #334

Moves RawBytesEncoding to cml_core::serialization as there is nothing specific about crypto with it, and it can be used in many other places (Asset names, plutus scripts, etc).

Add wasm macros for declaring the RawBytesEncoding API automatically using the rust type's trait impl

Add missing hash() to PlutusV3Script

Document AssetName on how to convert to/from using utf8 traits in rust

Use dcSpark/cddl-codegen#240 to remove confusing get() (what is it getting?) functions on some wrapper types. These are replaced with RawBytesEncoding to standardize use with the rest of CML

Fixes #334

Moves RawBytesEncoding to cml_core::serialization as there is nothing
specific about crypto with it, and it can be used in many other places
(Asset names, plutus scripts, etc).

Add wasm macros for declaring the RawBytesEncoding API automatically
using the rust type's trait impl

Add missing hash() to PlutusV3Script

Document AssetName on how to convert to/from using utf8 traits in rust

Use dcSpark/cddl-codegen#240 to remove confusing `get()` (what is it
getting?) functions on some wrapper types. These are replaced with `RawBytesEncoding` to standardize use with the rest of CML
@rooooooooob
Copy link
Contributor Author

rooooooooob commented Jul 9, 2024

We could re-export it with a deprecated tag to avoid breaking code as well, and keep the old methods too but deprecate them in favor of the new one. Are we stable enough at this point where we should do that or is it fine as-is for breaking changes?

#339 will break API anyway necessarily anyway so that's why i didn't bother here

@SebastienGllmt SebastienGllmt merged commit 653fd14 into develop Jul 10, 2024
1 check passed
@SebastienGllmt SebastienGllmt deleted the raw-bytes-encoding-rework branch July 10, 2024 06:18
rooooooooob added a commit that referenced this pull request Jul 16, 2024
rooooooooob added a commit that referenced this pull request Jul 17, 2024
* Add support for parsing Shelley genesis blocks

* Genesis keyHash alias + minor fixes

* Add alias for `ShelleyGenesisCredential::keyHash` to account for
cardano-node json format

* Remove unnecessary clone()

* Change `u64` to `Coin` when appropriate in Genesis types

* ran cargo fmt

* Update Genesis parsing for changes in #340

---------

Co-authored-by: rooooooooob <rooooooooob@users.noreply.github.com>
Co-authored-by: rooooooooob <raftias@gmail.com>
rooooooooob added a commit that referenced this pull request Jul 23, 2024
Fixes #334

Moves RawBytesEncoding to cml_core::serialization as there is nothing
specific about crypto with it, and it can be used in many other places
(Asset names, plutus scripts, etc).

Add wasm macros for declaring the RawBytesEncoding API automatically
using the rust type's trait impl

Add missing hash() to PlutusV3Script

Document AssetName on how to convert to/from using utf8 traits in rust

Use dcSpark/cddl-codegen#240 to remove confusing `get()` (what is it
getting?) functions on some wrapper types. These are replaced with `RawBytesEncoding` to standardize use with the rest of CML
rooooooooob added a commit that referenced this pull request Jul 23, 2024
* Add support for parsing Shelley genesis blocks

* Genesis keyHash alias + minor fixes

* Add alias for `ShelleyGenesisCredential::keyHash` to account for
cardano-node json format

* Remove unnecessary clone()

* Change `u64` to `Coin` when appropriate in Genesis types

* ran cargo fmt

* Update Genesis parsing for changes in #340

---------

Co-authored-by: rooooooooob <rooooooooob@users.noreply.github.com>
Co-authored-by: rooooooooob <raftias@gmail.com>
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

Successfully merging this pull request may close these issues.

nodejs: AssetName class missing to_hex() method
2 participants