This document describes requirements that an application must fulfill in order to provide a proper environment for Dapps running inside a browser. A description of the Status Dapp API is provided, along with an overview of bidirectional communication underlying the API implementation. The document also includes a list of EIPs that this API implements.
|Webview||Platform-specific browser core implementation.|
|Ethereum Provider||A JS object ( |
|Bridge||A set of facilities allow bidirectional communication between JS code and the application.|
The application should expose an Ethereum Provider object (
window.ethereum) to JS code running inside the browser. It is important to have the
window.ethereum object available before the page loads, otherwise Dapps might not work correctly.
Additionally, the browser component should also provide bidirectional communication between JS code and the application.
Dapps can use the below properties and methods of
Returns true. Can be used by the Dapp to find out whether it’s running inside Status.
StatusAPI object. For now it supports one method:
getContactCode that sends a
contact-code request to Status.
Similarly to Ethereum JS API docs, it should be called to check if connection to a node exists. On Status, this fn always returns true, as once Status is up and running, node is automatically started.
qr-code Status API request.
request method as defined by EIP-1193.
Below are some legacy methods that some Dapps might still use.
web3 Status API request. It returns a first entry in the list of available accounts.
enable method as defined by EIP1102.
send method as defined by EIP1193.
sendAsync method as defined by EIP1193.
Status uses a forked version of react-native-webview to display web or dapps content. The fork provides an Android implementation of JS injection before page load. It is required in order to properly inject Ethereum Provider object.
Status injects two JS scripts:
Dapps running inside a browser communicate with Status Ethereum node by means of a bridge provided by react-native-webview library. The bridge allows for bidirectional communication between browser and Status. In order to do so, it injects a special
ReactNativeWebview object into each page it loads.
On Status (React Native) end,
react-native-webview library provides
Below is the table briefly describing what functions/properties are used. More details available in package docs.
Status browser supports the following EIPs:
accountsChangedevent support is not implemented
Copyright and related rights waived via CC0.