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

Docs Update #307

Closed
wants to merge 18 commits into from
Closed

Docs Update #307

wants to merge 18 commits into from

Conversation

rooooooooob
Copy link
Contributor

No description provided.

@rooooooooob rooooooooob marked this pull request as draft February 5, 2024 20:16
@@ -417,6 +417,13 @@ macro_rules! impl_wasm_cbor_api {
cml_core::serialization::Serialize::to_cbor_bytes(&self.0)
}

/**
* Serialize this type to CBOR bytes using canonical CBOR encodings
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to all the types that support preserve-encodings/etc as we expose it in rust and it can't hurt to expose it. I used it in the cbor docs example.

One small possible inconsistency is that it's not added to the byron/cip25 types as we can't guarantee anything implementing cbor_event::Serialize will do it canonically or not. The comment for to_cbor_bytes() on those types does mention that the format may or may not be canonical.

@rooooooooob rooooooooob mentioned this pull request Mar 1, 2024
rooooooooob added a commit that referenced this pull request Mar 1, 2024
Rust and WASM crates for creating tx builders from blockfrost.

The rust crate can be directly used with the `blockfrost` crate when the
feature `direct_api` is enabled. If it is not then various parsing
ability is still exposed for cost models.

The WASM crate due to technical restrictions just exposes an endpoint
that takes in the response JSON and creates the config.

the cml/wasm crate exports this new `cml-blockfrost-wasm` functionality
which only increased compiled size from 896kb -> 911kb so should be fine
to include by default.

TODO: some documentation but this would conflict with #307's
documentation update so can be done at a later date.
@rooooooooob rooooooooob changed the title WIP - JSON clarification Docs Update May 21, 2024
@rooooooooob rooooooooob marked this pull request as ready for review May 21, 2024 17:55
@rooooooooob rooooooooob marked this pull request as draft May 21, 2024 17:57
@rooooooooob rooooooooob marked this pull request as ready for review July 23, 2024 16:56
hadelive and others added 13 commits July 23, 2024 10:03
* feat: add native-script verify function
Due to changes here: IntersectMBO/cardano-ledger#4284
Clarification here: IntersectMBO/cardano-ledger#4383

Allows non-Plutus languages according to the spec and changes to an
indexable map type.
* Add documentation + fix acronym names

Using dcSpark/cddl-codegen#218 and dcSpark/cddl-codegen#238

Also renames some cert fields to be clear as `coin` was not very
helpful.

* update multi-era crates too

* clippy fix
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
* Governance Builders

Adds `VoteBuilder` and `ProposalBuilder` to facilitate creation of votes
and voting proposals to transactions.

* Hook Vote/Proposal Builders into TxBuilder/RedeemerBuilder

* Fix deposit/required certs

* Fix proposal deposits
Somehow `coin` ended up here still after #333 despite being changed to
`deposit`.
Rust CML crates must use wasm-bindgen for enums as these are used from
the WASM CML crates.

Using noop_proc_macro we can replace the wasm_bindgen proc macro with a
no-op that does nothing when consumed directly from rust.

This is now locked behind a feature (used_from_wasm) as we can't just
use cfg target checks as compiling the wasm crate (not using web-pack)
would use the rust target and break.

Crates using cml-chain and cml-multi-era from a wasm crate must specify
this feature to activate the wasm_bindgen dependancy instead of the
no-op macro.
* 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 rooooooooob marked this pull request as draft July 23, 2024 17:13
rooooooooob added a commit that referenced this pull request Jul 25, 2024
Update docs to new crate structure.

Adds CBOR and JSON explanations

General updates as the docs were very outdated

Replaces #307 (same without plutus + messed up git rebase/merges)
rooooooooob added a commit that referenced this pull request Jul 25, 2024
Based on Aiken's Hello WOrld example.

TODO:
I couldn't get the redeem contract to be accepted by the network.
We need to figure out why and update this example.

Replaces the plutus part of #307
@rooooooooob rooooooooob mentioned this pull request Jul 25, 2024
@rooooooooob
Copy link
Contributor Author

Replaced by #345 + #346

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.

None yet

4 participants