Magickbase / neuron-public-issues

Neuron Issues
5 stars 3 forks source link

Should an account be able to verify ownership through signature, similar to an address? #220

Open Sven-TBD opened 1 year ago

Sven-TBD commented 1 year ago

I believe this question essentially discusses a prerequisite of the protocol, which is what a dapp interacts with within this protocol. Is it a collection of addresses or a single address?

Throughout our discussions, we have been assumed it's a "collection of addresses," which I think is reasonable. In that case, we need to define the actions that a dapp needs to take when interacting with a "collection of addresses" and the corresponding actions at the blockchain level.

For example:

  1. Verifying ownership of the "collection of addresses": The dapp needs to verify ownership of each address in the "collection of addresses."
  2. Assessing the rights/privileges associated with a single address transforms into determining whether such an address exists within the "collection of addresses" for the dapp.
Sven-TBD commented 1 year ago

目前的设计中,是跟一个地址集合交互而非单一地址。

当前跟metamask交互,实际上还是跟地址集合交互。(“是否连接xxxx钱包”),每一次交互的时候,都需要带上一个参数(account/address)去交互。UTXO不同的在于,发交易的时候,input可以有不同的点;同理在登录时,【也是单一的地址】在跟网站交易。

其中一个问题是:当使用wallet-connect协议时,需要chainID。中间是地址。目前协议中用User Identity去取代地址(这也是目前比较迷惑的点),当时讨论用的是Seed派生的公钥->Hash。【需要另一个接口获取address,而不是在建立链接的时候就提供address】

Sven-TBD commented 1 year ago

User Identity 只是一个标示符。其他钱包是拿address 去做登录 Q为什么不能用Identity 去做登录? A之前是跟一个地址做交互、在UTXO中,Identity 不是一个有效的链上地址,而是一个nick name。但技术上可以是一样的,如做一个fallback,seed第一个地址做identity。一样之后带来的约束是只能用第一个地址去做登录、交互。

Q类似metamask也可以做checkbox? A如果我们也选择多个地址跟dapp连接的话,UTXO模型建立链接过程中,一次性会吐多个地址给dapp。我授权几个地址后,我可以用这几个地址授权资产。这里需要考虑到UTXO模型中,地址用完可能就会换新的地址使用。

可以将“地址”换成“账户”来理解。