> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darkpool.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Market & Seal Scripts

> register-market, create-seal-policy.

## `register-market`

Register a `MarketLink` in the shared `MarketRegistry`. Two kinds:

```bash theme={"system"}
# Price-oracle market
pnpm market:register --kind price \
  --question "Will BTC close above \$100k on Jun 30, 2026?" \
  --oracle-svi 0x... \
  --expiry 1719792000000 \
  --category crypto \
  --execute

# Optimistic-oracle market (sports / politics / geopolitics)
pnpm market:register --kind oo \
  --question "Will a European team win the 2026 World Cup?" \
  --event-end-ms 1721433600000 \
  --category sports \
  --execute
```

**Flags**

| Flag                          | Required  | Description                                                    |
| ----------------------------- | --------- | -------------------------------------------------------------- |
| `--kind`                      | yes       | `price` or `oo`                                                |
| `--question`                  | yes       | Human-readable text                                            |
| `--category`                  | yes       | `crypto` \| `sports` \| `politics` \| `geopolitics` \| `macro` |
| `--oracle-svi`                | for price | Predict OracleSVI id                                           |
| `--expiry` / `--event-end-ms` | yes       | Unix ms timestamp                                              |
| `--spec-blob-id`              | no        | Walrus blob id of long-form rules (default: empty)             |
| `--spec-hash`                 | no        | blake2b hash of spec blob (default: zeros)                     |
| `--execute`                   | no        | Sign + submit                                                  |

Captures the `MarketLink` id from `objectChanges` and suggests the `.env` key (`BTC_MARKET_LINK_ID` for price, `SPORTS_OO_MARKET_LINK_ID` for OO).

## `create-seal-policy`

Creates + shares a fresh `seal_policy::AccessPolicy` on the current package. `dark_pool::deposit` takes `&AccessPolicy` of the deployed package's type, so every republish needs a fresh one.

```bash theme={"system"}
pnpm tsx scripts/create-seal-policy.ts --execute
```

Paste the id into both:

* `.env`: `AGENT_SEAL_POLICY_ID=0x…`
* `packages/frontend/src/lib/env.ts`: `DEFAULT_SEAL_POLICY_ID = '0x…'`

The vault deposit PTB always passes this policy as an opaque argument.
