Skip to main content
Batch creation is the treasury-grade version of the shared stream builder. It lets you prepare many stream rows, review per-row schedule charts, and fund the full run with a single BCH transaction.

What Batch Creation Supports

  • up to 100 rows in one batch run
  • shared lane defaults for a payroll or vesting lane
  • per-row overrides for template, dates, duration, cadence, cliff, and tranche geometry
  • always-visible row schedule charts
  • CSV import and export
  • one funding transaction for the batch run

Flow in the App

1

Open batch create

Launch from Streams -> Batch Create or from a treasury / vault stream workspace.
2

Choose a lane template

Pick the shared schedule family or template for the batch. This becomes the default for rows that inherit the lane.
3

Build the roster

Add recipients manually or import a CSV. Each row can override the shared lane.
4

Review row-level previews

Every row shows a resolved schedule chart. This reflects the actual row after inherited defaults and row overrides are applied.
5

Create the pending batch

The app calls POST /api/treasuries/:vaultId/batch-create. FlowGuard creates pending stream records for the full roster and returns one funding transaction.
6

Sign once to fund the run

Sign the returned wcTransaction. After the funding transaction confirms, the app calls POST /api/treasuries/:vaultId/batch-create/confirm.

Current On-Chain Behavior

The treasury batch builder prepares multiple pending streams and returns one funding transaction for the run.
Each stream still becomes its own covenant state on-chain. The batch UX is about orchestrating many stream deployments and funding them from one treasury action.

Example Request

{
  "senderAddress": "bchtest:q...",
  "tokenType": "BCH",
  "entries": [
    {
      "recipient": "bchtest:q...",
      "totalAmount": 3,
      "streamType": "RECURRING",
      "startTime": 1761955200,
      "endTime": 1777507200,
      "intervalSeconds": 2592000,
      "refillable": true,
      "scheduleTemplate": "recurring-open-monthly"
    },
    {
      "recipient": "bchtest:q...",
      "totalAmount": 12,
      "streamType": "TRANCHE",
      "startTime": 1761955200,
      "endTime": 1793491200,
      "scheduleTemplate": "tranche-performance-ladder",
      "trancheSchedule": [
        { "unlockTime": 1764547200, "cumulativeAmount": 1 },
        { "unlockTime": 1769817600, "cumulativeAmount": 3 },
        { "unlockTime": 1775088000, "cumulativeAmount": 6 },
        { "unlockTime": 1793491200, "cumulativeAmount": 12 }
      ]
    }
  ]
}

CSV Notes

The current batch builder supports CSV fields for:
  • recipient
  • amount
  • template
  • start date
  • duration
  • cadence
  • cliff
  • tranche offsets
  • tranche weights
Use export from the builder if you want a CSV that can be re-imported without guessing the current field names.