@opendatalabs/vana-sdk 0.1.0-alpha.eebb656 → 0.1.0-alpha.ef15099

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 (545) hide show
  1. package/README.md +67 -351
  2. package/dist/browser.cjs.map +1 -1
  3. package/dist/browser.d.ts +33 -1
  4. package/dist/browser.js.map +1 -1
  5. package/dist/chains/definitions.cjs +9 -6
  6. package/dist/chains/definitions.cjs.map +1 -1
  7. package/dist/chains/definitions.d.ts +2 -0
  8. package/dist/chains/definitions.js +9 -6
  9. package/dist/chains/definitions.js.map +1 -1
  10. package/dist/chains/index.cjs.map +1 -1
  11. package/dist/chains/index.d.ts +30 -1
  12. package/dist/chains/index.js.map +1 -1
  13. package/dist/client/enhancedResponse.cjs +164 -0
  14. package/dist/client/enhancedResponse.cjs.map +1 -0
  15. package/dist/client/enhancedResponse.d.ts +120 -0
  16. package/dist/client/enhancedResponse.js +138 -0
  17. package/dist/client/enhancedResponse.js.map +1 -0
  18. package/dist/config/chains.cjs.map +1 -1
  19. package/dist/config/chains.d.ts +99 -0
  20. package/dist/config/chains.js.map +1 -1
  21. package/dist/config/contracts.config.cjs +400 -0
  22. package/dist/config/contracts.config.cjs.map +1 -0
  23. package/dist/config/contracts.config.d.ts +84 -0
  24. package/dist/config/contracts.config.js +375 -0
  25. package/dist/config/contracts.config.js.map +1 -0
  26. package/dist/config/default-services.cjs +60 -0
  27. package/dist/config/default-services.cjs.map +1 -0
  28. package/dist/config/default-services.d.ts +46 -0
  29. package/dist/config/default-services.js +33 -0
  30. package/dist/config/default-services.js.map +1 -0
  31. package/dist/config/default-services.test.d.ts +1 -0
  32. package/dist/contracts/contractController.cjs +1 -1
  33. package/dist/contracts/contractController.cjs.map +1 -1
  34. package/dist/contracts/contractController.d.ts +66 -10
  35. package/dist/contracts/contractController.js +1 -1
  36. package/dist/contracts/contractController.js.map +1 -1
  37. package/dist/controllers/__tests__/data-consistency-integration.test.d.ts +7 -0
  38. package/dist/controllers/__tests__/operations.processQueue.test.d.ts +1 -0
  39. package/dist/controllers/accessSettlement.cjs +289 -0
  40. package/dist/controllers/accessSettlement.cjs.map +1 -0
  41. package/dist/controllers/accessSettlement.d.ts +157 -0
  42. package/dist/controllers/accessSettlement.js +265 -0
  43. package/dist/controllers/accessSettlement.js.map +1 -0
  44. package/dist/controllers/accessSettlement.test.d.ts +1 -0
  45. package/dist/controllers/base.cjs +116 -0
  46. package/dist/controllers/base.cjs.map +1 -0
  47. package/dist/controllers/base.d.ts +94 -0
  48. package/dist/controllers/base.js +92 -0
  49. package/dist/controllers/base.js.map +1 -0
  50. package/dist/controllers/data.cjs +634 -352
  51. package/dist/controllers/data.cjs.map +1 -1
  52. package/dist/controllers/data.d.ts +348 -213
  53. package/dist/controllers/data.js +647 -355
  54. package/dist/controllers/data.js.map +1 -1
  55. package/dist/controllers/operations.cjs +430 -0
  56. package/dist/controllers/operations.cjs.map +1 -0
  57. package/dist/controllers/operations.d.ts +229 -0
  58. package/dist/controllers/operations.js +406 -0
  59. package/dist/controllers/operations.js.map +1 -0
  60. package/dist/controllers/permissions.cjs +943 -443
  61. package/dist/controllers/permissions.cjs.map +1 -1
  62. package/dist/controllers/permissions.d.ts +201 -120
  63. package/dist/controllers/permissions.js +943 -443
  64. package/dist/controllers/permissions.js.map +1 -1
  65. package/dist/controllers/protocol.cjs +14 -10
  66. package/dist/controllers/protocol.cjs.map +1 -1
  67. package/dist/controllers/protocol.d.ts +30 -31
  68. package/dist/controllers/protocol.js +14 -10
  69. package/dist/controllers/protocol.js.map +1 -1
  70. package/dist/controllers/runtimePermissions.cjs +272 -0
  71. package/dist/controllers/runtimePermissions.cjs.map +1 -0
  72. package/dist/controllers/runtimePermissions.d.ts +152 -0
  73. package/dist/controllers/runtimePermissions.js +251 -0
  74. package/dist/controllers/runtimePermissions.js.map +1 -0
  75. package/dist/controllers/runtimePermissions.test.d.ts +1 -0
  76. package/dist/controllers/schemas.cjs +113 -43
  77. package/dist/controllers/schemas.cjs.map +1 -1
  78. package/dist/controllers/schemas.d.ts +90 -43
  79. package/dist/controllers/schemas.js +113 -43
  80. package/dist/controllers/schemas.js.map +1 -1
  81. package/dist/controllers/server.cjs +276 -60
  82. package/dist/controllers/server.cjs.map +1 -1
  83. package/dist/controllers/server.d.ts +159 -54
  84. package/dist/controllers/server.js +276 -60
  85. package/dist/controllers/server.js.map +1 -1
  86. package/dist/core/__tests__/health.test.d.ts +1 -0
  87. package/dist/core/__tests__/inMemoryNonceManager.test.d.ts +1 -0
  88. package/dist/core/__tests__/nonceManager.test.d.ts +1 -0
  89. package/dist/core/__tests__/pollingManager.test.d.ts +4 -0
  90. package/dist/core/apiClient.cjs +53 -3
  91. package/dist/core/apiClient.cjs.map +1 -1
  92. package/dist/core/apiClient.d.ts +132 -7
  93. package/dist/core/apiClient.js +53 -3
  94. package/dist/core/apiClient.js.map +1 -1
  95. package/dist/core/generics.cjs +30 -3
  96. package/dist/core/generics.cjs.map +1 -1
  97. package/dist/core/generics.d.ts +95 -6
  98. package/dist/core/generics.js +30 -3
  99. package/dist/core/generics.js.map +1 -1
  100. package/dist/core/health.cjs +289 -0
  101. package/dist/core/health.cjs.map +1 -0
  102. package/dist/core/health.d.ts +143 -0
  103. package/dist/core/health.js +265 -0
  104. package/dist/core/health.js.map +1 -0
  105. package/dist/core/inMemoryNonceManager.cjs +138 -0
  106. package/dist/core/inMemoryNonceManager.cjs.map +1 -0
  107. package/dist/core/inMemoryNonceManager.d.ts +69 -0
  108. package/dist/core/inMemoryNonceManager.js +114 -0
  109. package/dist/core/inMemoryNonceManager.js.map +1 -0
  110. package/dist/core/nonceManager.cjs +304 -0
  111. package/dist/core/nonceManager.cjs.map +1 -0
  112. package/dist/core/nonceManager.d.ts +116 -0
  113. package/dist/core/nonceManager.js +280 -0
  114. package/dist/core/nonceManager.js.map +1 -0
  115. package/dist/core/pollingManager.cjs +292 -0
  116. package/dist/core/pollingManager.cjs.map +1 -0
  117. package/dist/core/pollingManager.d.ts +120 -0
  118. package/dist/core/pollingManager.js +268 -0
  119. package/dist/core/pollingManager.js.map +1 -0
  120. package/dist/core.cjs +164 -36
  121. package/dist/core.cjs.map +1 -1
  122. package/dist/core.d.ts +69 -10
  123. package/dist/core.js +167 -37
  124. package/dist/core.js.map +1 -1
  125. package/dist/crypto/ecies/__tests__/constants.test.d.ts +1 -1
  126. package/dist/crypto/ecies/__tests__/interface.test.d.ts +1 -0
  127. package/dist/crypto/ecies/__tests__/serialization.test.d.ts +8 -0
  128. package/dist/crypto/ecies/__tests__/utils.test.d.ts +1 -0
  129. package/dist/crypto/ecies/base.cjs +59 -23
  130. package/dist/crypto/ecies/base.cjs.map +1 -1
  131. package/dist/crypto/ecies/base.js +59 -23
  132. package/dist/crypto/ecies/base.js.map +1 -1
  133. package/dist/crypto/ecies/constants.cjs +2 -10
  134. package/dist/crypto/ecies/constants.cjs.map +1 -1
  135. package/dist/crypto/ecies/constants.d.ts +0 -9
  136. package/dist/crypto/ecies/constants.js +1 -8
  137. package/dist/crypto/ecies/constants.js.map +1 -1
  138. package/dist/crypto/ecies/interface.cjs +19 -2
  139. package/dist/crypto/ecies/interface.cjs.map +1 -1
  140. package/dist/crypto/ecies/interface.js +19 -2
  141. package/dist/crypto/ecies/interface.js.map +1 -1
  142. package/dist/errors.cjs +45 -0
  143. package/dist/errors.cjs.map +1 -1
  144. package/dist/errors.d.ts +104 -0
  145. package/dist/errors.js +43 -0
  146. package/dist/errors.js.map +1 -1
  147. package/dist/generated/abi/AccessSettlementImplementation.cjs +635 -0
  148. package/dist/generated/abi/AccessSettlementImplementation.cjs.map +1 -0
  149. package/dist/generated/abi/AccessSettlementImplementation.d.ts +468 -0
  150. package/dist/generated/abi/AccessSettlementImplementation.js +611 -0
  151. package/dist/generated/abi/AccessSettlementImplementation.js.map +1 -0
  152. package/dist/generated/abi/AttestationPolicyImplementation.cjs +614 -0
  153. package/dist/generated/abi/AttestationPolicyImplementation.cjs.map +1 -0
  154. package/dist/generated/abi/AttestationPolicyImplementation.d.ts +449 -0
  155. package/dist/generated/abi/AttestationPolicyImplementation.js +590 -0
  156. package/dist/generated/abi/AttestationPolicyImplementation.js.map +1 -0
  157. package/dist/generated/abi/ComputeEngineImplementation.cjs.map +1 -1
  158. package/dist/generated/abi/ComputeEngineImplementation.js.map +1 -1
  159. package/dist/generated/abi/{DLPTreasuryImplementation.cjs → ComputeEngineTreasuryImplementation.cjs} +16 -92
  160. package/dist/generated/abi/ComputeEngineTreasuryImplementation.cjs.map +1 -0
  161. package/dist/generated/abi/{DLPTreasuryImplementation.d.ts → ComputeEngineTreasuryImplementation.d.ts} +9 -67
  162. package/dist/generated/abi/{DLPTreasuryImplementation.js → ComputeEngineTreasuryImplementation.js} +12 -88
  163. package/dist/generated/abi/ComputeEngineTreasuryImplementation.js.map +1 -0
  164. package/dist/generated/abi/ComputeInstructionRegistryImplementation.cjs.map +1 -1
  165. package/dist/generated/abi/ComputeInstructionRegistryImplementation.js.map +1 -1
  166. package/dist/generated/abi/DATFactoryImplementation.cjs.map +1 -1
  167. package/dist/generated/abi/DATFactoryImplementation.js.map +1 -1
  168. package/dist/generated/abi/DATImplementation.cjs.map +1 -1
  169. package/dist/generated/abi/DATImplementation.js.map +1 -1
  170. package/dist/generated/abi/DATPausableImplementation.cjs.map +1 -1
  171. package/dist/generated/abi/DATPausableImplementation.js.map +1 -1
  172. package/dist/generated/abi/DATVotesImplementation.cjs.map +1 -1
  173. package/dist/generated/abi/DATVotesImplementation.js.map +1 -1
  174. package/dist/generated/abi/DLPPerformanceImplementation.cjs +42 -0
  175. package/dist/generated/abi/DLPPerformanceImplementation.cjs.map +1 -1
  176. package/dist/generated/abi/DLPPerformanceImplementation.d.ts +32 -0
  177. package/dist/generated/abi/DLPPerformanceImplementation.js +42 -0
  178. package/dist/generated/abi/DLPPerformanceImplementation.js.map +1 -1
  179. package/dist/generated/abi/DLPRegistryImplementation.cjs +5 -5
  180. package/dist/generated/abi/DLPRegistryImplementation.cjs.map +1 -1
  181. package/dist/generated/abi/DLPRegistryImplementation.d.ts +4 -4
  182. package/dist/generated/abi/DLPRegistryImplementation.js +5 -5
  183. package/dist/generated/abi/DLPRegistryImplementation.js.map +1 -1
  184. package/dist/generated/abi/DLPRegistryTreasuryImplementation.cjs.map +1 -1
  185. package/dist/generated/abi/DLPRegistryTreasuryImplementation.js.map +1 -1
  186. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs +166 -2
  187. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs.map +1 -1
  188. package/dist/generated/abi/DLPRewardDeployerImplementation.d.ts +129 -2
  189. package/dist/generated/abi/DLPRewardDeployerImplementation.js +166 -2
  190. package/dist/generated/abi/DLPRewardDeployerImplementation.js.map +1 -1
  191. package/dist/generated/abi/DLPRewardSwapImplementation.cjs.map +1 -1
  192. package/dist/generated/abi/DLPRewardSwapImplementation.js.map +1 -1
  193. package/dist/generated/abi/DataLiquidityPoolImplementation.cjs +282 -100
  194. package/dist/generated/abi/DataLiquidityPoolImplementation.cjs.map +1 -1
  195. package/dist/generated/abi/DataLiquidityPoolImplementation.d.ts +218 -79
  196. package/dist/generated/abi/DataLiquidityPoolImplementation.js +281 -99
  197. package/dist/generated/abi/DataLiquidityPoolImplementation.js.map +1 -1
  198. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs +167 -19
  199. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs.map +1 -1
  200. package/dist/generated/abi/DataPortabilityGranteesImplementation.d.ts +127 -14
  201. package/dist/generated/abi/DataPortabilityGranteesImplementation.js +167 -19
  202. package/dist/generated/abi/DataPortabilityGranteesImplementation.js.map +1 -1
  203. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs +0 -19
  204. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs.map +1 -1
  205. package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.ts +0 -14
  206. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js +0 -19
  207. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js.map +1 -1
  208. package/dist/generated/abi/DataPortabilityServersImplementation.cjs +0 -19
  209. package/dist/generated/abi/DataPortabilityServersImplementation.cjs.map +1 -1
  210. package/dist/generated/abi/DataPortabilityServersImplementation.d.ts +0 -14
  211. package/dist/generated/abi/DataPortabilityServersImplementation.js +0 -19
  212. package/dist/generated/abi/DataPortabilityServersImplementation.js.map +1 -1
  213. package/dist/generated/abi/DataRefinerRegistryImplementation.cjs.map +1 -1
  214. package/dist/generated/abi/DataRefinerRegistryImplementation.js.map +1 -1
  215. package/dist/generated/abi/DataRegistryImplementation.cjs +0 -13
  216. package/dist/generated/abi/DataRegistryImplementation.cjs.map +1 -1
  217. package/dist/generated/abi/DataRegistryImplementation.d.ts +0 -10
  218. package/dist/generated/abi/DataRegistryImplementation.js +0 -13
  219. package/dist/generated/abi/DataRegistryImplementation.js.map +1 -1
  220. package/dist/generated/abi/DatasetRegistryImplementation.cjs +751 -0
  221. package/dist/generated/abi/DatasetRegistryImplementation.cjs.map +1 -0
  222. package/dist/generated/abi/DatasetRegistryImplementation.d.ts +557 -0
  223. package/dist/generated/abi/DatasetRegistryImplementation.js +727 -0
  224. package/dist/generated/abi/DatasetRegistryImplementation.js.map +1 -0
  225. package/dist/generated/abi/ProtocolConfigImplementation.cjs +578 -0
  226. package/dist/generated/abi/ProtocolConfigImplementation.cjs.map +1 -0
  227. package/dist/generated/abi/ProtocolConfigImplementation.d.ts +423 -0
  228. package/dist/generated/abi/ProtocolConfigImplementation.js +554 -0
  229. package/dist/generated/abi/ProtocolConfigImplementation.js.map +1 -0
  230. package/dist/generated/abi/QueryEngineImplementation.cjs.map +1 -1
  231. package/dist/generated/abi/QueryEngineImplementation.js.map +1 -1
  232. package/dist/generated/abi/SwapHelperImplementation.cjs +0 -43
  233. package/dist/generated/abi/SwapHelperImplementation.cjs.map +1 -1
  234. package/dist/generated/abi/SwapHelperImplementation.d.ts +0 -35
  235. package/dist/generated/abi/SwapHelperImplementation.js +0 -43
  236. package/dist/generated/abi/SwapHelperImplementation.js.map +1 -1
  237. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.cjs.map +1 -1
  238. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.js.map +1 -1
  239. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.cjs.map +1 -1
  240. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.js.map +1 -1
  241. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.cjs.map +1 -1
  242. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.js.map +1 -1
  243. package/dist/generated/abi/TeePoolPersistentGpuImplementation.cjs.map +1 -1
  244. package/dist/generated/abi/TeePoolPersistentGpuImplementation.js.map +1 -1
  245. package/dist/generated/abi/TeePoolPersistentStandardImplementation.cjs.map +1 -1
  246. package/dist/generated/abi/TeePoolPersistentStandardImplementation.js.map +1 -1
  247. package/dist/generated/abi/TeePoolPhalaImplementation.cjs.map +1 -1
  248. package/dist/generated/abi/TeePoolPhalaImplementation.js.map +1 -1
  249. package/dist/generated/abi/UniswapV3NonfungiblePositionManagerImplementation.cjs +1251 -0
  250. package/dist/generated/abi/UniswapV3NonfungiblePositionManagerImplementation.cjs.map +1 -0
  251. package/dist/generated/abi/UniswapV3NonfungiblePositionManagerImplementation.d.ts +948 -0
  252. package/dist/generated/abi/UniswapV3NonfungiblePositionManagerImplementation.js +1227 -0
  253. package/dist/generated/abi/UniswapV3NonfungiblePositionManagerImplementation.js.map +1 -0
  254. package/dist/generated/abi/UniswapV3QuoterV2Implementation.cjs +297 -0
  255. package/dist/generated/abi/UniswapV3QuoterV2Implementation.cjs.map +1 -0
  256. package/dist/generated/abi/UniswapV3QuoterV2Implementation.d.ts +206 -0
  257. package/dist/generated/abi/UniswapV3QuoterV2Implementation.js +273 -0
  258. package/dist/generated/abi/UniswapV3QuoterV2Implementation.js.map +1 -0
  259. package/dist/generated/abi/VanaEpochImplementation.cjs +195 -0
  260. package/dist/generated/abi/VanaEpochImplementation.cjs.map +1 -1
  261. package/dist/generated/abi/VanaEpochImplementation.d.ts +151 -0
  262. package/dist/generated/abi/VanaEpochImplementation.js +195 -0
  263. package/dist/generated/abi/VanaEpochImplementation.js.map +1 -1
  264. package/dist/generated/abi/VanaPoolEntityImplementation.cjs +22 -65
  265. package/dist/generated/abi/VanaPoolEntityImplementation.cjs.map +1 -1
  266. package/dist/generated/abi/VanaPoolEntityImplementation.d.ts +17 -51
  267. package/dist/generated/abi/VanaPoolEntityImplementation.js +22 -65
  268. package/dist/generated/abi/VanaPoolEntityImplementation.js.map +1 -1
  269. package/dist/generated/abi/VanaPoolStakingImplementation.cjs +113 -1
  270. package/dist/generated/abi/VanaPoolStakingImplementation.cjs.map +1 -1
  271. package/dist/generated/abi/VanaPoolStakingImplementation.d.ts +85 -1
  272. package/dist/generated/abi/VanaPoolStakingImplementation.js +113 -1
  273. package/dist/generated/abi/VanaPoolStakingImplementation.js.map +1 -1
  274. package/dist/generated/abi/VanaPoolTreasuryImplementation.cjs.map +1 -1
  275. package/dist/generated/abi/VanaPoolTreasuryImplementation.js.map +1 -1
  276. package/dist/generated/abi/VanaRuntimePermissionsImplementation.cjs +759 -0
  277. package/dist/generated/abi/VanaRuntimePermissionsImplementation.cjs.map +1 -0
  278. package/dist/generated/abi/VanaRuntimePermissionsImplementation.d.ts +563 -0
  279. package/dist/generated/abi/VanaRuntimePermissionsImplementation.js +735 -0
  280. package/dist/generated/abi/VanaRuntimePermissionsImplementation.js.map +1 -0
  281. package/dist/generated/abi/VanaRuntimeServersImplementation.cjs +820 -0
  282. package/dist/generated/abi/VanaRuntimeServersImplementation.cjs.map +1 -0
  283. package/dist/generated/abi/VanaRuntimeServersImplementation.d.ts +609 -0
  284. package/dist/generated/abi/VanaRuntimeServersImplementation.js +796 -0
  285. package/dist/generated/abi/VanaRuntimeServersImplementation.js.map +1 -0
  286. package/dist/generated/abi/VanaTreasuryImplementation.cjs +536 -0
  287. package/dist/generated/abi/VanaTreasuryImplementation.cjs.map +1 -0
  288. package/dist/generated/abi/VanaTreasuryImplementation.d.ts +393 -0
  289. package/dist/generated/abi/VanaTreasuryImplementation.js +512 -0
  290. package/dist/generated/abi/VanaTreasuryImplementation.js.map +1 -0
  291. package/dist/generated/abi/WVANAImplementation.cjs +339 -0
  292. package/dist/generated/abi/WVANAImplementation.cjs.map +1 -0
  293. package/dist/generated/abi/WVANAImplementation.d.ts +244 -0
  294. package/dist/generated/abi/WVANAImplementation.js +315 -0
  295. package/dist/generated/abi/WVANAImplementation.js.map +1 -0
  296. package/dist/generated/abi/index.cjs +79 -47
  297. package/dist/generated/abi/index.cjs.map +1 -1
  298. package/dist/generated/abi/index.d.ts +15783 -10449
  299. package/dist/generated/abi/index.js +65 -43
  300. package/dist/generated/abi/index.js.map +1 -1
  301. package/dist/{config → generated}/addresses.cjs +174 -75
  302. package/dist/generated/addresses.cjs.map +1 -0
  303. package/dist/{config → generated}/addresses.d.ts +174 -165
  304. package/dist/{config → generated}/addresses.js +174 -75
  305. package/dist/generated/addresses.js.map +1 -0
  306. package/dist/generated/event-types.cjs.map +1 -1
  307. package/dist/generated/event-types.d.ts +482 -399
  308. package/dist/generated/eventRegistry.cjs +2601 -724
  309. package/dist/generated/eventRegistry.cjs.map +1 -1
  310. package/dist/generated/eventRegistry.d.ts +2 -2
  311. package/dist/generated/eventRegistry.js +2601 -724
  312. package/dist/generated/eventRegistry.js.map +1 -1
  313. package/dist/generated/server/server-exports.cjs +22 -0
  314. package/dist/generated/server/server-exports.cjs.map +1 -1
  315. package/dist/generated/server/server-exports.d.ts +31 -11
  316. package/dist/generated/server/server-exports.js +17 -0
  317. package/dist/generated/server/server-exports.js.map +1 -1
  318. package/dist/generated/server/server.cjs.map +1 -1
  319. package/dist/generated/server/server.d.ts +771 -402
  320. package/dist/generated/subgraph.cjs +797 -32
  321. package/dist/generated/subgraph.cjs.map +1 -1
  322. package/dist/generated/subgraph.d.ts +135 -0
  323. package/dist/generated/subgraph.js +792 -32
  324. package/dist/generated/subgraph.js.map +1 -1
  325. package/dist/index.browser.d.ts +6 -1
  326. package/dist/index.browser.js +26 -1
  327. package/dist/index.browser.js.map +1 -1
  328. package/dist/index.cjs.map +1 -1
  329. package/dist/index.js.map +1 -1
  330. package/dist/index.node.cjs +47 -4
  331. package/dist/index.node.cjs.map +1 -1
  332. package/dist/index.node.d.ts +60 -14
  333. package/dist/index.node.js +42 -3
  334. package/dist/index.node.js.map +1 -1
  335. package/dist/lib/__tests__/redisAtomicStore.test.d.ts +1 -0
  336. package/dist/lib/redisAtomicStore.cjs +201 -0
  337. package/dist/lib/redisAtomicStore.cjs.map +1 -0
  338. package/dist/lib/redisAtomicStore.d.ts +120 -0
  339. package/dist/lib/redisAtomicStore.js +177 -0
  340. package/dist/lib/redisAtomicStore.js.map +1 -0
  341. package/dist/node.cjs.map +1 -1
  342. package/dist/node.d.ts +39 -1
  343. package/dist/node.js.map +1 -1
  344. package/dist/platform/browser.cjs +160 -2
  345. package/dist/platform/browser.cjs.map +1 -1
  346. package/dist/platform/browser.d.ts +232 -12
  347. package/dist/platform/browser.js +160 -2
  348. package/dist/platform/browser.js.map +1 -1
  349. package/dist/platform/interface.cjs.map +1 -1
  350. package/dist/platform/interface.d.ts +283 -90
  351. package/dist/platform/node.cjs +163 -2
  352. package/dist/platform/node.cjs.map +1 -1
  353. package/dist/platform/node.d.ts +69 -6
  354. package/dist/platform/node.js +163 -2
  355. package/dist/platform/node.js.map +1 -1
  356. package/dist/server/relayerHandler.cjs +452 -0
  357. package/dist/server/relayerHandler.cjs.map +1 -0
  358. package/dist/server/relayerHandler.d.ts +69 -0
  359. package/dist/server/relayerHandler.js +428 -0
  360. package/dist/server/relayerHandler.js.map +1 -0
  361. package/dist/storage/index.cjs +3 -0
  362. package/dist/storage/index.cjs.map +1 -1
  363. package/dist/storage/index.d.ts +1 -0
  364. package/dist/storage/index.js +2 -0
  365. package/dist/storage/index.js.map +1 -1
  366. package/dist/storage/manager.cjs +108 -25
  367. package/dist/storage/manager.cjs.map +1 -1
  368. package/dist/storage/manager.d.ts +119 -25
  369. package/dist/storage/manager.js +108 -25
  370. package/dist/storage/manager.js.map +1 -1
  371. package/dist/storage/providers/callback-storage.cjs +86 -15
  372. package/dist/storage/providers/callback-storage.cjs.map +1 -1
  373. package/dist/storage/providers/callback-storage.d.ts +109 -20
  374. package/dist/storage/providers/callback-storage.js +86 -15
  375. package/dist/storage/providers/callback-storage.js.map +1 -1
  376. package/dist/storage/providers/dropbox.cjs +237 -0
  377. package/dist/storage/providers/dropbox.cjs.map +1 -0
  378. package/dist/storage/providers/dropbox.d.ts +39 -0
  379. package/dist/storage/providers/dropbox.js +215 -0
  380. package/dist/storage/providers/dropbox.js.map +1 -0
  381. package/dist/storage/providers/dropbox.test.d.ts +1 -0
  382. package/dist/storage/providers/pinata.cjs.map +1 -1
  383. package/dist/storage/providers/pinata.d.ts +12 -14
  384. package/dist/storage/providers/pinata.js.map +1 -1
  385. package/dist/tests/data-upload-owner-validation.test.d.ts +1 -0
  386. package/dist/tests/factories/mockFactory.d.ts +6 -6
  387. package/dist/tests/fakes/FakeWaitForTransactionEvents.d.ts +2 -2
  388. package/dist/tests/permissions-revoke-relayer.test.d.ts +1 -0
  389. package/dist/tests/permissions-transaction-options.test.d.ts +1 -0
  390. package/dist/tests/read-only-mode.test.d.ts +1 -0
  391. package/dist/tests/relayer-integration.test.d.ts +1 -0
  392. package/dist/tests/relayer-unified.test.d.ts +1 -0
  393. package/dist/tests/server-relayer-handler.test.d.ts +1 -0
  394. package/dist/types/accessSettlement.cjs +17 -0
  395. package/dist/types/accessSettlement.cjs.map +1 -0
  396. package/dist/types/accessSettlement.d.ts +66 -0
  397. package/dist/types/accessSettlement.js +1 -0
  398. package/dist/types/accessSettlement.js.map +1 -0
  399. package/dist/types/atomicStore.cjs +31 -0
  400. package/dist/types/atomicStore.cjs.map +1 -0
  401. package/dist/types/atomicStore.d.ts +236 -0
  402. package/dist/types/atomicStore.js +7 -0
  403. package/dist/types/atomicStore.js.map +1 -0
  404. package/dist/types/blockchain.cjs.map +1 -1
  405. package/dist/types/blockchain.d.ts +39 -11
  406. package/dist/types/chains.cjs.map +1 -1
  407. package/dist/types/chains.d.ts +74 -7
  408. package/dist/types/chains.js.map +1 -1
  409. package/dist/types/config.cjs +10 -0
  410. package/dist/types/config.cjs.map +1 -1
  411. package/dist/types/config.d.ts +217 -220
  412. package/dist/types/config.js +8 -0
  413. package/dist/types/config.js.map +1 -1
  414. package/dist/types/contracts.cjs.map +1 -1
  415. package/dist/types/contracts.d.ts +71 -7
  416. package/dist/types/controller-context.cjs.map +1 -1
  417. package/dist/types/controller-context.d.ts +12 -6
  418. package/dist/types/data.cjs.map +1 -1
  419. package/dist/types/data.d.ts +82 -10
  420. package/dist/types/generics.cjs.map +1 -1
  421. package/dist/types/generics.d.ts +81 -10
  422. package/dist/types/index.cjs +4 -0
  423. package/dist/types/index.cjs.map +1 -1
  424. package/dist/types/index.d.ts +36 -6
  425. package/dist/types/index.js +9 -1
  426. package/dist/types/index.js.map +1 -1
  427. package/dist/types/operationStore.cjs +17 -0
  428. package/dist/types/operationStore.cjs.map +1 -0
  429. package/dist/types/operationStore.d.ts +171 -0
  430. package/dist/types/operationStore.js +1 -0
  431. package/dist/types/operationStore.js.map +1 -0
  432. package/dist/types/operations.cjs +3 -15
  433. package/dist/types/operations.cjs.map +1 -1
  434. package/dist/types/operations.d.ts +131 -39
  435. package/dist/types/operations.js +2 -13
  436. package/dist/types/operations.js.map +1 -1
  437. package/dist/types/options.cjs +17 -0
  438. package/dist/types/options.cjs.map +1 -0
  439. package/dist/types/options.d.ts +308 -0
  440. package/dist/types/options.js +1 -0
  441. package/dist/types/options.js.map +1 -0
  442. package/dist/types/permissions.cjs.map +1 -1
  443. package/dist/types/permissions.d.ts +19 -20
  444. package/dist/types/personal.cjs.map +1 -1
  445. package/dist/types/personal.d.ts +150 -14
  446. package/dist/types/relayer.cjs.map +1 -1
  447. package/dist/types/relayer.d.ts +307 -35
  448. package/dist/types/runtimePermissions.cjs +17 -0
  449. package/dist/types/runtimePermissions.cjs.map +1 -0
  450. package/dist/types/runtimePermissions.d.ts +122 -0
  451. package/dist/types/runtimePermissions.js +1 -0
  452. package/dist/types/runtimePermissions.js.map +1 -0
  453. package/dist/types/storage.cjs.map +1 -1
  454. package/dist/types/storage.d.ts +9 -21
  455. package/dist/types/storage.js.map +1 -1
  456. package/dist/types/utils.cjs.map +1 -1
  457. package/dist/types/utils.d.ts +0 -45
  458. package/dist/utils/__tests__/chainQuery.test.d.ts +1 -0
  459. package/dist/utils/__tests__/subgraphConsistency.test.d.ts +4 -0
  460. package/dist/utils/__tests__/subgraphPagination.test.d.ts +4 -0
  461. package/dist/utils/blockchain/registry.cjs +3 -3
  462. package/dist/utils/blockchain/registry.cjs.map +1 -1
  463. package/dist/utils/blockchain/registry.d.ts +1 -1
  464. package/dist/utils/blockchain/registry.js +3 -3
  465. package/dist/utils/blockchain/registry.js.map +1 -1
  466. package/dist/utils/chainQuery.cjs +107 -0
  467. package/dist/utils/chainQuery.cjs.map +1 -0
  468. package/dist/utils/chainQuery.d.ts +31 -0
  469. package/dist/utils/chainQuery.js +82 -0
  470. package/dist/utils/chainQuery.js.map +1 -0
  471. package/dist/utils/grantFiles.cjs +4 -1
  472. package/dist/utils/grantFiles.cjs.map +1 -1
  473. package/dist/utils/grantFiles.d.ts +10 -20
  474. package/dist/utils/grantFiles.js +4 -1
  475. package/dist/utils/grantFiles.js.map +1 -1
  476. package/dist/utils/grantValidation.cjs.map +1 -1
  477. package/dist/utils/grantValidation.d.ts +95 -16
  478. package/dist/utils/grantValidation.js.map +1 -1
  479. package/dist/utils/grants.cjs.map +1 -1
  480. package/dist/utils/grants.d.ts +93 -12
  481. package/dist/utils/grants.js.map +1 -1
  482. package/dist/utils/ipfs.cjs +2 -4
  483. package/dist/utils/ipfs.cjs.map +1 -1
  484. package/dist/utils/ipfs.d.ts +1 -1
  485. package/dist/utils/ipfs.js +2 -4
  486. package/dist/utils/ipfs.js.map +1 -1
  487. package/dist/utils/lazy-import.cjs.map +1 -1
  488. package/dist/utils/lazy-import.d.ts +32 -7
  489. package/dist/utils/lazy-import.js.map +1 -1
  490. package/dist/utils/multicall.cjs +1 -1
  491. package/dist/utils/multicall.cjs.map +1 -1
  492. package/dist/utils/multicall.js +1 -1
  493. package/dist/utils/multicall.js.map +1 -1
  494. package/dist/utils/runtimeGrantFiles.cjs +84 -0
  495. package/dist/utils/runtimeGrantFiles.cjs.map +1 -0
  496. package/dist/utils/runtimeGrantFiles.d.ts +66 -0
  497. package/dist/utils/runtimeGrantFiles.js +58 -0
  498. package/dist/utils/runtimeGrantFiles.js.map +1 -0
  499. package/dist/utils/signatureCache.cjs +8 -2
  500. package/dist/utils/signatureCache.cjs.map +1 -1
  501. package/dist/utils/signatureCache.d.ts +49 -8
  502. package/dist/utils/signatureCache.js +8 -2
  503. package/dist/utils/signatureCache.js.map +1 -1
  504. package/dist/utils/subgraphConsistency.cjs +184 -0
  505. package/dist/utils/subgraphConsistency.cjs.map +1 -0
  506. package/dist/utils/subgraphConsistency.d.ts +65 -0
  507. package/dist/utils/subgraphConsistency.js +155 -0
  508. package/dist/utils/subgraphConsistency.js.map +1 -0
  509. package/dist/utils/subgraphMetaCache.cjs +101 -0
  510. package/dist/utils/subgraphMetaCache.cjs.map +1 -0
  511. package/dist/utils/subgraphMetaCache.d.ts +56 -0
  512. package/dist/utils/subgraphMetaCache.js +76 -0
  513. package/dist/utils/subgraphMetaCache.js.map +1 -0
  514. package/dist/utils/subgraphPagination.cjs +104 -0
  515. package/dist/utils/subgraphPagination.cjs.map +1 -0
  516. package/dist/utils/subgraphPagination.d.ts +78 -0
  517. package/dist/utils/subgraphPagination.js +78 -0
  518. package/dist/utils/subgraphPagination.js.map +1 -0
  519. package/dist/utils/transactionHelpers.cjs.map +1 -1
  520. package/dist/utils/transactionHelpers.d.ts +12 -12
  521. package/dist/utils/transactionHelpers.js.map +1 -1
  522. package/dist/utils/typedDataConverter.cjs.map +1 -1
  523. package/dist/utils/typedDataConverter.d.ts +39 -3
  524. package/dist/utils/typedDataConverter.js.map +1 -1
  525. package/dist/utils/urlResolver.cjs +7 -0
  526. package/dist/utils/urlResolver.cjs.map +1 -1
  527. package/dist/utils/urlResolver.d.ts +22 -4
  528. package/dist/utils/urlResolver.js +7 -0
  529. package/dist/utils/urlResolver.js.map +1 -1
  530. package/dist/utils/wallet.cjs +63 -0
  531. package/dist/utils/wallet.cjs.map +1 -0
  532. package/dist/utils/wallet.d.ts +94 -0
  533. package/dist/utils/wallet.js +37 -0
  534. package/dist/utils/wallet.js.map +1 -0
  535. package/package.json +7 -2
  536. package/dist/config/addresses.cjs.map +0 -1
  537. package/dist/config/addresses.js.map +0 -1
  538. package/dist/generated/abi/DLPTreasuryImplementation.cjs.map +0 -1
  539. package/dist/generated/abi/DLPTreasuryImplementation.js.map +0 -1
  540. package/dist/server/handler.cjs +0 -101
  541. package/dist/server/handler.cjs.map +0 -1
  542. package/dist/server/handler.d.ts +0 -87
  543. package/dist/server/handler.js +0 -77
  544. package/dist/server/handler.js.map +0 -1
  545. /package/dist/{tests/server-handler.test.d.ts → client/__tests__/enhancedResponse.test.d.ts} +0 -0
