JsonRpcProvider.connection not documented
See original GitHub issueUnless I’m going crazy, JsonRpcProvider.connection
is the only public API for obtaining the URL which the provider is connected to … but it’s not documented:
- https://docs.ethers.io/v5/api/providers/jsonrpc-provider/#JsonRpcProvider
- https://docs.ethers.io/v5/search/?search=.connection
IIUC, it returns either an object like { url: "https://..." }
, or the ConnectionInfo
object which was passed into the constructor.
And while I’m here, I note that the ConnectionInfo
type is documented under API > Utilities > Web Utilities, which seems like an very odd and counter-intuitive place to put it:
https://docs.ethers.io/v5/api/utils/web/#ConnectionInfo
I doubt anyone would be able to easily find that via the navbar alone.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
JsonRpcProvider - ethers
Connect to a JSON-RPC HTTP API using the URL or ConnectionInfo urlOrConnectionInfo connected to the networkish network. If urlOrConnectionInfo is not ...
Read more >How to connect to custom Provider using ethers?
In the documentation here it says to use JsonRpcProvider instead of Web3Provider . // When using the JSON-RPC API, the network will be ......
Read more >How to connect to Ethereum network with ethers.js - QuickNode
1. When someone thinks of developing a dApp the first tool that comes to their mind is web3.js which is ... 2. First,...
Read more >How to add JWT token in JsonRpcProvider url header when ...
StaticJsonRpcProvider is needed for connecting to JWT enabled Besu network. Here is the working code: connection.url = GLOBAL.
Read more >JsonRpcProvider class - ethers library - Dart API - Pub.dev
The hash code for this object. read-onlyinherited. impl → _JsonRpcProviderImpl: Internal JS Object, should not be used directly.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t do anything about Hardhat, you would have to discuss that with them.
But I’ll update the ethers docs. 😃
Great thanks!