@openfort/openfort-node 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/dist/{api → generated/api}/accountsApi.d.ts +7 -7
  2. package/dist/{api → generated/api}/accountsApi.js +63 -73
  3. package/dist/generated/api/accountsApi.js.map +1 -0
  4. package/dist/generated/api/apis.d.ts +26 -0
  5. package/dist/{api → generated/api}/apis.js +3 -12
  6. package/dist/generated/api/apis.js.map +1 -0
  7. package/dist/{api → generated/api}/contractsApi.d.ts +7 -7
  8. package/dist/{api → generated/api}/contractsApi.js +46 -54
  9. package/dist/generated/api/contractsApi.js.map +1 -0
  10. package/dist/{api → generated/api}/defaultApi.d.ts +6 -6
  11. package/dist/{api → generated/api}/defaultApi.js +46 -52
  12. package/dist/generated/api/defaultApi.js.map +1 -0
  13. package/dist/{api → generated/api}/playersApi.d.ts +11 -11
  14. package/dist/{api → generated/api}/playersApi.js +138 -158
  15. package/dist/generated/api/playersApi.js.map +1 -0
  16. package/dist/{api → generated/api}/policiesApi.d.ts +11 -43
  17. package/dist/{api → generated/api}/policiesApi.js +99 -290
  18. package/dist/generated/api/policiesApi.js.map +1 -0
  19. package/dist/{api → generated/api}/projectsApi.d.ts +12 -8
  20. package/dist/{api → generated/api}/projectsApi.js +69 -78
  21. package/dist/generated/api/projectsApi.js.map +1 -0
  22. package/dist/{api → generated/api}/sessionsApi.d.ts +5 -5
  23. package/dist/{api → generated/api}/sessionsApi.js +64 -75
  24. package/dist/generated/api/sessionsApi.js.map +1 -0
  25. package/dist/{api → generated/api}/transactionIntentsApi.d.ts +6 -6
  26. package/dist/{api → generated/api}/transactionIntentsApi.js +74 -90
  27. package/dist/generated/api/transactionIntentsApi.js.map +1 -0
  28. package/dist/{model → generated/model}/accountResponse.d.ts +9 -9
  29. package/dist/{model → generated/model}/accountResponse.js +25 -25
  30. package/dist/generated/model/accountResponse.js.map +1 -0
  31. package/dist/{model → generated/model}/accountsResponse.d.ts +4 -4
  32. package/dist/{model → generated/model}/accountsResponse.js +10 -10
  33. package/dist/generated/model/accountsResponse.js.map +1 -0
  34. package/dist/{model → generated/model}/apiKeyResponse.d.ts +4 -4
  35. package/dist/{model → generated/model}/apiKeyResponse.js +13 -13
  36. package/dist/generated/model/apiKeyResponse.js.map +1 -0
  37. package/dist/{model → generated/model}/assetInventory.d.ts +9 -8
  38. package/dist/{model → generated/model}/assetInventory.js +13 -13
  39. package/dist/generated/model/assetInventory.js.map +1 -0
  40. package/dist/generated/model/assetType.js.map +1 -0
  41. package/dist/{model → generated/model}/contractDeleteResponse.d.ts +3 -3
  42. package/dist/{model → generated/model}/contractDeleteResponse.js +10 -10
  43. package/dist/generated/model/contractDeleteResponse.js.map +1 -0
  44. package/dist/{model → generated/model}/contractResponse.d.ts +9 -9
  45. package/dist/{model → generated/model}/contractResponse.js +25 -25
  46. package/dist/generated/model/contractResponse.js.map +1 -0
  47. package/dist/{model → generated/model}/contractsResponse.d.ts +4 -4
  48. package/dist/{model → generated/model}/contractsResponse.js +10 -10
  49. package/dist/generated/model/contractsResponse.js.map +1 -0
  50. package/dist/{model → generated/model}/gas.d.ts +3 -3
  51. package/dist/{model → generated/model}/gas.js +10 -10
  52. package/dist/generated/model/gas.js.map +1 -0
  53. package/dist/{model → generated/model}/getProjectResponse.d.ts +3 -3
  54. package/dist/{model → generated/model}/getProjectResponse.js +10 -10
  55. package/dist/generated/model/getProjectResponse.js.map +1 -0
  56. package/dist/{model → generated/model}/interaction.d.ts +3 -3
  57. package/dist/{model → generated/model}/interaction.js +10 -10
  58. package/dist/generated/model/interaction.js.map +1 -0
  59. package/dist/{model → generated/model}/inventoryResponse.d.ts +5 -5
  60. package/dist/{model → generated/model}/inventoryResponse.js +13 -13
  61. package/dist/generated/model/inventoryResponse.js.map +1 -0
  62. package/dist/{model → generated/model}/log.d.ts +7 -7
  63. package/dist/{model → generated/model}/log.js +22 -22
  64. package/dist/generated/model/log.js.map +1 -0
  65. package/dist/generated/model/models.d.ts +88 -0
  66. package/dist/{model → generated/model}/models.js +59 -71
  67. package/dist/generated/model/models.js.map +1 -0
  68. package/dist/{model → generated/model}/playerResponse.d.ts +12 -12
  69. package/dist/generated/model/playerResponse.js +74 -0
  70. package/dist/generated/model/playerResponse.js.map +1 -0
  71. package/dist/generated/model/playerResponseAccounts.js.map +1 -0
  72. package/dist/{model → generated/model}/playersResponse.d.ts +4 -4
  73. package/dist/{model → generated/model}/playersResponse.js +10 -10
  74. package/dist/generated/model/playersResponse.js.map +1 -0
  75. package/dist/{model → generated/model}/policiesResponse.d.ts +4 -4
  76. package/dist/{model → generated/model}/policiesResponse.js +10 -10
  77. package/dist/generated/model/policiesResponse.js.map +1 -0
  78. package/dist/{model → generated/model}/policyDeleteResponse.d.ts +3 -3
  79. package/dist/{model → generated/model}/policyDeleteResponse.js +10 -10
  80. package/dist/generated/model/policyDeleteResponse.js.map +1 -0
  81. package/dist/{model → generated/model}/policyResponse.d.ts +10 -10
  82. package/dist/{model → generated/model}/policyResponse.js +25 -25
  83. package/dist/generated/model/policyResponse.js.map +1 -0
  84. package/dist/generated/model/policyResponsePolicyRules.js.map +1 -0
  85. package/dist/generated/model/policyResponseTransactionIntents.js.map +1 -0
  86. package/dist/{model → generated/model}/policyRuleResponse.d.ts +10 -9
  87. package/dist/{model → generated/model}/policyRuleResponse.js +19 -19
  88. package/dist/generated/model/policyRuleResponse.js.map +1 -0
  89. package/dist/{model → generated/model}/policyRulesResponse.d.ts +4 -4
  90. package/dist/{model → generated/model}/policyRulesResponse.js +10 -10
  91. package/dist/generated/model/policyRulesResponse.js.map +1 -0
  92. package/dist/{model → generated/model}/policySchema.js +2 -2
  93. package/dist/generated/model/policySchema.js.map +1 -0
  94. package/dist/{model → generated/model}/prismaJsonValue.d.ts +2 -2
  95. package/dist/{model → generated/model}/prismaJsonValue.js +2 -2
  96. package/dist/generated/model/prismaJsonValue.js.map +1 -0
  97. package/dist/{model → generated/model}/projectLogs.d.ts +4 -4
  98. package/dist/{model → generated/model}/projectLogs.js +10 -10
  99. package/dist/generated/model/projectLogs.js.map +1 -0
  100. package/dist/{model → generated/model}/projectResponse.d.ts +8 -8
  101. package/dist/{model → generated/model}/projectResponse.js +22 -22
  102. package/dist/generated/model/projectResponse.js.map +1 -0
  103. package/dist/generated/model/projectResponseApikeys.js.map +1 -0
  104. package/dist/{model → generated/model}/projectsResponse.d.ts +4 -4
  105. package/dist/{model → generated/model}/projectsResponse.js +10 -10
  106. package/dist/generated/model/projectsResponse.js.map +1 -0
  107. package/dist/{model → generated/model}/responseResponse.d.ts +9 -9
  108. package/dist/{model → generated/model}/responseResponse.js +25 -25
  109. package/dist/generated/model/responseResponse.js.map +1 -0
  110. package/dist/{model → generated/model}/sessionResponse.d.ts +13 -13
  111. package/dist/generated/model/sessionResponse.js +84 -0
  112. package/dist/generated/model/sessionResponse.js.map +1 -0
  113. package/dist/generated/model/sessionResponseTransactionIntents.js.map +1 -0
  114. package/dist/{model → generated/model}/sessionsResponse.d.ts +4 -4
  115. package/dist/{model → generated/model}/sessionsResponse.js +10 -10
  116. package/dist/generated/model/sessionsResponse.js.map +1 -0
  117. package/dist/{model → generated/model}/sumGas.d.ts +3 -3
  118. package/dist/{model → generated/model}/sumGas.js +10 -10
  119. package/dist/generated/model/sumGas.js.map +1 -0
  120. package/dist/generated/model/transactionIntentResponse.d.ts +43 -0
  121. package/dist/generated/model/transactionIntentResponse.js +89 -0
  122. package/dist/generated/model/transactionIntentResponse.js.map +1 -0
  123. package/dist/{model → generated/model}/transactionIntentResponseAccount.d.ts +9 -9
  124. package/dist/{model → generated/model}/transactionIntentResponseAccount.js +25 -25
  125. package/dist/generated/model/transactionIntentResponseAccount.js.map +1 -0
  126. package/dist/{model → generated/model}/transactionIntentResponsePlayer.d.ts +12 -12
  127. package/dist/generated/model/transactionIntentResponsePlayer.js +74 -0
  128. package/dist/generated/model/transactionIntentResponsePlayer.js.map +1 -0
  129. package/dist/{model → generated/model}/transactionIntentResponsePolicy.d.ts +10 -10
  130. package/dist/{model → generated/model}/transactionIntentResponsePolicy.js +25 -25
  131. package/dist/generated/model/transactionIntentResponsePolicy.js.map +1 -0
  132. package/dist/{model → generated/model}/transactionIntentsResponse.d.ts +4 -4
  133. package/dist/{model → generated/model}/transactionIntentsResponse.js +10 -10
  134. package/dist/generated/model/transactionIntentsResponse.js.map +1 -0
  135. package/dist/index.d.ts +21 -21
  136. package/dist/index.js +31 -39
  137. package/dist/index.js.map +1 -1
  138. package/dist/model/createAccountRequest.d.ts +6 -0
  139. package/dist/model/createAccountRequest.js +3 -0
  140. package/dist/model/createAccountRequest.js.map +1 -0
  141. package/dist/model/createContractRequest.d.ts +9 -0
  142. package/dist/model/createContractRequest.js +3 -0
  143. package/dist/model/createContractRequest.js.map +1 -0
  144. package/dist/model/createPlayerAccountRequest.d.ts +6 -0
  145. package/dist/model/createPlayerAccountRequest.js +3 -0
  146. package/dist/model/createPlayerAccountRequest.js.map +1 -0
  147. package/dist/model/createPlayerRequest.d.ts +5 -0
  148. package/dist/model/createPlayerRequest.js +3 -0
  149. package/dist/model/createPlayerRequest.js.map +1 -0
  150. package/dist/model/createPlayerSessionRequest.d.ts +11 -0
  151. package/dist/model/createPlayerSessionRequest.js +3 -0
  152. package/dist/model/createPlayerSessionRequest.js.map +1 -0
  153. package/dist/model/createPolicyAllowFunctionRequest.d.ts +8 -0
  154. package/dist/model/createPolicyAllowFunctionRequest.js +3 -0
  155. package/dist/model/createPolicyAllowFunctionRequest.js.map +1 -0
  156. package/dist/model/createPolicyRulesRequest.d.ts +8 -0
  157. package/dist/model/createPolicyRulesRequest.js +3 -0
  158. package/dist/model/createPolicyRulesRequest.js.map +1 -0
  159. package/dist/model/createProjectRequest.d.ts +7 -0
  160. package/dist/model/createProjectRequest.js +3 -0
  161. package/dist/model/createProjectRequest.js.map +1 -0
  162. package/dist/model/createSessionRequest.d.ts +11 -0
  163. package/dist/model/createSessionRequest.js +3 -0
  164. package/dist/model/createSessionRequest.js.map +1 -0
  165. package/dist/model/createTransactionIntentRequest.d.ts +10 -0
  166. package/dist/model/createTransactionIntentRequest.js +3 -0
  167. package/dist/model/createTransactionIntentRequest.js.map +1 -0
  168. package/dist/model/getAccountInventoryRequest.d.ts +4 -0
  169. package/dist/model/getAccountInventoryRequest.js +3 -0
  170. package/dist/model/getAccountInventoryRequest.js.map +1 -0
  171. package/dist/model/getAccountRequest.d.ts +5 -0
  172. package/dist/model/getAccountRequest.js +3 -0
  173. package/dist/model/getAccountRequest.js.map +1 -0
  174. package/dist/model/getAllowFunctionsRequest.d.ts +4 -0
  175. package/dist/model/getAllowFunctionsRequest.js +3 -0
  176. package/dist/model/getAllowFunctionsRequest.js.map +1 -0
  177. package/dist/model/getContractRequest.d.ts +4 -0
  178. package/dist/model/getContractRequest.js +3 -0
  179. package/dist/model/getContractRequest.js.map +1 -0
  180. package/dist/model/getPlayerInventoryRequest.d.ts +5 -0
  181. package/dist/model/getPlayerInventoryRequest.js +3 -0
  182. package/dist/model/getPlayerInventoryRequest.js.map +1 -0
  183. package/dist/model/getPlayerRequest.d.ts +5 -0
  184. package/dist/model/getPlayerRequest.js +3 -0
  185. package/dist/model/getPlayerRequest.js.map +1 -0
  186. package/dist/model/getPolicyDailyGasUsageRequest.d.ts +5 -0
  187. package/dist/model/getPolicyDailyGasUsageRequest.js +3 -0
  188. package/dist/model/getPolicyDailyGasUsageRequest.js.map +1 -0
  189. package/dist/model/getPolicyRequest.d.ts +5 -0
  190. package/dist/model/getPolicyRequest.js +3 -0
  191. package/dist/model/getPolicyRequest.js.map +1 -0
  192. package/dist/model/getPolicyRulesRequest.d.ts +4 -0
  193. package/dist/model/getPolicyRulesRequest.js +3 -0
  194. package/dist/model/getPolicyRulesRequest.js.map +1 -0
  195. package/dist/model/getPolicyTotalGasUsageRequest.d.ts +5 -0
  196. package/dist/model/getPolicyTotalGasUsageRequest.js +3 -0
  197. package/dist/model/getPolicyTotalGasUsageRequest.js.map +1 -0
  198. package/dist/model/getTransactionIntentRequest.d.ts +4 -0
  199. package/dist/model/getTransactionIntentRequest.js +3 -0
  200. package/dist/model/getTransactionIntentRequest.js.map +1 -0
  201. package/dist/model/listAccountsRequest.d.ts +6 -0
  202. package/dist/model/listAccountsRequest.js +3 -0
  203. package/dist/model/listAccountsRequest.js.map +1 -0
  204. package/dist/model/listContractsRequest.d.ts +4 -0
  205. package/dist/model/listContractsRequest.js +3 -0
  206. package/dist/model/listContractsRequest.js.map +1 -0
  207. package/dist/model/listPlayerAccountsRequest.d.ts +5 -0
  208. package/dist/model/listPlayerAccountsRequest.js +3 -0
  209. package/dist/model/listPlayerAccountsRequest.js.map +1 -0
  210. package/dist/model/listPlayersRequest.d.ts +8 -0
  211. package/dist/model/listPlayersRequest.js +3 -0
  212. package/dist/model/listPlayersRequest.js.map +1 -0
  213. package/dist/model/listPoliciesRequest.d.ts +5 -0
  214. package/dist/model/listPoliciesRequest.js +3 -0
  215. package/dist/model/listPoliciesRequest.js.map +1 -0
  216. package/dist/model/listSessionsRequest.d.ts +9 -0
  217. package/dist/model/listSessionsRequest.js +3 -0
  218. package/dist/model/listSessionsRequest.js.map +1 -0
  219. package/dist/model/listTransactionIntentsRequest.d.ts +8 -0
  220. package/dist/model/listTransactionIntentsRequest.js +3 -0
  221. package/dist/model/listTransactionIntentsRequest.js.map +1 -0
  222. package/dist/model/revokePlayerSessionRequest.d.ts +6 -0
  223. package/dist/model/revokePlayerSessionRequest.js +3 -0
  224. package/dist/model/revokePlayerSessionRequest.js.map +1 -0
  225. package/dist/model/revokeSessionRequest.d.ts +6 -0
  226. package/dist/model/revokeSessionRequest.js +3 -0
  227. package/dist/model/revokeSessionRequest.js.map +1 -0
  228. package/dist/model/signatureSessionRequest.d.ts +4 -0
  229. package/dist/model/signatureSessionRequest.js +3 -0
  230. package/dist/model/signatureSessionRequest.js.map +1 -0
  231. package/dist/model/signatureTransactionIntentRequest.d.ts +4 -0
  232. package/dist/model/signatureTransactionIntentRequest.js +3 -0
  233. package/dist/model/signatureTransactionIntentRequest.js.map +1 -0
  234. package/dist/model/transferAccountOwnershipRequest.d.ts +8 -0
  235. package/dist/model/transferAccountOwnershipRequest.js +3 -0
  236. package/dist/model/transferAccountOwnershipRequest.js.map +1 -0
  237. package/dist/model/transferOwnershipRequest.d.ts +6 -0
  238. package/dist/model/transferOwnershipRequest.js +3 -0
  239. package/dist/model/transferOwnershipRequest.js.map +1 -0
  240. package/dist/model/updatePlayerRequest.d.ts +6 -0
  241. package/dist/model/updatePlayerRequest.js +3 -0
  242. package/dist/model/updatePlayerRequest.js.map +1 -0
  243. package/dist/model/updatePolicyAllowFunctionRequest.d.ts +10 -0
  244. package/dist/model/updatePolicyAllowFunctionRequest.js +3 -0
  245. package/dist/model/updatePolicyAllowFunctionRequest.js.map +1 -0
  246. package/dist/model/updatePolicyRulesRequest.d.ts +9 -0
  247. package/dist/model/updatePolicyRulesRequest.js +3 -0
  248. package/dist/model/updatePolicyRulesRequest.js.map +1 -0
  249. package/dist/model/updateProjectRequest.d.ts +8 -0
  250. package/dist/model/updateProjectRequest.js +3 -0
  251. package/dist/model/updateProjectRequest.js.map +1 -0
  252. package/dist/model/updateTransactionIntentRequest.d.ts +4 -0
  253. package/dist/model/updateTransactionIntentRequest.js +3 -0
  254. package/dist/model/updateTransactionIntentRequest.js.map +1 -0
  255. package/dist/wrapper/accountsApiWrapper.d.ts +38 -0
  256. package/dist/wrapper/accountsApiWrapper.js +92 -0
  257. package/dist/wrapper/accountsApiWrapper.js.map +1 -0
  258. package/dist/wrapper/contractsApiWrapper.d.ts +30 -0
  259. package/dist/wrapper/contractsApiWrapper.js +78 -0
  260. package/dist/wrapper/contractsApiWrapper.js.map +1 -0
  261. package/dist/wrapper/http-error-handler.d.ts +5 -0
  262. package/dist/wrapper/http-error-handler.js +43 -0
  263. package/dist/wrapper/http-error-handler.js.map +1 -0
  264. package/dist/wrapper/playersApiWrapper.d.ts +71 -0
  265. package/dist/wrapper/playersApiWrapper.js +162 -0
  266. package/dist/wrapper/playersApiWrapper.js.map +1 -0
  267. package/dist/wrapper/policiesApiWrapper.d.ts +57 -0
  268. package/dist/wrapper/policiesApiWrapper.js +133 -0
  269. package/dist/wrapper/policiesApiWrapper.js.map +1 -0
  270. package/dist/wrapper/policyRulesApiWrapper.d.ts +24 -0
  271. package/dist/wrapper/policyRulesApiWrapper.js +64 -0
  272. package/dist/wrapper/policyRulesApiWrapper.js.map +1 -0
  273. package/dist/wrapper/projectsApiWrapper.d.ts +33 -0
  274. package/dist/wrapper/projectsApiWrapper.js +91 -0
  275. package/dist/wrapper/projectsApiWrapper.js.map +1 -0
  276. package/dist/wrapper/sessionsApiWrapper.d.ts +30 -0
  277. package/dist/wrapper/sessionsApiWrapper.js +78 -0
  278. package/dist/wrapper/sessionsApiWrapper.js.map +1 -0
  279. package/dist/wrapper/transactionIntentsApiWrapper.d.ts +42 -0
  280. package/dist/wrapper/transactionIntentsApiWrapper.js +107 -0
  281. package/dist/wrapper/transactionIntentsApiWrapper.js.map +1 -0
  282. package/package.json +1 -1
  283. package/tsconfig.tsbuildinfo +1 -1
  284. package/dist/api/accountsApi.js.map +0 -1
  285. package/dist/api/apis.d.ts +0 -26
  286. package/dist/api/apis.js.map +0 -1
  287. package/dist/api/contractsApi.js.map +0 -1
  288. package/dist/api/defaultApi.js.map +0 -1
  289. package/dist/api/logsApi.d.ts +0 -52
  290. package/dist/api/logsApi.js +0 -155
  291. package/dist/api/logsApi.js.map +0 -1
  292. package/dist/api/playersApi.js.map +0 -1
  293. package/dist/api/policiesApi.js.map +0 -1
  294. package/dist/api/projectsApi.js.map +0 -1
  295. package/dist/api/sessionsApi.js.map +0 -1
  296. package/dist/api/transactionIntentsApi.js.map +0 -1
  297. package/dist/model/accountResponse.js.map +0 -1
  298. package/dist/model/accountsResponse.js.map +0 -1
  299. package/dist/model/allowFunctionResponse.d.ts +0 -31
  300. package/dist/model/allowFunctionResponse.js +0 -54
  301. package/dist/model/allowFunctionResponse.js.map +0 -1
  302. package/dist/model/allowFunctionsResponse.d.ts +0 -28
  303. package/dist/model/allowFunctionsResponse.js +0 -39
  304. package/dist/model/allowFunctionsResponse.js.map +0 -1
  305. package/dist/model/apiKeyResponse.js.map +0 -1
  306. package/dist/model/assetInventory.js.map +0 -1
  307. package/dist/model/assetType.js.map +0 -1
  308. package/dist/model/authResponse.d.ts +0 -26
  309. package/dist/model/authResponse.js +0 -34
  310. package/dist/model/authResponse.js.map +0 -1
  311. package/dist/model/contractDeleteResponse.js.map +0 -1
  312. package/dist/model/contractResponse.js.map +0 -1
  313. package/dist/model/contractResponseAbi.d.ts +0 -24
  314. package/dist/model/contractResponseAbi.js +0 -23
  315. package/dist/model/contractResponseAbi.js.map +0 -1
  316. package/dist/model/contractResponseAbiAnyOfInner.d.ts +0 -34
  317. package/dist/model/contractResponseAbiAnyOfInner.js +0 -74
  318. package/dist/model/contractResponseAbiAnyOfInner.js.map +0 -1
  319. package/dist/model/contractsResponse.js.map +0 -1
  320. package/dist/model/createSessionPlayerRequest.d.ts +0 -31
  321. package/dist/model/createSessionPlayerRequest.js +0 -59
  322. package/dist/model/createSessionPlayerRequest.js.map +0 -1
  323. package/dist/model/fragment.d.ts +0 -29
  324. package/dist/model/fragment.js +0 -44
  325. package/dist/model/fragment.js.map +0 -1
  326. package/dist/model/gas.js.map +0 -1
  327. package/dist/model/getProjectResponse.js.map +0 -1
  328. package/dist/model/interaction.js.map +0 -1
  329. package/dist/model/inventoryResponse.js.map +0 -1
  330. package/dist/model/jsonFragment.d.ts +0 -33
  331. package/dist/model/jsonFragment.js +0 -69
  332. package/dist/model/jsonFragment.js.map +0 -1
  333. package/dist/model/log.js.map +0 -1
  334. package/dist/model/models.d.ts +0 -88
  335. package/dist/model/models.js.map +0 -1
  336. package/dist/model/paramType.d.ts +0 -32
  337. package/dist/model/paramType.js +0 -64
  338. package/dist/model/paramType.js.map +0 -1
  339. package/dist/model/playerResponse.js +0 -74
  340. package/dist/model/playerResponse.js.map +0 -1
  341. package/dist/model/playerResponseAccounts.js.map +0 -1
  342. package/dist/model/playersResponse.js.map +0 -1
  343. package/dist/model/policiesResponse.js.map +0 -1
  344. package/dist/model/policyDeleteResponse.js.map +0 -1
  345. package/dist/model/policyResponse.js.map +0 -1
  346. package/dist/model/policyResponsePolicyRules.js.map +0 -1
  347. package/dist/model/policyResponseTransactionIntents.js.map +0 -1
  348. package/dist/model/policyRuleResponse.js.map +0 -1
  349. package/dist/model/policyRulesResponse.js.map +0 -1
  350. package/dist/model/policySchema.js.map +0 -1
  351. package/dist/model/prismaJsonValue.js.map +0 -1
  352. package/dist/model/projectLogs.js.map +0 -1
  353. package/dist/model/projectResponse.js.map +0 -1
  354. package/dist/model/projectResponseApikeys.js.map +0 -1
  355. package/dist/model/projectsResponse.js.map +0 -1
  356. package/dist/model/responseResponse.js.map +0 -1
  357. package/dist/model/sessionResponse.js +0 -84
  358. package/dist/model/sessionResponse.js.map +0 -1
  359. package/dist/model/sessionResponseTransactionIntents.js.map +0 -1
  360. package/dist/model/sessionsResponse.js.map +0 -1
  361. package/dist/model/strategy.d.ts +0 -27
  362. package/dist/model/strategy.js +0 -39
  363. package/dist/model/strategy.js.map +0 -1
  364. package/dist/model/sumGas.js.map +0 -1
  365. package/dist/model/transactionIntentResponse.d.ts +0 -43
  366. package/dist/model/transactionIntentResponse.js +0 -89
  367. package/dist/model/transactionIntentResponse.js.map +0 -1
  368. package/dist/model/transactionIntentResponseAccount.js.map +0 -1
  369. package/dist/model/transactionIntentResponsePlayer.js +0 -74
  370. package/dist/model/transactionIntentResponsePlayer.js.map +0 -1
  371. package/dist/model/transactionIntentResponsePolicy.js.map +0 -1
  372. package/dist/model/transactionIntentsResponse.js.map +0 -1
  373. package/dist/model/userOpResult.d.ts +0 -26
  374. package/dist/model/userOpResult.js +0 -34
  375. package/dist/model/userOpResult.js.map +0 -1
  376. /package/dist/{model → generated/model}/assetType.d.ts +0 -0
  377. /package/dist/{model → generated/model}/assetType.js +0 -0
  378. /package/dist/{model → generated/model}/playerResponseAccounts.d.ts +0 -0
  379. /package/dist/{model → generated/model}/playerResponseAccounts.js +0 -0
  380. /package/dist/{model → generated/model}/policyResponsePolicyRules.d.ts +0 -0
  381. /package/dist/{model → generated/model}/policyResponsePolicyRules.js +0 -0
  382. /package/dist/{model → generated/model}/policyResponseTransactionIntents.d.ts +0 -0
  383. /package/dist/{model → generated/model}/policyResponseTransactionIntents.js +0 -0
  384. /package/dist/{model → generated/model}/policySchema.d.ts +0 -0
  385. /package/dist/{model → generated/model}/projectResponseApikeys.d.ts +0 -0
  386. /package/dist/{model → generated/model}/projectResponseApikeys.js +0 -0
  387. /package/dist/{model → generated/model}/sessionResponseTransactionIntents.d.ts +0 -0
  388. /package/dist/{model → generated/model}/sessionResponseTransactionIntents.js +0 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listContractsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listContractsRequest.js","sourceRoot":"","sources":["../../src/model/listContractsRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ListPlayerAccountsRequest {
2
+ id: string;
3
+ expand?: string[];
4
+ project?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listPlayerAccountsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listPlayerAccountsRequest.js","sourceRoot":"","sources":["../../src/model/listPlayerAccountsRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface ListPlayersRequest {
2
+ expand?: string[];
3
+ limit?: number;
4
+ project?: string;
5
+ filter?: string;
6
+ order?: string;
7
+ skip?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listPlayersRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listPlayersRequest.js","sourceRoot":"","sources":["../../src/model/listPlayersRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ListPoliciesRequest {
2
+ project?: string;
3
+ limit?: number;
4
+ expand?: string[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listPoliciesRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listPoliciesRequest.js","sourceRoot":"","sources":["../../src/model/listPoliciesRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface ListSessionsRequest {
2
+ player: string;
3
+ expand?: string[];
4
+ limit?: number;
5
+ project?: string;
6
+ filter?: string;
7
+ order?: string;
8
+ skip?: number;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listSessionsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listSessionsRequest.js","sourceRoot":"","sources":["../../src/model/listSessionsRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface ListTransactionIntentsRequest {
2
+ expand?: string[];
3
+ limit?: number;
4
+ project?: string;
5
+ filter?: string;
6
+ order?: string;
7
+ skip?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=listTransactionIntentsRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listTransactionIntentsRequest.js","sourceRoot":"","sources":["../../src/model/listTransactionIntentsRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface RevokePlayerSessionRequest {
2
+ id: string;
3
+ address: string;
4
+ chain_id: number;
5
+ policy?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=revokePlayerSessionRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revokePlayerSessionRequest.js","sourceRoot":"","sources":["../../src/model/revokePlayerSessionRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface RevokeSessionRequest {
2
+ player: string;
3
+ chain_id: number;
4
+ address: string;
5
+ policy?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=revokeSessionRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revokeSessionRequest.js","sourceRoot":"","sources":["../../src/model/revokeSessionRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface SignatureSessionRequest {
2
+ id: string;
3
+ signature: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=signatureSessionRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signatureSessionRequest.js","sourceRoot":"","sources":["../../src/model/signatureSessionRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface SignatureTransactionIntentRequest {
2
+ id: string;
3
+ signature: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=signatureTransactionIntentRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signatureTransactionIntentRequest.js","sourceRoot":"","sources":["../../src/model/signatureTransactionIntentRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface TransferAccountOwnershipRequest {
2
+ id: string;
3
+ policy: string;
4
+ chain_id: number;
5
+ new_owner_address: string;
6
+ project?: string;
7
+ player?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transferAccountOwnershipRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferAccountOwnershipRequest.js","sourceRoot":"","sources":["../../src/model/transferAccountOwnershipRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface TransferOwnershipRequest {
2
+ id: string;
3
+ new_owner_address: string;
4
+ policy: string;
5
+ project?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transferOwnershipRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transferOwnershipRequest.js","sourceRoot":"","sources":["../../src/model/transferOwnershipRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface UpdatePlayerRequest {
2
+ id: string;
3
+ name?: string;
4
+ description?: string;
5
+ project?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=updatePlayerRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePlayerRequest.js","sourceRoot":"","sources":["../../src/model/updatePlayerRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { PolicySchema } from "../generated/model/policySchema";
2
+ export interface UpdatePolicyAllowFunctionRequest {
3
+ policy: string;
4
+ policy_rule: string;
5
+ function_name: string;
6
+ contract: string;
7
+ type?: PolicySchema;
8
+ policy2?: string;
9
+ project?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=updatePolicyAllowFunctionRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePolicyAllowFunctionRequest.js","sourceRoot":"","sources":["../../src/model/updatePolicyAllowFunctionRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { PolicySchema } from "../generated/model/policySchema";
2
+ export interface UpdatePolicyRulesRequest {
3
+ id: string;
4
+ type: PolicySchema;
5
+ function_name: string;
6
+ policy: string;
7
+ contract: string;
8
+ project?: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=updatePolicyRulesRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updatePolicyRulesRequest.js","sourceRoot":"","sources":["../../src/model/updatePolicyRulesRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface UpdateProjectRequest {
2
+ id: string;
3
+ name: string;
4
+ livemode?: boolean;
5
+ project?: string;
6
+ pk_policy?: string;
7
+ pk_location?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=updateProjectRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateProjectRequest.js","sourceRoot":"","sources":["../../src/model/updateProjectRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface UpdateTransactionIntentRequest {
2
+ id: string;
3
+ project?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=updateTransactionIntentRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateTransactionIntentRequest.js","sourceRoot":"","sources":["../../src/model/updateTransactionIntentRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { AccountResponse } from '../generated/model/accountResponse';
2
+ import { AccountsResponse } from '../generated/model/accountsResponse';
3
+ import { InventoryResponse } from '../generated/model/inventoryResponse';
4
+ import { TransactionIntentResponse } from '../generated/model/transactionIntentResponse';
5
+ import { CreateAccountRequest } from "../model/createAccountRequest";
6
+ import { GetAccountRequest } from "../model/getAccountRequest";
7
+ import { GetAccountInventoryRequest } from "../model/getAccountInventoryRequest";
8
+ import { ListAccountsRequest } from "../model/listAccountsRequest";
9
+ import { TransferOwnershipRequest } from "../model/transferOwnershipRequest";
10
+ export declare class AccountsApiWrapper {
11
+ private readonly _api;
12
+ constructor(accessToken: string, basePath?: string);
13
+ /**
14
+ * Creates an account object.
15
+ * @param req The account to create
16
+ */
17
+ create(req: CreateAccountRequest): Promise<AccountResponse>;
18
+ /**
19
+ * Retrieves the details of an existing account. Supply the unique account ID from either a account creation request or the account list, and Openfort will return the corresponding account information.
20
+ * @param req Criteria to get account.
21
+ */
22
+ get(req: GetAccountRequest): Promise<AccountResponse>;
23
+ /**
24
+ * Retrieves the inventory of an existing account. Supply the unique account ID from either a account creation request or the account list, and Openfort will return the corresponding account information.
25
+ * @param req Criteria to get inventory.
26
+ */
27
+ getInventory(req: GetAccountInventoryRequest): Promise<InventoryResponse>;
28
+ /**
29
+ * Returns a list of accounts for the given player. The accounts are returned sorted by creation date, with the most recently created accounts appearing first.
30
+ * @param req Criteria to get the list of accounts.
31
+ */
32
+ list(req: ListAccountsRequest): Promise<AccountsResponse>;
33
+ /**
34
+ * Transfers ownership of an account to an address.
35
+ * @param req Parameters to transfer ownership.
36
+ */
37
+ transferOwnership(req: TransferOwnershipRequest): Promise<TransactionIntentResponse>;
38
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AccountsApiWrapper = void 0;
13
+ const accountsApi_1 = require("../generated/api/accountsApi");
14
+ const http_error_handler_1 = require("./http-error-handler");
15
+ class AccountsApiWrapper {
16
+ constructor(accessToken, basePath) {
17
+ this._api = new accountsApi_1.AccountsApi(basePath);
18
+ this._api.accessToken = accessToken;
19
+ }
20
+ /**
21
+ * Creates an account object.
22
+ * @param req The account to create
23
+ */
24
+ async create(req) {
25
+ const response = await this._api.createAccount(req.chain_id, req.player, req.project, req.external_owner_address);
26
+ return response.body;
27
+ }
28
+ /**
29
+ * Retrieves the details of an existing account. Supply the unique account ID from either a account creation request or the account list, and Openfort will return the corresponding account information.
30
+ * @param req Criteria to get account.
31
+ */
32
+ async get(req) {
33
+ const response = await this._api.getAccount(req.id, req.expand, req.project);
34
+ return response.body;
35
+ }
36
+ /**
37
+ * Retrieves the inventory of an existing account. Supply the unique account ID from either a account creation request or the account list, and Openfort will return the corresponding account information.
38
+ * @param req Criteria to get inventory.
39
+ */
40
+ async getInventory(req) {
41
+ const response = await this._api.getAccountInventory(req.id, req.project);
42
+ return response.body;
43
+ }
44
+ /**
45
+ * Returns a list of accounts for the given player. The accounts are returned sorted by creation date, with the most recently created accounts appearing first.
46
+ * @param req Criteria to get the list of accounts.
47
+ */
48
+ async list(req) {
49
+ const response = await this._api.getAccounts(req.player, req.expand, req.limit, req.project);
50
+ return response.body;
51
+ }
52
+ /**
53
+ * Transfers ownership of an account to an address.
54
+ * @param req Parameters to transfer ownership.
55
+ */
56
+ async transferOwnership(req) {
57
+ const response = await this._api.transferOwnership(req.id, req.new_owner_address, req.policy, req.project);
58
+ return response.body;
59
+ }
60
+ }
61
+ __decorate([
62
+ (0, http_error_handler_1.httpErrorHandler)(),
63
+ __metadata("design:type", Function),
64
+ __metadata("design:paramtypes", [Object]),
65
+ __metadata("design:returntype", Promise)
66
+ ], AccountsApiWrapper.prototype, "create", null);
67
+ __decorate([
68
+ (0, http_error_handler_1.httpErrorHandler)(),
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", [Object]),
71
+ __metadata("design:returntype", Promise)
72
+ ], AccountsApiWrapper.prototype, "get", null);
73
+ __decorate([
74
+ (0, http_error_handler_1.httpErrorHandler)(),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [Object]),
77
+ __metadata("design:returntype", Promise)
78
+ ], AccountsApiWrapper.prototype, "getInventory", null);
79
+ __decorate([
80
+ (0, http_error_handler_1.httpErrorHandler)(),
81
+ __metadata("design:type", Function),
82
+ __metadata("design:paramtypes", [Object]),
83
+ __metadata("design:returntype", Promise)
84
+ ], AccountsApiWrapper.prototype, "list", null);
85
+ __decorate([
86
+ (0, http_error_handler_1.httpErrorHandler)(),
87
+ __metadata("design:type", Function),
88
+ __metadata("design:paramtypes", [Object]),
89
+ __metadata("design:returntype", Promise)
90
+ ], AccountsApiWrapper.prototype, "transferOwnership", null);
91
+ exports.AccountsApiWrapper = AccountsApiWrapper;
92
+ //# sourceMappingURL=accountsApiWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/accountsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,8DAAyD;AAEzD,6DAAsD;AAMtD,MAAa,kBAAkB;IAG3B,YAAY,WAAmB,EAAE,QAAiB;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,yBAAW,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACxC,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,MAAM,CAAC,GAAyB;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC;QAClH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,GAAG,CAAC,GAAsB;QACnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,YAAY,CAAC,GAA+B;QACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,IAAI,CAAC,GAAwB;QACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,iBAAiB,CAAC,GAA6B;QACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3G,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CACJ;AA5CgB;IADZ,IAAA,qCAAgB,GAAE;;;;gDAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;6CAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;sDAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;8CAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;2DAIlB;AAxDL,gDAyDC"}
@@ -0,0 +1,30 @@
1
+ import { ContractDeleteResponse } from '../generated/model/contractDeleteResponse';
2
+ import { ContractResponse } from '../generated/model/contractResponse';
3
+ import { ContractsResponse } from '../generated/model/contractsResponse';
4
+ import { CreateContractRequest } from "../model/createContractRequest";
5
+ import { GetContractRequest } from "../model/getContractRequest";
6
+ import { ListContractsRequest } from "../model/listContractsRequest";
7
+ export declare class ContractsApiWrapper {
8
+ private readonly _api;
9
+ constructor(accessToken: string, basePath?: string);
10
+ /**
11
+ * Creates a contract object.
12
+ * @param req Parameters to create contract
13
+ */
14
+ create(req: CreateContractRequest): Promise<ContractResponse>;
15
+ /**
16
+ * Deletes a contract object.
17
+ * @param id Id of the contract to delete
18
+ */
19
+ delete(id: string): Promise<ContractDeleteResponse>;
20
+ /**
21
+ * Retrieves the details of an existing contract. Supply the unique contract ID from either a contract creation request or the contract list, and Openfort will return the corresponding contract information.
22
+ * @param req Criteria to get the contract.
23
+ */
24
+ get(req: GetContractRequest): Promise<ContractResponse>;
25
+ /**
26
+ * Returns a list of your contracts. The contracts are returned sorted by creation date, with the most recently created contracts appearing first.
27
+ * @param req Criteria to retrieve list of contracts.
28
+ */
29
+ list(req?: ListContractsRequest): Promise<ContractsResponse>;
30
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ContractsApiWrapper = void 0;
13
+ const contractsApi_1 = require("../generated/api/contractsApi");
14
+ const http_error_handler_1 = require("./http-error-handler");
15
+ class ContractsApiWrapper {
16
+ constructor(accessToken, basePath) {
17
+ this._api = new contractsApi_1.ContractsApi(basePath);
18
+ this._api.accessToken = accessToken;
19
+ }
20
+ /**
21
+ * Creates a contract object.
22
+ * @param req Parameters to create contract
23
+ */
24
+ async create(req) {
25
+ const response = await this._api.createContract(req.name, req.chain_id, req.address, req.abi, req.public_verification, req.project);
26
+ return response.body;
27
+ }
28
+ /**
29
+ * Deletes a contract object.
30
+ * @param id Id of the contract to delete
31
+ */
32
+ async delete(id) {
33
+ const response = await this._api.deleteContract(id);
34
+ return response.body;
35
+ }
36
+ /**
37
+ * Retrieves the details of an existing contract. Supply the unique contract ID from either a contract creation request or the contract list, and Openfort will return the corresponding contract information.
38
+ * @param req Criteria to get the contract.
39
+ */
40
+ async get(req) {
41
+ const response = await this._api.getContract(req.id, req.project);
42
+ return response.body;
43
+ }
44
+ /**
45
+ * Returns a list of your contracts. The contracts are returned sorted by creation date, with the most recently created contracts appearing first.
46
+ * @param req Criteria to retrieve list of contracts.
47
+ */
48
+ async list(req) {
49
+ const response = await this._api.getContracts(req?.project, req?.limit);
50
+ return response.body;
51
+ }
52
+ }
53
+ __decorate([
54
+ (0, http_error_handler_1.httpErrorHandler)(),
55
+ __metadata("design:type", Function),
56
+ __metadata("design:paramtypes", [Object]),
57
+ __metadata("design:returntype", Promise)
58
+ ], ContractsApiWrapper.prototype, "create", null);
59
+ __decorate([
60
+ (0, http_error_handler_1.httpErrorHandler)(),
61
+ __metadata("design:type", Function),
62
+ __metadata("design:paramtypes", [String]),
63
+ __metadata("design:returntype", Promise)
64
+ ], ContractsApiWrapper.prototype, "delete", null);
65
+ __decorate([
66
+ (0, http_error_handler_1.httpErrorHandler)(),
67
+ __metadata("design:type", Function),
68
+ __metadata("design:paramtypes", [Object]),
69
+ __metadata("design:returntype", Promise)
70
+ ], ContractsApiWrapper.prototype, "get", null);
71
+ __decorate([
72
+ (0, http_error_handler_1.httpErrorHandler)(),
73
+ __metadata("design:type", Function),
74
+ __metadata("design:paramtypes", [Object]),
75
+ __metadata("design:returntype", Promise)
76
+ ], ContractsApiWrapper.prototype, "list", null);
77
+ exports.ContractsApiWrapper = ContractsApiWrapper;
78
+ //# sourceMappingURL=contractsApiWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/contractsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,gEAA2D;AAE3D,6DAAsD;AAItD,MAAa,mBAAmB;IAG5B,YAAY,WAAmB,EAAE,QAAiB;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,2BAAY,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACxC,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,MAAM,CAAC,GAA0B;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACpI,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,MAAM,CAAC,EAAU;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACpD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,GAAG,CAAC,GAAuB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAClE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IAEU,AAAN,KAAK,CAAC,IAAI,CAAC,GAA0B;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QACxE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CACJ;AAlCgB;IADZ,IAAA,qCAAgB,GAAE;;;;iDAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;iDAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;8CAIlB;AAOY;IADZ,IAAA,qCAAgB,GAAE;;;;+CAIlB;AA9CL,kDA+CC"}
@@ -0,0 +1,5 @@
1
+ export declare function httpErrorHandler(): <Args extends any[], R>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: Args) => Promise<R>>) => void;
2
+ export declare class ValidationError extends Error {
3
+ readonly details?: string | undefined;
4
+ constructor(message: string, details?: string | undefined);
5
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationError = exports.httpErrorHandler = void 0;
4
+ const apis_1 = require("../generated/api/apis");
5
+ function parseAndPrepareHttpError(error) {
6
+ if (error instanceof apis_1.HttpError) {
7
+ if (error.body?.error?.message) {
8
+ throw new Error(error.body?.error?.message);
9
+ }
10
+ if (error.body?.message) {
11
+ throw new ValidationError(error.body?.message, error.body?.details);
12
+ }
13
+ }
14
+ throw error;
15
+ }
16
+ function httpErrorHandler() {
17
+ return (target, propertyKey, descriptor) => {
18
+ const targetMethod = descriptor.value;
19
+ descriptor.value = function (...args) {
20
+ try {
21
+ const result = targetMethod.apply(this, args);
22
+ if (result instanceof Promise) {
23
+ return result.catch((error) => {
24
+ throw parseAndPrepareHttpError(error);
25
+ });
26
+ }
27
+ return result;
28
+ }
29
+ catch (error) {
30
+ throw parseAndPrepareHttpError(error);
31
+ }
32
+ };
33
+ };
34
+ }
35
+ exports.httpErrorHandler = httpErrorHandler;
36
+ class ValidationError extends Error {
37
+ constructor(message, details) {
38
+ super(message);
39
+ this.details = details;
40
+ }
41
+ }
42
+ exports.ValidationError = ValidationError;
43
+ //# sourceMappingURL=http-error-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-error-handler.js","sourceRoot":"","sources":["../../src/wrapper/http-error-handler.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAEhD,SAAS,wBAAwB,CAAI,KAAQ;IACzC,IAAI,KAAK,YAAY,gBAAS,EAAE;QAC5B,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;SAC/C;QACD,IAAI,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE;YACrB,MAAM,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACvE;KACJ;IAED,MAAM,KAAK,CAAC;AAChB,CAAC;AAED,SAAgB,gBAAgB;IAC5B,OAAO,CACH,MAAc,EACd,WAAmB,EACnB,UAAkE,EACpE,EAAE;QACA,MAAM,YAAY,GAAG,UAAU,CAAC,KAAM,CAAC;QAEvC,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAU;YACtC,IAAI;gBACA,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC9C,IAAI,MAAM,YAAY,OAAO,EAAE;oBAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;wBAC1B,MAAM,wBAAwB,CAAC,KAAK,CAAC,CAAC;oBAC1C,CAAC,CAAC,CAAC;iBACN;gBACD,OAAO,MAAM,CAAC;aACjB;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,wBAAwB,CAAC,KAAK,CAAC,CAAC;aACzC;QACL,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAtBD,4CAsBC;AAED,MAAa,eAAgB,SAAQ,KAAK;IACtC,YAAmB,OAAe,EAAkB,OAAgB;QAChE,KAAK,CAAC,OAAO,CAAC,CAAC;QADiC,YAAO,GAAP,OAAO,CAAS;IAEpE,CAAC;CACJ;AAJD,0CAIC"}