🪶 Getting Started with Essential Eth 🪶
Ready to start building on Ethereum? This guide will help you hit the ground running.
What is Essential Eth?
Essential Eth is a TypeScript front-end library for Ethereum. Just as the C++ iostream standard library provides ready-made functions and tools to interact with a computer's input and output devices, Essential Eth equips developers with pre-built functions and components to seamlessly connect their applications with the Ethereum blockchain nodes.
What is Bundle Size and why is it important?
Bundle size is a term in web development that refers to the total size of the files that are sent to a user's browser when they visit your website. It's important because it can affect your website's load time, data usage, search engine ranking, and battery drain on mobile devices. Essential Eth is designed with a minimalist modular architecture that achieves a bundle size of 32kb, compared to ethers' bundle size of 128kb. Plus, Essential Eth is tree-shaken, which means only the modules you use are included in your final bundle. 🌳✂️
Installation ⚙️
Before you can start using the Essential Eth library, you need to install it into your project. But before we dive into that, let's talk a bit about npm and yarn.
npm (Node Package Manager) and Yarn are two popular package managers used for installing Node.js packages (like Essential Eth). If you don't already have one of these installed, click on their names to go to their respective installation guides.
Once you've installed either npm or yarn, you can use one of the following commands to install Essential Eth:
npm install --save essential-eth # TypeScript included
# or yarn
yarn add essential-eth # TypeScript included
For use directly in browsers, you can include Essential Eth via a script tag in your HTML file. This is handy if you're not using a module bundler like webpack or parcel in your project. Here's how to do it:
<!-- index.html -->
<script src="https://unpkg.com/essential-eth@0.9.0"></script>
The code above adds a script tag to your HTML that points to a specific version of Essential Eth hosted on Unpkg, a popular CDN for npm packages. After this script tag is processed by the browser, the Essential Eth library will be available globally in your JavaScript code.
Now that we've installed Essential Eth, let's get familiar with some of its core features. Check out the Core Features for more information.