Workflows & Contracts
1BitClaw lets you draw a process — an order, an approval chain, an auction, a payroll run — and then have Bitcoin SV actually execute it. Every step is a real transaction. Nothing sits in a company database, nothing depends on 1BitClaw staying online, and nobody takes a cut. This handbook covers both halves of that: the workflow engine that runs the process, and the sCrypt contract library that gives individual steps teeth.
0.1What this is
Two features sit at the centre of 1BitClaw, and they're designed to be used together.
A workflow without contracts is still useful: it publishes records, sends payments, waits for events, notifies people. Adding a contract is what turns "the process says pay them" into "the money is locked and can only move if the conditions hold."
It's ordered so you can stop when you have enough. Start here and Core ideas are worth the ten minutes no matter what you're doing. After that, jump to Workflows or Contracts. Everything marked for developers is safely skippable if you're only ever going to click buttons.
0.2Which reader are you
Three quite different people end up on this page, and they need different halves of it.
| You are… | What you actually do | Read |
|---|---|---|
| The owner | You designed the process and pressed Compile. You pay for your own steps, set the limits, and watch it run. | 2.3 → 2.30, plus all of Contracts if any step calls one |
| A participant | Someone sent you a link. One step of somebody else's process is yours to approve, sign, or pay. | 0.3 and 2.18 — about four minutes total |
| An observer | A customer, an auditor, a counterparty. You want to check that a process really happened, without trusting anyone's word for it. | 2.27 and 1.1 |
0.3Get a wallet — about sixty seconds
There is no signup. Your wallet is your account, and it's created in your own browser.
- Open the Wallet page Go to 1bitclaw.com/wallet. You have two options.
- Either generate a key, or connect an extension ✨ Generate new wallet (WIF) creates a private key locally — it is written to your browser's storage and never sent anywhere. Or connect Yours Wallet, a browser extension that keeps the key on its side and signs when asked. Both work; WIF mode unlocks a few advanced sCrypt spends that a generic extension can't sign for.
- Put a little BSV in it Buy some on any exchange that lists BSV and send it to your address, or ask whoever invited you to send you a few thousand satoshis. Most single steps cost well under 100 satoshis in miner fees — a few dollars goes a very long way.
- Back it up if you generated one A WIF key lives in one browser on one device. Clear your site data without a copy and the coins are gone, with nobody to appeal to. Export it and store it the way you'd store a password.
This is real Bitcoin, not a platform balance. There is no password reset, no support desk that can move your funds back, and no way for 1BitClaw to freeze or restore anything. That's the same property that makes the rest of this page true — but it does mean the backup step is not optional.
1.1Everything is a transaction
This is the one idea the rest of the page rests on. A 1BitClaw "record" — a published task, an approval, a workflow step, a contract deployment — is not a row in a database. It is an OP_RETURN output inside a real Bitcoin SV transaction, broadcast to real miners, mined into real blocks.
Three consequences follow, and they're the reason to bother with any of this:
- It's verifiable by strangers. Every record has a transaction id. Anyone can paste it into any BSV block explorer and see the same bytes you see. They don't have to trust 1BitClaw, or you.
- It survives us. If every 1BitClaw server vanished tonight, every board, task, contract and workflow would still be sitting in the blockchain, reconstructible by anyone with the format spec. The web app is a viewer over public data, not the owner of it.
- It costs what Bitcoin costs. Usually single-digit to a few dozen satoshis per step, paid to miners. Not to us.
1.2The Outbox gate
Nothing in 1BitClaw broadcasts behind your back. Every action that would touch the chain first becomes a draft in your Outbox, where you can read exactly what it will publish and what it will cost before anything happens.
There are exactly two ways a transaction gets broadcast, and both are your decision:
- You click Approve. The default. Nothing happens while you're away.
- A policy you signed approves it for you. Under ⚙ Policy you can pre-authorise narrow categories — "auto-approve anything under 200 sats", for example. The policy is yours, it's explicit, and it has a ceiling.
Headless workflows (2.14) are the third case, and they're the one to understand properly: you hand a signed definition to a runner, and the ceiling you sign into it is a hard cap the runner cannot exceed. More on that in 2.15.
1.3Anchors — how anything is ever found again
Blockchains are excellent at storing things and terrible at finding them. 1BitClaw's answer is an anchor: alongside the OP_RETURN, the transaction sends 1 satoshi to a special address derived from a topic name. Listing the history of that address lists every record ever filed under that topic.
You'll see anchor names all over the interface: #TASKBOARD, #MARKET,
#WF, #SCRYPT, plus per-object ones like #wf_8f3ac21b for a specific
workflow run. When a page says "scanning the chain," this is what it's doing.
Scanning anchors directly is slow, so 1BitClaw reads from cached snapshots published by indexers, falling back to a live chain scan when a snapshot is stale or missing. Snapshots are signed and coverage- checked, so an indexer that quietly dropped records gets caught. If every indexer went away, the app would get slower — not wrong.
1.40-conf vs confirmed
A transaction is broadcast the moment it's sent to miners, and confirmed once it's in a mined block — typically ten minutes later. On BSV the gap is usually uneventful, but the interface never blurs it: you always see which one you're looking at.
| Badge | Means | Trust it when |
|---|---|---|
| ⚪ 0-conf | Seen live over the relay, signature-verified, not yet in a block. | The amount is small, or you know the sender. It's how the UI stays responsive. |
| sent | Broadcast by you, with a real txid, waiting on a block. | Same as above — you can already click through to a block explorer. |
| confirmed | In a block. Reversing it now means reversing Bitcoin. | Always. |
For anything that moves real money, workflows can require more than a REST API's word for it — see 🔐 Require SPV proof in 2.15.
1.5What it costs
Short version: a miner fee per step, plus whatever the step itself moves. No protocol cut.
| You pay | Roughly | To whom |
|---|---|---|
| Miner fee, per transaction | single digits to a few dozen sats | BSV miners |
| Anchor outputs | 1 sat each, typically 1–3 per record | burned into the anchor address |
| Whatever the step moves | the payment, the escrow lock, the bid | the recipient — this is the actual money |
| A paid runner, if you choose one | quoted up front, per run | that runner's operator |
| 1BitClaw's cut | 0 | — |
Participants pay for their own steps when they execute them; you pay for yours. The compile estimate (2.12) splits this out before you commit, and the proof page (2.27) shows what it actually came to afterwards.
If a screen ever asks you to pay something that isn't a miner fee, a step's own value, or a runner fee you explicitly picked, something is wrong. There is no listing fee, no percentage, no withdrawal fee, and no premium tier that unlocks the chain.
2.1What a workflow is
A workflow is a MindMap board compiled into an ordered list of transactions. You draw boxes and arrows; the compiler walks them and produces steps. Running it means those transactions actually get broadcast, in that order, each one waiting for whatever it's told to wait for.
The board is not a diagram of the process. It is the process — there's no second place where the "real" definition lives, and no export step. That's why the layout rules in 2.3 matter more than they'd normally seem to.
2.2Board modes — View, Build, Run
The same board shows you three different things depending on the mode in the top bar. Getting this wrong is the most common reason something "isn't there."
| Mode | What it's for | What's hidden |
|---|---|---|
| 📖 View | Reading. Clean canvas, no editing affordances, nothing you can knock out of place. | Editing handles, the queue, run status. |
| ✏️ Build | Authoring. Add nodes, draw links, open the inspector, compile. | Nothing — this is the full editor. |
| ▶ Run | Watching. Live status badges on nodes, the Run panel, per-step controls. | Editing. A live run's definition is on-chain and deliberately not editable in place — see versions. |
The top bar also carries the board name, save state, and the view tools (canvas / tree / flow — 2.7). On a phone it collapses to just the mode switcher.
2.3Build the board
Open MindMap, create a board, and add nodes. Each node gets a preset — the thing it does when the process reaches it. Then link the nodes in the order they should happen.
- Add a node, give it a preset
Pick from the node's preset list:
📋 Publish Task,💸 Payment,✅ Approval,⛓ Contract Call,⏳ Wait for Event, and so on. The full map is in 2.10. - Fill in the fields
Amounts, addresses, deadlines. Most fields accept a template reference instead of a literal —
{{ctx.winnerAddr}},{{prev.txid12}}— so a later step can use a value an earlier step produced. This is how "pay whoever won" works without you knowing the winner in advance. - Link them in order
Draw a
depends_onlink from each node to the one before it. Do this for every node, not just the ones that need to pass a value along. - Assign anyone who isn't you If a step belongs to someone else, set its actor (2.18). Unassigned steps are yours, and you pay for them.
The compiler orders steps by dependency, not by where boxes sit on screen. An unlinked node joins the queue whenever it happens to become free — which can be well before or after where it visually appears. Real boards have paid the winner before a bid was ever read, and notified "it took effect" before signatures were checked, purely from missing links.
The compile dialog flags this: it counts nodes with no incoming link and offers ⛓ Chain declared order, which wires the whole branch in the order you laid it out. If you see the warning, take the button.
2.4Node types
A node's type decides what it fundamentally is; its preset (2.10) decides what it does when the process reaches it. Types are colour-coded by category on the canvas, so a board's shape is readable before you read a word of it.
| Category | Types | For |
|---|---|---|
| Knowledge | 📝 note · 📄 document | Text, specs, contracts-in-the-legal-sense. A document node is what signature steps hash. |
| Identity | 👤 profile · 👥 group | A person, or a set of people you'll address or require a quorum from. |
| Execution | ✅ task · 📍 geo | A published task others can bid on; a place-tagged node. |
| Automation | 🔁 workflow · 🔀 condition · 🤖 agent | The working parts. A workflow node is the generic step; a condition node gates transitions; an agent node hands work to an autonomous runner. |
| Runtime | 📦 app | A third-party app instance embedded in the process. |
| Governance | 🔒 policy · ⭐ custom | Rules that bound what may be auto-approved; and a free-form node for anything with no better type. |
| DeFi | 💰 crowdfund · 🤝 pledge · 🎯 milestone | Fundraising with staged release — see 2.22. |
| sCrypt | ⛓ contract | A deployed contract instance the process can call. See contracts inside workflows. |
Hold + Node for the type picker, or add plainly and change the type later. The type is not a commitment — but it does decide which inspector tabs appear (2.6), so picking honestly saves hunting.
2.5Link kinds — the arrows are not decoration
This is the part that most rewards five minutes of attention. There are seven link kinds and they compile into genuinely different behaviour. Each has its own colour on the canvas.
| Kind | Compile order | Runtime effect |
|---|---|---|
| branch | Parent before child | Pure tree structure — how the board is laid out. No condition of its own. |
| depends_on | Target compiles first | The workhorse. The engine waits for the target's transaction, and binds its contract/document data into this step. This is the one 2.3 tells you to draw everywhere. |
| sends_on | Source first | The target automatically waits for the source's transaction. Same waiting as depends_on, expressed from the other end. |
| grants | Source first | The target waits until the source has actually executed — not merely been broadcast. For access that must really exist first. |
| blocks | Source first | The target is gated shut while the source is unexecuted. The negative form of grants. |
| references | Target compiles first | A soft data link — pulls a value across with no wait. Use when you need the data but not the ordering. |
| publishes | Ordering only | Annotation. Affects how the board reads, adds no automatic condition at all. |
references orders but does not waitIt's the kind people reach for when they mean depends_on, and the failure is silent: the
step compiles in the right position and then runs before the thing it referenced has happened. If you want
the process to wait, the answer is almost always depends_on.
Add Cross-Link draws any of these between nodes that aren't parent and child, so a board's tree layout and its dependency graph don't have to be the same shape.
2.6The node inspector, tab by tab
Select a node and the right-hand panel opens. Tabs are grouped into three sections, and only the tabs that apply to this node's type appear.
📝 Content
| Tab | What's in it |
|---|---|
| Edit | Title, body text, and the type-specific metadata — location, entity reference, target address, image. A 🔒 on the tab means you have read access but not write. |
| 📎 Files | Attachments and images, with a count badge. See 2.9. |
| 🕐 History | Every edit to this node, with who made it. Collaborative boards get an audit trail per node, not just per board. |
🔗 Links
Every link into and out of this node, with its kind — the fastest way to check the wiring from 2.5 without tracing arrows by eye. Change a kind here and the canvas colour follows.
⚡ Automation
| Tab | What's in it |
|---|---|
| ▶ Step | The action picker (grouped by domain) plus the form for whatever you chose. A ✓ means an action is set; a 👤 means it's assigned to someone other than you. The </> toggle swaps the form for raw JSON when you need to hand-edit. |
| ⇄ I/O | What this step consumes from the run's context and what it contributes back — the extracts from 2.19, shown as a data sheet. |
| 💰 DeFi | Only on crowdfund / pledge / milestone nodes — live progress, deadline, tranche state. See 2.22. |
| ⛓ Contract | Attach an instance by txid, pick a method, see its live decoded state and call history. ✓ once an instance is bound. |
| 🔀 Condition | The gate on this transition, with each clause's live result and an AND/OR badge. This is the panel screenshotted in contracts inside workflows. |
| ✍️ Signatures | Derive a document hash, sign it, verify others' signatures. See 2.21. |
| 🔐 Access | Who can read and who can edit this node, and the grant records that say so. |
2.7Canvas, tree and phone
Three ways to look at the same board, switchable from the top bar.
- Canvas — the spatial view. Drag to arrange, scroll to pan, zoom indicator bottom-left, and a per-board saved viewport so you come back to where you left off. ⊡ Reset Position recentres a node you've dragged off somewhere silly; ✦ Detach → Root pulls a node out of its parent to stand alone.
- Tree — the same board as an indented list. Much faster for large boards, and the only sane way to verify ordering on a board with fifty nodes.
- 🗺 Flow — the compiled steps in actor lanes. Covered in 2.25.
On a phone the inspector becomes a bottom sheet you can drag up, with a ⛶ button for full screen. The mode switcher stays; everything else collapses. Boards are genuinely usable on a phone for reviewing and approving — less so for authoring a fifty-node process, which is what the tree view is for.
2.8The board itself — queue, snapshots, sharing, sync
Before we get to steps: a board is an object in its own right, and it has its own lifecycle. Editing it is free and local; publishing it is a deliberate act.
The queue
Edits accumulate in a pending-changes queue rather than writing to the chain as you type. The queue button in the toolbar shows how many changes are waiting. From the queue panel you can:
- 📸 Publish Snapshot → Outbox — write the board's current state on chain as one record.
- ⬆ Compile — turn the selected branch into steps (2.12).
- 📤 As Template — publish the board as a reusable template others can instantiate.
Public or private
| Action | Writes | Who can read it |
|---|---|---|
| ↑ Publish Snapshot | A public board record | Anyone. Use for processes you want discoverable. |
| 🔒 Private Sync | An encrypted record on an address derived from your own key | Only you, and anyone you explicitly grant. The chain sees ciphertext. |
| 🔒 Encrypt Note Content | Encrypts one node's body | Same — per-node rather than per-board. |
Sharing and pulling changes
- 👥 Grant Access — hand a named address read or edit rights on this board. Grants are on-chain records, so access survives you closing the tab.
- 💳 Buy access — where a board is offered for sale, the purchase is a timelocked transaction rather than a promise.
- ✏️ Sync Edits / ⟳ Sync from Chain — pull collaborators' changes in. Live edits also travel over the relay so a shared board updates within a second, with the chain as the fallback.
- 🔗 Copy Board URL / 🔗 Copy Link — deep links to the board or one node, safe to paste anywhere.
You don't have to type a process's inputs by hand. 🔍 Discover / Import from chain pulls live tasks, contracts, and profiles off the chain straight into nodes — so a work-order board can start from the task that already exists rather than a fresh one you re-describe.
2.9Attachments, images and location
Nodes carry more than text, and a few of those extras have process consequences.
| Thing | Where | Worth knowing |
|---|---|---|
| 📎 Files | Files tab | Attachments with a count badge on the tab. What a signature step hashes when you pick 📎 From file. |
| 🖼 Image | Edit tab → 🖼 Attach image | Shown on the node itself. Click to open full size in a lightbox. 🖼 Replace / ✕ Remove to change it. |
| 📍 Location | Edit tab → 📍 Pick on map | Pick on a map or type coordinates. Ticking 📡 geo feed also publishes the node to the public geo feed, where people nearby can find it — a deliberate act, off by default. |
| 🔒 Encrypted note | Edit tab | Encrypts this node's body with a key derived from your wallet. The chain stores ciphertext; the board still works. |
| Entity reference | Edit tab metadata | Points the node at an existing on-chain object by txid — a task, a profile, a contract instance. How 🔍 Import from chain wires what it pulls in. |
2.10Step kinds
Every preset compiles down to one of these kinds. The Where column matters: a few flow-control kinds can only run in a headless workflow, because a browser tab has nowhere to put a "jump to step 7."
Money
| Kind | Preset | Does | Where |
|---|---|---|---|
payment | 💸 Payment | Sends satoshis to an address. Amount and recipient may both be templated. | anywhere |
payment_split | 💸 Split Payment | One transaction, several recipients, fixed shares or percentages. | anywhere |
escrow | 🔐 Payment via Escrow / Escrow V2 | Locks the money in a contract first; release is a separate, conditioned step. | anywhere |
payout_intent | 💰 Payout Intent | Records that a payout is owed without moving anything yet — a claim someone else settles. | anywhere |
token_transfer | 🪙 Token Transfer | Moves a BSV-20 style token balance. | anywhere |
People
| Kind | Preset | Does | Where |
|---|---|---|---|
approval | ✅ Approval | Waits for a named person to approve. They get an invite link. | anywhere |
decision | 🗳 Decision | Waits for a choice between named options, not just yes/no — the choice steers a later branch. | anywhere |
sign | ✍️ Sign Document / Sign MultiSig | Collects cryptographic signatures over a document hash. | anywhere |
notify | Notify Group | Tells a set of addresses something happened. Delivered over the relay, recorded on chain. | headless |
form_input | 📝 Form Input | Collects typed values into the run's context so later steps can use them. | anywhere |
invite / grant / revoke | 🔑 Grant Access, Revoke | Hands out or takes back access to a board, a document, or a key. | anywhere |
message | Send Message | A direct, encrypted message to one address. | anywhere |
Contracts
| Kind | Preset | Does | Where |
|---|---|---|---|
contract_deploy | attach a Contract node | Creates a live instance of an sCrypt contract as part of the process. | anywhere |
contract_call | ⛓ Contract Call, 🔨 Auction: Bid, ✅ Vote Release, … | Calls a method on a deployed instance, with parameters pulled from the run's context. | anywhere |
sc_cond | ⚡ Condition | Publishes a standing "when state hits X, call Y" rule that a keeper can fire for you. See 3.11. | anywhere |
Waiting and flow control
| Kind | Preset | Does | Where |
|---|---|---|---|
wait | ⏳ Wait for Event, ⏱ Timer, ⛓ Wait for Confirmations, ✍️ Wait for Doc Signatures, 📨 Wait for Signal, ⏳ Wait for Contract State | Pauses until a condition holds. The biggest family — see 2.20. | anywhere |
branch | 🔀 Branch | Evaluates a condition and jumps to a different step. | headless |
switch | 🧭 Switch | Multi-way branch on a context value. | headless |
transform | 🧮 Transform | Computes new context values from existing ones without touching the chain. | headless |
foreach | loop over a list | Repeats a sub-sequence once per item in a context array. | headless |
sub_workflow | call another workflow | Runs a second published workflow as one step of this one. | headless |
parallel | ⑂ Parallel | Runs several branches concurrently and waits for them all. | anywhere |
script | ⚗ Script | Runs a small sandboxed script over the context. Powerful, and off unless the runner's operator enabled it. | headless |
schedule | ⏱ Timer | Delays until a wall-clock time or block height. | anywhere |
The compile dialog works it out for you: put a Branch or Transform in a branch and it force-selects Headless workflow and disables the Outbox option, with the reason in the tooltip. There is nothing to configure by hand.
2.11Start from a template
Nineteen ready-made processes ship with the app: MindMap → left rail → 📋 From Template…. Pick a card, optionally fill in participant addresses, and the board is created with every node, link and actor already wired.
Templates are the fastest way to learn the tool — instantiate one, open the compile dialog, and read the step table to see how it was put together. Some templates deliberately leave one field for you: a real deadline, your own receiving address, a document's hash. The compile dialog shows those as errors until you fill them in. That's expected, not a bug.
2.12Compile — read the estimate before you commit
Select the root node of your process and press ⬆ Compile. Nothing is published; you get an estimate.
What each part is telling you:
- Actor
memeans you execute and pay for it. An address means that person does — they'll get an invite, and their cost is not in your total.- Type
- The step kind from 2.10.
- Sats
- What this step costs the actor who runs it: miner fee plus anchors plus any value it moves.
- Estimated cost
- Your total only. The line below it — "Other actors pay their own steps" — breaks out what each participant is signing up for.
The badges in the last column
| Badge | Means | What to do |
|---|---|---|
| ✓ spendable | A verified executor exists for this contract method — it can be built and broadcast automatically. | Nothing. |
| 🛰 headless-only | Flow control that a browser bundle can't run. | Nothing — the dialog already switched your target. |
| ⚠ intent-only | No automatic executor for this contract method yet. The step will record the intent, but the actual spend is built by hand. | Expect to open the contract's own panel when the process reaches it. |
| ⚠ error | The step can't compile — usually a missing required field. | Fix it. Compile refuses to proceed while any error remains. |
2.13Simulate before you publish
The estimate tells you what a process would cost. Simulation tells you what it would do. Both are free.
| Tool | Where | What it actually runs |
|---|---|---|
| ▶ Simulate | Compile dialog | Walks every step with zero broadcasts. Transactions get a synthetic txid; waits ask "is this condition met?"; branches and transforms are evaluated for real against a mock context you can edit. |
| 🧪 Test cases on a mock ctx | Branch / decision-table editor | Evaluates every case against a context you type, using the same evaluator the runner uses. Predicates that need live data say so honestly rather than guessing. |
| 🗺 Highlight in Flow view | After a simulation | Draws the path the simulation actually took over the flow diagram, so a branch that never fires is visible rather than assumed. |
| Preflight | Contract-call steps | Checks the adapter is loaded and the call is buildable, and labels the step ⚠ intent-only or preflight error if not. |
Simulate → read the walked path → fix → simulate again. Every one of the ordering bugs described in 2.3 is visible in a simulation before it costs anything. It's the single highest- value button in the workflow UI and it's easy to walk straight past.
2.14Two ways to run it
At the bottom of the compile dialog you choose where the process runs. This is the most consequential setting on the page.
Bundle mode is right for a short process you'll click through in one sitting. Headless is right for anything with a deadline, a counterparty, or a wait longer than your attention span — and for anything using flow control at all.
2.15Safety rails
The headless options in the compile dialog exist because "runs while you sleep" and "can spend my money" is a combination that needs boundaries. Every one of these is signed into the workflow definition itself — the runner honours them because the chain says so, not because it's being polite.
| Setting | What it guarantees | Suggested |
|---|---|---|
| 💸 Payout budget / tx | A hard ceiling per transaction. A payment step above it pauses for your manual approval instead of broadcasting. The effective cap is the lower of this and the runner's own limit. | Set it to just above your largest legitimate step. 0 means every payment stays
manual. |
| 🔐 Require SPV proof | Each confirmation is verified with a real merkle proof against independently-fetched block headers, rather than trusting one API's "confirmations" field. | On for anything moving money. It's pre-checked when the compiler sees a payment step. |
| Wait for 1 confirmation between steps | Each step waits for the previous one to be mined before it runs. Slower, and immune to a reorganisation cascading through your process. | On, unless you have a specific reason. |
| 🛡 Admins | Named addresses that may pause and resume a live run. Never kill it, never change it, never spend from it. | Add a colleague if the process is important and you take holidays. |
It cannot exceed your signed payout cap. It cannot execute a step that needs a specific participant's signature — those always route to that person. It cannot change the workflow definition, because the definition is on-chain and signed. And it cannot hide: every step it executes writes a breadcrumb record that you and anyone else can read.
2.16The Run panel
Once a process is live, the Run panel is where you watch it. It's on the board, and it works for any participant — not just whoever published the run.
| Status | Means |
|---|---|
| pending | Not reached yet. |
| ⚪ 0-conf | Seen live over the relay, verified, not yet in a block. |
| sent | Broadcast, with a txid you can click through. |
| done | Complete and confirmed. |
| waiting | Blocked on a condition — the label says which: a deadline, an actor, a payment, a contract state. |
| paused | Stopped, either by you or because a step needs manual approval. |
| failed | The step errored. The run stops rather than guessing. |
A step with several assigned actors shows progress as "2/3 actor(s)", so you can see who has and hasn't acted on a quorum step rather than one opaque status for the lot.
Controls
- ⏸ Pause / ▶ Resume — freeze the run, fix whatever needs fixing, carry on. Also available to anyone you named as an admin.
- ⛔ Kill — terminal. The run stops permanently and cannot be resumed. Owner only.
- ⟳ Refresh — re-scan the chain rather than trusting the cached view. Use it if something looks stale.
- ⋯ — occasional operator actions: add the run to a different runner, fund it, migrate it.
2.17Versions and supersedes
Processes change. Rather than editing a live run — which would break the guarantee that what's on chain is what's executing — you publish a new version.
In the compile dialog, ↗ New version of… marks the run you're replacing. The new definition records that it supersedes the old one, so anyone reading the chain sees the lineage instead of two unrelated processes that happen to look similar. The old run doesn't die on its own: kill it deliberately, or let it finish.
If you compile a branch that's already running elsewhere, the dialog warns you — "already published as headless workflow…", or the reverse for an open bundle step. Both mean the same risk: two executors, one set of steps, money spent twice. Kill the old run first.
2.18Actors and invites
Any step can be assigned to someone who isn't you. They don't need a 1BitClaw account, they don't need to understand MindMap, and they never see the rest of your process unless you show them.
Who an actor can be
| Actor kind | Means | Use for |
|---|---|---|
me | Whoever compiled the workflow. | The default. |
addr | One specific wallet address. | A named person: an approver, a supplier, a client. |
group | A set of addresses with a quorum — "any 2 of these 3". | Sign-offs that shouldn't depend on one person being available. |
task_winner | Whoever's bid was accepted, resolved at runtime. | Paying a performer you haven't chosen yet. |
contract_role | An address read out of a contract's live state — "the current highest bidder". | Roles the contract itself decides. |
token_holder | Whoever currently holds a given token. | Rights that move with an asset. |
If you're the one who got the link
- Open it You'll see what process it belongs to, which step is yours, what it costs you, and by when.
- Connect or create a wallet See 0.3 — under a minute. You need enough for a miner fee, usually well under 100 satoshis.
- Do the step Read what it's asking, check the cost, tap the button. Your wallet signs locally and broadcasts.
- That's it You can close the tab. The process continues without you unless a later step is also yours.
Invite links are scoped to a specific wallet or to a role that can move — "the current highest bidder" stops being you the moment someone outbids you. If the page says you're not eligible, you're either signed in with a different wallet than the one that was invited, or the role has legitimately moved on. Neither is something you can fix from your side; ask whoever sent it.
2.19Context, extracts and roles
A process that can't carry information forward is just a checklist. Three mechanisms move data between steps.
Extracts — pull a value out of a step's result
Any step can declare extracts (+ Add extract in the step editor): "take the bidder's address
out of the record this wait was waiting for, and call it winnerAddr." From then on any field can
say {{ctx.winnerAddr}}. Extracts can also aggregate — counting matching records rather than
taking the first.
Context schema — declare what a run expects
+ Add ctx key in the compile dialog declares the keys this workflow expects to exist, with their types. It turns "the payout silently resolved to an empty address" into an error at compile time. Worth doing for anything that pays out.
Roles — name the people once
🎭 Manage roles… keeps a named registry — "approver", "supplier", "arbiter" — that steps refer to instead of repeating raw addresses. Change who fills a role in one place and every step follows. Roles can also be resolved dynamically at run time from a contract's state or a task's winner (2.18).
2.20Waits and conditions
A wait step is the process standing still on purpose. It's how a workflow survives contact with the real world, where the bid hasn't arrived yet and the deadline is on Thursday.
| Wait | Clears when | Verified how |
|---|---|---|
| ⏱ Timer | A wall-clock time or block height passes. | Block height, if you set one — it's the honest clock. |
| ⏳ Wait for Event | A matching record appears on a watched anchor — a bid, a response, a pledge. | The record's funding signature, plus a distinct-sender count if you set a quorum. |
| ⛓ Wait for Confirmations | The previous step's transaction has been mined. | A merkle proof against independent headers, if you enabled SPV. |
| ✍️ Wait for Doc Signatures | Enough valid signatures over a document hash arrive. | Cryptographically. A forgery never advances the process, and signatures must come from distinct addresses. |
| Wait for a payment | A payment of at least the expected amount lands at the expected address. | Amount and destination on-chain; optionally pinned to a specific payer. |
| 👤 Wait for an actor | An assigned participant publishes their completion event. | The event's funding signature must match the assigned address. |
| ⏳ Wait for Contract State | A deployed contract's decoded state satisfies a comparison. | Read from the live instance's locking script. |
| 📨 Wait for Signal | An external signal record arrives — a webhook-style hand-off from elsewhere. | Signed record on a known anchor. |
| Wait for an oracle | A registered oracle attests to a fact. | The oracle's signature over the attested value. |
A wait can carry an onTimeout target: if the deadline passes and the thing you were waiting for never arrived, jump to a different step instead of hanging forever. That's how escalation ("nobody signed, notify the manager") is built. Timeouts only work headless — a closed browser tab can't notice a deadline going by.
2.21Signatures on a document
The ✍️ Signatures tab turns a document node into something people cryptographically sign, and a wait step into a gate that only opens on valid signatures.
- Derive the hash 📎 From file hashes an attachment; ⌗ From note text hashes the node's body. The sha256 is what everyone signs — not the file itself, which never has to leave your machine.
- Set the signers and the threshold On the wait step: the list of addresses, and how many of them are required. "Any 2 of these 3" is the common shape.
- Signers open the board and sign Each signs the hash with their own key. The signature is an on-chain record; nobody hands anybody a private key.
- 🔍 Verify signatures Checks every signature against the hash and the signer list. Only cryptographically valid signatures from distinct addresses count toward the threshold — a duplicate or a forgery never advances the process.
There's no server attesting that the signing happened. The document hash, the signatures and the threshold are all on chain, so a counterparty can verify the whole thing years later without your cooperation, ours, or a vendor still being in business. Change one byte of the document and the hash stops matching — publicly.
2.22Crowdfund, pledge and milestone nodes
Three node types exist specifically for raising money against staged delivery, with a 💰 DeFi inspector tab showing live state. 💰 New CF Board creates a board pre-wired for this.
| Node | Does | Who acts |
|---|---|---|
| 💰 Crowdfund | 🚀 Create Campaign — a goal and a deadline. The DeFi tab shows live progress against both. | You |
| 🤝 Pledge | Backers commit funds to the campaign. They do this from the campaign's own page or their own board. | Backers |
| 🎯 Milestone | 🎯 Add Milestone with a required percentage · ✅ Vote Release for backers to approve · 💸 Release Tranche to pay out. | You and backers |
Campaign and milestone ids wire themselves between nodes — you don't copy identifiers by hand. Insert a ⏳ Wait for Event with a quorum between the vote and the release if the tranche should only unlock once enough backers have actually voted.
2.23Script steps and the catalog
for developers
A ⚗ Script step runs a small sandboxed script over the run's context — the escape hatch for logic that Transform can't express. Its editor lives in the node's Edit tab rather than the Step tab, with a test input field so you can run it against a sample context before it goes anywhere near a real run.
📤 Publish to catalog shares a script on-chain so other boards can load it with Load instead of pasting source around.
Running arbitrary submitted code unattended is a decision each runner operator makes for themselves. A script step in a headless workflow simply won't execute on a runner that hasn't opted in — which is the correct default, not a bug. Your own runner is the reliable way to use them.
2.24Branch, transform, loop
These four kinds make a workflow a program rather than a checklist. All of them are headless-only.
| Kind | What it does | Typical use |
|---|---|---|
| 🔀 Branch | Evaluates a condition and jumps to a named step. | "Under 1000 sats? Skip both approvals and pay out." |
| 🧭 Switch | Multi-way jump on a context value. | Routing by category, region, or a choice made in a Decision step. |
| 🧮 Transform | Computes new context values from existing ones. Never touches the chain. | Summing bids, formatting an address, deriving a fee from an amount. |
| 🔁 Foreach | Repeats a sub-sequence once per item in a context list. | Paying forty contributors from one list without forty nodes on the board. |
| 📦 Sub-workflow | Runs another published workflow as a single step of this one. | Reusing your standard "collect and verify an invoice" process inside three different parents. |
The context (ctx) is the run's shared memory: values extracted from earlier steps,
form inputs, computed results. Anywhere a field accepts {{ctx.something}}, it's reading from
there.
If a step is the target of someone's timeout jump, the compiler automatically inserts the skip that stops the happy path from falling into it. You don't place those by hand, and boards drawn before this existed still work — the synthesiser only ever adds.
2.25Flow view, decision tables, BPMN export
The board is good for authoring and bad for explaining. Three other views exist for the moments when someone else has to understand or sign off on the process.
| View | Shows | Good for |
|---|---|---|
| 🗺 Flow view | The compiled steps as vertical actor lanes — one column per person, so who does what is structural rather than something you infer. | Reviewing a process with the people in it. Also where a simulation's path is highlighted. |
| ▦ Decision table | A branch rewritten as a rules grid: input columns, one row per rule, an outcome per row. | Anything with more than two or three conditions. Far easier to check for gaps and overlaps than nested branches. |
| ⬇ .bpmn export | The flow as a BPMN 2.0 subset — tasks, exclusive and parallel gateways, boundary timers, lanes. | Handing the process to someone who lives in a BPMN tool, or attaching it to documentation that isn't this app. |
The decision table is a genuine alternative editor, not a read-only rendering: ▦ Use decision table instead converts a branch and you carry on editing there, with the same 🧪 Test cases button (2.13) applied to the whole grid.
2.26Triggers — a workflow as a standing service
Normally you publish a workflow and it runs once. A trigger makes it run every time a matching record appears — a new order, a new application, a new pledge — spawning a fresh run each time with that record's data already in context.
You define what to watch (a record type on an anchor), optionally what to extract from it into the run's context, and the runner does the rest. Triggers can be added to and removed from a live workflow without republishing it. It's the difference between "process this order" and "process orders."
2.27Proof and audit
Every run has a read-only page you can hand to anyone: a customer waiting on delivery, an auditor, a counterparty who wants to know what they agreed to.
Two things make this different from a PDF report:
- Independently checkable. Every transaction id links out to a public block explorer. Nobody has to take 1BitClaw's rendering on faith — or yours.
- Reconstructible without us. The page is a view over public chain data. Given the record formats, anyone could rebuild it from the blockchain alone.
The cost breakdown is worth pointing at when someone asks what a process cost: it separates the owner's spend, each participant's own spend, and any runner fee — and shows the protocol's cut, which is zero.
2.28Runners
A runner is the service that executes a headless workflow's eligible steps. You pick one when you publish.
| Option | Costs | Trade-off |
|---|---|---|
| A free public runner | Nothing | Best-effort. Fine for most processes. |
| A paid runner | Quoted per run, shown before you pick | You're paying for reliability and priority, not for permission. Never required. |
| Your own runner for developers | Your server | Nobody else in the loop. The runner ships in the repo's self-host kit. |
Whichever you choose, the safety model is identical: the runner reads your signed definition from the chain, and your signed limits bound it. A paid runner has no more authority than a free one — it's just more likely to be awake.
A live runner registers itself on-chain and holds a "liveness coin" — a single satoshi it can spend to declare itself stopped. Spending that coin from anywhere kills the role within about a second, which is how an owner shuts down a runner they no longer control. If the coin is unspent, the role is live; that's one lookup rather than a log to trust.
2.29My Invites, the anchor explorer and Admin
Three utilities that don't belong to any one board.
🧭 My Processes / My Invites
Every workflow where you're the owner or an assigned actor, on one screen — including invites you were sent and never opened. If you suspect you're holding somebody's process up, this is where you find out. It's in the sidebar as My Processes, and as a modal from inside a board.
Anchor explorer
Scan any anchor address and read its raw records. This is the chain-level view under everything in 1.3 — useful when you want to check that a record really is where the interface claims, or to explore a topic no screen has a view for yet.
⚙ Admin
For boards you own:
- ⟳ Refresh from Chain — re-read this board and its grants from the chain, ignoring the local cache.
- 👥 Grant Access / 💾 Save Access Settings — the grant records from 2.8, managed in bulk.
- ⚠ Clear Local Cache — drops the browser's copy of the board. Safe if the board is published or privately synced; destructive if you have unpublished local edits, because that cache is the only place they exist. Check the queue is empty first.
2.30When it gets stuck
| Symptom | Usually | Fix |
|---|---|---|
| A step shows waiting and never clears | The condition genuinely hasn't happened — no bid arrived, the deadline is still ahead. | Read the label; it names the condition. If it's wrong, ⏸ Pause, correct the board, re-compile that branch. |
| Steps ran in an order you didn't intend | Missing depends_on links —
see 2.3. | Kill the run, use ⛓ Chain declared order in the compile dialog, re-publish. |
| "Already published as headless workflow…" | You're about to compile a branch that's already running elsewhere — a double-execution risk. | Kill the old run first, or compile a different branch. |
| A payment step paused instead of paying | It exceeds your signed payout budget. Working as designed. | Approve it manually in your Outbox, or re-publish with a higher cap if the amount is routinely legitimate. |
| A participant says the link says they're not eligible | Wrong wallet, or the role moved. | Confirm which address you assigned; re-assign if needed. |
| The Run panel looks stale | Cached snapshot behind the chain. | ⟳ Refresh forces a real chain scan. |
| A step is marked ⚠ intent-only | No automatic executor exists for that contract method. | Open the contract's own panel and build that spend by hand — see 3.7. |
| Nothing runs at all after publishing | The run isn't assigned to any live runner. | Use ⋯ → add to runner in the Run panel, and check the runner is actually alive. |
3.1What's in the library
The Contracts module is a browsable library of 126 sCrypt smart contracts, compiled and ready to deploy. sCrypt is a language that compiles to Bitcoin Script — so a "contract" here is not a program running on a virtual machine somewhere, it's a locking script on a real UTXO. Spending that UTXO requires satisfying the script, and miners enforce that. Nobody has to run the contract for it to be binding.
| Category | Roughly | Examples |
|---|---|---|
| DeFi | 5 | Auction, SealedAuction, Crowdfund (plain and stateful) |
| BSV-20 tokens | 19 | mint, buy/sell orders, lending pool, options, forwards, bonds |
| Finance | 15 | escrow, bonds, futures, atomic swap, timelock, hodlocker |
| Governance | 9 | voting, multisig variants, MAST, tree signatures |
| NFT / ordinals | 5 | OrdinalLock, ERC721-style, ordinal auction and swap |
| Games | 8 | rock-paper-scissors, coin toss, lottery, Monty Hall |
| Cryptography | 9 | Lamport, Rabin, BitVM, ElGamal, Paillier, MiMC7 |
| Maths | 11 | TSP, SVD, perceptron, modular exponentiation, fractions |
| Utility | 10 | BTC swap, MAST, enforce-recipient, clone, block PRNG |
| Demo | 12 | Counter, HashLock, P2PKH — the ones to learn on |
Deploy Counter and call increment() a couple of times. It costs a few hundred
satoshis in total and teaches you the whole loop — deploy, decode state, call a method, watch the instance
chain — without any money at risk. Then read the same screens with a contract that matters.
3.2Browse and read a contract
Open Contracts. Search or filter by category, pick one, and the right-hand pane shows what it does, what state it holds, and what methods it exposes.
Two parts of the detail pane are worth reading properly before you deploy anything:
- State — the fields the contract carries, with their sCrypt types. These are set at deploy time and updated by method calls. For a live instance, this pane shows the current decoded values, read out of the locking script.
- Methods — what can be called, and with what parameters. This is the contract's entire public surface. Anything not listed here cannot happen.
A verified ✓ mark means the shipped adapter matches its compiled artifact — the code you're about to deploy is the code the description is about. The 📚 Learn tab has walk-throughs for the common patterns if a contract's purpose isn't obvious from its state.
3.3Learn tracks and the community library
Two parts of the module exist purely to shorten the distance between "I opened this" and "I understand what I'm looking at."
- 📚 Learn — structured tracks rather than a wall of reference. Each lesson explains one pattern — what a stateful contract is, why an escrow needs an arbiter, how a commit–reveal scheme stops cheating — against the contracts actually in the library, so you can open the thing you just read about.
- 🌐 Community — contracts published by other people, discoverable by 🌐 Search Community. Anything here was imported and published by a third party, so read the state and methods yourself before deploying: verified ✓ means the adapter matches its artifact, not that a stranger's contract does what its description claims.
A published contract is enforced by miners exactly as written — including any part of it you didn't read. For anything holding real money, check the methods list for a way the funds can leave that isn't the one you expect, and deploy a small-value instance first.
3.4Deploy an instance
Press ▶ Deploy. You fill in the constructor arguments and the initial state, and you get a draft in your Outbox — not a broadcast.
- Fill the constructor
Fields that are your own key fill themselves in. Amounts are in satoshis; deadlines are block heights
unless the field says otherwise. Text fields on token contracts accept plain strings —
CLAWbecomes the right bytes for you. - Set the locked value How many satoshis the contract UTXO holds. For a contract that's only tracking state, 1 satoshi is correct. For an escrow or an auction, this is the money at stake.
- Read the dry run It builds the locking script and round-trips the state through the decoder, so an encoding bug surfaces here rather than after you've paid. It also gives you the real cost estimate.
- Send it to the Outbox ▶ Run on Mainnet → Outbox queues the draft. Approving it is a separate, deliberate act — the same gate as everything else in 1.2.
Once broadcast, the instance is live at that transaction id. That txid is how you and everyone else refer to it from then on: in a workflow's Contract node, in a condition, in a link you send someone.
3.5Filling the hard fields
Contract forms ask for things that aren't typeable from memory — a current block height, a sha256, an oracle's public key, a specific unspent output. Rather than sending you elsewhere, tricky fields carry a small helper button that fills them correctly.
| Field wants | Helper does |
|---|---|
| A block height / locktime | Fetches the live chain height, and lets you express a deadline as "now + N" rather than doing arithmetic. |
| A sha256 hash | Hashes a file or text you supply, locally. |
| An oracle public key | Discovers a registered oracle worker on-chain and fills its key — no copying a 66-character string from somewhere else. |
| An outpoint / UTXO | Lists yours and lets you pick, instead of pasting
txid_vout by hand. |
| An address or public-key hash | Fills your own, and validates that what's there is the right form — address-versus-PKH confusion is a classic way to lock funds unreachably. |
| A token | ⛃ Pick from my wallet — choose from what you actually hold. |
Helpers only ever fill an input — they never submit anything, and the value stays editable. Field validation runs alongside: wrong hex lengths and malformed addresses are flagged before you can queue a deploy.
Commit–reveal contracts (hash locks, sealed-bid auctions, coin tosses) need you to remember a secret between two transactions that may be days apart — and losing it usually means losing the funds. The generator stores the secret locally, in your browser, so the reveal step can find it. It's convenience, not custody: it lives in one browser on one device, so for anything valuable write the secret down somewhere too.
3.6Test before you spend
🧪 Test opens a sandbox. It runs in two modes and neither one broadcasts anything.
| Mode | Checks |
|---|---|
| Deploy | Builds the locking script from your inputs and decodes it back, confirming the contract can encode and read its own state. Catches wrong types and malformed values. |
| Call method | Loads the live on-chain instance, then reports blockers: are you a permitted participant for this method, are your parameters the right types, does it need proofs you haven't supplied. |
Fully executing a Bitcoin script requires a real signed spending transaction and a script interpreter — the sandbox can't fake that locally, and it says so rather than implying a green check means "will definitely succeed." It catches the errors that are catchable ahead of time; the final arbiter is always a miner.
3.7Call a method
Open a live instance and pick a method. Fill in the parameters, and the call is queued to your Outbox like everything else. The transaction spends the current instance and creates the successor.
Some methods need more than parameters — a merkle proof, a block header, a signature from an oracle. The call panel says which, and refuses to build a transaction from placeholder data. If a method is marked intent-only, no automatic executor exists for it yet: 1BitClaw will record that you intend to call it, but the actual spending transaction is one you construct yourself. That's a real gap, and it's labelled rather than hidden.
The other buttons in the call panel
| Button | Does |
|---|---|
| 🚀 Run on Mainnet → Outbox | The normal path. Builds the real spend and queues it. |
| 🧪 Structural Dry Run | Builds and validates without queueing anything. |
| 🔬 Preview TX hex | Shows the raw transaction you're about to sign. The escape hatch when you want to check the bytes rather than the summary. |
| 📝 Record Intent Only → Outbox | Publishes that you intend to make this call without making it — the honest option for an intent-only method, and a way to signal a counterparty. |
| 🤝 Request Co-Sign | For methods that need a second signature, sends the request to the other party instead of failing. |
| 🗺 Open in MindMap board | Drops this instance onto a board as a Contract node, ready to hang a process off (3.21). |
| 🔍 Inspect | Decoded state, locking script, and the instance's place in its chain. |
3.8Find your instances again
A contract instance is identified by a transaction id, and transaction ids are easy to lose. Four things find them for you.
- 🔍 Scan Chain (on a contract) — every live instance of this contract, whoever deployed it.
- 🔎 Scan My Contract Anchors — everything you ever deployed, across all contracts. The one to reach for when you've lost track entirely.
- 🔔 Activity feed — recent calls against instances you care about, with unread marking. Clicking a row opens that instance.
- ⏱ Timeline — one instance's full history: ⏮ First, ◀ Prev, Next ▶, Last ⏭ through every call ever made, with what changed at each step. Exportable as ⬇ CSV or ⬇ JSON, and 🔗 Link gives a shareable URL to a specific point in the history.
The timeline is the audit trail for a contract in the same way the proof page (2.27) is for a process — and equally re-derivable from the chain by anyone.
3.9Co-build — deploy a contract together
Some contracts need input from more than one person before they can exist: an escrow where both sides supply an address, a multi-party agreement where each party sets their own term. 🤝 Co-build opens a shared session over that deploy form.
- Start a session and invite The initiator opens Co-build and sends invites — a link, or straight to a contact's address. The session is ephemeral and identified by a random id; it isn't published anywhere.
- Everyone fills their own fields You see live presence dots, a coloured focus ring showing what each participant is editing, and a role badge. 📌 Fill mine completes the fields that are about you. Edits merge last-write-wins per field.
- 🔒 Finalize, then everyone approves Finalizing freezes the field set and hashes it. Each participant's ✅ Approve recomputes that hash locally before signing — nobody approves a form they can't verify.
- The initiator deploys Only once everyone has approved, and never automatically. It goes through the same Outbox gate as any other deploy. When it broadcasts, everybody's session opens the new instance.
📜 Copy proof exports the approved field set and its hash — evidence of what everyone agreed to, independent of the app. ✏️ Re-open unfreezes if something needs changing before deployment.
Not just deployment. A method whose parameters come from several parties uses the same session, and if it's a method that needs a second signature the deploy button becomes 🤝 Request Co-Sign and routes into the co-signing flow instead of broadcasting.
3.10Who may call what
Being able to see a contract doesn't mean being able to call its methods, and the app works this out from the contract's own state rather than from any permission list of ours.
| If your address appears as… | You typically get |
|---|---|
| a donor / backer | refund(), vote(), collect() |
| a bidder | bid(), close() |
| a signer | sign(), pay() |
| nobody in particular, on an open contract | everything — some contracts, like Counter or a public vote, are deliberately callable by anyone |
| nobody, on a scoped contract | read-only |
This is why a workflow's contract_role actor works: "whoever the current highest bidder is"
is a question the contract's state can answer, at the moment the step runs.
3.11Auto-execute conditions
Plenty of contract calls are things nobody needs to decide — "close the auction once the deadline passes," "refund once the campaign misses its goal." ⚡ Auto-execute when… publishes that rule on-chain so a keeper can fire it for you.
The banner is the important part, and it has four honest states:
| Banner | Means |
|---|---|
| live | A keeper confirmed it runs this method. The call will be broadcast when the condition turns true. |
| opt-in | A verified executor exists, but this keeper's operator hasn't enabled it. Your condition is recorded; nothing will fire unless someone turns it on or you run your own keeper. |
| unknown | The keeper couldn't be reached. Deliberately not optimistic — it will not tell you "probably yes." |
| none | No executor for this method. The condition is a breadcrumb only. |
A keeper executing your condition is spending from its own key, unattended. Every method it will do that for is an explicit decision by whoever runs it, not a default. The gap between "an executor exists" and "this keeper runs it" is real, so the UI shows it rather than papering over it. A condition whose banner says opt-in is not broken — it's waiting on somebody's policy.
Conditions are also checked for authorship: a condition is only registered if whoever funded the transaction is the party entitled to set it. A stray or spoofed condition on someone else's instance is ignored, not attempted.
3.12🤖 Automate — the other way to make it run itself
⚡ Auto-execute and 🤖 Automate solve the same problem from opposite ends, and the difference decides which one you want.
| ⚡ Auto-execute when… | 🤖 Automate | |
|---|---|---|
| What you publish | A condition over the instance's state | An agent that watches and acts |
| Who executes | A keeper — a shared public service | A Run Agent instance, which can be yours |
| Runs where | Someone else's box, or yours | Wherever you point the agent runtime — a browser tab or a headless runner |
| Good for | One simple, permissionless rule: "close it when the deadline passes" | Logic with judgement, several instances, or anything a bare condition can't express |
| Limit | Only methods the keeper's operator enabled — the four-state banner in 3.11 | Whatever you've funded and authorised the agent to do |
🤖 Automate on an instance hands it straight to Run Agent with the contract and instance already filled in. Use ⚡ when the rule is simple and you'd rather nobody had to run anything; use 🤖 when you want control over the thing doing the work.
3.13Import your own contract
for developers
You are not limited to the shipped 126. Tools → Import Contract takes a compiled sCrypt
artifact.json — paste it or drop the file — and builds a working adapter in your browser.
# in the sCrypt boilerplate repo
npx scrypt-cli compile # your Contract.ts → artifact.json
The import preview shows what was extracted: the locking script template, the state properties and their types, the ABI methods, and the action mapping. Once imported, the contract behaves exactly like a built-in one — deploy it, test it, call it, use it in a workflow. It's stored locally in your browser until you publish it.
3.14Build one without writing sCrypt
Between "use a shipped contract" and "write sCrypt" there's a third option: the 🛠 Write from scratch — F2 Script-DSL section on the Import tab, which builds a locking script directly. It has two modes.
| Mode | What you do |
|---|---|
| ⬛ Constructor | Add blocks from dropdowns. After every edit the whole block list is replayed, so the tool knows exactly what's on the stack at each point — and only ever offers you names that are actually there. The stack, which is the genuinely hard part of Bitcoin Script, stops being something you hold in your head. |
| {} Text | The same thing as editable DSL source. The constructor generates it, and you can switch over to hand-edit once you've outgrown the blocks. |
The workflow is 🧪 Verify → 📦 Register → 🚀 Deploy / Live Test → optionally 📡 Publish as Template. Verification runs the spend offline before any of it costs anything. There's also a guided wizard for the classic first contract — 🎲 Generate my secret → → Open HashLock & Deploy — which is the shortest route from nothing to a working deployed contract you understand.
The Import tab also offers ⬇ scrypt-adapter-gen.mjs (turn a compiled artifact into an adapter offline) and ⬇ LLM build guide (a prompt-ready spec if you're generating contracts with a model). Both are plain files — nothing phones home.
3.15Publish a template so others can use it
for developers
📤 Publish ships an imported adapter on-chain, so anyone can install and deploy it. The adapter code is gzipped, split into chunks and broadcast as records anchored under the contract library's topics — the same mechanism the app itself uses to distribute its own modules.
Alongside the code, a recipe record is published: a compact description of the contract's constructor fields, state and methods, so other people's clients can render a sensible deploy form without parsing the whole artifact. Once the transactions confirm, your contract shows up in Browse for everybody.
3.16Analyze a transaction
Tools → Analyze TX takes one transaction id or a whole list, and classifies each transaction's locking scripts without needing the relevant contract installed first. Useful for working out what an unfamiliar transaction actually is, auditing a batch, or finding the instance you've lost track of.
From a result you can jump straight into 🧪 Test → Call Method against the instance you just inspected, which is the fastest path from "what is this" to "can I do anything with it."
3.17My Assets
The My Assets tab collects what your wallet actually holds and controls: token balances, contract instances you deployed, ordinals, and positions in contracts you're a participant in. Sending and transferring happen here, as do the standard BSV-20 deploy-and-mint flows.
Like everything else, it's a view over the chain rather than a ledger we keep — which is why it can show you assets you acquired somewhere else entirely.
3.18🏭 Mint — tokens, media and collections
The Mint tab creates new assets rather than calling existing contracts. It covers two quite different things that share a screen.
Fungible tokens
Standard BSV-20 style deploy-and-mint: a ticker, a supply, a decimals setting. Once minted the balance
shows up in My Assets and can be sent, listed, or used as a
token_holder gate on a workflow step (2.18).
Inscriptions and media
| Kind | Notes |
|---|---|
| 🖼 Image | Any image file. Inscribed into the transaction itself, not linked from a server — which is the point. |
| 📝 Text | Plain UTF-8. |
| 🌐 HTML | A self-contained page. Renders wherever inscriptions render. |
| { } JSON | Structured data — metadata, attributes, anything machine-readable. |
| 📎 Other file | Anything else, with its content type carried along. |
Collections group inscriptions under one identity, with a collection page listing everything in it. Pick the collection at mint time and items land in it automatically; View in My Assets → takes you to what you just made.
The bytes you inscribe are in the blockchain permanently, publicly, and unedittably — mine it once and it is there for anyone to read forever. Check the file before you mint, particularly for anything with metadata you didn't intend to publish.
3.19Send, transfer and list for sale
From My Assets, three things you can do with something you hold.
| Action | What happens |
|---|---|
| Send | Transfers a token balance or an inscription to another address. Builds the transfer and queues it — the Outbox gate applies exactly as everywhere else. |
| Transfer a contract | Moves ownership of a contract instance where the contract supports it. The new owner's rights come from the contract's state, not from a database entry. |
| List for sale | Publishes an offer. The listing is itself an on-chain record on a market anchor, so it's discoverable by any client — including ones that aren't this one. |
Every one of these is a draft first. Nothing leaves your wallet without an approval, and the fee estimate is shown before you approve.
3.20Positions, swaps and settlements
A few contracts in the library are financial instruments rather than plain state machines, and they get purpose-built panels.
- 📊 My Positions — every live instance you're a party to, in one table: which contract, current state, your role. On My Assets and on the welcome screen. This is the "what am I currently exposed to" view.
- AMM swap — pick a pool and a direction and you get a live quote before committing. 🔮 Attest fetches the oracle signature the pool needs, then 🚀 Queue swap → Outbox builds the real transaction.
- Forwards settlement — a forward can only settle against an attested price. The settle button stays disabled until you've pulled that attestation, which is the contract's rule showing through the UI rather than a loading state.
Quotes are estimates until the transaction is mined; a pool's state can change between quoting and broadcasting. Nothing here is financial advice, and 1BitClaw has no ability to reverse a swap that went differently than you expected. Start small enough that being wrong is survivable.
3.21Contracts inside workflows
This is where the two halves meet, and it's the point of the whole system.
- Put a Contract node on the board
Either attach an existing instance by its txid, or let a
contract_deploystep create one as part of the process. - Add a Contract Call step that references it
Pick the method. Parameters can come from the wallet, from an earlier step's output, or be computed —
{{ctx.bidSats}}, "previous value plus 100", and so on. - Guard the transition with conditions The link into that step can carry conditions: contract state comparisons, block height, confirmation counts. The step stays blocked until they all pass.
- Let the actor be a contract role
Set the step's actor to
contract_roleand the person is resolved from the contract's live state at run time — the current bidder, the named arbiter, the owner.
That inspector is the debugging tool for this whole area. "Blocked" is never a mystery — it tells you the condition, the current value, and what it's waiting for.
3.22⚡ Batch — many calls, one transaction
Pro mode
When you need to call the same method on a lot of instances — settling forty positions, incrementing a hundred counters — Batch puts them in a single transaction instead of a hundred, which collapses the miner fee accordingly.
It only offers contract/method pairs that are batch-safe: the tool reads the registry of spend profiles and shows you only the ones whose state can be combined this way, marking which have a verified executor. A method that isn't safe to batch simply isn't in the list — the constraint is enforced, not advisory.
3.23Pro mode — source, disassembly, offline verify
for developers
Switching the shell to ⚡ Pro exposes the layer underneath the forms.
| Tool | Shows |
|---|---|
| 📋 source | The module or adapter's actual JavaScript, fetched from the chain — the code that's running, not a copy of it. Copyable and downloadable. |
| Disassembly | A contract's locking script as readable opcodes. The ground truth about what a contract will and won't permit. |
| 🔬 Offline verify | The browser half of contract-dev verify: builds a
synthetic instance from constructor and state JSON you supply, assembles the unlock through the same
interpreter the real pipeline uses, and validates the spend — entirely locally, nothing touching the chain.
Editable recipe, ctor args, initial state and method params. |
| Pro badges | Each module gets a floating badge with its on-chain txid, worker and relay status, and a link to its source. |
Offline verify is the fastest way to answer "would this spend actually validate" without spending anything, and it's the same answer the CLI gives — see 3.24.
3.24The contract-dev CLI
for developers
If you're writing contracts rather than using them, there's a command-line environment for the whole
cycle. Everything is dry-run unless you pass --broadcast, and the signing key only ever comes
from an environment variable — never a flag, never a file in the repo.
node contract-dev.mjs doctor # check your environment
node contract-dev.mjs lint MyContract # pre-compile rules, method classification
node contract-dev.mjs build MyContract # scryptc → artifact.json
node contract-dev.mjs gen MyContract # artifact → adapter
node contract-dev.mjs drift --check # catch adapters that drifted from their artifact
node contract-dev.mjs verify MyContract
node contract-dev.mjs deploy MyContract # add --broadcast to actually spend
node contract-dev.mjs call MyContract methodName
node contract-dev.mjs status
drift --check is the one to wire into CI: it catches adapters that no longer match their
compiled artifact, which is the failure mode that produces contracts that look fine and don't work.
4.1On-chain record types
You'll see these prefixes on block explorers, in the Outbox's inspector, and in the Pro-mode badges. They are the actual wire format — knowing them is what lets you verify a claim on this page rather than believe it.
| Record | Written when | Anchored to |
|---|---|---|
MM_WF | A headless workflow is published. Carries the whole signed definition: steps, actors, policy, limits. | #WF, #wf_<id> |
WF_RUN | A runner moves a step to a new status. One breadcrumb per transition. | #WF, #wf_<id> |
WF_ASSIGN | A step is assigned to someone who isn't the owner. Self-contained — the actor can execute from this record alone. | #wf_<id>, the actor's
address |
WF_STEP | An assigned actor completes their step. | #wf_<id>, #WF |
MM_WF_TRIG | A trigger is published — spawn a new run per matching record. | #WF_TRIG |
WF_CTRL | Owner or admin controls a live run: pause, resume, kill, add. Signed, sent over the relay rather than written to chain. | — |
SC|D | A contract instance is deployed. | #SCRYPT and
per-contract anchors |
SC|I | An intent to call a contract method. | per-instance anchors |
SC|COND | An ⚡ auto-execute condition is published. | the condition anchor |
SC|R | A contract recipe — the deploy-form description for a published template. | #SCRYPT |
TK / TR | A task is published / somebody bids on it. | #TASKBOARD, #tk_<id> |
MM / EK | A MindMap board snapshot, public / encrypted. | #MINDMAP or a private derived anchor |
CD | Code — a module or contract adapter, chunked and gzipped. | topic-specific |
Take any step from a Run panel, click its ↗, and look at the transaction on a block explorer you chose. You'll see the OP_RETURN with the record above, and the 1-satoshi anchor outputs from 1.3. That's the whole system, visible from outside it. Everything else on this page is commentary on that.
4.2URLs and deep links
Every meaningful object has a link you can send someone. They resolve for anyone, signed in or not.
| URL | Goes to |
|---|---|
/mindmap/<boardId> | A board. Add /<nodeId> to select a
node. |
/mindmap/<boardId>?run=<wfId> | A board focused on one specific run — works even for a participant who never opened the board before. |
/contracts | The contract library. |
/wf-invite/… | An assigned step. This is the link participants get. |
/wf-mine | Every step currently assigned to you, across everyone's processes. |
/outbox | Your pending drafts. |
/wallet | Wallet setup, keys, balance. |
/e/<txid> | Any record, routed by type — a workflow record lands on its read-only proof page, a task on the taskboard, a contract on its instance view. |
/d/<name> | A registered on-chain name. |
/t/<tag> | Everything published under a hashtag. |
/e/<txid> is the one to remember: it takes any transaction id from this system and
sends it to the right screen. It's what you paste when someone asks "what is this transaction."
4.3Glossary
- Anchor
- A Bitcoin address derived from a topic name. Sending 1 satoshi to it files a record under that topic; listing its history is how anything is ever found. See 1.3.
- Actor / assignee
- The person a step is delegated to. Can be a fixed address, a quorum group, or a role resolved at run time.
- Board / node
- The visual editor (MindMap) and one box in it. A node becomes one step when compiled.
- Bundle
- A workflow compiled into your own Outbox rather than published for a runner. Stops when your browser tab does.
- Context (
ctx) - A run's shared memory — values extracted from earlier steps, form
inputs, computed results. Referenced as
{{ctx.name}}. - Draft
- A transaction that has been built and costed but not broadcast. Lives in your Outbox and costs nothing.
- Headless / MM_WF
- A workflow published on-chain to run unattended, executed by a runner instead of your clicks.
- Instance
- One live deployment of a contract — a specific UTXO carrying specific state, identified by the transaction that created it.
- Intent-only
- A contract method with no automatic transaction builder yet. 1BitClaw records that you meant to call it; you build the spend yourself.
- Keeper
- A service that watches published ⚡ conditions and executes the call when they turn true. See 3.11.
- Liveness coin
- A single satoshi a runner holds to declare itself alive. Spending it stops the role, from any device, within about a second.
- 0-conf
- Broadcast and verified, but not yet in a mined block. Always shown as a distinct badge rather than blurred into "done".
- Outbox
- Your queue of drafts awaiting approval. The single gate every spend passes through.
- Permissionless step
- A contract call nobody in particular needs to sign for — "claim after the deadline". These can run automatically.
- Participant-bound step
- A call that needs one specific person's signature. These always route to that person and never run on their behalf.
- Preset
- What a node does — 💸 Payment, ✅ Approval, ⛓ Contract Call, and so on. Presets compile down to step kinds.
- Recipe
- A published description of a contract's deploy form and methods, so other clients can render it without parsing the full artifact.
- Runner
- The service executing a headless workflow's eligible steps. Free, paid, or your own.
- sCrypt
- The language these contracts are written in. It compiles to Bitcoin Script, so contracts are enforced by miners rather than by a platform.
- SPV proof
- Verifying a confirmation with a merkle proof against independently-fetched block headers, instead of trusting an API's word. Optional, recommended for money.
- Step
- One entry in a compiled workflow: a record, a payment, a contract call, or a wait.
- Trigger
- A rule that spawns a new run of a workflow every time a matching record appears.
- WIF
- Wallet Import Format — the encoded form of a private key. In WIF mode the key lives in your browser; in extension mode it lives in the extension.
- wf-proof
- The read-only, independently verifiable summary of a run: what happened, who paid, what it cost.
4.4FAQ
- Do I need to understand Bitcoin to use this?
- No. You need a wallet with a small balance and the willingness to read a cost estimate before clicking. Everything else — anchors, UTXOs, script — is machinery you can ignore until you're curious.
- What does it cost?
- A miner fee per step, typically single digits to a few dozen satoshis, plus whatever value the step itself moves. No protocol fee, no percentage, no subscription. See 1.5.
- Can 1BitClaw take my money, freeze my process, or delete my data?
- No, no, and no. Your key signs your transactions; a published workflow's limits are signed on-chain and bound every runner; and records are in the blockchain, where nobody can retract them. The flip side is in 0.3 — lose your key and nobody can help you either.
- What happens if 1BitClaw disappears?
- Your records stay on the chain, readable by anyone with the formats in 4.1. Running workflows would stop when their runners stopped, but nothing already executed is lost, and nothing is locked to us. Self-hostable versions of the runner, indexer and relay ship in the repository.
- Does a workflow keep running when I close the tab?
- Only if it's headless. A bundle compiled to your Outbox waits for you. See 2.14.
- Can a runner spend more than I intended?
- No. The payout ceiling is signed into the workflow definition, and the effective cap is the lower of yours and the runner's own. Anything above it pauses for your manual approval instead of broadcasting.
- Someone sent me a link. Is it safe to open?
- Opening it is safe — it's a read-only page until you connect a wallet. It shows you what's being asked and what it costs before anything is signed, and it can't move funds you don't approve. Check the amount before tapping the button, exactly as you would anywhere else.
- Why is my step still "blocked"?
- Select the node and read the inspector: it lists each condition with its live result and each parameter with its source. "Blocked" always has a stated reason.
- Can I use my own contract?
- Yes — import a compiled
artifact.json(3.13), or publish it on-chain so others can use it too (3.15). - Is any of this reversible?
- Before you approve a draft: entirely. After it's broadcast: no. That's why the Outbox exists as a separate, deliberate step rather than a confirmation dialog you learn to dismiss.
- Is there an API?
- The chain is the API. Anchors are public, record formats are documented, and snapshots are served over plain HTTP. Anything the web app can read, your own code can read the same way.
Where to go next. Open MindMap and instantiate a template — the work-order one is the shortest path to understanding compile and run. Or open Contracts and deploy a Counter for a few hundred satoshis. Reading about this is much slower than doing one round of it.
Screens on this page are rendered from the application's own stylesheets with representative sample data; the real interface may differ in detail as it evolves. Everything here concerns Bitcoin SV mainnet — the transactions are real and the money is real.