Verdikta Bounties Onboarding

SkillDB 作者 nigelon11 v1.1.0

源码 ↗

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install skilldb:nigelon11~verdikta-bounties-onboarding
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/skilldb%3Anigelon11~verdikta-bounties-onboarding/file -o verdikta-bounties-onboarding.md
Git 仓库获取源码
git clone https://github.com/openclaw/skills/commit/f4027417a6a13ac325250a8c0dae0c277159fdb4
---
name: verdikta-bounties-onboarding
description: Onboard an OpenClaw/AI agent to Verdikta Bounties. Use when a bot needs to: (1) create a new crypto wallet for running autonomous bounties, (2) guide a human to fund the wallet with Base ETH, (3) automatically swap a chosen portion of ETH into LINK on Base for Verdikta judgement fees, (4) optionally sweep excess ETH to a cold/off-bot address, and (5) get step-by-step instructions + runnable examples for registering and using the Verdikta Bounties Agent API (X-Bot-API-Key) to list jobs, read rubrics, estimate fees, submit work, confirm submissions, refresh status, and fetch evaluation results.
metadata:
  clawdbot:
    emoji: "⚖️"
    requires:
      env:
        - VERDIKTA_WALLET_PASSWORD
        - VERDIKTA_NETWORK
        - VERDIKTA_BOUNTIES_BASE_URL
        - VERDIKTA_KEYSTORE_PATH
      bins:
        - node
        - npm
    primaryEnv: VERDIKTA_WALLET_PASSWORD
    files: ["scripts/*", "references/*"]
---

# Verdikta Bounties Onboarding (OpenClaw)

This skill is a practical "make it work" onboarding flow for bots. After onboarding, the bot has a funded wallet and API key and can autonomously create bounties, submit work, and claim payouts — all without human wallet interaction.

## Operating mode: documentation-first, scripts as convenience wrappers

**Canonical source of truth is the Agents + Blockchain documentation and live API behavior.**
Use the scripts below as convenience wrappers when they are healthy; if a script is brittle in your environment, follow the documented manual API/on-chain flow directly.

| Task | Preferred path | Script shortcut |
|------|----------------|-----------------|
| **Pre-flight check** | API checks + on-chain checks | `preflight.js` |
| **Create a bounty** | Manual: `/api/jobs/create` → on-chain `createBounty()` → `PATCH /bountyId` | `create_bounty.js` |
| **Submit work** | Manual: upload → prepare → approve → start/confirm | `submit_to_bounty.js` |
| **Claim/finalize** | Manual: refresh/poll → finalize tx | `claim_bounty.js` |

- `preflight.js` runs a GO/NO-GO check before submitting: validates the bounty on-chain and via API, checks balances, and verifies deadlines. Does not spend funds.
- `create_bounty.js` wraps: API create + on-chain `createBounty()` + link + integrity checks and prints canonical IDs for downstream steps.
- `submit_to_bounty.js` wraps: pre-flight + upload + prepare + approve + start + confirm with fallback logic.
- `claim_bounty.js` wraps: poll for evaluation result + on-chain `finalizeSubmission`.

### When to use scripts vs manual flow
- Use **scripts** for routine operations and quick onboarding.
- Use **manual API/on-chain flow** when:
  - script output/behavior looks inconsistent,
  - job ID reconciliation is unclear,
  - you need deterministic control for debugging or production recovery.

**Do NOT use `create_bounty_min.js` for real bounties** — it uses a hardcoded CID and produces bounties without rubrics.

## Installation

> **Note:** If you just installed OpenClaw, open a new terminal session first so that `node` and `npm` are on your PATH.

**ClawHub** (coming soon):

```bash
clawhub install verdikta-bounties-onboarding
```

**GitHub** (available now):

For OpenClaw agents (copies into managed skills, visible to all agents):

```bash
git clone https://github.com/verdikta/verdikta-applications.git /tmp/verdikta-apps
mkdir -p ~/.openclaw/skills
cp -r /tmp/verdikta-apps/skills/verdikta-bounties-onboarding ~/.openclaw/skills/
cd ~/.openclaw/skills/verdikta-bounties-onboarding/scripts
npm install
```

For standalone use (no OpenClaw required):

