Last updated
Last updated
Deprecation of Hethers.js by October 20, 2023
As we continue to evolve and improve the Hedera ecosystem, we are committed to ensuring that our developer tools and resources remain easy to use and up-to-date. With this goal in mind, the Hethers.js library will be deprecated by October 20, 2023.
Hethers' various Classes and Functions are available to import manually from sub-packages under the organization but for most projects, the umbrella package is the easiest way to get started.
NodeJS
Web Browser
A Contract is an abstraction of program code that lives on the Hedera Hashgraph Smart Contract Service.
If you are familiar with Databases, this is similar to an Object Relational Mapper (ORM).
In order to communicate with the Contract on-chain, this class needs to know what methods are available and how to encode and decode the data, which is what the Application Binary Interface (ABI) provides.
This class is a meta-class, which means its methods are constructed at runtime, and when you pass in the ABI to the constructor it uses it to determine which methods to add.
While an on-chain Contract may have many methods available, you can safely ignore any methods you don't need or use, providing a smaller subset of the ABI to the contract.
An ABI often comes from the Solidity compiler, but you can use the Human-Readable ABI in code, which the following examples use.
Once you have a , you have a read-only connection to the blockchain, which you can use to query the current state, fetch historic logs, look up deployed code and so on.
The object makes it easier to use an on-chain Contract as a normal JavaScript object, with the methods mapped to encoding and decoding data for you.
Provider
A Provider (in hethers) is a class which provides an abstraction for a connection to the Hedera Network.
Signer
A Signer is a class that (usually) in some way directly or indirectly has access to a private key, which can sign messages and transactions to authorize the network to charge your account hbar to perform operations.
Contract
A Contract is an abstraction that represents a connection to a specific contract on the Hedera Network, so that applications can use it as a normal JavaScript object.