-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat: add sov-modules-wallet-blueprint
#1179
Conversation
This commit introduces `sov-modules-wallet-blueprint`, a blueprint unlocks wallet implementations for signed runtime calls. The `WalletBlueprint` trait exposes the required types to declare `RuntimeCall` so these can be embeded into wallet modules.
Codecov Report
Additional details and impacted files
|
@@ -0,0 +1,43 @@ | |||
[package] | |||
name = "sov-modules-wallet-blueprint" |
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.
Why do we need a new crate? Can we just put the snap-wallet
in sov-modules-rollup-blueprint
so everything is in one place?
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.
That would bring more feature complexity to sov-modules-rollup-blueprint
as I need to differentiate when we generate for the CLI (so we use things like clap
as dependency), and for the WASM (that is as minimal as possible to keep the binary size small)
If we put it under sov-modules-rollup-blueprint
, we will have to shield anything non-wallet behind feature flags
} | ||
|
||
#[cfg(feature = "default-impl")] | ||
pub struct DefaultWalletBlueprint; |
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.
We shouldn't need this. If we move the code to sov-modules-rollup-blueprint
like suggested in another comment we will just implemnt the WalletBlueprint
for CelestiaDemoRollup
& MockDemoRollup
the same way as it was done for CliWallet
.
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.
The goal of this struct is to make a (Context, DaSpec)
available for crates outside our demos. Meaning: if we create a new runtime that is not the one of celestia or mock, we can use DefaultWalletBlueprint
to generate the WASM module with ed25519
keys.
If we implement WalletBlueprint
for celestia/mock, we will be able to generate WASM only for these runtimes
wontfix; the blueprint will remain as simple as possible, while the process to generate a snap will be done entirely by the sov-snap-generator |
This commit introduces
sov-modules-wallet-blueprint
, a blueprint unlocks wallet implementations for signed runtime calls.The
WalletBlueprint
trait exposes the required types to declareRuntimeCall
so these can be embeded into wallet modules.