-
Notifications
You must be signed in to change notification settings - Fork 185
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: support keypairs for spells [NET-237 NET-239 NET-281 NET-283] #1382
Conversation
NET-237 Sign spell particles with owner-specific keypair NET-239 Support addressing spells via PeerId derived from owner-specific keypair
NET-281 Builtin function to trigger owner-specific keypair generation
If such keypair doesn't exist, create it. Then always return the PeerId of the owner-specific keypair. Most likely will always be called before NET-283 Generate random keypair for each `owner_id` on the same host |
sorcerer/src/sorcerer.rs
Outdated
fn make_spell_service_functions(&self) -> Vec<SpellCustomService> { | ||
let mut service_functions: Vec<SpellCustomService> = vec![]; | ||
|
||
let mut spell_service = SpellCustomService::new("spell"); |
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.
So much better!
How about the following API:
spell_service.extend(hashmap!{
"install" => self.make_spell_install_closure(),
"remove" => self.make_spell_remove_closure(),
...
})
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.
But current approach is nice as well. So maybe keep it.
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.
nicely done!
Co-authored-by: folex <[email protected]>
Co-authored-by: folex <[email protected]>
("scope" "get_peer_id")
builtin that returns the existent peer id of keypair associated withINIT_PEER_ID
or generates and stores a new one("spell" "install)
and("spell" "remove")
are operating with scope peer_idBEGIN_COMMIT_OVERRIDE
feat: support keypairs for spells [fixes NET-237, NET-239, NET-281 and NET-283] #1382
END_COMMIT_OVERRIDE