@opendatalabs/vana-sdk 0.1.0-alpha.7e71046 → 0.1.0-alpha.7ee7635

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 (797) hide show
  1. package/README.md +13 -4
  2. package/dist/browser.cjs +29 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +2 -0
  5. package/dist/browser.d.ts +2 -1
  6. package/dist/browser.js +1 -305
  7. package/dist/browser.js.map +1 -1
  8. package/dist/chains/definitions.cjs +92 -0
  9. package/dist/chains/definitions.cjs.map +1 -0
  10. package/dist/chains/definitions.d.cts +53 -0
  11. package/dist/chains/definitions.d.ts +53 -0
  12. package/dist/chains/definitions.js +64 -0
  13. package/dist/chains/definitions.js.map +1 -0
  14. package/dist/chains/index.cjs +37 -0
  15. package/dist/chains/index.cjs.map +1 -0
  16. package/dist/chains/index.d.cts +2 -0
  17. package/dist/chains/index.d.ts +2 -0
  18. package/dist/chains/index.js +15 -0
  19. package/dist/chains/index.js.map +1 -0
  20. package/dist/chains.browser.cjs +6 -65
  21. package/dist/chains.browser.cjs.map +1 -1
  22. package/dist/chains.browser.d.cts +2 -53
  23. package/dist/chains.browser.d.ts +2 -53
  24. package/dist/chains.browser.js +7 -57
  25. package/dist/chains.browser.js.map +1 -1
  26. package/dist/chains.cjs +6 -65
  27. package/dist/chains.cjs.map +1 -1
  28. package/dist/chains.d.cts +1 -1
  29. package/dist/chains.d.ts +1 -1
  30. package/dist/chains.js +7 -57
  31. package/dist/chains.js.map +1 -1
  32. package/dist/chains.node.cjs +6 -65
  33. package/dist/chains.node.cjs.map +1 -1
  34. package/dist/chains.node.d.cts +1 -1
  35. package/dist/chains.node.d.ts +1 -1
  36. package/dist/chains.node.js +7 -57
  37. package/dist/chains.node.js.map +1 -1
  38. package/dist/config/addresses.cjs +325 -0
  39. package/dist/config/addresses.cjs.map +1 -0
  40. package/dist/config/addresses.d.cts +401 -0
  41. package/dist/config/addresses.d.ts +401 -0
  42. package/dist/config/addresses.js +295 -0
  43. package/dist/config/addresses.js.map +1 -0
  44. package/dist/config/chains.cjs +93 -0
  45. package/dist/config/chains.cjs.map +1 -0
  46. package/dist/config/chains.d.cts +85 -0
  47. package/dist/config/chains.d.ts +85 -0
  48. package/dist/config/chains.js +67 -0
  49. package/dist/config/chains.js.map +1 -0
  50. package/dist/config/features.cjs +52 -0
  51. package/dist/config/features.cjs.map +1 -0
  52. package/dist/config/features.d.cts +64 -0
  53. package/dist/config/features.d.ts +64 -0
  54. package/dist/config/features.js +28 -0
  55. package/dist/config/features.js.map +1 -0
  56. package/dist/contracts/contractController.cjs +126 -0
  57. package/dist/contracts/contractController.cjs.map +1 -0
  58. package/dist/contracts/contractController.d.cts +117 -0
  59. package/dist/contracts/contractController.d.ts +117 -0
  60. package/dist/contracts/contractController.js +103 -0
  61. package/dist/contracts/contractController.js.map +1 -0
  62. package/dist/controllers/data.cjs +2251 -0
  63. package/dist/controllers/data.cjs.map +1 -0
  64. package/dist/controllers/data.d.cts +915 -0
  65. package/dist/controllers/data.d.ts +915 -0
  66. package/dist/controllers/data.js +2234 -0
  67. package/dist/controllers/data.js.map +1 -0
  68. package/dist/controllers/permissions.cjs +3949 -0
  69. package/dist/controllers/permissions.cjs.map +1 -0
  70. package/dist/controllers/permissions.d.cts +1383 -0
  71. package/dist/controllers/permissions.d.ts +1383 -0
  72. package/dist/controllers/permissions.js +3925 -0
  73. package/dist/controllers/permissions.js.map +1 -0
  74. package/dist/controllers/protocol.cjs +179 -0
  75. package/dist/controllers/protocol.cjs.map +1 -0
  76. package/dist/controllers/protocol.d.cts +188 -0
  77. package/dist/controllers/protocol.d.ts +188 -0
  78. package/dist/controllers/protocol.js +162 -0
  79. package/dist/controllers/protocol.js.map +1 -0
  80. package/dist/controllers/schemas.cjs +606 -0
  81. package/dist/controllers/schemas.cjs.map +1 -0
  82. package/dist/controllers/schemas.d.cts +260 -0
  83. package/dist/controllers/schemas.d.ts +260 -0
  84. package/dist/controllers/schemas.js +582 -0
  85. package/dist/controllers/schemas.js.map +1 -0
  86. package/dist/controllers/server.cjs +427 -0
  87. package/dist/controllers/server.cjs.map +1 -0
  88. package/dist/controllers/server.d.cts +230 -0
  89. package/dist/controllers/server.d.ts +230 -0
  90. package/dist/controllers/server.js +408 -0
  91. package/dist/controllers/server.js.map +1 -0
  92. package/dist/core/apiClient.cjs +325 -0
  93. package/dist/core/apiClient.cjs.map +1 -0
  94. package/dist/core/apiClient.d.cts +165 -0
  95. package/dist/core/apiClient.d.ts +165 -0
  96. package/dist/core/apiClient.js +309 -0
  97. package/dist/core/apiClient.js.map +1 -0
  98. package/dist/core/client.cjs +70 -0
  99. package/dist/core/client.cjs.map +1 -0
  100. package/dist/core/client.d.cts +92 -0
  101. package/dist/core/client.d.ts +92 -0
  102. package/dist/core/client.js +47 -0
  103. package/dist/core/client.js.map +1 -0
  104. package/dist/core/generics.cjs +388 -0
  105. package/dist/core/generics.cjs.map +1 -0
  106. package/dist/core/generics.d.cts +120 -0
  107. package/dist/core/generics.d.ts +120 -0
  108. package/dist/core/generics.js +366 -0
  109. package/dist/core/generics.js.map +1 -0
  110. package/dist/core.cjs +658 -0
  111. package/dist/core.cjs.map +1 -0
  112. package/dist/core.d.cts +493 -0
  113. package/dist/core.d.ts +493 -0
  114. package/dist/core.js +636 -0
  115. package/dist/core.js.map +1 -0
  116. package/dist/crypto/ecies/__tests__/test-vectors.cjs +102 -0
  117. package/dist/crypto/ecies/__tests__/test-vectors.cjs.map +1 -0
  118. package/dist/crypto/ecies/__tests__/test-vectors.d.cts +40 -0
  119. package/dist/crypto/ecies/__tests__/test-vectors.d.ts +40 -0
  120. package/dist/crypto/ecies/__tests__/test-vectors.js +77 -0
  121. package/dist/crypto/ecies/__tests__/test-vectors.js.map +1 -0
  122. package/dist/crypto/ecies/base.cjs +231 -0
  123. package/dist/crypto/ecies/base.cjs.map +1 -0
  124. package/dist/crypto/ecies/base.d.cts +143 -0
  125. package/dist/crypto/ecies/base.d.ts +143 -0
  126. package/dist/crypto/ecies/base.js +211 -0
  127. package/dist/crypto/ecies/base.js.map +1 -0
  128. package/dist/crypto/ecies/browser.cjs +164 -0
  129. package/dist/crypto/ecies/browser.cjs.map +1 -0
  130. package/dist/crypto/ecies/browser.d.cts +48 -0
  131. package/dist/crypto/ecies/browser.d.ts +48 -0
  132. package/dist/crypto/ecies/browser.js +130 -0
  133. package/dist/crypto/ecies/browser.js.map +1 -0
  134. package/dist/crypto/ecies/constants.cjs +131 -0
  135. package/dist/crypto/ecies/constants.cjs.map +1 -0
  136. package/dist/crypto/ecies/constants.d.cts +122 -0
  137. package/dist/crypto/ecies/constants.d.ts +122 -0
  138. package/dist/crypto/ecies/constants.js +101 -0
  139. package/dist/crypto/ecies/constants.js.map +1 -0
  140. package/dist/crypto/ecies/index.cjs +35 -0
  141. package/dist/crypto/ecies/index.cjs.map +1 -0
  142. package/dist/crypto/ecies/index.d.cts +1 -0
  143. package/dist/crypto/ecies/index.d.ts +1 -0
  144. package/dist/crypto/ecies/index.js +13 -0
  145. package/dist/crypto/ecies/index.js.map +1 -0
  146. package/dist/crypto/ecies/interface.cjs +88 -0
  147. package/dist/crypto/ecies/interface.cjs.map +1 -0
  148. package/dist/crypto/ecies/interface.d.cts +176 -0
  149. package/dist/crypto/ecies/interface.d.ts +176 -0
  150. package/dist/crypto/ecies/interface.js +61 -0
  151. package/dist/crypto/ecies/interface.js.map +1 -0
  152. package/dist/crypto/ecies/node.cjs +166 -0
  153. package/dist/crypto/ecies/node.cjs.map +1 -0
  154. package/dist/crypto/ecies/node.d.cts +50 -0
  155. package/dist/crypto/ecies/node.d.ts +50 -0
  156. package/dist/crypto/ecies/node.js +144 -0
  157. package/dist/crypto/ecies/node.js.map +1 -0
  158. package/dist/crypto/ecies/test-vectors/eccrypto-vectors.d.cts +76 -0
  159. package/dist/crypto/ecies/test-vectors/eccrypto-vectors.d.ts +76 -0
  160. package/dist/crypto/ecies/test-vectors/eccrypto-vectors.json +72 -0
  161. package/dist/crypto/ecies/utils.cjs +91 -0
  162. package/dist/crypto/ecies/utils.cjs.map +1 -0
  163. package/dist/crypto/ecies/utils.d.cts +67 -0
  164. package/dist/crypto/ecies/utils.d.ts +67 -0
  165. package/dist/crypto/ecies/utils.js +60 -0
  166. package/dist/crypto/ecies/utils.js.map +1 -0
  167. package/dist/crypto/services/WalletKeyEncryptionService.cjs +128 -0
  168. package/dist/crypto/services/WalletKeyEncryptionService.cjs.map +1 -0
  169. package/dist/crypto/services/WalletKeyEncryptionService.d.cts +92 -0
  170. package/dist/crypto/services/WalletKeyEncryptionService.d.ts +92 -0
  171. package/dist/crypto/services/WalletKeyEncryptionService.js +112 -0
  172. package/dist/crypto/services/WalletKeyEncryptionService.js.map +1 -0
  173. package/dist/diagnostics.cjs +37 -0
  174. package/dist/diagnostics.cjs.map +1 -0
  175. package/dist/diagnostics.d.cts +26 -0
  176. package/dist/diagnostics.d.ts +26 -0
  177. package/dist/diagnostics.js +13 -0
  178. package/dist/diagnostics.js.map +1 -0
  179. package/dist/errors.cjs +141 -0
  180. package/dist/errors.cjs.map +1 -0
  181. package/dist/errors.d.cts +350 -0
  182. package/dist/errors.d.ts +350 -0
  183. package/dist/errors.js +108 -0
  184. package/dist/errors.js.map +1 -0
  185. package/dist/generated/abi/ComputeEngineImplementation.cjs +1313 -0
  186. package/dist/generated/abi/ComputeEngineImplementation.cjs.map +1 -0
  187. package/dist/generated/abi/ComputeEngineImplementation.d.cts +996 -0
  188. package/dist/generated/abi/ComputeEngineImplementation.d.ts +996 -0
  189. package/dist/generated/abi/ComputeEngineImplementation.js +1289 -0
  190. package/dist/generated/abi/ComputeEngineImplementation.js.map +1 -0
  191. package/dist/generated/abi/ComputeInstructionRegistryImplementation.cjs +734 -0
  192. package/dist/generated/abi/ComputeInstructionRegistryImplementation.cjs.map +1 -0
  193. package/dist/generated/abi/ComputeInstructionRegistryImplementation.d.cts +545 -0
  194. package/dist/generated/abi/ComputeInstructionRegistryImplementation.d.ts +545 -0
  195. package/dist/generated/abi/ComputeInstructionRegistryImplementation.js +710 -0
  196. package/dist/generated/abi/ComputeInstructionRegistryImplementation.js.map +1 -0
  197. package/dist/generated/abi/DATFactoryImplementation.cjs +882 -0
  198. package/dist/generated/abi/DATFactoryImplementation.cjs.map +1 -0
  199. package/dist/generated/abi/DATFactoryImplementation.d.cts +661 -0
  200. package/dist/generated/abi/DATFactoryImplementation.d.ts +661 -0
  201. package/dist/generated/abi/DATFactoryImplementation.js +858 -0
  202. package/dist/generated/abi/DATFactoryImplementation.js.map +1 -0
  203. package/dist/generated/abi/DATImplementation.cjs +934 -0
  204. package/dist/generated/abi/DATImplementation.cjs.map +1 -0
  205. package/dist/generated/abi/DATImplementation.d.cts +693 -0
  206. package/dist/generated/abi/DATImplementation.d.ts +693 -0
  207. package/dist/generated/abi/DATImplementation.js +910 -0
  208. package/dist/generated/abi/DATImplementation.js.map +1 -0
  209. package/dist/generated/abi/DATPausableImplementation.cjs +1523 -0
  210. package/dist/generated/abi/DATPausableImplementation.cjs.map +1 -0
  211. package/dist/generated/abi/DATPausableImplementation.d.cts +1145 -0
  212. package/dist/generated/abi/DATPausableImplementation.d.ts +1145 -0
  213. package/dist/generated/abi/DATPausableImplementation.js +1499 -0
  214. package/dist/generated/abi/DATPausableImplementation.js.map +1 -0
  215. package/dist/generated/abi/DATVotesImplementation.cjs +1460 -0
  216. package/dist/generated/abi/DATVotesImplementation.cjs.map +1 -0
  217. package/dist/generated/abi/DATVotesImplementation.d.cts +1095 -0
  218. package/dist/generated/abi/DATVotesImplementation.d.ts +1095 -0
  219. package/dist/generated/abi/DATVotesImplementation.js +1436 -0
  220. package/dist/generated/abi/DATVotesImplementation.js.map +1 -0
  221. package/dist/generated/abi/DLPPerformanceImplementation.cjs +1160 -0
  222. package/dist/generated/abi/DLPPerformanceImplementation.cjs.map +1 -0
  223. package/dist/generated/abi/DLPPerformanceImplementation.d.cts +883 -0
  224. package/dist/generated/abi/DLPPerformanceImplementation.d.ts +883 -0
  225. package/dist/generated/abi/DLPPerformanceImplementation.js +1136 -0
  226. package/dist/generated/abi/DLPPerformanceImplementation.js.map +1 -0
  227. package/dist/generated/abi/DLPRegistryImplementation.cjs +1469 -0
  228. package/dist/generated/abi/DLPRegistryImplementation.cjs.map +1 -0
  229. package/dist/generated/abi/DLPRegistryImplementation.d.cts +1123 -0
  230. package/dist/generated/abi/DLPRegistryImplementation.d.ts +1123 -0
  231. package/dist/generated/abi/DLPRegistryImplementation.js +1445 -0
  232. package/dist/generated/abi/DLPRegistryImplementation.js.map +1 -0
  233. package/dist/generated/abi/DLPRegistryTreasuryImplementation.cjs +612 -0
  234. package/dist/generated/abi/DLPRegistryTreasuryImplementation.cjs.map +1 -0
  235. package/dist/generated/abi/DLPRegistryTreasuryImplementation.d.cts +452 -0
  236. package/dist/generated/abi/DLPRegistryTreasuryImplementation.d.ts +452 -0
  237. package/dist/generated/abi/DLPRegistryTreasuryImplementation.js +588 -0
  238. package/dist/generated/abi/DLPRegistryTreasuryImplementation.js.map +1 -0
  239. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs +948 -0
  240. package/dist/generated/abi/DLPRewardDeployerImplementation.cjs.map +1 -0
  241. package/dist/generated/abi/DLPRewardDeployerImplementation.d.cts +714 -0
  242. package/dist/generated/abi/DLPRewardDeployerImplementation.d.ts +714 -0
  243. package/dist/generated/abi/DLPRewardDeployerImplementation.js +924 -0
  244. package/dist/generated/abi/DLPRewardDeployerImplementation.js.map +1 -0
  245. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.cjs +612 -0
  246. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.cjs.map +1 -0
  247. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.d.cts +452 -0
  248. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.d.ts +452 -0
  249. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.js +588 -0
  250. package/dist/generated/abi/DLPRewardDeployerTreasuryImplementation.js.map +1 -0
  251. package/dist/generated/abi/DLPRewardSwapImplementation.cjs +939 -0
  252. package/dist/generated/abi/DLPRewardSwapImplementation.cjs.map +1 -0
  253. package/dist/generated/abi/DLPRewardSwapImplementation.d.cts +706 -0
  254. package/dist/generated/abi/DLPRewardSwapImplementation.d.ts +706 -0
  255. package/dist/generated/abi/DLPRewardSwapImplementation.js +915 -0
  256. package/dist/generated/abi/DLPRewardSwapImplementation.js.map +1 -0
  257. package/dist/generated/abi/DLPRootImplementation.cjs +1644 -0
  258. package/dist/generated/abi/DLPRootImplementation.cjs.map +1 -0
  259. package/dist/generated/abi/DLPRootImplementation.d.cts +1248 -0
  260. package/dist/generated/abi/DLPRootImplementation.d.ts +1248 -0
  261. package/dist/generated/abi/DLPRootImplementation.js +1620 -0
  262. package/dist/generated/abi/DLPRootImplementation.js.map +1 -0
  263. package/dist/generated/abi/DLPTreasuryImplementation.cjs +612 -0
  264. package/dist/generated/abi/DLPTreasuryImplementation.cjs.map +1 -0
  265. package/dist/generated/abi/DLPTreasuryImplementation.d.cts +452 -0
  266. package/dist/generated/abi/DLPTreasuryImplementation.d.ts +452 -0
  267. package/dist/generated/abi/DLPTreasuryImplementation.js +588 -0
  268. package/dist/generated/abi/DLPTreasuryImplementation.js.map +1 -0
  269. package/dist/generated/abi/DataLiquidityPoolImplementation.cjs +985 -0
  270. package/dist/generated/abi/DataLiquidityPoolImplementation.cjs.map +1 -0
  271. package/dist/generated/abi/DataLiquidityPoolImplementation.d.cts +737 -0
  272. package/dist/generated/abi/DataLiquidityPoolImplementation.d.ts +737 -0
  273. package/dist/generated/abi/DataLiquidityPoolImplementation.js +961 -0
  274. package/dist/generated/abi/DataLiquidityPoolImplementation.js.map +1 -0
  275. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs +888 -0
  276. package/dist/generated/abi/DataPortabilityGranteesImplementation.cjs.map +1 -0
  277. package/dist/generated/abi/DataPortabilityGranteesImplementation.d.cts +661 -0
  278. package/dist/generated/abi/DataPortabilityGranteesImplementation.d.ts +661 -0
  279. package/dist/generated/abi/DataPortabilityGranteesImplementation.js +864 -0
  280. package/dist/generated/abi/DataPortabilityGranteesImplementation.js.map +1 -0
  281. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs +1317 -0
  282. package/dist/generated/abi/DataPortabilityPermissionsImplementation.cjs.map +1 -0
  283. package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.cts +989 -0
  284. package/dist/generated/abi/DataPortabilityPermissionsImplementation.d.ts +989 -0
  285. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js +1293 -0
  286. package/dist/generated/abi/DataPortabilityPermissionsImplementation.js.map +1 -0
  287. package/dist/generated/abi/DataPortabilityServersImplementation.cjs +1438 -0
  288. package/dist/generated/abi/DataPortabilityServersImplementation.cjs.map +1 -0
  289. package/dist/generated/abi/DataPortabilityServersImplementation.d.cts +1086 -0
  290. package/dist/generated/abi/DataPortabilityServersImplementation.d.ts +1086 -0
  291. package/dist/generated/abi/DataPortabilityServersImplementation.js +1414 -0
  292. package/dist/generated/abi/DataPortabilityServersImplementation.js.map +1 -0
  293. package/dist/generated/abi/DataRefinerRegistryImplementation.cjs +984 -0
  294. package/dist/generated/abi/DataRefinerRegistryImplementation.cjs.map +1 -0
  295. package/dist/generated/abi/DataRefinerRegistryImplementation.d.cts +737 -0
  296. package/dist/generated/abi/DataRefinerRegistryImplementation.d.ts +737 -0
  297. package/dist/generated/abi/DataRefinerRegistryImplementation.js +960 -0
  298. package/dist/generated/abi/DataRefinerRegistryImplementation.js.map +1 -0
  299. package/dist/generated/abi/DataRegistryImplementation.cjs +1341 -0
  300. package/dist/generated/abi/DataRegistryImplementation.cjs.map +1 -0
  301. package/dist/generated/abi/DataRegistryImplementation.d.cts +1014 -0
  302. package/dist/generated/abi/DataRegistryImplementation.d.ts +1014 -0
  303. package/dist/generated/abi/DataRegistryImplementation.js +1317 -0
  304. package/dist/generated/abi/DataRegistryImplementation.js.map +1 -0
  305. package/dist/generated/abi/QueryEngineImplementation.cjs +1319 -0
  306. package/dist/generated/abi/QueryEngineImplementation.cjs.map +1 -0
  307. package/dist/generated/abi/QueryEngineImplementation.d.cts +1001 -0
  308. package/dist/generated/abi/QueryEngineImplementation.d.ts +1001 -0
  309. package/dist/generated/abi/QueryEngineImplementation.js +1295 -0
  310. package/dist/generated/abi/QueryEngineImplementation.js.map +1 -0
  311. package/dist/generated/abi/SwapHelperImplementation.cjs +1019 -0
  312. package/dist/generated/abi/SwapHelperImplementation.cjs.map +1 -0
  313. package/dist/generated/abi/SwapHelperImplementation.d.cts +764 -0
  314. package/dist/generated/abi/SwapHelperImplementation.d.ts +764 -0
  315. package/dist/generated/abi/SwapHelperImplementation.js +995 -0
  316. package/dist/generated/abi/SwapHelperImplementation.js.map +1 -0
  317. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.cjs +936 -0
  318. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.cjs.map +1 -0
  319. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.d.cts +701 -0
  320. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.d.ts +701 -0
  321. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.js +912 -0
  322. package/dist/generated/abi/TeePoolDedicatedGpuImplementation.js.map +1 -0
  323. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.cjs +936 -0
  324. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.cjs.map +1 -0
  325. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.d.cts +701 -0
  326. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.d.ts +701 -0
  327. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.js +912 -0
  328. package/dist/generated/abi/TeePoolDedicatedStandardImplementation.js.map +1 -0
  329. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.cjs +936 -0
  330. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.cjs.map +1 -0
  331. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.d.cts +701 -0
  332. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.d.ts +701 -0
  333. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.js +912 -0
  334. package/dist/generated/abi/TeePoolEphemeralStandardImplementation.js.map +1 -0
  335. package/dist/generated/abi/TeePoolImplementation.cjs +1313 -0
  336. package/dist/generated/abi/TeePoolImplementation.cjs.map +1 -0
  337. package/dist/generated/abi/TeePoolImplementation.d.cts +993 -0
  338. package/dist/generated/abi/TeePoolImplementation.d.ts +993 -0
  339. package/dist/generated/abi/TeePoolImplementation.js +1289 -0
  340. package/dist/generated/abi/TeePoolImplementation.js.map +1 -0
  341. package/dist/generated/abi/TeePoolPersistentGpuImplementation.cjs +936 -0
  342. package/dist/generated/abi/TeePoolPersistentGpuImplementation.cjs.map +1 -0
  343. package/dist/generated/abi/TeePoolPersistentGpuImplementation.d.cts +701 -0
  344. package/dist/generated/abi/TeePoolPersistentGpuImplementation.d.ts +701 -0
  345. package/dist/generated/abi/TeePoolPersistentGpuImplementation.js +912 -0
  346. package/dist/generated/abi/TeePoolPersistentGpuImplementation.js.map +1 -0
  347. package/dist/generated/abi/TeePoolPersistentStandardImplementation.cjs +936 -0
  348. package/dist/generated/abi/TeePoolPersistentStandardImplementation.cjs.map +1 -0
  349. package/dist/generated/abi/TeePoolPersistentStandardImplementation.d.cts +701 -0
  350. package/dist/generated/abi/TeePoolPersistentStandardImplementation.d.ts +701 -0
  351. package/dist/generated/abi/TeePoolPersistentStandardImplementation.js +912 -0
  352. package/dist/generated/abi/TeePoolPersistentStandardImplementation.js.map +1 -0
  353. package/dist/generated/abi/TeePoolPhalaImplementation.cjs +1313 -0
  354. package/dist/generated/abi/TeePoolPhalaImplementation.cjs.map +1 -0
  355. package/dist/generated/abi/TeePoolPhalaImplementation.d.cts +993 -0
  356. package/dist/generated/abi/TeePoolPhalaImplementation.d.ts +993 -0
  357. package/dist/generated/abi/TeePoolPhalaImplementation.js +1289 -0
  358. package/dist/generated/abi/TeePoolPhalaImplementation.js.map +1 -0
  359. package/dist/generated/abi/VanaEpochImplementation.cjs +1188 -0
  360. package/dist/generated/abi/VanaEpochImplementation.cjs.map +1 -0
  361. package/dist/generated/abi/VanaEpochImplementation.d.cts +900 -0
  362. package/dist/generated/abi/VanaEpochImplementation.d.ts +900 -0
  363. package/dist/generated/abi/VanaEpochImplementation.js +1164 -0
  364. package/dist/generated/abi/VanaEpochImplementation.js.map +1 -0
  365. package/dist/generated/abi/VanaPoolEntityImplementation.cjs +1234 -0
  366. package/dist/generated/abi/VanaPoolEntityImplementation.cjs.map +1 -0
  367. package/dist/generated/abi/VanaPoolEntityImplementation.d.cts +934 -0
  368. package/dist/generated/abi/VanaPoolEntityImplementation.d.ts +934 -0
  369. package/dist/generated/abi/VanaPoolEntityImplementation.js +1210 -0
  370. package/dist/generated/abi/VanaPoolEntityImplementation.js.map +1 -0
  371. package/dist/generated/abi/VanaPoolStakingImplementation.cjs +921 -0
  372. package/dist/generated/abi/VanaPoolStakingImplementation.cjs.map +1 -0
  373. package/dist/generated/abi/VanaPoolStakingImplementation.d.cts +693 -0
  374. package/dist/generated/abi/VanaPoolStakingImplementation.d.ts +693 -0
  375. package/dist/generated/abi/VanaPoolStakingImplementation.js +897 -0
  376. package/dist/generated/abi/VanaPoolStakingImplementation.js.map +1 -0
  377. package/dist/generated/abi/VanaPoolTreasuryImplementation.cjs +538 -0
  378. package/dist/generated/abi/VanaPoolTreasuryImplementation.cjs.map +1 -0
  379. package/dist/generated/abi/VanaPoolTreasuryImplementation.d.cts +394 -0
  380. package/dist/generated/abi/VanaPoolTreasuryImplementation.d.ts +394 -0
  381. package/dist/generated/abi/VanaPoolTreasuryImplementation.js +514 -0
  382. package/dist/generated/abi/VanaPoolTreasuryImplementation.js.map +1 -0
  383. package/dist/generated/abi/index.cjs +177 -0
  384. package/dist/generated/abi/index.cjs.map +1 -0
  385. package/dist/generated/abi/index.d.cts +26547 -0
  386. package/dist/generated/abi/index.d.ts +26547 -0
  387. package/dist/generated/abi/index.js +120 -0
  388. package/dist/generated/abi/index.js.map +1 -0
  389. package/dist/generated/event-types.cjs +17 -0
  390. package/dist/generated/event-types.cjs.map +1 -0
  391. package/dist/generated/event-types.d.cts +855 -0
  392. package/dist/generated/event-types.d.ts +855 -0
  393. package/dist/generated/event-types.js +1 -0
  394. package/dist/generated/event-types.js.map +1 -0
  395. package/dist/generated/eventRegistry.cjs +3351 -0
  396. package/dist/generated/eventRegistry.cjs.map +1 -0
  397. package/dist/generated/eventRegistry.d.cts +18 -0
  398. package/dist/generated/eventRegistry.d.ts +18 -0
  399. package/dist/generated/eventRegistry.js +3326 -0
  400. package/dist/generated/eventRegistry.js.map +1 -0
  401. package/dist/generated/server/server-exports.cjs +23 -0
  402. package/dist/generated/server/server-exports.cjs.map +1 -0
  403. package/dist/generated/server/server-exports.d.cts +21 -0
  404. package/dist/generated/server/server-exports.d.ts +21 -0
  405. package/dist/generated/server/server-exports.js +2 -0
  406. package/dist/generated/server/server-exports.js.map +1 -0
  407. package/dist/generated/server/server.cjs +17 -0
  408. package/dist/generated/server/server.cjs.map +1 -0
  409. package/dist/generated/server/server.d.cts +512 -0
  410. package/dist/generated/server/server.d.ts +512 -0
  411. package/dist/generated/server/server.js +1 -0
  412. package/dist/generated/server/server.js.map +1 -0
  413. package/dist/generated/subgraph.cjs +675 -0
  414. package/dist/generated/subgraph.cjs.map +1 -0
  415. package/dist/generated/subgraph.d.cts +5981 -0
  416. package/dist/generated/subgraph.d.ts +5981 -0
  417. package/dist/generated/subgraph.js +644 -0
  418. package/dist/generated/subgraph.js.map +1 -0
  419. package/dist/index.browser.cjs +151 -0
  420. package/dist/index.browser.cjs.map +1 -0
  421. package/dist/index.browser.d.cts +201 -0
  422. package/dist/index.browser.d.ts +92 -37352
  423. package/dist/index.browser.js +64 -46773
  424. package/dist/index.browser.js.map +1 -1
  425. package/dist/index.cjs +3 -0
  426. package/dist/index.cjs.map +1 -0
  427. package/dist/index.d.ts +2 -0
  428. package/dist/index.js +2 -0
  429. package/dist/index.js.map +1 -0
  430. package/dist/index.node.cjs +87 -47260
  431. package/dist/index.node.cjs.map +1 -1
  432. package/dist/index.node.d.cts +86 -37621
  433. package/dist/index.node.d.ts +86 -37621
  434. package/dist/index.node.js +68 -47146
  435. package/dist/index.node.js.map +1 -1
  436. package/dist/node.cjs +2 -321
  437. package/dist/node.cjs.map +1 -1
  438. package/dist/node.d.cts +2 -1
  439. package/dist/node.d.ts +2 -1
  440. package/dist/node.js +1 -307
  441. package/dist/node.js.map +1 -1
  442. package/dist/platform/browser-only.cjs +37 -0
  443. package/dist/platform/browser-only.cjs.map +1 -0
  444. package/dist/platform/browser-only.d.cts +25 -0
  445. package/dist/platform/browser-only.d.ts +25 -0
  446. package/dist/platform/browser-only.js +12 -0
  447. package/dist/platform/browser-only.js.map +1 -0
  448. package/dist/platform/browser-safe.cjs +57 -0
  449. package/dist/platform/browser-safe.cjs.map +1 -0
  450. package/dist/platform/browser-safe.d.cts +32 -0
  451. package/dist/platform/browser-safe.d.ts +32 -0
  452. package/dist/platform/browser-safe.js +31 -0
  453. package/dist/platform/browser-safe.js.map +1 -0
  454. package/dist/platform/browser.cjs +329 -0
  455. package/dist/platform/browser.cjs.map +1 -0
  456. package/dist/platform/browser.d.cts +74 -0
  457. package/dist/platform/browser.d.ts +74 -0
  458. package/dist/platform/browser.js +304 -0
  459. package/dist/platform/browser.js.map +1 -0
  460. package/dist/platform/index.cjs +50 -0
  461. package/dist/platform/index.cjs.map +1 -0
  462. package/dist/platform/index.d.cts +5 -0
  463. package/dist/platform/index.d.ts +5 -0
  464. package/dist/platform/index.js +27 -0
  465. package/dist/platform/index.js.map +1 -0
  466. package/dist/platform/interface.cjs +17 -0
  467. package/dist/platform/interface.cjs.map +1 -0
  468. package/dist/{node-D9-F9uEP.d.cts → platform/interface.d.cts} +1 -21
  469. package/dist/{node-D9-F9uEP.d.ts → platform/interface.d.ts} +1 -21
  470. package/dist/platform/interface.js +1 -0
  471. package/dist/platform/interface.js.map +1 -0
  472. package/dist/platform/node.cjs +351 -0
  473. package/dist/platform/node.cjs.map +1 -0
  474. package/dist/platform/node.d.cts +27 -0
  475. package/dist/platform/node.d.ts +27 -0
  476. package/dist/platform/node.js +327 -0
  477. package/dist/platform/node.js.map +1 -0
  478. package/dist/platform/shared/error-utils.cjs +43 -0
  479. package/dist/platform/shared/error-utils.cjs.map +1 -0
  480. package/dist/platform/shared/error-utils.d.cts +25 -0
  481. package/dist/platform/shared/error-utils.d.ts +25 -0
  482. package/dist/platform/shared/error-utils.js +18 -0
  483. package/dist/platform/shared/error-utils.js.map +1 -0
  484. package/dist/platform/shared/pgp-utils.cjs +55 -0
  485. package/dist/platform/shared/pgp-utils.cjs.map +1 -0
  486. package/dist/platform/shared/pgp-utils.d.cts +61 -0
  487. package/dist/platform/shared/pgp-utils.d.ts +61 -0
  488. package/dist/platform/shared/pgp-utils.js +29 -0
  489. package/dist/platform/shared/pgp-utils.js.map +1 -0
  490. package/dist/platform/shared/stream-utils.cjs +49 -0
  491. package/dist/platform/shared/stream-utils.cjs.map +1 -0
  492. package/dist/platform/shared/stream-utils.d.cts +16 -0
  493. package/dist/platform/shared/stream-utils.d.ts +16 -0
  494. package/dist/platform/shared/stream-utils.js +25 -0
  495. package/dist/platform/shared/stream-utils.js.map +1 -0
  496. package/dist/platform/utils.cjs +114 -0
  497. package/dist/platform/utils.cjs.map +1 -0
  498. package/dist/platform/utils.d.cts +53 -0
  499. package/dist/platform/utils.d.ts +53 -0
  500. package/dist/platform/utils.js +76 -0
  501. package/dist/platform/utils.js.map +1 -0
  502. package/dist/platform.browser.cjs +41 -0
  503. package/dist/platform.browser.cjs.map +1 -0
  504. package/dist/platform.browser.d.cts +4 -0
  505. package/dist/platform.browser.d.ts +4 -60
  506. package/dist/platform.browser.js +10 -379
  507. package/dist/platform.browser.js.map +1 -1
  508. package/dist/platform.cjs +14 -708
  509. package/dist/platform.cjs.map +1 -1
  510. package/dist/platform.d.cts +5 -2
  511. package/dist/platform.d.ts +5 -2
  512. package/dist/platform.js +14 -694
  513. package/dist/platform.js.map +1 -1
  514. package/dist/platform.node.cjs +14 -708
  515. package/dist/platform.node.cjs.map +1 -1
  516. package/dist/platform.node.d.cts +5 -105
  517. package/dist/platform.node.d.ts +5 -105
  518. package/dist/platform.node.js +14 -694
  519. package/dist/platform.node.js.map +1 -1
  520. package/dist/schemas/dataSchema.schema.d.cts +88 -0
  521. package/dist/schemas/dataSchema.schema.d.ts +88 -0
  522. package/dist/schemas/dataSchema.schema.json +53 -0
  523. package/dist/schemas/grantFile.schema.d.cts +57 -0
  524. package/dist/schemas/grantFile.schema.d.ts +57 -0
  525. package/dist/schemas/grantFile.schema.json +43 -0
  526. package/dist/server/handler.cjs +101 -0
  527. package/dist/server/handler.cjs.map +1 -0
  528. package/dist/server/handler.d.cts +306 -0
  529. package/dist/server/handler.d.ts +306 -0
  530. package/dist/server/handler.js +77 -0
  531. package/dist/server/handler.js.map +1 -0
  532. package/dist/storage/index.cjs +44 -0
  533. package/dist/storage/index.cjs.map +1 -0
  534. package/dist/storage/index.d.cts +10 -0
  535. package/dist/storage/index.d.ts +10 -0
  536. package/dist/storage/index.js +15 -0
  537. package/dist/storage/index.js.map +1 -0
  538. package/dist/storage/manager.cjs +189 -0
  539. package/dist/storage/manager.cjs.map +1 -0
  540. package/dist/storage/manager.d.cts +150 -0
  541. package/dist/storage/manager.d.ts +150 -0
  542. package/dist/storage/manager.js +172 -0
  543. package/dist/storage/manager.js.map +1 -0
  544. package/dist/storage/providers/callback-storage.cjs +177 -0
  545. package/dist/storage/providers/callback-storage.cjs.map +1 -0
  546. package/dist/storage/providers/callback-storage.d.cts +100 -0
  547. package/dist/storage/providers/callback-storage.d.ts +100 -0
  548. package/dist/storage/providers/callback-storage.js +155 -0
  549. package/dist/storage/providers/callback-storage.js.map +1 -0
  550. package/dist/storage/providers/google-drive.cjs +516 -0
  551. package/dist/storage/providers/google-drive.cjs.map +1 -0
  552. package/dist/storage/providers/google-drive.d.cts +156 -0
  553. package/dist/storage/providers/google-drive.d.ts +156 -0
  554. package/dist/storage/providers/google-drive.js +497 -0
  555. package/dist/storage/providers/google-drive.js.map +1 -0
  556. package/dist/storage/providers/ipfs.cjs +283 -0
  557. package/dist/storage/providers/ipfs.cjs.map +1 -0
  558. package/dist/storage/providers/ipfs.d.cts +163 -0
  559. package/dist/storage/providers/ipfs.d.ts +163 -0
  560. package/dist/storage/providers/ipfs.js +264 -0
  561. package/dist/storage/providers/ipfs.js.map +1 -0
  562. package/dist/storage/providers/pinata.cjs +339 -0
  563. package/dist/storage/providers/pinata.cjs.map +1 -0
  564. package/dist/storage/providers/pinata.d.cts +173 -0
  565. package/dist/storage/providers/pinata.d.ts +173 -0
  566. package/dist/storage/providers/pinata.js +320 -0
  567. package/dist/storage/providers/pinata.js.map +1 -0
  568. package/dist/types/blockchain.cjs +17 -0
  569. package/dist/types/blockchain.cjs.map +1 -0
  570. package/dist/types/blockchain.d.cts +52 -0
  571. package/dist/types/blockchain.d.ts +52 -0
  572. package/dist/types/blockchain.js +1 -0
  573. package/dist/types/blockchain.js.map +1 -0
  574. package/dist/types/chains.cjs +36 -0
  575. package/dist/types/chains.cjs.map +1 -0
  576. package/dist/types/chains.d.cts +34 -0
  577. package/dist/types/chains.d.ts +34 -0
  578. package/dist/types/chains.js +11 -0
  579. package/dist/types/chains.js.map +1 -0
  580. package/dist/types/config.cjs +41 -0
  581. package/dist/types/config.cjs.map +1 -0
  582. package/dist/types/config.d.cts +726 -0
  583. package/dist/types/config.d.ts +726 -0
  584. package/dist/types/config.js +15 -0
  585. package/dist/types/config.js.map +1 -0
  586. package/dist/types/contracts.cjs +17 -0
  587. package/dist/types/contracts.cjs.map +1 -0
  588. package/dist/types/contracts.d.cts +68 -0
  589. package/dist/types/contracts.d.ts +68 -0
  590. package/dist/types/contracts.js +1 -0
  591. package/dist/types/contracts.js.map +1 -0
  592. package/dist/types/controller-context.cjs +17 -0
  593. package/dist/types/controller-context.cjs.map +1 -0
  594. package/dist/types/controller-context.d.cts +71 -0
  595. package/dist/types/controller-context.d.ts +71 -0
  596. package/dist/types/controller-context.js +1 -0
  597. package/dist/types/controller-context.js.map +1 -0
  598. package/dist/types/data.cjs +17 -0
  599. package/dist/types/data.cjs.map +1 -0
  600. package/dist/types/data.d.cts +694 -0
  601. package/dist/types/data.d.ts +694 -0
  602. package/dist/types/data.js +1 -0
  603. package/dist/types/data.js.map +1 -0
  604. package/dist/types/eccrypto-js.d.cjs +2 -0
  605. package/dist/types/eccrypto-js.d.cjs.map +1 -0
  606. package/dist/types/eccrypto-js.d.d.cts +13 -0
  607. package/dist/types/eccrypto-js.d.d.ts +13 -0
  608. package/dist/types/eccrypto-js.d.js +1 -0
  609. package/dist/types/eccrypto-js.d.js.map +1 -0
  610. package/dist/types/external-apis.cjs +61 -0
  611. package/dist/types/external-apis.cjs.map +1 -0
  612. package/dist/types/external-apis.d.cts +186 -0
  613. package/dist/types/external-apis.d.ts +186 -0
  614. package/dist/types/external-apis.js +34 -0
  615. package/dist/types/external-apis.js.map +1 -0
  616. package/dist/types/generics.cjs +17 -0
  617. package/dist/types/generics.cjs.map +1 -0
  618. package/dist/types/generics.d.cts +450 -0
  619. package/dist/types/generics.d.ts +450 -0
  620. package/dist/types/generics.js +1 -0
  621. package/dist/types/generics.js.map +1 -0
  622. package/dist/types/index.cjs +64 -0
  623. package/dist/types/index.cjs.map +1 -0
  624. package/dist/types/index.d.cts +22 -0
  625. package/dist/types/index.d.ts +22 -0
  626. package/dist/types/index.js +35 -0
  627. package/dist/types/index.js.map +1 -0
  628. package/dist/types/operations.cjs +65 -0
  629. package/dist/types/operations.cjs.map +1 -0
  630. package/dist/types/operations.d.cts +116 -0
  631. package/dist/types/operations.d.ts +116 -0
  632. package/dist/types/operations.js +37 -0
  633. package/dist/types/operations.js.map +1 -0
  634. package/dist/types/permissions.cjs +17 -0
  635. package/dist/types/permissions.cjs.map +1 -0
  636. package/dist/types/permissions.d.cts +957 -0
  637. package/dist/types/permissions.d.ts +957 -0
  638. package/dist/types/permissions.js +1 -0
  639. package/dist/types/permissions.js.map +1 -0
  640. package/dist/types/personal.cjs +17 -0
  641. package/dist/types/personal.cjs.map +1 -0
  642. package/dist/types/personal.d.cts +40 -0
  643. package/dist/types/personal.d.ts +40 -0
  644. package/dist/types/personal.js +1 -0
  645. package/dist/types/personal.js.map +1 -0
  646. package/dist/types/relayer.cjs +17 -0
  647. package/dist/types/relayer.cjs.map +1 -0
  648. package/dist/types/relayer.d.cts +284 -0
  649. package/dist/types/relayer.d.ts +284 -0
  650. package/dist/types/relayer.js +1 -0
  651. package/dist/types/relayer.js.map +1 -0
  652. package/dist/types/storage.cjs +39 -0
  653. package/dist/types/storage.cjs.map +1 -0
  654. package/dist/types/storage.d.cts +131 -0
  655. package/dist/types/storage.d.ts +131 -0
  656. package/dist/types/storage.js +18 -0
  657. package/dist/types/storage.js.map +1 -0
  658. package/dist/types/transactionResults.cjs +17 -0
  659. package/dist/types/transactionResults.cjs.map +1 -0
  660. package/dist/types/transactionResults.d.cts +195 -0
  661. package/dist/types/transactionResults.d.ts +195 -0
  662. package/dist/types/transactionResults.js +1 -0
  663. package/dist/types/transactionResults.js.map +1 -0
  664. package/dist/types/utils.cjs +17 -0
  665. package/dist/types/utils.cjs.map +1 -0
  666. package/dist/types/utils.d.cts +819 -0
  667. package/dist/types/utils.d.ts +819 -0
  668. package/dist/types/utils.js +1 -0
  669. package/dist/types/utils.js.map +1 -0
  670. package/dist/types.cjs +23 -0
  671. package/dist/types.cjs.map +1 -0
  672. package/dist/types.d.cts +54 -0
  673. package/dist/types.d.ts +54 -0
  674. package/dist/types.js +2 -0
  675. package/dist/types.js.map +1 -0
  676. package/dist/utils/blockchain/registry.cjs +81 -0
  677. package/dist/utils/blockchain/registry.cjs.map +1 -0
  678. package/dist/utils/blockchain/registry.d.cts +34 -0
  679. package/dist/utils/blockchain/registry.d.ts +34 -0
  680. package/dist/utils/blockchain/registry.js +56 -0
  681. package/dist/utils/blockchain/registry.js.map +1 -0
  682. package/dist/utils/crypto-utils.cjs +120 -0
  683. package/dist/utils/crypto-utils.cjs.map +1 -0
  684. package/dist/utils/crypto-utils.d.cts +118 -0
  685. package/dist/utils/crypto-utils.d.ts +118 -0
  686. package/dist/utils/crypto-utils.js +87 -0
  687. package/dist/utils/crypto-utils.js.map +1 -0
  688. package/dist/utils/download.cjs +69 -0
  689. package/dist/utils/download.cjs.map +1 -0
  690. package/dist/utils/download.d.cts +41 -0
  691. package/dist/utils/download.d.ts +41 -0
  692. package/dist/utils/download.js +45 -0
  693. package/dist/utils/download.js.map +1 -0
  694. package/dist/utils/encoding.cjs +66 -0
  695. package/dist/utils/encoding.cjs.map +1 -0
  696. package/dist/utils/encoding.d.cts +54 -0
  697. package/dist/utils/encoding.d.ts +54 -0
  698. package/dist/utils/encoding.js +39 -0
  699. package/dist/utils/encoding.js.map +1 -0
  700. package/dist/utils/encryption.cjs +170 -0
  701. package/dist/utils/encryption.cjs.map +1 -0
  702. package/dist/utils/encryption.d.cts +275 -0
  703. package/dist/utils/encryption.d.ts +275 -0
  704. package/dist/utils/encryption.js +136 -0
  705. package/dist/utils/encryption.js.map +1 -0
  706. package/dist/utils/formatters.cjs +53 -0
  707. package/dist/utils/formatters.cjs.map +1 -0
  708. package/dist/utils/formatters.d.cts +120 -0
  709. package/dist/utils/formatters.d.ts +120 -0
  710. package/dist/utils/formatters.js +26 -0
  711. package/dist/utils/formatters.js.map +1 -0
  712. package/dist/utils/grantFiles.cjs +175 -0
  713. package/dist/utils/grantFiles.cjs.map +1 -0
  714. package/dist/utils/grantFiles.d.cts +186 -0
  715. package/dist/utils/grantFiles.d.ts +186 -0
  716. package/dist/utils/grantFiles.js +137 -0
  717. package/dist/utils/grantFiles.js.map +1 -0
  718. package/dist/utils/grantValidation.cjs +243 -0
  719. package/dist/utils/grantValidation.cjs.map +1 -0
  720. package/dist/utils/grantValidation.d.cts +150 -0
  721. package/dist/utils/grantValidation.d.ts +150 -0
  722. package/dist/utils/grantValidation.js +201 -0
  723. package/dist/utils/grantValidation.js.map +1 -0
  724. package/dist/utils/grants.cjs +108 -0
  725. package/dist/utils/grants.cjs.map +1 -0
  726. package/dist/utils/grants.d.cts +70 -0
  727. package/dist/utils/grants.d.ts +70 -0
  728. package/dist/utils/grants.js +82 -0
  729. package/dist/utils/grants.js.map +1 -0
  730. package/dist/utils/ipfs.cjs +130 -0
  731. package/dist/utils/ipfs.cjs.map +1 -0
  732. package/dist/utils/ipfs.d.cts +90 -0
  733. package/dist/utils/ipfs.d.ts +90 -0
  734. package/dist/utils/ipfs.js +99 -0
  735. package/dist/utils/ipfs.js.map +1 -0
  736. package/dist/utils/lazy-import.cjs +40 -0
  737. package/dist/utils/lazy-import.cjs.map +1 -0
  738. package/dist/utils/lazy-import.d.cts +20 -0
  739. package/dist/utils/lazy-import.d.ts +20 -0
  740. package/dist/utils/lazy-import.js +16 -0
  741. package/dist/utils/lazy-import.js.map +1 -0
  742. package/dist/utils/multicall.cjs +231 -0
  743. package/dist/utils/multicall.cjs.map +1 -0
  744. package/dist/utils/multicall.d.cts +129 -0
  745. package/dist/utils/multicall.d.ts +129 -0
  746. package/dist/utils/multicall.js +206 -0
  747. package/dist/utils/multicall.js.map +1 -0
  748. package/dist/utils/parseTransactionPojo.cjs +87 -0
  749. package/dist/utils/parseTransactionPojo.cjs.map +1 -0
  750. package/dist/utils/parseTransactionPojo.d.cts +37 -0
  751. package/dist/utils/parseTransactionPojo.d.ts +37 -0
  752. package/dist/utils/parseTransactionPojo.js +63 -0
  753. package/dist/utils/parseTransactionPojo.js.map +1 -0
  754. package/dist/utils/schemaValidation.cjs +258 -0
  755. package/dist/utils/schemaValidation.cjs.map +1 -0
  756. package/dist/utils/schemaValidation.d.cts +172 -0
  757. package/dist/utils/schemaValidation.d.ts +172 -0
  758. package/dist/utils/schemaValidation.js +222 -0
  759. package/dist/utils/schemaValidation.js.map +1 -0
  760. package/dist/utils/signatureCache.cjs +187 -0
  761. package/dist/utils/signatureCache.cjs.map +1 -0
  762. package/dist/utils/signatureCache.d.cts +134 -0
  763. package/dist/utils/signatureCache.d.ts +134 -0
  764. package/dist/utils/signatureCache.js +165 -0
  765. package/dist/utils/signatureCache.js.map +1 -0
  766. package/dist/utils/signatureFormatter.cjs +45 -0
  767. package/dist/utils/signatureFormatter.cjs.map +1 -0
  768. package/dist/utils/signatureFormatter.d.cts +39 -0
  769. package/dist/utils/signatureFormatter.d.ts +39 -0
  770. package/dist/utils/signatureFormatter.js +21 -0
  771. package/dist/utils/signatureFormatter.js.map +1 -0
  772. package/dist/utils/transactionHelpers.cjs +54 -0
  773. package/dist/utils/transactionHelpers.cjs.map +1 -0
  774. package/dist/utils/transactionHelpers.d.cts +86 -0
  775. package/dist/utils/transactionHelpers.d.ts +86 -0
  776. package/dist/utils/transactionHelpers.js +29 -0
  777. package/dist/utils/transactionHelpers.js.map +1 -0
  778. package/dist/utils/typedDataConverter.cjs +43 -0
  779. package/dist/utils/typedDataConverter.cjs.map +1 -0
  780. package/dist/utils/typedDataConverter.d.cts +13 -0
  781. package/dist/utils/typedDataConverter.d.ts +13 -0
  782. package/dist/utils/typedDataConverter.js +19 -0
  783. package/dist/utils/typedDataConverter.js.map +1 -0
  784. package/dist/utils/urlResolver.cjs +55 -0
  785. package/dist/utils/urlResolver.cjs.map +1 -0
  786. package/dist/utils/urlResolver.d.cts +40 -0
  787. package/dist/utils/urlResolver.d.ts +40 -0
  788. package/dist/utils/urlResolver.js +30 -0
  789. package/dist/utils/urlResolver.js.map +1 -0
  790. package/dist/utils/withEvents.cjs +44 -0
  791. package/dist/utils/withEvents.cjs.map +1 -0
  792. package/dist/utils/withEvents.d.cts +63 -0
  793. package/dist/utils/withEvents.d.ts +63 -0
  794. package/dist/utils/withEvents.js +18 -0
  795. package/dist/utils/withEvents.js.map +1 -0
  796. package/package.json +45 -19
  797. package/dist/browser-DY8XDblx.d.ts +0 -241
