Skip to content

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…)
✓ approved

That'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 later

The 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 key

The login command:

  1. Asks Chain Daddy for a single-use challenge bound to your wallet
  2. Decrypts your local keystore (asks for the password)
  3. Signs the challenge with your wallet
  4. 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:

TypeWhat it isWhen to use it
widgetA React component rendered on a token pageUI elements (charts, badges, dashboards)
headlessA webhook runner that reacts to eventsBackground tasks (alerts, integrations)
fullBothUI + reactive backend logic
bash
chaindaddy app init widget alice-labs/yield-tracker
cd yield-tracker
npm install

Project 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.md

The 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 log

The submit step uploads a single .crown archive containing your manifest, bundle, runner config (if any), and assets. Chain Daddy:

  1. Verifies the archive is well-formed and integrity-checked (every file is SHA-256 hashed inside the package).
  2. Re-validates the manifest against the schema.
  3. Runs the same security scanner you ran locally with scan.
  4. Stores bundle.js and assets at apps.chaindaddy.io/{appId}/{version}/... with immutable cache headers.
  5. 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
✓ approved

A non-zero exit code means something failed:

Exit codeWhat happenedNext step
0Submitted and (with --watch) approvedDone, your app is live at chaindaddy.io/apps/{slug}
1User error (bad flag, malformed input)Read the error message, fix the input
2System error (filesystem, network, OS-level)Check the environment, retry
3Validation failure (schema, scan, server rejected)Read the JSON details and fix
4Auth failedRe-run chaindaddy app login
5Server errorCheck 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 above

Dev-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-snapshot

The 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

Troubleshooting

SymptomLikely causeFix
auth: no developer token foundNot logged in, env vars unsetchaindaddy app login or export CROWN_API_KEY
PACKAGE_TOO_LARGE.crown > 8 MBTrim assets; bundle without source maps
PACKAGE_BUNDLE_HASH_MISMATCHManifest edited after packRe-run pack and sign
KYC verification is requiredAccount not KYC'dComplete KYC at chaindaddy.io/_developer
active developer subscription requiredFree tier; submissions need a paid planUpgrade at chaindaddy.io/_developer
Submission stuck at pending for >5 minAuto-checks queued behind other workchaindaddy app logs <id> --follow to see live progress