Getting current network

To request the network the user is connected to, use the network method

const networkInfo = await fuel.network();
console.log("Network ", networkInfo);

It returns a promise with an object containing the url field, which has a GraphQL network endpoint, for example:

{url: "https://beta-5.fuel.network/graphql"}

Last updated