@@ -0,0 +1,1383 @@
1
+ import { Hash, Address } from 'viem';
2
+ import { GrantPermissionParams, GrantFile, PermissionGrantTypedData, TrustServerTypedData, AddAndTrustServerTypedData, GenericTypedData, RevokePermissionParams, GetUserPermissionsOptions, OnChainPermissionGrant, AddAndTrustServerParams, TrustServerParams, UntrustServerParams, TrustedServerQueryOptions, PaginatedTrustedServers, TrustedServerInfo, BatchServerInfoResult, ServerTrustStatus, RegisterGranteeParams, RegisterGranteeTypedData, GranteeQueryOptions, PaginatedGrantees, Grantee, ServerInfo, PermissionInfo, GranteeInfo, ServerFilesAndPermissionParams, ServerFilesAndPermissionTypedData } from '../types/permissions.js';
3
+ import { PermissionGrantResult, PermissionRevokeResult, ServerTrustResult } from '../types/transactionResults.js';
4
+ import { TransactionResult } from '../types/operations.js';
5
+ import { ControllerContext } from '../types/controller-context.js';
6
+ import '../generated/event-types.js';
7
+ import '../generated/server/server-exports.js';
8
+ import '../generated/server/server.js';
9
+ import '../platform/interface.js';
10
+ import '../types/config.js';
11
+ import '../types/chains.js';
12
+ import '../types/storage.js';
13
+ import '../storage/manager.js';
14
+
15
+ /**
16
+ * Manages gasless data access permissions and trusted server registry operations.
17
+ *
18
+ * @remarks
19
+ * This controller enables users to grant applications access to their data without
20
+ * paying gas fees. It handles the complete EIP-712 permission flow including signature
21
+ * creation, IPFS storage of permission details, and gasless transaction submission.
22
+ * The controller also manages trusted servers that can process user data and provides
23
+ * methods for revoking permissions when access is no longer needed.
24
+ *
25
+ * **Permission Architecture:**
26
+ * Permissions use dual storage: detailed parameters stored on IPFS, references stored on blockchain.
27
+ * This enables complex permissions while maintaining minimal on-chain data.
28
+ *
29
+ * **Method Selection:**
30
+ * - `grant()` creates new permissions with automatic IPFS upload and blockchain registration
31
+ * - `prepareGrant()` allows preview before signing for interactive applications
32
+ * - `revoke()` removes permissions by ID, supporting both gasless and direct transactions
33
+ * - `getUserPermissionGrantsOnChain()` queries existing permissions efficiently
34
+ * - `trustServer()` and `untrustServer()` manage server access for data processing
35
+ *
36
+ * **Transaction Types:**
37
+ * Methods with gasless support: `grant()`, `revoke()`, `trustServer()`, `untrustServer()`
38
+ * Methods requiring direct transactions: none (all support both gasless and direct)
39
+ * @example
40
+ * ```typescript
41
+ * // Grant permission for an app to access your data
42
+ * const txHash = await vana.permissions.grant({
43
+ * grantee: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
44
+ * operation: "llm_inference",
45
+ * files: [1, 2, 3],
46
+ * parameters: { model: "gpt-4", maxTokens: 1000 },
47
+ * });
48
+ *
49
+ * // Trust a server for data processing
50
+ * await vana.permissions.trustServer({
51
+ * serverId: "0x123...",
52
+ * serverUrl: "https://personal-server.vana.org",
53
+ * });
54
+ *
55
+ * // Query current permissions
56
+ * const permissions = await vana.permissions.getUserPermissionGrantsOnChain();
57
+ * ```
58
+ * @category Permissions
59
+ * @see {@link https://docs.vana.com/developer/permissions | Vana Permissions System} for conceptual overview
60
+ */
61
+ declare class PermissionsController {
62
+ private readonly context;
63
+ constructor(context: ControllerContext);
64
+ /**
65
+ * Grants permission for an application to access user data with gasless transactions.
66
+ *
67
+ * This method provides a complete end-to-end permission grant flow that returns
68
+ * the permission ID and other relevant data immediately after successful submission.
69
+ * For advanced users who need more control over the transaction lifecycle, use
70
+ * `submitPermissionGrant()` instead.
71
+ *
72
+ * @param params - The permission grant configuration object
73
+ * @returns Promise resolving to permission data from the PermissionAdded event
74
+ * @throws {RelayerError} When gasless transaction submission fails
75
+ * @throws {SignatureError} When user rejects the signature request
76
+ * @throws {SerializationError} When grant data cannot be serialized
77
+ * @throws {BlockchainError} When permission grant fails or event parsing fails
78
+ * @throws {NetworkError} When transaction confirmation times out
79
+ * @example
80
+ * ```typescript
81
+ * const result = await vana.permissions.grant({
82
+ * grantee: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
83
+ * operation: "llm_inference",
84
+ * parameters: {
85
+ * model: "gpt-4",
86
+ * maxTokens: 1000,
87
+ * temperature: 0.7,
88
+ * },
89
+ * });
90
+ *
91
+ * console.log(`Permission ${result.permissionId} granted to ${result.user}`);
92
+ * console.log(`Transaction: ${result.transactionHash}`);
93
+ *
94
+ * // Can immediately use the permission ID for other operations
95
+ * await vana.permissions.revoke({ permissionId: result.permissionId });
96
+ * ```
97
+ */
98
+ grant(params: GrantPermissionParams): Promise<PermissionGrantResult>;
99
+ /**
100
+ * Submits a permission grant transaction and returns a handle for flexible result access.
101
+ *
102
+ * @remarks
103
+ * This lower-level method provides maximum control over transaction timing.
104
+ * Returns a TransactionResult that can be serialized and passed across API boundaries.
105
+ * Use this when handling multiple transactions or when you need granular control.
106
+ *
107
+ * @param params - The permission grant configuration object
108
+ * @returns Promise resolving to TransactionResult with hash and event parsing capabilities
109
+ * @throws {RelayerError} When gasless transaction submission fails
110
+ * @throws {SignatureError} When user rejects the signature request
111
+ * @throws {SerializationError} When grant data cannot be serialized
112
+ * @throws {BlockchainError} When permission grant preparation fails
113
+ * @example
114
+ * ```typescript
115
+ * // Submit transaction and get immediate hash access
116
+ * const tx = await vana.permissions.submitPermissionGrant(params);
117
+ * console.log(`Transaction submitted: ${tx.hash}`);
118
+ *
119
+ * // To wait for events, use SDK's waitForTransactionEvents
120
+ * const eventData = await vana.waitForTransactionEvents(tx.hash);
121
+ * console.log(`Permission ID: ${eventData.permissionId}`);
122
+ * ```
123
+ */
124
+ submitPermissionGrant(params: GrantPermissionParams): Promise<TransactionResult<"DataPortabilityPermissions", "addPermission">>;
125
+ /**
126
+ * Prepares a permission grant with preview before signing.
127
+ *
128
+ * @remarks
129
+ * This method implements a two-phase commit workflow that allows applications
130
+ * to show users a preview of what they're authorizing before requesting a signature.
131
+ * Unlike `createAndSign()`, this method does NOT upload to IPFS or prompt for signatures
132
+ * until the returned `confirm()` function is called.
133
+ * @param params - The permission grant parameters
134
+ * @returns A promise resolving to a preview object and confirm function
135
+ * @throws {SerializationError} When grant parameters are invalid or cannot be serialized
136
+ * @throws {BlockchainError} When grant validation fails or preparation encounters an error
137
+ * @example
138
+ * ```typescript
139
+ * const { preview, confirm } = await vana.permissions.prepareGrant({
140
+ * grantee: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
141
+ * operation: "llm_inference",
142
+ * files: [1, 2, 3],
143
+ * parameters: { model: "gpt-4", prompt: "Analyze my social media data" }
144
+ * });
145
+ *
146
+ * console.log(`Granting ${preview.operation} access to ${preview.files?.length} files`);
147
+ * const transactionHash = await confirm();
148
+ * ```
149
+ */
150
+ prepareGrant(params: GrantPermissionParams): Promise<{
151
+ preview: GrantFile;
152
+ confirm: () => Promise<PermissionGrantResult>;
153
+ }>;
154
+ /**
155
+ * Completes the grant process after user confirmation.
156
+ *
157
+ * @remarks
158
+ * This internal method is called by the confirm() function returned from prepareGrant().
159
+ * It handles IPFS upload, signature creation, and transaction submission.
160
+ *
161
+ * @param params - The permission grant parameters containing user and operation details
162
+ * @param grantFile - The prepared grant file with permissions and metadata
163
+ * @returns Promise resolving to TransactionResult for flexible result access
164
+ * @throws {BlockchainError} When permission grant confirmation fails
165
+ * @throws {NetworkError} When IPFS upload fails
166
+ * @throws {SignatureError} When user rejects the signature
167
+ */
168
+ private confirmGrantInternal;
169
+ /**
170
+ * Creates typed data and signature for a permission grant without submitting.
171
+ *
172
+ * @remarks
173
+ * This method handles the first phase of permission granting: creating the grant file,
174
+ * storing it on IPFS, and generating the user's EIP-712 signature. Use this when you
175
+ * want to handle submission separately or batch multiple operations. The method validates
176
+ * the grant file against the JSON schema before creating the signature.
177
+ *
178
+ * For interactive user flows, consider using `prepareGrant()` instead,
179
+ * which allows showing a preview before signing.
180
+ * @param params - The permission grant configuration object
181
+ * @returns A promise resolving to the typed data structure and signature for gasless submission
182
+ * @throws {SignatureError} When the user rejects the signature request
183
+ * @throws {SerializationError} When grant data cannot be properly formatted
184
+ * @throws {BlockchainError} When permission grant preparation fails
185
+ * @throws {NetworkError} When storage operations fail
186
+ * @example
187
+ * ```typescript
188
+ * const { typedData, signature } = await vana.permissions.createAndSign({
189
+ * grantee: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
190
+ * operation: "data_analysis",
191
+ * parameters: { analysisType: "sentiment" },
192
+ * });
193
+ *
194
+ * const transactionHash = await vana.permissions.submitSignedGrant(typedData, signature);
195
+ * ```
196
+ */
197
+ createAndSign(params: GrantPermissionParams): Promise<{
198
+ typedData: PermissionGrantTypedData;
199
+ signature: Hash;
200
+ }>;
201
+ /**
202
+ * Submits an already-signed permission grant to the blockchain.
203
+ *
204
+ * @remarks
205
+ * This method supports both relayer-based gasless transactions and direct transactions.
206
+ * It automatically converts `bigint` values to JSON-safe strings when using relayer
207
+ * callbacks and handles transaction submission with proper error handling and retry logic.
208
+ * @param typedData - The EIP-712 typed data structure for the permission grant
209
+ * @param signature - The user's signature as a hex string
210
+ * @returns A Promise that resolves to the transaction hash
211
+ * @throws {RelayerError} When gasless transaction submission fails
212
+ * @throws {BlockchainError} When permission submission fails
213
+ * @throws {NetworkError} When network communication fails
214
+ * @example
215
+ * ```typescript
216
+ * const txHash = await vana.permissions.submitSignedGrant(
217
+ * typedData,
218
+ * "0x1234..."
219
+ * );
220
+ * ```
221
+ */
222
+ submitSignedGrant(typedData: PermissionGrantTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityPermissions", "addPermission">>;
223
+ /**
224
+ * Submits an already-signed trust server transaction to the blockchain.
225
+ *
226
+ * @remarks
227
+ * This method extracts the trust server input from typed data and submits it directly.
228
+ * Used internally by trust server methods after signature collection.
229
+ *
230
+ * @param typedData - The EIP-712 typed data for TrustServer
231
+ * @param signature - The user's signature obtained via `signTypedData()`
232
+ * @returns Promise resolving to TransactionResult for transaction tracking
233
+ * @throws {BlockchainError} When contract submission fails
234
+ * @throws {NetworkError} When blockchain communication fails
235
+ * @example
236
+ * ```typescript
237
+ * const txHandle = await vana.permissions.submitSignedTrustServer(
238
+ * typedData,
239
+ * "0x1234..."
240
+ * );
241
+ * const result = await txHandle.waitForEvents();
242
+ * ```
243
+ */
244
+ submitSignedTrustServer(typedData: TrustServerTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityServers", "trustServerWithSignature">>;
245
+ /**
246
+ * Submits an already-signed add and trust server transaction to the blockchain.
247
+ *
248
+ * @remarks
249
+ * This method extracts the add and trust server input from typed data and submits it directly.
250
+ * Combines server registration and trust operations in a single transaction.
251
+ *
252
+ * @param typedData - The EIP-712 typed data for AddAndTrustServer
253
+ * @param signature - The user's signature obtained via `signTypedData()`
254
+ * @returns Promise resolving to TransactionResult for transaction tracking
255
+ * @throws {BlockchainError} When contract submission fails
256
+ * @throws {NetworkError} When blockchain communication fails
257
+ * @example
258
+ * ```typescript
259
+ * const txHandle = await vana.permissions.submitSignedAddAndTrustServer(
260
+ * typedData,
261
+ * "0x1234..."
262
+ * );
263
+ * const result = await txHandle.waitForEvents();
264
+ * ```
265
+ */
266
+ submitSignedAddAndTrustServer(typedData: AddAndTrustServerTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityServers", "addAndTrustServerWithSignature">>;
267
+ /**
268
+ * Internal method to submit a signed grant and wait for events.
269
+ *
270
+ * @internal
271
+ * @param typedData - The EIP-712 typed data for the permission grant
272
+ * @param signature - The user's signature authorizing the transaction
273
+ * @returns Promise resolving to PermissionGrantResult with parsed events
274
+ */
275
+ private submitSignedGrantWithEvents;
276
+ /**
277
+ * Internal method for confirm grant with events.
278
+ *
279
+ * @internal
280
+ * @param params - The permission grant parameters
281
+ * @param grantFile - The pre-created grant file object
282
+ * @returns Promise resolving to PermissionGrantResult with parsed events
283
+ */
284
+ private confirmGrantInternalWithEvents;
285
+ /**
286
+ * Internal method to submit a signed revoke and wait for events.
287
+ *
288
+ * @internal
289
+ * @param typedData - The EIP-712 typed data for the permission revoke
290
+ * @param signature - The user's signature authorizing the transaction
291
+ * @returns Promise resolving to PermissionRevokeResult with parsed events
292
+ */
293
+ private submitSignedRevokeWithEvents;
294
+ /**
295
+ * Submits an already-signed permission revoke transaction to the blockchain.
296
+ *
297
+ * @remarks
298
+ * This method handles the revocation of previously granted permissions.
299
+ * Used internally by revocation methods after signature collection.
300
+ *
301
+ * @param typedData - The EIP-712 typed data for PermissionRevoke
302
+ * @param signature - The user's signature obtained via `signTypedData()`
303
+ * @returns Promise resolving to TransactionResult for transaction tracking
304
+ * @throws {BlockchainError} When contract submission fails
305
+ * @throws {NetworkError} When blockchain communication fails
306
+ * @example
307
+ * ```typescript
308
+ * const txHandle = await vana.permissions.submitSignedRevoke(
309
+ * typedData,
310
+ * "0x1234..."
311
+ * );
312
+ * const result = await txHandle.waitForEvents();
313
+ * ```
314
+ */
315
+ submitSignedRevoke(typedData: GenericTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityPermissions", "revokePermissionWithSignature">>;
316
+ /**
317
+ * Submits an already-signed untrust server transaction to the blockchain.
318
+ *
319
+ * @remarks
320
+ * This method handles the removal of trusted servers.
321
+ * Used internally by untrust server methods after signature collection.
322
+ *
323
+ * @param typedData - The EIP-712 typed data for UntrustServer
324
+ * @param signature - The user's signature obtained via `signTypedData()`
325
+ * @returns Promise resolving to TransactionResult for transaction tracking
326
+ * @throws {BlockchainError} When contract submission fails
327
+ * @throws {NetworkError} When blockchain communication fails
328
+ * @example
329
+ * ```typescript
330
+ * const txHandle = await vana.permissions.submitSignedUntrustServer(
331
+ * typedData,
332
+ * "0x1234..."
333
+ * );
334
+ * const result = await txHandle.waitForEvents();
335
+ * ```
336
+ */
337
+ submitSignedUntrustServer(typedData: GenericTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityServers", "untrustServerWithSignature">>;
338
+ /**
339
+ * Submits a signed transaction directly to the blockchain.
340
+ *
341
+ * @remarks
342
+ * Internal method used when relayer callbacks are not available. Formats the signature
343
+ * and submits the permission grant directly to the smart contract.
344
+ *
345
+ * @param typedData - The typed data structure for the permission grant
346
+ * @param signature - The cryptographic signature authorizing the transaction
347
+ * @returns Promise resolving to the transaction hash
348
+ * @throws {BlockchainError} When contract submission fails
349
+ */
350
+ private submitDirectTransaction;
351
+ /**
352
+ * Revokes a previously granted permission.
353
+ *
354
+ * This method provides complete revocation with automatic event parsing to confirm
355
+ * the permission was successfully revoked. For advanced users who need more control,
356
+ * use `submitPermissionRevoke()` instead.
357
+ *
358
+ * @param params - Parameters for revoking the permission
359
+ * @param params.permissionId - Permission identifier (accepts bigint, number, or string).
360
+ * Obtain from permission grants via `getUserPermissionGrantsOnChain()`.
361
+ * @returns Promise resolving to revocation data from PermissionRevoked event
362
+ * @throws {BlockchainError} When revocation fails or event parsing fails
363
+ * @throws {UserRejectedRequestError} When user rejects the transaction
364
+ * @throws {NetworkError} When transaction confirmation times out
365
+ * @example
366
+ * ```typescript
367
+ * // Revoke a permission and get confirmation
368
+ * const result = await vana.permissions.revoke({
369
+ * permissionId: 123n
370
+ * });
371
+ * console.log(`Permission ${result.permissionId} revoked in transaction ${result.transactionHash}`);
372
+ * console.log(`Revoked in block ${result.blockNumber}`);
373
+ * ```
374
+ */
375
+ revoke(params: RevokePermissionParams): Promise<PermissionRevokeResult>;
376
+ /**
377
+ * Submits a permission revocation transaction and returns the transaction hash immediately.
378
+ *
379
+ * This is the lower-level method that provides maximum control over transaction timing.
380
+ * Use this when you want to handle transaction confirmation and event parsing separately.
381
+ *
382
+ * @param params - Parameters for revoking the permission
383
+ * @returns Promise resolving to the transaction hash when successfully submitted
384
+ * @throws {BlockchainError} When revocation transaction fails
385
+ * @throws {UserRejectedRequestError} When user rejects the transaction
386
+ * @example
387
+ * ```typescript
388
+ * // Submit revocation and handle confirmation later
389
+ * const txHash = await vana.permissions.submitPermissionRevoke({
390
+ * permissionId: 123n
391
+ * });
392
+ * console.log(`Revocation submitted: ${txHash}`);
393
+ * ```
394
+ */
395
+ submitPermissionRevoke(params: RevokePermissionParams): Promise<TransactionResult<"DataPortabilityPermissions", "revokePermission">>;
396
+ /**
397
+ * Revokes a permission with a signature for gasless transactions.
398
+ *
399
+ * @remarks
400
+ * This method creates an EIP-712 signature for permission revocation and submits
401
+ * it either through relayer callbacks or directly to the blockchain. Provides
402
+ * gasless revocation when relayer is configured.
403
+ *
404
+ * @param params - Parameters for revoking the permission
405
+ * @param params.permissionId - Permission identifier to revoke (accepts bigint, number, or string)
406
+ * @returns Promise resolving to TransactionResult for transaction tracking
407
+ * @throws {BlockchainError} When chain ID is not available
408
+ * @throws {NonceError} When retrieving user nonce fails
409
+ * @throws {SignatureError} When user rejects the signature request
410
+ * @throws {RelayerError} When gasless submission fails
411
+ * @throws {PermissionError} When revocation fails for any other reason
412
+ * @example
413
+ * ```typescript
414
+ * const txHandle = await vana.permissions.submitRevokeWithSignature({
415
+ * permissionId: 123n
416
+ * });
417
+ * const result = await txHandle.waitForEvents();
418
+ * console.log(`Permission ${result.permissionId} revoked`);
419
+ * ```
420
+ */
421
+ submitRevokeWithSignature(params: RevokePermissionParams): Promise<TransactionResult<"DataPortabilityPermissions", "revokePermissionWithSignature">>;
422
+ /**
423
+ * @deprecated Use getPermissionsUserNonce() for permission operations or getServersUserNonce() for server operations
424
+ *
425
+ * Retrieves the user's current nonce from the DataPortabilityServers contract.
426
+ * This method is deprecated in favor of more specific nonce methods.
427
+ *
428
+ * The nonce is used to prevent replay attacks in signed transactions and must
429
+ * be incremented with each transaction to maintain security.
430
+ *
431
+ * @returns Promise resolving to the user's current nonce value as a bigint
432
+ * @throws {Error} When wallet account is not available
433
+ * @throws {Error} When chain ID is not available
434
+ * @throws {NonceError} When reading nonce from contract fails
435
+ * @private
436
+ * @example
437
+ * ```typescript
438
+ * // Deprecated - use specific methods instead
439
+ * const nonce = await this.getUserNonce();
440
+ *
441
+ * // Use these instead:
442
+ * const permissionsNonce = await this.getPermissionsUserNonce();
443
+ * const serversNonce = await this.getServersUserNonce();
444
+ * ```
445
+ */
446
+ /**
447
+ * @deprecated Use getPermissionsUserNonce() for permission operations or getServersUserNonce() for server operations
448
+ *
449
+ * Retrieves the user's current nonce from the DataPortabilityServers contract.
450
+ *
451
+ * @remarks
452
+ * This method is deprecated in favor of more specific nonce methods that target
453
+ * the appropriate contract for the operation being performed.
454
+ *
455
+ * @returns Promise resolving to the user's current nonce as a bigint
456
+ * @throws {NonceError} When retrieving the nonce fails
457
+ */
458
+ private getUserNonce;
459
+ /**
460
+ * Retrieves the user's current nonce from the DataPortabilityServers contract.
461
+ * This nonce is used for server-related operations (AddAndTrustServer, TrustServer, UntrustServer).
462
+ *
463
+ * @returns Promise resolving to the current servers nonce
464
+ * @throws {NonceError} When reading nonce from contract fails
465
+ * @private
466
+ *
467
+ * @example
468
+ * ```typescript
469
+ * const nonce = await this.getServersUserNonce();
470
+ * console.log(`Current servers nonce: ${nonce}`);
471
+ * ```
472
+ */
473
+ /**
474
+ * Retrieves the user's current nonce from the DataPortabilityServers contract.
475
+ *
476
+ * @remarks
477
+ * Used for server-related operations (trust/untrust) to prevent replay attacks.
478
+ * The nonce must be incremented with each server operation.
479
+ *
480
+ * @returns Promise resolving to the user's current nonce as a bigint
481
+ * @throws {NonceError} When retrieving the nonce fails
482
+ */
483
+ private getServersUserNonce;
484
+ /**
485
+ * Retrieves the user's current nonce from the DataPortabilityPermissions contract.
486
+ * This nonce is used for permission-related operations (addPermission, addServerFilesAndPermissions).
487
+ *
488
+ * @returns Promise resolving to the current permissions nonce
489
+ * @throws {NonceError} When reading nonce from contract fails
490
+ * @private
491
+ *
492
+ * @example
493
+ * ```typescript
494
+ * const nonce = await this.getPermissionsUserNonce();
495
+ * console.log(`Current permissions nonce: ${nonce}`);
496
+ * ```
497
+ */
498
+ /**
499
+ * Retrieves the user's current nonce from the DataPortabilityPermissions contract.
500
+ *
501
+ * @remarks
502
+ * Used for permission-related operations (grant/revoke) to prevent replay attacks.
503
+ * The nonce must be incremented with each permission operation.
504
+ *
505
+ * @returns Promise resolving to the user's current nonce as a bigint
506
+ * @throws {NonceError} When retrieving the nonce fails
507
+ */
508
+ private getPermissionsUserNonce;
509
+ /**
510
+ * Composes the EIP-712 typed data for PermissionGrant (new simplified format).
511
+ *
512
+ * @param params - The parameters for composing the permission grant message
513
+ * @param params.grantee - The recipient address for the permission grant
514
+ * @param params.operation - The type of operation being granted permission for
515
+ * @param params.files - Array of file IDs that the permission applies to
516
+ * @param params.grantUrl - URL where the grant details are stored
517
+ * @param params.serializedParameters - Serialized parameters for the operation
518
+ * @param params.nonce - Unique number to prevent replay attacks
519
+ * @returns Promise resolving to the typed data structure
520
+ */
521
+ private composePermissionGrantMessage;
522
+ /**
523
+ * Creates EIP-712 typed data structure for server files and permissions.
524
+ *
525
+ * @param params - Parameters for the server files and permissions message
526
+ * @param params.granteeId - Grantee ID
527
+ * @param params.grant - Grant URL or grant data
528
+ * @param params.fileUrls - Array of file URLs
529
+ * @param params.schemaIds - Schema IDs for each file
530
+ * @param params.serverAddress - Server address
531
+ * @param params.serverUrl - Server URL
532
+ * @param params.serverPublicKey - Server public key
533
+ * @param params.filePermissions - File permissions array
534
+ * @param params.nonce - Unique number to prevent replay attacks
535
+ * @returns Promise resolving to the typed data structure
536
+ */
537
+ private composeServerFilesAndPermissionMessage;
538
+ /**
539
+ * Gets the EIP-712 domain for PermissionGrant signatures.
540
+ *
541
+ * @returns Promise resolving to the EIP-712 domain configuration
542
+ */
543
+ private getPermissionDomain;
544
+ /**
545
+ * Signs typed data using the wallet client with signature caching.
546
+ *
547
+ * @param typedData - The EIP-712 typed data structure to sign
548
+ * @returns Promise resolving to the cryptographic signature
549
+ */
550
+ private signTypedData;
551
+ /**
552
+ * Gets the user's address from the wallet client.
553
+ *
554
+ * @returns Promise resolving to the user's wallet address
555
+ */
556
+ private getUserAddress;
557
+ /**
558
+ * Gets on-chain permission grant data without expensive off-chain resolution.
559
+ *
560
+ * @remarks
561
+ * This method provides a fast, performance-focused way to retrieve permission grants
562
+ * by querying only the subgraph without making expensive IPFS or individual contract calls.
563
+ * It eliminates the N+1 query problem of the legacy `getUserPermissions()` method.
564
+ *
565
+ * The returned data contains all on-chain information but does NOT include resolved
566
+ * operation details, parameters, or file IDs. Use `retrieveGrantFile()` separately
567
+ * for specific grants when detailed data is needed.
568
+ *
569
+ * **Performance**: Completes in ~100-500ms regardless of permission count.
570
+ * **Reliability**: Single point of failure (subgraph) with clear RPC fallback path.
571
+ *
572
+ * @param options - Options for retrieving permissions (limit, subgraph URL)
573
+ * @returns A Promise that resolves to an array of `OnChainPermissionGrant` objects
574
+ * @throws {BlockchainError} When subgraph query fails
575
+ * @throws {NetworkError} When network requests fail
576
+ * @example
577
+ * ```typescript
578
+ * // Fast: Get all on-chain permission data
579
+ * const grants = await vana.permissions.getUserPermissionGrantsOnChain({ limit: 20 });
580
+ *
581
+ * // Display in UI immediately
582
+ * grants.forEach(grant => {
583
+ * console.log(`Permission ${grant.id}: ${grant.grantUrl}`);
584
+ * });
585
+ *
586
+ * // Lazy load detailed data for specific permission when user clicks
587
+ * const grantFile = await retrieveGrantFile(grants[0].grantUrl);
588
+ * console.log(`Operation: ${grantFile.operation}`);
589
+ * console.log(`Parameters:`, grantFile.parameters);
590
+ * ```
591
+ */
592
+ getUserPermissionGrantsOnChain(options?: GetUserPermissionsOptions): Promise<OnChainPermissionGrant[]>;
593
+ /**
594
+ * Normalizes grant ID to hex format.
595
+ * Handles conversion from permission ID (bigint/number/string) to proper hex hash format.
596
+ *
597
+ * @param grantId - Permission ID or grant hash in various formats
598
+ * @returns Normalized hex hash
599
+ */
600
+ private normalizeGrantId;
601
+ /**
602
+ * Registers a new server and immediately trusts it in the DataPortabilityServers contract.
603
+ *
604
+ * This is a combined operation that both registers a new data portability server
605
+ * and adds it to the user's trusted servers list in a single transaction.
606
+ * Trusted servers can handle data export and portability requests from the user.
607
+ *
608
+ * @param params - Parameters for adding and trusting the server
609
+ * @param params.owner - Ethereum address that will own this server registration
610
+ * @param params.serverAddress - Ethereum address of the server
611
+ * @param params.serverUrl - HTTPS URL where the server can be reached
612
+ * @param params.publicKey - Server's public key for encryption (hex string)
613
+ * @returns Promise resolving to transaction hash
614
+ * @throws {UserRejectedRequestError} When user rejects the transaction
615
+ * @throws {BlockchainError} When chain ID is unavailable or transaction fails
616
+ * @throws {ServerAlreadyRegisteredError} When server address is already registered
617
+ * @throws {Error} When wallet account is not available
618
+ *
619
+ * @example
620
+ * ```typescript
621
+ * // Add and trust a server by providing all required details
622
+ * const txHash = await vana.permissions.addAndTrustServer({
623
+ * owner: '0x1234567890abcdef1234567890abcdef12345678',
624
+ * serverAddress: '0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6',
625
+ * serverUrl: 'https://myserver.example.com',
626
+ * publicKey: '0x456789abcdef456789abcdef456789abcdef456789abcdef'
627
+ * });
628
+ * console.log('Server added and trusted in transaction:', txHash);
629
+ *
630
+ * // Verify the server is now trusted
631
+ * const trustedServers = await vana.permissions.getTrustedServers();
632
+ * console.log('Now trusting servers:', trustedServers);
633
+ * ```
634
+ */
635
+ addAndTrustServer(params: AddAndTrustServerParams): Promise<ServerTrustResult>;
636
+ /**
637
+ * Trusts a server for data processing (legacy method).
638
+ *
639
+ * @param params - Parameters for trusting the server
640
+ * @returns Promise resolving to transaction hash
641
+ * @deprecated Use addAndTrustServer instead
642
+ */
643
+ submitTrustServer(params: TrustServerParams): Promise<TransactionResult<"DataPortabilityServers", "trustServer">>;
644
+ /**
645
+ * Adds and trusts a server using a signature (gasless transaction).
646
+ *
647
+ * @param params - Parameters for adding and trusting the server
648
+ * @returns Promise resolving to TransactionResult with ServerTrustResult event data
649
+ */
650
+ submitAddAndTrustServerWithSignature(params: AddAndTrustServerParams): Promise<TransactionResult<"DataPortabilityServers", "addAndTrustServerWithSignature">>;
651
+ /**
652
+ * Trusts a server using a signature (gasless transaction - legacy method).
653
+ *
654
+ * @param params - Parameters for trusting the server
655
+ * @returns Promise resolving to transaction hash
656
+ * @deprecated Use addAndTrustServerWithSignature instead
657
+ * @throws {BlockchainError} When chain ID is not available
658
+ * @throws {NonceError} When retrieving user nonce fails
659
+ * @throws {SignatureError} When user rejects the signature request
660
+ * @throws {RelayerError} When gasless submission fails
661
+ * @throws {ServerUrlMismatchError} When server URL doesn't match existing registration
662
+ * @throws {BlockchainError} When trust operation fails for any other reason
663
+ */
664
+ submitTrustServerWithSignature(params: TrustServerParams): Promise<TransactionResult<"DataPortabilityServers", "trustServerWithSignature">>;
665
+ /**
666
+ * Submits a direct untrust server transaction (without signature).
667
+ *
668
+ * @param params - The untrust server parameters containing server details
669
+ * @returns Promise resolving to the transaction hash
670
+ */
671
+ /**
672
+ * Submits an untrust server transaction directly to the blockchain.
673
+ *
674
+ * @remarks
675
+ * Internal method used for direct blockchain submission of untrust server operations
676
+ * when relayer callbacks are not available.
677
+ *
678
+ * @param params - The untrust server parameters
679
+ * @returns Promise resolving to TransactionResult for transaction tracking
680
+ * @throws {BlockchainError} When contract submission fails
681
+ */
682
+ private submitDirectUntrustTransaction;
683
+ /**
684
+ * Removes a server from the user's trusted servers list in the DataPortabilityServers contract.
685
+ *
686
+ * This revokes the server's authorization to handle data portability requests for the user.
687
+ * The server remains registered in the system but will no longer be trusted by this user.
688
+ *
689
+ * @param params - Parameters for untrusting the server
690
+ * @param params.serverId - The numeric ID of the server to untrust
691
+ * @returns Promise resolving to transaction hash
692
+ * @throws {Error} When wallet account is not available
693
+ * @throws {NonceError} When retrieving user nonce fails
694
+ * @throws {UserRejectedRequestError} When user rejects the transaction
695
+ * @throws {ServerNotTrustedError} When the server is not currently trusted
696
+ * @throws {BlockchainError} When untrust transaction fails
697
+ *
698
+ * @example
699
+ * ```typescript
700
+ * // Untrust a specific server
701
+ * const txHash = await vana.permissions.untrustServer({
702
+ * serverId: 1
703
+ * });
704
+ * console.log('Server untrusted in transaction:', txHash);
705
+ *
706
+ * // Verify the server is no longer trusted
707
+ * const trustedServers = await vana.permissions.getTrustedServers();
708
+ * console.log('Still trusting servers:', trustedServers);
709
+ * ```
710
+ */
711
+ submitUntrustServer(params: UntrustServerParams): Promise<TransactionResult<"DataPortabilityServers", "untrustServer">>;
712
+ /**
713
+ * Untrusts a server using a signature (gasless transaction).
714
+ *
715
+ * @param params - Parameters for untrusting the server
716
+ * @param params.serverId - The server's Ethereum address to untrust
717
+ * @returns Promise resolving to transaction hash
718
+ * @throws {Error} When wallet account is not available
719
+ * @throws {NonceError} When retrieving user nonce fails
720
+ * @throws {SignatureError} When user rejects the signature request
721
+ * @throws {RelayerError} When gasless submission fails
722
+ * @throws {BlockchainError} When untrust transaction fails
723
+ */
724
+ submitUntrustServerWithSignature(params: UntrustServerParams): Promise<TransactionResult<"DataPortabilityServers", "untrustServerWithSignature">>;
725
+ /**
726
+ * Retrieves all servers trusted by a user from the DataPortabilityServers contract.
727
+ *
728
+ * Returns an array of server IDs that the specified user has explicitly trusted.
729
+ * Trusted servers are those that users have authorized to handle their data portability requests.
730
+ *
731
+ * @param userAddress - Optional user address to query (defaults to current wallet user)
732
+ * @returns Promise resolving to array of trusted server IDs (numeric)
733
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
734
+ * @throws {NetworkError} When unable to connect to the blockchain network
735
+ *
736
+ * @example
737
+ * ```typescript
738
+ * // Get trusted servers for current user
739
+ * const myServers = await vana.permissions.getTrustedServers();
740
+ * console.log(`I trust ${myServers.length} servers: ${myServers.join(', ')}`);
741
+ *
742
+ * // Get trusted servers for another user
743
+ * const userServers = await vana.permissions.getTrustedServers("0x1234...");
744
+ * console.log(`User trusts servers: ${userServers.join(', ')}`);
745
+ * ```
746
+ */
747
+ getTrustedServers(userAddress?: Address): Promise<number[]>;
748
+ /**
749
+ * Gets the total count of trusted servers for a user.
750
+ *
751
+ * @param userAddress - Optional user address (defaults to current user)
752
+ * @returns Promise resolving to the number of trusted servers
753
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
754
+ */
755
+ getTrustedServersCount(userAddress?: Address): Promise<number>;
756
+ /**
757
+ * Gets trusted servers with pagination support.
758
+ *
759
+ * @param options - Query options including pagination parameters
760
+ * @returns Promise resolving to paginated trusted servers
761
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
762
+ */
763
+ getTrustedServersPaginated(options?: TrustedServerQueryOptions): Promise<PaginatedTrustedServers>;
764
+ /**
765
+ * Gets trusted servers with their complete information.
766
+ *
767
+ * @param options - Query options
768
+ * @returns Promise resolving to array of trusted server info
769
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
770
+ */
771
+ getTrustedServersWithInfo(options?: TrustedServerQueryOptions): Promise<TrustedServerInfo[]>;
772
+ /**
773
+ * Gets server information for multiple servers efficiently.
774
+ *
775
+ * @remarks
776
+ * This method uses multicall to fetch information for multiple servers in a single
777
+ * blockchain call, improving performance when querying many servers. Failed lookups
778
+ * are returned separately for error handling.
779
+ *
780
+ * @param serverIds - Array of numeric server IDs to query
781
+ * @returns Promise resolving to batch result containing successful lookups and failed IDs
782
+ * @throws {BlockchainError} When reading from contract fails or chain is unavailable
783
+ * @example
784
+ * ```typescript
785
+ * const result = await vana.permissions.getServerInfoBatch([1, 2, 3, 999]);
786
+ *
787
+ * // Process successful lookups
788
+ * result.servers.forEach((server, id) => {
789
+ * console.log(`Server ${id}: ${server.url}`);
790
+ * });
791
+ *
792
+ * // Handle failed lookups
793
+ * if (result.failed.length > 0) {
794
+ * console.log(`Failed to fetch: ${result.failed.join(', ')}`);
795
+ * }
796
+ * ```
797
+ */
798
+ getServerInfoBatch(serverIds: number[]): Promise<BatchServerInfoResult>;
799
+ /**
800
+ * Checks whether a specific server is trusted by a user.
801
+ *
802
+ * @remarks
803
+ * This method queries the user's trusted server list and checks if the specified
804
+ * server is present. Returns both the trust status and the index in the trust list
805
+ * if trusted.
806
+ *
807
+ * @param serverId - Numeric server ID to check
808
+ * @param userAddress - Optional user address (defaults to current user)
809
+ * @returns Promise resolving to server trust status with trust index if applicable
810
+ * @throws {BlockchainError} When reading from contract fails
811
+ * @example
812
+ * ```typescript
813
+ * const status = await vana.permissions.checkServerTrustStatus(1);
814
+ * if (status.isTrusted) {
815
+ * console.log(`Server is trusted at index ${status.trustIndex}`);
816
+ * } else {
817
+ * console.log('Server is not trusted');
818
+ * }
819
+ * ```
820
+ */
821
+ checkServerTrustStatus(serverId: number, userAddress?: Address): Promise<ServerTrustStatus>;
822
+ /**
823
+ * Composes EIP-712 typed data for AddAndTrustServer.
824
+ *
825
+ * @remarks
826
+ * Creates the complete typed data structure required for EIP-712 signature generation
827
+ * when adding and trusting a new server in a single transaction.
828
+ *
829
+ * @param input - The add and trust server input data containing server details
830
+ * @returns Promise resolving to the typed data structure for server add and trust
831
+ */
832
+ private composeAddAndTrustServerMessage;
833
+ /**
834
+ * Composes EIP-712 typed data for TrustServer.
835
+ *
836
+ * @param input - The trust server input data containing server details
837
+ * @returns Promise resolving to the typed data structure for server trust
838
+ */
839
+ private composeTrustServerMessage;
840
+ /**
841
+ * Composes EIP-712 typed data for UntrustServer.
842
+ *
843
+ * @param input - The untrust server input data containing server details
844
+ * @returns Promise resolving to the typed data structure for server untrust
845
+ */
846
+ private composeUntrustServerMessage;
847
+ /**
848
+ * Gets the EIP-712 domain for DataPortabilityServers signatures.
849
+ *
850
+ * @returns Promise resolving to the EIP-712 domain configuration
851
+ */
852
+ private getServersDomain;
853
+ /**
854
+ * Submits an add and trust server transaction directly to the blockchain.
855
+ *
856
+ * @param addAndTrustServerInput - The add and trust server input data containing server details
857
+ * @param signature - The cryptographic signature for the transaction
858
+ * @returns Promise resolving to the transaction hash
859
+ */
860
+ private submitAddAndTrustServerTransaction;
861
+ /**
862
+ * Submits a trust server transaction directly to the blockchain.
863
+ *
864
+ * @param trustServerInput - The trust server input data containing server details
865
+ * @param signature - The cryptographic signature for the transaction
866
+ * @returns Promise resolving to the transaction hash
867
+ */
868
+ private submitTrustServerTransaction;
869
+ /**
870
+ * Submits a revoke transaction directly to the blockchain with signature.
871
+ *
872
+ * @param typedData - The EIP-712 typed data structure for the revoke operation
873
+ * @param signature - The cryptographic signature authorizing the revoke
874
+ * @returns Promise resolving to the transaction hash
875
+ */
876
+ private submitDirectRevokeTransaction;
877
+ /**
878
+ * Submits an untrust server transaction with signature.
879
+ *
880
+ * @param typedData - The EIP-712 typed data structure for the untrust operation
881
+ * @param signature - The cryptographic signature authorizing the untrust
882
+ * @returns Promise resolving to the transaction hash
883
+ */
884
+ private submitSignedUntrustTransaction;
885
+ /**
886
+ * Registers a new grantee in the DataPortabilityGrantees contract.
887
+ *
888
+ * A grantee is an entity (like an application) that can receive data permissions
889
+ * from users. Once registered, users can grant the grantee access to their data.
890
+ *
891
+ * @param params - Parameters for registering the grantee
892
+ * @param params.owner - The Ethereum address that will own this grantee registration
893
+ * @param params.granteeAddress - The Ethereum address of the grantee (application)
894
+ * @param params.publicKey - The public key used for data encryption/decryption (hex string)
895
+ * @returns Promise resolving to the transaction hash
896
+ * @throws {BlockchainError} When the grantee registration transaction fails
897
+ * @throws {UserRejectedRequestError} When user rejects the transaction
898
+ * @throws {ContractError} When grantee is already registered
899
+ *
900
+ * @example
901
+ * ```typescript
902
+ * const txHash = await vana.permissions.registerGrantee({
903
+ * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
904
+ * granteeAddress: "0xApp1234567890123456789012345678901234567890",
905
+ * publicKey: "0x1234567890abcdef..."
906
+ * });
907
+ * console.log(`Grantee registered in transaction: ${txHash}`);
908
+ * ```
909
+ */
910
+ submitRegisterGrantee(params: RegisterGranteeParams): Promise<TransactionResult<"DataPortabilityGrantees", "registerGrantee">>;
911
+ /**
912
+ * Registers a grantee with a signature (gasless transaction)
913
+ *
914
+ * @param params - Parameters for registering the grantee
915
+ * @returns Promise resolving to the transaction hash
916
+ *
917
+ * @example
918
+ * ```typescript
919
+ * const txHash = await vana.permissions.registerGranteeWithSignature({
920
+ * owner: "0x742d35Cc6558Fd4D9e9E0E888F0462ef6919Bd36",
921
+ * granteeAddress: "0xApp1234567890123456789012345678901234567890",
922
+ * publicKey: "0x1234567890abcdef..."
923
+ * });
924
+ * ```
925
+ */
926
+ submitRegisterGranteeWithSignature(params: RegisterGranteeParams): Promise<TransactionResult<"DataPortabilityGrantees", "registerGrantee">>;
927
+ /**
928
+ * Submits a signed register grantee transaction via relayer
929
+ *
930
+ * @param typedData - The EIP-712 typed data for register grantee
931
+ * @param signature - The cryptographic signature
932
+ * @returns Promise resolving to the transaction hash
933
+ *
934
+ * @example
935
+ * ```typescript
936
+ * const result = await vana.permissions.submitSignedRegisterGrantee(typedData, signature);
937
+ * ```
938
+ */
939
+ submitSignedRegisterGrantee(typedData: RegisterGranteeTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityGrantees", "registerGrantee">>;
940
+ /**
941
+ * Retrieves all registered grantees from the DataPortabilityGrantees contract.
942
+ *
943
+ * Returns a paginated list of all grantees (applications) that have been registered
944
+ * in the system and can receive data permissions from users.
945
+ *
946
+ * @param options - Query options for pagination and filtering
947
+ * @param options.limit - Maximum number of grantees to return (default: 50)
948
+ * @param options.offset - Number of grantees to skip for pagination (default: 0)
949
+ * @returns Promise resolving to paginated grantees with metadata
950
+ * @throws {BlockchainError} When contract read operation fails
951
+ * @throws {NetworkError} When unable to connect to the blockchain network
952
+ *
953
+ * @example
954
+ * ```typescript
955
+ * // Get first 10 grantees
956
+ * const result = await vana.permissions.getGrantees({
957
+ * limit: 10,
958
+ * offset: 0
959
+ * });
960
+ *
961
+ * console.log(`Found ${result.total} total grantees`);
962
+ * result.grantees.forEach(grantee => {
963
+ * console.log(`Grantee ${grantee.id}: ${grantee.granteeAddress}`);
964
+ * });
965
+ *
966
+ * // Check if there are more results
967
+ * if (result.hasMore) {
968
+ * console.log('More grantees available');
969
+ * }
970
+ * ```
971
+ */
972
+ getGrantees(options?: GranteeQueryOptions): Promise<PaginatedGrantees>;
973
+ /**
974
+ * Retrieves a specific grantee by their Ethereum address from the DataPortabilityGrantees contract.
975
+ *
976
+ * Looks up a registered grantee (application) using their Ethereum address
977
+ * and returns their complete registration information including permissions.
978
+ *
979
+ * @param granteeAddress - The Ethereum address of the grantee to look up
980
+ * @returns Promise resolving to the grantee information, or null if not found
981
+ * @throws {BlockchainError} When contract read operation fails
982
+ * @throws {NetworkError} When unable to connect to the blockchain network
983
+ *
984
+ * @example
985
+ * ```typescript
986
+ * const granteeAddress = "0xApp1234567890123456789012345678901234567890";
987
+ * const grantee = await vana.permissions.getGranteeByAddress(granteeAddress);
988
+ *
989
+ * if (grantee) {
990
+ * console.log(`Found grantee ${grantee.id}`);
991
+ * console.log(`Owner: ${grantee.owner}`);
992
+ * console.log(`Public Key: ${grantee.publicKey}`);
993
+ * console.log(`Permissions: ${grantee.permissionIds.join(', ')}`);
994
+ * } else {
995
+ * console.log('Grantee not found');
996
+ * }
997
+ * ```
998
+ */
999
+ getGranteeByAddress(granteeAddress: Address): Promise<Grantee | null>;
1000
+ /**
1001
+ * Retrieves a specific grantee by their unique ID from the DataPortabilityGrantees contract.
1002
+ *
1003
+ * Looks up a registered grantee (application) using their numeric ID assigned during
1004
+ * registration and returns their complete information including permissions.
1005
+ *
1006
+ * @param granteeId - The unique numeric ID of the grantee (1-indexed)
1007
+ * @returns Promise resolving to the grantee information, or null if not found
1008
+ * @throws {BlockchainError} When contract read operation fails
1009
+ * @throws {NetworkError} When unable to connect to the blockchain network
1010
+ *
1011
+ * @example
1012
+ * ```typescript
1013
+ * const grantee = await vana.permissions.getGranteeById(1);
1014
+ *
1015
+ * if (grantee) {
1016
+ * console.log(`Grantee ID: ${grantee.id}`);
1017
+ * console.log(`Address: ${grantee.granteeAddress}`);
1018
+ * console.log(`Owner: ${grantee.owner}`);
1019
+ * console.log(`Total permissions: ${grantee.permissionIds.length}`);
1020
+ * } else {
1021
+ * console.log('Grantee with ID 1 not found');
1022
+ * }
1023
+ * ```
1024
+ */
1025
+ getGranteeById(granteeId: number): Promise<Grantee | null>;
1026
+ /**
1027
+ * Builds EIP-712 typed data for grantee registration
1028
+ *
1029
+ * @param input - The register grantee input
1030
+ * @returns Promise resolving to the typed data structure
1031
+ * @private
1032
+ */
1033
+ private buildRegisterGranteeTypedData;
1034
+ /**
1035
+ * Submits a register grantee transaction with signature.
1036
+ *
1037
+ * @param typedData - The EIP-712 typed data structure for the registration
1038
+ * @param _signature - The cryptographic signature authorizing the registration (currently unused)
1039
+ * @returns Promise resolving to the transaction hash
1040
+ * @private
1041
+ */
1042
+ private submitSignedRegisterGranteeTransaction;
1043
+ /**
1044
+ * Get all trusted server IDs for a user
1045
+ *
1046
+ * @param userAddress - User address to query (defaults to current user)
1047
+ * @returns Promise resolving to array of server IDs
1048
+ */
1049
+ getUserServerIds(userAddress?: Address): Promise<bigint[]>;
1050
+ /**
1051
+ * Get server ID at specific index for a user
1052
+ *
1053
+ * @param userAddress - User address to query
1054
+ * @param serverIndex - Index in the user's server list
1055
+ * @returns Promise resolving to server ID
1056
+ */
1057
+ getUserServerIdAt(userAddress: Address, serverIndex: bigint): Promise<bigint>;
1058
+ /**
1059
+ * Get the number of trusted servers for a user
1060
+ *
1061
+ * @param userAddress - User address to query (defaults to current user)
1062
+ * @returns Promise resolving to number of trusted servers
1063
+ */
1064
+ getUserServerCount(userAddress?: Address): Promise<bigint>;
1065
+ /**
1066
+ * Get detailed information about trusted servers for a user
1067
+ *
1068
+ * @param userAddress - User address to query (defaults to current user)
1069
+ * @returns Promise resolving to array of trusted server info
1070
+ */
1071
+ getUserTrustedServers(userAddress?: Address): Promise<TrustedServerInfo[]>;
1072
+ /**
1073
+ * Get trusted server info for a specific server ID and user
1074
+ *
1075
+ * @param userAddress - User address to query
1076
+ * @param serverId - Server ID to get info for
1077
+ * @returns Promise resolving to trusted server info
1078
+ */
1079
+ getUserTrustedServer(userAddress: Address, serverId: bigint): Promise<TrustedServerInfo>;
1080
+ /**
1081
+ * Get server information by server ID
1082
+ *
1083
+ * @param serverId - Server ID to get info for
1084
+ * @returns Promise resolving to server info
1085
+ */
1086
+ getServerInfo(serverId: bigint): Promise<ServerInfo>;
1087
+ /**
1088
+ * Get server information by server address
1089
+ *
1090
+ * @param serverAddress - Server address to get info for
1091
+ * @returns Promise resolving to server info
1092
+ */
1093
+ getServerInfoByAddress(serverAddress: Address): Promise<ServerInfo>;
1094
+ /**
1095
+ * Get all permission IDs for a user
1096
+ *
1097
+ * @param userAddress - User address to query (defaults to current user)
1098
+ * @returns Promise resolving to array of permission IDs
1099
+ */
1100
+ getUserPermissionIds(userAddress?: Address): Promise<bigint[]>;
1101
+ /**
1102
+ * Get permission ID at specific index for a user
1103
+ *
1104
+ * @param userAddress - User address to query
1105
+ * @param permissionIndex - Index in the user's permission list
1106
+ * @returns Promise resolving to permission ID
1107
+ */
1108
+ getUserPermissionIdAt(userAddress: Address, permissionIndex: bigint): Promise<bigint>;
1109
+ /**
1110
+ * Get the number of permissions for a user
1111
+ *
1112
+ * @param userAddress - User address to query (defaults to current user)
1113
+ * @returns Promise resolving to number of permissions
1114
+ */
1115
+ getUserPermissionCount(userAddress?: Address): Promise<bigint>;
1116
+ /**
1117
+ * Get detailed permission information by permission ID
1118
+ *
1119
+ * @param permissionId - Permission ID to get info for
1120
+ * @returns Promise resolving to permission info
1121
+ */
1122
+ getPermissionInfo(permissionId: bigint): Promise<PermissionInfo>;
1123
+ /**
1124
+ * Get all permission IDs for a specific file
1125
+ *
1126
+ * @param fileId - File ID to get permissions for
1127
+ * @returns Promise resolving to array of permission IDs
1128
+ */
1129
+ getFilePermissionIds(fileId: bigint): Promise<bigint[]>;
1130
+ /**
1131
+ * Get all file IDs for a specific permission
1132
+ *
1133
+ * @param permissionId - Permission ID to get files for
1134
+ * @returns Promise resolving to array of file IDs
1135
+ */
1136
+ getPermissionFileIds(permissionId: bigint): Promise<bigint[]>;
1137
+ /**
1138
+ * Get all permissions for a specific file (alias for getFilePermissionIds)
1139
+ *
1140
+ * @param fileId - File ID to get permissions for
1141
+ * @returns Promise resolving to array of permission IDs
1142
+ */
1143
+ getFilePermissions(fileId: bigint): Promise<bigint[]>;
1144
+ /**
1145
+ * Get grantee information by grantee ID
1146
+ *
1147
+ * @param granteeId - Grantee ID to get info for
1148
+ * @returns Promise resolving to grantee info
1149
+ */
1150
+ getGranteeInfo(granteeId: bigint): Promise<GranteeInfo>;
1151
+ /**
1152
+ * Get grantee information by grantee address
1153
+ *
1154
+ * @param granteeAddress - Grantee address to get info for
1155
+ * @returns Promise resolving to grantee info
1156
+ */
1157
+ getGranteeInfoByAddress(granteeAddress: Address): Promise<GranteeInfo>;
1158
+ /**
1159
+ * Get all permission IDs for a specific grantee
1160
+ *
1161
+ * @param granteeId - Grantee ID to get permissions for
1162
+ * @returns Promise resolving to array of permission IDs
1163
+ */
1164
+ getGranteePermissionIds(granteeId: bigint): Promise<bigint[]>;
1165
+ /**
1166
+ * Get all permissions for a specific grantee (alias for getGranteePermissionIds)
1167
+ *
1168
+ * @param granteeId - Grantee ID to get permissions for
1169
+ * @returns Promise resolving to array of permission IDs
1170
+ */
1171
+ getGranteePermissions(granteeId: bigint): Promise<bigint[]>;
1172
+ /**
1173
+ * Get all server IDs for a user
1174
+ *
1175
+ * @param userAddress - User address to get server IDs for
1176
+ * @returns Promise resolving to array of server IDs
1177
+ */
1178
+ getUserServerIdsValues(userAddress: Address): Promise<bigint[]>;
1179
+ /**
1180
+ * Get server ID at specific index for a user
1181
+ *
1182
+ * @param userAddress - User address
1183
+ * @param serverIndex - Index of the server ID
1184
+ * @returns Promise resolving to server ID
1185
+ */
1186
+ getUserServerIdsAt(userAddress: Address, serverIndex: bigint): Promise<bigint>;
1187
+ /**
1188
+ * Get the number of servers a user has
1189
+ *
1190
+ * @param userAddress - User address
1191
+ * @returns Promise resolving to number of servers
1192
+ */
1193
+ getUserServerIdsLength(userAddress: Address): Promise<bigint>;
1194
+ /**
1195
+ * Get trusted server info for a specific user and server ID
1196
+ *
1197
+ * @param userAddress - User address
1198
+ * @param serverId - Server ID
1199
+ * @returns Promise resolving to trusted server info
1200
+ */
1201
+ getUserServers(userAddress: Address, serverId: bigint): Promise<TrustedServerInfo>;
1202
+ /**
1203
+ * Get server info by server ID
1204
+ *
1205
+ * @param serverId - Server ID
1206
+ * @returns Promise resolving to server info
1207
+ */
1208
+ getServers(serverId: bigint): Promise<ServerInfo>;
1209
+ /**
1210
+ * Get user info including nonce and trusted server IDs
1211
+ *
1212
+ * @param userAddress - User address
1213
+ * @returns Promise resolving to user info
1214
+ */
1215
+ getUsers(userAddress: Address): Promise<{
1216
+ nonce: bigint;
1217
+ trustedServerIds: bigint[];
1218
+ }>;
1219
+ /**
1220
+ * Update server URL
1221
+ *
1222
+ * @param serverId - Server ID to update
1223
+ * @param url - New URL for the server
1224
+ * @returns Promise resolving to transaction hash
1225
+ */
1226
+ submitUpdateServer(serverId: bigint, url: string): Promise<TransactionResult<"DataPortabilityServers", "updateServer">>;
1227
+ /**
1228
+ * Get all permission IDs for a user
1229
+ *
1230
+ * @param userAddress - User address to get permission IDs for
1231
+ * @returns Promise resolving to array of permission IDs
1232
+ */
1233
+ getUserPermissionIdsValues(userAddress: Address): Promise<bigint[]>;
1234
+ /**
1235
+ * Get permission ID at specific index for a user
1236
+ *
1237
+ * @param userAddress - User address
1238
+ * @param permissionIndex - Index of the permission ID
1239
+ * @returns Promise resolving to permission ID
1240
+ */
1241
+ getUserPermissionIdsAt(userAddress: Address, permissionIndex: bigint): Promise<bigint>;
1242
+ /**
1243
+ * Get the number of permissions a user has
1244
+ *
1245
+ * @param userAddress - User address
1246
+ * @returns Promise resolving to number of permissions
1247
+ */
1248
+ getUserPermissionIdsLength(userAddress: Address): Promise<bigint>;
1249
+ /**
1250
+ * Get permission info by permission ID
1251
+ *
1252
+ * @param permissionId - Permission ID
1253
+ * @returns Promise resolving to permission info
1254
+ */
1255
+ getPermissions(permissionId: bigint): Promise<PermissionInfo>;
1256
+ /**
1257
+ * Submit permission with signature to the blockchain (supports gasless transactions)
1258
+ *
1259
+ * @param params - Parameters for adding permission
1260
+ * @returns Promise resolving to transaction hash
1261
+ * @throws {RelayerError} When gasless transaction submission fails
1262
+ * @throws {SignatureError} When user rejects the signature request
1263
+ * @throws {BlockchainError} When permission addition fails
1264
+ * @throws {NetworkError} When network communication fails
1265
+ */
1266
+ submitAddPermission(params: ServerFilesAndPermissionParams): Promise<TransactionResult<"DataPortabilityPermissions", "addPermission">>;
1267
+ /**
1268
+ * Submits an already-signed add permission transaction to the blockchain.
1269
+ * This method supports both relayer-based gasless transactions and direct transactions.
1270
+ *
1271
+ * @param typedData - The EIP-712 typed data for AddPermission
1272
+ * @param signature - The user's signature
1273
+ * @returns Promise resolving to TransactionResult with PermissionGrantResult event data
1274
+ * @throws {RelayerError} When gasless transaction submission fails
1275
+ * @throws {BlockchainError} When permission addition fails
1276
+ * @throws {NetworkError} When network communication fails
1277
+ */
1278
+ submitSignedAddPermission(typedData: GenericTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityPermissions", "addPermission">>;
1279
+ /**
1280
+ * Submits server files and permissions with signature to the blockchain, supporting schema validation and gasless transactions.
1281
+ *
1282
+ * @remarks
1283
+ * This method validates files against their specified schemas before submission.
1284
+ * Schema validation ensures data conforms to expected formats before on-chain registration.
1285
+ * Files with schemaId = 0 bypass validation. The method supports atomic batch operations
1286
+ * where all files and permissions are registered in a single transaction.
1287
+ *
1288
+ * @param params - Parameters for adding server files and permissions
1289
+ * @param params.granteeId - The ID of the permission grantee
1290
+ * @param params.grant - Grant URL containing permission parameters (typically IPFS)
1291
+ * @param params.fileUrls - Array of file URLs to register
1292
+ * @param params.schemaIds - Schema IDs for each file. Use 0 for files without schema validation.
1293
+ * Array length must match fileUrls length.
1294
+ * @param params.serverAddress - Server wallet address for decryption permissions
1295
+ * @param params.serverUrl - Server endpoint URL
1296
+ * @param params.serverPublicKey - Server's public key for encryption.
1297
+ * Obtain via `vana.server.getIdentity(userAddress).public_key`.
1298
+ * @param params.filePermissions - Nested array of permissions for each file
1299
+ * @returns TransactionResult with immediate hash access and optional event data
1300
+ * @throws {Error} When schemaIds array length doesn't match fileUrls array length
1301
+ * @throws {SchemaValidationError} When file data doesn't match the specified schema.
1302
+ * Verify data structure matches schema definition from `vana.schemas.get(schemaId)`.
1303
+ * @throws {RelayerError} When gasless transaction submission fails.
1304
+ * Retry without relayer configuration to submit direct transaction.
1305
+ * @throws {SignatureError} When user rejects the signature request
1306
+ * @throws {BlockchainError} When server files and permissions addition fails
1307
+ * @throws {NetworkError} When network communication fails.
1308
+ * Check network connection or configure alternative gateways.
1309
+ *
1310
+ * @example
1311
+ * ```typescript
1312
+ * const result = await vana.permissions.submitAddServerFilesAndPermissions({
1313
+ * granteeId: BigInt(1),
1314
+ * grant: "ipfs://QmXxx...",
1315
+ * fileUrls: ["https://storage.example.com/data.json"],
1316
+ * schemaIds: [123], // LinkedIn profile schema ID
1317
+ * serverAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
1318
+ * serverUrl: "https://server.example.com",
1319
+ * serverPublicKey: serverInfo.public_key,
1320
+ * filePermissions: [[{
1321
+ * account: "0x742d35Cc6634C0532925a3b844Bc9e7595f0b0Bb",
1322
+ * key: encryptedKey
1323
+ * }]]
1324
+ * });
1325
+ * const events = await result.waitForEvents();
1326
+ * console.log(`Permission ID: ${events.permissionId}`);
1327
+ * ```
1328
+ */
1329
+ submitAddServerFilesAndPermissions(params: ServerFilesAndPermissionParams): Promise<TransactionResult<"DataPortabilityPermissions", "addServerFilesAndPermissions">>;
1330
+ /**
1331
+ * Submits an already-signed add server files and permissions transaction to the blockchain.
1332
+ *
1333
+ * @remarks
1334
+ * This method returns a TransactionResult that provides immediate access to the transaction hash.
1335
+ * The eventData field may contain parsed event details after transaction confirmation.
1336
+ *
1337
+ * @param typedData - The EIP-712 typed data for AddServerFilesAndPermissions
1338
+ * @param signature - The user's signature
1339
+ * @returns TransactionResult with immediate hash access and optional event data
1340
+ * @throws {RelayerError} When gasless transaction submission fails
1341
+ * @throws {BlockchainError} When server files and permissions addition fails
1342
+ * @throws {NetworkError} When network communication fails
1343
+ *
1344
+ * @example
1345
+ * ```typescript
1346
+ * const tx = await vana.permissions.submitSignedAddServerFilesAndPermissions(
1347
+ * typedData,
1348
+ * signature
1349
+ * );
1350
+ * console.log(`Transaction submitted: ${tx.hash}`);
1351
+ *
1352
+ * // Wait for confirmation and get the permission ID
1353
+ * const { permissionId } = await tx.waitForEvents();
1354
+ * console.log(`Permission created with ID: ${permissionId}`);
1355
+ * ```
1356
+ */
1357
+ submitSignedAddServerFilesAndPermissions(typedData: ServerFilesAndPermissionTypedData, signature: Hash): Promise<TransactionResult<"DataPortabilityPermissions", "addServerFilesAndPermissions">>;
1358
+ /**
1359
+ * Submit permission revocation with signature to the blockchain
1360
+ *
1361
+ * @param permissionId - Permission ID to revoke
1362
+ * @returns Promise resolving to transaction hash
1363
+ */
1364
+ submitRevokePermission(permissionId: bigint): Promise<TransactionResult<"DataPortabilityPermissions", "revokePermission">>;
1365
+ /**
1366
+ * Submits a signed add permission transaction directly to the blockchain.
1367
+ *
1368
+ * @param typedData - The typed data structure for the permission addition
1369
+ * @param signature - The cryptographic signature authorizing the transaction
1370
+ * @returns Promise resolving to the transaction hash
1371
+ */
1372
+ private submitDirectAddPermissionTransaction;
1373
+ /**
1374
+ * Submits a signed add server files and permissions transaction directly to the blockchain.
1375
+ *
1376
+ * @param typedData - The typed data structure for the server files and permissions addition
1377
+ * @param signature - The cryptographic signature authorizing the transaction
1378
+ * @returns Promise resolving to the transaction hash
1379
+ */
1380
+ private submitDirectAddServerFilesAndPermissionsTransaction;
1381
+ }
1382
+
1383
+ export { ControllerContext, PermissionsController };