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

How Derive keys by path? #204

Closed
vincentiss opened this issue Mar 8, 2024 · 2 comments
Closed

How Derive keys by path? #204

vincentiss opened this issue Mar 8, 2024 · 2 comments

Comments

@vincentiss
Copy link

Dear all,

I need to get Withdrawal keys and Signing keys, the corresponding paths are "m/12381/i/0" and "m/12381/i/0/0" respectively. But I can only pass an int32 type parameter to this function.

func (master *SecretKey) DeriveChildEip2333(child_index uint32) *SecretKey {

How do I pass parameters? Or is there any way to pass string type path?
Could you give me some help? Thank you very much.

@dot-asm
Copy link
Collaborator

dot-asm commented Mar 9, 2024

DeriveChildEip2333 follows corresponding spec according to which it accepts a 32-bit unsigned integer index. While the spec uses "m/i" notation to describe a tree, it doesn't assign specific meaning to it and doesn't say anything about accepting them as arguments. In other words it's up to application to assign the meaning, parse the strings and pass suitable values to the key derivation methods.

@vincentiss
Copy link
Author

Yes, you are right.

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

No branches or pull requests

2 participants