Commit b30977b8 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update

parent 922745c8
Pipeline #765 failed with stages
# readme # readme
## telegram
https://core.telegram.org/bots/webapps#initializing-mini-apps
### 首次登录
- 随机生成密码,将密码保存到cloudstorage,通过随机密码生成keystore,使用私钥对json keystore签名
- 把initData, keystore, 对keystore的签名传入后端
- 获取web3 provider
### 后续登录
- 把initData传入后端,获取keystore
- 从cloudstorage获取密码,使用密码解密keystore
- 获取web3 provider
## h5 email
### 首次登录
- 使用邮件,验证码注册,获取jwt
- 随机生成密码,通过随机密码生成keystore,使用私钥对json keystore签名
- 把随机密码保存到kv存储服务端(待开发)
- 把keystore,对keystore的签名传入后端
- 获取web3 provider
### 后续登录
- 使用邮件,验证码登录,获取jwt
- 从kv存储服务端获取随机密码
- 从后端获取keystore,使用密码解密keystore
- 获取web3 provider
...@@ -49,6 +49,7 @@ class TelegramClient { ...@@ -49,6 +49,7 @@ class TelegramClient {
}) })
} }
console.log("load keystore time cost: ", new Date().getTime() - st) console.log("load keystore time cost: ", new Date().getTime() - st)
return this.provider.accounts.sign(JSON.stringify(this.keystore), this.account.privateKey)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment