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
Copy file name to clipboardExpand all lines: docs/tools/clients/fcl-js/api.md
+16
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,22 @@ fcl.config({
35
35
});
36
36
```
37
37
38
+
### Using Default Configurations
39
+
40
+
To simplify setup across networks, FCL provides built-in configuration presets for the most common environments. These include: `flowMainnet`, `flowTestnet` and `flowEmulator`.
41
+
42
+
Each preset contains the appropriate values for connecting to its corresponding network. To use one, just spread it into your fcl.config() call:
43
+
44
+
```typescript
45
+
import {flowTestnet} from"@onflow/fcl"
46
+
47
+
fcl.config({
48
+
...flowTestnet
49
+
})
50
+
```
51
+
52
+
You can view the full preset definitions [here](https://github.com/onflow/fcl-js/blob/master/packages/sdk/src/constants.ts).
53
+
38
54
### Getting Configuration Values
39
55
40
56
The `config` instance has an **asynchronous**`get` method. You can also pass it a fallback value.
0 commit comments