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

Add new methods supporting chat functionality to status api in DApp browser #117

Open
bgits opened this issue May 18, 2020 · 6 comments
Open

Comments

@bgits
Copy link

bgits commented May 18, 2020

Some features that have been requested in the past and would enhance DApps in a unique way that only Status can provide is exposing the chat api to DApps.

Methods include being able to send messages on behalf of a user and reading conversations.

Because of the security and usability implications it would make sense to draft a specification first.

examples:

window.ethereum.status
.sendToPublicChat('room-name', 'message')
.then(data => {
console.log('message:', data.message)
})
.catch(err => {
// On user rejecting request or other reason
console.log('Error:', err)
})
window.ethereum.status
.getPublicChatMessages('room-name')
.then(data => {
// type messages :: [ { name, pubKey, message, timeStamp } ]
const { messages } = data
console.log('messages:', messages)
})
.catch(err => {
// On user rejecting request or other reason
console.log('Error:', err)
})
@3esmit
Copy link
Member

3esmit commented May 18, 2020

This is very important for the convergence of chat platform.
As being a web3 provider, Status is providing a new capability to web3: real-time messaging, which can be used by other web3 dapps to support chat, which is interoperable with the Status Network.

@bgits
Copy link
Author

bgits commented May 18, 2020

A more advanced use case I don't expect to be part of the initial spec. Having these initial methods will enable functionality such as incentivized DApp notifications.

High level: Any user that visits a DApp can see which events have not been sent to target users and can use this api to send notifications and submit proofs of sending for compensation.

@bgits
Copy link
Author

bgits commented Jun 1, 2020

@status-im/status-protocol @flexsurfer

@hesterbruikman
Copy link

@bgits @3esmit to clarify. When you describe dapps are you referring to browser based dapps exclusively or might this include 'native' API use, e.g. in the case of extensions?

Trying to understand the scope of the proposed spec and user stories it would cover.

@bgits
Copy link
Author

bgits commented Jun 16, 2020

I was referring specifically to browser based dapps as that is the largest type of dapp that exists today.

@0kok0
Copy link
Contributor

0kok0 commented Jul 22, 2020

Cross post: status-im/status-mobile#10910 (comment)

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

4 participants