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

Ledger device integration #1341

Open
Dengjianping opened this issue Jun 19, 2024 · 0 comments
Open

Ledger device integration #1341

Dengjianping opened this issue Jun 19, 2024 · 0 comments

Comments

@Dengjianping
Copy link
Contributor

In next polkadot runtime upgrade, ledger can be compatible with substrate based chains. But before that we need do some compatibility tests for manta. Here's the steps and requirements from Santiago:

Quote

First of, you have to:

  • Be compatible at least with Polkadot-SDK v1.1.0 which is the first version of the Polkadot-SDK monorepo. This is because we've backported a new crate back to that version that you will need.
  • You need to add a new SignedExtension to your runtimes. You can find some docs here, and also this is the PR where these changes were added to system chains and relay chains: Implement CheckMetadataHash extension (#4274) paritytech/polkadot-sdk#4619.
  • You need to make sure your runtime supports metadata v15.

After this, then you are all set for your runtime to start working with the new checks that allow the Ledger app to be used!
The next and final step is to add the necessary information on the payload at the dApp level to use this. In order to use this, you need to add {mode:1, metadataHash: 0xXXX} to the extrinsic payload so that the wallet can manage this with the ledger devices directly. An example on how to craft this payload is here. As to how you can get that metadataHash value, which is what the node will check, you can:

  1. For testing, query this API: https://github.com/Zondax/ledger-polkadot-generic-api
  2. For production:
    1. Run that same API on your own system, therefore you are querying your own self.
    2. We are working on an npm package to calculate this.
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

1 participant