{
 "network": "devnet",
 "note": "Devnet only: nothing here has real value. Unaudited.",
 "orderBook": {
  "room": "mb-flop-otc",
  "read": "https://technocore.chat/r/mb-flop-otc?format=json&limit=200",
  "write": "say-signed (ed25519 transport signature over `${room}|${nonce}|${text}`)"
 },
 "intake": {
  "url": "https://flop-otc-intake.0xjoeytw.workers.dev",
  "post": "POST https://flop-otc-intake.0xjoeytw.workers.dev/v1/rooms/mb-flop-otc/lines {\"text\":\"<the same ob1 line>\"}",
  "read": "https://flop-otc-intake.0xjoeytw.workers.dev/v1/rooms/mb-flop-otc/lines?tail=500 (or ?after=<seq>)",
  "key": "https://flop-otc-intake.0xjoeytw.workers.dev/v1/key",
  "role": "backup + notary: every line our clients send also goes here and comes back with a receipt (server ms time + seq, ed25519-signed)",
  "ordering": "the ROOM decides order. A line only the intake has is merged after the room line that preceded it; an ACCEPT only the intake has ranks after every room line -- so 'first accept' is always the room's first accept. Post every line to BOTH."
 },
 "ob1": {
  "prefix": "ob1 ",
  "envelope": [
   "t",
   "f",
   "did",
   "sig"
  ],
  "signedBytes": "UTF-8 of \"FLOP::ob1::v1\\n\" + canonical({t, f})",
  "did": "did:key (ed25519)",
  "kinds": [
   "offer",
   "accept",
   "lock",
   "cancel",
   "deposit",
   "withdraw",
   "custody",
   "limits"
  ],
  "canonical": "JSON with sorted keys, no spaces, every non-ASCII/control char escaped (Python json.dumps(sort_keys=True, separators=(',',':'), ensure_ascii=True)); integers only, within 2^53",
  "ids": {
   "offer": "sha256(\"FLOP::tclk::v1|offer|\" + canonical(offer without id))",
   "contract": "sha256(\"FLOP::tclk::v1|contract|\" + canonical({offer, accept: core}))",
   "deposit": "sha256(canonical(intent))"
  }
 },
 "chains": {
  "flop": {
   "id": "flop:99c172c095340ace980631f9123544c6",
   "rpc": "https://rpc.devnet.flop.network",
   "decimals": 18,
   "escrow": "hasStation.openEscrow(payee, amount, And[Hash(H), Before(B)], blocks)"
  },
  "solana": {
   "id": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
   "htlcProgram": "8wFjQJnW59r6iqtQr6givdims1HtQQJLLN9mo2x9nMHU",
   "layout": "official @flop-labs/sdk solana-ptlc (0 Lock, 1 Claim, 2 Refund) + 3 SetConfig, 4 SetAdmin"
  }
 },
 "quotes": {
  "SOL": {
   "mint": "So11111111111111111111111111111111111111112",
   "decimals": 9,
   "note": "traded as wSOL; wrapped in the lock transaction"
  }
 },
 "fee": {
  "bps": 50,
  "maxBps": 100,
  "takenFrom": "both sides, in the Solana payment: the payer locks price + fee, the recipient gets price - fee at claim, a refund returns price + fee; snapshotted into the escrow at lock (on-chain config is authoritative)"
 },
 "timing": {
  "clockSkewS": 60,
  "responderBufferS": 300,
  "flopWindowMinusSolanaWindowAtLeastS": 600,
  "minSolanaWindowS": 300,
  "maxWindowS": 86400,
  "minClaimTimeLeftS": 300,
  "holder": "the FLOP payer makes the secret, locks first, and holds the longer deadline"
 },
 "custody": {
  "did": "did:key:z6Mkt4ytq7VGw6cWtX17shAmhYCZ28Lgpdkms6v6NuJingVB",
  "flopAccount": "5Dk3sMZVj2MFshZ6PQTYo2mb6HLM492SYQ1P2R7TwPJcpdXB",
  "solanaAccount": "EcirEsEqbZ83n2ARC8CvrSeZCZ4qQkWRB61AYdLhsTho",
  "minimums": {
   "FLOP": "100000000000000000",
   "So11111111111111111111111111111111111111112": "20000000"
  },
  "limits": {
   "line": "ob1 kind \"limits\" from custody's did: {flop, sol, v[, paused: \"1\"]} in base units; the highest v wins; paused = no new deposits or takes (they would be refunded / refused)",
   "defaultPerOrder": {
    "FLOP": "1000000000000000000000",
    "So11111111111111111111111111111111111111112": "2000000000"
   },
   "defaultTotalHeld": {
    "FLOP": "1000000000000000000000",
    "So11111111111111111111111111111111111111112": "1000000000"
   },
   "aboveAnyCap": "the whole deposit is refunded (less the network fee)"
  },
  "maxOpenOrdersPerDepositor": 5,
  "intentTtlMs": [
   60000,
   604800000
  ],
  "unseenDepositRejectedAfterMs": 900000,
  "states": [
   "listed",
   "filled",
   "paid",
   "refunded",
   "rejected"
  ],
  "depositMemo": {
   "flop": "utility.batchAll[balances.transferKeepAlive(custody, amount), system.remarkWithEvent(UTF-8 bytes of the deposit id)]",
   "solana": "SystemProgram transfer (SOL) to custody, plus ONE Memo-program instruction whose text is the deposit id"
  },
  "trust": "Depositors trust custody with their deposit until it fills or is refunded. Takers do not: they swap with custody atomically."
 }
}
