Closed yisiliu closed 3 years ago
@Jack-Works @yisiliu
Hi, I have reviewed your front-end work (https://github.com/iamzubin/Maskbook/tree/unlock). I found the functionality is basically missing (it only contains a GraphQL query to the Unlock API which the address is hardcoded). I think we should complete the unlock protocol integration because that's the final target of this bounty. That involves a lot of work in the front-end. The mechanism I described above is used for key distributing in a decentralized way, it's still useful for us in many ways (device sync, group share, ....). However, we are not focusing on this backend service right now and it's bounded by the completion of the frontend interface. Can you tell us your plan on completing this bounty, please?
The unlock protocol integration works on the GraphQL APIs, Currently the api endpoint is hardcoded (I saw the gun api endpoint hardcoded figured might as well do same for the unlock graph ), That's pretty much it as for the user side unlock protocol integration.
while making the post a unlock nft token address is stored in the localdata this commit . which would be used later to verify the intended recipients.
when the user encounters the post they would require the key to read it. which would be provided by the original poster or someone else who already has the access to the key, before sending the key to user, provider would verify the request by verifying if account making the request actually has access to the unlock using the function verifyHolder .
is there anything I'm missing on the frontend that needs to be added?
If nothing I would like to you to take a look at the backend service as it currently does not meet all the requirements that were mentioned in the issue #2520 , before I go ahead writing and adding to the server code I would like to be sure about if that meets the requirements, or are there any major changes to be made.
About the front-end part, yes, there're lots of things that need to be changed. It should follow other plugins way:
Umm okay this was being discussed on the discord server to integrate unlock as part of the system instead of a plugin. as to read the metadata we need to decipher the post first, and then user can simply read the data. or we need to encrypt the data twice and would need to perform exchange twice. also @yisiliu said it's okay that way.
link to the message
I can add a UI to buy the access to the post. this would require user to know what's the address of the given locks is on the eth chain.
The address can be added on the Gun2 and then user can query the database for the lock address.
OR
We can alter the post data and add the unlock locks on the payload itself. then user can buy access to the given unlock protocol lock and then request for the keys on the key sharing server.
OH, the unlock protocol does not provide a key sharing platform. you have to manage the keys yourself if you like to use the unlock protocol (the key sharing service is not yet released)
@Jack-Works ?
Umm okay this was being discussed on the discord server to integrate unlock as part of the system instead of a plugin. as to read the metadata we need to decipher the post first, and then user can simply read the data. or we need to encrypt the data twice and would need to perform exchange twice.
Oh yes, so you can add it in the recipient part. But it's detail should in the metadata section, otherwise it required to integrate this into the payload format. I think we should make the outer post public encrypted and put the encrypted information in the metadata section.
this would require user to know what's the address of the given locks is on the eth chain.
Yeah this information should be in the metadata too.
We can alter the post data and add the unlock locks on the payload itself.
That introduces much more complexity.
OH, the unlock protocol does not provide a key sharing platform. you have to manage the keys yourself if you like to use the unlock protocol (the key sharing service is not yet released)
Wait... What? So what does the unlock API provides, exactally? It's only checking if someone pays another one??
More or less yeah(currently ), so I can’t share the key using unlock protocol.
I know it adds to the complexity, I’m willing to implement it, can we discuss the functionality properly again?
Having conversations one message per day is too slow, we’ve already delayed this and I would like to speed it up. @Jack-Works
More or less yeah(currently ), so I can’t share the key using unlock protocol.
Ok, I go to the Unlock website and cleared my misunderstanding. I need some time to rethink this.
Hey, @yisiliu @Tedko I’ve been trying to contact you guys on telegram but @yisiliu hasn’t been replying since a few weeks and @Tedko stopped replying as well :(
Can I please get a split of the payment as discussed in the issue here #2363 (comment) Can I please get a followup on the situation. there seems to be a blocker out of my scope of work for now, I've done the work depending on the discussion done in the discord channel. I've been trying to contact you guys on telegram but I don't get a reply for long times.
Timeline is very much dependent on when the blocker gets resolved, if that requires me to get involved in I would be happy to.
as discussed with @yisiliu , ( after talking with @Tedko ) last week waiting on @jack-works ' review, I didn't hear back from him after trying to contact him multiple times on telegram, can we please speed up the process.
thanks.
@yisiliu @Tedko ^
https://github.com/iamzubin/maskbookUnlock/pull/1
Here's the code for server, it's WIP, but please take a look and comment changes.
update: you can checkout mu fork (branch: unlockProtocolPlugin), I'm writing the cryptographic functions right now, will PR in a couple of days
Some minor stuff left to fix, but please take a look
Great. Ready to go? @yisiliu
just realised there's a check missing for the unlock mechanism, i'll be pushing it today itself.
you can still checkout the rest and let me know about any changes
I did push the commit, (and one more thing I kinda missed) please take a look and let me know about the changes. I'm working on cleaning up the server code now.
hey @julien51 is there a permalink based page for buying unlock locks? so we can directly link it to that page as adding a buy button for each lock will make the ui bloated i did make a makeshift one but it's pretty janky.
Hi @https://github.com/julien51 @julien51 can u reply to the bounty hacker?
@iamzubin any update?
yeah it's done, i was waiting on a way to let users buy locks without bloating the ui
i will use my solution for now and do a pr on the main repository today then.
i am so sorry for the late response here! (I suck at Github notifications!)
hey @julien51 is there a permalink based page for buying unlock locks? so we can directly link it to that page as adding a buy button for each lock will make the ui bloated i did make a makeshift one but it's pretty janky.
yes, absolutely. See te purchase address on the dashboard:
To build that URL, just start with https://app.unlock-protocol.com/checkout?
and then add a query param for paywallConfig
which includes an URL encoded config as explained on this page.
We will actually be adding redirect params as well which lets you redirect the user when they close the page or when they complete the purchase. Please bear with us!
Ahh okay, till then I'll make the application to work without the redirect url (user will have to reload the page.)
I could not find it in the page, but I'll checkout the source and figure something out. (I'm avoiding including the paywall js as it might make the application a little heavy)
thanks for the reply :)
Of course! Sorry for the delay. Please do not hesitate to reach out on Discord
Hey, before making a PR I was trying to run the code in the develop branch, I can't seem to get it to work on my machine. release branch works fine tho. should I do a pr to develop branch anyway?
Ahh okay so how the extensions work changed since when I last updated my repo I need to make those changes, I'm working on it
I can't seem to understand the conversion, can you please tell me where to look so I can convert to the new standard of plugins. meanwhile you can take a look here as I posted earlier also.
Hey, before making a PR I was trying to run the code in the develop branch, I can't seem to get it to work on my machine. release branch works fine tho. should I do a pr to develop branch anyway?
What happened?
working of plugins changed, injected components i wrote are not working in the SNEAdaptor for some reason
working of plugins changed, injected components i wrote are not working in the SNEAdaptor for some reason
Did you convert your plugin into the new plugin infra and registered it to enable it?
working of plugins changed, injected components i wrote are not working in the SNEAdaptor for some reason
Did you convert your plugin into the new plugin infra and registered it to enable it?
Yeah, so I'm working on it but am running into endless errors.
right now I'm stuck on DecryptedInspector
. but if I'm stuck for longer time I'll let you know
FYI here is an example of migrating an plugin: https://github.com/DimensionDev/Maskbook/pull/3430
Where are we planning to host the server? Do I need to set it up?
@iamzubin yeah please seti it up for the demo and once we merge the pr we will do it ourselves.
Hey, I was not able to set up the server today, for now you can clone the server and run it locally. here is the repository
You can compile the extension code from the one from PR
I will try to host the server tomorrow. till then if you can take a look without me hosting it please do.
Alright, so I've hosted the code on my server, and you can test the plugin on this branch unlockProtocoltest
, on my fork.
link
Please test and lemme know if you run into any issues.
You can checkout this tweet (other tweets from the same account won't work as I've not migrated the local database), You'll need to buy a lock on rinkeby test network to look at the tweet.
@yisiliu @Jack-Works @Tedko
hey @yisiliu any updates?
Alright, so I've hosted the code on my server, and you can test the plugin on this branch
unlockProtocoltest
, on my fork. link Please test and lemme know if you run into any issues.
Can you commit your server URL as the test server so we don't have to set up another one?
it's on the branch I've linked to
export const keyServerEndpoint = 'https://unlock.iamzub.in'
Very excited to see all the progress here!
hey @yisiliu @Tedko can we go ahead with the bounty process, i think it's done, just pr needs to be merged
@iamzubin fix this https://github.com/DimensionDev/Maskbook/pull/3845#issuecomment-906124048 and you are done!
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 6000.0 DAI (6000.0 USD @ $1.0/DAI) has been submitted by:
Catalogue
Part 1: Problem Description
Mask offers a browser extension which lets users create encrypted tweets where the content of the tweet can only be “viewed” by other Twitter user if they use the Maskbook browser extension. These tweets can include text, but also images.
Unlock is a protocol for memberships which lets creators deploy a lock and sell access to this lock using the Ethereum blockchain. Locks can be added to websites, or applications in order to monetize them.
We are proposing an integration between Unlock and Mask where creators will be able to post encrypted Tweets and put them “behind” a lock, so that only members of the lock are able to view their content. If viewers are not members, then, Mask would offer the ability to Unlock these memberships. In that scenario, Mask is a referrer and should earn UDT.
For a more detailed description, you can refer to this.
Part 2: Resources
https://unlock-protocol.com/ https://github.com/unlock-protocol/unlock
Part 3: Contact and Support
Mask Discord Server @yisiliu @Jack-Works -> Mask @julien51 -> Unlock