@opendatalabs/vana-sdk 0.1.0-alpha.fd33fc9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/dist/browser.cjs.map +1 -1
  2. package/dist/browser.d.ts +33 -1
  3. package/dist/browser.js.map +1 -1
  4. package/dist/chains/index.cjs.map +1 -1
  5. package/dist/chains/index.d.ts +30 -1
  6. package/dist/chains/index.js.map +1 -1
  7. package/dist/client/__tests__/enhancedResponse.test.d.ts +1 -0
  8. package/dist/client/enhancedResponse.cjs +164 -0
  9. package/dist/client/enhancedResponse.cjs.map +1 -0
  10. package/dist/client/enhancedResponse.d.ts +120 -0
  11. package/dist/client/enhancedResponse.js +138 -0
  12. package/dist/client/enhancedResponse.js.map +1 -0
  13. package/dist/config/chains.cjs.map +1 -1
  14. package/dist/config/chains.d.ts +99 -0
  15. package/dist/config/chains.js.map +1 -1
  16. package/dist/contracts/contractController.cjs.map +1 -1
  17. package/dist/contracts/contractController.d.ts +66 -10
  18. package/dist/contracts/contractController.js.map +1 -1
  19. package/dist/controllers/__tests__/data-consistency-integration.test.d.ts +7 -0
  20. package/dist/controllers/__tests__/operations.processQueue.test.d.ts +1 -0
  21. package/dist/controllers/base.cjs +33 -0
  22. package/dist/controllers/base.cjs.map +1 -1
  23. package/dist/controllers/base.d.ts +10 -0
  24. package/dist/controllers/base.js +33 -0
  25. package/dist/controllers/base.js.map +1 -1
  26. package/dist/controllers/data.cjs +417 -276
  27. package/dist/controllers/data.cjs.map +1 -1
  28. package/dist/controllers/data.d.ts +246 -193
  29. package/dist/controllers/data.js +430 -279
  30. package/dist/controllers/data.js.map +1 -1
  31. package/dist/controllers/operations.cjs +430 -0
  32. package/dist/controllers/operations.cjs.map +1 -0
  33. package/dist/controllers/operations.d.ts +229 -0
  34. package/dist/controllers/operations.js +406 -0
  35. package/dist/controllers/operations.js.map +1 -0
  36. package/dist/controllers/permissions.cjs +690 -209
  37. package/dist/controllers/permissions.cjs.map +1 -1
  38. package/dist/controllers/permissions.d.ts +196 -68
  39. package/dist/controllers/permissions.js +690 -209
  40. package/dist/controllers/permissions.js.map +1 -1
  41. package/dist/controllers/protocol.cjs.map +1 -1
  42. package/dist/controllers/protocol.d.ts +27 -28
  43. package/dist/controllers/protocol.js.map +1 -1
  44. package/dist/controllers/schemas.cjs +104 -25
  45. package/dist/controllers/schemas.cjs.map +1 -1
  46. package/dist/controllers/schemas.d.ts +88 -40
  47. package/dist/controllers/schemas.js +104 -25
  48. package/dist/controllers/schemas.js.map +1 -1
  49. package/dist/controllers/server.cjs +269 -58
  50. package/dist/controllers/server.cjs.map +1 -1
  51. package/dist/controllers/server.d.ts +157 -52
  52. package/dist/controllers/server.js +269 -58
  53. package/dist/controllers/server.js.map +1 -1
  54. package/dist/core/__tests__/health.test.d.ts +1 -0
  55. package/dist/core/__tests__/inMemoryNonceManager.test.d.ts +1 -0
  56. package/dist/core/__tests__/nonceManager.test.d.ts +1 -0
  57. package/dist/core/__tests__/pollingManager.test.d.ts +4 -0
  58. package/dist/core/apiClient.cjs +53 -3
  59. package/dist/core/apiClient.cjs.map +1 -1
  60. package/dist/core/apiClient.d.ts +132 -7
  61. package/dist/core/apiClient.js +53 -3
  62. package/dist/core/apiClient.js.map +1 -1
  63. package/dist/core/generics.cjs +30 -3
  64. package/dist/core/generics.cjs.map +1 -1
  65. package/dist/core/generics.d.ts +95 -6
  66. package/dist/core/generics.js +30 -3
  67. package/dist/core/generics.js.map +1 -1
  68. package/dist/core/health.cjs +289 -0
  69. package/dist/core/health.cjs.map +1 -0
  70. package/dist/core/health.d.ts +143 -0
  71. package/dist/core/health.js +265 -0
  72. package/dist/core/health.js.map +1 -0
  73. package/dist/core/inMemoryNonceManager.cjs +138 -0
  74. package/dist/core/inMemoryNonceManager.cjs.map +1 -0
  75. package/dist/core/inMemoryNonceManager.d.ts +69 -0
  76. package/dist/core/inMemoryNonceManager.js +114 -0
  77. package/dist/core/inMemoryNonceManager.js.map +1 -0
  78. package/dist/core/nonceManager.cjs +304 -0
  79. package/dist/core/nonceManager.cjs.map +1 -0
  80. package/dist/core/nonceManager.d.ts +116 -0
  81. package/dist/core/nonceManager.js +280 -0
  82. package/dist/core/nonceManager.js.map +1 -0
  83. package/dist/core/pollingManager.cjs +292 -0
  84. package/dist/core/pollingManager.cjs.map +1 -0
  85. package/dist/core/pollingManager.d.ts +120 -0
  86. package/dist/core/pollingManager.js +268 -0
  87. package/dist/core/pollingManager.js.map +1 -0
  88. package/dist/core.cjs +55 -1
  89. package/dist/core.cjs.map +1 -1
  90. package/dist/core.d.ts +54 -3
  91. package/dist/core.js +55 -1
  92. package/dist/core.js.map +1 -1
  93. package/dist/crypto/ecies/base.cjs +16 -3
  94. package/dist/crypto/ecies/base.cjs.map +1 -1
  95. package/dist/crypto/ecies/base.js +16 -3
  96. package/dist/crypto/ecies/base.js.map +1 -1
  97. package/dist/errors.cjs +29 -0
  98. package/dist/errors.cjs.map +1 -1
  99. package/dist/errors.d.ts +64 -0
  100. package/dist/errors.js +28 -0
  101. package/dist/errors.js.map +1 -1
  102. package/dist/generated/abi/ComputeInstructionRegistryImplementation.cjs.map +1 -1
  103. package/dist/generated/abi/ComputeInstructionRegistryImplementation.js.map +1 -1
  104. package/dist/generated/abi/DLPPerformanceImplementation.cjs +42 -0
  105. package/dist/generated/abi/DLPPerformanceImplementation.cjs.map +1 -1
  106. package/dist/generated/abi/DLPPerformanceImplementation.d.ts +32 -0
  107. package/dist/generated/abi/DLPPerformanceImplementation.js +42 -0
  108. package/dist/generated/abi/DLPPerformanceImplementation.js.map +1 -1
  109. package/dist/generated/abi/DLPRegistryImplementation.cjs +5 -5
  110. package/dist/generated/abi/DLPRegistryImplementation.cjs.map +1 -1
  111. package/dist/generated/abi/DLPRegistryImplementation.d.ts +4 -4
  112. package/dist/generated/abi/DLPRegistryImplementation.js +5 -5
  113. package/dist/generated/abi/DLPRegistryImplementation.js.map +1 -1
  114. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs +166 -2
  115. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs.map +1 -1
  116. package/dist/generated/abi/DLPRewardDeployerImplementation.d.ts +129 -2
  117. package/dist/generated/abi/DLPRewardDeployerImplementation.js +166 -2
  118. package/dist/generated/abi/DLPRewardDeployerImplementation.js.map +1 -1
  119. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs +167 -19
  120. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs.map +1 -1
  121. package/dist/generated/abi/DataPortabilityGranteesImplementation.d.ts +127 -14
  122. package/dist/generated/abi/DataPortabilityGranteesImplementation.js +167 -19
  123. package/dist/generated/abi/DataPortabilityGranteesImplementation.js.map +1 -1
  124. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs +0 -19
  125. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs.map +1 -1
  126. package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.ts +0 -14
  127. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js +0 -19
  128. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js.map +1 -1
  129. package/dist/generated/abi/DataPortabilityServersImplementation.cjs +0 -19
  130. package/dist/generated/abi/DataPortabilityServersImplementation.cjs.map +1 -1
  131. package/dist/generated/abi/DataPortabilityServersImplementation.d.ts +0 -14
  132. package/dist/generated/abi/DataPortabilityServersImplementation.js +0 -19
  133. package/dist/generated/abi/DataPortabilityServersImplementation.js.map +1 -1
  134. package/dist/generated/abi/DataRegistryImplementation.cjs +0 -13
  135. package/dist/generated/abi/DataRegistryImplementation.cjs.map +1 -1
  136. package/dist/generated/abi/DataRegistryImplementation.d.ts +0 -10
  137. package/dist/generated/abi/DataRegistryImplementation.js +0 -13
  138. package/dist/generated/abi/DataRegistryImplementation.js.map +1 -1
  139. package/dist/generated/abi/SwapHelperImplementation.cjs +0 -43
  140. package/dist/generated/abi/SwapHelperImplementation.cjs.map +1 -1
  141. package/dist/generated/abi/SwapHelperImplementation.d.ts +0 -35
  142. package/dist/generated/abi/SwapHelperImplementation.js +0 -43
  143. package/dist/generated/abi/SwapHelperImplementation.js.map +1 -1
  144. package/dist/generated/abi/VanaEpochImplementation.cjs +195 -0
  145. package/dist/generated/abi/VanaEpochImplementation.cjs.map +1 -1
  146. package/dist/generated/abi/VanaEpochImplementation.d.ts +151 -0
  147. package/dist/generated/abi/VanaEpochImplementation.js +195 -0
  148. package/dist/generated/abi/VanaEpochImplementation.js.map +1 -1
  149. package/dist/generated/abi/VanaPoolEntityImplementation.cjs +22 -65
  150. package/dist/generated/abi/VanaPoolEntityImplementation.cjs.map +1 -1
  151. package/dist/generated/abi/VanaPoolEntityImplementation.d.ts +17 -51
  152. package/dist/generated/abi/VanaPoolEntityImplementation.js +22 -65
  153. package/dist/generated/abi/VanaPoolEntityImplementation.js.map +1 -1
  154. package/dist/generated/abi/VanaPoolStakingImplementation.cjs +113 -1
  155. package/dist/generated/abi/VanaPoolStakingImplementation.cjs.map +1 -1
  156. package/dist/generated/abi/VanaPoolStakingImplementation.d.ts +85 -1
  157. package/dist/generated/abi/VanaPoolStakingImplementation.js +113 -1
  158. package/dist/generated/abi/VanaPoolStakingImplementation.js.map +1 -1
  159. package/dist/generated/abi/index.d.ts +546 -146
  160. package/dist/generated/event-types.cjs.map +1 -1
  161. package/dist/generated/event-types.d.ts +14 -8
  162. package/dist/generated/eventRegistry.cjs +42 -18
  163. package/dist/generated/eventRegistry.cjs.map +1 -1
  164. package/dist/generated/eventRegistry.js +42 -18
  165. package/dist/generated/eventRegistry.js.map +1 -1
  166. package/dist/generated/server/server-exports.cjs +22 -0
  167. package/dist/generated/server/server-exports.cjs.map +1 -1
  168. package/dist/generated/server/server-exports.d.ts +27 -10
  169. package/dist/generated/server/server-exports.js +17 -0
  170. package/dist/generated/server/server-exports.js.map +1 -1
  171. package/dist/generated/server/server.cjs.map +1 -1
  172. package/dist/generated/server/server.d.ts +771 -402
  173. package/dist/generated/subgraph.cjs +797 -32
  174. package/dist/generated/subgraph.cjs.map +1 -1
  175. package/dist/generated/subgraph.d.ts +135 -0
  176. package/dist/generated/subgraph.js +792 -32
  177. package/dist/generated/subgraph.js.map +1 -1
  178. package/dist/index.browser.d.ts +2 -0
  179. package/dist/index.browser.js +10 -0
  180. package/dist/index.browser.js.map +1 -1
  181. package/dist/index.cjs.map +1 -1
  182. package/dist/index.js.map +1 -1
  183. package/dist/index.node.cjs +26 -0
  184. package/dist/index.node.cjs.map +1 -1
  185. package/dist/index.node.d.ts +49 -5
  186. package/dist/index.node.js +25 -1
  187. package/dist/index.node.js.map +1 -1
  188. package/dist/lib/__tests__/redisAtomicStore.test.d.ts +1 -0
  189. package/dist/lib/redisAtomicStore.cjs +201 -0
  190. package/dist/lib/redisAtomicStore.cjs.map +1 -0
  191. package/dist/lib/redisAtomicStore.d.ts +120 -0
  192. package/dist/lib/redisAtomicStore.js +177 -0
  193. package/dist/lib/redisAtomicStore.js.map +1 -0
  194. package/dist/node.cjs.map +1 -1
  195. package/dist/node.d.ts +39 -1
  196. package/dist/node.js.map +1 -1
  197. package/dist/platform/browser.cjs +160 -2
  198. package/dist/platform/browser.cjs.map +1 -1
  199. package/dist/platform/browser.d.ts +232 -12
  200. package/dist/platform/browser.js +160 -2
  201. package/dist/platform/browser.js.map +1 -1
  202. package/dist/platform/interface.cjs.map +1 -1
  203. package/dist/platform/interface.d.ts +283 -90
  204. package/dist/platform/node.cjs +163 -2
  205. package/dist/platform/node.cjs.map +1 -1
  206. package/dist/platform/node.d.ts +69 -6
  207. package/dist/platform/node.js +163 -2
  208. package/dist/platform/node.js.map +1 -1
  209. package/dist/server/relayerHandler.cjs +315 -81
  210. package/dist/server/relayerHandler.cjs.map +1 -1
  211. package/dist/server/relayerHandler.d.ts +35 -2
  212. package/dist/server/relayerHandler.js +315 -81
  213. package/dist/server/relayerHandler.js.map +1 -1
  214. package/dist/storage/index.cjs +3 -0
  215. package/dist/storage/index.cjs.map +1 -1
  216. package/dist/storage/index.d.ts +1 -0
  217. package/dist/storage/index.js +2 -0
  218. package/dist/storage/index.js.map +1 -1
  219. package/dist/storage/manager.cjs +108 -25
  220. package/dist/storage/manager.cjs.map +1 -1
  221. package/dist/storage/manager.d.ts +119 -25
  222. package/dist/storage/manager.js +108 -25
  223. package/dist/storage/manager.js.map +1 -1
  224. package/dist/storage/providers/callback-storage.cjs +86 -15
  225. package/dist/storage/providers/callback-storage.cjs.map +1 -1
  226. package/dist/storage/providers/callback-storage.d.ts +109 -20
  227. package/dist/storage/providers/callback-storage.js +86 -15
  228. package/dist/storage/providers/callback-storage.js.map +1 -1
  229. package/dist/storage/providers/dropbox.cjs +237 -0
  230. package/dist/storage/providers/dropbox.cjs.map +1 -0
  231. package/dist/storage/providers/dropbox.d.ts +39 -0
  232. package/dist/storage/providers/dropbox.js +215 -0
  233. package/dist/storage/providers/dropbox.js.map +1 -0
  234. package/dist/storage/providers/dropbox.test.d.ts +1 -0
  235. package/dist/storage/providers/pinata.cjs.map +1 -1
  236. package/dist/storage/providers/pinata.d.ts +12 -14
  237. package/dist/storage/providers/pinata.js.map +1 -1
  238. package/dist/tests/data-upload-owner-validation.test.d.ts +1 -0
  239. package/dist/tests/permissions-transaction-options.test.d.ts +1 -0
  240. package/dist/types/atomicStore.cjs +31 -0
  241. package/dist/types/atomicStore.cjs.map +1 -0
  242. package/dist/types/atomicStore.d.ts +236 -0
  243. package/dist/types/atomicStore.js +7 -0
  244. package/dist/types/atomicStore.js.map +1 -0
  245. package/dist/types/blockchain.cjs.map +1 -1
  246. package/dist/types/blockchain.d.ts +39 -11
  247. package/dist/types/chains.cjs.map +1 -1
  248. package/dist/types/chains.d.ts +74 -7
  249. package/dist/types/chains.js.map +1 -1
  250. package/dist/types/config.cjs.map +1 -1
  251. package/dist/types/config.d.ts +38 -4
  252. package/dist/types/config.js.map +1 -1
  253. package/dist/types/contracts.cjs.map +1 -1
  254. package/dist/types/contracts.d.ts +71 -7
  255. package/dist/types/controller-context.cjs.map +1 -1
  256. package/dist/types/controller-context.d.ts +4 -1
  257. package/dist/types/data.cjs.map +1 -1
  258. package/dist/types/data.d.ts +11 -10
  259. package/dist/types/generics.cjs.map +1 -1
  260. package/dist/types/generics.d.ts +81 -10
  261. package/dist/types/index.cjs.map +1 -1
  262. package/dist/types/index.d.ts +31 -3
  263. package/dist/types/index.js.map +1 -1
  264. package/dist/types/operationStore.cjs +17 -0
  265. package/dist/types/operationStore.cjs.map +1 -0
  266. package/dist/types/operationStore.d.ts +171 -0
  267. package/dist/types/operationStore.js +1 -0
  268. package/dist/types/operationStore.js.map +1 -0
  269. package/dist/types/operations.cjs +3 -15
  270. package/dist/types/operations.cjs.map +1 -1
  271. package/dist/types/operations.d.ts +131 -39
  272. package/dist/types/operations.js +2 -13
  273. package/dist/types/operations.js.map +1 -1
  274. package/dist/types/options.cjs +17 -0
  275. package/dist/types/options.cjs.map +1 -0
  276. package/dist/types/options.d.ts +308 -0
  277. package/dist/types/options.js +1 -0
  278. package/dist/types/options.js.map +1 -0
  279. package/dist/types/permissions.cjs.map +1 -1
  280. package/dist/types/permissions.d.ts +19 -20
  281. package/dist/types/personal.cjs.map +1 -1
  282. package/dist/types/personal.d.ts +150 -14
  283. package/dist/types/relayer.cjs.map +1 -1
  284. package/dist/types/relayer.d.ts +145 -24
  285. package/dist/types/storage.cjs.map +1 -1
  286. package/dist/types/storage.d.ts +9 -21
  287. package/dist/types/storage.js.map +1 -1
  288. package/dist/types/utils.cjs.map +1 -1
  289. package/dist/types/utils.d.ts +0 -45
  290. package/dist/utils/__tests__/chainQuery.test.d.ts +1 -0
  291. package/dist/utils/__tests__/subgraphConsistency.test.d.ts +4 -0
  292. package/dist/utils/__tests__/subgraphPagination.test.d.ts +4 -0
  293. package/dist/utils/chainQuery.cjs +107 -0
  294. package/dist/utils/chainQuery.cjs.map +1 -0
  295. package/dist/utils/chainQuery.d.ts +31 -0
  296. package/dist/utils/chainQuery.js +82 -0
  297. package/dist/utils/chainQuery.js.map +1 -0
  298. package/dist/utils/grantFiles.cjs +4 -1
  299. package/dist/utils/grantFiles.cjs.map +1 -1
  300. package/dist/utils/grantFiles.d.ts +10 -20
  301. package/dist/utils/grantFiles.js +4 -1
  302. package/dist/utils/grantFiles.js.map +1 -1
  303. package/dist/utils/grantValidation.cjs.map +1 -1
  304. package/dist/utils/grantValidation.d.ts +95 -16
  305. package/dist/utils/grantValidation.js.map +1 -1
  306. package/dist/utils/grants.cjs.map +1 -1
  307. package/dist/utils/grants.d.ts +93 -12
  308. package/dist/utils/grants.js.map +1 -1
  309. package/dist/utils/ipfs.cjs +2 -4
  310. package/dist/utils/ipfs.cjs.map +1 -1
  311. package/dist/utils/ipfs.d.ts +1 -1
  312. package/dist/utils/ipfs.js +2 -4
  313. package/dist/utils/ipfs.js.map +1 -1
  314. package/dist/utils/lazy-import.cjs.map +1 -1
  315. package/dist/utils/lazy-import.d.ts +32 -7
  316. package/dist/utils/lazy-import.js.map +1 -1
  317. package/dist/utils/signatureCache.cjs +8 -2
  318. package/dist/utils/signatureCache.cjs.map +1 -1
  319. package/dist/utils/signatureCache.d.ts +49 -8
  320. package/dist/utils/signatureCache.js +8 -2
  321. package/dist/utils/signatureCache.js.map +1 -1
  322. package/dist/utils/subgraphConsistency.cjs +184 -0
  323. package/dist/utils/subgraphConsistency.cjs.map +1 -0
  324. package/dist/utils/subgraphConsistency.d.ts +65 -0
  325. package/dist/utils/subgraphConsistency.js +155 -0
  326. package/dist/utils/subgraphConsistency.js.map +1 -0
  327. package/dist/utils/subgraphMetaCache.cjs +101 -0
  328. package/dist/utils/subgraphMetaCache.cjs.map +1 -0
  329. package/dist/utils/subgraphMetaCache.d.ts +56 -0
  330. package/dist/utils/subgraphMetaCache.js +76 -0
  331. package/dist/utils/subgraphMetaCache.js.map +1 -0
  332. package/dist/utils/subgraphPagination.cjs +104 -0
  333. package/dist/utils/subgraphPagination.cjs.map +1 -0
  334. package/dist/utils/subgraphPagination.d.ts +78 -0
  335. package/dist/utils/subgraphPagination.js +78 -0
  336. package/dist/utils/subgraphPagination.js.map +1 -0
  337. package/dist/utils/transactionHelpers.cjs.map +1 -1
  338. package/dist/utils/transactionHelpers.d.ts +12 -12
  339. package/dist/utils/transactionHelpers.js.map +1 -1
  340. package/dist/utils/typedDataConverter.cjs.map +1 -1
  341. package/dist/utils/typedDataConverter.d.ts +39 -3
  342. package/dist/utils/typedDataConverter.js.map +1 -1
  343. package/dist/utils/urlResolver.cjs +7 -0
  344. package/dist/utils/urlResolver.cjs.map +1 -1
  345. package/dist/utils/urlResolver.d.ts +22 -4
  346. package/dist/utils/urlResolver.js +7 -0
  347. package/dist/utils/urlResolver.js.map +1 -1
  348. package/dist/utils/wallet.cjs.map +1 -1
  349. package/dist/utils/wallet.d.ts +78 -16
  350. package/dist/utils/wallet.js.map +1 -1
  351. package/package.json +3 -1
