ethberlin-hackathon / ETHBerlin-Bounties

Check out the bounties our collaborators have put out for you! For their tools, head to the Knowledge Base
4 stars 10 forks source link

Status: Most interesting and extensible use of our JS API #34

Open andytudhope opened 6 years ago

andytudhope commented 6 years ago

Status

This issue is a placeholder for the award of the most interesting and extensible use of our JS API in preparation for the new web3 opt-in patterns being worked on across the ecosystem.

The Status JS API allows you to request specific details from Status users (example use here, their contact code, or whisper key) and then use that to perform specific actions. In our T-Shirt app (which you can access by going to https://tshirts.status.im in Status or scanning the below QR code), you can see what this looks like.

image from ios 1

In that DApp, we are using the contact code in order to limit in the UI how many times each account can vote on a shirt - and we'd like to award the team who comes up with the most innovative use of this new capability Status provides.

Our JS API will soon work together with the new opt-in pattern for web3 providers which form a part of EIP 1102 in order to promote best practices across the ecosystem.

Team

We've setup an extended team for helping you during this event

Embark team - @iurimatias @alaibe @andremedeiros @emizzle @jrainville @michaelsbradleyjr @richard-ramos Status team - @jeluard @flexsurfer @mandrigin @lukaszfryc @corpetty @rachelhamlin

Be sure to contact us at any time online or grab us directly at the event.

Skills wanted

JavaScript / Ethereum

Communication

We will be around giving advice and helping if needed. And in any case just drop your thoughts there ;)

https://chat.status.im

How to get started:

If you're building a DApp, it's easiest to use the most powerful framework currently out there, Embark:

npm i -g embark

There's a really great React template for a Decentralised Twitter and Reddit also available.

The code you need is here too:

window.addEventListener('statusapi', function (event) {
        if (!event.detail || !event.detail.permissions) { return; }
        if(event.detail.permissions.includes("CONTACT_CODE")){
          this.setState({account: event.detail.data["CONTACT_CODE"]});
          this._loadVotes();
          this._isManager();
        }
      });
      // request status API
      setTimeout(
        () => { 
          window.postMessage({type: 'STATUS_API_REQUEST', permissions: ["CONTACT_CODE"]}, '*');
        }, 500
      );
gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 27900.0 SNT (1011.93 USD @ $0.04/SNT) attached to it.

StatusSceptre commented 6 years ago

The bounty amount in SNT was set at 16:00 on 06/09/2018 - 1 day before ETHBerlin to try and account as best as we currently can for volatility.

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 27900.0 SNT (940.79 USD @ $0.03/SNT) attached to this issue has been approved & issued.