Archived Content from Web3Auth Community
This topic was originally posted by ecchochan on 3/21/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
I am trying tkey by referencing tkey-example
Am I correct on the following statements?
- First step to call
triggerLogin()is to use the 1st share (social identity) -
inputShareFromWebStorage()can help to use a 2nd share (device) -
inputShareFromSecurityQuestions()can help to use a 2rd share (password) - I can use
generateNewShareWithSecurityQuestions()to set a 2nd share (password) - With any of the above 2 shares, I can call
reconstructKey()(i.e. 1+2 or 1+3 or 2+3) - If I reconstruct my key using 1+3, and would like to sync the wallet to 1+2. I have to delete the old device share and create the device share again.
Questions:
- What do
resp.publicAddressandresp.privateKeymean below when I haven’t reconstructed my private key? I can get a different public address fromreconstructKey()const tKey = new ThresholdKey( ... ); const provider = tKey.serviceProvider as TorusServiceProvider; await provider.init({ skipSw: true }); const resp = await provider.triggerLogin( ... ); - What do
tKey.initialize()andtKey._initializeNewKey()actually do and when should I run them? Can I run it just once but beforetriggerLogin()?const tKey = new ThresholdKey( ... ); const provider = tKey.serviceProvider as TorusServiceProvider; await provider.init({ skipSw: true }); await provider.triggerLogin( ... ); await tKey.initialize(); return await tKey._initializeNewKey({ initializeModules: true }); - Can I import a private key and override with the one linked to my shares? Or how do I create a new wallet from my shares?
Thanks in advance!