-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make common crate for TSS and test client #775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good maybe should in the future also consider common packages being being in the workspace cargo.toml
crates/client/Cargo.toml
Outdated
@@ -0,0 +1,57 @@ | |||
[package] | |||
name ="entropy-client" | |||
version ="0.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should fast forward to same version as other packages?
In order to use the entropy test client in
entropy_testing_utils::test_client
we need to haveentropy_tss
as a dependency. This means we cant make a simple client without having all the dependencies from entropy-tss.For example the testnet status page depends on it, as does the CLI for storing programs - for more context see the discussion in the PR for that: entropyxyz/programs#68 (comment)
This PR adds a new crate
entropy-client
which includes the bits a client needs fromentropy-tss
, as well as the contents ofentropy_testing_utils::test_client
.entropy-cilent
contains for example the chain metadata and theUserSignatureRequest
struct.Since
entropty-tss
does not need everything inentropy-client
, there is a 'full-client' feature (enabled by default) which adds the bitsentropy-tss
does not depend on.To do in followups:
entropy-tss
integration tests now don't need anything fromentropy-tss
. This meansentropy-tss
now no longer needs to be a library crate. The advantage of turning it back into just a binary crate is that we get the full API documented - not just the bits we expose as library functions.entropy-client
should compile to wasm. Currently it does compile with--no-default-features -F wasm
. But we cannot submit extrinsics because of needingsubxt::tx::PairSigner
. There is for sure a way round this. Also we need to access the system clock for adding timestamps to signature requests - we just need to usejs_sys::Date
instead ofstd::time::SystemTime
.