Giter Site home page Giter Site logo

Comments (3)

kostko avatar kostko commented on September 17, 2024 1

I wouldn't support any of the interoperability stuff for now as there does not seem to be a clear use case. Implementing only the simplest correct scheme (compatible with Ledger) for now makes the most sense.

from cli.

matevz avatar matevz commented on September 17, 2024

I did some research today how Polkadot uses sr25519.

Key derivation:

  • they do not use standard bip32 derivation, but their own substrate derivation obtaining "soft" and "hard" keys.
  • I tested Enkrypt and Polkagate wallets and they derive the same substrate addresses for the given mnemonic.
  • Ledger's Polkadot nano app (developed by Zondax) do not implement substrate, but a bip44-like derivation using m/44'/354'/account'/0'/0' path. This gives incompatible addresses with Enkrypt and Polkagate.
  • Importing Polkadot accounts is done via .json files or the mnemonic. No "Enter private key:" fields exist in the wallets.

Addresses:

  • Polkadot addresses use Base58 encoding.
  • Three types of addresses based on the prefix: Polkadot (0), Kusama (2) and Generic Substrate (42).

For better interoperability with Polkadot, I suggest we split the sr25519 work into:

  • use Polkadot derivation path library (and add new account type sr25519-substrate?)
  • use the ledger's way of deriving the account (PR #76, sr25519-bip44?)
  • define Polkadot -> Oasis address mapping (similar to what we did for ethereum)
  • show sr25519 addresses in Polkadot's Base58 format
  • support importing Polkadot wallets from JSON-encoded export file (I think this eventually generates sr25519-substrate type then)

from cli.

matevz avatar matevz commented on September 17, 2024

Implemented in #119

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.