StarkFiStarkFi

Authentication

Sign in with your email to connect your Starknet wallet

How It Works

StarkFi uses Privy for authentication. When you sign in with your email, a Starknet smart contract wallet (ArgentX v0.5.0) is automatically created and managed for you — no browser extension or seed phrase required.

Sign In (2 Steps)

Step 1 — Request OTP

starkfi auth login you@email.com

A one-time password (OTP) is sent to your email address.

Step 2 — Verify OTP

starkfi auth verify you@email.com 123456

Replace 123456 with the code from your email. On success, your wallet is connected and your session is saved locally.

✓ Wallet connected
  network:  mainnet
  address:  0x04a3...abcd
  walletId: wallet_abc123
  message:  New wallet created and session saved.

First time? If this is a new wallet, fund it with some ETH or STRK — or enable gasfree mode to transact without holding any gas tokens.

Check Your Status

# Show wallet address and network
starkfi address

# Full status check (auth + Fibrous API health)
starkfi status

Sign Out

starkfi auth logout

Clears your stored session. You'll need to re-authenticate to use any commands.

Session Details

Sessions are stored at ~/.local/share/starkfi/session.json (XDG-compliant).

PropertyDescription
PersistenceSurvives terminal restarts — no need to re-login each time
FormatJWT-based with automatic expiry detection
Expiry Buffer5-minute buffer before JWT expires to prevent mid-request failures
Auto-CleanupExpired sessions are automatically cleared

What the Session Contains

FieldPurpose
userIdPrivy user identifier
walletIdEmbedded wallet identifier
addressYour Starknet contract address
publicKeyWallet public key for signing
tokenJWT for authenticating API requests
serverUrlSigning server endpoint
networkmainnet or sepolia

Authentication Flow

You (CLI)

  ├─ auth login you@email.com
  │     └→ StarkFi Server (Hono) → Privy API → sends OTP email

  └─ auth verify you@email.com 123456
        └→ StarkFi Server → Privy API → creates/retrieves wallet

                                    Returns JWT + wallet info

                              CLI saves session.json locally

Next Step

After authenticating, head to the Quick Start to make your first trade.

Edit on GitHub

Last updated on

On this page