forked from dcSpark/cardano-multiplatform-lib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Workspace refactor initial moving existing code * Move CIP25 library into CML. Existed before at https://github.com/dcSpark/cip25-lib * Base code changes for module split Going on the previous two commits bringing in exisitng code over to the workspace structure, this makes it work together using each other as dependencies and such + misc fixes so it compiles. This includes the CIP25 crate as well. * Move on-chain crypto into chain crate All things specified in babbage/crypto.cddl are now back in the chain crate. To work around some things e.g. signatures, hashes being uses in the crypto crate we have those being their base locations with chain/crypto having a `ChainCrypto<T>` wrapper around this. We have the to/from raw bytes in a `RawBytesEncoding` trait to help out as well for when things are raw bytes. All crypto bindings are still in the `wasm` crate. We will need to look into a separate `crypto-wasm` crate and first test out how those would interact and if it's possible/a good idea. * crypto-wasm crate added Crypto wasm bindings moved into separate `crypto-wasm` crate. The on-chain representations are still in `wasm`.
- Loading branch information
1 parent
690951c
commit 1461038
Showing
72 changed files
with
3,495 additions
and
1,734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[workspace] | ||
|
||
# this is for the new crate structure. The legacy code (current CML) still resides in the `rust` directory. | ||
members = [ | ||
"core", | ||
"crypto", | ||
"cip25", | ||
"cip25-wasm", | ||
"wasm" | ||
] | ||
|
||
# exclude old crate structure to avoid error in it | ||
exclude = [ | ||
"rust" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[package] | ||
name = "cardano-multiplatform-lib-chain" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[dependencies] | ||
cardano-multiplatform-lib-core = { "path" = "../core" } | ||
cardano-multiplatform-lib-crypto = { "path" = "../crypto" } | ||
cbor_event = "2.2.0" | ||
linked-hash-map = "0.5.3" | ||
derivative = "2.2.0" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0.57" | ||
schemars = "0.8.8" | ||
|
||
bech32 = "0.7.2" | ||
hex = "0.4.0" | ||
itertools = "0.10.1" | ||
getrandom = { version = "0.2.3", features = ["js"] } | ||
rand = "0.8.5" | ||
fraction = "0.10.0" | ||
base64 = "0.13" | ||
num-bigint = "0.4.0" | ||
num-integer = "0.1.45" | ||
#rand_os = "0.1" | ||
thiserror = "1.0.37" | ||
# These can be removed if we make wasm bindings for ALL functionality here. | ||
# This was not done right now as there is a lot of existing legacy code e.g. | ||
# for Byron that might need to be used from WASM and might not. | ||
# We can remove this dependency when that is decided. | ||
# | ||
# The other use-case here is enums. Without this two enums would need to be defined | ||
# despite wasm_bindgen supporting C-style enums (with non-negative values) 100% | ||
# This could possibly be resolved with macros but maybe not. | ||
|
||
# non-wasm | ||
#[target.'cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))'.dependencies] | ||
#rand_os = "0.1" | ||
#noop_proc_macro = "0.3.0" | ||
|
||
# wasm | ||
#[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] | ||
wasm-bindgen = { version = "=0.2.82", features = ["serde-serialize"] } | ||
#rand_os = { version = "0.1", features = ["wasm-bindgen"] } | ||
#js-sys = "=0.3.59" | ||
|
||
|
||
[dev-dependencies] | ||
quickcheck = "0.9.2" | ||
quickcheck_macros = "0.9.1" | ||
rand_chacha = "0.3.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Chain | ||
|
||
This is the core cardano-multiplatform-lib crate for all on-chain data types. | ||
This was generated from the `specs/babbage/` CDDL specs using cddl-codegen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.