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:
| Param | Type | Required | Description |
|---|---|---|---|
action | string | Yes | list, reset, set-rpc, get-rpc, set-network, set-gasfree, set-gas-token |
value | string | No | Value for the action (see examples below) |
Available Actions:
| Action | Value | Description |
|---|---|---|
list | — | Show all current configuration settings |
reset | — | Reset all settings to defaults |
set-rpc | URL string | Set a custom RPC endpoint |
get-rpc | — | Show the current RPC URL |
set-network | mainnet or sepolia | Switch between mainnet and testnet |
set-gasfree | on or off | Enable/disable developer-sponsored gas (Gasfree mode) |
set-gas-token | Token symbol or reset | Set 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.
Last updated on