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.
A Provider is an abstraction of a connection to the Hedera Hashgraph network, providing a concise, consistent interface to standard Hedera Hashgraph consensus node and mirror nodes functionality.
The hethers.js library provides several options which should cover the vast majority of use-cases but also includes the necessary functions and classes for sub-classing if a more custom configuration is necessary.
Most users should use the .
The default provider is the safest, easiest way to begin developing on Hedera Hashgraph, and it is also robust enough for use in production. It creates a DefaultHederaProvider
connection to a Hedera backend service.
hethers.getDefaultProvider( [ network , [ options ] ] )
⇒ ProviderReturns a new Provider, backed by multiple services (Hedera Consensus Nodes and Mirror Nodes), connected to the network. If no network is provided, mainnet is used.
The network may also be a URL to connect to, such as http://localhost:50211
It is highly recommended for production services to acquire unthrottled access to Mirror Node.
The provider class uses axios
under the hood. Users can override the headers through the provider's options
parameter.
Note: Only the headers
part will be propagated to Axios
There are several official common Hedera networks (as well as custom networks and other compatible projects).
hethers.providers.getNetwork(aNetworkish)
⇒ Network Any API that accepts a can be passed a common name (such as "mainnet"
or "previewnet"
) or chain ID to use that network definition or may specify custom parameters.
Returns the full for the given standard aNetworkish .
This is useful for functions and classes which wish to accept as an input parameter.