You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Even Foundation and Labs people people call clusterApiURL() or have little helpers to match cluster names to connections. It would useful to allow Connection to just use a cluster name, if someone wants to connect to one of the official cluster URLs.
Example use case
Someone wants to connect to devnet.
They run:
const connection - new Connection("devnet");
And don't have to worry about matching the name to a network URL.
Details
Just check for a few magic values for the official clusters, anything outside those should be assumed to be a URL.
The text was updated successfully, but these errors were encountered:
This runs up against the principle of greatest package efficiency. If you use the feature that exercises the clusterApiUrl logic, then you use some or all of that code. If you don't (ie. you supply your own RPC URL) then you use 0% of it, and waste those 628 gzipped bytes.
It's never a big deal in isolation, but if we allow this sort of pre-bundled-but-optional functionality everywhere (see #2115) then package efficiency goes way down.
Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.
Motivation
Even Foundation and Labs people people call
clusterApiURL()
or have little helpers to match cluster names to connections. It would useful to allow Connection to just use a cluster name, if someone wants to connect to one of the official cluster URLs.Example use case
Someone wants to connect to devnet.
They run:
And don't have to worry about matching the name to a network URL.
Details
Just check for a few magic values for the official clusters, anything outside those should be assumed to be a URL.
The text was updated successfully, but these errors were encountered: