polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 114 forks source link

Polkadot. js createFromJson function corresponds to which python SDK function? #178

Closed 99Kies closed 1 year ago

99Kies commented 2 years ago

And unlock methods

arjanz commented 2 years ago

I'm not familiar with all functionality of Polkadot.js, so you have to give more context what exactly your question is..

99Kies commented 2 years ago

https://github.com/polkadot-js/common/blob/master/packages/keyring/src/pair/decode.ts Decryption of Pkcs8

99Kies commented 2 years ago

@arjanz In fact, it is about

  1. Pksc8 decryption.
  2. and ss58 address -> publickey
99Kies commented 2 years ago

We need this to implement the createFromJson method in the JS library.

arjanz commented 2 years ago

So if I get it right it's to import the JSON file that can be exported in for example https://polkadot.js.org/apps/#/accounts and convert that format (which is using Pksc8) to a Keypair object?

That would be an interesting addition to the library. I'm working on something else right now but I'll look into it when I have the time.

arjanz commented 2 years ago

And of course a PR to get me a head start is always appreciated :)

99Kies commented 2 years ago

And of course a PR to get me a head start is always appreciated :)

I think this is very important, so i suggest setting this issue as TODO

arjanz commented 1 year ago

Functionality released in https://github.com/polkascan/py-substrate-interface/releases/tag/v1.3.4