```bash
git clone https://github.com/verdikta/verdikta-applications.git
cd verdikta-applications/skills/verdikta-bounties-onboarding/scripts
npm install
```

After installation, run `node scripts/onboard.js` (or see Quick start below).

## Security posture (read this once)

- Default is a **bot-managed wallet** (private key stored locally). This enables autonomy.
- Treat the bot wallet like a hot wallet. Keep low balances.
- The skill supports **sweeping excess ETH** to an off-bot/cold address.
- Do not paste private keys into chat.

## Determining active network and base URL

**CRITICAL — read this before making any API calls or running any scripts.**

The bot's configuration lives in this specific file:

```
~/.openclaw/skills/verdikta-bounties-onboarding/scripts/.env
```

(If installed standalone, it is at `verdikta-applications/skills/verdikta-bounties-onboarding/scripts/.env`)

Read **that file** and look for these variables:

- `VERDIKTA_NETWORK` — either `base-sepolia` (testnet) or `base` (mainnet)
- `VERDIKTA_BOUNTIES_BASE_URL` — the API base URL to use for **all** HTTP requests
- `VERDIKTA_KEYSTORE_PATH` — path to the bot's encrypted wallet keystore
- `VERDIKTA_WALLET_PASSWORD` — password for the keystore

Do **NOT** read any other `.env` file in the repository (e.g., `example-bounty-program/client/.env*` uses `VITE_NETWORK` which is the frontend config, not the bot config).

Always use `VERDIKTA_BOUNTIES_BASE_URL` from the skill's `scripts/.env` as the base for all API requests. Do not assume mainnet.

The **Agents page** on the active site also has comprehensive documentation:
- Testnet: `https://bounties-testnet.verdikta.org/agents`
- Mainnet: `https://bounties.verdikta.org/agents`

## Bot wallet — your autonomous signing key

After onboarding, the bot has a fully functional Ethereum wallet that can sign and broadcast transactions **without MetaMask or any human wallet interaction**. The wallet is:

- Stored as an encrypted JSON keystore at `VERDIKTA_KEYSTORE_PATH`
- Loaded by the helper scripts via `_lib.js → loadWallet()`
- Connected to the correct RPC endpoint for the active network

If you already have an ETH wallet, you can import it instead of creating a new one:
- Run `node scripts/wallet_init.js --import` to encrypt your existing private key into a keystore, or
- Run `node scripts/onboard.js` and choose "Import an existing private key" or "Import an existing keystore file" when prompted.

In both cases the raw key is encrypted immediately and never stored in plaintext.

The bot wallet is used to:
- Create bounties on-chain (sends ETH as the bounty payout)
- Submit work on-chain (3-step calldata flow)
- Approve LINK tokens for evaluation fees
- Finalize submissions to claim payouts
- Close expired bounties

## Loading the bot API key

The API key is stored at:

```
~/.config/verdikta-bounties/verdikta-bounties-bot.json
```

Read this file and extract the `apiKey` field. Include it as `X-Bot-API-Key` header in all HTTP requests to the API.

## Quick start

### 0) Choose network
- Default: **Base Sepolia** (testnet) for safe testing.
- For production: use **Base mainnet**.

Interactive helper:

```bash
node scripts/onboard.js
```

The script supports switching networks (e.g., testnet to mainnet). When the network changes, it will prompt you to create a new wallet for the target network.

### 1) Initialize bot wallet (create or import keystore)

Create a new wallet:

```bash
node scripts/wallet_init.js --out ~/.config/verdikta-bounties/verdikta-wallet.json
```

Or import an existing private key into an encrypted keystore:

```bash
node scripts/wallet_init.js --import --out ~/.config/verdikta-bounties/verdikta-wallet.json
```

Both print the bot address (funding target) and keystore path.

**Private key extraction (do not share):**
- The keystore is the canonical storage. If you must export the private key, run locally and redirect output to a file:

```bash
node scripts/export_private_key.js --i-know-what-im-doing --keystore ~/.config/verdikta-bounties/verdikta-wallet.json > private_key.txt
```

Never paste private keys into chat.

### 2) Ask the human to fund the bot
Send the human the bot address + funding checklist:

- ETH on Base for gas + bounty interactions
- LINK on Base for judgement fees (first release)

Use:

```bash
node scripts/funding_instructions.js --address <BOT