@@ -1,95 +1,122 @@
1
1
  import type { Address } from "viem";
2
+ import type { TransactionOptions, TransactionResult } from "../types/operations";
2
3
  import type { StorageUploadResult } from "../types/storage";
3
- import type { UserFile, UploadParams, UploadResult, UploadEncryptedFileResult, Refiner, AddRefinerParams, AddRefinerResult, UpdateSchemaIdParams, UpdateSchemaIdResult, TrustedServer, GetUserTrustedServersParams, EncryptedUploadParams, UnencryptedUploadParams } from "../types/index";
4
- import type { TransactionResult } from "../types/operations";
4
+ import type { UserFile, UploadParams, UploadResult, UploadEncryptedFileResult, Refiner, AddRefinerParams, AddRefinerResult, UpdateSchemaIdParams, UpdateSchemaIdResult, TrustedServer, GetUserTrustedServersParams, EncryptedUploadParams, UnencryptedUploadParams, EncryptFileOptions, EncryptFileResult, DecryptFileOptions, UploadFileWithPermissionsParams, AddFilePermissionParams, DecryptFileWithPermissionOptions } from "../types/index";
5
5
  import type { ControllerContext } from "./permissions";
6
+ import { BaseController } from "./base";
7
+ import type { ConsistencyOptions, PaginationOptions } from "../types/options";
6
8
  import { type DataSchema } from "../utils/schemaValidation";
