web3.js offline transactions

let people use Ethereum smart contracts without MetaMask

Cryptopusco
2 min readJan 23, 2018

In this post we want to introduce you our solution for MetaMaskless projects. Due to technical limitations it is possible to use MetaMask in Chrome and Brave browser only. We really hope, that other browser will support MetaMask as soon as possible and we also hope, that one day MetaMask will release open API, which will be available for those, who do not use browsers.

Even though, it is possible to use MetaMask inside of Electron, or React, we do not recommend doing this, because we’ve never tested it.

Cryptopus is an open platform, where crypto investors look for crypto traders and, using Ethereum smart contracts, cooperate, achieving higher level of success. Smart contracts make the process clean and public, so it is necessary to properly communicate with them. Technically, our smart contracts are made lightweight, which means, that they do not store information “as is”, but the store it in byte arrays.

Byte arrays let us control storage size precise and carefully, so users won’t pay high fees for interactions. In despite of fact, that it actually is cheaper to do it this way, it breaks readability of the contracts, so users can’t understand the receiving information straightforward and they still have to convert it into a “human language”.

By developing an interface, which will translate data into sentences on-the-fly, we grant people a better opportunity of interaction with smart contracts. Our API let’s people use web-/desktop-/mobile-version of the application, having intuitive control over the information.

We use web3.js to make it all real and we love web3.js as it is now, because with version 1.0.0-beta18 it got so great and intuitive, that the development process went way faster, than before, when we were using older versions, or MetaMask providers. Right now it all works under Infura nodes, which also work really great and are 99.9999% online (actually it is 100%, but still could be a little less :)).

So, back to the theme, how could we use Infura and web3.js to make it possible for our customers to interact with smart contracts and still have it easy to understand. We just use offline transaction signing, which happens on client-side and only comes to us, when it is signed. By doing so, we make it way more secure, because it all happens without Internet connection. The user is even able to sign the transaction inside of the bunker, delete the private key from the page and only afterwards send the result (signed transaction) to us.

Further information about practical implementation of web3.js in our product could be found here.

Thank you, for reading this publication, stay tuned and keep your crypto investments safe with cryptopus.

--

--

Cryptopusco

IPFS-based, open-source blockchain tech brokerage marketplace where cryptocurrency investors choose inkognito traders based on their result of the job.