Wallet integration

From Starchild-ai-agent/official-skills · View interactive version

Wallet integration is an AI agent skill from the GitHub repository Starchild-ai-agent/official-skills. How to add wallet connection and authentication to an existing Monad frontend using Para — embedded MPC wallets with email / phone / passkey / social login, plus external-wallet connect (MetaMask, Coinbase, WalletConnect, Rainbow, etc.). Driven by the `para` CLI (`@getpara/cli`). Fetch when the user

How to use this skill

Skill file

Wallet Integration (Para)

This skill covers adding wallet + authentication to the frontend of a Monad project using Para and the para CLI (@getpara/cli).

Para gives users embedded MPC wallets — they sign in with email, phone, passkey, or a social provider (Google, Apple, Twitter, Discord, Facebook, Farcaster) and instantly have a wallet, no browser extension required. It also supports connecting external wallets (MetaMask, Coinbase, WalletConnect, Rainbow, Zerion, Rabby) for users who already have one. The same ParaProvider handles both flows.

This skill assumes the frontend already exists (typically scaffolded by the scaffold/ skill into web/). It does not scaffold a new app — Para's para create template is intentionally out of scope here, since the project scaffold is handled elsewhere.

When to fetch this skill

Monad on Para

Para's --networks flag supports evm. Monad mainnet and Monad testnet are EVM chains, so they fit the EVM template — but Para doesn't ship Monad as a built-in chain object. After para init, you import monad and monadTestnet from wagmi/chains and pass them through externalWalletConfig.evmConnector.config.{chains,transports} on the ParaProvider (v2 stores the chain list there — there is no separate wagmi.ts createConfig and no defaultChain prop). See references/para-monad-wiring.md for the exact code edits.

v2 SDK shape — read before editing the provider

If you're updating an existing Para integration, the ParaProvider props are not a flat apiKey={...}. v2 splits them into four config objects:

Default chain = first entry in externalWalletConfig.evmConnector.config.chains. There is no top-level defaultChain prop. Full example in references/para-workflows.md → step 7.

Prerequisites

Before any para command will work, the user must have all of these in place:

  1. @getpara/cli installed globally: npm install -g @getpara/cli (or pnpm add -g @getpara/cli, or run via npx @getpara/cli@latest).
  2. para logged in: para login (browser OAuth flow — only the user can complete it).
  3. A Para organization and project selected as active context. After para login, the CLI auto-selects the first org and project; switch with para orgs switch / para projects switch if needed.

The monskills hook gates para commands on install + login. If a prereq is missing, the hook denies the tool call with the exact missing piece — surface that message to the user and wait.

What NOT to do

Integrate Para into the existing frontend

cd web   # or wherever the frontend lives
para init

para init writes .pararc (org + project + environment context), then you install the SDK packages, wrap the app in ParaProvider, and import Para's CSS. After wiring, run para doctor to verify nothing is missing.

In a sandboxed or headless terminal (no real TTY), para init will exit with TTY initialization failed: uv_tty_init returned EINVAL — re-run as para init --no-input and it will use the active org/project/env from global config instead of prompting.

See references/para-workflows.md → "Integrate Para into the existing frontend" for the exact code edits, package list, and para doctor debugging loop.

Where to look next

Reference files — fetch on demand:

Start with the workflow recipe that matches the user's goal. Drop into the CLI reference only when you need a flag or subcommand not covered there.

Exit-code contract

Every para command follows the same convention — check exit codes, not just stdout:

| Exit code | Meaning | How to react |

|---|---|---|

| 0 | Success | Continue |

| 1 | User error (bad args, not logged in, unknown project, para doctor found errors with --json) | Read stderr, fix the input, retry |

| 2 | API/server error | Not the user's fault. Retry once; if it persists, tell the user and stop. |

para doctor --json exits 1 when it finds errors — that's expected behaviour, not a CLI bug. Use it as the signal that the integration has issues.

Secrets hygiene

Official docs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.