StarkFiStarkFi

Auth & Config Tools

get_auth_status and config_action — session management and CLI configuration

get_auth_status

Check the current authentication state and verify the session is active.

Best Practice: Always call this first before any other tool to ensure the user is authenticated.

Parameters: None

Returns:

{
	"authenticated": true,
	"address": "0x0123...abcd",
	"network": "mainnet"
}

If not authenticated, the response will indicate the user needs to log in:

{
	"authenticated": false,
	"message": "Not authenticated. Run: npx starkfi@latest auth login <email>"
}

config_action

Read or update StarkFi configuration — RPC, network, gas mode, and gas token settings.

Parameters:

ParamTypeRequiredDescription
actionstringYeslist, reset, set-rpc, get-rpc, set-network, set-gasfree, set-gas-token
valuestringNoValue for the action (see examples below)

Available Actions:

ActionValueDescription
listShow all current configuration settings
resetReset all settings to defaults
set-rpcURL stringSet a custom RPC endpoint
get-rpcShow the current RPC URL
set-networkmainnet or sepoliaSwitch between mainnet and testnet
set-gasfreeon or offEnable/disable developer-sponsored gas (Gasfree mode)
set-gas-tokenToken symbol or resetSet gas payment token (ETH, USDC, USDT, DAI) or reset to STRK

Examples:

{ "action": "list" }
{ "action": "reset" }
{ "action": "set-network", "value": "mainnet" }
{ "action": "set-gasfree", "value": "on" }
{ "action": "set-gas-token", "value": "USDC" }
{ "action": "set-rpc", "value": "https://starknet-mainnet.g.alchemy.com/v2/<key>" }

Note: Gasfree and Gasless modes are mutually exclusive. Enabling gasfree clears any gas token setting, and vice versa.

Edit on GitHub

Last updated on

On this page