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

Construct private and business profiles from keys #21

Open
marat-tw opened this issue Mar 19, 2017 · 0 comments
Open

Construct private and business profiles from keys #21

marat-tw opened this issue Mar 19, 2017 · 0 comments

Comments

@marat-tw
Copy link

marat-tw commented Mar 19, 2017

When the app is opened then go through the array of password-encrypted private keys stored in localStorage.getItem("keys") and retrieve the identity for each verified key from account-identity in the form of:

{ idCode: "38008040123", idProvider: "EST-ID" }   
{ idCode: "123522", idProvider: "EST-BIZ" }   

See: cryptofiat/account-identity#21

Based on the responses construct profiles similar to the model

{ 
     identity: "38008040123",
     identifier: "Estonian-ID",
     commonName: "JUKU JUHALAINEN",
     name: { firstName: "Juku", lastName: "Juhalainen" }
     social: [ { schema: "twitter", URI: "@juhalainen" } , { schema: "facebook", URI: "jukujuh"}] ,
     avatar: "http://pic.twitter.com/nat.png",
     coverPhoto: "http://pic.twitter.com/blaah.png",
     keys: [ 
        { privateEncrypted: "0x1231", 
          public: "0x4323...",  
          hdKey: { type: hdKey, paths: [ "2/2322" , "2/3232" ] }, 
          addressCache: { timestamp: 1245342, balance: 32, approved: true, frozen: false } , 
          transferCache: { timestamp: "13456464", transfers: [ Transfer ] } 
        },
         ...
     ]
  }
@kaarmann kaarmann changed the title switching between private and business accounts Construct private and business profiles based on stored keys Mar 20, 2017
@kaarmann kaarmann changed the title Construct private and business profiles based on stored keys Construct private and business profiles from keys Mar 20, 2017
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