LaunchKit · 2026
Back to Skills

trifle-auth

Authenticate with the Trifle API using Sign-In with Ethereum (SIWE)

0
0 downloads
by @okwme

Setup & Installation

openclaw skills install @okwme/trifle-auth

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install trifle-auth

What This Skill Does

Handles wallet-based authentication for the Trifle API using Sign-In with Ethereum (SIWE). Performs the full nonce-fetch, message-sign, and verify handshake, then stores the resulting JWT for use by other Trifle skills like snake-game. Private keys are read from an environment variable or 1Password.

Centralizes the SIWE handshake and token storage so every other Trifle skill can read a valid JWT without reimplementing auth logic.

When to use it

  • Logging in to Trifle before casting snake game votes
  • Generating a fresh Ethereum wallet for a new Trifle agent
  • Checking whether a stored JWT is still valid before an automated run
  • Retrieving a JWT token path to pass into downstream Trifle skill scripts
  • Inspecting current ball balance on a Trifle account

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: log in to Trifle with my wallet

AGENT
  1. 1Reads private key from TRIFLE_PRIVATE_KEY env var or 1Password vault
  2. 2Fetches a one-time nonce from /auth/wallet/nonce
  3. 3Constructs a SIWE message with domain trifle.life and signs it with the private key
  4. 4Posts the signed message to /auth/wallet/verify
  5. 5Writes the returned JWT and account metadata to ~/.local/state/trifle-auth/auth-state.json
OUTPUT

JWT token stored locally, valid for 30 days, ready for use by other Trifle skills

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

TRIFLE_PRIVATE_KEY environment variable (or 1Password vault named "Gigi" with item "EVM Wallet - Trifle Agent" containing the private key)1Password CLI if using 1Password for key storage