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

Address resolution: Sender 'pubkey' OR 'senderHandle' #9

Open
wildnothing opened this issue Feb 27, 2021 · 1 comment
Open

Address resolution: Sender 'pubkey' OR 'senderHandle' #9

wildnothing opened this issue Feb 27, 2021 · 1 comment

Comments

@wildnothing
Copy link

wildnothing commented Feb 27, 2021

The identity of a sender should be able to be proven via a paymail OR their public key.
Otherwise we are enforcing that a sender MUST have a paymail handle, which may not always be the case.

https://www.moneybutton.com/api/v1/bsvalias/address/[email protected]

For example, this returns a successful response:

{
    "senderHandle" : "[email protected]",
    "amount" : 1000,
    "dt" : "2021-02-27T17::30+0000",
    "purpose" : "blah",
    "signature" : "HwbaE0o8eYPNsTt3T7LmggruS0UwS/2WYiXHpsu6VmTIOXoohm4MR+YN4Hb/mSKP2hw30DTVMc4tsmK13dy/4/I="
}

However, this does not:

{
    "amount" : 1000,
    "dt" : "2021-02-27T17::30+0000",
    "purpose" : "blah",
    "pubkey" : "02150c35fe106a25311243c0c9c9189de0b21955f69dc14e8bf401f4399a8ae905",
    "signature" : "HwbaE0o8eYPNsTt3T7LmggruS0UwS/2WYiXHpsu6VmTIOXoohm4MR+YN4Hb/mSKP2hw30DTVMc4tsmK13dy/4/I="
}
@calvogenerico
Copy link
Contributor

That would be a change in the bsvalias protocol. That's outside the scope of this library. This library is just an implementation of the protocol in javascript.

Still, I get your point. But I can answer why the standard was done in the way it was done. The idea of paymail is provide identity for users and interoperability for wallets. Doing something like directly use a pubkey to validate identity doesn't allow any of those. A public key is enough information to be identity. Keys might be stolen or lost, so they rotate. Also, with just a public key a wallet cannot perform any kind of operation. That's why inside paymail the way to reffer other people is always via a paymail.

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

2 participants