polkawallet-io / sdk

polkawallet SDK for integrating substrate-based blockchain as a plugin.
Apache License 2.0
18 stars 24 forks source link

What do "name" and "address" fields mean? #5

Closed Lebed-kun closed 3 years ago

Lebed-kun commented 3 years ago

Firstly, I saw this format of string for QR code:

https://github.com/polkawallet-io/ui/blob/e754767ca68aa100c597012a5bb06f9fc91d6071/lib/pages/accountQrCodePage.dart#L23

It requires parameters "name", "pubkey" and "address":

https://github.com/polkawallet-io/sdk/blob/03f365c2c7e48b75a4b677d367085f31fbcb1ccc/lib/storage/types/keyPairData.dart#L13

As there're no comments, I wanna clarify some moments:

1) Is "address" an actual Polkadot address (ex. "5DcBnQUEAJuvUD8aNNxTs9ThUmJHRYRt8xb8VtfaTLbSLLEr")? Or its decoded form? 2) Is "name" a name of Polkadot account (ex. appearing in "Polkadot-js" browser extension)?

RomeroYang commented 3 years ago

This format comes from https://github.com/paritytech/parity-signer/blob/997212a3300d548f86c2e684154255774d5bf92e/src/screens/AccountDetails.tsx#L113

1."address" is an actual Polkadot address (ex. "5DcBnQUEAJuvUD8aNNxTs9ThUmJHRYRt8xb8VtfaTLbSLLEr"). 2."name" is the name of account (ex. appearing in "Polkadot-js" browser extension).