MyHbarTokens, the first browser-based, smart contract wallet for Hashgraph is live

Pablo Peillard
Hashing Systems
Published in
3 min readSep 30, 2019

--

⏳Keeping it brief

MyHbarTokens is an open source solution for building smart contract compatible websites
Anyone is able to fork the code and build their own smart contract page

Not Your Keys, Not Your Tokens

When we began building Hash Name Service (https://hns.domains, a distributed name service) we realized there was no straightforward way to develop a dApp (and have end users interact on it) on the Hedera Hashgraph platform. While yes, the SDK provided the tools to build something on your machine, locally, there wasn’t a solution to get anyone to use the platform securely. I define “securely” with the idea that the service the user interacts with does not hold the end user’s keys. Why? So you help protect yourself and your users from hacks. AKA Not your Keys, Not your Crypto. It’s the baseline of decentralization.

What’s going on?

The Mobile Hedera Wallet is how you begin to interact with the platform. Your keys, your money. You transfer the keys to the Composer Chrome Extension on your machine. Now you are able to interact with the platform with a couple javascript lines of code. This experience is very familiar for any Ethereum developer. It’s what makes development easier. You don’t have to worry about having some specific keystore, you just make sure you have the app set up. This is what Real World™️ adoption looks like.

What does this mean?

Connection to the Hashgraph is made via the Composer for Hedera Hashgraph. This extension holds the account’s private key inside the user’s browser. That makes sure its safe and secure and the user has the final say in what happens to their tokens.

How does it work?

  1. For starters, make sure to have the Composer extension up and running (with an account paired)
  2. Visit myhbartokens.com and click on check wallet
  3. At the time of smart contract function call (balance/transfer), request is passed to composer and then user needs to confirm the request by confirming the popup triggered.
  4. Communication between MyHbarTokens and Composer is made using hash.js which is an interface for Composer (available at github.com/hashingsystems/hash.js)
  5. Transaction is signed by composer using users account details.
  6. Signed transaction is sent via socket to a relay network server.
  7. Returned response of contract call is returned back to composer using socket.
  8. Composer then sends the result to MyHbarTokens for display.

Why Should I Care?

As an end user of Hedera™️

  • User can check/get hbar balance of a paired account in composer (chrome extension)
  • User can add single/multiple ERC20 token by just entering his smart contract account ID.
  • After a successful addition of a token user can check token balance and transfer a token to another account by entering receiver’s account ID and number of tokens he/she want to transfer.

As a Hedera™️ developer

  • Developers have a familiar experience to check user’s accounts from Composer.
  • Developers can become familiar to the Hedera development experience without having to move away from the web browser
  • Developers can use this as an boilerplate for any smart contract application.

Got a question about this article? Ask us here or here

--

--