diff --git a/coinfello/SKILL.md b/coinfello/SKILL.md index bbd12ee..4d91821 100644 --- a/coinfello/SKILL.md +++ b/coinfello/SKILL.md @@ -1,12 +1,18 @@ --- name: coinfello description: 'Interact with CoinFello using the @coinfello/agent-cli to create MetaMask smart accounts, sign in with SIWE, manage delegations, send prompts with server-driven ERC-20 token subdelegations, and check transaction status. Use when the user wants to send crypto transactions via natural language prompts, manage smart account delegations, or check CoinFello transaction results.' -compatibility: Requires Node.js 20+ and pnpm. +compatibility: Requires Node.js 20+ (npx is included with Node.js). metadata: - { - 'clawdbot': - { 'emoji': '👋', 'homepage': 'https://coinfello.com', 'requires': { 'bins': ['node'] } }, - } + clawdbot: + emoji: '👋' + homepage: 'https://coinfello.com' + requires: + bins: ['node', 'npx'] + env: + - name: COINFELLO_BASE_URL + description: 'Base URL for the CoinFello API server' + required: false + default: 'https://hyp3r-58q8qto10-hyperplay.vercel.app/' --- # CoinFello CLI Skill @@ -15,11 +21,25 @@ Use the `npx @coinfello/agent-cli` CLI to interact with CoinFello through MetaMa ## Prerequisites -- Node.js 20 or later -- pnpm package manager -- Build the CLI before first use: `pnpm build` +- Node.js 20 or later (npx is included with Node.js) -The CLI is available via `npx @coinfello/agent-cli`. +The CLI is available via `npx @coinfello/agent-cli`. No manual build step is required. + +## Environment Variables + +| Variable | Required | Default | Description | +| -------------------- | -------- | ----------------------------------------------- | ------------------------------ | +| `COINFELLO_BASE_URL` | No | `https://hyp3r-58q8qto10-hyperplay.vercel.app/` | Base URL for the CoinFello API | + +## Security Notice + +This skill performs the following sensitive operations: + +- **Private key generation and storage**: Running `create_account` generates a new private key and stores it **in plaintext** at `~/.clawdbot/skills/coinfello/config.json`. Protect this file accordingly. +- **Session token storage**: Running `sign_in` stores a SIWE session token in the same config file. +- **Delegation signing**: Running `send_prompt` may automatically create and sign blockchain delegations based on server-requested scopes, then submit them to the CoinFello API. + +Users should ensure they trust the CoinFello API endpoint configured via `COINFELLO_BASE_URL` before running delegation flows. ## Quick Start diff --git a/coinfello/references/REFERENCE.md b/coinfello/references/REFERENCE.md index 0f1e3b5..d230c97 100644 --- a/coinfello/references/REFERENCE.md +++ b/coinfello/references/REFERENCE.md @@ -59,11 +59,11 @@ No parameters. Prints the stored smart account address from config. Exits with a npx @coinfello/agent-cli sign_in [--base-url ] ``` -| Parameter | Type | Required | Default | Description | -| ------------ | -------- | -------- | ------------------------------- | -------------------- | -| `--base-url` | `string` | No | `${COINFELLO_BASE_URL}api/auth` | Auth server base URL | +| Parameter | Type | Required | Default | Description | +| ------------ | -------- | -------- | ------------------------------- | ------------------------------------------------------------------------------------------------------ | +| `--base-url` | `string` | No | `${COINFELLO_BASE_URL}api/auth` | Auth server base URL. `COINFELLO_BASE_URL` defaults to `https://hyp3r-58q8qto10-hyperplay.vercel.app/` | -The default resolves using the `COINFELLO_BASE_URL` environment variable (defaults to `http://localhost:3000/`). +The default resolves using the `COINFELLO_BASE_URL` environment variable (defaults to `https://hyp3r-58q8qto10-hyperplay.vercel.app/`). Performs a Sign-In with Ethereum (SIWE) flow using the private key from config. Saves the `session_token` to config on success. The session token is automatically injected as a cookie for subsequent API calls. @@ -118,7 +118,7 @@ Any chain exported by `viem/chains`. Common examples: ## API Endpoints -Base URL: Configured via the `COINFELLO_BASE_URL` environment variable (defaults to `http://localhost:3000/`). +Base URL: Configured via the `COINFELLO_BASE_URL` environment variable (defaults to `https://hyp3r-58q8qto10-hyperplay.vercel.app/`). | Endpoint | Method | Description | | ---------------------------------------- | ------ | ---------------------------------------------------- | @@ -220,6 +220,18 @@ All `amount` fields are in the token's smallest unit (e.g. `5000000` for 5 USDC | DAI | 18 | amounts use 18 decimal places | | WETH | 18 | amounts use 18 decimal places | +## Environment Variables + +| Variable | Required | Default | Description | +| -------------------- | -------- | ----------------------------------------------- | ------------------------------ | +| `COINFELLO_BASE_URL` | No | `https://hyp3r-58q8qto10-hyperplay.vercel.app/` | Base URL for the CoinFello API | + +## Security Considerations + +- **Private key storage**: `create_account` generates and stores a private key in plaintext at `~/.clawdbot/skills/coinfello/config.json`. Restrict file permissions (e.g. `chmod 600`) and do not share or commit this file. +- **Session token storage**: `sign_in` stores a SIWE session token in the same config file. +- **Automatic delegation signing**: `send_prompt` may create and sign delegations based on scopes requested by the server, then submit them to the CoinFello API endpoint. Ensure the `COINFELLO_BASE_URL` points to a trusted endpoint before running delegation flows. + ## Error Messages | Error | Cause | Fix | diff --git a/package.json b/package.json index 68e7be7..ef3957a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinfello/agent-cli", - "version": "0.1.1", + "version": "0.1.2", "description": "", "type": "module", "main": "dist/index.js", @@ -15,6 +15,7 @@ }, "scripts": { "build": "vite build", + "build:swift": "bash swift/SecureEnclaveSigner/build.sh", "codecheck": "tsc --noEmit", "lint": "eslint src", "prettier-fix": "prettier --write src coinfello",