Skip to main content
Every FlowGuard covenant — vesting, recurring payment, airdrop, grant, bounty, reward — follows the same status lifecycle and flags bitmap. This consistency means the same indexer, explorer, and frontend can handle all products uniformly.

Status Transitions

Status Values

StatusByteDescription
ACTIVE0x00Normal operating state. All function paths available.
PAUSED0x01Frozen by authority. Claims and payments blocked.
CANCELLED0x02Terminated early. Remaining funds returned to sender/authority.
COMPLETED0x03All obligations fulfilled. UTXO consumed, no NFT output produced.

Flags Bitmap

The flags byte at position [1] of every NFT commitment is a bitfield:
BitHexNameEffect
00x01FLAG_CANCELABLESender/authority may call cancel()
10x02FLAG_TRANSFERABLERecipient may call transfer() to reassign
20x04FLAG_USES_TOKENSCovenant holds CashToken FTs, not BCH

Examples

0x05 = 0b00000101 = FLAG_CANCELABLE + FLAG_USES_TOKENS
       Cancelable CashToken stream

0x07 = 0b00000111 = FLAG_CANCELABLE + FLAG_TRANSFERABLE + FLAG_USES_TOKENS
       Cancelable, transferable CashToken vesting stream

0x00 = Non-cancelable BCH payment (irrevocable)

Terminal State Behavior

When a covenant reaches COMPLETED or CANCELLED:
  • The input NFT UTXO is consumed by the spending transaction
  • No replacement NFT output is created — the covenant ends
  • The indexer marks the record as terminated
  • The explorer shows final state with the completion transaction hash
Terminal state transactions do not include a covenant UTXO output. This is how both the indexer and the explorer detect that a covenant has ended.

Pause and Resume

Pausing does not discard accumulated state. For vesting covenants, pausing records pause_start and resuming advances the cursor by the elapsed pause duration — so paused time is excluded from the vesting calculation. For recurring payments, resuming resets next_payment_timestamp to now + intervalSeconds, so no backdated intervals are paid for the pause period.