Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Electron Projects

You're reading from   Electron Projects Build over 9 cross-platform desktop applications from scratch

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher Packt
ISBN-13 9781838552206
Length 436 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Denys Vuika Denys Vuika
Author Profile Icon Denys Vuika
Denys Vuika
Philipp Langhans Philipp Langhans
Author Profile Icon Philipp Langhans
Philipp Langhans
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Building Your First Electron Application FREE CHAPTER 2. Building a Markdown Editor 3. Integrating with Angular, React, and Vue 4. Building a Screenshot Snipping Tool 5. Making a 2D Game 6. Building a Music Player 7. Analytics, Bug Tracking, and Licensing 8. Building a Group Chat Application with Firebase 9. Building an eBook Editor and Generator 10. Building a Digital Wallet for Desktops 11. Other Books You May Enjoy

Configuring the Ethereum JavaScript API

In this section, we are going to set up a web3.js library with our Electron application. web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using an HTTP or IPC connection. You can find out more on the official documentation website: https://web3js.readthedocs.io.

Make sure you also visit the GitHub repository if you are interested in the library: https://github.com/ethereum/web3.js/.

Let's learn how to set up and integrate the web3 library with our Electron application and see how it works:

  1. Install the web3 library with the following command:
npm i web3
  1. Update the App.js file and add the following code to import the Web3 client, which works with port 7545, onto your local machine:
import Web3 from 'web3';
const web3 = new Web3('ws://localhost:7545');

function App...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image