cast
Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.
Best use case
cast is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.
Teams using cast should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cast/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How cast Compares
| Feature / Agent | cast | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Cast
## Overview
Use this skill when a task requires executable CAST DEX operations on Bitcoin with Charms, including order lifecycle management, Scrolls nonce/address derivation, cancellation signatures, partial fills, signing, and transaction verification.
## Environment
Required commands:
- `bash`, `curl`, `jq`, `envsubst`
- `charms`, `bitcoin-cli`
- `scrolls-nonce`, `sign-txs`, `cancel-msg`
Required artifacts/services:
- CAST app binary (`charms-cast-v0.2.0.wasm` or latest v11-compatible CAST build)
- Operator-signed `fulfill` params payload
- Scrolls API base URL
- `prev_txs` ancestry data for all spell inputs
- fee funding input UTXO for maker flows (`CAST_FUNDING_UTXO`)
- v11 spell file (`version: 11`, `tx.*`, `app_public_inputs`)
- separate private-inputs file passed via `--private-inputs`
## Workflow
1. Run preflight checks for your path:
- `scripts/check-cast-prereqs.sh maker`
- `scripts/check-cast-prereqs.sh taker`
- `scripts/check-cast-prereqs.sh cancel`
- `scripts/check-cast-prereqs.sh server`
2. Follow [order-lifecycle](references/order-lifecycle.md) for create/check/prove flow.
3. For maker edits, follow [cancel-and-replace](references/cancel-and-replace.md).
4. For taker fills, follow [partial-fulfillment](references/partial-fulfillment.md).
5. For signing and broadcast controls, follow [signing-and-broadcast](references/signing-and-broadcast.md).
6. For repeated autonomous execution, follow [autotrade-loop](references/autotrade-loop.md).
7. Keep operations deterministic:
- prefer file-backed inputs over inline shell literals
- use dry-run first for mutation steps
- persist artifacts and receipts for every run
- encode `tx.coins[*].dest` as hex destination bytes (derive via `charms util dest --addr ...`)
## Quick Commands
```bash
# Preflight
skills/cast/scripts/check-cast-prereqs.sh maker
# Derive Scrolls nonce + address
skills/cast/scripts/derive-scrolls-address.sh \
--funding-utxo "<txid:vout>" \
--output-index 0 \
--scrolls-base-url "${CAST_SCROLLS_BASE_URL}"
# Migrate legacy CAST howto spell to v11 (split private inputs + convert coin dests)
skills/cast/scripts/cast-migrate-howto-v11.sh \
--input /Users/christopherdavid/code/charms/cast-releases/docs/howto/03-partial-fulfill.yaml \
--output-spell ./rendered/03-partial-fulfill.v11.yaml \
--output-private-inputs ./rendered/03-partial-fulfill.private.v11.yaml
# Check + prove
skills/cast/scripts/cast-spell-check.sh \
--spell ./rendered/create-order.yaml \
--private-inputs-file ./rendered/create-order.private-inputs.yaml \
--app-bin "${CAST_APP_BIN}" \
--prev-txs-file "${CAST_PREV_TXS_FILE}"
skills/cast/scripts/cast-spell-prove.sh \
--spell ./rendered/create-order.yaml \
--private-inputs-file ./rendered/create-order.private-inputs.yaml \
--app-bin "${CAST_APP_BIN}" \
--prev-txs-file "${CAST_PREV_TXS_FILE}" \
--change-address "bc1q..." \
--mock
skills/cast/scripts/cast-spell-prove.sh \
--spell ./rendered/create-order.yaml \
--private-inputs-file ./rendered/create-order.private-inputs.yaml \
--app-bin "${CAST_APP_BIN}" \
--prev-txs-file "${CAST_PREV_TXS_FILE}" \
--change-address "bc1q..."
# Sign + inspect
skills/cast/scripts/cast-sign-and-broadcast.sh --tx-json ./proofs/tx_to_sign.json --dry-run
skills/cast/scripts/cast-show-spell.sh --tx "<spell_tx_hex>"
# Run one automated iteration (safe defaults: mock prove + dry-run sign)
skills/cast/scripts/cast-autotrade-loop.sh \
--config skills/cast/assets/autotrade-loop.config.example \
--once
# Run continuous loop (explicitly controlled)
skills/cast/scripts/cast-autotrade-loop.sh \
--config /absolute/path/to/autotrade.env \
--interval-seconds 45 \
--max-iterations 0 \
--continue-on-error
```
## References
- [order-lifecycle](references/order-lifecycle.md)
- [cancel-and-replace](references/cancel-and-replace.md)
- [partial-fulfillment](references/partial-fulfillment.md)
- [signing-and-broadcast](references/signing-and-broadcast.md)
- [autotrade-loop](references/autotrade-loop.md)Related Skills
neutronpay
Neutronpay MCP and SDK workflows for Lightning, stablecoin, and fiat payments.
moneydevkit
Money Dev Kit workflows for Lightning checkout and agent wallets.
mezo
Mezo integration workflows for apps, autonomous agents, and Mezo Earn operations.
maestro
Maestro Symphony blockchain query operations for OpenAgents agents, including tip freshness checks, address/UTXO/runes queries, and production-safe troubleshooting against deployed Symphony API endpoints.
l402
L402 agent commerce workflows with lnd, lnget, scoped macaroons, aperture, and MCP.
charms
Charms workflows for Bitcoin app contracts, spell proving, and UTXO asset operations.
blink
Bitcoin Lightning wallet for agents — balances, invoices, payments, BTC/USD swaps, QR codes, price conversion, and transaction history via the Blink API. All output is JSON.
autopilot-pane-control
OpenAgents desktop pane and CAD control for Codex via openagents.* tool calls.
autopilot-data-seller
Conversational seller-authoring policy for DS-first Data Market listings in OpenAgents.
autopilot-data-seller-cli
Shell-first OpenAgents DS-first Data Market packaging and publication workflow using the deterministic packaging helper, autopilotctl, and the no-window headless runtime.
autopilot-data-market-control
Typed OpenAgents DS-first Data Market tool contract for seller publication and market read-back.
autopilot-cad-builder
Deterministic CAD build orchestration for Autopilot Chat using openagents CAD and pane tools, including week-1 gripper flow.