{"asyncapi":"3.0.0","info":{"title":"Wagyu Consumer Realtime API","version":"v2","description":"Public WebSocket contract for current order snapshots. REST order reads remain the durable source of truth."},"defaultContentType":"application/json","channels":{"swapOrder":{"address":"/v2/swaps/{id}/events","title":"Receive full snapshots for one swap order","description":"The server sends complete current-order snapshots matching `/v2/swaps/:id`. It sends one after a successful connection, after order changes, and periodically; frames can be repeated or coalesced. There are no client-to-server application messages. Reconnects and missed frames must be followed by an authorized REST read. Missing, unauthorized, and nonexistent orders all close with opaque code 4404.","parameters":{"id":{"description":"Durable order identifier. An order ID alone does not authorize this connection.","schema":{"type":"string"}}},"messages":{"swapOrderSnapshot":{"name":"swapOrderSnapshot","title":"Receive full snapshots for one swap order","contentType":"application/json","payload":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"swap"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"type":"string"},"depositAddress":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"depositChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"depositAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"toChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"sourceDepositAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"observedDepositTxHash":{"type":"string"},"observedDepositAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"coinflip":{"anyOf":[{"type":"object","properties":{"eligible":{"type":"boolean"},"accepted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"seedHash":{"type":"string"},"clientSeed":{"type":"string"},"assetSymbol":{"type":"string"},"assetKey":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"result":{"type":"number"},"won":{"type":"boolean"},"serverSeed":{"type":"string"},"resolvedAt":{"type":"string"},"side":{"anyOf":[{"type":"string","enum":["cow","milk"]},{"type":"null"}]},"currentRound":{"type":"number"},"currentMultiplier":{"type":"number"},"finalMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"finalWon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rounds":{"type":"array","items":{"type":"object","properties":{"round":{"type":"number"},"serverSeed":{"type":"string"},"serverSeedHash":{"type":"string"},"clientSeed":{"type":"string"},"side":{"type":"string","enum":["cow","milk"]},"result":{"type":"number"},"won":{"type":"boolean"},"resolvedAt":{"type":"string"}},"required":["round"],"additionalProperties":false}},"policy":{"type":"object","properties":{"edgePercent":{"type":"number"},"milkWinBelow":{"type":"number"},"cowWinAbove":{"type":"number"},"winChancePercent":{"type":"number"},"maxWalletFractionPercent":{"type":"number"}},"required":["edgePercent","milkWinBelow","cowWinAbove","winChancePercent"],"additionalProperties":false},"decisionDeadline":{"type":"string"}},"required":["eligible","accepted","seedHash","clientSeed"],"additionalProperties":false},{"type":"null"}]},"twap":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","const":true},"status":{"type":"string","enum":["running","completed","failed"]},"side":{"type":"string","enum":["buy","sell"]},"filledPercent":{"type":"number"},"chunksCompleted":{"type":"number"},"chunksTotal":{"type":"number"},"estimatedTimeRemainingMs":{"type":"number"},"estimatedTimeRemaining":{"type":"string"},"startedAt":{"type":"string"},"expectedCompleteAt":{"type":"string"},"completedAt":{"type":"string"}},"required":["enabled","status","filledPercent","chunksCompleted","chunksTotal","startedAt"],"additionalProperties":false},{"type":"null"}]},"route":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string"},"tool":{"type":"string"},"txHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"toChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"status":{"type":"string","enum":["pending","done","refunded","failed","partial","unavailable"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["provider","tool","txHash","toChainId","status","statusMessage"],"additionalProperties":false},{"type":"null"}]},"routing":{"type":"object","properties":{"topology":{"type":"string","enum":["single","parallel"]},"branchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["preparing","executing","recovering","settled","attention","unavailable"]},"status":{"type":"string","enum":["pending","done","partial","failed","unavailable"]},"branches":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"attention":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","pending","attention"],"additionalProperties":false},"routes":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"tool":{"type":"string","minLength":1},"txHash":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"attempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["pending","done","refunded","failed","partial","unavailable"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["provider","tool","txHash","fromChainId","toChainId","attempt","status","statusMessage"],"additionalProperties":false}}},"required":["topology","branchCount","phase","status","branches","routes"],"additionalProperties":false},"hlFills":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":66,"maxLength":66,"pattern":"^0x(?!0{64}$)[0-9a-fA-F]{64}$"},"time":{"type":"integer","minimum":0,"maximum":9007199254740991},"side":{"type":"string","enum":["Buy","Sell"]},"price":{"type":"number","exclusiveMinimum":0},"size":{"type":"number","exclusiveMinimum":0},"value":{"type":"number","minimum":0},"fee":{"type":"number"},"feeToken":{"type":"string","minLength":1},"twapId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["time","side","price","size","value","fee","feeToken"],"additionalProperties":false}},{"type":"null"}]}},"required":["orderId","product","status","chainId","toAddress","depositAddress","createdAt","updatedAt","fromChainId","depositChainId","fromToken","depositToken","fromTokenSymbol","depositTokenSymbol","fromTokenDecimals","depositTokenDecimals","fromAmount","depositAmount","toChainId","toToken","toTokenSymbol","toTokenDecimals","customerState","errorMessage","coinflipLost","hasReview"],"additionalProperties":false}}}},"bridgeOrder":{"address":"/v2/bridges/{id}/events","title":"Receive full snapshots for one native bridge order","description":"The server sends complete current-order snapshots matching `/v2/bridges/:id`. It sends one after a successful connection, after order changes, and periodically; frames can be repeated or coalesced. There are no client-to-server application messages. Reconnects and missed frames must be followed by an authorized REST read. Missing, unauthorized, and nonexistent orders all close with opaque code 4404.","parameters":{"id":{"description":"Durable order identifier. An order ID alone does not authorize this connection.","schema":{"type":"string"}}},"messages":{"bridgeOrderSnapshot":{"name":"bridgeOrderSnapshot","title":"Receive full snapshots for one native bridge order","contentType":"application/json","payload":{"$schema":"http://json-schema.org/draft-07/schema#","oneOf":[{"type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"bridge"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","const":"deposit"},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"depositChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string"},"depositAmount":{"type":"string"},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"destination":{"type":"string"},"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"txIn":{"anyOf":[{"type":"string"},{"type":"null"}]},"txOut":{"anyOf":[{"type":"string"},{"type":"null"}]},"txid":{"anyOf":[{"type":"string"},{"type":"null"}]},"bridgeSettlement":{"anyOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"input":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"output":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"fee":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36},"percent":{"type":"number"},"amountUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["asset","amountAtomic","decimals","percent","amountUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["direction","input","output","fee"],"additionalProperties":false},{"type":"null"}]},"receivedXmr":{"anyOf":[{"type":"number"},{"type":"null"}]},"delivered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"depositAddress":{"type":"string"}},"required":["orderId","product","status","asset","direction","chainId","toAddress","createdAt","updatedAt","customerState","errorMessage","coinflipLost","hasReview","destination","depositAddress"],"additionalProperties":false},{"type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"bridge"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","const":"withdraw"},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"depositChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string"},"depositAmount":{"type":"string"},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"destination":{"type":"string"},"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"txIn":{"anyOf":[{"type":"string"},{"type":"null"}]},"txOut":{"anyOf":[{"type":"string"},{"type":"null"}]},"txid":{"anyOf":[{"type":"string"},{"type":"null"}]},"bridgeSettlement":{"anyOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"input":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"output":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"fee":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36},"percent":{"type":"number"},"amountUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["asset","amountAtomic","decimals","percent","amountUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["direction","input","output","fee"],"additionalProperties":false},{"type":"null"}]},"receivedXmr":{"anyOf":[{"type":"number"},{"type":"null"}]},"delivered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"xmr1DepositAddress":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orderId","product","status","asset","direction","chainId","toAddress","createdAt","updatedAt","customerState","errorMessage","coinflipLost","hasReview","destination","xmr1DepositAddress"],"additionalProperties":false}]}}}},"orders":{"address":"/v2/orders/events","title":"Subscribe to live snapshots for owned orders","description":"Send a subscribe message for each order to follow; each message carries that order’s owner session. The server immediately sends a complete current-order snapshot, then sends complete snapshots after order changes and periodically. Send unsubscribe when an order is no longer needed. Server frames contain only the complete order object, with no wrapper.","messages":{"orderSubscription":{"name":"orderSubscription","title":"Subscribe or unsubscribe from owned order snapshots","contentType":"application/json","payload":{"$schema":"http://json-schema.org/draft-07/schema#","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"subscribe"},"orderId":{"type":"string","pattern":"^[A-Za-z0-9:_-]{1,128}$","description":"Public order identifier. Not a credential: every read still requires the owner session or the destination proof."},"sessionId":{"type":"string","pattern":"^[0-9a-f-]{16,64}$","description":"16–64 character hexadecimal/hyphen owner-session credential."}},"required":["type","orderId","sessionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"unsubscribe"},"orderId":{"type":"string","pattern":"^[A-Za-z0-9:_-]{1,128}$","description":"Public order identifier. Not a credential: every read still requires the owner session or the destination proof."}},"required":["type","orderId"],"additionalProperties":false}]}},"orderSnapshot":{"name":"orderSnapshot","title":"Complete order snapshot","contentType":"application/json","payload":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"swap"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"type":"string"},"depositAddress":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"depositChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"depositAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"toChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"sourceDepositAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"observedDepositTxHash":{"type":"string"},"observedDepositAmount":{"type":"string","pattern":"^0*[1-9][0-9]*$","description":"Positive base-10 integer in the asset’s atomic unit."},"coinflip":{"anyOf":[{"type":"object","properties":{"eligible":{"type":"boolean"},"accepted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"seedHash":{"type":"string"},"clientSeed":{"type":"string"},"assetSymbol":{"type":"string"},"assetKey":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"result":{"type":"number"},"won":{"type":"boolean"},"serverSeed":{"type":"string"},"resolvedAt":{"type":"string"},"side":{"anyOf":[{"type":"string","enum":["cow","milk"]},{"type":"null"}]},"currentRound":{"type":"number"},"currentMultiplier":{"type":"number"},"finalMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"finalWon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rounds":{"type":"array","items":{"type":"object","properties":{"round":{"type":"number"},"serverSeed":{"type":"string"},"serverSeedHash":{"type":"string"},"clientSeed":{"type":"string"},"side":{"type":"string","enum":["cow","milk"]},"result":{"type":"number"},"won":{"type":"boolean"},"resolvedAt":{"type":"string"}},"required":["round"],"additionalProperties":false}},"policy":{"type":"object","properties":{"edgePercent":{"type":"number"},"milkWinBelow":{"type":"number"},"cowWinAbove":{"type":"number"},"winChancePercent":{"type":"number"},"maxWalletFractionPercent":{"type":"number"}},"required":["edgePercent","milkWinBelow","cowWinAbove","winChancePercent"],"additionalProperties":false},"decisionDeadline":{"type":"string"}},"required":["eligible","accepted","seedHash","clientSeed"],"additionalProperties":false},{"type":"null"}]},"twap":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","const":true},"status":{"type":"string","enum":["running","completed","failed"]},"side":{"type":"string","enum":["buy","sell"]},"filledPercent":{"type":"number"},"chunksCompleted":{"type":"number"},"chunksTotal":{"type":"number"},"estimatedTimeRemainingMs":{"type":"number"},"estimatedTimeRemaining":{"type":"string"},"startedAt":{"type":"string"},"expectedCompleteAt":{"type":"string"},"completedAt":{"type":"string"}},"required":["enabled","status","filledPercent","chunksCompleted","chunksTotal","startedAt"],"additionalProperties":false},{"type":"null"}]},"route":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string"},"tool":{"type":"string"},"txHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"toChainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"status":{"type":"string","enum":["pending","done","refunded","failed","partial","unavailable"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["provider","tool","txHash","toChainId","status","statusMessage"],"additionalProperties":false},{"type":"null"}]},"routing":{"type":"object","properties":{"topology":{"type":"string","enum":["single","parallel"]},"branchCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"phase":{"type":"string","enum":["preparing","executing","recovering","settled","attention","unavailable"]},"status":{"type":"string","enum":["pending","done","partial","failed","unavailable"]},"branches":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"attention":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","pending","attention"],"additionalProperties":false},"routes":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"tool":{"type":"string","minLength":1},"txHash":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"attempt":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["pending","done","refunded","failed","partial","unavailable"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["provider","tool","txHash","fromChainId","toChainId","attempt","status","statusMessage"],"additionalProperties":false}}},"required":["topology","branchCount","phase","status","branches","routes"],"additionalProperties":false},"hlFills":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":66,"maxLength":66,"pattern":"^0x(?!0{64}$)[0-9a-fA-F]{64}$"},"time":{"type":"integer","minimum":0,"maximum":9007199254740991},"side":{"type":"string","enum":["Buy","Sell"]},"price":{"type":"number","exclusiveMinimum":0},"size":{"type":"number","exclusiveMinimum":0},"value":{"type":"number","minimum":0},"fee":{"type":"number"},"feeToken":{"type":"string","minLength":1},"twapId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["time","side","price","size","value","fee","feeToken"],"additionalProperties":false}},{"type":"null"}]}},"required":["orderId","product","status","chainId","toAddress","depositAddress","createdAt","updatedAt","fromChainId","depositChainId","fromToken","depositToken","fromTokenSymbol","depositTokenSymbol","fromTokenDecimals","depositTokenDecimals","fromAmount","depositAmount","toChainId","toToken","toTokenSymbol","toTokenDecimals","customerState","errorMessage","coinflipLost","hasReview"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"bridge"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","const":"deposit"},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"depositChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string"},"depositAmount":{"type":"string"},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"destination":{"type":"string"},"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"txIn":{"anyOf":[{"type":"string"},{"type":"null"}]},"txOut":{"anyOf":[{"type":"string"},{"type":"null"}]},"txid":{"anyOf":[{"type":"string"},{"type":"null"}]},"bridgeSettlement":{"anyOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"input":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"output":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"fee":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36},"percent":{"type":"number"},"amountUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["asset","amountAtomic","decimals","percent","amountUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["direction","input","output","fee"],"additionalProperties":false},{"type":"null"}]},"receivedXmr":{"anyOf":[{"type":"number"},{"type":"null"}]},"delivered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"depositAddress":{"type":"string"}},"required":["orderId","product","status","asset","direction","chainId","toAddress","createdAt","updatedAt","customerState","errorMessage","coinflipLost","hasReview","destination","depositAddress"],"additionalProperties":false},{"type":"object","properties":{"orderId":{"type":"string"},"product":{"type":"string","const":"bridge"},"status":{"type":"string","enum":["awaiting_deposit","awaiting_xmr1","awaiting_trx1","processing","completed","failed","expired","refunded","needs_review"]},"asset":{"type":"string","enum":["xmr","trx"],"description":"Registered native-bridge asset key, never a display symbol."},"direction":{"type":"string","const":"withdraw"},"chainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"depositChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"fromToken":{"type":"string"},"depositToken":{"type":"string"},"fromTokenSymbol":{"type":"string"},"depositTokenSymbol":{"type":"string"},"fromTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"depositTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"fromAmount":{"type":"string"},"depositAmount":{"type":"string"},"toChainId":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},{"type":"null"}]},"toToken":{"type":"string"},"toTokenSymbol":{"type":"string"},"toTokenDecimals":{"type":"integer","minimum":0,"maximum":36},"expectedOutput":{"type":"string"},"depositTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivingTxHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"refundRequestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"amountUsd":{"type":"number"},"bonusStage":{"type":"string","enum":["none","coinflip"]},"coinflipRequested":{"type":"boolean"},"fundingProvider":{"anyOf":[{"type":"string","enum":["privy"]},{"type":"null"}]},"integratorFeeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"customerState":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"awaiting_deposit"},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"below_expected"}},"required":["kind"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"processing"},"stage":{"type":"string","enum":["processing","confirming","routing","trading","sending","refunding"]},"notice":{"type":"object","properties":{"kind":{"type":"string","const":"checking"}},"required":["kind"],"additionalProperties":false}},"required":["kind","stage"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"action_required"},"action":{"type":"string","enum":["coinflip","refund_address","payout_address"]}},"required":["kind","action"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paused"},"reason":{"type":"string","enum":["preparing_refund","below_minimum"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"completed"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"refunded"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"expired"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"}},"required":["kind"],"additionalProperties":false}],"description":"Authoritative customer display/action state. Clients must not infer lifecycle from status or resource presence."},"confirmations":{"type":"number"},"requiredConfirmations":{"type":"number"},"depositObserved":{"type":"boolean"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualOutput":{"type":"string"},"coinflipLost":{"type":"boolean"},"hasReview":{"type":"boolean"},"refundRecovery":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wrong_chain"},"phase":{"type":"string","enum":["address_required","requested","in_progress"]},"chainId":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Non-negative integer chain identifier."},"asset":{"type":"object","properties":{"type":{"type":"string","enum":["native","erc20"]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"type":"string"},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]}},"required":["type","token","symbol","decimals"],"additionalProperties":false},"amountAtomic":{"type":"string"},"requestedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","phase","chainId","asset","amountAtomic","requestedAt"],"additionalProperties":false},{"type":"null"}]},"rewards":{"type":"object","properties":{"status":{"type":"string","enum":["pending","earned","not_eligible"]},"wagyuEarned":{"type":"number"},"wagyuBonusEarned":{"type":"number"},"wagyuCompensation":{"type":"number","minimum":0},"wagyuTotalEarned":{"type":"number"},"policyKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","wagyuEarned","wagyuBonusEarned","wagyuTotalEarned","policyKey"],"additionalProperties":false},"destination":{"type":"string"},"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"txIn":{"anyOf":[{"type":"string"},{"type":"null"}]},"txOut":{"anyOf":[{"type":"string"},{"type":"null"}]},"txid":{"anyOf":[{"type":"string"},{"type":"null"}]},"bridgeSettlement":{"anyOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["deposit","withdraw"],"description":"deposit mints the wrapped asset from a native-coin deposit; withdraw returns the native coin against the wrapped asset."},"input":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"output":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36}},"required":["asset","amountAtomic","decimals"],"additionalProperties":false},{"type":"null"}]},"fee":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string"},"amountAtomic":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":36},"percent":{"type":"number"},"amountUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["asset","amountAtomic","decimals","percent","amountUsd"],"additionalProperties":false},{"type":"null"}]}},"required":["direction","input","output","fee"],"additionalProperties":false},{"type":"null"}]},"receivedXmr":{"anyOf":[{"type":"number"},{"type":"null"}]},"delivered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"xmr1DepositAddress":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orderId","product","status","asset","direction","chainId","toAddress","createdAt","updatedAt","customerState","errorMessage","coinflipLost","hasReview","destination","xmr1DepositAddress"],"additionalProperties":false}]}]}}}}},"operations":{"receiveSwapOrderSnapshots":{"action":"receive","summary":"Receive full snapshots for one swap order","description":"The server sends complete current-order snapshots matching `/v2/swaps/:id`. It sends one after a successful connection, after order changes, and periodically; frames can be repeated or coalesced. There are no client-to-server application messages. Reconnects and missed frames must be followed by an authorized REST read. Missing, unauthorized, and nonexistent orders all close with opaque code 4404.","channel":{"$ref":"#/channels/swapOrder"},"messages":[{"$ref":"#/channels/swapOrder/messages/swapOrderSnapshot"}],"security":[{"orderSession":[]},{"destinationProof":[]}]},"receiveBridgeOrderSnapshots":{"action":"receive","summary":"Receive full snapshots for one native bridge order","description":"The server sends complete current-order snapshots matching `/v2/bridges/:id`. It sends one after a successful connection, after order changes, and periodically; frames can be repeated or coalesced. There are no client-to-server application messages. Reconnects and missed frames must be followed by an authorized REST read. Missing, unauthorized, and nonexistent orders all close with opaque code 4404.","channel":{"$ref":"#/channels/bridgeOrder"},"messages":[{"$ref":"#/channels/bridgeOrder/messages/bridgeOrderSnapshot"}],"security":[{"orderSession":[]},{"destinationProof":[]}]},"subscribeToOrders":{"action":"send","summary":"Subscribe to live snapshots for owned orders","description":"Send a subscribe message for each order to follow; each message carries that order’s owner session. The server immediately sends a complete current-order snapshot, then sends complete snapshots after order changes and periodically. Send unsubscribe when an order is no longer needed. Server frames contain only the complete order object, with no wrapper.","channel":{"$ref":"#/channels/orders"},"messages":[{"$ref":"#/channels/orders/messages/orderSubscription"}],"security":[{"orderSession":[]}]},"receiveOrderSnapshots":{"action":"receive","summary":"Subscribe to live snapshots for owned orders","description":"Send a subscribe message for each order to follow; each message carries that order’s owner session. The server immediately sends a complete current-order snapshot, then sends complete snapshots after order changes and periodically. Send unsubscribe when an order is no longer needed. Server frames contain only the complete order object, with no wrapper.","channel":{"$ref":"#/channels/orders"},"messages":[{"$ref":"#/channels/orders/messages/orderSnapshot"}],"security":[{"orderSession":[]}]}},"components":{"securitySchemes":{"orderSession":{"type":"httpApiKey","in":"header","name":"x-session-id","description":"Owner credential returned at order creation. Use only in a header, never in a URL."},"destinationProof":{"type":"httpApiKey","in":"query","name":"verify","description":"Read-only proof: the exact order destination address. Browser WebSockets use this proof."}}},"x-wagyu-close-codes":{"4404":"Missing, unauthorized, and nonexistent orders are intentionally indistinguishable."}}