7
9
  /**
8
- * Manages encrypted user data files and their blockchain registration on the Vana network.
10
+ * Manages encrypted user data files and blockchain registration on the Vana network.
9
11
  *
10
12
  * @remarks
11
- * This controller handles the complete file lifecycle from encrypted upload to
12
- * blockchain registration and decryption. It provides methods for querying user files,
13
- * uploading new encrypted content, managing file schemas, and handling permissions for
14
- * secure data sharing. All operations respect the user's privacy through client-side
15
- * encryption before any data leaves the user's device.
13
+ * The DataController provides comprehensive file lifecycle management from encrypted upload
14
+ * through blockchain registration to decryption. Client-side encryption ensures data privacy
15
+ * before transmission. The controller integrates with multiple storage providers (IPFS, Pinata,
16
+ * Google Drive) and supports both gasless transactions via relayers and direct blockchain interaction.
16
17
  *
17
- * The controller integrates with multiple storage providers (IPFS, Pinata, Google Drive)
18
- * and supports both gasless transactions via relayers and direct blockchain interaction.
19
- * File metadata and access permissions are stored on the Vana blockchain while encrypted
20
- * file content is stored on decentralized storage networks.
18
+ * **Architecture:**
19
+ * Files use dual storage: encrypted content on decentralized storage (IPFS/Pinata/Google Drive),
20
+ * metadata and permissions on blockchain. This design minimizes on-chain data while maintaining
21
+ * decentralization and access control.
21
22
  *
22
23
  * **Method Selection:**
23
- * - `upload()` handles encryption, storage, and blockchain registration automatically
24
- * - `getUserFiles()` queries existing file metadata from blockchain and subgraph
25
- * - `decryptFile()` decrypts files for which you have access permissions
26
- * - `getFileById()` retrieves specific file metadata when you have the file ID
24
+ * - `upload()` - Complete workflow: encryption, storage, blockchain registration
25
+ * - `getUserFiles()` - Query file metadata from blockchain/subgraph
26
+ * - `decryptFile()` - Decrypt files you have permission to access
27
+ * - `getFileById()` - Retrieve specific file metadata by ID
27
28
  *
28
29
  * **Storage Requirements:**
29
- * Methods requiring storage configuration: `upload()`
30
- * Methods working without storage: `getUserFiles()`, `decryptFile()`, `getFileById()`
30
+ * - Methods requiring storage: `upload()`, `encryptFile()`
31
+ * - Methods working without storage: `getUserFiles()`, `decryptFile()`, `getFileById()`
32
+ *
33
+ * **Permission Model:**
34
+ * - File permissions (decryption access) are handled during upload
35
+ * - Operation permissions (what can be done with data) use `vana.permissions.grant()`
36
+ *
31
37
  * @example
32
38
  * ```typescript
33
- * // Upload an encrypted file with automatic schema validation
39
+ * // Upload encrypted file with schema validation
34
40
  * const result = await vana.data.upload({
35
- * content: "My personal data",
36
- * filename: "personal-data.json"
41
+ * content: { name: "Alice", age: 30 },
42
+ * filename: "profile.json",
43
+ * schemaId: 1
37
44
  * });
45
+ * console.log(`File uploaded: ID ${result.fileId}, URL ${result.url}`);
38
46
  *
39
- * // Query files owned by a user
47
+ * // Query user's files
40
48
  * const files = await vana.data.getUserFiles({
41
- * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
49
+ * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36"
42
50
  * });
51
+ * files.forEach(file => console.log(`File ${file.id}: ${file.url}`));
43
52
  *
44
- * // Decrypt accessible file content
53
+ * // Decrypt accessible file
45
54
  * const decryptedData = await vana.data.decryptFile(files[0]);
55
+ * console.log("Decrypted content:", decryptedData);
46
56
  * ```
57
+ *
47
58
  * @category Data Management
48
- * @see {@link https://docs.vana.com/developer/data-registry | Vana Data Registry Documentation} for conceptual overview
59
+ * @see For conceptual overview, visit {@link https://docs.vana.org/docs/data-registry}
49
60
  */
