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

Remove wasm #14

Merged
merged 10 commits into from
Sep 9, 2024
Merged

Remove wasm #14

merged 10 commits into from
Sep 9, 2024

Conversation

robbiecarlton
Copy link
Contributor

The dependency on @holo-host/wasm-key-manager was causing down stream build issues with this module in some environments, so I removed it. That repo is still available to be imported directly.

@robbiecarlton robbiecarlton marked this pull request as ready for review September 9, 2024 16:43
Comment on lines 8 to 37
function deriveSeedFrom(hha_id, email, password) {
throw new Error("javascript deriveSeedFrom is not implemented yet")

// return new Uint8Array([
// 224, 186, 208, 19, 196, 26, 72, 30,
// 72, 91, 170, 129, 169, 229, 53, 112,
// 216, 149, 4, 192, 1, 114, 148, 173,
// 14, 68, 215, 72, 242, 209, 155, 196
// ])

let salt = sha512.digest(email)

// const seed = argon2.hash({
// pass: password,
// salt,
// type: argon2.ArgonType.Argon2id
// })

// {
// // optional
// time: 1, // the number of iterations
// mem: 1024, // used memory, in KiB
// hashLen: 24, // desired hash length
// parallelism: 1, // desired parallelism (it won't be computed in parallel, however)
// secret: new Uint8Array([...]), // optional secret data <- hha_id
// ad: new Uint8Array([...]), // optional associated data
// }

return seed
}
Copy link
Member

Choose a reason for hiding this comment

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

I think I am missing something here, I am seeing everything commented here

src/index.js Outdated
deriveSeedFrom
} = require("@holo-host/wasm-key-manager");
} = require("./deriveSeedFrom")
const KeyManager = require("./keyManager")
Copy link
Member

@zo-el zo-el Sep 9, 2024

Choose a reason for hiding this comment

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

I thought we decided not to have this implementation in the lib.

we should have have two implementation, lets just remove it and if we need it then they should use the wasm-key-manager

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 was just keeping the half completed js implementations around. But I'll move them to a branch

package.json Outdated
Comment on lines 23 to 25
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.5.0",
"argon2-browser": "^1.18.0",
Copy link
Member

Choose a reason for hiding this comment

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

we should remove the unnecessary modules too

Copy link
Member

@zo-el zo-el left a comment

Choose a reason for hiding this comment

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

Just needs to clean up the imported libs. Approving preemptively

@robbiecarlton robbiecarlton merged commit 5904a36 into develop Sep 9, 2024
1 check passed
@robbiecarlton robbiecarlton deleted the replace-wasm branch September 9, 2024 19:49
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.

2 participants