1. Open a branch workspace

vadyl branch create feature/charge-flow
vadyl workspace open --branch feature/charge-flow

{
  "workspaceId": "ws_123",
  "branch": "feature/charge-flow"
}

2. Add source

vadyl source folder create src/handlers/orders
vadyl source file put src/handlers/orders/charge.ts --content @charge.ts

3. Use generated types

Monaco and local editors receive declarations from /api/ContractProjection/typescript/declarations. The same contract powers the runtime SDK and external TypeScript SDK.

4. Build and invoke in sandbox

vadyl build preview --unit orders.charge
vadyl sandbox create --branch feature/charge-flow
vadyl authored-runtime sandbox publish sbox_123 --unit orders.charge
vadyl authored-runtime sandbox invoke sbox_123 --handler orders.charge --input '{"orderId":"ord_123"}'

{
  "ok": true,
  "chargeId": "ch_123"
}

5. Commit and deploy

vadyl workspace stage ws_123 src/handlers/orders/charge.ts
vadyl workspace commit ws_123 --message "Charge orders through governed connection"
vadyl proposal open --base main --head feature/charge-flow --title "Add charge flow"
vadyl deploy apply --target production --ramp 5%,25%,50%,100% --bake 10m