Hinchy's Development Diary

In the spirit of transparency and accountability I’ll be sharing with the phonon community what I have achieved each week in my role as lead community developer. Please don’t hesitate to ask questions here or reach out in discord.

Week starting 21/11/22

  • I began designing and developing task three of my mandate “On/Off-Ramp (Onboarding new Cryptocurrencies into Phonon)”.
  • After talking with members of the core dev team it has been decided that this will consist of a golang package that exposes card functionality through a REST api. Native apps including this package can offer a Metamask like experience where third party web apps must request permission from the user before being able to access specific card actions.
  • Currently we are referring to this package as “phonon terminal”.
  • Boop.eth and I are still discussing specifics but the goal is for the official phonon wallet to include this package so that users can manage web app permissions and their wallet from one interface.
  • You can see my progress in the video below. It illustrates the very early stages of development of
    • an example web app build using my “PhononTerminalJS” package
    • web app requesting permission to read a user’s connected cards
    • the native app prompting the user to accept the “READ_CARDS” permission
    • the native app pushing updated permissions to the web app.
    • the web app fetching connected cards
    • native app pushing insert and remove card events to the web app

Goal for next week: Have all card functionality accessible via the web server and each endpoint restricted by a specific permission.

2 Likes

Thanks for doing this hinchy! It’s rough to be in different time zones, and it’s great that you’re putting in this effort to keep everyone informed.

2 Likes

Week starting 28/11/22
I continued developing the terminal golang package, JS SDK, example 3rd party web app and native wallet app.

My goal to finish all the card functionality and events was not hit as I did not add card pairing and phonon sending functionality. This functionality is easy enough to add as the logic can be imported from Gridplus’s phonon-client package but it does raise questions around if the terminal package should be opinionated on how cards are paired and phonons are sent. I will start a discussion with the core devs.

Added the following card functionality

Web app

  • Request card unlock
  • List Phonons
  • Create Phonon - Triggers “phonon created” event to apps with “read phonons” permission
  • Set Phonon Description - Triggers “phonon updated” event event to apps with “read phonons” permission
  • Request Destroy Phonon

Native Admin App

  • Unlock Card - Triggers “card updated” event to apps with “read cards” permission
  • Grant Destroy Phonon - Triggers “phonon destroy” event to apps with “read phonons” permission

General

  • Web app permissions now persist after shutdown. Permissions are saved to a JSON file on the user’s machine.
    *Web app Cookies are now valid after shutdown. The app loads the secret from a config file on the user’s machine.
  • A native app that imports the Terminal golang package can be granted “admin” rights so it doesnt need to ask the user for permission to access card functionality.

Design Discussions

  • Boop and I are still discussing if the terminal will be a standalone app or be integrated into the new wallet he is working on.
  • Should the terminal be opinionated on how cards are paired and phonons are sent? The session package the terminal imports is opinionated. This needs further thought and discussion with the gridplus team.

Goal for next week
Terminal

  • Make the terminal repo public and somewhat documented
  • Add pairing and sending logic to the terminal package if it is decided to use the logic for the phonon-client package repo. If not, design how custom sending and pairing logic can be added by native apps.
  • Decide if the terminal package will be integrated into boop’s new wallet or be a standalone app.

General

  • Write a high level overview of how a potential Phonon DEX could work for Mickey.
1 Like