Starkli supports profiles, where custom networks can be defined.

ℹ️ Note

Profiles only allow defining custom networks at the moment. More features will be added soon.

ℹ️ Note

Currently, only one profile default is supported. Defining additional profiles results in an error.

The profiles file

Depending on what operating system you're using, the profiles file are located at:

  • Linux and Mac: ~/.config/starkli/profiles.toml
  • Windows: %AppData%\starkli\profiles.toml

💡 Tips

The profiles file is created automatically the first time you use a free RPC vendor. You can take the automatically generated file as a starting point for adding new networks.

Defining custom networks

Custom networks can be defined as <PROFILE_ID>.networks.<NETWORK_ID>. Since only the default profile is supported at the moment, networks should be defined as default.networks.<NETWORK_ID>.

Each network contains the following properties:

nameNoStringHuman-readable network name, currently unused
chain_idYesStringString representation of the chain ID
providerYesString/ObjectProvider configuration

Provider configuration

The provider field can be either a String or an Object. When the provider value is an Object, it must contain a type field, whose value must be one of the following:

rpcUse the JSON-RPC provider by specifying an endpoint URL
freeUse a free RPC vendor

rpc provider variant

typeYesStringValue must be rpc
urlYesStringURL to the JSON-RPC endpoint
headersNoHttpHeader[]Custom HTTP headers

where HttpHeader is defined as:

nameYesStringHTTP header name
valueYesStringHTTP header value

free provider variant

typeYesStringValue must be free
vendorYesStringMust be one of blast and nethermind

rpc provider shorthand

The provider value can also be a String. When this is the case, it's used as a shorthand for the rpc variant. So this value:

provider = ""

is the same as this:

provider = { type = "rpc", url = "" }

Example network configurations

This section contains a few example network configurations.

Network with the RPC provider

chain_id = "SN_MAIN"
provider = { type = "rpc", url = "", headers = [ { name = "Api-Key", value = "xxxx" } ] }

Network with the RPC provider shorthand

chain_id = "SN_MAIN"
provider = ""

Network with the free RPC vendor

chain_id = "SN_MAIN"
provider = { type = "free", vendor = "blast" }