|
120 | 120 | } |
121 | 121 | } |
122 | 122 | }, |
| 123 | + "/api/v2/tools/usage": { |
| 124 | + "post": { |
| 125 | + "tags": ["Tool Endpoints [Beta]"], |
| 126 | + "summary": "[Beta] Report tool usage (metrics only)", |
| 127 | + "description": "[Beta] Report verified tool usage for metrics and analytics purposes only. Supports verification_type: eip3009_authorization (free tools, identity proof) or x402_settlement (paid tools, onchain USDC payment verification). This endpoint does NOT trigger any onchain transactions. This endpoint is under active development and may change without notice.", |
| 128 | + "operationId": "report_tool_usage", |
| 129 | + "requestBody": { |
| 130 | + "content": { |
| 131 | + "application/json": { |
| 132 | + "schema": { |
| 133 | + "$ref": "#/components/schemas/ToolUsageRequest" |
| 134 | + } |
| 135 | + } |
| 136 | + }, |
| 137 | + "required": true |
| 138 | + }, |
| 139 | + "responses": { |
| 140 | + "200": { |
| 141 | + "description": "OK", |
| 142 | + "content": { |
| 143 | + "*/*": { |
| 144 | + "schema": { |
| 145 | + "$ref": "#/components/schemas/ToolUsageResponse" |
| 146 | + } |
| 147 | + } |
| 148 | + } |
| 149 | + }, |
| 150 | + "400": { |
| 151 | + "$ref": "#/components/responses/BadRequest" |
| 152 | + }, |
| 153 | + "500": { |
| 154 | + "$ref": "#/components/responses/InternalError" |
| 155 | + } |
| 156 | + } |
| 157 | + } |
| 158 | + }, |
123 | 159 | "/api/v2/tokens/batch": { |
124 | 160 | "post": { |
125 | 161 | "tags": ["Token Endpoints"], |
|
5785 | 5821 | "total_spent" |
5786 | 5822 | ] |
5787 | 5823 | }, |
| 5824 | + "Eip3009Fields": { |
| 5825 | + "type": "object", |
| 5826 | + "properties": { |
| 5827 | + "caller_address": { |
| 5828 | + "type": "string" |
| 5829 | + }, |
| 5830 | + "signature": { |
| 5831 | + "type": "string" |
| 5832 | + }, |
| 5833 | + "chain_id": { |
| 5834 | + "type": "integer", |
| 5835 | + "format": "int64" |
| 5836 | + }, |
| 5837 | + "from": { |
| 5838 | + "type": "string" |
| 5839 | + }, |
| 5840 | + "to": { |
| 5841 | + "type": "string" |
| 5842 | + }, |
| 5843 | + "value": { |
| 5844 | + "type": "integer" |
| 5845 | + }, |
| 5846 | + "valid_after": { |
| 5847 | + "type": "integer" |
| 5848 | + }, |
| 5849 | + "valid_before": { |
| 5850 | + "type": "integer" |
| 5851 | + }, |
| 5852 | + "nonce": { |
| 5853 | + "type": "string" |
| 5854 | + } |
| 5855 | + } |
| 5856 | + }, |
| 5857 | + "ToolUsageRequest": { |
| 5858 | + "type": "object", |
| 5859 | + "properties": { |
| 5860 | + "verification_type": { |
| 5861 | + "type": "string" |
| 5862 | + }, |
| 5863 | + "tool_chain_id": { |
| 5864 | + "type": "integer", |
| 5865 | + "format": "int64" |
| 5866 | + }, |
| 5867 | + "tool_registry_address": { |
| 5868 | + "type": "string" |
| 5869 | + }, |
| 5870 | + "tool_onchain_id": { |
| 5871 | + "type": "integer", |
| 5872 | + "format": "int64" |
| 5873 | + }, |
| 5874 | + "latency_ms": { |
| 5875 | + "type": "integer", |
| 5876 | + "format": "int64" |
| 5877 | + }, |
| 5878 | + "eip3009": { |
| 5879 | + "$ref": "#/components/schemas/Eip3009Fields" |
| 5880 | + }, |
| 5881 | + "x402": { |
| 5882 | + "$ref": "#/components/schemas/X402SettlementFields" |
| 5883 | + } |
| 5884 | + } |
| 5885 | + }, |
| 5886 | + "X402SettlementFields": { |
| 5887 | + "type": "object", |
| 5888 | + "properties": { |
| 5889 | + "caller_address": { |
| 5890 | + "type": "string" |
| 5891 | + }, |
| 5892 | + "tx_hash": { |
| 5893 | + "type": "string" |
| 5894 | + }, |
| 5895 | + "chain_id": { |
| 5896 | + "type": "integer", |
| 5897 | + "format": "int64" |
| 5898 | + } |
| 5899 | + } |
| 5900 | + }, |
| 5901 | + "ToolUsageResponse": { |
| 5902 | + "type": "object", |
| 5903 | + "properties": { |
| 5904 | + "id": { |
| 5905 | + "type": "string" |
| 5906 | + }, |
| 5907 | + "verified": { |
| 5908 | + "type": "boolean" |
| 5909 | + }, |
| 5910 | + "verification_type": { |
| 5911 | + "type": "string" |
| 5912 | + } |
| 5913 | + }, |
| 5914 | + "required": ["id", "verification_type", "verified"] |
| 5915 | + }, |
5788 | 5916 | "BatchTokensRequest": { |
5789 | 5917 | "type": "object", |
5790 | 5918 | "description": "Request body for batch token retrieval by contract identifiers", |
|
10076 | 10204 | "opensea_url": { |
10077 | 10205 | "type": "string", |
10078 | 10206 | "description": "OpenSea URL for the drop" |
| 10207 | + }, |
| 10208 | + "active_stage": { |
| 10209 | + "$ref": "#/components/schemas/DropStageResponse", |
| 10210 | + "description": "The currently-minting stage, if the drop is live. Null if not minting." |
| 10211 | + }, |
| 10212 | + "next_stage": { |
| 10213 | + "$ref": "#/components/schemas/DropStageResponse", |
| 10214 | + "description": "The earliest upcoming stage by start_time when the drop is not currently minting (e.g. before it starts or between stages). Null if the drop is live or has no future stages." |
10079 | 10215 | } |
10080 | 10216 | }, |
10081 | 10217 | "required": [ |
|
10087 | 10223 | "opensea_url" |
10088 | 10224 | ] |
10089 | 10225 | }, |
| 10226 | + "DropStageResponse": { |
| 10227 | + "type": "object", |
| 10228 | + "description": "A mint stage within a drop", |
| 10229 | + "properties": { |
| 10230 | + "uuid": { |
| 10231 | + "type": "string", |
| 10232 | + "description": "Stage UUID" |
| 10233 | + }, |
| 10234 | + "stage_type": { |
| 10235 | + "type": "string", |
| 10236 | + "description": "Stage type", |
| 10237 | + "example": "public_sale" |
| 10238 | + }, |
| 10239 | + "label": { |
| 10240 | + "type": "string", |
| 10241 | + "description": "Stage label/name" |
| 10242 | + }, |
| 10243 | + "price": { |
| 10244 | + "type": "string", |
| 10245 | + "description": "Mint price per token in wei (decimal string)" |
| 10246 | + }, |
| 10247 | + "price_currency_address": { |
| 10248 | + "type": "string", |
| 10249 | + "description": "Currency contract address (e.g. 0x0000...0000 for native token)" |
| 10250 | + }, |
| 10251 | + "start_time": { |
| 10252 | + "type": "string", |
| 10253 | + "description": "Stage start time (ISO 8601)" |
| 10254 | + }, |
| 10255 | + "end_time": { |
| 10256 | + "type": "string", |
| 10257 | + "description": "Stage end time (ISO 8601)" |
| 10258 | + }, |
| 10259 | + "max_per_wallet": { |
| 10260 | + "type": "string", |
| 10261 | + "description": "Max tokens mintable per wallet in this stage" |
| 10262 | + } |
| 10263 | + }, |
| 10264 | + "required": [ |
| 10265 | + "end_time", |
| 10266 | + "max_per_wallet", |
| 10267 | + "price_currency_address", |
| 10268 | + "stage_type", |
| 10269 | + "start_time", |
| 10270 | + "uuid" |
| 10271 | + ] |
| 10272 | + }, |
10090 | 10273 | "DropDetailedResponse": { |
10091 | 10274 | "type": "object", |
10092 | 10275 | "description": "Detailed drop information including stages and supply", |
|
10127 | 10310 | "type": "string", |
10128 | 10311 | "description": "OpenSea URL for the drop" |
10129 | 10312 | }, |
| 10313 | + "active_stage": { |
| 10314 | + "$ref": "#/components/schemas/DropStageResponse", |
| 10315 | + "description": "The currently-minting stage, if the drop is live. Null if not minting." |
| 10316 | + }, |
| 10317 | + "next_stage": { |
| 10318 | + "$ref": "#/components/schemas/DropStageResponse", |
| 10319 | + "description": "The earliest upcoming stage by start_time when the drop is not currently minting (e.g. before it starts or between stages). Null if the drop is live or has no future stages." |
| 10320 | + }, |
10130 | 10321 | "stages": { |
10131 | 10322 | "type": "array", |
10132 | 10323 | "description": "Drop stages (public sale, presale, etc.)", |
|
10153 | 10344 | "stages" |
10154 | 10345 | ] |
10155 | 10346 | }, |
10156 | | - "DropStageResponse": { |
10157 | | - "type": "object", |
10158 | | - "description": "A mint stage within a drop", |
10159 | | - "properties": { |
10160 | | - "uuid": { |
10161 | | - "type": "string", |
10162 | | - "description": "Stage UUID" |
10163 | | - }, |
10164 | | - "stage_type": { |
10165 | | - "type": "string", |
10166 | | - "description": "Stage type", |
10167 | | - "example": "public_sale" |
10168 | | - }, |
10169 | | - "label": { |
10170 | | - "type": "string", |
10171 | | - "description": "Stage label/name" |
10172 | | - }, |
10173 | | - "price": { |
10174 | | - "type": "string", |
10175 | | - "description": "Mint price per token in wei (decimal string)" |
10176 | | - }, |
10177 | | - "price_currency_address": { |
10178 | | - "type": "string", |
10179 | | - "description": "Currency contract address (e.g. 0x0000...0000 for native token)" |
10180 | | - }, |
10181 | | - "start_time": { |
10182 | | - "type": "string", |
10183 | | - "description": "Stage start time (ISO 8601)" |
10184 | | - }, |
10185 | | - "end_time": { |
10186 | | - "type": "string", |
10187 | | - "description": "Stage end time (ISO 8601)" |
10188 | | - }, |
10189 | | - "max_per_wallet": { |
10190 | | - "type": "string", |
10191 | | - "description": "Max tokens mintable per wallet in this stage" |
10192 | | - } |
10193 | | - }, |
10194 | | - "required": [ |
10195 | | - "end_time", |
10196 | | - "max_per_wallet", |
10197 | | - "price_currency_address", |
10198 | | - "stage_type", |
10199 | | - "start_time", |
10200 | | - "uuid" |
10201 | | - ] |
10202 | | - }, |
10203 | 10347 | "DropDeployReceiptResponse": { |
10204 | 10348 | "type": "object", |
10205 | 10349 | "description": "Deploy contract receipt status", |
|
0 commit comments