maxRewardAmount and capped by totalPool. Each campaign is tagged with a category - ACHIEVEMENT, REFERRAL, LOYALTY, or CUSTOM - so frontends can lane them under the right surface.
The covenant runs on Bitcoin Cash (chipnet) and uses CashScript. Each distribution is co-signed by the backend claim authority before the creator’s wallet broadcasts the transaction.
All routes live under /api.
List campaigns
Query parameters
| Param | Type | Notes |
|---|---|---|
creator | string | required, cash address of the creator |
showDeprecated | boolean | optional, include soft-deleted campaigns when true |
Response
Get campaign
Response
Create campaign
Body
Body fields
| Field | Type | Notes |
|---|---|---|
title | string | required |
description | string | optional |
rewardCategory | string | one of ACHIEVEMENT, REFERRAL, LOYALTY, CUSTOM, defaults CUSTOM |
tokenType | string | BCH or FUNGIBLE_TOKEN (alias CASHTOKENS accepted) |
tokenCategory | string | required when tokenType is FUNGIBLE_TOKEN |
totalPool | number | required, total campaign pool in display units, must be greater than 0 |
maxRewardAmount | number | required, cap per recipient, must be less than or equal to totalPool |
startDate | number | optional unix seconds, defaults to now |
endDate | number | optional unix seconds, 0 or omitted means open-ended |
vaultId | string | optional, links the campaign to a treasury vault |
Response
Funding info
Response (ready to fund)
Response (consolidation required)
Confirm funding
ACTIVE. The backend also checks that one of the transaction inputs was spent from the caller’s wallet (audit H-07).
Body
Response
409 with state: "pending" and retryable: true so the client can retry shortly.
Distribute
wcTransaction for the creator’s wallet to broadcast.
Body
Body fields
| Field | Type | Notes |
|---|---|---|
recipientAddress | string | required, recipient cash address (alias recipient accepted) |
amount | number | required, must be greater than 0 and less than or equal to maxRewardAmount (alias rewardAmount accepted) |
signerAddress | string | optional, must match the campaign creator when provided |
Response
- campaign
statusmust beACTIVE - per-recipient
amountmust not exceed the campaign’smaxRewardAmount distributed_total + amountmust not exceedtotalPool
Confirm distribution
distributed_count and distributed_total.
Body
Response
Pause
Response
Confirm pause
Body
status to PAUSED.
Cancel
ACTIVE or PAUSED can be cancelled.
Response
signerMatchesReturn is false, the response includes a warning field. The refund still goes to the constructor-bound authorityReturnAddress, not to the signer.
Confirm cancel
Body
FUNGIBLE_TOKEN campaigns) and sets the campaign status to CANCELLED.
Control surface
The creator-only control routes are:pauseconfirm-pausecancelconfirm-cancel

