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

feat(local-signing-manager): add derivationPath for account #33

Merged

Conversation

MehdiRaash
Copy link
Contributor

@MehdiRaash MehdiRaash commented Feb 3, 2023

Proposed Changes:

  • account object optionally can have derivationPath, { seed: '...', derivationPath: '//test' }
  • Curve type is now added as the feature of the class
  • Different curve type accept different DerivationPath. sr25519 can accept soft/hard path, while ed25519 only accept hard path.

Example of hard path : //one or //one//one and soft path : //once/two.
In addition, the checking for path is being done by underlining PolkadotJS keyring package.

Copy link
Collaborator

@polymath-eric polymath-eric left a comment

Choose a reason for hiding this comment

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

Can you add a test in the .spec file. Ideally one for each type.

packages/local-signing-manager/src/types/index.ts Outdated Show resolved Hide resolved
@polymath-eric
Copy link
Collaborator

You said:

Different curve type accept different DerivationPath. sr25519 can accept soft/hard path, while ed25519 only accept hard path.

I don't see validation for this. At the very least add a doc comment on the derivationPath in the type field

MehdiRaash and others added 2 commits February 6, 2023 11:04
Co-authored-by: polymath-eric <86971143+polymath-eric@users.noreply.github.com>
@MehdiRaash
Copy link
Contributor Author

You said:

Different curve type accept different DerivationPath. sr25519 can accept soft/hard path, while ed25519 only accept hard path.

I don't see validation for this. At the very least add a doc comment on the derivationPath in the type field

Validation take place by the underlying polkadot packages.

Co-authored-by: polymath-eric <86971143+polymath-eric@users.noreply.github.com>
Copy link
Collaborator

@polymath-eric polymath-eric left a comment

Choose a reason for hiding this comment

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

Thanks adding this. LGTM

@sonarcloud
Copy link

sonarcloud bot commented Feb 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@polymath-eric
Copy link
Collaborator

The commit error is from adding the suggestion on the UI, which I forgot husky would complain about.

Merging in anyway since its the only error and it will get squashed out.

@polymath-eric polymath-eric merged commit af131b6 into PolymeshAssociation:main Feb 6, 2023
@polymath-eric polymath-eric deleted the feat/derivation branch February 6, 2023 16:56
@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/local-signing-manager@1.4.0 🎉

The release is available on:

@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/signing-manager-types@1.2.2 🎉

The release is available on:

@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/browser-extension-signing-manager@1.1.4 🎉

The release is available on:

@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/hashicorp-vault-signing-manager@1.1.7 🎉

The release is available on:

@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/fireblocks-signing-manager@1.0.4 🎉

The release is available on:

@prashantasdeveloper
Copy link
Collaborator

🎉 This PR is included in version @polymeshassociation/approval-signing-manager@1.0.6 🎉

The release is available on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants