Appearance
Getting Started
Ship your first app in three steps: install the CLI, scaffold the project, package and submit. Chain Daddy hosts the compiled bundle; your source stays on your machine.
$ npm install -g @chaindaddy/cli
$ chaindaddy app login # one-time: signs a wallet challenge → API key
$ chaindaddy app init widget alice-labs/yield-tracker
$ cd yield-tracker
$ npm install
$ npm run build && npm run pack && npm run sign && npm run submit
✓ Submitted alice-labs/yield-tracker@0.1.0 (submission id 01J5GA…)
✓ approvedThat's it. No CDN to set up. No manifest URLs to hand-edit. No mystery review queue. The CLI does the build, packaging, signing, and submission. Chain Daddy scans, hosts, and approves.
Prerequisites
- Node.js 18+
- A registered developer account: sign up at chaindaddy.io/_developer and complete KYC (~5 min). KYC is required to ship apps; the CLI itself works without it.
- An active subscription (Developer or Partner) for app submissions.
Install the CLI
bash
npm install -g @chaindaddy/cli
chaindaddy --version # 0.3.0 or laterThe CLI handles two concerns: ticker registration ops (chaindaddy create, chaindaddy profile, etc.) and app development under chaindaddy app ….
Authenticate
Two paths, depending on your setup:
Interactive (developer laptop)
bash
chaindaddy wallet init # create a local keystore (one-time)
chaindaddy app login # picks a wallet, signs a challenge, stores the API keyThe login command:
- Asks Chain Daddy for a single-use challenge bound to your wallet
- Decrypts your local keystore (asks for the password)
- Signs the challenge with your wallet
- Receives a
cd_live_…API key in return, stored at~/.chaindaddy/credentials.json(0600)
Non-interactive (CI, agents)
Generate an API key from the developer portal or via chaindaddy app key create, then export it:
bash
export CROWN_API_KEY=cd_live_…That one value serves as both the bearer for authenticated requests and the HMAC secret for signing .crown packages.
Scaffold
Pick your app type:
| Type | What it is | When to use it |
|---|---|---|
widget | A React component rendered on a token page | UI elements (charts, badges, dashboards) |
headless | A webhook runner that reacts to events | Background tasks (alerts, integrations) |
full | Both | UI + reactive backend logic |
bash
chaindaddy app init widget alice-labs/yield-tracker
cd yield-tracker
npm installProject layout:
yield-tracker/
├── capp.json # the app manifest (validate with `chaindaddy app validate`)
├── src/index.tsx # widget root component
├── assets/ # icons, screenshots
├── package.json
├── tsconfig.json
└── README.mdThe manifest describes the app, its id, version, the token data it consumes, and the permissions it needs.
The npm scripts in package.json wrap the CLI:
json
"scripts": {
"build": "chaindaddy app build",
"validate": "chaindaddy app validate",
"scan": "chaindaddy app scan",
"pack": "chaindaddy app pack",
"sign": "chaindaddy app sign",
"submit": "chaindaddy app submit --watch"
}Build, scan, pack, sign, submit
bash
npm run validate # JSON Schema check
npm run build # esbuild to dist/bundle.js
npm run scan # same security/size checks Chain Daddy runs
npm run pack # produce dist/yield-tracker-0.1.0.crown
npm run sign # sign the package with your API key
npm run submit # upload, then watch the scan logThe submit step uploads a single .crown archive containing your manifest, bundle, runner config (if any), and assets. Chain Daddy:
- Verifies the archive is well-formed and integrity-checked (every file is SHA-256 hashed inside the package).
- Re-validates the manifest against the schema.
- Runs the same security scanner you ran locally with
scan. - Stores
bundle.jsand assets atapps.chaindaddy.io/{appId}/{version}/...with immutable cache headers. - Records the submission for human review.
You'll see scan events stream by in real time:
[INFO] package_extract extracted 142 KB package (sha256 8f3c…)
[INFO] package_signature signature verified (keyId=cd_live_…)
[INFO] csp_scan no CSP violations
[INFO] security_scan 0 critical, 0 high, 0 medium, 0 low
[INFO] accessibility_scan score=98, 0 issues
[INFO] bundle_size bundle is 142337 bytes (uncompressed)
[INFO] auto_check_complete auto-check status: passed
✓ approvedA non-zero exit code means something failed:
| Exit code | What happened | Next step |
|---|---|---|
0 | Submitted and (with --watch) approved | Done, your app is live at chaindaddy.io/apps/{slug} |
1 | User error (bad flag, malformed input) | Read the error message, fix the input |
2 | System error (filesystem, network, OS-level) | Check the environment, retry |
3 | Validation failure (schema, scan, server rejected) | Read the JSON details and fix |
4 | Auth failed | Re-run chaindaddy app login |
5 | Server error | Check status page, retry |
Try it on one of your tokens
Before requesting publication, install your app on one of your own tokens for dev preview:
bash
chaindaddy app tokens # list tokens you own
chaindaddy app install alice-labs/yield-tracker --on 42
chaindaddy app preview alice-labs/yield-tracker --on 42
# open the URL printed aboveDev-preview installs are only visible to you. When you're satisfied:
bash
chaindaddy app request-publish <submissionId>That moves the submission into the human-review queue.
Add a headless runner
To react to platform events (price thresholds, schedules, app lifecycle), add a runner:
bash
chaindaddy app init headless alice-labs/eod-snapshot
cd eod-snapshotThe scaffold includes a minimal Node HTTP server using the runner SDK. Deploy it to any HTTPS endpoint (Cloudflare Workers, AWS Lambda, your own VPS) and update runner.config.json with the endpoint URL.
For runner-specific guidance (idempotency, signature verification, retries, the Action API), see the Runner SDK reference.
Next steps
- App manifest reference: every field
- Widget development: props, themes, lifecycle
- Runner development: event handlers, the Action API
- Submission pipeline: what Chain Daddy does with your package
- Event reference: all platform event types
- Security model: sandbox, signing, permission scopes
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
auth: no developer token found | Not logged in, env vars unset | chaindaddy app login or export CROWN_API_KEY |
PACKAGE_TOO_LARGE | .crown > 8 MB | Trim assets; bundle without source maps |
PACKAGE_BUNDLE_HASH_MISMATCH | Manifest edited after pack | Re-run pack and sign |
KYC verification is required | Account not KYC'd | Complete KYC at chaindaddy.io/_developer |
active developer subscription required | Free tier; submissions need a paid plan | Upgrade at chaindaddy.io/_developer |
Submission stuck at pending for >5 min | Auto-checks queued behind other work | chaindaddy app logs <id> --follow to see live progress |