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

adds ledger utility class #5099

Merged
merged 3 commits into from
Jul 2, 2024
Merged

adds ledger utility class #5099

merged 3 commits into from
Jul 2, 2024

Conversation

patnir
Copy link
Contributor

@patnir patnir commented Jul 1, 2024

Summary

Adds Ledger Utility class. It has 4 main functions:

  1. Connect to the device
  2. Retrieve the public address
  3. Retrieve the view only keys
  4. Sign a message

This utility class will be used by the CLI commands which will be introduced right after this PR.

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@patnir patnir requested a review from a team as a code owner July 1, 2024 23:47

return response.publicAddress.toString('hex')
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this in the sdk and consumed by CLI? This could potentially be useful for other developers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our philosophy with Zondax/ Chainport is that we want to keep all 3rd party stuff in the application level and not in the sdk.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if I agree with this case, I bet someone is going to ask for this in the sdk. For example, what about oreo wallet? Also this means you have to duplicate code in node app?

@patnir patnir requested a review from jowparks July 2, 2024 00:06
patnir

This comment was marked as resolved.

patnir

This comment was marked as duplicate.

@@ -70,6 +70,8 @@
"axios": "1.7.2",
"bech32": "2.0.0",
"blessed": "0.1.81",
"@ledgerhq/hw-transport-node-hid": "6.28.6",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you alphabetize these 2 additions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@patnir patnir merged commit 37c42fc into staging Jul 2, 2024
9 checks passed
@patnir patnir deleted the rahul/ifl-2736-ledger-cli-utils branch July 2, 2024 19:14
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