-
Notifications
You must be signed in to change notification settings - Fork 295
Add one-click Coinos wallet setup #2982
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
Conversation
// In terms of the risk of an accidental collision due to the birthday problem, 16 characters should be enough to pragmatically avoid any collision. | ||
// According to `https://en.wikipedia.org/wiki/Birthday_problem#Probability_table`, | ||
// even if we have 610 million Damus users connected to Coinos, the probability of even a single collision is still as low as 1%. | ||
return String(fullText.prefix(16)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does coinos have a 16 character limit on username or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was for aesthetic reasons only. 32 hex-encoded bytes looks too long.
I was thinking about using deterministic mnemonic words (e.g. "[email protected]"), but it's not really visible and we want to discourage users from trying to manually login their account, so maybe it's better to not use mnemonics either. It would also add complexity to the deterministic algorithm, so maybe it's best not to.
.disabled(self.userKeypair.privkey == nil) | ||
|
||
if self.userKeypair.privkey == nil { | ||
Text("The one-click setup requires the user's private key. Please login with your nsec to use this option.", comment: "Warning text for users who cannot create a Coinos account via the one-click setup without being logged in with their nsec.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this message sounds a bit scary, it almost sounds like we are sending the users private key to coinos or something. maybe we should make it clear that the users profile is not linked to the coinos account, and there is no identifiable information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe something like: "you must be logged in with your nsec to use one-click setup. your profile will not be shared with coinos"
This commit implements a one-click Coinos wallet setup. This was implemented using the Coinos API, and using account details that are deterministically generated from the user's private key. Closes: damus-io#2961 Changelog-Added: Added one-click Coinos wallet setup Signed-off-by: Daniel D’Aquino <[email protected]>
@jb55, @ericholguin, I updated the sheet, here is how it looks like now:
Please let me know if you have any other suggestions! |
Changelog-Changed: Added disclaimer to clarify that Coinos is a third-party service Signed-off-by: Daniel D’Aquino <[email protected]>
Added a new (optional) commit which adds a small disclaimer to clarify that Coinos is a third-party service. This is not legal advice, and I am not a legal expert — but I suppose it makes sense to add this, for the sake of clarity? cc @jb55 ![]() |
On Fri, Apr 18, 2025 at 04:52:27PM -0700, Daniel D’Aquino wrote:
danieldaquino left a comment (damus-io/damus#2982)
Added a new (optional) commit which adds a small disclaimer to clarify that Coinos is a third-party service. This is not legal advice, and I am not a legal expert — but I suppose it makes sense to add this, for the sake of clarity? cc @jb55
<img src="https://github.com/user-attachments/assets/6bcbf69c-5d20-4f4e-a32e-304b3096363e" width="300"/>
It's fine but the "we" here is a bit ambiguous. The *client* has access, so I assume *we* here means Damus Inc. Not sure if there's a better wording though.
|
Summary
This commit implements a one-click Coinos wallet setup.
This was implemented using the Coinos API, and using account details that are deterministically generated from the user's private key.
Checklist
Closes:
orFixes:
tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patchesTest report
Device: iPhone SE simulator
iOS: 18.2
Damus: ac1ae3a
Steps:
Results:
Screenshots