50
- export declare class DataController {
51
- private readonly context;
61
+ export declare class DataController extends BaseController {
52
62
  constructor(context: ControllerContext);
53
63
  /**
54
- * Uploads user data with automatic encryption and blockchain registration.
64
+ * Uploads data with automatic encryption and blockchain registration.
55
65
  *
56
66
  * @remarks
57
- * This is the primary method for uploading user data to the Vana network. It handles
58
- * the complete workflow including content normalization, schema validation, encryption,
59
- * storage upload, file permission granting, and blockchain registration.
60
- *
61
- * The method automatically:
62
- * - Normalizes input content to a Blob
63
- * - Validates data against schema if provided
64
- * - Generates encryption keys and encrypts the data
65
- * - Uploads to the configured storage provider
66
- * - Grants file decryption permissions to specified accounts
67
- * - Registers the file on the blockchain
67
+ * Primary method for uploading data to Vana. Handles complete workflow:
68
+ * content normalization, schema validation, encryption, storage upload,
69
+ * permission granting, and blockchain registration.
70
+ *
71
+ * **Automatic Processing:**
72
+ * - Normalizes content to Blob format
73
+ * - Validates against schema if provided
74
+ * - Generates encryption keys
75
+ * - Uploads to configured storage
76
+ * - Grants decryption permissions
77
+ * - Registers on blockchain
68
78
  *
69
79
  * **TypeScript Overloads:**
70
- * This method has three overloads to ensure type safety:
71
- * 1. `EncryptedUploadParams` - When `encrypt: true` (default), permissions require publicKey
72
- * 2. `UnencryptedUploadParams` - When `encrypt: false`, permissions are optional
73
- * 3. `UploadParams` - General signature for runtime determination
74
- *
75
- * IMPORTANT: The permissions parameter only grants decryption access to the file.
76
- * To grant operation permissions (like "llm_inference"), use vana.permissions.grant()
77
- * after uploading. This separation ensures clear distinction between:
78
- * - File permissions: Who can decrypt and read the encrypted file (handled here)
79
- * - Operation permissions: What operations can be performed on the data (handled separately)
80
- *
81
- * @param params - Upload parameters including content, filename, schema, and permissions
82
- * @param params.permissions - Optional array of file permissions for granting decryption access
83
- * @param params.schemaId - Optional schema ID for data validation. Get available schemas from `vana.schemas.list()`.
84
- * @param params.owner - Optional owner address if uploading on behalf of another user (requires delegation).
85
- * @returns Promise resolving to upload results with file ID and transaction hash
86
- * @throws {Error} When storage manager is not configured - "Storage manager not configured. Please provide storage providers in VanaConfig."
87
- * @throws {Error} When no wallet addresses available - "No addresses available in wallet client"
88
- * @throws {Error} When chain ID is not available - "Chain ID not available"
89
- * @throws {Error} When relay callback doesn't support required features - "The configured relay callback does not support schemas or permissions"
90
- * @throws {Error} When schema fetch fails - "Failed to fetch schema definition: {status}"
91
- * @throws {SchemaValidationError} When data doesn't match schema - includes specific validation errors
92
- * @throws {Error} General upload failures - "Upload failed: {specific error message}"
80
+ * - `EncryptedUploadParams`: When `encrypt: true` (default), permissions require `publicKey`
81
+ * - `UnencryptedUploadParams`: When `encrypt: false`, permissions optional
82
+ * - `UploadParams`: General signature for runtime determination
83
+ *
84
+ * **Permission Separation:**
85
+ * - File permissions (here): Decryption access only
86
+ * - Operation permissions: Use `vana.permissions.grant()` separately
87
+ *
88
+ * **Owner/Encryption Constraint:**
89
+ * When encryption is enabled (default), the `owner` parameter must match
90
+ * the connected wallet address. This ensures only the wallet that performs
91
+ * encryption can decrypt the file. For delegation scenarios where the owner
92
+ * differs from the connected wallet, set `encrypt: false`.
93
+ *
94
+ * @param params - Upload configuration object
95
+ * @param params.content - Data to upload (string, object, or Blob)
96
+ * @param params.filename - Name for the uploaded file
97
+ * @param params.permissions - Decryption access grants.
98
+ * Each requires `account` and `publicKey` for encryption.
99
+ * @param params.schemaId - Schema for validation.
100
+ * Obtain via `vana.schemas.list()`.
101
+ * @param params.owner - Owner address for blockchain registration.
102
+ * Must match connected wallet when encryption is enabled.
103
+ * For delegation scenarios, disable encryption with `encrypt: false`.
104
+ * Defaults to connected wallet address.
105
+ * @param params.encrypt - Enable encryption (default: `true`)
106
+ * @param params.providerName - Storage provider override
107
+ *
108
+ * @returns Upload result with file ID, URL, and transaction hash
109
+ *
110
+ * @throws {InvalidConfigurationError} When encryption is enabled and owner differs from wallet.
111
+ * Set `encrypt: false` for delegation scenarios, or omit `owner` to use connected wallet.
112
+ * @throws {Error} Storage not configured.
113
+ * Configure storage providers in `VanaConfig`.
114
+ * @throws {Error} No wallet addresses available.
115
+ * Ensure wallet is connected.
116
+ * @throws {SchemaValidationError} Data doesn't match schema.
117
+ * Verify data structure matches schema from `vana.schemas.get(schemaId)`.
118
+ * @throws {Error} Upload failed with specific error message.
119
+ *
93
120
  * @example
94
121
  * ```typescript
95
122
  * // Basic file upload
@@ -131,15 +158,12 @@ export declare class DataController {
131
158
  * encrypt: false
132
159
  * } as const); // 'as const' ensures TypeScript infers encrypt: false literally
133
160
  *
134
- * // Upload on behalf of another user (delegation)
161
+ * // Upload on behalf of another user (delegation without encryption)
135
162
  * const result = await vana.data.upload({
136
163
  * content: "User's data",
137
164
  * filename: "delegated.txt",
138
- * owner: "0x5678...", // Different from connected wallet
139
- * permissions: [{
140
- * account: "0x1234...", // Address that can decrypt
141
- * publicKey: "0x04..." // Their public key for encryption
142
- * }]
165
+ * owner: "0x5678...", // Different from connected wallet
166
+ * encrypt: false // Required when owner differs from wallet
143
167
  * });
144
168
  * ```
145
169
  */
@@ -147,35 +171,78 @@ export declare class DataController {
147
171
  upload(params: UnencryptedUploadParams): Promise<UploadResult>;
148
172
  upload(params: UploadParams): Promise<UploadResult>;
149
173
  /**
150
- * Decrypts a file owned by the user using their wallet signature.
174
+ * Encrypts data using wallet-derived encryption.
151
175
  *
152
176
  * @remarks
153
- * This is the high-level convenience method for decrypting user files, serving as the
154
- * symmetrical counterpart to the `upload` method. It handles the complete decryption
155
- * workflow including key generation, URL protocol detection, content fetching, and
156
- * decryption.
177
+ * This method provides secure, wallet-based encryption for data before uploading
178
+ * to the Vana network. It's the counterpart to decryptFile for preparing data
179
+ * for secure storage.
157
180
  *
158
181
  * The method automatically:
159
- * - Generates the decryption key from the user's wallet signature
160
- * - Determines the appropriate fetch method based on the file URL protocol
161
- * - Fetches the encrypted content from IPFS or standard HTTP URLs
162
- * - Decrypts the content using the generated key
163
- *
164
- * For IPFS URLs, the method uses gateway fallback for improved reliability. For
165
- * standard HTTP URLs, it uses a simple fetch. If you need custom authentication
166
- * headers or specific gateway configurations, use the low-level primitives directly.
167
- *
168
- * @param file - The user file to decrypt (typically from getUserFiles)
169
- * @param encryptionSeed - Optional custom encryption seed (defaults to Vana standard)
170
- * @returns Promise resolving to the decrypted file content as a Blob
171
- * @throws {Error} "No addresses available in wallet client" - When wallet is not connected
172
- * @throws {Error} "Network error: Cannot access the file URL" - When file URL is inaccessible (CORS, server down)
173
- * @throws {Error} "File not found: The encrypted file is no longer available" - When file returns 404
174
- * @throws {Error} "Access denied" - When file returns 403 (no permission)
175
- * @throws {Error} "File is empty or could not be retrieved" - When file has no content
176
- * @throws {Error} "Invalid file format: This file doesn't appear to be encrypted with the Vana protocol" - When file is not properly encrypted
177
- * @throws {Error} "Wrong encryption key" - When decryption fails due to incorrect key/seed
178
- * @throws {Error} "Failed to decrypt file: {error}" - General decryption failures
182
+ * - Generates an encryption key from the user's wallet signature
183
+ * - Converts the input data to a Blob if necessary
184
+ * - Encrypts the data using the generated key
185
+ * - Returns both the encrypted data and the encryption key
186
+ *
187
+ * The encryption key returned can be stored and later used for decryption,
188
+ * or shared with others to grant them decryption access.
189
+ *
190
+ * @param data - The data to encrypt (Blob, string, or object)
191
+ * @param options - Optional encryption configuration
192
+ * @returns Promise resolving to encrypted data and the encryption key used
193
+ * @throws {Error} When wallet is not connected or encryption fails
194
+ * @example
195
+ * ```typescript
196
+ * // Encrypt a string
197
+ * const { encryptedData, encryptionKey } = await vana.data.encryptFile(
198
+ * "My secret data"
199
+ * );
200
+ *
201
+ * // Encrypt JSON with custom MIME type
202
+ * const { encryptedData, encryptionKey } = await vana.data.encryptFile(
203
+ * { name: "Alice", age: 30 },
204
+ * { mimeType: "application/json" }
205
+ * );
206
+ *
207
+ * // With custom encryption seed
208
+ * const { encryptedData, encryptionKey } = await vana.data.encryptFile(
209
+ * "Secret message",
210
+ * { seed: "My custom encryption seed" }
211
+ * );
212
+ *
213
+ * // Upload the encrypted data
214
+ * const result = await vana.data.uploadToStorage(encryptedData);
215
+ * ```
216
+ */
217
+ encryptFile(data: Blob | string | object, options?: EncryptFileOptions): Promise<EncryptFileResult>;
218
+ /**
219
+ * Decrypts a file using wallet-derived decryption key.
220
+ *
221
+ * @remarks
222
+ * Counterpart to `upload()` for decrypting user files. Automatically
223
+ * generates decryption key from wallet, fetches encrypted content,
224
+ * and decrypts. Supports IPFS (with gateway fallback) and HTTP URLs.
225
+ *
226
+ * @param file - UserFile object from `getUserFiles()`
227
+ * @param options - Decryption options
228
+ * @param options.seed - Custom encryption seed.
229
+ * Defaults to standard Vana seed.
230
+ *
231
+ * @returns Decrypted content as Blob
232
+ *
233
+ * @throws {Error} No wallet connected.
234
+ * Connect wallet before decrypting.
235
+ * @throws {Error} Network error accessing file.
236
+ * Check CORS settings or server availability.
237
+ * @throws {Error} File not found (404).
238
+ * File no longer available at stored URL.
239
+ * @throws {Error} Access denied (403).
240
+ * No permission to access file.
241
+ * @throws {Error} Invalid file format.
242
+ * File not encrypted with Vana protocol.
243
+ * @throws {Error} Wrong encryption key.
244
+ * Verify seed matches upload or use default.
245
+ *
179
246
  * @example
180
247
  * ```typescript
181
248
  * // Basic file decryption
@@ -201,44 +268,47 @@ export declare class DataController {
201
268
  * fs.writeFileSync('decrypted-file.txt', Buffer.from(buffer));
202
269
  * ```
203
270
  */
204
- decryptFile(file: UserFile, encryptionSeed?: string): Promise<Blob>;
271
+ decryptFile(file: UserFile, options?: DecryptFileOptions): Promise<Blob>;
205
272
  /**
206
- * Retrieves all data files owned by a specific user address.
273
+ * Retrieves all files owned by a specific user address.
207
274
  *
208
275
  * @remarks
209
- * This method queries the Vana subgraph to find files directly owned by the user.
210
- * It efficiently handles large datasets by using the File entity's owner field
211
- * and returns complete file metadata without additional contract calls.
212
- *
213
- * **Deduplication Behavior:**
214
- * The method automatically deduplicates files by ID, keeping only the latest version
215
- * (highest timestamp) when duplicate file IDs are found. This handles cases where
216
- * the subgraph may contain multiple entries for the same file due to re-indexing
217
- * or blockchain reorganizations.
218
- * @param params - The query parameters object
219
- * @param params.owner - The wallet address of the file owner to query
220
- * @param params.subgraphUrl - Optional subgraph URL to override the default endpoint
221
- * @returns A Promise that resolves to an array of UserFile objects with metadata, sorted by latest timestamp first
222
- * @throws {Error} When subgraphUrl is not provided and not configured - "subgraphUrl is required"
223
- * @throws {Error} When subgraph request fails - "Subgraph request failed: {status} {statusText}"
224
- * @throws {Error} When subgraph returns errors - "Subgraph errors: {error messages}"
225
- * @throws {Error} When JSON parsing fails - "Failed to fetch user files from subgraph: {error}"
276
+ * Queries the Vana subgraph for files owned by the specified address.
277
+ * Automatically deduplicates by file ID, keeping the latest version
278
+ * when duplicates exist from re-indexing or chain reorganizations.
279
+ * Enriches results with DLP proof data when available.
280
+ *
281
+ * @param params - Query configuration
282
+ * @param params.owner - Wallet address of the file owner
283
+ * @param params.subgraphUrl - Subgraph endpoint override.
284
+ * Defaults to context configuration.
285
+ *
286
+ * @returns Array of UserFile objects sorted by timestamp (newest first)
287
+ *
288
+ * @throws {Error} Subgraph URL not configured.
289
+ * Provide `subgraphUrl` parameter or configure in Vana constructor.
290
+ * @throws {Error} Subgraph request failed.
291
+ * Check network connectivity and subgraph availability.
292
+ * @throws {Error} Subgraph returned errors.
293
+ * Review query parameters and subgraph logs.
294
+ *
226
295
  * @example
227
296
  * ```typescript
228
- * // Query files for a specific user
229
297
  * const files = await vana.data.getUserFiles({
230
- * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
298
+ * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36"
231
299
  * });
232
300
  *
233
301
  * files.forEach(file => {
234
- * console.log(`File ${file.id}: ${file.url} (Schema: ${file.schemaId})`);
302
+ * console.log(`File ${file.id}: ${file.url}`);
303
+ * console.log(` Schema: ${file.schemaId}`);
304
+ * console.log(` DLPs: ${file.dlpIds?.join(", ") || "none"}`);
235
305
  * });
236
306
  * ```
237
307
  */
238
308
  getUserFiles(params: {
239
309
  owner: Address;
240
310
  subgraphUrl?: string;
241
- }): Promise<UserFile[]>;
311
+ }, options?: ConsistencyOptions & PaginationOptions): Promise<UserFile[]>;
242
312
  /**
243
313
  * Fetches proof data for multiple files from the subgraph.
244
314
  *
@@ -279,6 +349,8 @@ export declare class DataController {
279
349
  */
280
350
  getDLP(dlpId: number, options?: {
281
351
  subgraphUrl?: string;
352
+ minBlock?: number;
353
+ waitForSync?: number;
282
354
  }): Promise<{
283
355
  id: number;
284
356
  name: string;
@@ -339,7 +411,7 @@ export declare class DataController {
339
411
  getUserPermissions(params: {
340
412
  user: Address;
341
413
  subgraphUrl?: string;
342
- }): Promise<Array<{
414
+ }, options?: ConsistencyOptions & PaginationOptions): Promise<Array<{
343
415
  id: string;
344
416
  grant: string;
345
417
  nonce: bigint;
@@ -402,7 +474,7 @@ export declare class DataController {
402
474
  * });
403
475
  * ```
404
476
  */
405
- getUserTrustedServers(params: GetUserTrustedServersParams): Promise<TrustedServer[]>;
477
+ getUserTrustedServers(params: GetUserTrustedServersParams, options?: ConsistencyOptions & PaginationOptions): Promise<TrustedServer[]>;
406
478
  /**
407
479
  * Internal method: Query trusted servers via subgraph
408
480
  *
@@ -423,48 +495,56 @@ export declare class DataController {
423
495
  */
424
496
  private _getUserTrustedServersViaRpc;
425
497
  /**
426
- * Gets the total number of files in the registry from the contract.
498
+ * Retrieves total file count from Data Registry.
499
+ *
500
+ * @remarks
501
+ * Queries blockchain for complete file count across all users.
502
+ * Useful for pagination and network statistics.
503
+ *
504
+ * @returns Total number of registered files
505
+ *
506
+ * @throws {Error} Chain ID not available.
507
+ * Ensure network connection.
508
+ * @throws {Error} Contract read failed.
509
+ * Check RPC availability.
427
510
  *
428
- * @returns Promise resolving to the total file count
429
511
  * @example
430
512
  * ```typescript
431
- * const totalFiles = await vana.data.getTotalFilesCount();
432
- * console.log(`Total files in registry: ${totalFiles}`);
513
+ * const total = await vana.data.getTotalFilesCount();
514
+ * console.log(`Total files: ${total}`);
433
515
  *
434
- * // Use for pagination calculations
435
- * const filesPerPage = 20;
436
- * const totalPages = Math.ceil(totalFiles / filesPerPage);
437
- * console.log(`Total pages: ${totalPages}`);
516
+ * // Calculate pagination
517
+ * const pages = Math.ceil(total / 20);
438
518
  * ```
439
519
  */
440
520
  getTotalFilesCount(): Promise<number>;
441
521
  /**
442
- * Retrieves details for a specific file by its ID.
522
+ * Retrieves file metadata by ID from the blockchain.
523
+ *
524
+ * @remarks
525
+ * Queries DataRegistry contract directly for file details.
526
+ * Works for any file ID regardless of ownership, enabling
527
+ * cross-user file discovery and verification.
528
+ *
529
+ * @param fileId - Numeric file ID to retrieve
530
+ *
531
+ * @returns UserFile object with metadata
532
+ *
533
+ * @throws {Error} Chain ID not available.
534
+ * Ensure proper network connection.
535
+ * @throws {Error} File not found.
536
+ * Verify file ID exists on-chain.
537
+ * @throws {Error} Contract call failed.
538
+ * Check network and RPC availability.
443
539
  *
444
- * @param fileId - The file ID to look up
445
- * @returns Promise resolving to UserFile object
446
- * @throws {Error} "Chain ID not available" - When wallet chain is not configured
447
- * @throws {Error} "File not found" - When file ID doesn't exist or returns empty data
448
- * @throws {Error} "Failed to fetch file {fileId}: {error}" - General contract read failures
449
540
  * @example
450
541
  * ```typescript
451
- * try {
452
- * const file = await vana.data.getFileById(123);
453
- * console.log('File details:', {
454
- * id: file.id,
455
- * url: file.url,
456
- * owner: file.ownerAddress,
457
- * addedAt: file.addedAtBlock
458
- * });
459
- * } catch (error) {
460
- * console.error('File not found or error retrieving file:', error);
461
- * }
542
+ * const file = await vana.data.getFileById(123);
543
+ * console.log(`File ${file.id}:`);
544
+ * console.log(` URL: ${file.url}`);
545
+ * console.log(` Owner: ${file.ownerAddress}`);
546
+ * console.log(` Block: ${file.addedAtBlock}`);
462
547
  * ```
463
- *
464
- * This method queries the DataRegistry contract directly
465
- * to get file details for any file ID, regardless of user ownership.
466
- * This is useful for file lookup functionality where users can search
467
- * for specific files by ID.
468
548
  */
469
549
  getFileById(fileId: number): Promise<UserFile>;
470
550
  /**
@@ -490,14 +570,13 @@ export declare class DataController {
490
570
  * console.log(`File ${fileId} registered with schema in tx ${transactionHash}`);
491
571
  * ```
492
572
  */
493
- registerFileWithSchema(url: string, schemaId: number): Promise<TransactionResult<"DataRegistry", "addFileWithSchema">>;
573
+ registerFileWithSchema(url: string, schemaId: number, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFileWithSchema">>;
494
574
  /**
495
575
  * Gets the user's address from the wallet client.
496
576
  *
497
577
  * @returns Promise resolving to the user's wallet address
498
578
  * @throws {Error} When no addresses are available in wallet client
499
579
  */
500
- private getUserAddress;
501
580
  /**
502
581
  * Adds a file with permissions to the DataRegistry contract.
503
582
  *
@@ -517,7 +596,7 @@ export declare class DataController {
517
596
  addFileWithPermissions(url: string, ownerAddress: Address, permissions?: Array<{
518
597
  account: Address;
519
598
  key: string;
520
- }>): Promise<TransactionResult<"DataRegistry", "addFileWithPermissions">>;
599
+ }>, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFileWithPermissions">>;
521
600
  /**
522
601
  * Adds a file to the registry with permissions and schema.
523
602
  * This combines the functionality of addFileWithPermissions and schema validation.
@@ -560,81 +639,131 @@ export declare class DataController {
560
639
  addFileWithPermissionsAndSchema(url: string, ownerAddress: Address, permissions?: Array<{
561
640
  account: Address;
562
641
  publicKey: string;
563
- }>, schemaId?: number): Promise<TransactionResult<"DataRegistry", "addFileWithPermissionsAndSchema">>;
642
+ }>, schemaId?: number, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFileWithPermissionsAndSchema">>;
564
643
  /**
565
- * Internal method to add file with encrypted permissions and schema.
566
- * @private
644
+ * Adds a file with pre-encrypted permissions and schema to the DataRegistry.
645
+ *
646
+ * @remarks
647
+ * This method is designed for relay services and advanced use cases where permissions
648
+ * have already been encrypted client-side. Unlike `addFileWithPermissionsAndSchema()`,
649
+ * this method expects permissions in the encrypted format with a 'key' field instead
650
+ * of 'publicKey'.
651
+ *
652
+ * This is typically used by relay endpoints that receive pre-encrypted data from
653
+ * the client SDK's `upload()` method, avoiding double encryption.
654
+ *
655
+ * @param url - The storage URL of the file (e.g., IPFS URL)
656
+ * @param ownerAddress - The address that will own this file
657
+ * @param permissions - Array of pre-encrypted permissions with 'account' and 'key' fields
658
+ * @param schemaId - Optional schema ID for data validation (defaults to 0)
659
+ * @returns Promise resolving to transaction result with hash and contract details
660
+ * @throws {Error} When chain ID is not available
661
+ * @throws {Error} When wallet is not connected
662
+ * @throws {Error} When transaction fails
663
+ * @example
664
+ * ```typescript
665
+ * // In a relay endpoint that receives pre-encrypted permissions
666
+ * const result = await vana.data.addFileWithEncryptedPermissionsAndSchema(
667
+ * "ipfs://QmXxx...",
668
+ * ownerAddress,
669
+ * [
670
+ * {
671
+ * account: "0xServerAddress...",
672
+ * key: "encrypted_key_string" // Already encrypted by client
673
+ * }
674
+ * ],
675
+ * schemaId
676
+ * );
677
+ *
678
+ * console.log(`File registered in tx ${result.hash}`);
679
+ * ```
567
680
  */
568
- private _addFileWithPermissionsAndSchemaInternal;
681
+ addFileWithEncryptedPermissionsAndSchema(url: string, ownerAddress: Address, permissions?: Array<{
682
+ account: Address;
683
+ key: string;
684
+ }>, schemaId?: number, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFileWithPermissionsAndSchema">>;
569
685
  /**
570
- * Adds a new refiner to the DataRefinerRegistry.
686
+ * Registers a data refiner for processing templates.
571
687
  *
572
688
  * @remarks
573
- * Refiners are data processing templates that define how raw data should be
574
- * transformed into structured formats. Each refiner is associated with a DLP
575
- * (Data Liquidity Pool), has a specific schema for output, and includes
576
- * instructions for the refinement process.
577
- *
578
- * @param params - Refiner configuration parameters
579
- * @param params.dlpId - The Data Liquidity Pool ID this refiner belongs to
580
- * @param params.name - Human-readable name for the refiner
581
- * @param params.schemaId - Schema ID that defines the output format
582
- * @param params.refinementInstructionUrl - URL containing processing instructions
583
- * @returns Promise resolving to the new refiner ID and transaction hash
584
- * @throws {Error} When chain ID is not available - "Chain ID not available"
585
- * @throws {Error} When transaction fails - "Failed to add refiner: {error}"
689
+ * Refiners define data transformation rules for DLPs.
690
+ * Associates schema, instructions, and processing logic.
691
+ *
692
+ * @param params - Refiner configuration
693
+ * @param params.dlpId - Data Liquidity Pool ID
694
+ * @param params.name - Refiner display name
695
+ * @param params.schemaId - Output schema ID.
696
+ * Obtain via `vana.schemas.list()`.
697
+ * @param params.refinementInstructionUrl - Processing instructions URL
698
+ *
699
+ * @returns Refiner ID and transaction hash
700
+ *
701
+ * @throws {Error} Chain ID not available.
702
+ * Ensure network connection.
703
+ * @throws {Error} Transaction failed.
704
+ * Check wallet balance and network status.
705
+ *
586
706
  * @example
587
707
  * ```typescript
588
708
  * const result = await vana.data.addRefiner({
589
709
  * dlpId: 1,
590
- * name: "Social Media Sentiment Analyzer",
710
+ * name: "Sentiment Analyzer",
591
711
  * schemaId: 42,
592
712
  * refinementInstructionUrl: "ipfs://QmXxx..."
593
713
  * });
594
- * console.log(`Created refiner ${result.refinerId} in tx ${result.transactionHash}`);
714
+ * console.log(`Refiner ${result.refinerId} created`);
595
715
  * ```
596
716
  */
597
- addRefiner(params: AddRefinerParams): Promise<AddRefinerResult>;
717
+ addRefiner(params: AddRefinerParams, options?: TransactionOptions): Promise<AddRefinerResult>;
598
718
  /**
599
- * Retrieves a refiner by its ID.
719
+ * Retrieves refiner configuration by ID.
600
720
  *
601
721
  * @remarks
602
- * Queries the DataRefinerRegistry contract to get complete information about
603
- * a specific refiner including its DLP association, schema, and instructions.
722
+ * Queries DataRefinerRegistry for refiner details.
723
+ * Returns DLP association, schema, and processing instructions.
724
+ *
725
+ * @param refinerId - Numeric refiner ID
726
+ *
727
+ * @returns Refiner configuration object
728
+ *
729
+ * @throws {Error} Chain ID not available.
730
+ * Ensure network connection.
731
+ * @throws {Error} Refiner not found.
732
+ * Verify refiner ID exists.
733
+ * @throws {Error} Contract read failed.
734
+ * Check network and RPC status.
604
735
  *
605
- * @param refinerId - The numeric refiner ID to retrieve
606
- * @returns Promise resolving to the refiner information object
607
- * @throws {Error} When chain ID is not available - "Chain ID not available"
608
- * @throws {Error} When refiner doesn't exist - "Refiner with ID {refinerId} does not exist"
609
- * @throws {Error} When contract read fails - "Failed to fetch refiner: {error}"
610
736
  * @example
611
737
  * ```typescript
612
738
  * const refiner = await vana.data.getRefiner(1);
613
- * console.log({
614
- * name: refiner.name,
615
- * dlp: refiner.dlpId,
616
- * schema: refiner.schemaId,
617
- * instructions: refiner.refinementInstructionUrl
618
- * });
739
+ * console.log(`Refiner: ${refiner.name}`);
740
+ * console.log(`DLP: ${refiner.dlpId}`);
741
+ * console.log(`Schema: ${refiner.schemaId}`);
619
742
  * ```
620
743
  */
621
744
  getRefiner(refinerId: number): Promise<Refiner>;
622
745
  /**
623
- * Validates if a schema ID exists in the registry.
746
+ * Validates schema ID existence.
624
747
  *
625
748
  * @remarks
626
- * Checks the DataRefinerRegistry contract to determine if a given schema ID
627
- * has been registered and is available for use.
749
+ * Verifies schema registration in DataRegistry.
750
+ * Check before using schemas for uploads.
751
+ *
752
+ * @param schemaId - Numeric schema ID to validate
753
+ *
754
+ * @returns True if schema exists, false otherwise
755
+ *
756
+ * @throws {Error} Chain ID not available.
757
+ * Ensure network connection.
758
+ * @throws {Error} Contract read failed.
759
+ * Check RPC availability.
628
760
  *
629
- * @param schemaId - The numeric schema ID to validate
630
- * @returns Promise resolving to true if schema exists, false otherwise
631
761
  * @example
632
762
  * ```typescript
633
- * const isValid = await vana.data.isValidSchemaId(42);
634
- * if (isValid) {
635
- * console.log('Schema 42 is available for use');
636
- * } else {
637
- * console.log('Schema 42 does not exist');
763
+ * const valid = await vana.data.isValidSchemaId(42);
764
+ * if (valid) {
765
+ * // Safe to use schema 42
766
+ * await vana.data.upload({ schemaId: 42, ... });
638
767
  * }
639
768
  * ```
640
769
  */
@@ -676,7 +805,7 @@ export declare class DataController {
676
805
  * console.log(`Schema updated in tx ${result.transactionHash}`);
677
806
  * ```
678
807
  */
679
- updateSchemaId(params: UpdateSchemaIdParams): Promise<UpdateSchemaIdResult>;
808
+ updateSchemaId(params: UpdateSchemaIdParams, options?: TransactionOptions): Promise<UpdateSchemaIdResult>;
680
809
  /**
681
810
  * Uploads an encrypted file and grants permission to a party with a public key.
682
811
  *
@@ -686,16 +815,10 @@ export declare class DataController {
686
815
  * 3. Encrypts the user's encryption key with the provided public key
687
816
  * 4. Registers the file with permissions
688
817
  *
689
- * @param data - The file data to encrypt and upload
690
- * @param permissions - Array of permissions to grant, each with account address and public key
691
- * @param filename - Optional filename for the upload
692
- * @param providerName - Optional storage provider to use
818
+ * @param params - Upload parameters including data, permissions, and options
693
819
  * @returns Promise resolving to upload result with file ID and storage URL
694
820
  */
695
- uploadFileWithPermissions(data: Blob, permissions: Array<{
696
- account: Address;
697
- publicKey: string;
698
- }>, filename?: string, providerName?: string): Promise<UploadEncryptedFileResult>;
821
+ uploadFileWithPermissions(params: UploadFileWithPermissionsParams): Promise<UploadEncryptedFileResult>;
699
822
  /**
700
823
  * Uploads content to storage without registering it on the blockchain.
701
824
  * This method only handles the storage upload and returns the file URL.
@@ -719,21 +842,27 @@ export declare class DataController {
719
842
  * For advanced users who need more control over transaction timing,
720
843
  * use `submitFilePermission()` instead.
721
844
  *
722
- * @param fileId - The ID of the file to add permissions for
723
- * @param account - The address of the account to grant permission to
724
- * @param publicKey - The public key to encrypt the user's encryption key with (hex string with 0x prefix)
845
+ * @param params - Parameters for adding file permission
846
+ * @param params.fileId - The ID of the file to grant permission for
847
+ * @param params.account - The recipient's wallet address that will access the file
848
+ * @param params.publicKey - The recipient's public key for encryption.
849
+ * Obtain via `vana.server.getIdentity(account).publicKey`
725
850
  * @returns Promise resolving to permission data from PermissionGranted event
726
851
  * @throws {Error} "No addresses available in wallet client" - When wallet is not connected
727
852
  * @throws {Error} "Chain ID not available" - When wallet chain is not configured
728
853
  * @throws {Error} "Failed to add permission to file: {error}" - When transaction fails or user doesn't own file
729
854
  * @example
730
855
  * ```typescript
731
- * const result = await vana.data.addPermissionToFile(fileId, account, publicKey);
856
+ * const result = await vana.data.addPermissionToFile({
857
+ * fileId: 123,
858
+ * account: "0xRecipientAddress...",
859
+ * publicKey: "0xRecipientPublicKey..."
860
+ * });
732
861
  * console.log(`Permission granted to ${result.account} for file ${result.fileId}`);
733
862
  * console.log(`Transaction: ${result.transactionHash}`);
734
863
  * ```
735
864
  */
736
- addPermissionToFile(fileId: number, account: Address, publicKey: string): Promise<TransactionResult<"DataRegistry", "addFilePermission">>;
865
+ addPermissionToFile(params: AddFilePermissionParams, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFilePermission">>;
737
866
  /**
738
867
  * Submits a file permission transaction to the blockchain.
739
868
  *
@@ -762,7 +891,7 @@ export declare class DataController {
762
891
  * console.log(`Permission granted with ID: ${result.permissionId}`);
763
892
  * ```
764
893
  */
765
- submitFilePermission(fileId: number, account: Address, publicKey: string): Promise<TransactionResult<"DataRegistry", "addFilePermission">>;
894
+ submitFilePermission(fileId: number, account: Address, publicKey: string, options?: TransactionOptions): Promise<TransactionResult<"DataRegistry", "addFilePermission">>;
766
895
  /**
767
896
  * Gets the encrypted key for a specific account's permission to access a file.
768
897
  *
@@ -781,10 +910,11 @@ export declare class DataController {
781
910
  *
782
911
  * @param file - The file to decrypt
783
912
  * @param privateKey - The private key to decrypt the user's encryption key
784
- * @param account - The account address that has permission (defaults to current wallet account)
913
+ * @param options - Optional decryption configuration
914
+ * @param options.account - The account address that has permission (defaults to current wallet account)
785
915
  * @returns Promise resolving to the decrypted file data
786
916
  */
787
- decryptFileWithPermission(file: UserFile, privateKey: string, account?: Address): Promise<Blob>;
917
+ decryptFileWithPermission(file: UserFile, privateKey: string, options?: DecryptFileWithPermissionOptions): Promise<Blob>;
788
918
  /**
789
919
  * Simple network-agnostic fetch utility for retrieving file content.
790
920
  *
@@ -929,4 +1059,9 @@ export declare class DataController {
929
1059
  * ```
930
1060
  */
931
1061
  fetchAndValidateSchema(url: string): Promise<DataSchema>;
1062
+ /**
1063
+ * Polls for confirmation of a relayer operation.
1064
+ * @internal
1065
+ */
1066
+ private pollRelayerForConfirmation;
932
1067
  }