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

nodejs: AssetName class missing to_hex() method #334

Closed
SynthLuvr opened this issue Jun 12, 2024 · 0 comments · Fixed by #340
Closed

nodejs: AssetName class missing to_hex() method #334

SynthLuvr opened this issue Jun 12, 2024 · 0 comments · Fixed by #340

Comments

@SynthLuvr
Copy link

ScriptHash has to_hex() method but AssetName does not have this method. The closest available method is to_cbor_hex() which adds an extra 1-2 bytes for the CBOR encoding. to_js_value() returns the hex value, so this can be used as a workaround, but the defined return type for that is any whereas the actual return type is string.

rooooooooob added a commit that referenced this issue Jul 6, 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 issue 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
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 a pull request may close this issue.

1 participant