This project wraps Cexplorer in a UI for usage in Yoroi.
npm start
run in dev mode (hot reload)npm test
run tests (hot reload)npm run build
builds production build
This project is meant to be embedded inside an iframe
in Yoroi. It will use postMessage
to pass back the user's selected pool
Accepted GET parameters:
chromeID
the ID of the Chrome extension that is hosting this iframe. Used to know which tab to pass thepostMessage
response tomozId
the ID of the Firefox extension that is hosting this iframe. Used to know which tab to pass thepostMessage
response toselectedPoolIds
the user's currently delegated pools. We use this to gray out the already selected pools (so the user doesn't re-delegate to a pool they're already delegating to)lang
the language to displaysource
this can be one of the following possibilities:chrome
,firefox
,mobile
. Note:mobile
only works for React Native mobile sources
Return type
Array<{|
poolHash: string,
|}>
- Allows us to match the look-and-feel of Yoroi
- Allows us to make any code change without waiting on Cexplorer developers
- Reduces the amount of user information shared with Cexplorer
- We use a CSP policy so that any dependency being hacked can't communicate with 3rd parties
- This page SHOULD be embedded inside a sandboxed iframe to mitigate any Yoroi information being accessible to this website
- This page only returns pool ids. Yoroi SHOULD use a separate backend to fetch the pool name for the given IDs to confirm with the user it is the correct pool