@@ -1,5 +1,5 @@
1
1
  export interface paths {
2
- "/operations": {
2
+ "/api/v1/operations": {
3
3
  parameters: {
4
4
  query?: never;
5
5
  header?: never;
@@ -9,182 +9,28 @@ export interface paths {
9
9
  get?: never;
10
10
  put?: never;
11
11
  /**
12
- * Start an operation (asynchronous)
13
- * @description Creates a new operation with the provided request data and signature.
14
- *
15
- * **How it works:**
16
- * 1. The `permission_id` in the request references a blockchain permission
17
- * 2. The permission contains a link to a grant file (stored on IPFS)
18
- * 3. The grant file defines the operation type and parameters
19
- * 4. The grant file is cryptographically signed by the grantee
20
- *
21
- * **Grant File Examples:**
22
- *
23
- * *LLM Inference with JSON mode:*
24
- * ```json
25
- * {
26
- * "grantee": "0x123...",
27
- * "operation": "llm_inference",
28
- * "parameters": {
29
- * "prompt": "Analyze this data: {{data}}",
30
- * "response_format": {"type": "json_object"}
31
- * }
32
- * }
33
- * ```
34
- *
35
- * *LLM Inference with text mode (default):*
36
- * ```json
37
- * {
38
- * "grantee": "0x123...",
39
- * "operation": "llm_inference",
40
- * "parameters": {
41
- * "prompt": "Summarize this content: {{data}}"
42
- * }
43
- * }
44
- * ```
45
- *
46
- * **Possible Errors:**
47
- * - `400 VALIDATION_ERROR`: Invalid request format or missing required fields
48
- * - `400 VALIDATION_ERROR_PERMISSION_ID`: Invalid or missing permission ID
49
- * - `400 VALIDATION_ERROR_OPERATION_REQUEST_JSON`: Invalid JSON format in operation request
50
- * - `400 GRANT_VALIDATION_ERROR`: Grant validation failed
51
- * - `401 AUTHENTICATION_ERROR`: Invalid signature or unable to recover app address
52
- * - `404 NOT_FOUND_ERROR`: Permission, file, or grant not found
53
- * - `500 BLOCKCHAIN_ERROR`: Blockchain communication failed
54
- * - `500 FILE_ACCESS_ERROR`: Failed to access or download files
55
- * - `500 DECRYPTION_ERROR`: Failed to decrypt file content
56
- * - `500 COMPUTE_ERROR`: Compute operation failed
57
- * - `500 OPERATION_ERROR`: General operation processing error
58
- * - `500 INTERNAL_SERVER_ERROR`: Unexpected server error
59
- *
12
+ * Create a new operation
13
+ * @description Submit a new operation for asynchronous processing. Operations are validated against blockchain permissions before execution. The operation type (LLM inference, vector search, etc.) and parameters are determined by the grant file referenced in the blockchain permission.
60
14
  */
61
- post: {
62
- parameters: {
63
- query?: never;
64
- header?: never;
65
- path?: never;
66
- cookie?: never;
67
- };
68
- requestBody: {
69
- content: {
70
- "application/json": components["schemas"]["CreateOperationRequest"];
71
- };
72
- };
73
- responses: {
74
- /** @description Accepted — operation handle returned. */
75
- 202: {
76
- headers: {
77
- [name: string]: unknown;
78
- };
79
- content: {
80
- "application/json": components["schemas"]["CreateOperationResponse"];
81
- };
82
- };
83
- /** @description Validation or grant validation error */
84
- 400: {
85
- headers: {
86
- [name: string]: unknown;
87
- };
88
- content: {
89
- "application/json": components["schemas"]["ValidationErrorResponse"] | components["schemas"]["GrantValidationErrorResponse"];
90
- };
91
- };
92
- /** @description Authentication error (invalid signature) */
93
- 401: {
94
- headers: {
95
- [name: string]: unknown;
96
- };
97
- content: {
98
- "application/json": components["schemas"]["AuthenticationErrorResponse"];
99
- };
100
- };
101
- /** @description Resource not found (permission, file, or grant) */
102
- 404: {
103
- headers: {
104
- [name: string]: unknown;
105
- };
106
- content: {
107
- "application/json": components["schemas"]["NotFoundErrorResponse"];
108
- };
109
- };
110
- /** @description Server error during operation processing */
111
- 500: {
112
- headers: {
113
- [name: string]: unknown;
114
- };
115
- content: {
116
- "application/json": components["schemas"]["BlockchainErrorResponse"] | components["schemas"]["FileAccessErrorResponse"] | components["schemas"]["DecryptionErrorResponse"] | components["schemas"]["ComputeErrorResponse"] | components["schemas"]["OperationErrorResponse"] | components["schemas"]["InternalServerErrorResponse"];
117
- };
118
- };
119
- };
120
- };
15
+ post: operations["create_operation_api_v1_operations_post"];
121
16
  delete?: never;
122
17
  options?: never;
123
18
  head?: never;
124
19
  patch?: never;
125
20
  trace?: never;
126
21
  };
127
- "/operations/{operation_id}": {
22
+ "/api/v1/operations/{operation_id}": {
128
23
  parameters: {
129
24
  query?: never;
130
25
  header?: never;
131
- path: {
132
- /** @description The operation ID */
133
- operation_id: components["parameters"]["OpId"];
134
- };
26
+ path?: never;
135
27
  cookie?: never;
136
28
  };
137
29
  /**
138
- * Poll operation status / result
139
- * @description Retrieves the current status and result of an operation.
140
- *
141
- * **Possible Errors:**
142
- * - `404 NOT_FOUND_ERROR`: Operation not found
143
- * - `500 COMPUTE_ERROR`: Failed to get prediction status
144
- * - `500 INTERNAL_SERVER_ERROR`: Unexpected server error
145
- *
30
+ * Get operation status
31
+ * @description Retrieve the current status and result of an operation. Poll this endpoint to track operation progress from 'starting' through 'processing' to terminal states ('succeeded', 'failed', 'canceled').
146
32
  */
147
- get: {
148
- parameters: {
149
- query?: never;
150
- header?: never;
151
- path: {
152
- /** @description The operation ID */
153
- operation_id: components["parameters"]["OpId"];
154
- };
155
- cookie?: never;
156
- };
157
- requestBody?: never;
158
- responses: {
159
- /** @description Operation status retrieved successfully */
160
- 200: {
161
- headers: {
162
- [name: string]: unknown;
163
- };
164
- content: {
165
- "application/json": components["schemas"]["GetOperationResponse"];
166
- };
167
- };
168
- /** @description Operation not found */
169
- 404: {
170
- headers: {
171
- [name: string]: unknown;
172
- };
173
- content: {
174
- "application/json": components["schemas"]["NotFoundErrorResponse"];
175
- };
176
- };
177
- /** @description Server error during status retrieval */
178
- 500: {
179
- headers: {
180
- [name: string]: unknown;
181
- };
182
- content: {
183
- "application/json": components["schemas"]["ComputeErrorResponse"] | components["schemas"]["InternalServerErrorResponse"];
184
- };
185
- };
186
- };
187
- };
33
+ get: operations["get_operation_api_v1_operations__operation_id__get"];
188
34
  put?: never;
189
35
  post?: never;
190
36
  delete?: never;
@@ -193,133 +39,80 @@ export interface paths {
193
39
  patch?: never;
194
40
  trace?: never;
195
41
  };
196
- "/operations/{operation_id}/cancel": {
42
+ "/api/v1/operations/{operation_id}/cancel": {
197
43
  parameters: {
198
44
  query?: never;
199
45
  header?: never;
200
- path: {
201
- /** @description The operation ID */
202
- operation_id: components["parameters"]["OpId"];
203
- };
46
+ path?: never;
204
47
  cookie?: never;
205
48
  };
206
49
  get?: never;
207
50
  put?: never;
208
51
  /**
209
- * Cancel a running operation
210
- * @description Cancels a running operation.
211
- *
212
- * **Possible Errors:**
213
- * - `404 NOT_FOUND_ERROR`: Operation not found
214
- * - `500 COMPUTE_ERROR`: Failed to cancel prediction
215
- * - `500 INTERNAL_SERVER_ERROR`: Unexpected server error
216
- *
52
+ * Cancel an operation
53
+ * @description Cancel a running operation. Only operations in 'starting' or 'processing' states can be canceled. Completed operations cannot be canceled.
217
54
  */
218
- post: {
219
- parameters: {
220
- query?: never;
221
- header?: never;
222
- path: {
223
- /** @description The operation ID */
224
- operation_id: components["parameters"]["OpId"];
225
- };
226
- cookie?: never;
227
- };
228
- requestBody?: never;
229
- responses: {
230
- /** @description Operation cancelled or already finished */
231
- 204: {
232
- headers: {
233
- [name: string]: unknown;
234
- };
235
- content?: never;
236
- };
237
- /** @description Operation not found */
238
- 404: {
239
- headers: {
240
- [name: string]: unknown;
241
- };
242
- content: {
243
- "application/json": components["schemas"]["NotFoundErrorResponse"];
244
- };
245
- };
246
- /** @description Server error during cancellation */
247
- 500: {
248
- headers: {
249
- [name: string]: unknown;
250
- };
251
- content: {
252
- "application/json": components["schemas"]["ComputeErrorResponse"] | components["schemas"]["InternalServerErrorResponse"];
253
- };
254
- };
255
- };
55
+ post: operations["cancel_operation_api_v1_operations__operation_id__cancel_post"];
56
+ delete?: never;
57
+ options?: never;
58
+ head?: never;
59
+ patch?: never;
60
+ trace?: never;
61
+ };
62
+ "/api/v1/identity": {
63
+ parameters: {
64
+ query?: never;
65
+ header?: never;
66
+ path?: never;
67
+ cookie?: never;
256
68
  };
69
+ /**
70
+ * Get user identity
71
+ * @description Retrieve identity information for a user including their personal server details. The personal server address and public key are deterministically derived from the user's address.
72
+ */
73
+ get: operations["get_identity_api_v1_identity_get"];
74
+ put?: never;
75
+ post?: never;
257
76
  delete?: never;
258
77
  options?: never;
259
78
  head?: never;
260
79
  patch?: never;
261
80
  trace?: never;
262
81
  };
263
- "/identity": {
82
+ "/api/v1/artifacts/download": {
264
83
  parameters: {
265
84
  query?: never;
266
85
  header?: never;
267
86
  path?: never;
268
87
  cookie?: never;
269
88
  };
89
+ get?: never;
90
+ put?: never;
270
91
  /**
271
- * Derive deterministic server identity for a user
272
- * @description Derives a deterministic server identity (address and public key) for a user based on their Ethereum address.
273
- *
274
- * **Possible Errors:**
275
- * - `400 VALIDATION_ERROR_USER_ADDRESS`: Invalid user address format
276
- * - `500 OPERATION_ERROR`: Address derivation failed
277
- * - `500 INTERNAL_SERVER_ERROR`: Unexpected server error
278
- *
92
+ * Download operation artifact
93
+ * @description Download an artifact file produced by an operation. Requires ECDSA signature authentication - the grantee (app) that created the operation must sign the download request.
279
94
  */
280
- get: {
281
- parameters: {
282
- query: {
283
- /** @description Caller's wallet address (EIP-55). */
284
- address: components["schemas"]["EthereumAddress"];
285
- };
286
- header?: never;
287
- path?: never;
288
- cookie?: never;
289
- };
290
- requestBody?: never;
291
- responses: {
292
- /** @description Server identity retrieved successfully */
293
- 200: {
294
- headers: {
295
- [name: string]: unknown;
296
- };
297
- content: {
298
- "application/json": components["schemas"]["IdentityResponseModel"];
299
- };
300
- };
301
- /** @description Invalid address format */
302
- 400: {
303
- headers: {
304
- [name: string]: unknown;
305
- };
306
- content: {
307
- "application/json": components["schemas"]["ValidationErrorResponse"];
308
- };
309
- };
310
- /** @description Server error during identity derivation */
311
- 500: {
312
- headers: {
313
- [name: string]: unknown;
314
- };
315
- content: {
316
- "application/json": components["schemas"]["OperationErrorResponse"] | components["schemas"]["InternalServerErrorResponse"];
317
- };
318
- };
319
- };
95
+ post: operations["download_artifact_api_v1_artifacts_download_post"];
96
+ delete?: never;
97
+ options?: never;
98
+ head?: never;
99
+ patch?: never;
100
+ trace?: never;
101
+ };
102
+ "/api/v1/artifacts/{operation_id}/list": {
103
+ parameters: {
104
+ query?: never;
105
+ header?: never;
106
+ path?: never;
107
+ cookie?: never;
320
108
  };
109
+ get?: never;
321
110
  put?: never;
322
- post?: never;
111
+ /**
112
+ * List operation artifacts
113
+ * @description List all artifacts produced by an operation. Requires ECDSA signature authentication from the grantee (app) that created the operation.
114
+ */
115
+ post: operations["list_artifacts_api_v1_artifacts__operation_id__list_post"];
323
116
  delete?: never;
324
117
  options?: never;
325
118
  head?: never;
@@ -331,208 +124,784 @@ export type webhooks = Record<string, never>;
331
124
  export interface components {
332
125
  schemas: {
333
126
  /**
334
- * @description EIP-55 checksum address, 20 bytes, 0x-prefixed.
335
- * @example 0xf0ebD65BEaDacD191dc96D8EC69bbA4ABCf621D4
127
+ * ArtifactDownloadRequest
128
+ * @description Request model for authenticated artifact downloads.
129
+ * @example {
130
+ * "artifact_path": "outputs/result.json",
131
+ * "operation_id": "cm4xp9qkw0001qj0g8xqg8xqg",
132
+ * "signature": "0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c"
133
+ * }
134
+ */
135
+ ArtifactDownloadRequest: {
136
+ /**
137
+ * Operation Id
138
+ * @description Unique operation identifier
139
+ * @example cm4xp9qkw0001qj0g8xqg8xqg
140
+ */
141
+ operation_id: string;
142
+ /**
143
+ * Artifact Path
144
+ * @description Path to the artifact file to download
145
+ * @example outputs/result.json
146
+ */
147
+ artifact_path: string;
148
+ /**
149
+ * Signature
150
+ * @description Ethereum signature of the request for authentication
151
+ * @example 0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c
152
+ */
153
+ signature: string;
154
+ };
155
+ /**
156
+ * ArtifactInfo
157
+ * @description Information about a single artifact file.
158
+ */
159
+ ArtifactInfo: {
160
+ /**
161
+ * Path
162
+ * @description Relative path to the artifact file
163
+ * @example outputs/analysis.json
164
+ */
165
+ path: string;
166
+ /**
167
+ * Size
168
+ * @description File size in bytes
169
+ * @example 4096
170
+ */
171
+ size: number;
172
+ /**
173
+ * Content Type
174
+ * @description MIME type of the artifact
175
+ * @example application/json
176
+ */
177
+ content_type: string;
178
+ };
179
+ /**
180
+ * ArtifactListRequest
181
+ * @description Request model for listing artifacts (no artifact_path needed).
182
+ * @example {
183
+ * "operation_id": "cm4xp9qkw0001qj0g8xqg8xqg",
184
+ * "signature": "0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c"
185
+ * }
186
+ */
187
+ ArtifactListRequest: {
188
+ /**
189
+ * Operation Id
190
+ * @description Unique operation identifier
191
+ * @example cm4xp9qkw0001qj0g8xqg8xqg
192
+ */
193
+ operation_id: string;
194
+ /**
195
+ * Signature
196
+ * @description Ethereum signature of the request for authentication
197
+ * @example 0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c
198
+ */
199
+ signature: string;
200
+ };
201
+ /**
202
+ * ArtifactListResponse
203
+ * @description Response containing list of available artifacts for an operation.
204
+ * @example {
205
+ * "artifacts": [
206
+ * {
207
+ * "content_type": "application/json",
208
+ * "path": "outputs/analysis.json",
209
+ * "size": 4096
210
+ * },
211
+ * {
212
+ * "content_type": "text/markdown",
213
+ * "path": "outputs/report.md",
214
+ * "size": 2048
215
+ * }
216
+ * ],
217
+ * "kind": "ArtifactList",
218
+ * "operation_id": "cm4xp9qkw0001qj0g8xqg8xqg"
219
+ * }
336
220
  */
337
- EthereumAddress: string;
221
+ ArtifactListResponse: {
222
+ /**
223
+ * Kind
224
+ * @description Resource type identifier for response routing
225
+ * @default ArtifactList
226
+ * @example ArtifactList
227
+ * @constant
228
+ */
229
+ kind: "ArtifactList";
230
+ /**
231
+ * Operation Id
232
+ * @description Unique operation identifier
233
+ * @example cm4xp9qkw0001qj0g8xqg8xqg
234
+ */
235
+ operation_id: string;
236
+ /**
237
+ * Artifacts
238
+ * @description List of available artifacts for this operation
239
+ * @default []
240
+ */
241
+ artifacts: components["schemas"]["ArtifactInfo"][];
242
+ };
338
243
  /**
339
- * @description Uncompressed secp256k1 public key, 128 hex characters.
340
- * @example 0x04bcdf3e…
244
+ * CreateOperationRequest
245
+ * @description Request payload for creating a new operation.
246
+ * @example {
247
+ * "app_signature": "0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c",
248
+ * "operation_request_json": "{\"permission_id\": 1024}"
249
+ * }
341
250
  */
342
- PublicKey: string;
343
251
  CreateOperationRequest: {
344
252
  /**
345
- * @description The signature over the operation_request_json
253
+ * App Signature
254
+ * @description ECDSA signature over operation_request_json using app's private key. Must be hex-encoded with 0x prefix (132 chars total)
346
255
  * @example 0x3cffa64411a02d4a257663848df70fd445f513edcbb78a2e94495af45987e2de6144efdafd37a3d2b95e4e535c4a84fbcfb088d8052d435c382e7ca9a5ac57801c
347
256
  */
348
257
  app_signature: string;
349
258
  /**
350
- * @description The request JSON which contains permission_id.
351
- * The operation type and parameters are defined in the grant file
352
- * referenced by the blockchain permission.
353
- *
354
- * @example {"permission_id": 1024}
259
+ * Operation Request Json
260
+ * @description JSON-encoded operation request. Must contain permission_id. Can optionally include operation (for verification) and parameters (runtime values). Runtime parameters are merged with grant parameters (grant takes precedence).
261
+ * @example {"permission_id": 1024, "parameters": {"goal": "analyze trends"}}
355
262
  */
356
263
  operation_request_json: string;
357
264
  };
265
+ /**
266
+ * CreateOperationResponse
267
+ * @description Response after successfully creating an operation.
268
+ * @example {
269
+ * "created_at": "2024-01-01T00:00:00Z",
270
+ * "id": "cm4xp9qkw0001qj0g8xqg8xqg",
271
+ * "kind": "OperationCreated"
272
+ * }
273
+ */
358
274
  CreateOperationResponse: {
359
275
  /**
360
- * @description Resource type identifier
276
+ * Kind
277
+ * @description Resource type identifier for response routing
361
278
  * @default OperationCreated
362
279
  * @example OperationCreated
280
+ * @constant
363
281
  */
364
- kind: string;
282
+ kind: "OperationCreated";
365
283
  /**
366
- * @description The operation ID for tracking the computation
367
- * @example test-prediction-id-123
284
+ * Id
285
+ * @description Unique operation identifier for tracking and status queries
286
+ * @example cm4xp9qkw0001qj0g8xqg8xqg
368
287
  */
369
288
  id: string;
370
289
  /**
371
- * Format: date-time
372
- * @description The timestamp when the operation was created
290
+ * Created At
291
+ * @description ISO 8601 timestamp when operation was created
373
292
  * @example 2024-01-01T00:00:00Z
374
293
  */
375
294
  created_at: string;
376
295
  };
296
+ /**
297
+ * ErrorResponse
298
+ * @description Standardized error response format.
299
+ * @example {
300
+ * "detail": "Signature verification failed",
301
+ * "error_code": "INVALID_SIGNATURE",
302
+ * "field": "app_signature",
303
+ * "hint": "Ensure signature is hex-encoded with 0x prefix",
304
+ * "kind": "Error"
305
+ * }
306
+ */
307
+ ErrorResponse: {
308
+ /**
309
+ * Kind
310
+ * @description Resource type identifier for error responses
311
+ * @default Error
312
+ * @example Error
313
+ * @constant
314
+ */
315
+ kind: "Error";
316
+ /**
317
+ * Detail
318
+ * @description Human-readable error message explaining what went wrong
319
+ * @example Signature verification failed
320
+ */
321
+ detail: string;
322
+ /**
323
+ * Error Code
324
+ * @description Machine-readable error code for programmatic handling. Common codes: INVALID_SIGNATURE, PERMISSION_DENIED, NOT_FOUND, RATE_LIMIT_EXCEEDED, INTERNAL_SERVER_ERROR
325
+ * @example INVALID_SIGNATURE
326
+ */
327
+ error_code: string;
328
+ /**
329
+ * Field
330
+ * @description Specific field that caused the error, if applicable
331
+ * @example app_signature
332
+ */
333
+ field?: string | null;
334
+ };
335
+ /**
336
+ * GetOperationResponse
337
+ * @description Operation status and result information.
338
+ * @example {
339
+ * "finished_at": "2024-01-01T00:00:05Z",
340
+ * "id": "cm4xp9qkw0001qj0g8xqg8xqg",
341
+ * "kind": "OperationStatus",
342
+ * "result": {
343
+ * "output": "The analysis of your data indicates positive trends..."
344
+ * },
345
+ * "started_at": "2024-01-01T00:00:01Z",
346
+ * "status": "succeeded"
347
+ * }
348
+ */
377
349
  GetOperationResponse: {
378
350
  /**
379
- * @description Resource type identifier
351
+ * Kind
352
+ * @description Resource type identifier for response routing
380
353
  * @default OperationStatus
381
354
  * @example OperationStatus
355
+ * @constant
382
356
  */
383
- kind: string;
357
+ kind: "OperationStatus";
384
358
  /**
385
- * @description The operation ID
386
- * @example test-prediction-id-123
359
+ * Id
360
+ * @description Unique operation identifier
361
+ * @example cm4xp9qkw0001qj0g8xqg8xqg
387
362
  */
388
363
  id: string;
389
364
  /**
390
- * @description The status of the operation
365
+ * Status
366
+ * @description Current operation status. Transitions: starting → processing → (succeeded|failed|canceled)
367
+ * @example processing
391
368
  * @enum {string}
392
369
  */
393
- status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
370
+ status: "starting" | "processing" | "succeeded" | "failed" | "canceled";
394
371
  /**
395
- * Format: date-time
396
- * @description Optional timestamp when the operation started
397
- * @example 2024-01-01T00:00:00Z
372
+ * Started At
373
+ * @description ISO 8601 timestamp when operation began processing
374
+ * @example 2024-01-01T00:00:01Z
398
375
  */
399
376
  started_at?: string | null;
400
377
  /**
401
- * Format: date-time
402
- * @description Optional timestamp when the operation finished
403
- * @example 2024-01-01T00:00:00Z
378
+ * Finished At
379
+ * @description ISO 8601 timestamp when operation completed (succeeded, failed, or canceled)
380
+ * @example 2024-01-01T00:00:05Z
404
381
  */
405
382
  finished_at?: string | null;
406
- /** @description Optional result data if operation completed successfully */
407
- result?: string | null;
408
- };
409
- PersonalServerModel: {
410
383
  /**
411
- * @description Resource type identifier
412
- * @default PersonalServer
413
- * @example PersonalServer
384
+ * Result
385
+ * @description Operation result data as a dictionary. Format depends on operation type. For LLM inference: {'output': 'generated text'} or parsed JSON object. For JSON mode: parsed JSON object structure.
386
+ * @example {
387
+ * "output": "The analysis of your data indicates positive trends in engagement metrics..."
388
+ * }
414
389
  */
415
- kind: string;
416
- address: components["schemas"]["EthereumAddress"];
417
- public_key: components["schemas"]["PublicKey"];
390
+ result?: {
391
+ [key: string]: unknown;
392
+ } | null;
418
393
  };
394
+ /** HTTPValidationError */
395
+ HTTPValidationError: {
396
+ /** Detail */
397
+ detail?: components["schemas"]["ValidationError"][];
398
+ };
399
+ /**
400
+ * IdentityResponseModel
401
+ * @description Identity response containing user and personal server information.
402
+ * @example {
403
+ * "kind": "Identity",
404
+ * "personal_server": {
405
+ * "address": "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
406
+ * "kind": "PersonalServer",
407
+ * "public_key": "0x04bcdf3e094f5c9a7819baedfabe81c235b8e6c8a5b26b62a98fa685deaac1e488090fa3c6b2667c1bf3a6e593bc0fb3e670f78a72e9fe0b1c40e2f9dda957f61a"
408
+ * },
409
+ * "user_address": "0xf0ebD65BEaDacD191dc96D8EC69bbA4ABCf621D4"
410
+ * }
411
+ */
419
412
  IdentityResponseModel: {
420
413
  /**
421
- * @description Resource type identifier
414
+ * Kind
415
+ * @description Resource type identifier for response routing
422
416
  * @default Identity
423
417
  * @example Identity
418
+ * @constant
424
419
  */
425
- kind: string;
426
- user_address: components["schemas"]["EthereumAddress"];
427
- personal_server: components["schemas"]["PersonalServerModel"];
428
- };
429
- ErrorResponse: {
420
+ kind: "Identity";
430
421
  /**
431
- * @description Resource type identifier
432
- * @default Error
433
- * @example Error
422
+ * User Address
423
+ * @description User's EVM wallet address
424
+ * @example 0xf0ebD65BEaDacD191dc96D8EC69bbA4ABCf621D4
434
425
  */
435
- kind: string;
426
+ user_address: string;
427
+ /** @description Personal server details for this user */
428
+ personal_server: components["schemas"]["PersonalServerModel"];
429
+ };
430
+ /**
431
+ * PersonalServerModel
432
+ * @description Personal server identity information.
433
+ * @example {
434
+ * "address": "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
435
+ * "kind": "PersonalServer",
436
+ * "public_key": "0x04bcdf3e094f5c9a7819baedfabe81c235b8e6c8a5b26b62a98fa685deaac1e488090fa3c6b2667c1bf3a6e593bc0fb3e670f78a72e9fe0b1c40e2f9dda957f61a"
437
+ * }
438
+ */
439
+ PersonalServerModel: {
436
440
  /**
437
- * @description Human-readable error message
438
- * @example Operation not found
441
+ * Kind
442
+ * @description Resource type identifier for response routing
443
+ * @default PersonalServer
444
+ * @example PersonalServer
445
+ * @constant
439
446
  */
440
- detail: string;
447
+ kind: "PersonalServer";
441
448
  /**
442
- * @description Machine-readable error code
443
- * @example NOT_FOUND_ERROR
449
+ * Address
450
+ * @description Personal server's EVM wallet address
451
+ * @example 0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36
444
452
  */
445
- error_code: string;
453
+ address: string;
446
454
  /**
447
- * @description Field name when error is related to a specific input field
448
- * @example permission_id
455
+ * Public Key
456
+ * @description Personal server's public key for encryption (SEC1 uncompressed format)
457
+ * @example 0x04bcdf3e094f5c9a7819baedfabe81c235b8e6c8a5b26b62a98fa685deaac1e488090fa3c6b2667c1bf3a6e593bc0fb3e670f78a72e9fe0b1c40e2f9dda957f61a
449
458
  */
450
- field?: string | null;
459
+ public_key: string;
451
460
  };
452
- /** @description Response format specification for LLM operations */
453
- ResponseFormat: {
454
- /**
455
- * @description The response format type
456
- * @example json_object
457
- * @enum {string}
458
- */
459
- type: "text" | "json_object";
460
- };
461
- BaseGrantFile: {
462
- grantee: components["schemas"]["EthereumAddress"];
463
- /** @description The type of operation to perform */
464
- operation: string;
465
- /** @description Operation-specific parameters */
466
- parameters: Record<string, never>;
467
- /**
468
- * @description Optional Unix timestamp when grant expires
469
- * @example 1736467579
470
- */
471
- expires?: number;
461
+ /** ValidationError */
462
+ ValidationError: {
463
+ /** Location */
464
+ loc: (string | number)[];
465
+ /** Message */
466
+ msg: string;
467
+ /** Error Type */
468
+ type: string;
472
469
  };
473
- LLMInferenceGrantFile: Omit<components["schemas"]["BaseGrantFile"], "operation"> & {
474
- /**
475
- * @example llm_inference
476
- * @enum {string}
477
- */
478
- operation?: "llm_inference";
479
- /** @description LLM inference parameters */
480
- parameters?: {
481
- /**
482
- * @description The prompt template with {{data}} placeholder
483
- * @example Analyze this data: {{data}}
484
- */
485
- prompt: string;
486
- response_format?: components["schemas"]["ResponseFormat"];
487
- } & {
488
- [key: string]: unknown;
489
- };
490
- } & {
491
- /**
492
- * @description discriminator enum property added by openapi-typescript
493
- * @enum {string}
494
- */
495
- operation: "LLMInferenceGrantFile";
496
- } & {
497
- /**
498
- * @description discriminator enum property added by openapi-typescript
499
- * @enum {string}
500
- */
501
- operation: "llm_inference";
502
- };
503
- /** @description Grant file structure that defines the operation and its parameters.
504
- * The grant file is cryptographically signed and contains the user's intent.
505
- *
506
- * **Currently Supported Operations:**
507
- * - `llm_inference`: Large Language Model inference with optional JSON mode
508
- *
509
- * **Future Operations:**
510
- * Additional operation types will be added as the platform expands.
511
- *
512
- * **JSON Mode (LLM only):**
513
- * When `response_format.type` is `json_object`, the LLM will output valid JSON.
514
- * */
515
- GrantFile: components["schemas"]["LLMInferenceGrantFile"];
516
- ValidationErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
517
- AuthenticationErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
518
- AuthorizationErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
519
- NotFoundErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
520
- BlockchainErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
521
- FileAccessErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
522
- ComputeErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
523
- DecryptionErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
524
- GrantValidationErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
525
- OperationErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
526
- InternalServerErrorResponse: components["schemas"]["ErrorResponse"] & Record<string, never>;
527
470
  };
528
471
  responses: never;
529
- parameters: {
530
- /** @description The operation ID */
531
- OpId: string;
532
- };
472
+ parameters: never;
533
473
  requestBodies: never;
534
474
  headers: never;
535
475
  pathItems: never;
536
476
  }
537
477
  export type $defs = Record<string, never>;
538
- export type operations = Record<string, never>;
478
+ export interface operations {
479
+ create_operation_api_v1_operations_post: {
480
+ parameters: {
481
+ query?: never;
482
+ header?: {
483
+ "x-request-id"?: string | null;
484
+ };
485
+ path?: never;
486
+ cookie?: never;
487
+ };
488
+ requestBody: {
489
+ content: {
490
+ "application/json": components["schemas"]["CreateOperationRequest"];
491
+ };
492
+ };
493
+ responses: {
494
+ /** @description Operation accepted and queued for processing */
495
+ 202: {
496
+ headers: {
497
+ [name: string]: unknown;
498
+ };
499
+ content: {
500
+ /** @example {
501
+ * "kind": "OperationCreated",
502
+ * "id": "cm4xp9qkw0001qj0g8xqg8xqg",
503
+ * "created_at": "2024-01-01T00:00:00Z"
504
+ * } */
505
+ "application/json": components["schemas"]["CreateOperationResponse"];
506
+ };
507
+ };
508
+ /** @description Invalid request format or malformed JSON in operation_request_json */
509
+ 400: {
510
+ headers: {
511
+ [name: string]: unknown;
512
+ };
513
+ content: {
514
+ "application/json": components["schemas"]["ErrorResponse"];
515
+ };
516
+ };
517
+ /** @description Signature verification failed or invalid authentication */
518
+ 401: {
519
+ headers: {
520
+ [name: string]: unknown;
521
+ };
522
+ content: {
523
+ "application/json": components["schemas"]["ErrorResponse"];
524
+ };
525
+ };
526
+ /** @description No valid blockchain permission for requested operation */
527
+ 403: {
528
+ headers: {
529
+ [name: string]: unknown;
530
+ };
531
+ content: {
532
+ "application/json": components["schemas"]["ErrorResponse"];
533
+ };
534
+ };
535
+ /** @description Referenced permission or grant file not found */
536
+ 404: {
537
+ headers: {
538
+ [name: string]: unknown;
539
+ };
540
+ content: {
541
+ "application/json": components["schemas"]["ErrorResponse"];
542
+ };
543
+ };
544
+ /** @description Validation Error */
545
+ 422: {
546
+ headers: {
547
+ [name: string]: unknown;
548
+ };
549
+ content: {
550
+ "application/json": components["schemas"]["HTTPValidationError"];
551
+ };
552
+ };
553
+ /** @description Rate limit exceeded - retry with exponential backoff */
554
+ 429: {
555
+ headers: {
556
+ [name: string]: unknown;
557
+ };
558
+ content: {
559
+ "application/json": components["schemas"]["ErrorResponse"];
560
+ };
561
+ };
562
+ /** @description Internal server error or backend service unavailable */
563
+ 500: {
564
+ headers: {
565
+ [name: string]: unknown;
566
+ };
567
+ content: {
568
+ "application/json": components["schemas"]["ErrorResponse"];
569
+ };
570
+ };
571
+ };
572
+ };
573
+ get_operation_api_v1_operations__operation_id__get: {
574
+ parameters: {
575
+ query?: never;
576
+ header?: never;
577
+ path: {
578
+ /** @description Unique operation identifier from create operation */
579
+ operation_id: string;
580
+ };
581
+ cookie?: never;
582
+ };
583
+ requestBody?: never;
584
+ responses: {
585
+ /** @description Operation status retrieved successfully */
586
+ 200: {
587
+ headers: {
588
+ [name: string]: unknown;
589
+ };
590
+ content: {
591
+ /** @example {
592
+ * "kind": "OperationStatus",
593
+ * "id": "cm4xp9qkw0001qj0g8xqg8xqg",
594
+ * "status": "succeeded",
595
+ * "started_at": "2024-01-01T00:00:01Z",
596
+ * "finished_at": "2024-01-01T00:00:05Z",
597
+ * "result": "The analysis indicates positive trends..."
598
+ * } */
599
+ "application/json": components["schemas"]["GetOperationResponse"];
600
+ };
601
+ };
602
+ /** @description Operation not found - ID may be invalid or expired */
603
+ 404: {
604
+ headers: {
605
+ [name: string]: unknown;
606
+ };
607
+ content: {
608
+ "application/json": components["schemas"]["ErrorResponse"];
609
+ };
610
+ };
611
+ /** @description Validation Error */
612
+ 422: {
613
+ headers: {
614
+ [name: string]: unknown;
615
+ };
616
+ content: {
617
+ "application/json": components["schemas"]["HTTPValidationError"];
618
+ };
619
+ };
620
+ /** @description Internal server error retrieving operation status */
621
+ 500: {
622
+ headers: {
623
+ [name: string]: unknown;
624
+ };
625
+ content: {
626
+ "application/json": components["schemas"]["ErrorResponse"];
627
+ };
628
+ };
629
+ };
630
+ };
631
+ cancel_operation_api_v1_operations__operation_id__cancel_post: {
632
+ parameters: {
633
+ query?: never;
634
+ header?: never;
635
+ path: {
636
+ /** @description Unique operation identifier to cancel */
637
+ operation_id: string;
638
+ };
639
+ cookie?: never;
640
+ };
641
+ requestBody?: never;
642
+ responses: {
643
+ /** @description Operation canceled successfully */
644
+ 204: {
645
+ headers: {
646
+ [name: string]: unknown;
647
+ };
648
+ content?: never;
649
+ };
650
+ /** @description Operation not found or already completed */
651
+ 404: {
652
+ headers: {
653
+ [name: string]: unknown;
654
+ };
655
+ content: {
656
+ "application/json": components["schemas"]["ErrorResponse"];
657
+ };
658
+ };
659
+ /** @description Validation Error */
660
+ 422: {
661
+ headers: {
662
+ [name: string]: unknown;
663
+ };
664
+ content: {
665
+ "application/json": components["schemas"]["HTTPValidationError"];
666
+ };
667
+ };
668
+ /** @description Rate limit exceeded for cancellation requests */
669
+ 429: {
670
+ headers: {
671
+ [name: string]: unknown;
672
+ };
673
+ content: {
674
+ "application/json": components["schemas"]["ErrorResponse"];
675
+ };
676
+ };
677
+ /** @description Internal server error during cancellation */
678
+ 500: {
679
+ headers: {
680
+ [name: string]: unknown;
681
+ };
682
+ content: {
683
+ "application/json": components["schemas"]["ErrorResponse"];
684
+ };
685
+ };
686
+ };
687
+ };
688
+ get_identity_api_v1_identity_get: {
689
+ parameters: {
690
+ query: {
691
+ /**
692
+ * @description User's EVM wallet address (EIP-55 checksum format)
693
+ * @example 0xf0ebD65BEaDacD191dc96D8EC69bbA4ABCf621D4
694
+ */
695
+ address: string;
696
+ };
697
+ header?: never;
698
+ path?: never;
699
+ cookie?: never;
700
+ };
701
+ requestBody?: never;
702
+ responses: {
703
+ /** @description Identity information retrieved successfully */
704
+ 200: {
705
+ headers: {
706
+ [name: string]: unknown;
707
+ };
708
+ content: {
709
+ /** @example {
710
+ * "kind": "Identity",
711
+ * "user_address": "0xf0ebD65BEaDacD191dc96D8EC69bbA4ABCf621D4",
712
+ * "personal_server": {
713
+ * "kind": "PersonalServer",
714
+ * "address": "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
715
+ * "public_key": "0x04bcdf3e094f5c9a7819baedfabe81c235b8e6c8a5b26b62a98fa685deaac1e488090fa3c6b2667c1bf3a6e593bc0fb3e670f78a72e9fe0b1c40e2f9dda957f61a"
716
+ * }
717
+ * } */
718
+ "application/json": components["schemas"]["IdentityResponseModel"];
719
+ };
720
+ };
721
+ /** @description Invalid EVM address format */
722
+ 400: {
723
+ headers: {
724
+ [name: string]: unknown;
725
+ };
726
+ content: {
727
+ "application/json": components["schemas"]["ErrorResponse"];
728
+ };
729
+ };
730
+ /** @description Validation Error */
731
+ 422: {
732
+ headers: {
733
+ [name: string]: unknown;
734
+ };
735
+ content: {
736
+ "application/json": components["schemas"]["HTTPValidationError"];
737
+ };
738
+ };
739
+ /** @description Rate limit exceeded - retry with exponential backoff */
740
+ 429: {
741
+ headers: {
742
+ [name: string]: unknown;
743
+ };
744
+ content: {
745
+ "application/json": components["schemas"]["ErrorResponse"];
746
+ };
747
+ };
748
+ /** @description Internal server error during identity derivation */
749
+ 500: {
750
+ headers: {
751
+ [name: string]: unknown;
752
+ };
753
+ content: {
754
+ "application/json": components["schemas"]["ErrorResponse"];
755
+ };
756
+ };
757
+ };
758
+ };
759
+ download_artifact_api_v1_artifacts_download_post: {
760
+ parameters: {
761
+ query?: never;
762
+ header?: never;
763
+ path?: never;
764
+ cookie?: never;
765
+ };
766
+ requestBody: {
767
+ content: {
768
+ "application/json": components["schemas"]["ArtifactDownloadRequest"];
769
+ };
770
+ };
771
+ responses: {
772
+ /** @description Artifact file content with appropriate content type */
773
+ 200: {
774
+ headers: {
775
+ [name: string]: unknown;
776
+ };
777
+ content: {
778
+ /** @example {
779
+ * "result": "analysis data"
780
+ * } */
781
+ "application/json": unknown;
782
+ /** @example Text file content */
783
+ "text/plain": unknown;
784
+ /** @example # Report
785
+ * Content here */
786
+ "text/markdown": unknown;
787
+ };
788
+ };
789
+ /** @description Signature verification failed or invalid authentication */
790
+ 401: {
791
+ headers: {
792
+ [name: string]: unknown;
793
+ };
794
+ content: {
795
+ "application/json": components["schemas"]["ErrorResponse"];
796
+ };
797
+ };
798
+ /** @description Access denied - not the authorized grantee for this operation */
799
+ 403: {
800
+ headers: {
801
+ [name: string]: unknown;
802
+ };
803
+ content: {
804
+ "application/json": components["schemas"]["ErrorResponse"];
805
+ };
806
+ };
807
+ /** @description Operation or artifact not found */
808
+ 404: {
809
+ headers: {
810
+ [name: string]: unknown;
811
+ };
812
+ content: {
813
+ "application/json": components["schemas"]["ErrorResponse"];
814
+ };
815
+ };
816
+ /** @description Validation Error */
817
+ 422: {
818
+ headers: {
819
+ [name: string]: unknown;
820
+ };
821
+ content: {
822
+ "application/json": components["schemas"]["HTTPValidationError"];
823
+ };
824
+ };
825
+ /** @description Internal server error retrieving artifact */
826
+ 500: {
827
+ headers: {
828
+ [name: string]: unknown;
829
+ };
830
+ content: {
831
+ "application/json": components["schemas"]["ErrorResponse"];
832
+ };
833
+ };
834
+ };
835
+ };
836
+ list_artifacts_api_v1_artifacts__operation_id__list_post: {
837
+ parameters: {
838
+ query?: never;
839
+ header?: never;
840
+ path: {
841
+ operation_id: string;
842
+ };
843
+ cookie?: never;
844
+ };
845
+ requestBody: {
846
+ content: {
847
+ "application/json": components["schemas"]["ArtifactListRequest"];
848
+ };
849
+ };
850
+ responses: {
851
+ /** @description List of available artifacts retrieved successfully */
852
+ 200: {
853
+ headers: {
854
+ [name: string]: unknown;
855
+ };
856
+ content: {
857
+ "application/json": components["schemas"]["ArtifactListResponse"];
858
+ };
859
+ };
860
+ /** @description Signature verification failed or invalid authentication */
861
+ 401: {
862
+ headers: {
863
+ [name: string]: unknown;
864
+ };
865
+ content: {
866
+ "application/json": components["schemas"]["ErrorResponse"];
867
+ };
868
+ };
869
+ /** @description Access denied - not the authorized grantee for this operation */
870
+ 403: {
871
+ headers: {
872
+ [name: string]: unknown;
873
+ };
874
+ content: {
875
+ "application/json": components["schemas"]["ErrorResponse"];
876
+ };
877
+ };
878
+ /** @description Operation not found */
879
+ 404: {
880
+ headers: {
881
+ [name: string]: unknown;
882
+ };
883
+ content: {
884
+ "application/json": components["schemas"]["ErrorResponse"];
885
+ };
886
+ };
887
+ /** @description Validation Error */
888
+ 422: {
889
+ headers: {
890
+ [name: string]: unknown;
891
+ };
892
+ content: {
893
+ "application/json": components["schemas"]["HTTPValidationError"];
894
+ };
895
+ };
896
+ /** @description Internal server error retrieving artifact list */
897
+ 500: {
898
+ headers: {
899
+ [name: string]: unknown;
900
+ };
901
+ content: {
902
+ "application/json": components["schemas"]["ErrorResponse"];
903
+ };
904
+ };
905
+ };
906
+ };
907
+ }