Skip to content

Add mnemonics to registrar client #23

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

Conversation

Eslam-Nawara
Copy link
Collaborator

Description

support using mnemonics to node registrar client

Changes

List of changes this PR includes

Related Issues

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring

Copy link
Contributor

@rawdaGastan rawdaGastan left a comment

Choose a reason for hiding this comment

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

Why not handling mnemonic in the registrar itself?


cli, err := client.NewRegistrarClient(registrarURL, s)
cli, err := client.NewRegistrarClient(registrarURL, mnemonic)
Copy link
Contributor

Choose a reason for hiding this comment

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

why passing mnemonic to the client?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's optional, user can initialize the client with or without the mnemonic, it the user already has an account, they can pass it to the client as in the tfpluginclient, if not they can just not pass mnemonic and has a client with no account.


func parseKeysFromMnemonicOrSeed(mnemonicOrSeed string) (keypair subkey.KeyPair, err error) {
// otherwise drive key pair from seed
keypair, err = subkey.DeriveKeyPair(subkeyEd25519.Scheme{}, mnemonicOrSeed)
Copy link
Contributor

Choose a reason for hiding this comment

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

won't sr25519 be supported?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's supported in the server, if needed we can support them too in the client, we need to pick a default tho

@ashraffouda ashraffouda merged commit 9d8b469 into development-add-node-registrar-client Mar 5, 2025
4 checks passed
@Eslam-Nawara Eslam-Nawara deleted the add-mnemonics-to-registrar-client branch March 5, 2025 13:38
Eslam-Nawara added a commit that referenced this pull request Mar 9, 2025
* support mnemonics in registrar client

* fix drive keys from seed

* update registrar client readme file

* remove extra print lines

* remove extra comments

* lower case error messages
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.

3 participants