Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DATEX Web
# DATEX

> Check out our specification at [datex.unyt.org](https://datex.unyt.org).

Expand Down
4 changes: 2 additions & 2 deletions rs-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ panic = "abort"

[dependencies]
log = { version = "0.4", features = ["std", "serde"] }
datex-core = { version = "0.0.9", default-features = false, features = [
datex-core = { git = "https://github.com/unyt-org/datex", branch = "release/0.0.10", version = "0.0.10", default-features = false, features = [
"target_wasm",
"compiler",
"decompiler",
"syntax_highlighting_legacy",
"lsp_wasm",
] }
datex-crypto-facade = { version = "0.0.1" }
datex-crypto-facade = { git = "https://github.com/unyt-org/datex", branch = "release/0.0.10", version = "0.0.2" }

# datex_macros = { git = "https://github.com/unyt-org/datex", branch = "refactor/update-loop", version = "0.1.3", package = "datex_macros" }

Expand Down
22 changes: 12 additions & 10 deletions rs-lib/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ impl JSRuntime {
future_to_promise(async move {
let something = b"yellow submarineyellow submarine".to_owned();
let some_check =
b"9At2nzU19GjL8F4WFRyB7RZSGLemMGUMVBZAMChfndF2".to_owned();
"9At2nzU19GjL8F4WFRyB7RZSGLemMGUMVBZAMChfndF2".to_owned();

let based = CryptoImpl::enc_b58(&something).unwrap();
let unbased = CryptoImpl::dec_b58(&some_check).unwrap();
let based = CryptoImpl::enc_b58(&something).as_bytes().to_vec();
let unbased = CryptoImpl::dec_b58_32(&some_check).unwrap();
assert_eq!(something, unbased);
assert_eq!(some_check, based);
assert_eq!(some_check.as_bytes().to_vec(), based);

// Hashes
let mut ikm = Vec::from([0u8; 32]);
Expand Down Expand Up @@ -224,12 +224,14 @@ impl JSRuntime {
assert_ne!(msg, ctr_ciphered);

// AES key wrapping
let wrapped = CryptoImpl::key_upwrap(&random_bytes, &random_bytes)
.await
.unwrap();
let unwrapped = CryptoImpl::key_unwrap(&random_bytes, &wrapped)
.await
.unwrap();
let wrapped =
CryptoImpl::key_wrap_rfc3394(&random_bytes, &random_bytes)
.await
.unwrap();
let unwrapped =
CryptoImpl::key_unwrap_rfc3394(&random_bytes, &wrapped)
.await
.unwrap();
assert_eq!(random_bytes.to_vec(), unwrapped);
// assert_ne!(wrapped, unwrapped);

Expand Down
2 changes: 1 addition & 1 deletion scripts/build-wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function runWasmBindgen(args: {
}) {
// make sure wasm-bindgen cli is installed
const wasmBindgenInstallProcess = new Deno.Command("cargo", {
args: ["install", "wasm-bindgen-cli"],
args: ["install", "wasm-bindgen-cli", "--version", "0.2.112"],
}).spawn();
const installRes = await wasmBindgenInstallProcess.status;
if (!installRes.success) {
Expand Down