authenticate-wallet
Authenticate Wallet
Manage authentication sessions for the StarkFi CLI. StarkFi uses a remote Auth Server with Privy TEE for email-based one-time password (OTP) authentication. A valid session is required before any transactional skill can operate.
Prerequisites
- The StarkFi Auth Server (
starkfi-server) must be running and accessible. - An email address the user has access to (for receiving OTP codes).
Authentication Flow
The login process is a two-step OTP flow:
- Initiate —
auth login <email>sends an OTP code to the email. - Verify —
auth verify <email> <code>completes authentication.
The agent CANNOT guess or auto-fill the OTP code — it must wait for the user to provide it after checking their email.
Rules
- ALWAYS run
npx starkfi@latest statusfirst to check if the user already has an active session. If they do, skip the login flow — just inform them. - After
auth login, you MUST wait for the user to provide their OTP code. Do NOT ask more than once; just say you're waiting. - After
auth verify, you MUST runnpx starkfi@latest statusto confirm the session is active. deployis idempotent — it's safe to run multiple times. It deploys the smart account contract on-chain if not already deployed.- If any other skill reports
Not authenticated, direct the user to this skill.
Commands
# Step 1: Send OTP to email
npx starkfi@latest auth login <email>
# Step 2: Verify OTP code
npx starkfi@latest auth verify <email> <code>
# Check session status
npx starkfi@latest status
# Display wallet address
npx starkfi@latest address
# Deploy smart account on-chain
npx starkfi@latest deploy
# End session
npx starkfi@latest auth logout
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
email |
string | User's email address | Yes |
code |
string | One-time password from email | Yes |
Examples
User: "Log me in with user@example.com"
npx starkfi@latest status
# If not authenticated:
npx starkfi@latest auth login user@example.com
# Wait for user to provide OTP code (e.g. "123456")
npx starkfi@latest auth verify user@example.com 123456
npx starkfi@latest status
User: "What's my wallet address?"
npx starkfi@latest address
User: "Deploy my account"
npx starkfi@latest deploy
User: "Log me out"
npx starkfi@latest auth logout
Error Handling
| Error | Action |
|---|---|
Invalid OTP code |
Ask the user to check their email and retry auth verify. |
Session expired |
Restart from auth login. |
Server unreachable |
Ensure starkfi-server is running at the configured URL. |
Rate limit |
Wait 60 seconds before retrying. |
Deployment failed |
Check balance — send ETH/STRK to the address, or enable gasfree mode first. |
Insufficient balance |
For deploy: npx starkfi@latest config set-gasfree on to bypass gas costs. |
Related Skills
- All other skills depend on this skill — if any reports
Not authenticated, use this. - Use
configto enable gasfree mode if the user can't afford deployment gas.
More from ahmetenesdur/starkfi
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
10balance
Check Starknet wallet token balances — STRK, ETH, and all ERC-20 tokens. Use this skill when the user asks about their balance, holdings, funds, tokens, wallet contents, or wants to know how much of something they have. Also use before any transaction to verify sufficient funds. Trigger whenever the user says "check my balance", "how much ETH do I have", "what's in my wallet", "do I have enough", "show my tokens", or any variation about checking available assets — even if they don't use the word "balance".
9multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.
9portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
9batch
Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply/borrow/repay/withdraw, token sends, DCA orders, and Troves vault deposits/withdrawals into one multicall. Use this skill when the user wants to batch, combine, bundle, or chain multiple diverse operations together in one atomic transaction, such as "swap ETH and then stake STRK" or "withdraw from lending and swap" or "repay debt and stake" or "swap and send in one go" or "create a DCA order and stake" or "deposit into vault and swap". Also trigger when the user mentions multicall, combining operations, doing multiple things at once, or wants to save gas by bundling actions — even if they don't use the word "batch".
7lending
Manage Vesu V2 lending positions on Starknet — supply assets, borrow against collateral, repay debt, withdraw, close positions, monitor health factors, and auto-rebalance risky positions. Use this skill when the user mentions lending, borrowing, supplying collateral, Vesu, earn interest, health factor, liquidation risk, monitoring positions, auto-rebalancing, protecting against liquidation, "my position is risky", "health factor low", or DeFi yield from lending protocols — even if they don't say "lending" explicitly.
7