Documentation Index
Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt
Use this file to discover all available pages before exploring further.
Bitmap Submission
Reveal what you committed to. Submit your prediction bitmap to the oracle node. The bitmap must match the keccak256 hash you sealed on-chain — the moment where commitment becomes confession.Submit Bitmap
POST /vision/bitmap
Submits a player’s prediction bitmap off-chain. The oracle verifies that:
- The player is registered in the specified batch.
keccak256(bitmap_bytes)matches theexpected_hash.- The
expected_hashmatches the player’s on-chain bitmap commitment.
The player’s Ethereum address (checksummed, with
0x prefix).The batch ID this bitmap is for. The player must have already joined this batch on-chain.
The raw prediction bitmap encoded as a hex string (with
0x prefix). Each bit represents a UP (1) or DOWN (0) prediction for the corresponding market in the batch. See Bitmap Encoding for the full format.The keccak256 hash of the bitmap bytes (
0x-prefixed, 66 characters). This must match the hash the player committed on-chain via joinBatch or updateBitmapHash.- cURL
- Python
- TypeScript
Response Fields
| Field | Type | Description |
|---|---|---|
accepted | boolean | Whether the bitmap was accepted and stored |
batch_id | number | The batch ID the bitmap was stored for |
player | string | The player’s Ethereum address |
Errors
| Status | Condition |
|---|---|
400 | Invalid player address, malformed bitmap hex, or invalid expected_hash format |
400 | expected_hash does not match the player’s on-chain commitment |
400 | keccak256(bitmap_bytes) does not match expected_hash |
404 | Player is not registered in the specified batch |
You must commit your bitmap hash on-chain before submitting the actual bitmap to this endpoint. The typical flow is:
- Encode your predictions into a bitmap (see Bitmap Encoding)
- Call
joinBatch(batchId, deposit, stakePerTick, keccak256(bitmap))on-chain - Submit the raw bitmap to
POST /vision/bitmap
updateBitmapHash(batchId, newHash) on-chain first, then resubmit.