Vitro
Read Vitro markets on Robinhood Chain and prepare unsigned transactions. Unaudited, capped launch.
我該用這個嗎
品質與安全性
發現項目(9)
- LOW在 list_markets 中
- LOW在 get_position 中
- LOW在 get_stats 中
- LOW在 get_health 中
- LOW在 prepare_mandate_create_position 中
- LOW在 prepare_mandate_withdraw_collateral 中
- LOW在 prepare_mandate_close_and_redeem 中
- LOW在 prepare_mandate_owner_withdraw_collateral 中
- LOW在 prepare_mandate_owner_withdraw_residual 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"vitro": {
"url": "https://vitro-agent.fly.dev/mcp"
}
}
}遠端端點
https://vitro-agent.fly.dev/mcpstreamable-http它能做什麼
工具清單
工具(30)
🟢list_markets(status)
All Vitro markets with status, expiry, caps, totals and price (from the Proof API).
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"open",
"awaiting-settlement",
"late-settlement",
"closing-out",
"redeemable"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_market(market)
One market in detail (Proof API) plus a live price and phase check from the chain.
輸入結構描述
{
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
}
},
"required": [
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_series(state, asset)
Current and past series with settlement round, price and who settled.
輸入結構描述
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"current",
"past"
]
},
"asset": {
"description": "Ticker, e.g. NVDA",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_series_settlement(market)
How a series settled (round id, price, path, caller), or which settlement window applies now and when the next opens.
輸入結構描述
{
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
}
},
"required": [
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_position(owner, market)
A wallet's position: indexed history from Proof plus live collateral, debt, residual, claimable and synth balance from the chain. Omit market for all markets.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
}
},
"required": [
"owner"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_events(type, market, account, fromBlock, toBlock, ...)
Indexed events (mints, repays, withdrawals, liquidations, settlements, redemptions, ...), filterable and paginated.
輸入結構描述
{
"type": "object",
"properties": {
"type": {
"description": "Comma-separated: mint, deposit, repay, withdrawal, fee, liquidation, settlement, closeout, redemption, residual, transfer, admin",
"type": "string"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"account": {
"type": "string"
},
"fromBlock": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"toBlock": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"type": "string"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_stats
TVL, fees to the treasury, liquidations and per-market use of caps.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_health
Proof indexer progress and lag versus the chain head.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢quote_position(market, collateral, mintTokens, mintValueUsdg, owner)
Fee, collateral ratio, liquidation price and headroom for depositing collateral and minting, with the contracts' exact math at the current oracle price. Warns when the price is stale or the market is closed. Read-only.
輸入結構描述
{
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"collateral": {
"type": "string",
"description": "Collateral to add, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"mintTokens": {
"type": "string",
"description": "Synth to mint, in synth tokens as a decimal string, e.g. \"0.0189\""
},
"mintValueUsdg": {
"type": "string",
"description": "Exposure to mint, converted to tokens at the current price, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"owner": {
"description": "Optional: include this wallet's existing position",
"type": "string"
}
},
"required": [
"market",
"collateral"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢explain_risk(market, owner, collateral, debtTokens)
Plain-language risk for a position: distance to liquidation, weekend gaps, expiry, settlement rules, USDG pause and freeze risk. Pass owner for a real position, or collateral and debtTokens for a hypothetical one.
輸入結構描述
{
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"collateral": {
"type": "string",
"description": "Hypothetical collateral, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"debtTokens": {
"type": "string",
"description": "Hypothetical debt, in synth tokens as a decimal string, e.g. \"0.0189\""
}
},
"required": [
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_create_position(owner, market, collateral, mintTokens)
Open or add to a position: USDG approval (if needed) and create(collateral, tokens). Enforces the 11 USDG minimum for a new position, both caps and a fresh price. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"collateral": {
"type": "string",
"description": "Collateral to deposit, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"mintTokens": {
"type": "string",
"description": "Synth to mint (\"0\" for collateral only), in synth tokens as a decimal string, e.g. \"0.0189\""
}
},
"required": [
"owner",
"market",
"collateral",
"mintTokens"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_deposit(owner, market, amount)
Add collateral to an existing position: approval (if needed) and deposit(amount). Checks both caps. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"amount": {
"type": "string",
"description": "Collateral to add, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
}
},
"required": [
"owner",
"market",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_repay(owner, market, tokens)
Burn synth from the wallet to reduce debt: repay(tokens). "all" repays the whole debt. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"tokens": {
"type": "string",
"description": "Synth to repay as a decimal string, or \"all\""
}
},
"required": [
"owner",
"market",
"tokens"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_withdraw(owner, market, amount)
Withdraw collateral: withdraw(amount). "max" withdraws the most the minimum ratio and 10 USDG floor allow. Needs a fresh price when the position has debt. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"amount": {
"type": "string",
"description": "USDG to withdraw as a decimal string, or \"max\""
}
},
"required": [
"owner",
"market",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_close_and_redeem(owner, market)
After settlement: withdrawResidual (closes the sponsor position and pays the residual), redeem the wallet's synth if redemption is open, or claim a top-up. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
}
},
"required": [
"owner",
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_settle(market, from)
After expiry: finds the first Chainlink round at or after expiry, encodes the proof as abi.encode(uint80 roundId) and picks the path that applies now: settle(proof) if that round landed within expiry + maxSettleLag; otherwise guardianSettle(proof) for the guardian Safe, or settleBackstop(proof) for anyone from expiry + maxSettleLag + 7 days. Refused before expiry, once settled, and until the round has printed. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"from": {
"description": "Optional: the address that will send it, used as the simulated sender. Ignored for guardianSettle, which is simulated from the guardian Safe.",
"type": "string"
}
},
"required": [
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_create(owner, salt)
Create a mandate account: a smart account that is itself a sponsor, so limits can bind a session key. Existing positions can't be moved into it. The owner can never change: there is no owner recovery. Unaudited. Refused while mandates aren't enabled on this server. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed."
},
"salt": {
"description": "Optional: a whole number or 32 bytes of hex, to create more than one account",
"type": "string"
}
},
"required": [
"owner"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_set_limits(account, totalCollateralCap, maxActionSize, approvalThreshold, minCollateralRatioPct, ...)
Set an account's limits and, optionally, the markets it may use with a cap for each. Refuses a minimum ratio at or below any market's own minimum. Binds session keys, not the owner. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"totalCollateralCap": {
"type": "string",
"description": "Total collateral across all markets, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"maxActionSize": {
"type": "string",
"description": "Largest single action. Nothing above this runs, approved or not, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"approvalThreshold": {
"type": "string",
"description": "Above this, the owner must approve the exact action, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"minCollateralRatioPct": {
"type": "string",
"description": "Minimum ratio after a risk-increasing action, as a percentage, e.g. \"250\""
},
"mintBudget": {
"type": "string",
"description": "Total value one session may mint over its life, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"marketCaps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"cap": {
"type": "string",
"description": "Cap for this market, or \"0\" to remove it, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
}
},
"required": [
"market",
"cap"
]
}
}
},
"required": [
"account",
"totalCollateralCap",
"maxActionSize",
"approvalThreshold",
"minCollateralRatioPct",
"mintBudget"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_grant_session(account, sessionKey, markets, validForSeconds, actions)
Let a session key act for the account, inside its limits, on the listed markets until it expires. Replacing a session restarts its mint budget. The key is never held by this server. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The key to allow (0x...)"
},
"markets": {
"type": "array",
"items": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"description": "Markets the key may use. Each needs a cap from prepare_mandate_set_limits"
},
"validForSeconds": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "How long the session lasts, from now"
},
"actions": {
"description": "Optional: narrow the actions. Default all nine",
"type": "array",
"items": {
"type": "string",
"enum": [
"create",
"deposit",
"mint",
"repay",
"withdraw",
"withdrawResidual",
"redeem",
"claim",
"settle"
]
}
}
},
"required": [
"account",
"sessionKey",
"markets",
"validForSeconds"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_revoke_session(account, sessionKey, all)
Stop one session key, or all of them with all: true. Takes effect in the next transaction. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"description": "The key to stop (0x...)",
"type": "string"
},
"all": {
"description": "Stop every session key",
"type": "boolean"
}
},
"required": [
"account"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_withdraw(account, amount, token)
Send idle tokens from the account to its owner, the only address the contract can send them to. Collateral in a position is not idle. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"amount": {
"type": "string",
"description": "Amount as a decimal string, or \"all\""
},
"token": {
"description": "Optional: token address. Default USDG",
"type": "string"
}
},
"required": [
"account",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_create_position(account, sessionKey, market, approval, approvalTtlSeconds, ...)
Open or add to the account's position: create(collateral, tokens) through the account, which sets its own allowance. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"collateral": {
"type": "string",
"description": "Collateral to deposit, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
},
"mintTokens": {
"type": "string",
"description": "Synth to mint (\"0\" for collateral only), in synth tokens as a decimal string, e.g. \"0.0189\""
}
},
"required": [
"account",
"sessionKey",
"market",
"collateral",
"mintTokens"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_deposit(account, sessionKey, market, approval, approvalTtlSeconds, ...)
Add collateral to the account's position. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"amount": {
"type": "string",
"description": "Collateral to add, in USDG as a decimal string, e.g. \"11\" or \"25.5\""
}
},
"required": [
"account",
"sessionKey",
"market",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_repay(account, sessionKey, market, approval, approvalTtlSeconds, ...)
Burn synth held by the account to reduce its debt. "all" repays the whole debt. Works while the price is stale. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"tokens": {
"type": "string",
"description": "Synth to repay as a decimal string, or \"all\""
}
},
"required": [
"account",
"sessionKey",
"market",
"tokens"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_withdraw_collateral(account, sessionKey, market, approval, approvalTtlSeconds, ...)
Move collateral from the position back to the account, never to any other address. "max" stops at the account's minimum ratio. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"amount": {
"type": "string",
"description": "USDG to withdraw as a decimal string, or \"max\""
}
},
"required": [
"account",
"sessionKey",
"market",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_close_and_redeem(account, sessionKey, market, approval, approvalTtlSeconds)
After settlement: withdrawResidual, redeem and claim, paid to the account. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"account",
"sessionKey",
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_settle(account, sessionKey, market, approval, approvalTtlSeconds)
After expiry: settle(proof) through the account, only while the first round landed inside the lag. Other settlement paths are not agent actions: use prepare_settle from an ordinary wallet. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"sessionKey": {
"type": "string",
"description": "The session key that will send it (0x...). Not held by this server"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"approval": {
"description": "Only above the approval threshold: the nonce and deadline from typedData, plus the owner's signature",
"type": "object",
"properties": {
"nonce": {
"type": "string"
},
"deadline": {
"type": "string"
},
"signature": {
"type": "string",
"description": "The owner's EIP-712 signature over typedData"
}
},
"required": [
"nonce",
"deadline",
"signature"
]
},
"approvalTtlSeconds": {
"description": "Optional: how long a new approval stays valid. Default 1 hour",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"account",
"sessionKey",
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_owner_repay(account, owner, market, tokens)
Burn synth held by the account to reduce its debt. "all" repays the whole debt. For the owner only: works with every session key revoked, ignores session limits, and still follows the market's rules. It prepares exactly this one market call and nothing else. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"owner": {
"type": "string",
"description": "The account's owner, who will send it (0x...). Refused for any other address"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"tokens": {
"type": "string",
"description": "Synth to repay as a decimal string, or \"all\""
}
},
"required": [
"account",
"owner",
"market",
"tokens"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_owner_withdraw_collateral(account, owner, market, amount)
Move collateral from the position to the account. "max" is the most the market allows. For the owner only: works with every session key revoked, ignores session limits, and still follows the market's rules. It prepares exactly this one market call and nothing else. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"owner": {
"type": "string",
"description": "The account's owner, who will send it (0x...). Refused for any other address"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
},
"amount": {
"type": "string",
"description": "USDG to withdraw as a decimal string, or \"max\""
}
},
"required": [
"account",
"owner",
"market",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢prepare_mandate_owner_withdraw_residual(account, owner, market)
After settlement: close the account's position and pay the residual to the account. For the owner only: works with every session key revoked, ignores session limits, and still follows the market's rules. It prepares exactly this one market call and nothing else. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.
輸入結構描述
{
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Mandate account address (0x...)"
},
"owner": {
"type": "string",
"description": "The account's owner, who will send it (0x...). Refused for any other address"
},
"market": {
"type": "string",
"description": "Market address (0x...) or symbol, e.g. NO-NVDA"
}
},
"required": [
"account",
"owner",
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}社群
證據