How it works
Four states. One gate.
Scroll to move one request through the mechanism.
01 → 04
State · BLOCKED
01
Request
A request arrives for an action you defined. It has no access yet.
- Request
- Price
- Pay
- Action
Action states
Every action is in exactly one.
- 01DRAFTMissing a field. The gate stays shut.
- 02INVALIDSomething is wrong, like a bad price. The gate stays shut.
- 03PAYMENT REQUIREDValid and priced. The gate holds until payment.
- 04AVAILABLEValid and free. The gate opens on request.
- 05UNAVAILABLESwitched off by its owner. The gate stays shut.
For developers
One definition. One gate.
Today, actions are defined and gated in the browser. Settlement plugs in through a single adapter.
- 01RequestCaller opens /action/[id]
- 02PriceDefinition is validated and priced
- 03PayPaymentAdapter settles on Robinhood Chain
- 04ActionResource is released to the caller
Step 03 has no adapter configured yet. Nothing is charged.
lib/actions/types.ts
type ActionDefinition = {
id: string // "act_…" generated locally
name: string
description: string
type: 'API' | 'FILE' | 'COMPUTE' | 'GENERATION' | 'CUSTOM'
resource: string // endpoint, URI or identifier
price: string // decimal, in ETH
currency: 'ETH'
metadata: { key: string; value: string }[]
enabled: boolean
storage: 'local' // stored in this browser
}Try the gate.
Create an action