Introducing SAFE Wallet app

I’ve been wondering what would be the best way for the SAFE network and its community to begin this new year, and I think I figured it out, I developed some new toys you can all start playing with now! :grin:

I created a first prototype of a coin wallet within the SAFE Wallet app (v0.0.3). In order to demonstrate how it works, I created an altcoin (ThanksCoin) which can be transferred using this coin wallet.

Please note this is just a first prototype, and several things were designed in such a way to make it simple to develop, mainly because I’ll need to adapt them to make use of the MutableData soon.

The coin wallet:

  • The SAFE Wallet app now supports the creation of a coin wallet.
  • The coin wallet is internally an unversioned StructuredData, with symmetric encryption, which XorName is based on its associated public key provided by the user.
  • It supports to transfer coins to another wallet using the recipient’s public key, and it automatically detects incoming transactions as well.
  • The user can optionally keep the transactions history within the wallet’s data (not the wallet’s SD where the coin IDs are kept, but as part of the information kept by the SAFE Wallet app).
  • Notifications of transactions are done thru a separate unversioned StructuredData which XorName is based on the recipient’s public key with a predefined prefix.

The ThanksCoin altcoin:

  • An altcoin named ‘ThanksCoin’ was defined as an unversioned StructuredData, which XorName is based on a random number.
  • Since I’m using the safe-js library, I don’t have access to the StructureData’s owner, previous owner, and tag type fields, thus this information is kept in the StructuredData’s data field.
  • E.g. a ‘ThanksCoin’ StructuredData’s data can be the following json:
    {
         type_tag: 15001,
         owner: ‘15iJ91Px9ng5E7r5xPv8x3QpPMUu8q1JAR’,
         prev_owner: ‘1Eup55KofQRtBk1xS48LZs4RPYW2x8bgg5’,
    }
  • Anyone can mint ThanksCoin’s using the low-level API, but I know many of you are neither developers nor so familiar with the SAFE API. But please don’t panic, I’m introducing a new tool for you to mint these coins with :wink:

The SAFE Faucet:

  • A separate web app, the SAFE Faucet, is introduced and made available at safe://safefaucet.wow
  • This faucet requests the user to enter feedback about the SAFE Wallet app in exchange for the ThanksCoin’s it gives away.
  • The user needs to only provide a public key which the faucet should transfer ownership of 5 (five) ThanksCoin’s to.
  • The SAFE Faucet sends the provided feedback by SAFE e-mail to “safewaletfeedback” public ID I personally own. I’ll appreciate if you provide real feedback/comments about the apps.

Therefore, the recommended steps to start playing with all this are the following:

  1. Connect to the SAFE Wallet (safe://safewallet.wow), create a new ‘ThanksCoin Wallet’ item, set its label, private and public key, and a pin number.
  2. Open the SAFE Faucet (safe://safefaucet.wow), provide your feedback, enter the public key of your wallet, click the ‘Get free ThanksCoins!’ button, and wait for a few seconds untill a confirmation message is displayed
  3. Go back to the SAFE Wallet to verify that the coins were successfully transferred to your wallet.
  4. Create other wallets so you can transfer coins among them.

If you stored information using SAFE Wallet v0.0.2 it won’t show up since I didn’t implement a migration script (KISS), although you can still access it using the older version which is now available at safe://previous-safewallet.wow.

As always, any type of comment, feedback and/or questions you may have will be very welcome!

Happy new year to everyone! :beers:

32 Likes