wapi-client 0.9.6 → 0.10.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 (285) hide show
  1. package/dist/api/base-client.browser.cjs +69 -60
  2. package/dist/api/base-client.browser.js +69 -60
  3. package/dist/api/base-client.cjs +69 -60
  4. package/dist/api/base-client.d.ts +67 -58
  5. package/dist/api/base-client.js +70 -61
  6. package/dist/api/connection/connection.enums.d.ts +0 -12
  7. package/dist/api/http-client.d.ts +1 -1
  8. package/dist/api/ws-client.cjs +1 -1
  9. package/dist/api/ws-client.d.ts +1 -1
  10. package/dist/api/ws-client.js +1 -1
  11. package/dist/client.browser.cjs +623 -441
  12. package/dist/client.browser.js +623 -441
  13. package/dist/client.cjs +624 -442
  14. package/dist/client.d.ts +851 -547
  15. package/dist/client.js +624 -442
  16. package/dist/db/consts.schema.json +3 -2
  17. package/dist/db/index.browser.cjs +5 -1
  18. package/dist/db/index.browser.js +5 -1
  19. package/dist/db/index.cjs +8 -2
  20. package/dist/db/index.d.ts +3 -0
  21. package/dist/db/index.js +5 -1
  22. package/dist/db/token/token.schema.input.json +5 -16
  23. package/dist/db/token/token.schema.json +8 -32
  24. package/dist/db/token/token.schema.optional.json +5 -16
  25. package/dist/db/transfer/transfer.schema.input.json +6 -21
  26. package/dist/db/transfer/transfer.schema.json +8 -28
  27. package/dist/db/transfer/transfer.schema.optional.json +7 -24
  28. package/dist/db/transfer-group/transfer-group.schema.input.json +6 -20
  29. package/dist/db/transfer-group/transfer-group.schema.json +8 -27
  30. package/dist/db/transfer-group/transfer-group.schema.optional.json +6 -20
  31. package/dist/db/transfer-log/transfer-log.schema.input.json +1 -1
  32. package/dist/db/transfer-log/transfer-log.schema.json +7 -29
  33. package/dist/db/transfer-log/transfer-log.schema.optional.json +6 -20
  34. package/dist/db/wallet/wallet.schema.input.json +4 -12
  35. package/dist/db/wallet/wallet.schema.json +8 -35
  36. package/dist/db/wallet/wallet.schema.optional.json +4 -12
  37. package/dist/db/wallet-token-setting/wallet-token-setting.schema.input.json +1 -1
  38. package/dist/db/wallet-token-setting/wallet-token-setting.schema.json +5 -17
  39. package/dist/db/wallet-token-setting/wallet-token-setting.schema.optional.json +2 -4
  40. package/dist/db/wapi-setting/wapi-setting.schema.input.json +2 -5
  41. package/dist/db/wapi-setting/wapi-setting.schema.json +5 -21
  42. package/dist/db/wapi-setting/wapi-setting.schema.optional.json +2 -4
  43. package/dist/{txs/export-database/export-database.enums.cjs → db/wapi-statistic/wapi-statistic.enums.browser.cjs} +3 -3
  44. package/dist/{txs/import-database/import-database.enums.cjs → db/wapi-statistic/wapi-statistic.enums.cjs} +3 -3
  45. package/dist/db/wapi-statistic/wapi-statistic.enums.d.ts +96 -0
  46. package/dist/db/wapi-statistic/wapi-statistic.schema.input.json +29 -0
  47. package/dist/db/wapi-statistic/wapi-statistic.schema.json +81 -0
  48. package/dist/db/wapi-statistic/wapi-statistic.schema.optional.json +43 -0
  49. package/dist/fns/export-balance-history/export-balance-history.browser.cjs +51 -0
  50. package/dist/fns/export-balance-history/export-balance-history.browser.js +30 -0
  51. package/dist/fns/export-balance-history/export-balance-history.cjs +55 -0
  52. package/dist/fns/export-balance-history/export-balance-history.d.ts +8 -0
  53. package/dist/fns/export-balance-history/export-balance-history.enums.browser.cjs +17 -0
  54. package/dist/fns/export-balance-history/export-balance-history.enums.cjs +17 -0
  55. package/dist/fns/export-balance-history/export-balance-history.enums.d.ts +29 -0
  56. package/dist/fns/export-balance-history/export-balance-history.guards.browser.cjs +36 -0
  57. package/dist/fns/export-balance-history/export-balance-history.guards.browser.js +16 -0
  58. package/dist/fns/export-balance-history/export-balance-history.guards.cjs +41 -0
  59. package/dist/fns/export-balance-history/export-balance-history.guards.d.ts +4 -0
  60. package/dist/fns/export-balance-history/export-balance-history.guards.js +16 -0
  61. package/dist/fns/export-balance-history/export-balance-history.js +30 -0
  62. package/dist/fns/export-balance-history/export-balance-history.schema.input.json +33 -0
  63. package/dist/fns/export-balance-history/export-balance-history.schema.output.json +8 -0
  64. package/dist/fns/export-tokens/export-tokens.browser.cjs +91 -0
  65. package/dist/fns/export-tokens/export-tokens.browser.js +77 -0
  66. package/dist/fns/export-tokens/export-tokens.cjs +95 -0
  67. package/dist/fns/export-tokens/export-tokens.d.ts +19 -0
  68. package/dist/fns/export-tokens/export-tokens.enums.browser.cjs +17 -0
  69. package/dist/fns/export-tokens/export-tokens.enums.cjs +17 -0
  70. package/dist/fns/export-tokens/export-tokens.enums.d.ts +39 -0
  71. package/dist/fns/export-tokens/export-tokens.guards.browser.cjs +36 -0
  72. package/dist/fns/export-tokens/export-tokens.guards.browser.js +16 -0
  73. package/dist/fns/export-tokens/export-tokens.guards.cjs +41 -0
  74. package/dist/fns/export-tokens/export-tokens.guards.d.ts +4 -0
  75. package/dist/fns/export-tokens/export-tokens.guards.js +16 -0
  76. package/dist/fns/export-tokens/export-tokens.js +77 -0
  77. package/dist/fns/export-tokens/export-tokens.schema.input.json +43 -0
  78. package/dist/fns/export-tokens/export-tokens.schema.output.json +8 -0
  79. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.cjs +94 -0
  80. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.js +80 -0
  81. package/dist/fns/export-transfer-groups/export-transfer-groups.cjs +98 -0
  82. package/dist/fns/export-transfer-groups/export-transfer-groups.d.ts +19 -0
  83. package/dist/fns/export-transfer-groups/export-transfer-groups.enums.browser.cjs +17 -0
  84. package/dist/fns/export-transfer-groups/export-transfer-groups.enums.cjs +17 -0
  85. package/dist/fns/export-transfer-groups/export-transfer-groups.enums.d.ts +47 -0
  86. package/dist/fns/export-transfer-groups/export-transfer-groups.guards.browser.cjs +36 -0
  87. package/dist/fns/export-transfer-groups/export-transfer-groups.guards.browser.js +16 -0
  88. package/dist/fns/export-transfer-groups/export-transfer-groups.guards.cjs +41 -0
  89. package/dist/fns/export-transfer-groups/export-transfer-groups.guards.d.ts +4 -0
  90. package/dist/fns/export-transfer-groups/export-transfer-groups.guards.js +16 -0
  91. package/dist/fns/export-transfer-groups/export-transfer-groups.js +80 -0
  92. package/dist/fns/export-transfer-groups/export-transfer-groups.schema.input.json +49 -0
  93. package/dist/fns/export-transfer-groups/export-transfer-groups.schema.output.json +8 -0
  94. package/dist/fns/export-transfers/export-transfers.browser.cjs +140 -0
  95. package/dist/fns/export-transfers/export-transfers.browser.js +127 -0
  96. package/dist/fns/export-transfers/export-transfers.cjs +144 -0
  97. package/dist/fns/export-transfers/export-transfers.d.ts +19 -0
  98. package/dist/{txs/export-database/export-database.enums.browser.cjs → fns/export-transfers/export-transfers.enums.browser.cjs} +3 -3
  99. package/dist/{txs/import-database/import-database.enums.browser.cjs → fns/export-transfers/export-transfers.enums.cjs} +3 -3
  100. package/dist/fns/export-transfers/export-transfers.enums.d.ts +54 -0
  101. package/dist/fns/export-transfers/export-transfers.guards.browser.cjs +36 -0
  102. package/dist/fns/export-transfers/export-transfers.guards.browser.js +16 -0
  103. package/dist/fns/export-transfers/export-transfers.guards.cjs +41 -0
  104. package/dist/fns/export-transfers/export-transfers.guards.d.ts +4 -0
  105. package/dist/fns/export-transfers/export-transfers.guards.js +16 -0
  106. package/dist/fns/export-transfers/export-transfers.js +127 -0
  107. package/dist/fns/export-transfers/export-transfers.schema.input.json +73 -0
  108. package/dist/fns/export-transfers/export-transfers.schema.output.json +8 -0
  109. package/dist/fns/export-wallets/export-wallets.browser.cjs +86 -0
  110. package/dist/fns/export-wallets/export-wallets.browser.js +72 -0
  111. package/dist/fns/export-wallets/export-wallets.cjs +90 -0
  112. package/dist/fns/export-wallets/export-wallets.d.ts +18 -0
  113. package/dist/fns/export-wallets/export-wallets.enums.browser.cjs +17 -0
  114. package/dist/fns/export-wallets/export-wallets.enums.cjs +17 -0
  115. package/dist/fns/export-wallets/export-wallets.enums.d.ts +45 -0
  116. package/dist/fns/export-wallets/export-wallets.guards.browser.cjs +36 -0
  117. package/dist/fns/export-wallets/export-wallets.guards.browser.js +16 -0
  118. package/dist/fns/export-wallets/export-wallets.guards.cjs +41 -0
  119. package/dist/fns/export-wallets/export-wallets.guards.d.ts +4 -0
  120. package/dist/fns/export-wallets/export-wallets.guards.js +16 -0
  121. package/dist/fns/export-wallets/export-wallets.js +72 -0
  122. package/dist/fns/export-wallets/export-wallets.schema.input.json +54 -0
  123. package/dist/fns/export-wallets/export-wallets.schema.output.json +8 -0
  124. package/dist/fns/get-export/get-export.browser.cjs +45 -0
  125. package/dist/fns/get-export/get-export.browser.js +24 -0
  126. package/dist/fns/get-export/get-export.cjs +49 -0
  127. package/dist/fns/get-export/get-export.d.ts +9 -0
  128. package/dist/{txs/query/query.enums.browser.cjs → fns/get-export/get-export.enums.browser.cjs} +3 -3
  129. package/dist/fns/get-export/get-export.enums.browser.js +0 -0
  130. package/dist/{txs/query/query.enums.cjs → fns/get-export/get-export.enums.cjs} +3 -3
  131. package/dist/fns/get-export/get-export.enums.d.ts +22 -0
  132. package/dist/fns/get-export/get-export.enums.js +0 -0
  133. package/dist/fns/get-export/get-export.guards.browser.cjs +36 -0
  134. package/dist/fns/get-export/get-export.guards.browser.js +16 -0
  135. package/dist/fns/get-export/get-export.guards.cjs +41 -0
  136. package/dist/fns/get-export/get-export.guards.d.ts +4 -0
  137. package/dist/fns/get-export/get-export.guards.js +16 -0
  138. package/dist/fns/get-export/get-export.js +24 -0
  139. package/dist/fns/get-export/get-export.schema.input.json +27 -0
  140. package/dist/fns/get-export/get-export.schema.output.json +8 -0
  141. package/dist/fns/index.browser.cjs +65 -0
  142. package/dist/fns/index.browser.js +65 -0
  143. package/dist/fns/index.cjs +86 -0
  144. package/dist/fns/index.d.ts +45 -1
  145. package/dist/fns/index.js +65 -0
  146. package/dist/fns/list-exports/list-exports.browser.cjs +51 -0
  147. package/dist/fns/list-exports/list-exports.browser.js +30 -0
  148. package/dist/fns/list-exports/list-exports.cjs +55 -0
  149. package/dist/fns/list-exports/list-exports.d.ts +10 -0
  150. package/dist/fns/list-exports/list-exports.enums.browser.cjs +17 -0
  151. package/dist/fns/list-exports/list-exports.enums.browser.js +0 -0
  152. package/dist/fns/list-exports/list-exports.enums.cjs +17 -0
  153. package/dist/fns/list-exports/list-exports.enums.d.ts +24 -0
  154. package/dist/fns/list-exports/list-exports.enums.js +0 -0
  155. package/dist/fns/list-exports/list-exports.guards.browser.cjs +36 -0
  156. package/dist/fns/list-exports/list-exports.guards.browser.js +16 -0
  157. package/dist/fns/list-exports/list-exports.guards.cjs +41 -0
  158. package/dist/fns/list-exports/list-exports.guards.d.ts +4 -0
  159. package/dist/fns/list-exports/list-exports.guards.js +16 -0
  160. package/dist/fns/list-exports/list-exports.js +30 -0
  161. package/dist/fns/list-exports/list-exports.schema.input.json +22 -0
  162. package/dist/fns/list-exports/list-exports.schema.output.json +8 -0
  163. package/dist/lib/validator.browser.cjs +286 -90
  164. package/dist/lib/validator.browser.js +286 -90
  165. package/dist/lib/validator.cjs +286 -90
  166. package/dist/lib/validator.d.ts +32 -13
  167. package/dist/lib/validator.js +286 -90
  168. package/dist/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json +1 -0
  169. package/dist/txs/create-access-token/create-access-token.schema.input.json +1 -0
  170. package/dist/txs/create-transfer-group/create-transfer-group.schema.input.json +0 -1
  171. package/dist/txs/export-balance-history/export-balance-history.enums.browser.cjs +17 -0
  172. package/dist/txs/export-balance-history/export-balance-history.enums.browser.js +0 -0
  173. package/dist/txs/export-balance-history/export-balance-history.enums.cjs +17 -0
  174. package/dist/txs/export-balance-history/export-balance-history.enums.d.ts +22 -0
  175. package/dist/txs/export-balance-history/export-balance-history.enums.js +0 -0
  176. package/dist/txs/export-balance-history/export-balance-history.schema.input.json +38 -0
  177. package/dist/txs/export-balance-history/export-balance-history.schema.output.json +14 -0
  178. package/dist/txs/export-token-many/export-token-many.enums.browser.cjs +17 -0
  179. package/dist/txs/export-token-many/export-token-many.enums.browser.js +0 -0
  180. package/dist/txs/export-token-many/export-token-many.enums.cjs +17 -0
  181. package/dist/txs/export-token-many/export-token-many.enums.d.ts +9 -0
  182. package/dist/txs/export-token-many/export-token-many.enums.js +0 -0
  183. package/dist/txs/export-token-many/export-token-many.schema.input.json +21 -0
  184. package/dist/txs/export-token-many/export-token-many.schema.output.json +14 -0
  185. package/dist/txs/export-transfer-group-many/export-transfer-group-many.enums.browser.cjs +17 -0
  186. package/dist/txs/export-transfer-group-many/export-transfer-group-many.enums.browser.js +0 -0
  187. package/dist/txs/export-transfer-group-many/export-transfer-group-many.enums.cjs +17 -0
  188. package/dist/txs/export-transfer-group-many/export-transfer-group-many.enums.d.ts +9 -0
  189. package/dist/txs/export-transfer-group-many/export-transfer-group-many.enums.js +0 -0
  190. package/dist/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json +21 -0
  191. package/dist/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json +14 -0
  192. package/dist/txs/export-transfer-many/export-transfer-many.enums.browser.cjs +17 -0
  193. package/dist/txs/export-transfer-many/export-transfer-many.enums.browser.js +0 -0
  194. package/dist/txs/export-transfer-many/export-transfer-many.enums.cjs +17 -0
  195. package/dist/txs/export-transfer-many/export-transfer-many.enums.d.ts +11 -0
  196. package/dist/txs/export-transfer-many/export-transfer-many.enums.js +0 -0
  197. package/dist/txs/export-transfer-many/export-transfer-many.schema.input.json +40 -0
  198. package/dist/txs/export-transfer-many/export-transfer-many.schema.output.json +14 -0
  199. package/dist/txs/export-wallet-many/export-wallet-many.enums.browser.cjs +17 -0
  200. package/dist/txs/export-wallet-many/export-wallet-many.enums.browser.js +0 -0
  201. package/dist/txs/export-wallet-many/export-wallet-many.enums.cjs +17 -0
  202. package/dist/txs/export-wallet-many/export-wallet-many.enums.d.ts +9 -0
  203. package/dist/txs/export-wallet-many/export-wallet-many.enums.js +0 -0
  204. package/dist/txs/export-wallet-many/export-wallet-many.schema.input.json +21 -0
  205. package/dist/txs/export-wallet-many/export-wallet-many.schema.output.json +14 -0
  206. package/dist/txs/find-transfer-group-many/find-transfer-group-many.enums.d.ts +1 -1
  207. package/dist/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json +0 -1
  208. package/dist/txs/find-transfer-many/find-transfer-many.enums.d.ts +1 -1
  209. package/dist/txs/find-transfer-many/find-transfer-many.schema.input.json +0 -1
  210. package/dist/txs/get-balance-history/get-balance-history.enums.d.ts +1 -1
  211. package/dist/txs/get-balance-history/get-balance-history.schema.input.json +1 -0
  212. package/dist/txs/get-export/get-export.enums.browser.cjs +17 -0
  213. package/dist/txs/get-export/get-export.enums.browser.js +0 -0
  214. package/dist/txs/get-export/get-export.enums.cjs +17 -0
  215. package/dist/txs/get-export/get-export.enums.d.ts +82 -0
  216. package/dist/txs/get-export/get-export.enums.js +0 -0
  217. package/dist/txs/get-export/get-export.schema.input.json +51 -0
  218. package/dist/txs/get-export/get-export.schema.output.json +70 -0
  219. package/dist/txs/get-wallet-many/get-wallet-many.enums.d.ts +1 -1
  220. package/dist/txs/get-wallet-many/get-wallet-many.schema.input.json +1 -0
  221. package/dist/txs/healthcheck/healthcheck.schema.input.json +0 -1
  222. package/dist/txs/index.browser.cjs +63 -58
  223. package/dist/txs/index.browser.js +61 -62
  224. package/dist/txs/index.cjs +77 -75
  225. package/dist/txs/index.d.ts +37 -33
  226. package/dist/txs/index.js +61 -62
  227. package/dist/txs/list-export-many/list-export-many.enums.browser.cjs +17 -0
  228. package/dist/txs/list-export-many/list-export-many.enums.browser.js +0 -0
  229. package/dist/txs/list-export-many/list-export-many.enums.cjs +17 -0
  230. package/dist/txs/list-export-many/list-export-many.enums.d.ts +23 -0
  231. package/dist/txs/list-export-many/list-export-many.enums.js +0 -0
  232. package/dist/txs/list-export-many/list-export-many.schema.input.json +76 -0
  233. package/dist/txs/list-export-many/list-export-many.schema.output.json +18 -0
  234. package/dist/txs/reverse-transfer-group/reverse-transfer-group.enums.d.ts +1 -1
  235. package/dist/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json +1 -0
  236. package/dist/txs/update-token/update-token.enums.d.ts +1 -1
  237. package/dist/txs/update-token/update-token.schema.input.json +1 -1
  238. package/dist/txs/update-transfer/update-transfer.enums.d.ts +1 -1
  239. package/dist/txs/update-transfer/update-transfer.schema.input.json +1 -1
  240. package/dist/txs/update-transfer-group/update-transfer-group.enums.d.ts +1 -1
  241. package/dist/txs/update-transfer-group/update-transfer-group.schema.input.json +1 -1
  242. package/dist/txs/update-transfer-group-many/update-transfer-group-many.enums.d.ts +1 -1
  243. package/dist/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json +1 -1
  244. package/dist/txs/update-wallet/update-wallet.enums.d.ts +1 -1
  245. package/dist/txs/update-wallet/update-wallet.schema.input.json +1 -1
  246. package/dist/types/index.d.ts +2254 -1327
  247. package/dist/wapi-client-web.iife.js +6 -6
  248. package/dist/wapi-client.iife.js +6 -6
  249. package/package.json +1 -1
  250. package/dist/txs/export-database/export-database.enums.d.ts +0 -20
  251. package/dist/txs/export-database/export-database.schema.input.json +0 -15
  252. package/dist/txs/export-database/export-database.schema.output.json +0 -13
  253. package/dist/txs/get-database-export-progress/get-database-export-progress.enums.browser.cjs +0 -17
  254. package/dist/txs/get-database-export-progress/get-database-export-progress.enums.cjs +0 -17
  255. package/dist/txs/get-database-export-progress/get-database-export-progress.enums.d.ts +0 -38
  256. package/dist/txs/get-database-export-progress/get-database-export-progress.schema.input.json +0 -31
  257. package/dist/txs/get-database-export-progress/get-database-export-progress.schema.output.json +0 -27
  258. package/dist/txs/get-database-import-progress/get-database-import-progress.enums.browser.cjs +0 -17
  259. package/dist/txs/get-database-import-progress/get-database-import-progress.enums.cjs +0 -17
  260. package/dist/txs/get-database-import-progress/get-database-import-progress.enums.d.ts +0 -33
  261. package/dist/txs/get-database-import-progress/get-database-import-progress.schema.input.json +0 -22
  262. package/dist/txs/get-database-import-progress/get-database-import-progress.schema.output.json +0 -27
  263. package/dist/txs/import-database/import-database.enums.d.ts +0 -17
  264. package/dist/txs/import-database/import-database.schema.input.json +0 -14
  265. package/dist/txs/import-database/import-database.schema.output.json +0 -13
  266. package/dist/txs/list-database-exports/list-database-exports.enums.browser.cjs +0 -17
  267. package/dist/txs/list-database-exports/list-database-exports.enums.cjs +0 -17
  268. package/dist/txs/list-database-exports/list-database-exports.enums.d.ts +0 -26
  269. package/dist/txs/list-database-exports/list-database-exports.schema.input.json +0 -10
  270. package/dist/txs/list-database-exports/list-database-exports.schema.output.json +0 -33
  271. package/dist/txs/query/query.enums.d.ts +0 -30
  272. package/dist/txs/query/query.schema.input.json +0 -31
  273. package/dist/txs/query/query.schema.output.json +0 -15
  274. /package/dist/{txs/export-database/export-database.enums.browser.js → db/wapi-statistic/wapi-statistic.enums.browser.js} +0 -0
  275. /package/dist/{txs/export-database/export-database.enums.js → db/wapi-statistic/wapi-statistic.enums.js} +0 -0
  276. /package/dist/{txs/get-database-export-progress/get-database-export-progress.enums.browser.js → fns/export-balance-history/export-balance-history.enums.browser.js} +0 -0
  277. /package/dist/{txs/get-database-export-progress/get-database-export-progress.enums.js → fns/export-balance-history/export-balance-history.enums.js} +0 -0
  278. /package/dist/{txs/get-database-import-progress/get-database-import-progress.enums.browser.js → fns/export-tokens/export-tokens.enums.browser.js} +0 -0
  279. /package/dist/{txs/get-database-import-progress/get-database-import-progress.enums.js → fns/export-tokens/export-tokens.enums.js} +0 -0
  280. /package/dist/{txs/import-database/import-database.enums.browser.js → fns/export-transfer-groups/export-transfer-groups.enums.browser.js} +0 -0
  281. /package/dist/{txs/import-database/import-database.enums.js → fns/export-transfer-groups/export-transfer-groups.enums.js} +0 -0
  282. /package/dist/{txs/list-database-exports/list-database-exports.enums.browser.js → fns/export-transfers/export-transfers.enums.browser.js} +0 -0
  283. /package/dist/{txs/list-database-exports/list-database-exports.enums.js → fns/export-transfers/export-transfers.enums.js} +0 -0
  284. /package/dist/{txs/query/query.enums.browser.js → fns/export-wallets/export-wallets.enums.browser.js} +0 -0
  285. /package/dist/{txs/query/query.enums.js → fns/export-wallets/export-wallets.enums.js} +0 -0
@@ -1,8 +1,8 @@
1
- var WAPI=(()=>{var cc=Object.create;var Et=Object.defineProperty,mc=Object.defineProperties,hc=Object.getOwnPropertyDescriptor,_c=Object.getOwnPropertyDescriptors,gc=Object.getOwnPropertyNames,Qd=Object.getOwnPropertySymbols,Tc=Object.getPrototypeOf,Yd=Object.prototype.hasOwnProperty,yc=Object.prototype.propertyIsEnumerable;var Kd=(t,e,r)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))Yd.call(e,r)&&Kd(t,r,e[r]);if(Qd)for(var r of Qd(e))yc.call(e,r)&&Kd(t,r,e[r]);return t},P=(t,e)=>mc(t,_c(e));var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bc=(t,e)=>{for(var r in e)Et(t,r,{get:e[r],enumerable:!0})},Xd=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of gc(e))!Yd.call(t,a)&&a!==r&&Et(t,a,{get:()=>e[a],enumerable:!(n=hc(e,a))||n.enumerable});return t};var Fc=(t,e,r)=>(r=t!=null?cc(Tc(t)):{},Xd(e||!t||!t.__esModule?Et(r,"default",{value:t,enumerable:!0}):r,t)),xc=t=>Xd(Et({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>new Promise((n,a)=>{var s=p=>{try{o(r.next(p))}catch(c){a(c)}},i=p=>{try{o(r.throw(p))}catch(c){a(c)}},o=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,i);o((r=r.apply(t,e)).next())});var Bt=I(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var Ut=class{};V._CodeOrName=Ut;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var et=class extends Ut{constructor(e){if(super(),!V.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};V.Name=et;var ye=class extends Ut{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof et&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=ye;V.nil=new ye("");function lf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Mi(r,e[n]),r.push(t[++n]);return new ye(r)}V._=lf;var Pi=new ye("+");function cf(t,...e){let r=[qt(t[0])],n=0;for(;n<e.length;)r.push(Pi),Mi(r,e[n]),r.push(Pi,qt(t[++n]));return Mc(r),new ye(r)}V.str=cf;function Mi(t,e){e instanceof ye?t.push(...e._items):e instanceof et?t.push(e):t.push(Dc(e))}V.addCodeArg=Mi;function Mc(t){let e=1;for(;e<t.length-1;){if(t[e]===Pi){let r=Ec(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Ec(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof et||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof et))return`"${t}${e.slice(1)}`}function Wc(t,e){return e.emptyStr()?t:t.emptyStr()?e:cf`${t}${e}`}V.strConcat=Wc;function Dc(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:qt(Array.isArray(t)?t.join(","):t)}function Ac(t){return new ye(qt(t))}V.stringify=Ac;function qt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=qt;function Nc(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new ye(`.${t}`):lf`[${t}]`}V.getProperty=Nc;function Uc(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new ye(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=Uc;function qc(t){return new ye(t.toString())}V.regexpCode=qc});var Di=I(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.ValueScope=le.ValueScopeName=le.Scope=le.varKinds=le.UsedValueState=void 0;var ue=Bt(),Ei=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Vs;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Vs||(le.UsedValueState=Vs={}));le.varKinds={const:new ue.Name("const"),let:new ue.Name("let"),var:new ue.Name("var")};var Hs=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof ue.Name?e:this.name(e)}name(e){return new ue.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};le.Scope=Hs;var zs=class extends ue.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,ue._)`.${new ue.Name(r)}[${n}]`}};le.ValueScopeName=zs;var Bc=(0,ue._)`\n`,Wi=class extends Hs{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=P(x({},e),{_n:e.lines?Bc:ue.nil})}get(){return this._scope}name(e){return new zs(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[s];if(o){let m=o.get(i);if(m)return m}else o=this._values[s]=new Map;o.set(i,a);let p=this._scope[s]||(this._scope[s]=[]),c=p.length;return p[c]=r.ref,a.setValue(r,{property:s,itemIndex:c}),a}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ue._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},r,n)}_reduceValues(e,r,n={},a){let s=ue.nil;for(let i in e){let o=e[i];if(!o)continue;let p=n[i]=n[i]||new Map;o.forEach(c=>{if(p.has(c))return;p.set(c,Vs.Started);let m=r(c);if(m){let h=this.opts.es5?le.varKinds.var:le.varKinds.const;s=(0,ue._)`${s}${h} ${c} = ${m};${this.opts._n}`}else if(m=a==null?void 0:a(c))s=(0,ue._)`${s}${m}${this.opts._n}`;else throw new Ei(c);p.set(c,Vs.Completed)})}return s}};le.ValueScope=Wi});var W=I(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.or=M.and=M.not=M.CodeGen=M.operators=M.varKinds=M.ValueScopeName=M.ValueScope=M.Scope=M.Name=M.regexpCode=M.stringify=M.getProperty=M.nil=M.strConcat=M.str=M._=void 0;var q=Bt(),$e=Di(),Be=Bt();Object.defineProperty(M,"_",{enumerable:!0,get:function(){return Be._}});Object.defineProperty(M,"str",{enumerable:!0,get:function(){return Be.str}});Object.defineProperty(M,"strConcat",{enumerable:!0,get:function(){return Be.strConcat}});Object.defineProperty(M,"nil",{enumerable:!0,get:function(){return Be.nil}});Object.defineProperty(M,"getProperty",{enumerable:!0,get:function(){return Be.getProperty}});Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return Be.stringify}});Object.defineProperty(M,"regexpCode",{enumerable:!0,get:function(){return Be.regexpCode}});Object.defineProperty(M,"Name",{enumerable:!0,get:function(){return Be.Name}});var Ys=Di();Object.defineProperty(M,"Scope",{enumerable:!0,get:function(){return Ys.Scope}});Object.defineProperty(M,"ValueScope",{enumerable:!0,get:function(){return Ys.ValueScope}});Object.defineProperty(M,"ValueScopeName",{enumerable:!0,get:function(){return Ys.ValueScopeName}});Object.defineProperty(M,"varKinds",{enumerable:!0,get:function(){return Ys.varKinds}});M.operators={GT:new q._Code(">"),GTE:new q._Code(">="),LT:new q._Code("<"),LTE:new q._Code("<="),EQ:new q._Code("==="),NEQ:new q._Code("!=="),NOT:new q._Code("!"),OR:new q._Code("||"),AND:new q._Code("&&"),ADD:new q._Code("+")};var De=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Ai=class extends De{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?$e.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=ht(this.rhs,e,r)),this}get names(){return this.rhs instanceof q._CodeOrName?this.rhs.names:{}}},Js=class extends De{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ht(this.rhs,e,r),this}get names(){let e=this.lhs instanceof q.Name?{}:x({},this.lhs.names);return Ks(e,this.rhs)}},Ni=class extends Js{constructor(e,r,n,a){super(e,n,a),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ui=class extends De{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},qi=class extends De{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Bi=class extends De{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Li=class extends De{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=ht(this.code,e,r),this}get names(){return this.code instanceof q._CodeOrName?this.code.names:{}}},Lt=class extends De{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,r)||(Lc(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>nt(e,r.names),{})}},Ae=class extends Lt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Vi=class extends Lt{},mt=class extends Ae{};mt.kind="else";var tt=class t extends Ae{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new mt(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(mf(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=ht(this.condition,e,r),this}get names(){let e=super.names;return Ks(e,this.condition),this.else&&nt(e,this.else.names),e}};tt.kind="if";var rt=class extends Ae{};rt.kind="for";var Hi=class extends rt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=ht(this.iteration,e,r),this}get names(){return nt(super.names,this.iteration.names)}},zi=class extends rt{constructor(e,r,n,a){super(),this.varKind=e,this.name=r,this.from=n,this.to=a}render(e){let r=e.es5?$e.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${r} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Ks(super.names,this.from);return Ks(e,this.to)}},Qs=class extends rt{constructor(e,r,n,a){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=ht(this.iterable,e,r),this}get names(){return nt(super.names,this.iterable.names)}},Vt=class extends Ae{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Vt.kind="func";var Ht=class extends Lt{render(e){return"return "+super.render(e)}};Ht.kind="return";var Ji=class extends Ae{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,a;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(a=this.finally)===null||a===void 0||a.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&nt(e,this.catch.names),this.finally&&nt(e,this.finally.names),e}},zt=class extends Ae{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};zt.kind="catch";var Jt=class extends Ae{render(e){return"finally"+super.render(e)}};Jt.kind="finally";var Qi=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=P(x({},r),{_n:r.lines?`
2
- `:""}),this._extScope=e,this._scope=new $e.Scope({parent:e}),this._nodes=[new Vi]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,a){let s=this._scope.toName(r);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Ai(e,s,n)),s}const(e,r,n){return this._def($e.varKinds.const,e,r,n)}let(e,r,n){return this._def($e.varKinds.let,e,r,n)}var(e,r,n){return this._def($e.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Js(e,r,n))}add(e,r){return this._leafNode(new Ni(e,M.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==q.nil&&this._leafNode(new Li(e)),this}object(...e){let r=["{"];for(let[n,a]of e)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,q.addCodeArg)(r,a));return r.push("}"),new q._Code(r)}if(e,r,n){if(this._blockNode(new tt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new tt(e))}else(){return this._elseNode(new mt)}endIf(){return this._endBlockNode(tt,mt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Hi(e),r)}forRange(e,r,n,a,s=this.opts.es5?$e.varKinds.var:$e.varKinds.let){let i=this._scope.toName(e);return this._for(new zi(s,i,r,n),()=>a(i))}forOf(e,r,n,a=$e.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof q.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,q._)`${i}.length`,o=>{this.var(s,(0,q._)`${i}[${o}]`),n(s)})}return this._for(new Qs("of",a,s,r),()=>n(s))}forIn(e,r,n,a=this.opts.es5?$e.varKinds.var:$e.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,q._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new Qs("in",a,s,r),()=>n(s))}endFor(){return this._endBlockNode(rt)}label(e){return this._leafNode(new Ui(e))}break(e){return this._leafNode(new qi(e))}return(e){let r=new Ht;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ht)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Ji;if(this._blockNode(a),this.code(e),r){let s=this.name("e");this._currNode=a.catch=new zt(s),r(s)}return n&&(this._currNode=a.finally=new Jt,this.code(n)),this._endBlockNode(zt,Jt)}throw(e){return this._leafNode(new Bi(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=q.nil,n,a){return this._blockNode(new Vt(e,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Vt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof tt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};M.CodeGen=Qi;function nt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Ks(t,e){return e instanceof q._CodeOrName?nt(t,e.names):t}function ht(t,e,r){if(t instanceof q.Name)return n(t);if(!a(t))return t;return new q._Code(t._items.reduce((s,i)=>(i instanceof q.Name&&(i=n(i)),i instanceof q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof q._Code&&s._items.some(i=>i instanceof q.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function Lc(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function mf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,q._)`!${Ki(t)}`}M.not=mf;var Vc=hf(M.operators.AND);function Hc(...t){return t.reduce(Vc)}M.and=Hc;var zc=hf(M.operators.OR);function Jc(...t){return t.reduce(zc)}M.or=Jc;function hf(t){return(e,r)=>e===q.nil?r:r===q.nil?e:(0,q._)`${Ki(e)} ${t} ${Ki(r)}`}function Ki(t){return t instanceof q.Name?t:(0,q._)`(${t})`}});var H=I(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.checkStrictMode=D.getErrorPath=D.Type=D.useFunc=D.setEvaluated=D.evaluatedPropsToName=D.mergeEvaluated=D.eachItem=D.unescapeJsonPointer=D.escapeJsonPointer=D.escapeFragment=D.unescapeFragment=D.schemaRefOrVal=D.schemaHasRulesButRef=D.schemaHasRules=D.checkUnknownRules=D.alwaysValidSchema=D.toHash=void 0;var Q=W(),Qc=Bt();function Kc(t){let e={};for(let r of t)e[r]=!0;return e}D.toHash=Kc;function Yc(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Tf(t,e),!yf(e,t.self.RULES.all))}D.alwaysValidSchema=Yc;function Tf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||xf(t,`unknown keyword: "${s}"`)}D.checkUnknownRules=Tf;function yf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}D.schemaHasRules=yf;function Xc(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}D.schemaHasRulesButRef=Xc;function Zc({topSchemaRef:t,schemaPath:e},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Q._)`${r}`}return(0,Q._)`${t}${e}${(0,Q.getProperty)(n)}`}D.schemaRefOrVal=Zc;function em(t){return bf(decodeURIComponent(t))}D.unescapeFragment=em;function tm(t){return encodeURIComponent(Xi(t))}D.escapeFragment=tm;function Xi(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}D.escapeJsonPointer=Xi;function bf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}D.unescapeJsonPointer=bf;function rm(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}D.eachItem=rm;function _f({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(a,s,i,o)=>{let p=i===void 0?s:i instanceof Q.Name?(s instanceof Q.Name?t(a,s,i):e(a,s,i),i):s instanceof Q.Name?(e(a,i,s),s):r(s,i);return o===Q.Name&&!(p instanceof Q.Name)?n(a,p):p}}D.mergeEvaluated={props:_f({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Q._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Q._)`${r} || {}`).code((0,Q._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Q._)`${r} || {}`),Zi(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:x(x({},t),e),resultToName:Ff}),items:_f({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Q._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Q._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Ff(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Q._)`{}`);return e!==void 0&&Zi(t,r,e),r}D.evaluatedPropsToName=Ff;function Zi(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Q._)`${e}${(0,Q.getProperty)(n)}`,!0))}D.setEvaluated=Zi;var gf={};function nm(t,e){return t.scopeValue("func",{ref:e,code:gf[e.code]||(gf[e.code]=new Qc._Code(e.code))})}D.useFunc=nm;var Yi;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Yi||(D.Type=Yi={}));function am(t,e,r){if(t instanceof Q.Name){let n=e===Yi.Num;return r?n?(0,Q._)`"[" + ${t} + "]"`:(0,Q._)`"['" + ${t} + "']"`:n?(0,Q._)`"/" + ${t}`:(0,Q._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Q.getProperty)(t).toString():"/"+Xi(t)}D.getErrorPath=am;function xf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}D.checkStrictMode=xf});var Ne=I(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var se=W(),sm={data:new se.Name("data"),valCxt:new se.Name("valCxt"),instancePath:new se.Name("instancePath"),parentData:new se.Name("parentData"),parentDataProperty:new se.Name("parentDataProperty"),rootData:new se.Name("rootData"),dynamicAnchors:new se.Name("dynamicAnchors"),vErrors:new se.Name("vErrors"),errors:new se.Name("errors"),this:new se.Name("this"),self:new se.Name("self"),scope:new se.Name("scope"),json:new se.Name("json"),jsonPos:new se.Name("jsonPos"),jsonLen:new se.Name("jsonLen"),jsonPart:new se.Name("jsonPart")};eo.default=sm});var Qt=I(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.extendErrors=ie.resetErrorsCount=ie.reportExtraError=ie.reportError=ie.keyword$DataError=ie.keywordError=void 0;var L=W(),Xs=H(),de=Ne();ie.keywordError={message:({keyword:t})=>(0,L.str)`must pass "${t}" keyword validation`};ie.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,L.str)`"${t}" keyword must be ${e} ($data)`:(0,L.str)`"${t}" keyword is invalid ($data)`};function im(t,e=ie.keywordError,r,n){let{it:a}=t,{gen:s,compositeRule:i,allErrors:o}=a,p=wf(t,e,r);(n!=null?n:i||o)?Of(s,p):$f(a,(0,L._)`[${p}]`)}ie.reportError=im;function om(t,e=ie.keywordError,r){let{it:n}=t,{gen:a,compositeRule:s,allErrors:i}=n,o=wf(t,e,r);Of(a,o),s||i||$f(n,de.default.vErrors)}ie.reportExtraError=om;function pm(t,e){t.assign(de.default.errors,e),t.if((0,L._)`${de.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,L._)`${de.default.vErrors}.length`,e),()=>t.assign(de.default.vErrors,null)))}ie.resetErrorsCount=pm;function dm({gen:t,keyword:e,schemaValue:r,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",a,de.default.errors,o=>{t.const(i,(0,L._)`${de.default.vErrors}[${o}]`),t.if((0,L._)`${i}.instancePath === undefined`,()=>t.assign((0,L._)`${i}.instancePath`,(0,L.strConcat)(de.default.instancePath,s.errorPath))),t.assign((0,L._)`${i}.schemaPath`,(0,L.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,L._)`${i}.schema`,r),t.assign((0,L._)`${i}.data`,n))})}ie.extendErrors=dm;function Of(t,e){let r=t.const("err",e);t.if((0,L._)`${de.default.vErrors} === null`,()=>t.assign(de.default.vErrors,(0,L._)`[${r}]`),(0,L._)`${de.default.vErrors}.push(${r})`),t.code((0,L._)`${de.default.errors}++`)}function $f(t,e){let{gen:r,validateName:n,schemaEnv:a}=t;a.$async?r.throw((0,L._)`new ${t.ValidationError}(${e})`):(r.assign((0,L._)`${n}.errors`,e),r.return(!1))}var at={keyword:new L.Name("keyword"),schemaPath:new L.Name("schemaPath"),params:new L.Name("params"),propertyName:new L.Name("propertyName"),message:new L.Name("message"),schema:new L.Name("schema"),parentSchema:new L.Name("parentSchema")};function wf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,L._)`{}`:fm(t,e,r)}function fm(t,e,r={}){let{gen:n,it:a}=t,s=[um(a,r),lm(t,r)];return cm(t,e,s),n.object(...s)}function um({errorPath:t},{instancePath:e}){let r=e?(0,L.str)`${t}${(0,Xs.getErrorPath)(e,Xs.Type.Str)}`:t;return[de.default.instancePath,(0,L.strConcat)(de.default.instancePath,r)]}function lm({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let a=n?e:(0,L.str)`${e}/${t}`;return r&&(a=(0,L.str)`${a}${(0,Xs.getErrorPath)(r,Xs.Type.Str)}`),[at.schemaPath,a]}function cm(t,{params:e,message:r},n){let{keyword:a,data:s,schemaValue:i,it:o}=t,{opts:p,propertyName:c,topSchemaRef:m,schemaPath:h}=o;n.push([at.keyword,a],[at.params,typeof e=="function"?e(t):e||(0,L._)`{}`]),p.messages&&n.push([at.message,typeof r=="function"?r(t):r]),p.verbose&&n.push([at.schema,i],[at.parentSchema,(0,L._)`${m}${h}`],[de.default.data,s]),c&&n.push([at.propertyName,c])}});var jf=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.boolOrEmptySchema=_t.topBoolOrEmptySchema=void 0;var mm=Qt(),hm=W(),_m=Ne(),gm={message:"boolean schema is false"};function Tm(t){let{gen:e,schema:r,validateName:n}=t;r===!1?If(t,!1):typeof r=="object"&&r.$async===!0?e.return(_m.default.data):(e.assign((0,hm._)`${n}.errors`,null),e.return(!0))}_t.topBoolOrEmptySchema=Tm;function ym(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),If(t)):r.var(e,!0)}_t.boolOrEmptySchema=ym;function If(t,e){let{gen:r,data:n}=t,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,mm.reportError)(a,gm,void 0,e)}});var to=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.getRules=gt.isJSONType=void 0;var bm=["string","number","integer","boolean","null","object","array"],Fm=new Set(bm);function xm(t){return typeof t=="string"&&Fm.has(t)}gt.isJSONType=xm;function Om(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:P(x({},t),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}gt.getRules=Om});var ro=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.shouldUseRule=Le.shouldUseGroup=Le.schemaHasRulesForType=void 0;function $m({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&kf(t,n)}Le.schemaHasRulesForType=$m;function kf(t,e){return e.rules.some(r=>vf(t,r))}Le.shouldUseGroup=kf;function vf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Le.shouldUseRule=vf});var Kt=I(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.reportTypeError=oe.checkDataTypes=oe.checkDataType=oe.coerceAndCheckDataType=oe.getJSONTypes=oe.getSchemaTypes=oe.DataType=void 0;var wm=to(),Im=ro(),jm=Qt(),R=W(),Sf=H(),Tt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Tt||(oe.DataType=Tt={}));function km(t){let e=Cf(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}oe.getSchemaTypes=km;function Cf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(wm.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}oe.getJSONTypes=Cf;function vm(t,e){let{gen:r,data:n,opts:a}=t,s=Sm(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Im.schemaHasRulesForType)(t,e[0]));if(i){let o=ao(e,n,a.strictNumbers,Tt.Wrong);r.if(o,()=>{s.length?Cm(t,e,s):so(t)})}return i}oe.coerceAndCheckDataType=vm;var Gf=new Set(["string","number","integer","boolean","null"]);function Sm(t,e){return e?t.filter(r=>Gf.has(r)||e==="array"&&r==="array"):[]}function Cm(t,e,r){let{gen:n,data:a,opts:s}=t,i=n.let("dataType",(0,R._)`typeof ${a}`),o=n.let("coerced",(0,R._)`undefined`);s.coerceTypes==="array"&&n.if((0,R._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,R._)`${a}[0]`).assign(i,(0,R._)`typeof ${a}`).if(ao(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,R._)`${o} !== undefined`);for(let c of r)(Gf.has(c)||c==="array"&&s.coerceTypes==="array")&&p(c);n.else(),so(t),n.endIf(),n.if((0,R._)`${o} !== undefined`,()=>{n.assign(a,o),Gm(t,o)});function p(c){switch(c){case"string":n.elseIf((0,R._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,R._)`"" + ${a}`).elseIf((0,R._)`${a} === null`).assign(o,(0,R._)`""`);return;case"number":n.elseIf((0,R._)`${i} == "boolean" || ${a} === null
3
- || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,R._)`+${a}`);return;case"integer":n.elseIf((0,R._)`${i} === "boolean" || ${a} === null
4
- || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,R._)`+${a}`);return;case"boolean":n.elseIf((0,R._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,R._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,R._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,R._)`${i} === "string" || ${i} === "number"
5
- || ${i} === "boolean" || ${a} === null`).assign(o,(0,R._)`[${a}]`)}}}function Gm({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,R._)`${e} !== undefined`,()=>t.assign((0,R._)`${e}[${r}]`,n))}function no(t,e,r,n=Tt.Correct){let a=n===Tt.Correct?R.operators.EQ:R.operators.NEQ,s;switch(t){case"null":return(0,R._)`${e} ${a} null`;case"array":s=(0,R._)`Array.isArray(${e})`;break;case"object":s=(0,R._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,R._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,R._)`typeof ${e} ${a} ${t}`}return n===Tt.Correct?s:(0,R.not)(s);function i(o=R.nil){return(0,R.and)((0,R._)`typeof ${e} == "number"`,o,r?(0,R._)`isFinite(${e})`:R.nil)}}oe.checkDataType=no;function ao(t,e,r,n){if(t.length===1)return no(t[0],e,r,n);let a,s=(0,Sf.toHash)(t);if(s.array&&s.object){let i=(0,R._)`typeof ${e} != "object"`;a=s.null?i:(0,R._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=R.nil;s.number&&delete s.integer;for(let i in s)a=(0,R.and)(a,no(i,e,r,n));return a}oe.checkDataTypes=ao;var Rm={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,R._)`{type: ${t}}`:(0,R._)`{type: ${e}}`};function so(t){let e=Pm(t);(0,jm.reportError)(e,Rm)}oe.reportTypeError=so;function Pm(t){let{gen:e,data:r,schema:n}=t,a=(0,Sf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:t}}});var Pf=I(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.assignDefaults=void 0;var yt=W(),Mm=H();function Em(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let a in r)Rf(t,a,r[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Rf(t,s,a.default))}Zs.assignDefaults=Em;function Rf(t,e,r){let{gen:n,compositeRule:a,data:s,opts:i}=t;if(r===void 0)return;let o=(0,yt._)`${s}${(0,yt.getProperty)(e)}`;if(a){(0,Mm.checkStrictMode)(t,`default is ignored for: ${o}`);return}let p=(0,yt._)`${o} === undefined`;i.useDefaults==="empty"&&(p=(0,yt._)`${p} || ${o} === null || ${o} === ""`),n.if(p,(0,yt._)`${o} = ${(0,yt.stringify)(r)}`)}});var be=I(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.validateUnion=z.validateArray=z.usePattern=z.callValidateCode=z.schemaProperties=z.allSchemaProperties=z.noPropertyInData=z.propertyInData=z.isOwnProperty=z.hasPropFunc=z.reportMissingProp=z.checkMissingProp=z.checkReportMissingProp=void 0;var Y=W(),io=H(),Ve=Ne(),Wm=H();function Dm(t,e){let{gen:r,data:n,it:a}=t;r.if(po(r,n,e,a.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Y._)`${e}`},!0),t.error()})}z.checkReportMissingProp=Dm;function Am({gen:t,data:e,it:{opts:r}},n,a){return(0,Y.or)(...n.map(s=>(0,Y.and)(po(t,e,s,r.ownProperties),(0,Y._)`${a} = ${s}`)))}z.checkMissingProp=Am;function Nm(t,e){t.setParams({missingProperty:e},!0),t.error()}z.reportMissingProp=Nm;function Mf(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Y._)`Object.prototype.hasOwnProperty`})}z.hasPropFunc=Mf;function oo(t,e,r){return(0,Y._)`${Mf(t)}.call(${e}, ${r})`}z.isOwnProperty=oo;function Um(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} !== undefined`;return n?(0,Y._)`${a} && ${oo(t,e,r)}`:a}z.propertyInData=Um;function po(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} === undefined`;return n?(0,Y.or)(a,(0,Y.not)(oo(t,e,r))):a}z.noPropertyInData=po;function Ef(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}z.allSchemaProperties=Ef;function qm(t,e){return Ef(e).filter(r=>!(0,io.alwaysValidSchema)(t,e[r]))}z.schemaProperties=qm;function Bm({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,p,c){let m=c?(0,Y._)`${t}, ${e}, ${n}${a}`:e,h=[[Ve.default.instancePath,(0,Y.strConcat)(Ve.default.instancePath,s)],[Ve.default.parentData,i.parentData],[Ve.default.parentDataProperty,i.parentDataProperty],[Ve.default.rootData,Ve.default.rootData]];i.opts.dynamicRef&&h.push([Ve.default.dynamicAnchors,Ve.default.dynamicAnchors]);let y=(0,Y._)`${m}, ${r.object(...h)}`;return p!==Y.nil?(0,Y._)`${o}.call(${p}, ${y})`:(0,Y._)`${o}(${y})`}z.callValidateCode=Bm;var Lm=(0,Y._)`new RegExp`;function Vm({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Y._)`${a.code==="new RegExp"?Lm:(0,Wm.useFunc)(t,a)}(${r}, ${n})`})}z.usePattern=Vm;function Hm(t){let{gen:e,data:r,keyword:n,it:a}=t,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let p=e.const("len",(0,Y._)`${r}.length`);e.forRange("i",0,p,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:io.Type.Num},s),e.if((0,Y.not)(s),o)})}}z.validateArray=Hm;function zm(t){let{gen:e,schema:r,keyword:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,io.alwaysValidSchema)(a,p))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((p,c)=>{let m=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},o);e.assign(i,(0,Y._)`${i} || ${o}`),t.mergeValidEvaluated(m,o)||e.if((0,Y.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}z.validateUnion=zm});var Af=I(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.validateKeywordUsage=Ce.validSchemaType=Ce.funcKeywordCode=Ce.macroKeywordCode=void 0;var fe=W(),st=Ne(),Jm=be(),Qm=Qt();function Km(t,e){let{gen:r,keyword:n,schema:a,parentSchema:s,it:i}=t,o=e.macro.call(i.self,a,s,i),p=Df(r,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let c=r.name("valid");t.subschema({schema:o,schemaPath:fe.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:p,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Ce.macroKeywordCode=Km;function Ym(t,e){var r;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:p}=t;Zm(p,e);let c=!o&&e.compile?e.compile.call(p.self,s,i,p):e.validate,m=Df(n,a,c),h=n.let("valid");t.block$data(h,y),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function y(){if(e.errors===!1)T(),e.modifying&&Wf(t),F(()=>t.error());else{let O=e.async?b():g();e.modifying&&Wf(t),F(()=>Xm(t,O))}}function b(){let O=n.let("ruleErrs",null);return n.try(()=>T((0,fe._)`await `),B=>n.assign(h,!1).if((0,fe._)`${B} instanceof ${p.ValidationError}`,()=>n.assign(O,(0,fe._)`${B}.errors`),()=>n.throw(B))),O}function g(){let O=(0,fe._)`${m}.errors`;return n.assign(O,null),T(fe.nil),O}function T(O=e.async?(0,fe._)`await `:fe.nil){let B=p.opts.passContext?st.default.this:st.default.self,A=!("compile"in e&&!o||e.schema===!1);n.assign(h,(0,fe._)`${O}${(0,Jm.callValidateCode)(t,m,B,A)}`,e.modifying)}function F(O){var B;n.if((0,fe.not)((B=e.valid)!==null&&B!==void 0?B:h),O)}}Ce.funcKeywordCode=Ym;function Wf(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,fe._)`${n.parentData}[${n.parentDataProperty}]`))}function Xm(t,e){let{gen:r}=t;r.if((0,fe._)`Array.isArray(${e})`,()=>{r.assign(st.default.vErrors,(0,fe._)`${st.default.vErrors} === null ? ${e} : ${st.default.vErrors}.concat(${e})`).assign(st.default.errors,(0,fe._)`${st.default.vErrors}.length`),(0,Qm.extendErrors)(t)},()=>t.error())}function Zm({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Df(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,fe.stringify)(r)})}function eh(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t=="undefined")}Ce.validSchemaType=eh;function th({schema:t,opts:e,self:r,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(t[s])){let p=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}Ce.validateKeywordUsage=th});var Uf=I(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.extendSubschemaMode=He.extendSubschemaData=He.getSubschema=void 0;var Ge=W(),Nf=H();function rh(t,{keyword:e,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,Ge._)`${t.schemaPath}${(0,Ge.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,Ge._)`${t.schemaPath}${(0,Ge.getProperty)(e)}${(0,Ge.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Nf.escapeFragment)(r)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}He.getSubschema=rh;function nh(t,e,{dataProp:r,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(r!==void 0){let{errorPath:c,dataPathArr:m,opts:h}=e,y=o.let("data",(0,Ge._)`${e.data}${(0,Ge.getProperty)(r)}`,!0);p(y),t.errorPath=(0,Ge.str)`${c}${(0,Nf.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,Ge._)`${r}`,t.dataPathArr=[...m,t.parentDataProperty]}if(a!==void 0){let c=a instanceof Ge.Name?a:o.let("data",a,!0);p(c),i!==void 0&&(t.propertyName=i)}s&&(t.dataTypes=s);function p(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}He.extendSubschemaData=nh;function ah(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(t.compositeRule=n),a!==void 0&&(t.createErrors=a),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}He.extendSubschemaMode=ah});var fo=I((ww,qf)=>{"use strict";qf.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var Lf=I((Iw,Bf)=>{"use strict";var ze=Bf.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};ei(e,n,a,t,"",t)};ze.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ze.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ze.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ze.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ei(t,e,r,n,a,s,i,o,p,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,p,c);for(var m in n){var h=n[m];if(Array.isArray(h)){if(m in ze.arrayKeywords)for(var y=0;y<h.length;y++)ei(t,e,r,h[y],a+"/"+m+"/"+y,s,a,m,n,y)}else if(m in ze.propsKeywords){if(h&&typeof h=="object")for(var b in h)ei(t,e,r,h[b],a+"/"+m+"/"+sh(b),s,a,m,n,b)}else(m in ze.keywords||t.allKeys&&!(m in ze.skipKeywords))&&ei(t,e,r,h,a+"/"+m,s,a,m,n)}r(n,a,s,i,o,p,c)}}function sh(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Yt=I(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.getSchemaRefs=ce.resolveUrl=ce.normalizeId=ce._getFullPath=ce.getFullPath=ce.inlineRef=void 0;var ih=H(),oh=fo(),ph=Lf(),dh=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function fh(t,e=!0){return typeof t=="boolean"?!0:e===!0?!uo(t):e?Vf(t)<=e:!1}ce.inlineRef=fh;var uh=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function uo(t){for(let e in t){if(uh.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(uo)||typeof r=="object"&&uo(r))return!0}return!1}function Vf(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!dh.has(r)&&(typeof t[r]=="object"&&(0,ih.eachItem)(t[r],n=>e+=Vf(n)),e===1/0))return 1/0}return e}function Hf(t,e="",r){r!==!1&&(e=bt(e));let n=t.parse(e);return zf(t,n)}ce.getFullPath=Hf;function zf(t,e){return t.serialize(e).split("#")[0]+"#"}ce._getFullPath=zf;var lh=/#\/?$/;function bt(t){return t?t.replace(lh,""):""}ce.normalizeId=bt;function ch(t,e,r){return r=bt(r),t.resolve(e,r)}ce.resolveUrl=ch;var mh=/^[a-z_][-a-z0-9._]*$/i;function hh(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,a=bt(t[r]||e),s={"":a},i=Hf(n,a,!1),o={},p=new Set;return ph(t,{allKeys:!0},(h,y,b,g)=>{if(g===void 0)return;let T=i+y,F=s[g];typeof h[r]=="string"&&(F=O.call(this,h[r])),B.call(this,h.$anchor),B.call(this,h.$dynamicAnchor),s[y]=F;function O(A){let K=this.opts.uriResolver.resolve;if(A=bt(F?K(F,A):A),p.has(A))throw m(A);p.add(A);let C=this.refs[A];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?c(h,C.schema,A):A!==bt(T)&&(A[0]==="#"?(c(h,o[A],A),o[A]=h):this.refs[A]=T),A}function B(A){if(typeof A=="string"){if(!mh.test(A))throw new Error(`invalid anchor "${A}"`);O.call(this,`#${A}`)}}}),o;function c(h,y,b){if(y!==void 0&&!oh(h,y))throw m(b)}function m(h){return new Error(`reference "${h}" resolves to more than one schema`)}}ce.getSchemaRefs=hh});var er=I(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.getData=Je.KeywordCxt=Je.validateFunctionCode=void 0;var Xf=jf(),Jf=Kt(),co=ro(),ti=Kt(),_h=Pf(),Zt=Af(),lo=Uf(),j=W(),S=Ne(),gh=Yt(),Ue=H(),Xt=Qt();function Th(t){if(tu(t)&&(ru(t),eu(t))){Fh(t);return}Zf(t,()=>(0,Xf.topBoolOrEmptySchema)(t))}Je.validateFunctionCode=Th;function Zf({gen:t,validateName:e,schema:r,schemaEnv:n,opts:a},s){a.code.es5?t.func(e,(0,j._)`${S.default.data}, ${S.default.valCxt}`,n.$async,()=>{t.code((0,j._)`"use strict"; ${Qf(r,a)}`),bh(t,a),t.code(s)}):t.func(e,(0,j._)`${S.default.data}, ${yh(a)}`,n.$async,()=>t.code(Qf(r,a)).code(s))}function yh(t){return(0,j._)`{${S.default.instancePath}="", ${S.default.parentData}, ${S.default.parentDataProperty}, ${S.default.rootData}=${S.default.data}${t.dynamicRef?(0,j._)`, ${S.default.dynamicAnchors}={}`:j.nil}}={}`}function bh(t,e){t.if(S.default.valCxt,()=>{t.var(S.default.instancePath,(0,j._)`${S.default.valCxt}.${S.default.instancePath}`),t.var(S.default.parentData,(0,j._)`${S.default.valCxt}.${S.default.parentData}`),t.var(S.default.parentDataProperty,(0,j._)`${S.default.valCxt}.${S.default.parentDataProperty}`),t.var(S.default.rootData,(0,j._)`${S.default.valCxt}.${S.default.rootData}`),e.dynamicRef&&t.var(S.default.dynamicAnchors,(0,j._)`${S.default.valCxt}.${S.default.dynamicAnchors}`)},()=>{t.var(S.default.instancePath,(0,j._)`""`),t.var(S.default.parentData,(0,j._)`undefined`),t.var(S.default.parentDataProperty,(0,j._)`undefined`),t.var(S.default.rootData,S.default.data),e.dynamicRef&&t.var(S.default.dynamicAnchors,(0,j._)`{}`)})}function Fh(t){let{schema:e,opts:r,gen:n}=t;Zf(t,()=>{r.$comment&&e.$comment&&au(t),Ih(t),n.let(S.default.vErrors,null),n.let(S.default.errors,0),r.unevaluated&&xh(t),nu(t),vh(t)})}function xh(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,j._)`${r}.evaluated`),e.if((0,j._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,j._)`${t.evaluated}.props`,(0,j._)`undefined`)),e.if((0,j._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,j._)`${t.evaluated}.items`,(0,j._)`undefined`))}function Qf(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,j._)`/*# sourceURL=${r} */`:j.nil}function Oh(t,e){if(tu(t)&&(ru(t),eu(t))){$h(t,e);return}(0,Xf.boolOrEmptySchema)(t,e)}function eu({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function tu(t){return typeof t.schema!="boolean"}function $h(t,e){let{schema:r,gen:n,opts:a}=t;a.$comment&&r.$comment&&au(t),jh(t),kh(t);let s=n.const("_errs",S.default.errors);nu(t,s),n.var(e,(0,j._)`${s} === ${S.default.errors}`)}function ru(t){(0,Ue.checkUnknownRules)(t),wh(t)}function nu(t,e){if(t.opts.jtd)return Kf(t,[],!1,e);let r=(0,Jf.getSchemaTypes)(t.schema),n=(0,Jf.coerceAndCheckDataType)(t,r);Kf(t,r,!n,e)}function wh(t){let{schema:e,errSchemaPath:r,opts:n,self:a}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ue.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ih(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ue.checkStrictMode)(t,"default is ignored in the schema root")}function jh(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,gh.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function kh(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function au({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:a}){let s=r.$comment;if(a.$comment===!0)t.code((0,j._)`${S.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,j.str)`${n}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,j._)`${S.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function vh(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=t;r.$async?e.if((0,j._)`${S.default.errors} === 0`,()=>e.return(S.default.data),()=>e.throw((0,j._)`new ${a}(${S.default.vErrors})`)):(e.assign((0,j._)`${n}.errors`,S.default.vErrors),s.unevaluated&&Sh(t),e.return((0,j._)`${S.default.errors} === 0`))}function Sh({gen:t,evaluated:e,props:r,items:n}){r instanceof j.Name&&t.assign((0,j._)`${e}.props`,r),n instanceof j.Name&&t.assign((0,j._)`${e}.items`,n)}function Kf(t,e,r,n){let{gen:a,schema:s,data:i,allErrors:o,opts:p,self:c}=t,{RULES:m}=c;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,Ue.schemaHasRulesButRef)(s,m))){a.block(()=>iu(t,"$ref",m.all.$ref.definition));return}p.jtd||Ch(t,e),a.block(()=>{for(let y of m.rules)h(y);h(m.post)});function h(y){(0,co.shouldUseGroup)(s,y)&&(y.type?(a.if((0,ti.checkDataType)(y.type,i,p.strictNumbers)),Yf(t,y),e.length===1&&e[0]===y.type&&r&&(a.else(),(0,ti.reportTypeError)(t)),a.endIf()):Yf(t,y),o||a.if((0,j._)`${S.default.errors} === ${n||0}`))}}function Yf(t,e){let{gen:r,schema:n,opts:{useDefaults:a}}=t;a&&(0,_h.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,co.shouldUseRule)(n,s)&&iu(t,s.keyword,s.definition,e.type)})}function Ch(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Gh(t,e),t.opts.allowUnionTypes||Rh(t,e),Ph(t,t.dataTypes))}function Gh(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{su(t.dataTypes,r)||mo(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Eh(t,e)}}function Rh(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&mo(t,"use allowUnionTypes to allow union type keyword")}function Ph(t,e){let r=t.self.RULES.all;for(let n in r){let a=r[n];if(typeof a=="object"&&(0,co.shouldUseRule)(t.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>Mh(e,i))&&mo(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function Mh(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function su(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Eh(t,e){let r=[];for(let n of t.dataTypes)su(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function mo(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ue.checkStrictMode)(t,e,t.opts.strictTypes)}var ri=class{constructor(e,r,n){if((0,Zt.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ue.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",ou(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Zt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",S.default.errors))}result(e,r,n){this.failResult((0,j.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,j.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,j._)`${r} !== undefined && (${(0,j.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Xt.reportExtraError:Xt.reportError)(this,this.def.error,r)}$dataError(){(0,Xt.reportError)(this,this.def.$dataError||Xt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=j.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=j.nil,r=j.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,j.or)((0,j._)`${a} === undefined`,r)),e!==j.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==j.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:a,it:s}=this;return(0,j.or)(i(),o());function i(){if(n.length){if(!(r instanceof j.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,j._)`${(0,ti.checkDataTypes)(p,r,s.opts.strictNumbers,ti.DataType.Wrong)}`}return j.nil}function o(){if(a.validateSchema){let p=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,j._)`!${p}(${r})`}return j.nil}}subschema(e,r){let n=(0,lo.getSubschema)(this.it,e);(0,lo.extendSubschemaData)(n,this.it,e),(0,lo.extendSubschemaMode)(n,e);let a=P(x(x({},this.it),n),{items:void 0,props:void 0});return Oh(a,r),a}mergeEvaluated(e,r){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ue.mergeEvaluated.props(a,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ue.mergeEvaluated.items(a,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(e,j.Name)),!0}};Je.KeywordCxt=ri;function iu(t,e,r,n){let a=new ri(t,r,e);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Zt.funcKeywordCode)(a,r):"macro"in r?(0,Zt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Zt.funcKeywordCode)(a,r)}var Wh=/^\/(?:[^~]|~0|~1)*$/,Dh=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ou(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let a,s;if(t==="")return S.default.rootData;if(t[0]==="/"){if(!Wh.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t,s=S.default.rootData}else{let c=Dh.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let m=+c[1];if(a=c[2],a==="#"){if(m>=e)throw new Error(p("property/index",m));return n[e-m]}if(m>e)throw new Error(p("data",m));if(s=r[e-m],!a)return s}let i=s,o=a.split("/");for(let c of o)c&&(s=(0,j._)`${s}${(0,j.getProperty)((0,Ue.unescapeJsonPointer)(c))}`,i=(0,j._)`${i} && ${s}`);return i;function p(c,m){return`Cannot access ${c} ${m} levels up, current level is ${e}`}}Je.getData=ou});var ni=I(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var ho=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};_o.default=ho});var tr=I(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var go=Yt(),To=class extends Error{constructor(e,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,go.resolveUrl)(e,r,n),this.missingSchema=(0,go.normalizeId)((0,go.getFullPath)(e,this.missingRef))}};yo.default=To});var si=I(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.resolveSchema=Fe.getCompilingSchema=Fe.resolveRef=Fe.compileSchema=Fe.SchemaEnv=void 0;var we=W(),Ah=ni(),it=Ne(),Ie=Yt(),pu=H(),Nh=er(),Ft=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Ie.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Fe.SchemaEnv=Ft;function Fo(t){let e=du.call(this,t);if(e)return e;let r=(0,Ie.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new we.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;t.$async&&(o=i.scopeValue("Error",{ref:Ah.default,code:(0,we._)`require("ajv/dist/runtime/validation_error").default`}));let p=i.scopeName("validate");t.validateName=p;let c={gen:i,allErrors:this.opts.allErrors,data:it.default.data,parentData:it.default.parentData,parentDataProperty:it.default.parentDataProperty,dataNames:[it.default.data],dataPathArr:[we.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,we.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:we.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,we._)`""`,opts:this.opts,self:this},m;try{this._compilations.add(t),(0,Nh.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let h=i.toString();m=`${i.scopeRefs(it.default.scope)}return ${h}`,this.opts.code.process&&(m=this.opts.code.process(m,t));let b=new Function(`${it.default.self}`,`${it.default.scope}`,m)(this,this.scope.get());if(this.scope.value(p,{ref:b}),b.errors=null,b.schema=t.schema,b.schemaEnv=t,t.$async&&(b.$async=!0),this.opts.code.source===!0&&(b.source={validateName:p,validateCode:h,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:T}=c;b.evaluated={props:g instanceof we.Name?void 0:g,items:T instanceof we.Name?void 0:T,dynamicProps:g instanceof we.Name,dynamicItems:T instanceof we.Name},b.source&&(b.source.evaluated=(0,we.stringify)(b.evaluated))}return t.validate=b,t}catch(h){throw delete t.validate,delete t.validateName,m&&this.logger.error("Error compiling schema, function code:",m),h}finally{this._compilations.delete(t)}}Fe.compileSchema=Fo;function Uh(t,e,r){var n;r=(0,Ie.resolveUrl)(this.opts.uriResolver,e,r);let a=t.refs[r];if(a)return a;let s=Lh.call(this,t,r);if(s===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;i&&(s=new Ft({schema:i,schemaId:o,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=qh.call(this,s)}Fe.resolveRef=Uh;function qh(t){return(0,Ie.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Fo.call(this,t)}function du(t){for(let e of this._compilations)if(Bh(e,t))return e}Fe.getCompilingSchema=du;function Bh(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Lh(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||ai.call(this,t,e)}function ai(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Ie._getFullPath)(this.opts.uriResolver,r),a=(0,Ie.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===a)return bo.call(this,r,t);let s=(0,Ie.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=ai.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:bo.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Fo.call(this,i),s===(0,Ie.normalizeId)(e)){let{schema:o}=i,{schemaId:p}=this.opts,c=o[p];return c&&(a=(0,Ie.resolveUrl)(this.opts.uriResolver,a,c)),new Ft({schema:o,schemaId:p,root:t,baseId:a})}return bo.call(this,r,i)}}Fe.resolveSchema=ai;var Vh=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function bo(t,{baseId:e,schema:r,root:n}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,pu.unescapeFragment)(o)];if(p===void 0)return;r=p;let c=typeof r=="object"&&r[this.opts.schemaId];!Vh.has(o)&&c&&(e=(0,Ie.resolveUrl)(this.opts.uriResolver,e,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,pu.schemaHasRulesButRef)(r,this.RULES)){let o=(0,Ie.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=ai.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new Ft({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var fu=I((Rw,Hh)=>{Hh.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var lu=I((Pw,uu)=>{"use strict";var zh={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};uu.exports={HEX:zh}});var bu=I((Mw,yu)=>{"use strict";var{HEX:Jh}=lu();function _u(t){if(Tu(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=e;return r?{host:Kh(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function xo(t,e=!1){let r="",n=!0;for(let a of t){if(Jh[a]===void 0)return;a!=="0"&&n===!0&&(n=!1),n||(r+=a)}return e&&r.length===0&&(r="0"),r}function Qh(t){let e=0,r={error:!1,address:"",zone:""},n=[],a=[],s=!1,i=!1,o=!1;function p(){if(a.length){if(s===!1){let c=xo(a);if(c!==void 0)n.push(c);else return r.error=!0,!1}a.length=0}return!0}for(let c=0;c<t.length;c++){let m=t[c];if(!(m==="["||m==="]"))if(m===":"){if(i===!0&&(o=!0),!p())break;if(e++,n.push(":"),e>7){r.error=!0;break}c-1>=0&&t[c-1]===":"&&(i=!0);continue}else if(m==="%"){if(!p())break;s=!0}else{a.push(m);continue}}return a.length&&(s?r.zone=a.join(""):o?n.push(a.join("")):n.push(xo(a))),r.address=n.join(""),r}function gu(t,e={}){if(Tu(t,":")<2)return{host:t,isIPV6:!1};let r=Qh(t);if(r.error)return{host:t,isIPV6:!1};{let n=r.address,a=r.address;return r.zone&&(n+="%"+r.zone,a+="%25"+r.zone),{host:n,escapedHost:a,isIPV6:!0}}}function Kh(t,e){let r="",n=!0,a=t.length;for(let s=0;s<a;s++){let i=t[s];i==="0"&&n?(s+1<=a&&t[s+1]===e||s+1===a)&&(r+=i,n=!1):(i===e?n=!0:n=!1,r+=i)}return r}function Tu(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}var cu=/^\.\.?\//u,mu=/^\/\.(?:\/|$)/u,hu=/^\/\.\.(?:\/|$)/u,Yh=/^\/?(?:.|\n)*?(?=\/|$)/u;function Xh(t){let e=[];for(;t.length;)if(t.match(cu))t=t.replace(cu,"");else if(t.match(mu))t=t.replace(mu,"/");else if(t.match(hu))t=t.replace(hu,"/"),e.pop();else if(t==="."||t==="..")t="";else{let r=t.match(Yh);if(r){let n=r[0];t=t.slice(n.length),e.push(n)}else throw new Error("Unexpected dot segment condition")}return e.join("")}function Zh(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function e_(t,e){let r=[];if(t.userinfo!==void 0&&(r.push(t.userinfo),r.push("@")),t.host!==void 0){let n=unescape(t.host),a=_u(n);if(a.isIPV4)n=a.host;else{let s=gu(a.host,{isIPV4:!1});s.isIPV6===!0?n=`[${s.escapedHost}]`:n=t.host}r.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(r.push(":"),r.push(String(t.port))),r.length?r.join(""):void 0}yu.exports={recomposeAuthority:e_,normalizeComponentEncoding:Zh,removeDotSegments:Xh,normalizeIPv4:_u,normalizeIPv6:gu,stringArrayToHexStripped:xo}});var Iu=I((Ew,wu)=>{"use strict";var t_=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,r_=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Fu(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}function xu(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Ou(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function n_(t){return t.secure=Fu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function a_(t){if((t.port===(Fu(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function s_(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(r_);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let a=`${n}:${e.nid||t.nid}`,s=Oo[a];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function i_(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),a=`${r}:${e.nid||n}`,s=Oo[a];s&&(t=s.serialize(t,e));let i=t,o=t.nss;return i.path=`${n||e.nid}:${o}`,e.skipEscape=!0,i}function o_(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!t_.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function p_(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var $u={scheme:"http",domainHost:!0,parse:xu,serialize:Ou},d_={scheme:"https",domainHost:$u.domainHost,parse:xu,serialize:Ou},ii={scheme:"ws",domainHost:!0,parse:n_,serialize:a_},f_={scheme:"wss",domainHost:ii.domainHost,parse:ii.parse,serialize:ii.serialize},u_={scheme:"urn",parse:s_,serialize:i_,skipNormalize:!0},l_={scheme:"urn:uuid",parse:o_,serialize:p_,skipNormalize:!0},Oo={http:$u,https:d_,ws:ii,wss:f_,urn:u_,"urn:uuid":l_};wu.exports=Oo});var ku=I((Ww,pi)=>{"use strict";var{normalizeIPv6:c_,normalizeIPv4:m_,removeDotSegments:rr,recomposeAuthority:h_,normalizeComponentEncoding:oi}=bu(),$o=Iu();function __(t,e){return typeof t=="string"?t=Re(qe(t,e),e):typeof t=="object"&&(t=qe(Re(t,e),e)),t}function g_(t,e,r){let n=Object.assign({scheme:"null"},r),a=ju(qe(t,n),qe(e,n),n,!0);return Re(a,P(x({},n),{skipEscape:!0}))}function ju(t,e,r,n){let a={};return n||(t=qe(Re(t,r),r),e=qe(Re(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(a.scheme=e.scheme,a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=rr(e.path||""),a.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=rr(e.path||""),a.query=e.query):(e.path?(e.path.charAt(0)==="/"?a.path=rr(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?a.path="/"+e.path:t.path?a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:a.path=e.path,a.path=rr(a.path)),a.query=e.query):(a.path=t.path,e.query!==void 0?a.query=e.query:a.query=t.query),a.userinfo=t.userinfo,a.host=t.host,a.port=t.port),a.scheme=t.scheme),a.fragment=e.fragment,a}function T_(t,e,r){return typeof t=="string"?(t=unescape(t),t=Re(oi(qe(t,r),!0),P(x({},r),{skipEscape:!0}))):typeof t=="object"&&(t=Re(oi(t,!0),P(x({},r),{skipEscape:!0}))),typeof e=="string"?(e=unescape(e),e=Re(oi(qe(e,r),!0),P(x({},r),{skipEscape:!0}))):typeof e=="object"&&(e=Re(oi(e,!0),P(x({},r),{skipEscape:!0}))),t.toLowerCase()===e.toLowerCase()}function Re(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),a=[],s=$o[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&(a.push(r.scheme),a.push(":"));let i=h_(r,n);if(i!==void 0&&(n.reference!=="suffix"&&a.push("//"),a.push(i),r.path&&r.path.charAt(0)!=="/"&&a.push("/")),r.path!==void 0){let o=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(o=rr(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),a.push(o)}return r.query!==void 0&&(a.push("?"),a.push(r.query)),r.fragment!==void 0&&(a.push("#"),a.push(r.fragment)),a.join("")}var y_=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function b_(t){let e=0;for(let r=0,n=t.length;r<n;++r)if(e=t.charCodeAt(r),e>126||y_[e])return!0;return!1}var F_=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function qe(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let i=t.match(F_);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let p=m_(n.host);if(p.isIPV4===!1){let c=c_(p.host,{isIPV4:!1});n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=p.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let o=$o[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&s===!1&&b_(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!o||o&&!o.skipNormalize)&&(a&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),a&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),a&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var wo={SCHEMES:$o,normalize:__,resolve:g_,resolveComponents:ju,equal:T_,serialize:Re,parse:qe};pi.exports=wo;pi.exports.default=wo;pi.exports.fastUri=wo});var Su=I(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var vu=ku();vu.code='require("ajv/dist/runtime/uri").default';Io.default=vu});var Du=I(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.CodeGen=ne.Name=ne.nil=ne.stringify=ne.str=ne._=ne.KeywordCxt=void 0;var x_=er();Object.defineProperty(ne,"KeywordCxt",{enumerable:!0,get:function(){return x_.KeywordCxt}});var xt=W();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return xt._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return xt.str}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return xt.stringify}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return xt.nil}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return xt.Name}});Object.defineProperty(ne,"CodeGen",{enumerable:!0,get:function(){return xt.CodeGen}});var O_=ni(),Mu=tr(),$_=to(),nr=si(),w_=W(),ar=Yt(),di=Kt(),ko=H(),Cu=fu(),I_=Su(),Eu=(t,e)=>new RegExp(t,e);Eu.code="new RegExp";var j_=["removeAdditional","useDefaults","coerceTypes"],k_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Gu=200;function C_(t){var e,r,n,a,s,i,o,p,c,m,h,y,b,g,T,F,O,B,A,K,C,ke,Me,ji,ki;let Mt=t.strict,vi=(e=t.code)===null||e===void 0?void 0:e.optimize,zd=vi===!0||vi===void 0?1:vi||0,Jd=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Eu,lc=(a=t.uriResolver)!==null&&a!==void 0?a:I_.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:Mt)!==null&&i!==void 0?i:!0,strictNumbers:(p=(o=t.strictNumbers)!==null&&o!==void 0?o:Mt)!==null&&p!==void 0?p:!0,strictTypes:(m=(c=t.strictTypes)!==null&&c!==void 0?c:Mt)!==null&&m!==void 0?m:"log",strictTuples:(y=(h=t.strictTuples)!==null&&h!==void 0?h:Mt)!==null&&y!==void 0?y:"log",strictRequired:(g=(b=t.strictRequired)!==null&&b!==void 0?b:Mt)!==null&&g!==void 0?g:!1,code:t.code?P(x({},t.code),{optimize:zd,regExp:Jd}):{optimize:zd,regExp:Jd},loopRequired:(T=t.loopRequired)!==null&&T!==void 0?T:Gu,loopEnum:(F=t.loopEnum)!==null&&F!==void 0?F:Gu,meta:(O=t.meta)!==null&&O!==void 0?O:!0,messages:(B=t.messages)!==null&&B!==void 0?B:!0,inlineRefs:(A=t.inlineRefs)!==null&&A!==void 0?A:!0,schemaId:(K=t.schemaId)!==null&&K!==void 0?K:"$id",addUsedSchema:(C=t.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(ke=t.validateSchema)!==null&&ke!==void 0?ke:!0,validateFormats:(Me=t.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ji=t.unicodeRegExp)!==null&&ji!==void 0?ji:!0,int32range:(ki=t.int32range)!==null&&ki!==void 0?ki:!0,uriResolver:lc}}var sr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=x(x({},e),C_(e));let{es5:r,lines:n}=this.opts.code;this.scope=new w_.ValueScope({scope:{},prefixes:k_,es5:r,lines:n}),this.logger=W_(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,$_.getRules)(),Ru.call(this,v_,e,"NOT SUPPORTED"),Ru.call(this,S_,e,"DEPRECATED","warn"),this._metaOpts=M_.call(this),e.formats&&R_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P_.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),G_.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,a=Cu;n==="id"&&(a=x({},Cu),a.id=a.$id,delete a.$id),r&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(r);return"$async"in n||(this.errors=n.errors),a}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,r);function a(m,h){return ee(this,null,function*(){yield s.call(this,m.$schema);let y=this._addSchema(m,h);return y.validate||i.call(this,y)})}function s(m){return ee(this,null,function*(){m&&!this.getSchema(m)&&(yield a.call(this,{$ref:m},!0))})}function i(m){return ee(this,null,function*(){try{return this._compileSchemaEnv(m)}catch(h){if(!(h instanceof Mu.default))throw h;return o.call(this,h),yield p.call(this,h.missingSchema),i.call(this,m)}})}function o({missingSchema:m,missingRef:h}){if(this.refs[m])throw new Error(`AnySchema ${m} is loaded but ${h} cannot be resolved`)}function p(m){return ee(this,null,function*(){let h=yield c.call(this,m);this.refs[m]||(yield s.call(this,h.$schema)),this.refs[m]||this.addSchema(h,m,r)})}function c(m){return ee(this,null,function*(){let h=this._loading[m];if(h)return h;try{return yield this._loading[m]=n(m)}finally{delete this._loading[m]}})}}addSchema(e,r,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,ar.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,a,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let r;for(;typeof(r=Pu.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,a=new nr.SchemaEnv({schema:{},schemaId:n});if(r=nr.resolveSchema.call(this,a,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Pu.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,ar.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(A_.call(this,n,r),!r)return(0,ko.eachItem)(n,s=>jo.call(this,s)),this;U_.call(this,r);let a=P(x({},r),{type:(0,di.getJSONTypes)(r.type),schemaType:(0,di.getJSONTypes)(r.schemaType)});return(0,ko.eachItem)(n,a.type.length===0?s=>jo.call(this,s,a):s=>a.type.forEach(i=>jo.call(this,s,a,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of r){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let p=n[o];if(typeof p!="object")continue;let{$data:c}=p.definition,m=i[o];c&&m&&(i[o]=Wu(m))}}return e}_removeAllSchemas(e,r){for(let n in e){let a=e[n];(!r||r.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,r,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let p=this._cache.get(e);if(p!==void 0)return p;n=(0,ar.normalizeId)(i||n);let c=ar.getSchemaRefs.call(this,e,n);return p=new nr.SchemaEnv({schema:e,schemaId:o,meta:r,baseId:n,localRefs:c}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),a&&this.validateSchema(e,!0),p}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):nr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{nr.compileSchema.call(this,e)}finally{this.opts=r}}};sr.ValidationError=O_.default;sr.MissingRefError=Mu.default;ne.default=sr;function Ru(t,e,r,n="error"){for(let a in t){let s=a;s in e&&this.logger[n](`${r}: option ${a}. ${t[s]}`)}}function Pu(t){return t=(0,ar.normalizeId)(t),this.schemas[t]||this.refs[t]}function G_(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function R_(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function P_(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function M_(){let t=x({},this.opts);for(let e of j_)delete t[e];return t}var E_={log(){},warn(){},error(){}};function W_(t){if(t===!1)return E_;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var D_=/^[a-z_$][a-z0-9_$:-]*$/i;function A_(t,e){let{RULES:r}=this;if((0,ko.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!D_.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function jo(t,e,r){var n;let a=e==null?void 0:e.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:p})=>p===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[t]=!0,!e)return;let o={keyword:t,definition:P(x({},e),{type:(0,di.getJSONTypes)(e.type),schemaType:(0,di.getJSONTypes)(e.schemaType)})};e.before?N_.call(this,i,o,e.before):i.rules.push(o),s.all[t]=o,(n=e.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}function N_(t,e,r){let n=t.rules.findIndex(a=>a.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function U_(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Wu(e)),t.validateSchema=this.compile(e,!0))}var q_={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Wu(t){return{anyOf:[t,q_]}}});var Au=I(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var B_={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vo.default=B_});var Bu=I(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.callRef=ot.getValidate=void 0;var L_=tr(),Nu=be(),me=W(),Ot=Ne(),Uu=si(),fi=H(),V_={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:p}=n,{root:c}=s;if((r==="#"||r==="#/")&&a===c.baseId)return h();let m=Uu.resolveRef.call(p,c,a,r);if(m===void 0)throw new L_.default(n.opts.uriResolver,a,r);if(m instanceof Uu.SchemaEnv)return y(m);return b(m);function h(){if(s===c)return ui(t,i,s,s.$async);let g=e.scopeValue("root",{ref:c});return ui(t,(0,me._)`${g}.validate`,c,c.$async)}function y(g){let T=qu(t,g);ui(t,T,g,g.$async)}function b(g){let T=e.scopeValue("schema",o.code.source===!0?{ref:g,code:(0,me.stringify)(g)}:{ref:g}),F=e.name("valid"),O=t.subschema({schema:g,dataTypes:[],schemaPath:me.nil,topSchemaRef:T,errSchemaPath:r},F);t.mergeEvaluated(O),t.ok(F)}}};function qu(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,me._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ot.getValidate=qu;function ui(t,e,r,n){let{gen:a,it:s}=t,{allErrors:i,schemaEnv:o,opts:p}=s,c=p.passContext?Ot.default.this:me.nil;n?m():h();function m(){if(!o.$async)throw new Error("async schema referenced by sync schema");let g=a.let("valid");a.try(()=>{a.code((0,me._)`await ${(0,Nu.callValidateCode)(t,e,c)}`),b(e),i||a.assign(g,!0)},T=>{a.if((0,me._)`!(${T} instanceof ${s.ValidationError})`,()=>a.throw(T)),y(T),i||a.assign(g,!1)}),t.ok(g)}function h(){t.result((0,Nu.callValidateCode)(t,e,c),()=>b(e),()=>y(e))}function y(g){let T=(0,me._)`${g}.errors`;a.assign(Ot.default.vErrors,(0,me._)`${Ot.default.vErrors} === null ? ${T} : ${Ot.default.vErrors}.concat(${T})`),a.assign(Ot.default.errors,(0,me._)`${Ot.default.vErrors}.length`)}function b(g){var T;if(!s.opts.unevaluated)return;let F=(T=r==null?void 0:r.validate)===null||T===void 0?void 0:T.evaluated;if(s.props!==!0)if(F&&!F.dynamicProps)F.props!==void 0&&(s.props=fi.mergeEvaluated.props(a,F.props,s.props));else{let O=a.var("props",(0,me._)`${g}.evaluated.props`);s.props=fi.mergeEvaluated.props(a,O,s.props,me.Name)}if(s.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(s.items=fi.mergeEvaluated.items(a,F.items,s.items));else{let O=a.var("items",(0,me._)`${g}.evaluated.items`);s.items=fi.mergeEvaluated.items(a,O,s.items,me.Name)}}}ot.callRef=ui;ot.default=V_});var Lu=I(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var H_=Au(),z_=Bu(),J_=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",H_.default,z_.default];So.default=J_});var Vu=I(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var li=W(),Qe=li.operators,ci={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},Q_={message:({keyword:t,schemaCode:e})=>(0,li.str)`must be ${ci[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,li._)`{comparison: ${ci[t].okStr}, limit: ${e}}`},K_={keyword:Object.keys(ci),type:"number",schemaType:"number",$data:!0,error:Q_,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,li._)`${r} ${ci[e].fail} ${n} || isNaN(${r})`)}};Co.default=K_});var Hu=I(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var ir=W(),Y_={message:({schemaCode:t})=>(0,ir.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ir._)`{multipleOf: ${t}}`},X_={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Y_,code(t){let{gen:e,data:r,schemaCode:n,it:a}=t,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,ir._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ir._)`${i} !== parseInt(${i})`;t.fail$data((0,ir._)`(${n} === 0 || (${i} = ${r}/${n}, ${o}))`)}};Go.default=X_});var Ju=I(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});function zu(t){let e=t.length,r=0,n=0,a;for(;n<e;)r++,a=t.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=t.charCodeAt(n),(a&64512)===56320&&n++);return r}Ro.default=zu;zu.code='require("ajv/dist/runtime/ucs2length").default'});var Qu=I(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var pt=W(),Z_=H(),eg=Ju(),tg={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,pt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,pt._)`{limit: ${t}}`},rg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:tg,code(t){let{keyword:e,data:r,schemaCode:n,it:a}=t,s=e==="maxLength"?pt.operators.GT:pt.operators.LT,i=a.opts.unicode===!1?(0,pt._)`${r}.length`:(0,pt._)`${(0,Z_.useFunc)(t.gen,eg.default)}(${r})`;t.fail$data((0,pt._)`${i} ${s} ${n}`)}};Po.default=rg});var Ku=I(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});var ng=be(),mi=W(),ag={message:({schemaCode:t})=>(0,mi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,mi._)`{pattern: ${t}}`},sg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ag,code(t){let{data:e,$data:r,schema:n,schemaCode:a,it:s}=t,i=s.opts.unicodeRegExp?"u":"",o=r?(0,mi._)`(new RegExp(${a}, ${i}))`:(0,ng.usePattern)(t,n);t.fail$data((0,mi._)`!${o}.test(${e})`)}};Mo.default=sg});var Yu=I(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var or=W(),ig={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,or.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,or._)`{limit: ${t}}`},og={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ig,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxProperties"?or.operators.GT:or.operators.LT;t.fail$data((0,or._)`Object.keys(${r}).length ${a} ${n}`)}};Eo.default=og});var Xu=I(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var pr=be(),dr=W(),pg=H(),dg={message:({params:{missingProperty:t}})=>(0,dr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,dr._)`{missingProperty: ${t}}`},fg={keyword:"required",type:"object",schemaType:"array",$data:!0,error:dg,code(t){let{gen:e,schema:r,schemaCode:n,data:a,$data:s,it:i}=t,{opts:o}=i;if(!s&&r.length===0)return;let p=r.length>=o.loopRequired;if(i.allErrors?c():m(),o.strictRequired){let b=t.parentSchema.properties,{definedProperties:g}=t.it;for(let T of r)if((b==null?void 0:b[T])===void 0&&!g.has(T)){let F=i.schemaEnv.baseId+i.errSchemaPath,O=`required property "${T}" is not defined at "${F}" (strictRequired)`;(0,pg.checkStrictMode)(i,O,i.opts.strictRequired)}}function c(){if(p||s)t.block$data(dr.nil,h);else for(let b of r)(0,pr.checkReportMissingProp)(t,b)}function m(){let b=e.let("missing");if(p||s){let g=e.let("valid",!0);t.block$data(g,()=>y(b,g)),t.ok(g)}else e.if((0,pr.checkMissingProp)(t,r,b)),(0,pr.reportMissingProp)(t,b),e.else()}function h(){e.forOf("prop",n,b=>{t.setParams({missingProperty:b}),e.if((0,pr.noPropertyInData)(e,a,b,o.ownProperties),()=>t.error())})}function y(b,g){t.setParams({missingProperty:b}),e.forOf(b,n,()=>{e.assign(g,(0,pr.propertyInData)(e,a,b,o.ownProperties)),e.if((0,dr.not)(g),()=>{t.error(),e.break()})},dr.nil)}}};Wo.default=fg});var Zu=I(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var fr=W(),ug={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,fr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,fr._)`{limit: ${t}}`},lg={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ug,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxItems"?fr.operators.GT:fr.operators.LT;t.fail$data((0,fr._)`${r}.length ${a} ${n}`)}};Do.default=lg});var hi=I(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var el=fo();el.code='require("ajv/dist/runtime/equal").default';Ao.default=el});var tl=I(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var No=Kt(),ae=W(),cg=H(),mg=hi(),hg={message:({params:{i:t,j:e}})=>(0,ae.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ae._)`{i: ${t}, j: ${e}}`},_g={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:hg,code(t){let{gen:e,data:r,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=t;if(!n&&!a)return;let p=e.let("valid"),c=s.items?(0,No.getSchemaTypes)(s.items):[];t.block$data(p,m,(0,ae._)`${i} === false`),t.ok(p);function m(){let g=e.let("i",(0,ae._)`${r}.length`),T=e.let("j");t.setParams({i:g,j:T}),e.assign(p,!0),e.if((0,ae._)`${g} > 1`,()=>(h()?y:b)(g,T))}function h(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function y(g,T){let F=e.name("item"),O=(0,No.checkDataTypes)(c,F,o.opts.strictNumbers,No.DataType.Wrong),B=e.const("indices",(0,ae._)`{}`);e.for((0,ae._)`;${g}--;`,()=>{e.let(F,(0,ae._)`${r}[${g}]`),e.if(O,(0,ae._)`continue`),c.length>1&&e.if((0,ae._)`typeof ${F} == "string"`,(0,ae._)`${F} += "_"`),e.if((0,ae._)`typeof ${B}[${F}] == "number"`,()=>{e.assign(T,(0,ae._)`${B}[${F}]`),t.error(),e.assign(p,!1).break()}).code((0,ae._)`${B}[${F}] = ${g}`)})}function b(g,T){let F=(0,cg.useFunc)(e,mg.default),O=e.name("outer");e.label(O).for((0,ae._)`;${g}--;`,()=>e.for((0,ae._)`${T} = ${g}; ${T}--;`,()=>e.if((0,ae._)`${F}(${r}[${g}], ${r}[${T}])`,()=>{t.error(),e.assign(p,!1).break(O)})))}}};Uo.default=_g});var rl=I(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var qo=W(),gg=H(),Tg=hi(),yg={message:"must be equal to constant",params:({schemaCode:t})=>(0,qo._)`{allowedValue: ${t}}`},bg={keyword:"const",$data:!0,error:yg,code(t){let{gen:e,data:r,$data:n,schemaCode:a,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,qo._)`!${(0,gg.useFunc)(e,Tg.default)}(${r}, ${a})`):t.fail((0,qo._)`${s} !== ${r}`)}};Bo.default=bg});var nl=I(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var ur=W(),Fg=H(),xg=hi(),Og={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ur._)`{allowedValues: ${t}}`},$g={keyword:"enum",schemaType:"array",$data:!0,error:Og,code(t){let{gen:e,data:r,$data:n,schema:a,schemaCode:s,it:i}=t;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,p,c=()=>p!=null?p:p=(0,Fg.useFunc)(e,xg.default),m;if(o||n)m=e.let("valid"),t.block$data(m,h);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let b=e.const("vSchema",s);m=(0,ur.or)(...a.map((g,T)=>y(b,T)))}t.pass(m);function h(){e.assign(m,!1),e.forOf("v",s,b=>e.if((0,ur._)`${c()}(${r}, ${b})`,()=>e.assign(m,!0).break()))}function y(b,g){let T=a[g];return typeof T=="object"&&T!==null?(0,ur._)`${c()}(${r}, ${b}[${g}])`:(0,ur._)`${r} === ${T}`}}};Lo.default=$g});var al=I(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var wg=Vu(),Ig=Hu(),jg=Qu(),kg=Ku(),vg=Yu(),Sg=Xu(),Cg=Zu(),Gg=tl(),Rg=rl(),Pg=nl(),Mg=[wg.default,Ig.default,jg.default,kg.default,vg.default,Sg.default,Cg.default,Gg.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Rg.default,Pg.default];Vo.default=Mg});var zo=I(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.validateAdditionalItems=void 0;var dt=W(),Ho=H(),Eg={message:({params:{len:t}})=>(0,dt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dt._)`{limit: ${t}}`},Wg={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Eg,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Ho.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}sl(t,n)}};function sl(t,e){let{gen:r,schema:n,data:a,keyword:s,it:i}=t;i.items=!0;let o=r.const("len",(0,dt._)`${a}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,dt._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Ho.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,dt._)`${o} <= ${e.length}`);r.if((0,dt.not)(c),()=>p(c)),t.ok(c)}function p(c){r.forRange("i",e.length,o,m=>{t.subschema({keyword:s,dataProp:m,dataPropType:Ho.Type.Num},c),i.allErrors||r.if((0,dt.not)(c),()=>r.break())})}}lr.validateAdditionalItems=sl;lr.default=Wg});var Jo=I(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.validateTuple=void 0;var il=W(),_i=H(),Dg=be(),Ag={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return ol(t,"additionalItems",e);r.items=!0,!(0,_i.alwaysValidSchema)(r,e)&&t.ok((0,Dg.validateArray)(t))}};function ol(t,e,r=t.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=t;m(a),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=_i.mergeEvaluated.items(n,r.length,o.items));let p=n.name("valid"),c=n.const("len",(0,il._)`${s}.length`);r.forEach((h,y)=>{(0,_i.alwaysValidSchema)(o,h)||(n.if((0,il._)`${c} > ${y}`,()=>t.subschema({keyword:i,schemaProp:y,dataProp:y},p)),t.ok(p))});function m(h){let{opts:y,errSchemaPath:b}=o,g=r.length,T=g===h.minItems&&(g===h.maxItems||h[e]===!1);if(y.strictTuples&&!T){let F=`"${i}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${b}"`;(0,_i.checkStrictMode)(o,F,y.strictTuples)}}}cr.validateTuple=ol;cr.default=Ag});var pl=I(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var Ng=Jo(),Ug={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Ng.validateTuple)(t,"items")};Qo.default=Ug});var fl=I(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var dl=W(),qg=H(),Bg=be(),Lg=zo(),Vg={message:({params:{len:t}})=>(0,dl.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dl._)`{limit: ${t}}`},Hg={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Vg,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:a}=r;n.items=!0,!(0,qg.alwaysValidSchema)(n,e)&&(a?(0,Lg.validateAdditionalItems)(t,a):t.ok((0,Bg.validateArray)(t)))}};Ko.default=Hg});var ul=I(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var xe=W(),gi=H(),zg={message:({params:{min:t,max:e}})=>e===void 0?(0,xe.str)`must contain at least ${t} valid item(s)`:(0,xe.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,xe._)`{minContains: ${t}}`:(0,xe._)`{minContains: ${t}, maxContains: ${e}}`},Jg={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:zg,code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t,i,o,{minContains:p,maxContains:c}=n;s.opts.next?(i=p===void 0?1:p,o=c):i=1;let m=e.const("len",(0,xe._)`${a}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,gi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,gi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,gi.alwaysValidSchema)(s,r)){let T=(0,xe._)`${m} >= ${i}`;o!==void 0&&(T=(0,xe._)`${T} && ${m} <= ${o}`),t.pass(T);return}s.items=!0;let h=e.name("valid");o===void 0&&i===1?b(h,()=>e.if(h,()=>e.break())):i===0?(e.let(h,!0),o!==void 0&&e.if((0,xe._)`${a}.length > 0`,y)):(e.let(h,!1),y()),t.result(h,()=>t.reset());function y(){let T=e.name("_valid"),F=e.let("count",0);b(T,()=>e.if(T,()=>g(F)))}function b(T,F){e.forRange("i",0,m,O=>{t.subschema({keyword:"contains",dataProp:O,dataPropType:gi.Type.Num,compositeRule:!0},T),F()})}function g(T){e.code((0,xe._)`${T}++`),o===void 0?e.if((0,xe._)`${T} >= ${i}`,()=>e.assign(h,!0).break()):(e.if((0,xe._)`${T} > ${o}`,()=>e.assign(h,!1).break()),i===1?e.assign(h,!0):e.if((0,xe._)`${T} >= ${i}`,()=>e.assign(h,!0)))}}};Yo.default=Jg});var ml=I(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.validateSchemaDeps=Pe.validatePropertyDeps=Pe.error=void 0;var Xo=W(),Qg=H(),mr=be();Pe.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Xo.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Xo._)`{property: ${t},
1
+ var WAPI=(()=>{var Mc=Object.create;var Rt=Object.defineProperty,Pc=Object.defineProperties,Wc=Object.getOwnPropertyDescriptor,Dc=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertyNames,Tf=Object.getOwnPropertySymbols,Nc=Object.getPrototypeOf,Ff=Object.prototype.hasOwnProperty,Uc=Object.prototype.propertyIsEnumerable;var yf=(t,e,r)=>e in t?Rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))Ff.call(e,r)&&yf(t,r,e[r]);if(Tf)for(var r of Tf(e))Uc.call(e,r)&&yf(t,r,e[r]);return t},P=(t,e)=>Pc(t,Dc(e));var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qc=(t,e)=>{for(var r in e)Rt(t,r,{get:e[r],enumerable:!0})},xf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ac(e))!Ff.call(t,a)&&a!==r&&Rt(t,a,{get:()=>e[a],enumerable:!(n=Wc(e,a))||n.enumerable});return t};var Bc=(t,e,r)=>(r=t!=null?Mc(Nc(t)):{},xf(e||!t||!t.__esModule?Rt(r,"default",{value:t,enumerable:!0}):r,t)),Lc=t=>xf(Rt({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>new Promise((n,a)=>{var s=p=>{try{o(r.next(p))}catch(m){a(m)}},i=p=>{try{o(r.throw(p))}catch(m){a(m)}},o=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,i);o((r=r.apply(t,e)).next())});var Ut=I(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var At=class{};V._CodeOrName=At;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var et=class extends At{constructor(e){if(super(),!V.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};V.Name=et;var Fe=class extends At{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof et&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=Fe;V.nil=new Fe("");function Rf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)eo(r,e[n]),r.push(t[++n]);return new Fe(r)}V._=Rf;var Zi=new Fe("+");function Mf(t,...e){let r=[Nt(t[0])],n=0;for(;n<e.length;)r.push(Zi),eo(r,e[n]),r.push(Zi,Nt(t[++n]));return nm(r),new Fe(r)}V.str=Mf;function eo(t,e){e instanceof Fe?t.push(...e._items):e instanceof et?t.push(e):t.push(im(e))}V.addCodeArg=eo;function nm(t){let e=1;for(;e<t.length-1;){if(t[e]===Zi){let r=am(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function am(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof et||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof et))return`"${t}${e.slice(1)}`}function sm(t,e){return e.emptyStr()?t:t.emptyStr()?e:Mf`${t}${e}`}V.strConcat=sm;function im(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Nt(Array.isArray(t)?t.join(","):t)}function om(t){return new Fe(Nt(t))}V.stringify=om;function Nt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=Nt;function pm(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new Fe(`.${t}`):Rf`[${t}]`}V.getProperty=pm;function dm(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new Fe(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=dm;function fm(t){return new Fe(t.toString())}V.regexpCode=fm});var no=I(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.ValueScope=me.ValueScopeName=me.Scope=me.varKinds=me.UsedValueState=void 0;var ce=Ut(),to=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},fi;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(fi||(me.UsedValueState=fi={}));me.varKinds={const:new ce.Name("const"),let:new ce.Name("let"),var:new ce.Name("var")};var ui=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof ce.Name?e:this.name(e)}name(e){return new ce.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};me.Scope=ui;var li=class extends ce.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,ce._)`.${new ce.Name(r)}[${n}]`}};me.ValueScopeName=li;var um=(0,ce._)`\n`,ro=class extends ui{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=P(b({},e),{_n:e.lines?um:ce.nil})}get(){return this._scope}name(e){return new li(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[s];if(o){let c=o.get(i);if(c)return c}else o=this._values[s]=new Map;o.set(i,a);let p=this._scope[s]||(this._scope[s]=[]),m=p.length;return p[m]=r.ref,a.setValue(r,{property:s,itemIndex:m}),a}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ce._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},r,n)}_reduceValues(e,r,n={},a){let s=ce.nil;for(let i in e){let o=e[i];if(!o)continue;let p=n[i]=n[i]||new Map;o.forEach(m=>{if(p.has(m))return;p.set(m,fi.Started);let c=r(m);if(c){let h=this.opts.es5?me.varKinds.var:me.varKinds.const;s=(0,ce._)`${s}${h} ${m} = ${c};${this.opts._n}`}else if(c=a==null?void 0:a(m))s=(0,ce._)`${s}${c}${this.opts._n}`;else throw new to(m);p.set(m,fi.Completed)})}return s}};me.ValueScope=ro});var A=I(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.or=W.and=W.not=W.CodeGen=W.operators=W.varKinds=W.ValueScopeName=W.ValueScope=W.Scope=W.Name=W.regexpCode=W.stringify=W.getProperty=W.nil=W.strConcat=W.str=W._=void 0;var q=Ut(),we=no(),Be=Ut();Object.defineProperty(W,"_",{enumerable:!0,get:function(){return Be._}});Object.defineProperty(W,"str",{enumerable:!0,get:function(){return Be.str}});Object.defineProperty(W,"strConcat",{enumerable:!0,get:function(){return Be.strConcat}});Object.defineProperty(W,"nil",{enumerable:!0,get:function(){return Be.nil}});Object.defineProperty(W,"getProperty",{enumerable:!0,get:function(){return Be.getProperty}});Object.defineProperty(W,"stringify",{enumerable:!0,get:function(){return Be.stringify}});Object.defineProperty(W,"regexpCode",{enumerable:!0,get:function(){return Be.regexpCode}});Object.defineProperty(W,"Name",{enumerable:!0,get:function(){return Be.Name}});var _i=no();Object.defineProperty(W,"Scope",{enumerable:!0,get:function(){return _i.Scope}});Object.defineProperty(W,"ValueScope",{enumerable:!0,get:function(){return _i.ValueScope}});Object.defineProperty(W,"ValueScopeName",{enumerable:!0,get:function(){return _i.ValueScopeName}});Object.defineProperty(W,"varKinds",{enumerable:!0,get:function(){return _i.varKinds}});W.operators={GT:new q._Code(">"),GTE:new q._Code(">="),LT:new q._Code("<"),LTE:new q._Code("<="),EQ:new q._Code("==="),NEQ:new q._Code("!=="),NOT:new q._Code("!"),OR:new q._Code("||"),AND:new q._Code("&&"),ADD:new q._Code("+")};var De=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ao=class extends De{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?we.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=ht(this.rhs,e,r)),this}get names(){return this.rhs instanceof q._CodeOrName?this.rhs.names:{}}},ci=class extends De{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ht(this.rhs,e,r),this}get names(){let e=this.lhs instanceof q.Name?{}:b({},this.lhs.names);return hi(e,this.rhs)}},so=class extends ci{constructor(e,r,n,a){super(e,n,a),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},io=class extends De{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},oo=class extends De{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},po=class extends De{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},fo=class extends De{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=ht(this.code,e,r),this}get names(){return this.code instanceof q._CodeOrName?this.code.names:{}}},qt=class extends De{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,r)||(lm(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>nt(e,r.names),{})}},Ae=class extends qt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},uo=class extends qt{},mt=class extends Ae{};mt.kind="else";var tt=class t extends Ae{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new mt(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Pf(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=ht(this.condition,e,r),this}get names(){let e=super.names;return hi(e,this.condition),this.else&&nt(e,this.else.names),e}};tt.kind="if";var rt=class extends Ae{};rt.kind="for";var lo=class extends rt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=ht(this.iteration,e,r),this}get names(){return nt(super.names,this.iteration.names)}},co=class extends rt{constructor(e,r,n,a){super(),this.varKind=e,this.name=r,this.from=n,this.to=a}render(e){let r=e.es5?we.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${r} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=hi(super.names,this.from);return hi(e,this.to)}},mi=class extends rt{constructor(e,r,n,a){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=ht(this.iterable,e,r),this}get names(){return nt(super.names,this.iterable.names)}},Bt=class extends Ae{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Bt.kind="func";var Lt=class extends qt{render(e){return"return "+super.render(e)}};Lt.kind="return";var mo=class extends Ae{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,a;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(a=this.finally)===null||a===void 0||a.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&nt(e,this.catch.names),this.finally&&nt(e,this.finally.names),e}},Ht=class extends Ae{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ht.kind="catch";var Vt=class extends Ae{render(e){return"finally"+super.render(e)}};Vt.kind="finally";var ho=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=P(b({},r),{_n:r.lines?`
2
+ `:""}),this._extScope=e,this._scope=new we.Scope({parent:e}),this._nodes=[new uo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,a){let s=this._scope.toName(r);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new ao(e,s,n)),s}const(e,r,n){return this._def(we.varKinds.const,e,r,n)}let(e,r,n){return this._def(we.varKinds.let,e,r,n)}var(e,r,n){return this._def(we.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new ci(e,r,n))}add(e,r){return this._leafNode(new so(e,W.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==q.nil&&this._leafNode(new fo(e)),this}object(...e){let r=["{"];for(let[n,a]of e)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,q.addCodeArg)(r,a));return r.push("}"),new q._Code(r)}if(e,r,n){if(this._blockNode(new tt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new tt(e))}else(){return this._elseNode(new mt)}endIf(){return this._endBlockNode(tt,mt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new lo(e),r)}forRange(e,r,n,a,s=this.opts.es5?we.varKinds.var:we.varKinds.let){let i=this._scope.toName(e);return this._for(new co(s,i,r,n),()=>a(i))}forOf(e,r,n,a=we.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof q.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,q._)`${i}.length`,o=>{this.var(s,(0,q._)`${i}[${o}]`),n(s)})}return this._for(new mi("of",a,s,r),()=>n(s))}forIn(e,r,n,a=this.opts.es5?we.varKinds.var:we.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,q._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new mi("in",a,s,r),()=>n(s))}endFor(){return this._endBlockNode(rt)}label(e){return this._leafNode(new io(e))}break(e){return this._leafNode(new oo(e))}return(e){let r=new Lt;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lt)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new mo;if(this._blockNode(a),this.code(e),r){let s=this.name("e");this._currNode=a.catch=new Ht(s),r(s)}return n&&(this._currNode=a.finally=new Vt,this.code(n)),this._endBlockNode(Ht,Vt)}throw(e){return this._leafNode(new po(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=q.nil,n,a){return this._blockNode(new Bt(e,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Bt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof tt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};W.CodeGen=ho;function nt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function hi(t,e){return e instanceof q._CodeOrName?nt(t,e.names):t}function ht(t,e,r){if(t instanceof q.Name)return n(t);if(!a(t))return t;return new q._Code(t._items.reduce((s,i)=>(i instanceof q.Name&&(i=n(i)),i instanceof q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof q._Code&&s._items.some(i=>i instanceof q.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function lm(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Pf(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,q._)`!${_o(t)}`}W.not=Pf;var cm=Wf(W.operators.AND);function mm(...t){return t.reduce(cm)}W.and=mm;var hm=Wf(W.operators.OR);function _m(...t){return t.reduce(hm)}W.or=_m;function Wf(t){return(e,r)=>e===q.nil?r:r===q.nil?e:(0,q._)`${_o(e)} ${t} ${_o(r)}`}function _o(t){return t instanceof q.Name?t:(0,q._)`(${t})`}});var z=I(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;var Q=A(),gm=Ut();function Tm(t){let e={};for(let r of t)e[r]=!0;return e}N.toHash=Tm;function ym(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Nf(t,e),!Uf(e,t.self.RULES.all))}N.alwaysValidSchema=ym;function Nf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Lf(t,`unknown keyword: "${s}"`)}N.checkUnknownRules=Nf;function Uf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}N.schemaHasRules=Uf;function Fm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}N.schemaHasRulesButRef=Fm;function xm({topSchemaRef:t,schemaPath:e},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Q._)`${r}`}return(0,Q._)`${t}${e}${(0,Q.getProperty)(n)}`}N.schemaRefOrVal=xm;function bm(t){return qf(decodeURIComponent(t))}N.unescapeFragment=bm;function Om(t){return encodeURIComponent(To(t))}N.escapeFragment=Om;function To(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=To;function qf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=qf;function $m(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}N.eachItem=$m;function Df({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(a,s,i,o)=>{let p=i===void 0?s:i instanceof Q.Name?(s instanceof Q.Name?t(a,s,i):e(a,s,i),i):s instanceof Q.Name?(e(a,i,s),s):r(s,i);return o===Q.Name&&!(p instanceof Q.Name)?n(a,p):p}}N.mergeEvaluated={props:Df({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Q._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Q._)`${r} || {}`).code((0,Q._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Q._)`${r} || {}`),yo(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:b(b({},t),e),resultToName:Bf}),items:Df({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Q._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Q._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Bf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Q._)`{}`);return e!==void 0&&yo(t,r,e),r}N.evaluatedPropsToName=Bf;function yo(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Q._)`${e}${(0,Q.getProperty)(n)}`,!0))}N.setEvaluated=yo;var Af={};function wm(t,e){return t.scopeValue("func",{ref:e,code:Af[e.code]||(Af[e.code]=new gm._Code(e.code))})}N.useFunc=wm;var go;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(go||(N.Type=go={}));function Im(t,e,r){if(t instanceof Q.Name){let n=e===go.Num;return r?n?(0,Q._)`"[" + ${t} + "]"`:(0,Q._)`"['" + ${t} + "']"`:n?(0,Q._)`"/" + ${t}`:(0,Q._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Q.getProperty)(t).toString():"/"+To(t)}N.getErrorPath=Im;function Lf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}N.checkStrictMode=Lf});var Ne=I(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var oe=A(),jm={data:new oe.Name("data"),valCxt:new oe.Name("valCxt"),instancePath:new oe.Name("instancePath"),parentData:new oe.Name("parentData"),parentDataProperty:new oe.Name("parentDataProperty"),rootData:new oe.Name("rootData"),dynamicAnchors:new oe.Name("dynamicAnchors"),vErrors:new oe.Name("vErrors"),errors:new oe.Name("errors"),this:new oe.Name("this"),self:new oe.Name("self"),scope:new oe.Name("scope"),json:new oe.Name("json"),jsonPos:new oe.Name("jsonPos"),jsonLen:new oe.Name("jsonLen"),jsonPart:new oe.Name("jsonPart")};Fo.default=jm});var zt=I(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extendErrors=pe.resetErrorsCount=pe.reportExtraError=pe.reportError=pe.keyword$DataError=pe.keywordError=void 0;var H=A(),gi=z(),ue=Ne();pe.keywordError={message:({keyword:t})=>(0,H.str)`must pass "${t}" keyword validation`};pe.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,H.str)`"${t}" keyword must be ${e} ($data)`:(0,H.str)`"${t}" keyword is invalid ($data)`};function km(t,e=pe.keywordError,r,n){let{it:a}=t,{gen:s,compositeRule:i,allErrors:o}=a,p=zf(t,e,r);(n!=null?n:i||o)?Hf(s,p):Vf(a,(0,H._)`[${p}]`)}pe.reportError=km;function Sm(t,e=pe.keywordError,r){let{it:n}=t,{gen:a,compositeRule:s,allErrors:i}=n,o=zf(t,e,r);Hf(a,o),s||i||Vf(n,ue.default.vErrors)}pe.reportExtraError=Sm;function vm(t,e){t.assign(ue.default.errors,e),t.if((0,H._)`${ue.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,H._)`${ue.default.vErrors}.length`,e),()=>t.assign(ue.default.vErrors,null)))}pe.resetErrorsCount=vm;function Em({gen:t,keyword:e,schemaValue:r,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",a,ue.default.errors,o=>{t.const(i,(0,H._)`${ue.default.vErrors}[${o}]`),t.if((0,H._)`${i}.instancePath === undefined`,()=>t.assign((0,H._)`${i}.instancePath`,(0,H.strConcat)(ue.default.instancePath,s.errorPath))),t.assign((0,H._)`${i}.schemaPath`,(0,H.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,H._)`${i}.schema`,r),t.assign((0,H._)`${i}.data`,n))})}pe.extendErrors=Em;function Hf(t,e){let r=t.const("err",e);t.if((0,H._)`${ue.default.vErrors} === null`,()=>t.assign(ue.default.vErrors,(0,H._)`[${r}]`),(0,H._)`${ue.default.vErrors}.push(${r})`),t.code((0,H._)`${ue.default.errors}++`)}function Vf(t,e){let{gen:r,validateName:n,schemaEnv:a}=t;a.$async?r.throw((0,H._)`new ${t.ValidationError}(${e})`):(r.assign((0,H._)`${n}.errors`,e),r.return(!1))}var at={keyword:new H.Name("keyword"),schemaPath:new H.Name("schemaPath"),params:new H.Name("params"),propertyName:new H.Name("propertyName"),message:new H.Name("message"),schema:new H.Name("schema"),parentSchema:new H.Name("parentSchema")};function zf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,H._)`{}`:Gm(t,e,r)}function Gm(t,e,r={}){let{gen:n,it:a}=t,s=[Cm(a,r),Rm(t,r)];return Mm(t,e,s),n.object(...s)}function Cm({errorPath:t},{instancePath:e}){let r=e?(0,H.str)`${t}${(0,gi.getErrorPath)(e,gi.Type.Str)}`:t;return[ue.default.instancePath,(0,H.strConcat)(ue.default.instancePath,r)]}function Rm({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let a=n?e:(0,H.str)`${e}/${t}`;return r&&(a=(0,H.str)`${a}${(0,gi.getErrorPath)(r,gi.Type.Str)}`),[at.schemaPath,a]}function Mm(t,{params:e,message:r},n){let{keyword:a,data:s,schemaValue:i,it:o}=t,{opts:p,propertyName:m,topSchemaRef:c,schemaPath:h}=o;n.push([at.keyword,a],[at.params,typeof e=="function"?e(t):e||(0,H._)`{}`]),p.messages&&n.push([at.message,typeof r=="function"?r(t):r]),p.verbose&&n.push([at.schema,i],[at.parentSchema,(0,H._)`${c}${h}`],[ue.default.data,s]),m&&n.push([at.propertyName,m])}});var Qf=I(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.boolOrEmptySchema=_t.topBoolOrEmptySchema=void 0;var Pm=zt(),Wm=A(),Dm=Ne(),Am={message:"boolean schema is false"};function Nm(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Jf(t,!1):typeof r=="object"&&r.$async===!0?e.return(Dm.default.data):(e.assign((0,Wm._)`${n}.errors`,null),e.return(!0))}_t.topBoolOrEmptySchema=Nm;function Um(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Jf(t)):r.var(e,!0)}_t.boolOrEmptySchema=Um;function Jf(t,e){let{gen:r,data:n}=t,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Pm.reportError)(a,Am,void 0,e)}});var xo=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.getRules=gt.isJSONType=void 0;var qm=["string","number","integer","boolean","null","object","array"],Bm=new Set(qm);function Lm(t){return typeof t=="string"&&Bm.has(t)}gt.isJSONType=Lm;function Hm(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:P(b({},t),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}gt.getRules=Hm});var bo=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.shouldUseRule=Le.shouldUseGroup=Le.schemaHasRulesForType=void 0;function Vm({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Kf(t,n)}Le.schemaHasRulesForType=Vm;function Kf(t,e){return e.rules.some(r=>Yf(t,r))}Le.shouldUseGroup=Kf;function Yf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Le.shouldUseRule=Yf});var Jt=I(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var zm=xo(),Jm=bo(),Qm=zt(),M=A(),Xf=z(),Tt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Tt||(de.DataType=Tt={}));function Km(t){let e=Zf(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Km;function Zf(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(zm.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=Zf;function Ym(t,e){let{gen:r,data:n,opts:a}=t,s=Xm(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Jm.schemaHasRulesForType)(t,e[0]));if(i){let o=$o(e,n,a.strictNumbers,Tt.Wrong);r.if(o,()=>{s.length?Zm(t,e,s):wo(t)})}return i}de.coerceAndCheckDataType=Ym;var eu=new Set(["string","number","integer","boolean","null"]);function Xm(t,e){return e?t.filter(r=>eu.has(r)||e==="array"&&r==="array"):[]}function Zm(t,e,r){let{gen:n,data:a,opts:s}=t,i=n.let("dataType",(0,M._)`typeof ${a}`),o=n.let("coerced",(0,M._)`undefined`);s.coerceTypes==="array"&&n.if((0,M._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,M._)`${a}[0]`).assign(i,(0,M._)`typeof ${a}`).if($o(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,M._)`${o} !== undefined`);for(let m of r)(eu.has(m)||m==="array"&&s.coerceTypes==="array")&&p(m);n.else(),wo(t),n.endIf(),n.if((0,M._)`${o} !== undefined`,()=>{n.assign(a,o),eh(t,o)});function p(m){switch(m){case"string":n.elseIf((0,M._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,M._)`"" + ${a}`).elseIf((0,M._)`${a} === null`).assign(o,(0,M._)`""`);return;case"number":n.elseIf((0,M._)`${i} == "boolean" || ${a} === null
3
+ || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,M._)`+${a}`);return;case"integer":n.elseIf((0,M._)`${i} === "boolean" || ${a} === null
4
+ || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,M._)`+${a}`);return;case"boolean":n.elseIf((0,M._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,M._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,M._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,M._)`${i} === "string" || ${i} === "number"
5
+ || ${i} === "boolean" || ${a} === null`).assign(o,(0,M._)`[${a}]`)}}}function eh({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,M._)`${e} !== undefined`,()=>t.assign((0,M._)`${e}[${r}]`,n))}function Oo(t,e,r,n=Tt.Correct){let a=n===Tt.Correct?M.operators.EQ:M.operators.NEQ,s;switch(t){case"null":return(0,M._)`${e} ${a} null`;case"array":s=(0,M._)`Array.isArray(${e})`;break;case"object":s=(0,M._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,M._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,M._)`typeof ${e} ${a} ${t}`}return n===Tt.Correct?s:(0,M.not)(s);function i(o=M.nil){return(0,M.and)((0,M._)`typeof ${e} == "number"`,o,r?(0,M._)`isFinite(${e})`:M.nil)}}de.checkDataType=Oo;function $o(t,e,r,n){if(t.length===1)return Oo(t[0],e,r,n);let a,s=(0,Xf.toHash)(t);if(s.array&&s.object){let i=(0,M._)`typeof ${e} != "object"`;a=s.null?i:(0,M._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=M.nil;s.number&&delete s.integer;for(let i in s)a=(0,M.and)(a,Oo(i,e,r,n));return a}de.checkDataTypes=$o;var th={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,M._)`{type: ${t}}`:(0,M._)`{type: ${e}}`};function wo(t){let e=rh(t);(0,Qm.reportError)(e,th)}de.reportTypeError=wo;function rh(t){let{gen:e,data:r,schema:n}=t,a=(0,Xf.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:t}}});var ru=I(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.assignDefaults=void 0;var yt=A(),nh=z();function ah(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let a in r)tu(t,a,r[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>tu(t,s,a.default))}Ti.assignDefaults=ah;function tu(t,e,r){let{gen:n,compositeRule:a,data:s,opts:i}=t;if(r===void 0)return;let o=(0,yt._)`${s}${(0,yt.getProperty)(e)}`;if(a){(0,nh.checkStrictMode)(t,`default is ignored for: ${o}`);return}let p=(0,yt._)`${o} === undefined`;i.useDefaults==="empty"&&(p=(0,yt._)`${p} || ${o} === null || ${o} === ""`),n.if(p,(0,yt._)`${o} = ${(0,yt.stringify)(r)}`)}});var xe=I(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var Y=A(),Io=z(),He=Ne(),sh=z();function ih(t,e){let{gen:r,data:n,it:a}=t;r.if(ko(r,n,e,a.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Y._)`${e}`},!0),t.error()})}J.checkReportMissingProp=ih;function oh({gen:t,data:e,it:{opts:r}},n,a){return(0,Y.or)(...n.map(s=>(0,Y.and)(ko(t,e,s,r.ownProperties),(0,Y._)`${a} = ${s}`)))}J.checkMissingProp=oh;function ph(t,e){t.setParams({missingProperty:e},!0),t.error()}J.reportMissingProp=ph;function nu(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Y._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=nu;function jo(t,e,r){return(0,Y._)`${nu(t)}.call(${e}, ${r})`}J.isOwnProperty=jo;function dh(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} !== undefined`;return n?(0,Y._)`${a} && ${jo(t,e,r)}`:a}J.propertyInData=dh;function ko(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} === undefined`;return n?(0,Y.or)(a,(0,Y.not)(jo(t,e,r))):a}J.noPropertyInData=ko;function au(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=au;function fh(t,e){return au(e).filter(r=>!(0,Io.alwaysValidSchema)(t,e[r]))}J.schemaProperties=fh;function uh({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,p,m){let c=m?(0,Y._)`${t}, ${e}, ${n}${a}`:e,h=[[He.default.instancePath,(0,Y.strConcat)(He.default.instancePath,s)],[He.default.parentData,i.parentData],[He.default.parentDataProperty,i.parentDataProperty],[He.default.rootData,He.default.rootData]];i.opts.dynamicRef&&h.push([He.default.dynamicAnchors,He.default.dynamicAnchors]);let T=(0,Y._)`${c}, ${r.object(...h)}`;return p!==Y.nil?(0,Y._)`${o}.call(${p}, ${T})`:(0,Y._)`${o}(${T})`}J.callValidateCode=uh;var lh=(0,Y._)`new RegExp`;function ch({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Y._)`${a.code==="new RegExp"?lh:(0,sh.useFunc)(t,a)}(${r}, ${n})`})}J.usePattern=ch;function mh(t){let{gen:e,data:r,keyword:n,it:a}=t,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let p=e.const("len",(0,Y._)`${r}.length`);e.forRange("i",0,p,m=>{t.subschema({keyword:n,dataProp:m,dataPropType:Io.Type.Num},s),e.if((0,Y.not)(s),o)})}}J.validateArray=mh;function hh(t){let{gen:e,schema:r,keyword:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,Io.alwaysValidSchema)(a,p))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((p,m)=>{let c=t.subschema({keyword:n,schemaProp:m,compositeRule:!0},o);e.assign(i,(0,Y._)`${i} || ${o}`),t.mergeValidEvaluated(c,o)||e.if((0,Y.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}J.validateUnion=hh});var ou=I(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.validateKeywordUsage=Ee.validSchemaType=Ee.funcKeywordCode=Ee.macroKeywordCode=void 0;var le=A(),st=Ne(),_h=xe(),gh=zt();function Th(t,e){let{gen:r,keyword:n,schema:a,parentSchema:s,it:i}=t,o=e.macro.call(i.self,a,s,i),p=iu(r,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let m=r.name("valid");t.subschema({schema:o,schemaPath:le.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:p,compositeRule:!0},m),t.pass(m,()=>t.error(!0))}Ee.macroKeywordCode=Th;function yh(t,e){var r;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:p}=t;xh(p,e);let m=!o&&e.compile?e.compile.call(p.self,s,i,p):e.validate,c=iu(n,a,m),h=n.let("valid");t.block$data(h,T),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function T(){if(e.errors===!1)y(),e.modifying&&su(t),F(()=>t.error());else{let $=e.async?x():g();e.modifying&&su(t),F(()=>Fh(t,$))}}function x(){let $=n.let("ruleErrs",null);return n.try(()=>y((0,le._)`await `),B=>n.assign(h,!1).if((0,le._)`${B} instanceof ${p.ValidationError}`,()=>n.assign($,(0,le._)`${B}.errors`),()=>n.throw(B))),$}function g(){let $=(0,le._)`${c}.errors`;return n.assign($,null),y(le.nil),$}function y($=e.async?(0,le._)`await `:le.nil){let B=p.opts.passContext?st.default.this:st.default.self,U=!("compile"in e&&!o||e.schema===!1);n.assign(h,(0,le._)`${$}${(0,_h.callValidateCode)(t,c,B,U)}`,e.modifying)}function F($){var B;n.if((0,le.not)((B=e.valid)!==null&&B!==void 0?B:h),$)}}Ee.funcKeywordCode=yh;function su(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,le._)`${n.parentData}[${n.parentDataProperty}]`))}function Fh(t,e){let{gen:r}=t;r.if((0,le._)`Array.isArray(${e})`,()=>{r.assign(st.default.vErrors,(0,le._)`${st.default.vErrors} === null ? ${e} : ${st.default.vErrors}.concat(${e})`).assign(st.default.errors,(0,le._)`${st.default.vErrors}.length`),(0,gh.extendErrors)(t)},()=>t.error())}function xh({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function iu(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,le.stringify)(r)})}function bh(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t=="undefined")}Ee.validSchemaType=bh;function Oh({schema:t,opts:e,self:r,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(t[s])){let p=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}Ee.validateKeywordUsage=Oh});var du=I(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.extendSubschemaMode=Ve.extendSubschemaData=Ve.getSubschema=void 0;var Ge=A(),pu=z();function $h(t,{keyword:e,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,Ge._)`${t.schemaPath}${(0,Ge.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,Ge._)`${t.schemaPath}${(0,Ge.getProperty)(e)}${(0,Ge.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,pu.escapeFragment)(r)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Ve.getSubschema=$h;function wh(t,e,{dataProp:r,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(r!==void 0){let{errorPath:m,dataPathArr:c,opts:h}=e,T=o.let("data",(0,Ge._)`${e.data}${(0,Ge.getProperty)(r)}`,!0);p(T),t.errorPath=(0,Ge.str)`${m}${(0,pu.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,Ge._)`${r}`,t.dataPathArr=[...c,t.parentDataProperty]}if(a!==void 0){let m=a instanceof Ge.Name?a:o.let("data",a,!0);p(m),i!==void 0&&(t.propertyName=i)}s&&(t.dataTypes=s);function p(m){t.data=m,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,m]}}Ve.extendSubschemaData=wh;function Ih(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(t.compositeRule=n),a!==void 0&&(t.createErrors=a),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}Ve.extendSubschemaMode=Ih});var So=I((FI,fu)=>{"use strict";fu.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var lu=I((xI,uu)=>{"use strict";var ze=uu.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};yi(e,n,a,t,"",t)};ze.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ze.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ze.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ze.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yi(t,e,r,n,a,s,i,o,p,m){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,p,m);for(var c in n){var h=n[c];if(Array.isArray(h)){if(c in ze.arrayKeywords)for(var T=0;T<h.length;T++)yi(t,e,r,h[T],a+"/"+c+"/"+T,s,a,c,n,T)}else if(c in ze.propsKeywords){if(h&&typeof h=="object")for(var x in h)yi(t,e,r,h[x],a+"/"+c+"/"+jh(x),s,a,c,n,x)}else(c in ze.keywords||t.allKeys&&!(c in ze.skipKeywords))&&yi(t,e,r,h,a+"/"+c,s,a,c,n)}r(n,a,s,i,o,p,m)}}function jh(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qt=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getSchemaRefs=he.resolveUrl=he.normalizeId=he._getFullPath=he.getFullPath=he.inlineRef=void 0;var kh=z(),Sh=So(),vh=lu(),Eh=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Gh(t,e=!0){return typeof t=="boolean"?!0:e===!0?!vo(t):e?cu(t)<=e:!1}he.inlineRef=Gh;var Ch=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function vo(t){for(let e in t){if(Ch.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(vo)||typeof r=="object"&&vo(r))return!0}return!1}function cu(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Eh.has(r)&&(typeof t[r]=="object"&&(0,kh.eachItem)(t[r],n=>e+=cu(n)),e===1/0))return 1/0}return e}function mu(t,e="",r){r!==!1&&(e=Ft(e));let n=t.parse(e);return hu(t,n)}he.getFullPath=mu;function hu(t,e){return t.serialize(e).split("#")[0]+"#"}he._getFullPath=hu;var Rh=/#\/?$/;function Ft(t){return t?t.replace(Rh,""):""}he.normalizeId=Ft;function Mh(t,e,r){return r=Ft(r),t.resolve(e,r)}he.resolveUrl=Mh;var Ph=/^[a-z_][-a-z0-9._]*$/i;function Wh(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,a=Ft(t[r]||e),s={"":a},i=mu(n,a,!1),o={},p=new Set;return vh(t,{allKeys:!0},(h,T,x,g)=>{if(g===void 0)return;let y=i+T,F=s[g];typeof h[r]=="string"&&(F=$.call(this,h[r])),B.call(this,h.$anchor),B.call(this,h.$dynamicAnchor),s[T]=F;function $(U){let K=this.opts.uriResolver.resolve;if(U=Ft(F?K(F,U):U),p.has(U))throw c(U);p.add(U);let G=this.refs[U];return typeof G=="string"&&(G=this.refs[G]),typeof G=="object"?m(h,G.schema,U):U!==Ft(y)&&(U[0]==="#"?(m(h,o[U],U),o[U]=h):this.refs[U]=y),U}function B(U){if(typeof U=="string"){if(!Ph.test(U))throw new Error(`invalid anchor "${U}"`);$.call(this,`#${U}`)}}}),o;function m(h,T,x){if(T!==void 0&&!Sh(h,T))throw c(x)}function c(h){return new Error(`reference "${h}" resolves to more than one schema`)}}he.getSchemaRefs=Wh});var Xt=I(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.getData=Je.KeywordCxt=Je.validateFunctionCode=void 0;var Fu=Qf(),_u=Jt(),Go=bo(),Fi=Jt(),Dh=ru(),Yt=ou(),Eo=du(),k=A(),E=Ne(),Ah=Qt(),Ue=z(),Kt=zt();function Nh(t){if(Ou(t)&&($u(t),bu(t))){Bh(t);return}xu(t,()=>(0,Fu.topBoolOrEmptySchema)(t))}Je.validateFunctionCode=Nh;function xu({gen:t,validateName:e,schema:r,schemaEnv:n,opts:a},s){a.code.es5?t.func(e,(0,k._)`${E.default.data}, ${E.default.valCxt}`,n.$async,()=>{t.code((0,k._)`"use strict"; ${gu(r,a)}`),qh(t,a),t.code(s)}):t.func(e,(0,k._)`${E.default.data}, ${Uh(a)}`,n.$async,()=>t.code(gu(r,a)).code(s))}function Uh(t){return(0,k._)`{${E.default.instancePath}="", ${E.default.parentData}, ${E.default.parentDataProperty}, ${E.default.rootData}=${E.default.data}${t.dynamicRef?(0,k._)`, ${E.default.dynamicAnchors}={}`:k.nil}}={}`}function qh(t,e){t.if(E.default.valCxt,()=>{t.var(E.default.instancePath,(0,k._)`${E.default.valCxt}.${E.default.instancePath}`),t.var(E.default.parentData,(0,k._)`${E.default.valCxt}.${E.default.parentData}`),t.var(E.default.parentDataProperty,(0,k._)`${E.default.valCxt}.${E.default.parentDataProperty}`),t.var(E.default.rootData,(0,k._)`${E.default.valCxt}.${E.default.rootData}`),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`${E.default.valCxt}.${E.default.dynamicAnchors}`)},()=>{t.var(E.default.instancePath,(0,k._)`""`),t.var(E.default.parentData,(0,k._)`undefined`),t.var(E.default.parentDataProperty,(0,k._)`undefined`),t.var(E.default.rootData,E.default.data),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`{}`)})}function Bh(t){let{schema:e,opts:r,gen:n}=t;xu(t,()=>{r.$comment&&e.$comment&&Iu(t),Jh(t),n.let(E.default.vErrors,null),n.let(E.default.errors,0),r.unevaluated&&Lh(t),wu(t),Yh(t)})}function Lh(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,k._)`${r}.evaluated`),e.if((0,k._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,k._)`${t.evaluated}.props`,(0,k._)`undefined`)),e.if((0,k._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,k._)`${t.evaluated}.items`,(0,k._)`undefined`))}function gu(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,k._)`/*# sourceURL=${r} */`:k.nil}function Hh(t,e){if(Ou(t)&&($u(t),bu(t))){Vh(t,e);return}(0,Fu.boolOrEmptySchema)(t,e)}function bu({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Ou(t){return typeof t.schema!="boolean"}function Vh(t,e){let{schema:r,gen:n,opts:a}=t;a.$comment&&r.$comment&&Iu(t),Qh(t),Kh(t);let s=n.const("_errs",E.default.errors);wu(t,s),n.var(e,(0,k._)`${s} === ${E.default.errors}`)}function $u(t){(0,Ue.checkUnknownRules)(t),zh(t)}function wu(t,e){if(t.opts.jtd)return Tu(t,[],!1,e);let r=(0,_u.getSchemaTypes)(t.schema),n=(0,_u.coerceAndCheckDataType)(t,r);Tu(t,r,!n,e)}function zh(t){let{schema:e,errSchemaPath:r,opts:n,self:a}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ue.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Jh(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ue.checkStrictMode)(t,"default is ignored in the schema root")}function Qh(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Ah.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Kh(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Iu({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:a}){let s=r.$comment;if(a.$comment===!0)t.code((0,k._)`${E.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,k.str)`${n}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,k._)`${E.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function Yh(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=t;r.$async?e.if((0,k._)`${E.default.errors} === 0`,()=>e.return(E.default.data),()=>e.throw((0,k._)`new ${a}(${E.default.vErrors})`)):(e.assign((0,k._)`${n}.errors`,E.default.vErrors),s.unevaluated&&Xh(t),e.return((0,k._)`${E.default.errors} === 0`))}function Xh({gen:t,evaluated:e,props:r,items:n}){r instanceof k.Name&&t.assign((0,k._)`${e}.props`,r),n instanceof k.Name&&t.assign((0,k._)`${e}.items`,n)}function Tu(t,e,r,n){let{gen:a,schema:s,data:i,allErrors:o,opts:p,self:m}=t,{RULES:c}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,Ue.schemaHasRulesButRef)(s,c))){a.block(()=>ku(t,"$ref",c.all.$ref.definition));return}p.jtd||Zh(t,e),a.block(()=>{for(let T of c.rules)h(T);h(c.post)});function h(T){(0,Go.shouldUseGroup)(s,T)&&(T.type?(a.if((0,Fi.checkDataType)(T.type,i,p.strictNumbers)),yu(t,T),e.length===1&&e[0]===T.type&&r&&(a.else(),(0,Fi.reportTypeError)(t)),a.endIf()):yu(t,T),o||a.if((0,k._)`${E.default.errors} === ${n||0}`))}}function yu(t,e){let{gen:r,schema:n,opts:{useDefaults:a}}=t;a&&(0,Dh.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Go.shouldUseRule)(n,s)&&ku(t,s.keyword,s.definition,e.type)})}function Zh(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(e_(t,e),t.opts.allowUnionTypes||t_(t,e),r_(t,t.dataTypes))}function e_(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{ju(t.dataTypes,r)||Co(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),a_(t,e)}}function t_(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Co(t,"use allowUnionTypes to allow union type keyword")}function r_(t,e){let r=t.self.RULES.all;for(let n in r){let a=r[n];if(typeof a=="object"&&(0,Go.shouldUseRule)(t.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>n_(e,i))&&Co(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function n_(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function ju(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function a_(t,e){let r=[];for(let n of t.dataTypes)ju(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Co(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ue.checkStrictMode)(t,e,t.opts.strictTypes)}var xi=class{constructor(e,r,n){if((0,Yt.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ue.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Su(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Yt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",E.default.errors))}result(e,r,n){this.failResult((0,k.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,k.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,k._)`${r} !== undefined && (${(0,k.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Kt.reportExtraError:Kt.reportError)(this,this.def.error,r)}$dataError(){(0,Kt.reportError)(this,this.def.$dataError||Kt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=k.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=k.nil,r=k.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,k.or)((0,k._)`${a} === undefined`,r)),e!==k.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==k.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:a,it:s}=this;return(0,k.or)(i(),o());function i(){if(n.length){if(!(r instanceof k.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,k._)`${(0,Fi.checkDataTypes)(p,r,s.opts.strictNumbers,Fi.DataType.Wrong)}`}return k.nil}function o(){if(a.validateSchema){let p=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,k._)`!${p}(${r})`}return k.nil}}subschema(e,r){let n=(0,Eo.getSubschema)(this.it,e);(0,Eo.extendSubschemaData)(n,this.it,e),(0,Eo.extendSubschemaMode)(n,e);let a=P(b(b({},this.it),n),{items:void 0,props:void 0});return Hh(a,r),a}mergeEvaluated(e,r){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ue.mergeEvaluated.props(a,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ue.mergeEvaluated.items(a,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(e,k.Name)),!0}};Je.KeywordCxt=xi;function ku(t,e,r,n){let a=new xi(t,r,e);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Yt.funcKeywordCode)(a,r):"macro"in r?(0,Yt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Yt.funcKeywordCode)(a,r)}var s_=/^\/(?:[^~]|~0|~1)*$/,i_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Su(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let a,s;if(t==="")return E.default.rootData;if(t[0]==="/"){if(!s_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t,s=E.default.rootData}else{let m=i_.exec(t);if(!m)throw new Error(`Invalid JSON-pointer: ${t}`);let c=+m[1];if(a=m[2],a==="#"){if(c>=e)throw new Error(p("property/index",c));return n[e-c]}if(c>e)throw new Error(p("data",c));if(s=r[e-c],!a)return s}let i=s,o=a.split("/");for(let m of o)m&&(s=(0,k._)`${s}${(0,k.getProperty)((0,Ue.unescapeJsonPointer)(m))}`,i=(0,k._)`${i} && ${s}`);return i;function p(m,c){return`Cannot access ${m} ${c} levels up, current level is ${e}`}}Je.getData=Su});var bi=I(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});var Ro=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Mo.default=Ro});var Zt=I(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var Po=Qt(),Wo=class extends Error{constructor(e,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Po.resolveUrl)(e,r,n),this.missingSchema=(0,Po.normalizeId)((0,Po.getFullPath)(e,this.missingRef))}};Do.default=Wo});var $i=I(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.resolveSchema=be.getCompilingSchema=be.resolveRef=be.compileSchema=be.SchemaEnv=void 0;var Ie=A(),o_=bi(),it=Ne(),je=Qt(),vu=z(),p_=Xt(),xt=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,je.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};be.SchemaEnv=xt;function No(t){let e=Eu.call(this,t);if(e)return e;let r=(0,je.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Ie.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;t.$async&&(o=i.scopeValue("Error",{ref:o_.default,code:(0,Ie._)`require("ajv/dist/runtime/validation_error").default`}));let p=i.scopeName("validate");t.validateName=p;let m={gen:i,allErrors:this.opts.allErrors,data:it.default.data,parentData:it.default.parentData,parentDataProperty:it.default.parentDataProperty,dataNames:[it.default.data],dataPathArr:[Ie.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ie.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Ie.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ie._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(t),(0,p_.validateFunctionCode)(m),i.optimize(this.opts.code.optimize);let h=i.toString();c=`${i.scopeRefs(it.default.scope)}return ${h}`,this.opts.code.process&&(c=this.opts.code.process(c,t));let x=new Function(`${it.default.self}`,`${it.default.scope}`,c)(this,this.scope.get());if(this.scope.value(p,{ref:x}),x.errors=null,x.schema=t.schema,x.schemaEnv=t,t.$async&&(x.$async=!0),this.opts.code.source===!0&&(x.source={validateName:p,validateCode:h,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:y}=m;x.evaluated={props:g instanceof Ie.Name?void 0:g,items:y instanceof Ie.Name?void 0:y,dynamicProps:g instanceof Ie.Name,dynamicItems:y instanceof Ie.Name},x.source&&(x.source.evaluated=(0,Ie.stringify)(x.evaluated))}return t.validate=x,t}catch(h){throw delete t.validate,delete t.validateName,c&&this.logger.error("Error compiling schema, function code:",c),h}finally{this._compilations.delete(t)}}be.compileSchema=No;function d_(t,e,r){var n;r=(0,je.resolveUrl)(this.opts.uriResolver,e,r);let a=t.refs[r];if(a)return a;let s=l_.call(this,t,r);if(s===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;i&&(s=new xt({schema:i,schemaId:o,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=f_.call(this,s)}be.resolveRef=d_;function f_(t){return(0,je.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:No.call(this,t)}function Eu(t){for(let e of this._compilations)if(u_(e,t))return e}be.getCompilingSchema=Eu;function u_(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function l_(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Oi.call(this,t,e)}function Oi(t,e){let r=this.opts.uriResolver.parse(e),n=(0,je._getFullPath)(this.opts.uriResolver,r),a=(0,je.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===a)return Ao.call(this,r,t);let s=(0,je.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=Oi.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Ao.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||No.call(this,i),s===(0,je.normalizeId)(e)){let{schema:o}=i,{schemaId:p}=this.opts,m=o[p];return m&&(a=(0,je.resolveUrl)(this.opts.uriResolver,a,m)),new xt({schema:o,schemaId:p,root:t,baseId:a})}return Ao.call(this,r,i)}}be.resolveSchema=Oi;var c_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ao(t,{baseId:e,schema:r,root:n}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,vu.unescapeFragment)(o)];if(p===void 0)return;r=p;let m=typeof r=="object"&&r[this.opts.schemaId];!c_.has(o)&&m&&(e=(0,je.resolveUrl)(this.opts.uriResolver,e,m))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,vu.schemaHasRulesButRef)(r,this.RULES)){let o=(0,je.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=Oi.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new xt({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var Gu=I((kI,m_)=>{m_.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ru=I((SI,Cu)=>{"use strict";var h_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Cu.exports={HEX:h_}});var qu=I((vI,Uu)=>{"use strict";var{HEX:__}=Ru();function Du(t){if(Nu(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=e;return r?{host:T_(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function Uo(t,e=!1){let r="",n=!0;for(let a of t){if(__[a]===void 0)return;a!=="0"&&n===!0&&(n=!1),n||(r+=a)}return e&&r.length===0&&(r="0"),r}function g_(t){let e=0,r={error:!1,address:"",zone:""},n=[],a=[],s=!1,i=!1,o=!1;function p(){if(a.length){if(s===!1){let m=Uo(a);if(m!==void 0)n.push(m);else return r.error=!0,!1}a.length=0}return!0}for(let m=0;m<t.length;m++){let c=t[m];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!p())break;if(e++,n.push(":"),e>7){r.error=!0;break}m-1>=0&&t[m-1]===":"&&(i=!0);continue}else if(c==="%"){if(!p())break;s=!0}else{a.push(c);continue}}return a.length&&(s?r.zone=a.join(""):o?n.push(a.join("")):n.push(Uo(a))),r.address=n.join(""),r}function Au(t,e={}){if(Nu(t,":")<2)return{host:t,isIPV6:!1};let r=g_(t);if(r.error)return{host:t,isIPV6:!1};{let n=r.address,a=r.address;return r.zone&&(n+="%"+r.zone,a+="%25"+r.zone),{host:n,escapedHost:a,isIPV6:!0}}}function T_(t,e){let r="",n=!0,a=t.length;for(let s=0;s<a;s++){let i=t[s];i==="0"&&n?(s+1<=a&&t[s+1]===e||s+1===a)&&(r+=i,n=!1):(i===e?n=!0:n=!1,r+=i)}return r}function Nu(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}var Mu=/^\.\.?\//u,Pu=/^\/\.(?:\/|$)/u,Wu=/^\/\.\.(?:\/|$)/u,y_=/^\/?(?:.|\n)*?(?=\/|$)/u;function F_(t){let e=[];for(;t.length;)if(t.match(Mu))t=t.replace(Mu,"");else if(t.match(Pu))t=t.replace(Pu,"/");else if(t.match(Wu))t=t.replace(Wu,"/"),e.pop();else if(t==="."||t==="..")t="";else{let r=t.match(y_);if(r){let n=r[0];t=t.slice(n.length),e.push(n)}else throw new Error("Unexpected dot segment condition")}return e.join("")}function x_(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function b_(t,e){let r=[];if(t.userinfo!==void 0&&(r.push(t.userinfo),r.push("@")),t.host!==void 0){let n=unescape(t.host),a=Du(n);if(a.isIPV4)n=a.host;else{let s=Au(a.host,{isIPV4:!1});s.isIPV6===!0?n=`[${s.escapedHost}]`:n=t.host}r.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(r.push(":"),r.push(String(t.port))),r.length?r.join(""):void 0}Uu.exports={recomposeAuthority:b_,normalizeComponentEncoding:x_,removeDotSegments:F_,normalizeIPv4:Du,normalizeIPv6:Au,stringArrayToHexStripped:Uo}});var Ju=I((EI,zu)=>{"use strict";var O_=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,$_=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Bu(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}function Lu(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Hu(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function w_(t){return t.secure=Bu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function I_(t){if((t.port===(Bu(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function j_(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match($_);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let a=`${n}:${e.nid||t.nid}`,s=qo[a];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function k_(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),a=`${r}:${e.nid||n}`,s=qo[a];s&&(t=s.serialize(t,e));let i=t,o=t.nss;return i.path=`${n||e.nid}:${o}`,e.skipEscape=!0,i}function S_(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!O_.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function v_(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Vu={scheme:"http",domainHost:!0,parse:Lu,serialize:Hu},E_={scheme:"https",domainHost:Vu.domainHost,parse:Lu,serialize:Hu},wi={scheme:"ws",domainHost:!0,parse:w_,serialize:I_},G_={scheme:"wss",domainHost:wi.domainHost,parse:wi.parse,serialize:wi.serialize},C_={scheme:"urn",parse:j_,serialize:k_,skipNormalize:!0},R_={scheme:"urn:uuid",parse:S_,serialize:v_,skipNormalize:!0},qo={http:Vu,https:E_,ws:wi,wss:G_,urn:C_,"urn:uuid":R_};zu.exports=qo});var Ku=I((GI,ji)=>{"use strict";var{normalizeIPv6:M_,normalizeIPv4:P_,removeDotSegments:er,recomposeAuthority:W_,normalizeComponentEncoding:Ii}=qu(),Bo=Ju();function D_(t,e){return typeof t=="string"?t=Ce(qe(t,e),e):typeof t=="object"&&(t=qe(Ce(t,e),e)),t}function A_(t,e,r){let n=Object.assign({scheme:"null"},r),a=Qu(qe(t,n),qe(e,n),n,!0);return Ce(a,P(b({},n),{skipEscape:!0}))}function Qu(t,e,r,n){let a={};return n||(t=qe(Ce(t,r),r),e=qe(Ce(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(a.scheme=e.scheme,a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.path?(e.path.charAt(0)==="/"?a.path=er(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?a.path="/"+e.path:t.path?a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:a.path=e.path,a.path=er(a.path)),a.query=e.query):(a.path=t.path,e.query!==void 0?a.query=e.query:a.query=t.query),a.userinfo=t.userinfo,a.host=t.host,a.port=t.port),a.scheme=t.scheme),a.fragment=e.fragment,a}function N_(t,e,r){return typeof t=="string"?(t=unescape(t),t=Ce(Ii(qe(t,r),!0),P(b({},r),{skipEscape:!0}))):typeof t=="object"&&(t=Ce(Ii(t,!0),P(b({},r),{skipEscape:!0}))),typeof e=="string"?(e=unescape(e),e=Ce(Ii(qe(e,r),!0),P(b({},r),{skipEscape:!0}))):typeof e=="object"&&(e=Ce(Ii(e,!0),P(b({},r),{skipEscape:!0}))),t.toLowerCase()===e.toLowerCase()}function Ce(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),a=[],s=Bo[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&(a.push(r.scheme),a.push(":"));let i=W_(r,n);if(i!==void 0&&(n.reference!=="suffix"&&a.push("//"),a.push(i),r.path&&r.path.charAt(0)!=="/"&&a.push("/")),r.path!==void 0){let o=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(o=er(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),a.push(o)}return r.query!==void 0&&(a.push("?"),a.push(r.query)),r.fragment!==void 0&&(a.push("#"),a.push(r.fragment)),a.join("")}var U_=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function q_(t){let e=0;for(let r=0,n=t.length;r<n;++r)if(e=t.charCodeAt(r),e>126||U_[e])return!0;return!1}var B_=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function qe(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let i=t.match(B_);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let p=P_(n.host);if(p.isIPV4===!1){let m=M_(p.host,{isIPV4:!1});n.host=m.host.toLowerCase(),s=m.isIPV6}else n.host=p.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let o=Bo[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&s===!1&&q_(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!o||o&&!o.skipNormalize)&&(a&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),a&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),a&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Lo={SCHEMES:Bo,normalize:D_,resolve:A_,resolveComponents:Qu,equal:N_,serialize:Ce,parse:qe};ji.exports=Lo;ji.exports.default=Lo;ji.exports.fastUri=Lo});var Xu=I(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});var Yu=Ku();Yu.code='require("ajv/dist/runtime/uri").default';Ho.default=Yu});var il=I(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.CodeGen=se.Name=se.nil=se.stringify=se.str=se._=se.KeywordCxt=void 0;var L_=Xt();Object.defineProperty(se,"KeywordCxt",{enumerable:!0,get:function(){return L_.KeywordCxt}});var bt=A();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return bt._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return bt.str}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return bt.stringify}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return bt.nil}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return bt.Name}});Object.defineProperty(se,"CodeGen",{enumerable:!0,get:function(){return bt.CodeGen}});var H_=bi(),nl=Zt(),V_=xo(),tr=$i(),z_=A(),rr=Qt(),ki=Jt(),zo=z(),Zu=Gu(),J_=Xu(),al=(t,e)=>new RegExp(t,e);al.code="new RegExp";var Q_=["removeAdditional","useDefaults","coerceTypes"],K_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Y_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},X_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},el=200;function Z_(t){var e,r,n,a,s,i,o,p,m,c,h,T,x,g,y,F,$,B,U,K,G,Se,Me,Vi,zi;let Ct=t.strict,Ji=(e=t.code)===null||e===void 0?void 0:e.optimize,_f=Ji===!0||Ji===void 0?1:Ji||0,gf=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:al,Rc=(a=t.uriResolver)!==null&&a!==void 0?a:J_.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:Ct)!==null&&i!==void 0?i:!0,strictNumbers:(p=(o=t.strictNumbers)!==null&&o!==void 0?o:Ct)!==null&&p!==void 0?p:!0,strictTypes:(c=(m=t.strictTypes)!==null&&m!==void 0?m:Ct)!==null&&c!==void 0?c:"log",strictTuples:(T=(h=t.strictTuples)!==null&&h!==void 0?h:Ct)!==null&&T!==void 0?T:"log",strictRequired:(g=(x=t.strictRequired)!==null&&x!==void 0?x:Ct)!==null&&g!==void 0?g:!1,code:t.code?P(b({},t.code),{optimize:_f,regExp:gf}):{optimize:_f,regExp:gf},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:el,loopEnum:(F=t.loopEnum)!==null&&F!==void 0?F:el,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(B=t.messages)!==null&&B!==void 0?B:!0,inlineRefs:(U=t.inlineRefs)!==null&&U!==void 0?U:!0,schemaId:(K=t.schemaId)!==null&&K!==void 0?K:"$id",addUsedSchema:(G=t.addUsedSchema)!==null&&G!==void 0?G:!0,validateSchema:(Se=t.validateSchema)!==null&&Se!==void 0?Se:!0,validateFormats:(Me=t.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(Vi=t.unicodeRegExp)!==null&&Vi!==void 0?Vi:!0,int32range:(zi=t.int32range)!==null&&zi!==void 0?zi:!0,uriResolver:Rc}}var nr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=b(b({},e),Z_(e));let{es5:r,lines:n}=this.opts.code;this.scope=new z_.ValueScope({scope:{},prefixes:K_,es5:r,lines:n}),this.logger=sg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,V_.getRules)(),tl.call(this,Y_,e,"NOT SUPPORTED"),tl.call(this,X_,e,"DEPRECATED","warn"),this._metaOpts=ng.call(this),e.formats&&tg.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&rg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),eg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,a=Zu;n==="id"&&(a=b({},Zu),a.id=a.$id,delete a.$id),r&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(r);return"$async"in n||(this.errors=n.errors),a}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,r);function a(c,h){return ee(this,null,function*(){yield s.call(this,c.$schema);let T=this._addSchema(c,h);return T.validate||i.call(this,T)})}function s(c){return ee(this,null,function*(){c&&!this.getSchema(c)&&(yield a.call(this,{$ref:c},!0))})}function i(c){return ee(this,null,function*(){try{return this._compileSchemaEnv(c)}catch(h){if(!(h instanceof nl.default))throw h;return o.call(this,h),yield p.call(this,h.missingSchema),i.call(this,c)}})}function o({missingSchema:c,missingRef:h}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${h} cannot be resolved`)}function p(c){return ee(this,null,function*(){let h=yield m.call(this,c);this.refs[c]||(yield s.call(this,h.$schema)),this.refs[c]||this.addSchema(h,c,r)})}function m(c){return ee(this,null,function*(){let h=this._loading[c];if(h)return h;try{return yield this._loading[c]=n(c)}finally{delete this._loading[c]}})}}addSchema(e,r,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,rr.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,a,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let r;for(;typeof(r=rl.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,a=new tr.SchemaEnv({schema:{},schemaId:n});if(r=tr.resolveSchema.call(this,a,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=rl.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,rr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(og.call(this,n,r),!r)return(0,zo.eachItem)(n,s=>Vo.call(this,s)),this;dg.call(this,r);let a=P(b({},r),{type:(0,ki.getJSONTypes)(r.type),schemaType:(0,ki.getJSONTypes)(r.schemaType)});return(0,zo.eachItem)(n,a.type.length===0?s=>Vo.call(this,s,a):s=>a.type.forEach(i=>Vo.call(this,s,a,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of r){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let p=n[o];if(typeof p!="object")continue;let{$data:m}=p.definition,c=i[o];m&&c&&(i[o]=sl(c))}}return e}_removeAllSchemas(e,r){for(let n in e){let a=e[n];(!r||r.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,r,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let p=this._cache.get(e);if(p!==void 0)return p;n=(0,rr.normalizeId)(i||n);let m=rr.getSchemaRefs.call(this,e,n);return p=new tr.SchemaEnv({schema:e,schemaId:o,meta:r,baseId:n,localRefs:m}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),a&&this.validateSchema(e,!0),p}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):tr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{tr.compileSchema.call(this,e)}finally{this.opts=r}}};nr.ValidationError=H_.default;nr.MissingRefError=nl.default;se.default=nr;function tl(t,e,r,n="error"){for(let a in t){let s=a;s in e&&this.logger[n](`${r}: option ${a}. ${t[s]}`)}}function rl(t){return t=(0,rr.normalizeId)(t),this.schemas[t]||this.refs[t]}function eg(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function tg(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function rg(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function ng(){let t=b({},this.opts);for(let e of Q_)delete t[e];return t}var ag={log(){},warn(){},error(){}};function sg(t){if(t===!1)return ag;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var ig=/^[a-z_$][a-z0-9_$:-]*$/i;function og(t,e){let{RULES:r}=this;if((0,zo.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!ig.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Vo(t,e,r){var n;let a=e==null?void 0:e.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:p})=>p===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[t]=!0,!e)return;let o={keyword:t,definition:P(b({},e),{type:(0,ki.getJSONTypes)(e.type),schemaType:(0,ki.getJSONTypes)(e.schemaType)})};e.before?pg.call(this,i,o,e.before):i.rules.push(o),s.all[t]=o,(n=e.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}function pg(t,e,r){let n=t.rules.findIndex(a=>a.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function dg(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=sl(e)),t.validateSchema=this.compile(e,!0))}var fg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function sl(t){return{anyOf:[t,fg]}}});var ol=I(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var ug={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Jo.default=ug});var ul=I(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.callRef=ot.getValidate=void 0;var lg=Zt(),pl=xe(),_e=A(),Ot=Ne(),dl=$i(),Si=z(),cg={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:p}=n,{root:m}=s;if((r==="#"||r==="#/")&&a===m.baseId)return h();let c=dl.resolveRef.call(p,m,a,r);if(c===void 0)throw new lg.default(n.opts.uriResolver,a,r);if(c instanceof dl.SchemaEnv)return T(c);return x(c);function h(){if(s===m)return vi(t,i,s,s.$async);let g=e.scopeValue("root",{ref:m});return vi(t,(0,_e._)`${g}.validate`,m,m.$async)}function T(g){let y=fl(t,g);vi(t,y,g,g.$async)}function x(g){let y=e.scopeValue("schema",o.code.source===!0?{ref:g,code:(0,_e.stringify)(g)}:{ref:g}),F=e.name("valid"),$=t.subschema({schema:g,dataTypes:[],schemaPath:_e.nil,topSchemaRef:y,errSchemaPath:r},F);t.mergeEvaluated($),t.ok(F)}}};function fl(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,_e._)`${r.scopeValue("wrapper",{ref:e})}.validate`}ot.getValidate=fl;function vi(t,e,r,n){let{gen:a,it:s}=t,{allErrors:i,schemaEnv:o,opts:p}=s,m=p.passContext?Ot.default.this:_e.nil;n?c():h();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");let g=a.let("valid");a.try(()=>{a.code((0,_e._)`await ${(0,pl.callValidateCode)(t,e,m)}`),x(e),i||a.assign(g,!0)},y=>{a.if((0,_e._)`!(${y} instanceof ${s.ValidationError})`,()=>a.throw(y)),T(y),i||a.assign(g,!1)}),t.ok(g)}function h(){t.result((0,pl.callValidateCode)(t,e,m),()=>x(e),()=>T(e))}function T(g){let y=(0,_e._)`${g}.errors`;a.assign(Ot.default.vErrors,(0,_e._)`${Ot.default.vErrors} === null ? ${y} : ${Ot.default.vErrors}.concat(${y})`),a.assign(Ot.default.errors,(0,_e._)`${Ot.default.vErrors}.length`)}function x(g){var y;if(!s.opts.unevaluated)return;let F=(y=r==null?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(F&&!F.dynamicProps)F.props!==void 0&&(s.props=Si.mergeEvaluated.props(a,F.props,s.props));else{let $=a.var("props",(0,_e._)`${g}.evaluated.props`);s.props=Si.mergeEvaluated.props(a,$,s.props,_e.Name)}if(s.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(s.items=Si.mergeEvaluated.items(a,F.items,s.items));else{let $=a.var("items",(0,_e._)`${g}.evaluated.items`);s.items=Si.mergeEvaluated.items(a,$,s.items,_e.Name)}}}ot.callRef=vi;ot.default=cg});var ll=I(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var mg=ol(),hg=ul(),_g=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",mg.default,hg.default];Qo.default=_g});var cl=I(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Ei=A(),Qe=Ei.operators,Gi={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},gg={message:({keyword:t,schemaCode:e})=>(0,Ei.str)`must be ${Gi[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ei._)`{comparison: ${Gi[t].okStr}, limit: ${e}}`},Tg={keyword:Object.keys(Gi),type:"number",schemaType:"number",$data:!0,error:gg,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ei._)`${r} ${Gi[e].fail} ${n} || isNaN(${r})`)}};Ko.default=Tg});var ml=I(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var ar=A(),yg={message:({schemaCode:t})=>(0,ar.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ar._)`{multipleOf: ${t}}`},Fg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:yg,code(t){let{gen:e,data:r,schemaCode:n,it:a}=t,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,ar._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ar._)`${i} !== parseInt(${i})`;t.fail$data((0,ar._)`(${n} === 0 || (${i} = ${r}/${n}, ${o}))`)}};Yo.default=Fg});var _l=I(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});function hl(t){let e=t.length,r=0,n=0,a;for(;n<e;)r++,a=t.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=t.charCodeAt(n),(a&64512)===56320&&n++);return r}Xo.default=hl;hl.code='require("ajv/dist/runtime/ucs2length").default'});var gl=I(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var pt=A(),xg=z(),bg=_l(),Og={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,pt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,pt._)`{limit: ${t}}`},$g={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Og,code(t){let{keyword:e,data:r,schemaCode:n,it:a}=t,s=e==="maxLength"?pt.operators.GT:pt.operators.LT,i=a.opts.unicode===!1?(0,pt._)`${r}.length`:(0,pt._)`${(0,xg.useFunc)(t.gen,bg.default)}(${r})`;t.fail$data((0,pt._)`${i} ${s} ${n}`)}};Zo.default=$g});var Tl=I(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var wg=xe(),Ci=A(),Ig={message:({schemaCode:t})=>(0,Ci.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ci._)`{pattern: ${t}}`},jg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Ig,code(t){let{data:e,$data:r,schema:n,schemaCode:a,it:s}=t,i=s.opts.unicodeRegExp?"u":"",o=r?(0,Ci._)`(new RegExp(${a}, ${i}))`:(0,wg.usePattern)(t,n);t.fail$data((0,Ci._)`!${o}.test(${e})`)}};ep.default=jg});var yl=I(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var sr=A(),kg={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,sr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,sr._)`{limit: ${t}}`},Sg={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:kg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxProperties"?sr.operators.GT:sr.operators.LT;t.fail$data((0,sr._)`Object.keys(${r}).length ${a} ${n}`)}};tp.default=Sg});var Fl=I(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var ir=xe(),or=A(),vg=z(),Eg={message:({params:{missingProperty:t}})=>(0,or.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,or._)`{missingProperty: ${t}}`},Gg={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Eg,code(t){let{gen:e,schema:r,schemaCode:n,data:a,$data:s,it:i}=t,{opts:o}=i;if(!s&&r.length===0)return;let p=r.length>=o.loopRequired;if(i.allErrors?m():c(),o.strictRequired){let x=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if((x==null?void 0:x[y])===void 0&&!g.has(y)){let F=i.schemaEnv.baseId+i.errSchemaPath,$=`required property "${y}" is not defined at "${F}" (strictRequired)`;(0,vg.checkStrictMode)(i,$,i.opts.strictRequired)}}function m(){if(p||s)t.block$data(or.nil,h);else for(let x of r)(0,ir.checkReportMissingProp)(t,x)}function c(){let x=e.let("missing");if(p||s){let g=e.let("valid",!0);t.block$data(g,()=>T(x,g)),t.ok(g)}else e.if((0,ir.checkMissingProp)(t,r,x)),(0,ir.reportMissingProp)(t,x),e.else()}function h(){e.forOf("prop",n,x=>{t.setParams({missingProperty:x}),e.if((0,ir.noPropertyInData)(e,a,x,o.ownProperties),()=>t.error())})}function T(x,g){t.setParams({missingProperty:x}),e.forOf(x,n,()=>{e.assign(g,(0,ir.propertyInData)(e,a,x,o.ownProperties)),e.if((0,or.not)(g),()=>{t.error(),e.break()})},or.nil)}}};rp.default=Gg});var xl=I(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var pr=A(),Cg={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,pr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,pr._)`{limit: ${t}}`},Rg={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Cg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxItems"?pr.operators.GT:pr.operators.LT;t.fail$data((0,pr._)`${r}.length ${a} ${n}`)}};np.default=Rg});var Ri=I(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var bl=So();bl.code='require("ajv/dist/runtime/equal").default';ap.default=bl});var Ol=I(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var sp=Jt(),ie=A(),Mg=z(),Pg=Ri(),Wg={message:({params:{i:t,j:e}})=>(0,ie.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ie._)`{i: ${t}, j: ${e}}`},Dg={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Wg,code(t){let{gen:e,data:r,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=t;if(!n&&!a)return;let p=e.let("valid"),m=s.items?(0,sp.getSchemaTypes)(s.items):[];t.block$data(p,c,(0,ie._)`${i} === false`),t.ok(p);function c(){let g=e.let("i",(0,ie._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(p,!0),e.if((0,ie._)`${g} > 1`,()=>(h()?T:x)(g,y))}function h(){return m.length>0&&!m.some(g=>g==="object"||g==="array")}function T(g,y){let F=e.name("item"),$=(0,sp.checkDataTypes)(m,F,o.opts.strictNumbers,sp.DataType.Wrong),B=e.const("indices",(0,ie._)`{}`);e.for((0,ie._)`;${g}--;`,()=>{e.let(F,(0,ie._)`${r}[${g}]`),e.if($,(0,ie._)`continue`),m.length>1&&e.if((0,ie._)`typeof ${F} == "string"`,(0,ie._)`${F} += "_"`),e.if((0,ie._)`typeof ${B}[${F}] == "number"`,()=>{e.assign(y,(0,ie._)`${B}[${F}]`),t.error(),e.assign(p,!1).break()}).code((0,ie._)`${B}[${F}] = ${g}`)})}function x(g,y){let F=(0,Mg.useFunc)(e,Pg.default),$=e.name("outer");e.label($).for((0,ie._)`;${g}--;`,()=>e.for((0,ie._)`${y} = ${g}; ${y}--;`,()=>e.if((0,ie._)`${F}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(p,!1).break($)})))}}};ip.default=Dg});var $l=I(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});var op=A(),Ag=z(),Ng=Ri(),Ug={message:"must be equal to constant",params:({schemaCode:t})=>(0,op._)`{allowedValue: ${t}}`},qg={keyword:"const",$data:!0,error:Ug,code(t){let{gen:e,data:r,$data:n,schemaCode:a,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,op._)`!${(0,Ag.useFunc)(e,Ng.default)}(${r}, ${a})`):t.fail((0,op._)`${s} !== ${r}`)}};pp.default=qg});var wl=I(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var dr=A(),Bg=z(),Lg=Ri(),Hg={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,dr._)`{allowedValues: ${t}}`},Vg={keyword:"enum",schemaType:"array",$data:!0,error:Hg,code(t){let{gen:e,data:r,$data:n,schema:a,schemaCode:s,it:i}=t;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,p,m=()=>p!=null?p:p=(0,Bg.useFunc)(e,Lg.default),c;if(o||n)c=e.let("valid"),t.block$data(c,h);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let x=e.const("vSchema",s);c=(0,dr.or)(...a.map((g,y)=>T(x,y)))}t.pass(c);function h(){e.assign(c,!1),e.forOf("v",s,x=>e.if((0,dr._)`${m()}(${r}, ${x})`,()=>e.assign(c,!0).break()))}function T(x,g){let y=a[g];return typeof y=="object"&&y!==null?(0,dr._)`${m()}(${r}, ${x}[${g}])`:(0,dr._)`${r} === ${y}`}}};dp.default=Vg});var Il=I(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var zg=cl(),Jg=ml(),Qg=gl(),Kg=Tl(),Yg=yl(),Xg=Fl(),Zg=xl(),eT=Ol(),tT=$l(),rT=wl(),nT=[zg.default,Jg.default,Qg.default,Kg.default,Yg.default,Xg.default,Zg.default,eT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},tT.default,rT.default];fp.default=nT});var lp=I(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateAdditionalItems=void 0;var dt=A(),up=z(),aT={message:({params:{len:t}})=>(0,dt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dt._)`{limit: ${t}}`},sT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:aT,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,up.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}jl(t,n)}};function jl(t,e){let{gen:r,schema:n,data:a,keyword:s,it:i}=t;i.items=!0;let o=r.const("len",(0,dt._)`${a}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,dt._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,up.alwaysValidSchema)(i,n)){let m=r.var("valid",(0,dt._)`${o} <= ${e.length}`);r.if((0,dt.not)(m),()=>p(m)),t.ok(m)}function p(m){r.forRange("i",e.length,o,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:up.Type.Num},m),i.allErrors||r.if((0,dt.not)(m),()=>r.break())})}}fr.validateAdditionalItems=jl;fr.default=sT});var cp=I(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.validateTuple=void 0;var kl=A(),Mi=z(),iT=xe(),oT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Sl(t,"additionalItems",e);r.items=!0,!(0,Mi.alwaysValidSchema)(r,e)&&t.ok((0,iT.validateArray)(t))}};function Sl(t,e,r=t.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=t;c(a),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=Mi.mergeEvaluated.items(n,r.length,o.items));let p=n.name("valid"),m=n.const("len",(0,kl._)`${s}.length`);r.forEach((h,T)=>{(0,Mi.alwaysValidSchema)(o,h)||(n.if((0,kl._)`${m} > ${T}`,()=>t.subschema({keyword:i,schemaProp:T,dataProp:T},p)),t.ok(p))});function c(h){let{opts:T,errSchemaPath:x}=o,g=r.length,y=g===h.minItems&&(g===h.maxItems||h[e]===!1);if(T.strictTuples&&!y){let F=`"${i}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${x}"`;(0,Mi.checkStrictMode)(o,F,T.strictTuples)}}}ur.validateTuple=Sl;ur.default=oT});var vl=I(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pT=cp(),dT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,pT.validateTuple)(t,"items")};mp.default=dT});var Gl=I(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});var El=A(),fT=z(),uT=xe(),lT=lp(),cT={message:({params:{len:t}})=>(0,El.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,El._)`{limit: ${t}}`},mT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:cT,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:a}=r;n.items=!0,!(0,fT.alwaysValidSchema)(n,e)&&(a?(0,lT.validateAdditionalItems)(t,a):t.ok((0,uT.validateArray)(t)))}};hp.default=mT});var Cl=I(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var Oe=A(),Pi=z(),hT={message:({params:{min:t,max:e}})=>e===void 0?(0,Oe.str)`must contain at least ${t} valid item(s)`:(0,Oe.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Oe._)`{minContains: ${t}}`:(0,Oe._)`{minContains: ${t}, maxContains: ${e}}`},_T={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:hT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t,i,o,{minContains:p,maxContains:m}=n;s.opts.next?(i=p===void 0?1:p,o=m):i=1;let c=e.const("len",(0,Oe._)`${a}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,Pi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,Pi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Pi.alwaysValidSchema)(s,r)){let y=(0,Oe._)`${c} >= ${i}`;o!==void 0&&(y=(0,Oe._)`${y} && ${c} <= ${o}`),t.pass(y);return}s.items=!0;let h=e.name("valid");o===void 0&&i===1?x(h,()=>e.if(h,()=>e.break())):i===0?(e.let(h,!0),o!==void 0&&e.if((0,Oe._)`${a}.length > 0`,T)):(e.let(h,!1),T()),t.result(h,()=>t.reset());function T(){let y=e.name("_valid"),F=e.let("count",0);x(y,()=>e.if(y,()=>g(F)))}function x(y,F){e.forRange("i",0,c,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:Pi.Type.Num,compositeRule:!0},y),F()})}function g(y){e.code((0,Oe._)`${y}++`),o===void 0?e.if((0,Oe._)`${y} >= ${i}`,()=>e.assign(h,!0).break()):(e.if((0,Oe._)`${y} > ${o}`,()=>e.assign(h,!1).break()),i===1?e.assign(h,!0):e.if((0,Oe._)`${y} >= ${i}`,()=>e.assign(h,!0)))}}};_p.default=_T});var Pl=I(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.validateSchemaDeps=Re.validatePropertyDeps=Re.error=void 0;var gp=A(),gT=z(),lr=xe();Re.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,gp.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,gp._)`{property: ${t},
6
6
  missingProperty: ${n},
7
7
  depsCount: ${e},
8
- deps: ${r}}`};var Kg={keyword:"dependencies",type:"object",schemaType:"object",error:Pe.error,code(t){let[e,r]=Yg(t);ll(t,e),cl(t,r)}};function Yg({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let a=Array.isArray(t[n])?e:r;a[n]=t[n]}return[e,r]}function ll(t,e=t.schema){let{gen:r,data:n,it:a}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let p=(0,mr.propertyInData)(r,n,i,a.opts.ownProperties);t.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?r.if(p,()=>{for(let c of o)(0,mr.checkReportMissingProp)(t,c)}):(r.if((0,Xo._)`${p} && (${(0,mr.checkMissingProp)(t,o,s)})`),(0,mr.reportMissingProp)(t,s),r.else())}}Pe.validatePropertyDeps=ll;function cl(t,e=t.schema){let{gen:r,data:n,keyword:a,it:s}=t,i=r.name("valid");for(let o in e)(0,Qg.alwaysValidSchema)(s,e[o])||(r.if((0,mr.propertyInData)(r,n,o,s.opts.ownProperties),()=>{let p=t.subschema({keyword:a,schemaProp:o},i);t.mergeValidEvaluated(p,i)},()=>r.var(i,!0)),t.ok(i))}Pe.validateSchemaDeps=cl;Pe.default=Kg});var _l=I(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var hl=W(),Xg=H(),Zg={message:"property name must be valid",params:({params:t})=>(0,hl._)`{propertyName: ${t.propertyName}}`},eT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Zg,code(t){let{gen:e,schema:r,data:n,it:a}=t;if((0,Xg.alwaysValidSchema)(a,r))return;let s=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,hl.not)(s),()=>{t.error(!0),a.allErrors||e.break()})}),t.ok(s)}};Zo.default=eT});var tp=I(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var Ti=be(),je=W(),tT=Ne(),yi=H(),rT={message:"must NOT have additional properties",params:({params:t})=>(0,je._)`{additionalProperty: ${t.additionalProperty}}`},nT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:rT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:p}=i;if(i.props=!0,p.removeAdditional!=="all"&&(0,yi.alwaysValidSchema)(i,r))return;let c=(0,Ti.allSchemaProperties)(n.properties),m=(0,Ti.allSchemaProperties)(n.patternProperties);h(),t.ok((0,je._)`${s} === ${tT.default.errors}`);function h(){e.forIn("key",a,F=>{!c.length&&!m.length?g(F):e.if(y(F),()=>g(F))})}function y(F){let O;if(c.length>8){let B=(0,yi.schemaRefOrVal)(i,n.properties,"properties");O=(0,Ti.isOwnProperty)(e,B,F)}else c.length?O=(0,je.or)(...c.map(B=>(0,je._)`${F} === ${B}`)):O=je.nil;return m.length&&(O=(0,je.or)(O,...m.map(B=>(0,je._)`${(0,Ti.usePattern)(t,B)}.test(${F})`))),(0,je.not)(O)}function b(F){e.code((0,je._)`delete ${a}[${F}]`)}function g(F){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){b(F);return}if(r===!1){t.setParams({additionalProperty:F}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,yi.alwaysValidSchema)(i,r)){let O=e.name("valid");p.removeAdditional==="failing"?(T(F,O,!1),e.if((0,je.not)(O),()=>{t.reset(),b(F)})):(T(F,O),o||e.if((0,je.not)(O),()=>e.break()))}}function T(F,O,B){let A={keyword:"additionalProperties",dataProp:F,dataPropType:yi.Type.Str};B===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(A,O)}}};ep.default=nT});var yl=I(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var aT=er(),gl=be(),rp=H(),Tl=tp(),sT={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Tl.default.code(new aT.KeywordCxt(s,Tl.default,"additionalProperties"));let i=(0,gl.allSchemaProperties)(r);for(let h of i)s.definedProperties.add(h);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=rp.mergeEvaluated.props(e,(0,rp.toHash)(i),s.props));let o=i.filter(h=>!(0,rp.alwaysValidSchema)(s,r[h]));if(o.length===0)return;let p=e.name("valid");for(let h of o)c(h)?m(h):(e.if((0,gl.propertyInData)(e,a,h,s.opts.ownProperties)),m(h),s.allErrors||e.else().var(p,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(p);function c(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}function m(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},p)}}};np.default=sT});var Ol=I(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var bl=be(),bi=W(),Fl=H(),xl=H(),iT={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:a,it:s}=t,{opts:i}=s,o=(0,bl.allSchemaProperties)(r),p=o.filter(T=>(0,Fl.alwaysValidSchema)(s,r[T]));if(o.length===0||p.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&a.properties,m=e.name("valid");s.props!==!0&&!(s.props instanceof bi.Name)&&(s.props=(0,xl.evaluatedPropsToName)(e,s.props));let{props:h}=s;y();function y(){for(let T of o)c&&b(T),s.allErrors?g(T):(e.var(m,!0),g(T),e.if(m))}function b(T){for(let F in c)new RegExp(T).test(F)&&(0,Fl.checkStrictMode)(s,`property ${F} matches pattern ${T} (use allowMatchingProperties)`)}function g(T){e.forIn("key",n,F=>{e.if((0,bi._)`${(0,bl.usePattern)(t,T)}.test(${F})`,()=>{let O=p.includes(T);O||t.subschema({keyword:"patternProperties",schemaProp:T,dataProp:F,dataPropType:xl.Type.Str},m),s.opts.unevaluated&&h!==!0?e.assign((0,bi._)`${h}[${F}]`,!0):!O&&!s.allErrors&&e.if((0,bi.not)(m),()=>e.break())})})}}};ap.default=iT});var $l=I(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var oT=H(),pT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,oT.alwaysValidSchema)(n,r)){t.fail();return}let a=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};sp.default=pT});var wl=I(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var dT=be(),fT={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dT.validateUnion,error:{message:"must match a schema in anyOf"}};ip.default=fT});var Il=I(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var Fi=W(),uT=H(),lT={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Fi._)`{passingSchemas: ${t.passing}}`},cT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:lT,code(t){let{gen:e,schema:r,parentSchema:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=r,i=e.let("valid",!1),o=e.let("passing",null),p=e.name("_valid");t.setParams({passing:o}),e.block(c),t.result(i,()=>t.reset(),()=>t.error(!0));function c(){s.forEach((m,h)=>{let y;(0,uT.alwaysValidSchema)(a,m)?e.var(p,!0):y=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},p),h>0&&e.if((0,Fi._)`${p} && ${i}`).assign(i,!1).assign(o,(0,Fi._)`[${o}, ${h}]`).else(),e.if(p,()=>{e.assign(i,!0),e.assign(o,h),y&&t.mergeEvaluated(y,Fi.Name)})})}}};op.default=cT});var jl=I(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});var mT=H(),hT={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let a=e.name("valid");r.forEach((s,i)=>{if((0,mT.alwaysValidSchema)(n,s))return;let o=t.subschema({keyword:"allOf",schemaProp:i},a);t.ok(a),t.mergeEvaluated(o)})}};pp.default=hT});var Sl=I(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var xi=W(),vl=H(),_T={message:({params:t})=>(0,xi.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,xi._)`{failingKeyword: ${t.ifClause}}`},gT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:_T,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,vl.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=kl(n,"then"),s=kl(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(p(),t.reset(),a&&s){let m=e.let("ifClause");t.setParams({ifClause:m}),e.if(o,c("then",m),c("else",m))}else a?e.if(o,c("then")):e.if((0,xi.not)(o),c("else"));t.pass(i,()=>t.error(!0));function p(){let m=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(m)}function c(m,h){return()=>{let y=t.subschema({keyword:m},o);e.assign(i,o),t.mergeValidEvaluated(y,i),h?e.assign(h,(0,xi._)`${m}`):t.setParams({ifClause:m})}}}};function kl(t,e){let r=t.schema[e];return r!==void 0&&!(0,vl.alwaysValidSchema)(t,r)}dp.default=gT});var Cl=I(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var TT=H(),yT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,TT.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};fp.default=yT});var Gl=I(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});var bT=zo(),FT=pl(),xT=Jo(),OT=fl(),$T=ul(),wT=ml(),IT=_l(),jT=tp(),kT=yl(),vT=Ol(),ST=$l(),CT=wl(),GT=Il(),RT=jl(),PT=Sl(),MT=Cl();function ET(t=!1){let e=[ST.default,CT.default,GT.default,RT.default,PT.default,MT.default,IT.default,jT.default,wT.default,kT.default,vT.default];return t?e.push(FT.default,OT.default):e.push(bT.default,xT.default),e.push($T.default),e}up.default=ET});var Rl=I(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var te=W(),WT={message:({schemaCode:t})=>(0,te.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,te._)`{format: ${t}}`},DT={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:WT,code(t,e){let{gen:r,data:n,$data:a,schema:s,schemaCode:i,it:o}=t,{opts:p,errSchemaPath:c,schemaEnv:m,self:h}=o;if(!p.validateFormats)return;a?y():b();function y(){let g=r.scopeValue("formats",{ref:h.formats,code:p.code.formats}),T=r.const("fDef",(0,te._)`${g}[${i}]`),F=r.let("fType"),O=r.let("format");r.if((0,te._)`typeof ${T} == "object" && !(${T} instanceof RegExp)`,()=>r.assign(F,(0,te._)`${T}.type || "string"`).assign(O,(0,te._)`${T}.validate`),()=>r.assign(F,(0,te._)`"string"`).assign(O,T)),t.fail$data((0,te.or)(B(),A()));function B(){return p.strictSchema===!1?te.nil:(0,te._)`${i} && !${O}`}function A(){let K=m.$async?(0,te._)`(${T}.async ? await ${O}(${n}) : ${O}(${n}))`:(0,te._)`${O}(${n})`,C=(0,te._)`(typeof ${O} == "function" ? ${K} : ${O}.test(${n}))`;return(0,te._)`${O} && ${O} !== true && ${F} === ${e} && !${C}`}}function b(){let g=h.formats[s];if(!g){B();return}if(g===!0)return;let[T,F,O]=A(g);T===e&&t.pass(K());function B(){if(p.strictSchema===!1){h.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function A(C){let ke=C instanceof RegExp?(0,te.regexpCode)(C):p.code.formats?(0,te._)`${p.code.formats}${(0,te.getProperty)(s)}`:void 0,Me=r.scopeValue("formats",{key:s,ref:C,code:ke});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,te._)`${Me}.validate`]:["string",C,Me]}function K(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!m.$async)throw new Error("async format in sync schema");return(0,te._)`await ${O}(${n})`}return typeof F=="function"?(0,te._)`${O}(${n})`:(0,te._)`${O}.test(${n})`}}}};lp.default=DT});var Pl=I(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});var AT=Rl(),NT=[AT.default];cp.default=NT});var Ml=I($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.contentVocabulary=$t.metadataVocabulary=void 0;$t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Wl=I(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var UT=Lu(),qT=al(),BT=Gl(),LT=Pl(),El=Ml(),VT=[UT.default,qT.default,(0,BT.default)(),LT.default,El.metadataVocabulary,El.contentVocabulary];mp.default=VT});var Al=I(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.DiscrError=void 0;var Dl;(function(t){t.Tag="tag",t.Mapping="mapping"})(Dl||(Oi.DiscrError=Dl={}))});var Ul=I(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var wt=W(),hp=Al(),Nl=si(),HT=tr(),zT=H(),JT={message:({params:{discrError:t,tagName:e}})=>t===hp.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,wt._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},QT={keyword:"discriminator",type:"object",schemaType:"object",error:JT,code(t){let{gen:e,data:r,schema:n,parentSchema:a,it:s}=t,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let p=e.let("valid",!1),c=e.const("tag",(0,wt._)`${r}${(0,wt.getProperty)(o)}`);e.if((0,wt._)`typeof ${c} == "string"`,()=>m(),()=>t.error(!1,{discrError:hp.DiscrError.Tag,tag:c,tagName:o})),t.ok(p);function m(){let b=y();e.if(!1);for(let g in b)e.elseIf((0,wt._)`${c} === ${g}`),e.assign(p,h(b[g]));e.else(),t.error(!1,{discrError:hp.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function h(b){let g=e.name("valid"),T=t.subschema({keyword:"oneOf",schemaProp:b},g);return t.mergeEvaluated(T,wt.Name),g}function y(){var b;let g={},T=O(a),F=!0;for(let K=0;K<i.length;K++){let C=i[K];if(C!=null&&C.$ref&&!(0,zT.schemaHasRulesButRef)(C,s.self.RULES)){let Me=C.$ref;if(C=Nl.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Me),C instanceof Nl.SchemaEnv&&(C=C.schema),C===void 0)throw new HT.default(s.opts.uriResolver,s.baseId,Me)}let ke=(b=C==null?void 0:C.properties)===null||b===void 0?void 0:b[o];if(typeof ke!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);F=F&&(T||O(C)),B(ke,K)}if(!F)throw new Error(`discriminator: "${o}" must be required`);return g;function O({required:K}){return Array.isArray(K)&&K.includes(o)}function B(K,C){if(K.const)A(K.const,C);else if(K.enum)for(let ke of K.enum)A(ke,C);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function A(K,C){if(typeof K!="string"||K in g)throw new Error(`discriminator: "${o}" values must be unique strings`);g[K]=C}}}};_p.default=QT});var ql=I((jI,KT)=>{KT.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ll=I((X,gp)=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.MissingRefError=X.ValidationError=X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=X.Ajv=void 0;var YT=Du(),XT=Wl(),ZT=Ul(),Bl=ql(),ey=["/properties"],$i="http://json-schema.org/draft-07/schema",It=class extends YT.default{_addVocabularies(){super._addVocabularies(),XT.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ZT.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Bl,ey):Bl;this.addMetaSchema(e,$i,!1),this.refs["http://json-schema.org/schema"]=$i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema($i)?$i:void 0)}};X.Ajv=It;gp.exports=X=It;gp.exports.Ajv=It;Object.defineProperty(X,"__esModule",{value:!0});X.default=It;var ty=er();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return ty.KeywordCxt}});var jt=W();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return jt._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return jt.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return jt.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return jt.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return jt.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return jt.CodeGen}});var ry=ni();Object.defineProperty(X,"ValidationError",{enumerable:!0,get:function(){return ry.default}});var ny=tr();Object.defineProperty(X,"MissingRefError",{enumerable:!0,get:function(){return ny.default}})});var S$={};bc(S$,{APIFunctions:()=>Ep,APIValidators:()=>Mp,AggregateTransferManyTxInputSchema:()=>Jn,AggregateTransferManyTxOutputSchema:()=>Qn,AggregateTransfersFnInputSchema:()=>vr,AggregateTransfersFnOutputSchema:()=>Sr,AuthError:()=>Ee,AuthenticationCheckTxInputSchema:()=>Kn,AuthenticationCheckTxOutputSchema:()=>Yn,AuthenticationError:()=>Ye,AuthorizationError:()=>As,Client:()=>Pt,ClientFunctions:()=>v,ClientFunctionsEnum:()=>ic,ClientQueryBuilderFunctionsEnum:()=>oc,ClientValidators:()=>w$,ConfigError:()=>Wt,ConstraintError:()=>Dt,ConstsSchema:()=>ft,CreateAccessTokenFnInputSchema:()=>Cr,CreateAccessTokenFnOutputSchema:()=>Gr,CreateAccessTokenTxInputSchema:()=>Xn,CreateAccessTokenTxOutputSchema:()=>Zn,CreateContractFnInputSchema:()=>Rr,CreateContractFnOutputSchema:()=>Pr,CreateContractTxInputSchema:()=>ea,CreateContractTxOutputSchema:()=>ta,CreateDepositFnInputSchema:()=>Mr,CreateDepositFnOutputSchema:()=>Er,CreateDepositTxInputSchema:()=>ra,CreateDepositTxOutputSchema:()=>na,CreateDistributionTxInputSchema:()=>aa,CreateDistributionTxOutputSchema:()=>sa,CreateExchangeFnInputSchema:()=>Wr,CreateExchangeFnOutputSchema:()=>Dr,CreateTokenFnInputSchema:()=>Ar,CreateTokenFnOutputSchema:()=>Nr,CreateTokenTxInputSchema:()=>ia,CreateTokenTxOutputSchema:()=>oa,CreateTransferFnInputSchema:()=>Ur,CreateTransferFnOutputSchema:()=>qr,CreateTransferGroupFnInputSchema:()=>Br,CreateTransferGroupFnOutputSchema:()=>Lr,CreateTransferGroupTxInputSchema:()=>fa,CreateTransferGroupTxOutputSchema:()=>ua,CreateTransferManyTxInputSchema:()=>la,CreateTransferManyTxOutputSchema:()=>ca,CreateTransferTxInputSchema:()=>pa,CreateTransferTxOutputSchema:()=>da,CreateTransfersFnInputSchema:()=>Vr,CreateTransfersFnOutputSchema:()=>Hr,CreateWalletFnInputSchema:()=>zr,CreateWalletFnOutputSchema:()=>Jr,CreateWalletTxInputSchema:()=>ma,CreateWalletTxOutputSchema:()=>ha,CreateWithdrawalFnInputSchema:()=>Qr,CreateWithdrawalFnOutputSchema:()=>Kr,CreateWithdrawalTxInputSchema:()=>_a,CreateWithdrawalTxOutputSchema:()=>ga,DbFilterFunctionBasicEnum:()=>Kp,DbFilterFunctionInEnum:()=>Yp,DbFilterFunctionMetadataBasicEnum:()=>Qp,DbFilterFunctionMetadataInEnum:()=>Xp,DbFilterFunctionMetadataNullEnum:()=>Zp,DbFilterFunctionNullEnum:()=>ed,DbFilterOperatorEnum:()=>td,DbFilterOperatorExtendedEnum:()=>nd,DbFilterOperatorStringEnum:()=>rd,DbModelNameEnum:()=>md,ErrorDescription:()=>tf,ErrorMessage:()=>ef,ErrorType:()=>Ns,Errors:()=>ge,ExportDatabaseTxInputSchema:()=>Ta,ExportDatabaseTxOutputSchema:()=>ya,FindBalanceManyTxInputSchema:()=>ba,FindBalanceManyTxOutputSchema:()=>Fa,FindBalancesFnInputSchema:()=>Yr,FindBalancesFnOutputSchema:()=>Xr,FindTokenManyTxInputSchema:()=>xa,FindTokenManyTxOutputSchema:()=>Oa,FindTokensFnInputSchema:()=>Zr,FindTokensFnOutputSchema:()=>en,FindTransferGroupManyTxInputSchema:()=>$a,FindTransferGroupManyTxOutputSchema:()=>wa,FindTransferGroupsFnInputSchema:()=>tn,FindTransferGroupsFnOutputSchema:()=>rn,FindTransferManyTxInputSchema:()=>Ia,FindTransferManyTxOutputSchema:()=>ja,FindTransfersFnInputSchema:()=>nn,FindTransfersFnOutputSchema:()=>an,FindWalletManyTxInputSchema:()=>ka,FindWalletManyTxOutputSchema:()=>va,FindWalletsFnInputSchema:()=>sn,FindWalletsFnOutputSchema:()=>on,FinishTransactionTxInputSchema:()=>Sa,FinishTransactionTxOutputSchema:()=>Ca,FnConstsSchema:()=>pn,GetBalanceFnInputSchema:()=>dn,GetBalanceFnOutputSchema:()=>fn,GetBalanceHistoryFnInputSchema:()=>un,GetBalanceHistoryFnOutputSchema:()=>ln,GetBalanceHistoryTxInputSchema:()=>Pa,GetBalanceHistoryTxOutputSchema:()=>Ma,GetBalanceTxInputSchema:()=>Ga,GetBalanceTxOutputSchema:()=>Ra,GetDatabaseExportProgressTxInputSchema:()=>Ea,GetDatabaseExportProgressTxOutputSchema:()=>Wa,GetDatabaseImportProgressTxInputSchema:()=>Da,GetDatabaseImportProgressTxOutputSchema:()=>Aa,GetFlagsFnInputSchema:()=>cn,GetFlagsFnOutputSchema:()=>mn,GetFlagsTxInputSchema:()=>Na,GetFlagsTxOutputSchema:()=>Ua,GetStatisticsFnInputSchema:()=>hn,GetStatisticsFnOutputSchema:()=>_n,GetStatisticsTxInputSchema:()=>qa,GetStatisticsTxOutputSchema:()=>Ba,GetTokenFnInputSchema:()=>gn,GetTokenFnOutputSchema:()=>Tn,GetTokenManyTxInputSchema:()=>Ha,GetTokenManyTxOutputSchema:()=>za,GetTokenTxInputSchema:()=>La,GetTokenTxOutputSchema:()=>Va,GetTransferFnInputSchema:()=>yn,GetTransferFnOutputSchema:()=>bn,GetTransferGroupFnInputSchema:()=>Fn,GetTransferGroupFnOutputSchema:()=>xn,GetTransferGroupTxInputSchema:()=>Ka,GetTransferGroupTxOutputSchema:()=>Ya,GetTransferTxInputSchema:()=>Ja,GetTransferTxOutputSchema:()=>Qa,GetWalletFnInputSchema:()=>On,GetWalletFnOutputSchema:()=>$n,GetWalletManyTxInputSchema:()=>kt,GetWalletManyTxOutputSchema:()=>vt,GetWalletTxInputSchema:()=>Xa,GetWalletTxOutputSchema:()=>Za,HealthcheckFnInputSchema:()=>wn,HealthcheckFnOutputSchema:()=>In,HealthcheckTxInputSchema:()=>kt,HealthcheckTxOutputSchema:()=>vt,ITxAggregatorSimpleEnum:()=>Cp,ITxDistributorLeftoverRuleEnum:()=>Gp,ITxMetadataActionEnum:()=>Rp,ITxMetadataActionForReverseEnum:()=>Pp,ITxPeriodSimpleEnum:()=>Ws,ImportActionsTxInputSchema:()=>lt,ImportActionsTxOutputSchema:()=>es,ImportDataFnInputSchema:()=>ut,ImportDataFnOutputSchema:()=>jn,ImportDatabaseTxInputSchema:()=>ts,ImportDatabaseTxOutputSchema:()=>rs,InputError:()=>J,JSONRPCError:()=>Ke,ListDatabaseExportsTxInputSchema:()=>ns,ListDatabaseExportsTxOutputSchema:()=>as,QueryBuilder:()=>he,QueryLogsTxInputSchema:()=>os,QueryLogsTxOutputSchema:()=>ps,QueryTxInputSchema:()=>ss,QueryTxOutputSchema:()=>is,ResetDatabaseTxInputSchema:()=>ds,ResetDatabaseTxOutputSchema:()=>fs,ReverseTransferFnInputSchema:()=>kn,ReverseTransferFnOutputSchema:()=>vn,ReverseTransferGroupFnInputSchema:()=>Sn,ReverseTransferGroupFnOutputSchema:()=>Cn,ReverseTransferGroupManyTxInputSchema:()=>hs,ReverseTransferGroupManyTxOutputSchema:()=>_s,ReverseTransferGroupTxInputSchema:()=>cs,ReverseTransferGroupTxOutputSchema:()=>ms,ReverseTransferManyTxInputSchema:()=>gs,ReverseTransferManyTxOutputSchema:()=>Ts,ReverseTransferTxInputSchema:()=>us,ReverseTransferTxOutputSchema:()=>ls,ReverseTransfersFnInputSchema:()=>Gn,ReverseTransfersFnOutputSchema:()=>Rn,SetFlagsFnInputSchema:()=>Pn,SetFlagsFnOutputSchema:()=>Mn,SetFlagsTxInputSchema:()=>ys,SetFlagsTxOutputSchema:()=>bs,StartTransactionTxInputSchema:()=>Fs,StartTransactionTxOutputSchema:()=>xs,StreamError:()=>Te,StreamPromise:()=>We,TokenStatusEnum:()=>sd,TokenTableInputSchema:()=>hr,TokenTableSchema:()=>_r,TokenTypeEnum:()=>ad,TransferGroupStatusEnum:()=>id,TransferGroupTableInputSchema:()=>yr,TransferGroupTableSchema:()=>br,TransferGroupTypeEnum:()=>dd,TransferLogTableInputSchema:()=>Fr,TransferLogTableSchema:()=>xr,TransferStatusEnum:()=>od,TransferStatusInputEnum:()=>pd,TransferTableInputSchema:()=>gr,TransferTableSchema:()=>Tr,TransferTypeEnum:()=>fd,TxConstsSchema:()=>Os,UpdateTokenFnInputSchema:()=>En,UpdateTokenFnOutputSchema:()=>Wn,UpdateTokenTxInputSchema:()=>$s,UpdateTokenTxOutputSchema:()=>ws,UpdateTransferFnInputSchema:()=>Dn,UpdateTransferFnOutputSchema:()=>An,UpdateTransferGroupFnInputSchema:()=>Nn,UpdateTransferGroupFnOutputSchema:()=>Un,UpdateTransferGroupManyTxInputSchema:()=>Ss,UpdateTransferGroupManyTxOutputSchema:()=>Cs,UpdateTransferGroupTxInputSchema:()=>ks,UpdateTransferGroupTxOutputSchema:()=>vs,UpdateTransferGroupsFnInputSchema:()=>qn,UpdateTransferGroupsFnOutputSchema:()=>Bn,UpdateTransferManyTxInputSchema:()=>Gs,UpdateTransferManyTxOutputSchema:()=>Rs,UpdateTransferTxInputSchema:()=>Is,UpdateTransferTxOutputSchema:()=>js,UpdateTransfersFnInputSchema:()=>Ln,UpdateTransfersFnOutputSchema:()=>Vn,UpdateWalletFnInputSchema:()=>Hn,UpdateWalletFnOutputSchema:()=>zn,UpdateWalletTxInputSchema:()=>Ps,UpdateWalletTxOutputSchema:()=>Ms,ValidationError:()=>_e,Validator:()=>Es,WAPIError:()=>Oe,WalletStatusEnum:()=>ld,WalletTableInputSchema:()=>Or,WalletTableSchema:()=>$r,WalletTokenSettingTableInputSchema:()=>wr,WalletTokenSettingTableSchema:()=>Ir,WalletTypeEnum:()=>ud,WapiClientType:()=>uc,WapiSettingTableInputSchema:()=>jr,WapiSettingTableSchema:()=>kr,WapiSettingTypeEnum:()=>cd,aggregateTransfers:()=>Vp,create:()=>k$,createAccessToken:()=>Hp,createContract:()=>zp,createDeposit:()=>Jp,createExchange:()=>hd,createToken:()=>_d,createTransfer:()=>gd,createTransferGroup:()=>Td,createTransfers:()=>yd,createWallet:()=>bd,createWithdrawal:()=>Fd,findBalances:()=>xd,findTokens:()=>Od,findTransferGroups:()=>$d,findTransfers:()=>wd,findWallets:()=>Id,getBalance:()=>jd,getBalanceHistory:()=>kd,getFlags:()=>vd,getStatistics:()=>Sd,getToken:()=>Cd,getTransfer:()=>Gd,getTransferGroup:()=>Rd,getWallet:()=>Pd,healthcheck:()=>Md,importData:()=>Ed,reverseTransfer:()=>Wd,reverseTransferGroup:()=>Dd,reverseTransfers:()=>Ad,setFlags:()=>Nd,updateToken:()=>Ud,updateTransfer:()=>qd,updateTransferGroup:()=>Bd,updateTransferGroups:()=>Ld,updateTransfers:()=>Vd,updateWallet:()=>Hd,utils:()=>v$});var Zd=WebSocket;function E(...t){window.WAPI_DEBUG&&console.log(...t.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var Z={JSONRPC:{min:-32700,max:-32600,ERRORS:{PARSE_ERROR:{code:-32700,message:"Parse error",description:"Unable to parse JSON input"},INVALID_REQUEST:{code:-32600,message:"Invalid request",description:"JSON input does not match JSONRPC spec"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found",description:"Requested method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params",description:"Invalid params provided for method"},INTERNAL_SERVER_ERROR:{code:-32603,message:"Internal server error",description:"Unknown error occurred"}}},AUTH:{min:-20999,max:-2e4,ERRORS:{AUTHENTICATION_ERROR:{code:-2e4,message:"Authentication error",description:"Invalid authentication credentials"},AUTHORIZATION_ERROR:{code:-20001,message:"AUTHORIZATION_ERROR",description:"Provided credentials lack access rights"}}},STREAM:{min:-10999,max:-1e4,ERRORS:{CONNECTION_LOST:{code:-1e4,message:"CONNECTION_LOST",description:"Lost connection to server"},INPUT_STREAM_INVALID:{code:-10001,message:"INPUT_STREAM_INVALID",description:"Invalid input stream identifier provided"},INVALID_RESPONSE_STREAM_CHUNK:{code:-10002,message:"INVALID_RESPONSE_STREAM_CHUNK",description:"Received multiple chunks for non-array property"},INVALID_INPUT_STREAM_CHUNK:{code:-10003,message:"INVALID_INPUT_STREAM_CHUNK",description:"Invalid chunk sent to input stream"},INPUT_STREAM_TIMEOUT:{code:-10004,message:"INPUT_STREAM_TIMEOUT",description:"Input stream failed to finish in allotted time"},INPUT_STREAM_ERROR:{code:-10005,message:"INPUT_STREAM_ERROR",description:"Unknown error in input stream"},INPUT_STREAM_NOT_ALLOWED:{code:-10006,message:"INPUT_STREAM_NOT_ALLOWED",description:"Stream input not allowed for method"}}},INPUT:{min:-14999,max:-11e3,ERRORS:{HTTP_BODY_SIZE:{code:-11e3,message:"HTTP_BODY_SIZE",description:"Http body size can't be more than 100MB"},DATABASE_EXPORT_CONFLICT:{code:-12e3,message:"DATABASE_EXPORT_CONFLICT",description:"Database export already in progress"},DATABASE_IMPORT_CONFLICT:{code:-12001,message:"DATABASE_IMPORT_CONFLICT",description:"Database import already in progress"},DATABASE_EXPORT_PROGRESS_NOT_FOUND:{code:-12002,message:"DATABASE_EXPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_PROGRESS_NOT_FOUND:{code:-12003,message:"DATABASE_IMPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_NOT_FOUND:{code:-12004,message:"DATABASE_IMPORT_NOT_FOUND",description:"Database import file not found"},TR_CANT_UPDATE_TO_PENDING:{code:-12100,message:"TR_CANT_UPDATE_TO_PENDING",description:"Transfer status can only move from 'pending'->'finished'/'cancelled"},TR_CANT_UPDATE_TIMESTAMP:{code:-12101,message:"TR_CANT_UPDATE_TIMESTAMP",description:"Cant update transfer.updated_at - allow_timestamps flag is set to off"},TR_CANT_INSERT_TIMESTAMP:{code:-12102,message:"TR_CANT_INSERT_TIMESTAMP",description:"Cant insert transfer.created_at - allow_timestamps flag is set to off"},TR_EMPTY_UPDATE_REQUEST:{code:-12103,message:"TR_EMPTY_UPDATE_REQUEST",description:"Update request for transfer is empty"},TR_MISSING_FILTER:{code:-12104,message:"TR_MISSING_FILTER",description:"Transactions can't reversed or updated without valid filter"},TR_TO_WALLET_WITHDRAWAL:{code:-12105,message:"TR_TO_WALLET_WITHDRAWAL",description:"To wallet can't be specified when doing a withdrawal"},TR_FROM_WALLET_DEPOSIT:{code:-12106,message:"TR_FROM_WALLET_DEPOSIT",description:"From wallet can't be specified when doing a deposit"},TR_FROM_TO_CONFLICT:{code:-12107,message:"TR_FROM_TO_CONFLICT",description:"from_wallet and to_wallet can not be the same"},TR_UNABLE_TO_RESOLVE_INPUT:{code:-12108,message:"TR_UNABLE_TO_RESOLVE_INPUT",description:"Unable to resolve references to foreign keys"},TRG_MISSING_FILTER:{code:-12200,message:"TRG_MISSING_FILTER",description:"Transaction groups can't reversed or updated without valid filter"},INVALID_FIELD_AGR_COMB:{code:-12300,message:"INVALID_FIELD_AGR_COMB",description:"Provided aggregation field was not found on Model"},INVALID_FIELD_FOR_MODEL:{code:-12301,message:"INVALID_FIELD_FOR_MODEL",description:"Provided groupBy field was not found on Model"},NO_METADATA_ON_MODEL:{code:-12302,message:"NO_METADATA_ON_MODEL",description:"Can't use metadata field for grouping as current Model does not have metadata"},INVALID_MODEL:{code:-12303,message:"INVALID_MODEL",description:"Provided Model name is invalid"},INVALID_COMPLEX_FILTER:{code:-12304,message:"INVALID_COMPLEX_FILTER",description:"The provided complex filter does not pass validation"},UNCLEAR_AGGREGATOR:{code:-12305,message:"UNCLEAR_AGGREGATOR",description:"Invalid aggregator function provided"},CONTRACT_OWNER_NOT_FOUND:{code:-12306,message:"CONTRACT_OWNER_NOT_FOUND",description:"Unable to find Wallet specified as Contract token owner"},DISTRIBUTION_MISSING_TARGETS:{code:-12307,message:"DISTRIBUTION_MISSING_TARGETS",description:"Unable to resolve all targets (Wallets, Tokens) for distribution request"},TOKEN_INVALID_WALLET:{code:-12308,message:"TOKEN_INVALID_WALLET",description:"Invalid belongs_to wallet provided"},BAL_FUTURE_DATETIME:{code:-12309,message:"BAL_FUTURE_DATETIME",description:"Balance datetime can't be in the future"},INPUT_NEEDS_IDENTIFIER:{code:-12310,message:"INPUT_NEEDS_IDENTIFIER",description:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier"},RESET_INVALID_CONFIRMATION:{code:-12311,message:"RESET_INVALID_CONFIRMATION",description:"Provided reset confirmation code is invalid"},INPUT_NEEDS_TOKEN:{code:-12312,message:"INPUT_NEEDS_TOKEN",description:"token must be specified on input or in client config"},CONFLICTING_OPTIONS_FOR_BALANCE:{code:-12313,message:"CONFLICTING_OPTIONS_FOR_BALANCE",description:"return_running_balance and return_running_balance_for can't be specified together"},CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT:{code:-12314,message:"CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",description:"return_signed_amount and return_signed_amount_for_wallet can't be specified together"},RUNNING_BALANCE_WITHOUT_WALLET:{code:-12315,message:"RUNNING_BALANCE_WITHOUT_WALLET",description:"return_running_balance option requires Wallet filter to be specified"},SIGNED_AMOUNT_WITHOUT_WALLET:{code:-12316,message:"SIGNED_AMOUNT_WITHOUT_WALLET",description:"return_signed_amount option requires Wallet filter to be specified"},REQUIRED_INPUT_MISSING:{code:-12317,message:"REQUIRED_INPUT_MISSING",description:"input does not specify required keys"},TRX_NOT_ALLOWED:{code:-12400,message:"TRX_NOT_ALLOWED",description:"This method can not run in a transaction"},TRANSACTION_NOT_FOUND:{code:-12401,message:"TRANSACTION_NOT_FOUND",description:"Transaction not found"},ONLY_SELECT_ALLOWED:{code:-12402,message:"ONLY_SELECT_ALLOWED",description:"Only select queries are allowed"}}},CONSTRAINT:{min:-19999,max:-19e3,ERRORS:{INVALID_LATEST_HASH:{code:-19e3,message:"INVALID_LATEST_HASH",description:"Http body size can't be more than 100MB"},TOKEN_LIMIT_REACHED:{code:-19001,message:"TOKEN_LIMIT_REACHED",description:"Unable to issue more tokens as Token.limit has been reached"},TR_INVALID_BALANCE:{code:-19101,message:"TR_INVALID_BALANCE",description:"Transfer would result in invalid balance for a Wallet"},TR_AMOUNT_NOT_DIVISIBLE:{code:-19102,message:"TR_AMOUNT_NOT_DIVISIBLE",description:"Transfer amount is not divisible by specified Token.divisor"},TR_TOKEN_DISABLED:{code:-19103,message:"TR_TOKEN_DISABLED",description:"Token status is set to 'disabled' - no new transfers allowed"},TR_TOKEN_DWONLY:{code:-19104,message:"TR_TOKEN_DWONLY",description:"Token status is set to 'dw-only' - only deposits or withdrawals allowed"},TR_TRG_STATUS_MISMATCH:{code:-19105,message:"TR_TRG_STATUS_MISMATCH",description:"Transfers in transfer_group must match transfer_group.transfer_status"},TR_TRG_CLOSED:{code:-19106,message:"TR_TRG_CLOSED",description:"Cant add Transfer to group. TransferGroup is closed"},TR_TIMESTAMP_IN_PAST:{code:-19107,message:"TR_TIMESTAMP_IN_PAST",description:"Transfer.created_at must be the latest"},TR_TIMESTAMP_MUST_BE_LATEST:{code:-19108,message:"TR_TIMESTAMP_MUST_BE_LATEST",description:"Transfer.created_at must be the latest"},TR_INVALID_CANCELLED:{code:-19109,message:"TR_INVALID_CANCELLED",description:"Cant create cancelled transfer"},TR_FROM_WALLET_STATUS_CONSTRAINT:{code:-19110,message:"TR_FROM_WALLET_STATUS_CONSTRAINT",description:"From wallet.status doesn't allow this type of transfers"},TR_TO_WALLET_STATUS_CONSTRAINT:{code:-19111,message:"TR_TO_WALLET_STATUS_CONSTRAINT",description:"To wallet.status doesn't allow this type of transfers"},TR_CANCELLED_CANT_RV:{code:-19112,message:"TR_CANCELLED_CANT_RV",description:"Cancelled Transfer can not be reversed"},TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19113,message:"TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true."},TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19114,message:"TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true."},TR_UNIQUE_IDENTIFIER:{code:-19115,message:"TR_UNIQUE_IDENTIFIER",description:"The identifier for Transfer object must be unique"},TRG_SINGLE_PENDING_TR_CANT_RV:{code:-19200,message:"TRG_SINGLE_PENDING_TR_CANT_RV",description:"Transfer is part of TransferGroup and can not be reversed separately"},TRG_CANCELLED_CANT_RV:{code:-19201,message:"TRG_CANCELLED_CANT_RV",description:"Cancelled TransferGroup can not be reversed"},TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19202,message:"TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true"},TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19203,message:"TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true"},TRG_UNIQUE_IDENTIFIER:{code:-19204,message:"TRG_UNIQUE_IDENTIFIER",description:"The identifier for TransferGroup object must be unique"},TOKEN_UNIQUE_FOREIGN:{code:-19300,message:"TOKEN_UNIQUE_FOREIGN",description:"The foreign for Token object must be unique"},WALLET_UNIQUE_FOREIGN:{code:-19400,message:"WALLET_UNIQUE_FOREIGN",description:"The foreign for Wallet object must be unique"},UNIQUE_CONSTRAINT:{code:-19500,message:"UNIQUE_CONSTRAINT",description:"Insert violates unique constraint"}}},CONFIG:{min:-16e3,max:-15e3,ERRORS:{METHOD_DISABLED:{code:-15e3,message:"METHOD_DISABLED",description:"Method is disabled"},FLAG_PRODUCTION_ON:{code:-15001,message:"FLAG_PRODUCTION_ON",description:'Production flag is "on" - this method is disabled'},FLAG_PRODUCTION_LOCKED:{code:-15002,message:"FLAG_PRODUCTION_LOCKED",description:"Cant update production flag to false in this server"},TRANSACTION_TIMEOUT:{code:-15003,message:"TRANSACTION_TIMEOUT",description:"Database transaction timed out"}}}},ge=x(x(x(x(x(x({},Z.JSONRPC.ERRORS),Z.AUTH.ERRORS),Z.CONFIG.ERRORS),Z.STREAM.ERRORS),Z.INPUT.ERRORS),Z.CONSTRAINT.ERRORS);function Xe(t){return Object.fromEntries(Object.keys(t).map(e=>[e,e]))}var Ns=Xe(ge),Oe=class extends Error{constructor({type:e,code:r,message:n,data:a}){var i;super(n);let s=(i=ge[e])!=null?i:ge.INTERNAL_SERVER_ERROR;this.type=e!=null?e:Ns.INTERNAL_SERVER_ERROR,this.code=r!=null?r:s.code,this.message=n!=null?n:s.message,this.data=x({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Ke=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.JSONRPC.ERRORS}static get types(){return Xe(Z.JSONRPC.ERRORS)}},Te=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.STREAM.ERRORS}static get types(){return Xe(Z.STREAM.ERRORS)}},J=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.INPUT.ERRORS}static get types(){return Xe(Z.INPUT.ERRORS)}},Wt=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONFIG.ERRORS}static get types(){return Xe(Z.CONFIG.ERRORS)}},Ee=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.AUTH.ERRORS}static get types(){return Xe(Z.AUTH.ERRORS)}},Dt=class extends Oe{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONSTRAINT.ERRORS}static get types(){return Xe(Z.CONSTRAINT.ERRORS)}},_e=class extends Ke{constructor(e,r){super(Ke.types.INVALID_PARAMS,e,r)}},Ye=class extends Ee{constructor(e){super(Ee.types.AUTHENTICATION_ERROR,e)}},As=class extends Ee{constructor(e){super(Ee.types.AUTHORIZATION_ERROR,e)}};var Oc=Object.fromEntries(Object.keys(ge).map(t=>[ge[t].code,t]));function $c(t){let e=Oc[t];if(!e){let n=Object.entries(Z).find(([a,s])=>t>=s.min&&t<=s.max);return{group:n==null?void 0:n[0],type:void 0}}let r=Object.keys(Z).find(n=>e in Z[n].ERRORS);return r?{group:r,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Si({code:t,message:e,data:r}){let{group:n,type:a}=$c(t);e=e&&e!==a?e:ge[a].description;let s;switch(n&&n!=="JSONRPC"&&a===void 0&&(E("Novel error from server",t,e,r),a=e,s=t,e=typeof r=="object"&&"description"in r&&typeof r.description=="string"?r.description:e),n){case"JSONRPC":return new Ke(a,r,e);case"AUTH":return new Ee(a,r,e,s);case"CONFIG":return new Wt(a,r,e,s);case"CONSTRAINT":return new Dt(a,r,e,s);case"INPUT":return new J(a,r,e,s);case"STREAM":return new Te(a,r,e,s);default:return new Oe({code:t,message:e,data:r,type:a!=null?a:Ns.INTERNAL_SERVER_ERROR})}}var ef=Object.fromEntries(Object.keys(ge).map(t=>[t,ge[t].message])),tf=Object.fromEntries(Object.keys(ge).map(t=>[t,ge[t].description]));var Us,wc=new Uint8Array(16);function Ci(){if(!Us&&(Us=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Us))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Us(wc)}var re=[];for(let t=0;t<256;++t)re.push((t+256).toString(16).slice(1));function rf(t,e=0){return re[t[e+0]]+re[t[e+1]]+re[t[e+2]]+re[t[e+3]]+"-"+re[t[e+4]]+re[t[e+5]]+"-"+re[t[e+6]]+re[t[e+7]]+"-"+re[t[e+8]]+re[t[e+9]]+"-"+re[t[e+10]]+re[t[e+11]]+re[t[e+12]]+re[t[e+13]]+re[t[e+14]]+re[t[e+15]]}var Ic=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gi={randomUUID:Ic};function jc(t,e,r){if(Gi.randomUUID&&!e&&!t)return Gi.randomUUID();t=t||{};let n=t.random||(t.rng||Ci)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return rf(n)}var ct=jc;function Ze(t=8){return ct().split("-").pop().substr(0,t)}var Ri={timeouts:{},values:{},set(t,e){this.timeouts[t]=setTimeout(()=>this.clear(t),3e4),this.values[t]=e},get(t){return this.values[t]},getKey(t){let e=JSON.parse(JSON.stringify(t)),r="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),r+=n+":"+a}),r},clear(t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),delete this.timeouts[t],delete this.values[t]},clearAll(){Object.keys(this.timeouts).forEach(t=>{clearTimeout(this.timeouts[t])}),this.timeouts={},this.values={}}};function pe(t){if(!t)return ct();let e=Ri.getKey(t);if(Ri.get(e))throw new J("INPUT_NEEDS_IDENTIFIER",{object:t});let r=ct();return Ri.set(e,r),r}function sf(t){return new Promise(e=>setTimeout(e,t))}function of(){return pe()}function qs(t){return JSON.parse(JSON.stringify(t))}function ve(t,e,r){if(e in t){if(t[e]===void 0)throw new _e({input:t},`undefined provided for ${e}`);return t}if(!r)throw new _e({input:t},`${e} is required if no default set`);let n=qs(t);return n[e]=r,n}function $(t){let e=pf(t);if(e!=null)return{foreign:e}}function U(t){let e=pf(t);if(e!=null)return{identifier:e}}function w({input:t,options:e,validate:r}){var a;let n=qs(t);return(a=n.options)!=null||(n.options=e!=null?e:{}),r(n)}function pf(t){return t==null?t:t+""}function kc(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function nf(t){return t.host.replace(/^https:/,"wss:")+"?"+kc({apikey:t.apikey,apisecret:t.apisecret,db:t.database,clientVersion:t.clientVersion})}function df(t){return typeof window=="undefined"?[nf(t),{rejectUnauthorized:t.rejectUnauthorized}]:[nf(t)]}function Bs(t,e){let r={};return Object.keys(t).forEach(n=>{e[n]?typeof e[n]=="string"?r[e[n]]=t[n]:r[n]=e[n](t[n]):r[n]=t[n]}),r}function Se(t){return t.split(",").map(e=>e.split(" ")).map(e=>{let[r,n]=e;return{field:r,direction:n==="desc"?"desc":"asc"}})}function ff(t){return new Date(t).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function vc(t){return t%4===0&&(t%100!==0||t%400===0)}var Sc=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Cc=[0,31,28,31,30,31,30,31,31,30,31,30,31];function af(t){let e=Sc.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&vc(r)?29:Cc[n])}var Gc=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function Rc(t,e){let r=Gc.exec(t);if(!r)return!1;let n=+r[1],a=+r[2],s=+r[3],i=r[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var Pc=/t|\s/i;function uf(t){let e=t.split(Pc);return e.length===1?af(e[0]):e.length===2&&af(e[0])&&Rc(e[1])}var At=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,r){switch(e){case"data":return this._data.push(r),this;case"end":return this._end.push(r),this;case"error":return this._error.push(r),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(r=>r(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(r=>r(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},Ls=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var We=class{constructor(e){this.streamObject=new At({objectMode:!0});this.outStreamObject=new At({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(E("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let r=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(E("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Si(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){r.push(n);return}if(n.dataArr){let a=x({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(P(x({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{E("stream ended");let n=r.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{E("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(E("streamPromise data",a),a===void 0)return;if(a.error){let o=Si(a.error);return this.streamObject.destroy(o)}if(!a.prop){r.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{E("streamPromise end");let a=r.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,p)=>{Array.isArray(s[p])?(o.push(...s[p]),s[p]=o):o.length===1?s[p]=o:(this.streamObject.destroy(new Te("INVALID_RESPONSE_STREAM_CHUNK",{property:p,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(E("streamPromise error",a),this.reject(a)))}}then(e,r){return this.start("promise"),this.promise.then(e,r)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Nt=class extends We{constructor(e,r){super(e),this.inputStream=r}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Hl=Fc(Ll(),1);var Tp={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var yp={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var bp={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var ft={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var hr={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var _r={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Fp={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var gr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var Tr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var xp={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var yr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var br={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var Op={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var Fr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var xr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var $p={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Or={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var $r={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var wp={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var wr={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var Ir={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var Ip={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var jr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var kr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var jp={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var vr={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var Sr={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var Cr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var Gr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var Rr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var Pr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Mr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Er={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Wr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Dr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Ar={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Nr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Ur={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var qr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Br={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Lr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Vr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Hr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var zr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Jr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Qr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Kr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Yr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Xr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Zr={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var en={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var tn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var rn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var nn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var an={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var sn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var on={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var pn={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var dn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var fn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var un={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var ln={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnInput",title:"HealthcheckFnInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_fn_options"}},definitions:{healthcheck_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/healthcheck/healthcheck.schema.input.json#/definitions/healthcheck_tx_options"}]}},required:[],additionalProperties:!1};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnOutput",title:"HealthcheckFnOutput",description:"Output of healthcheck",type:"object",$ref:"/txs/healthcheck/healthcheck.schema.output.json"};var ut={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{include_balance:{description:"Return the total system balance of token",type:"boolean"}},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{anyOf:[{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers_count:{description:"Return number of transfers in the transfer_group",type:"boolean",default:!1}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"#/definitions/transfer_group_with_transfers_count"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{transfer_group_transfers_count:{type:"object",properties:{transfers_count:{description:"Number of transfers in the group",type:"number"}},$typescript:'{"additionalProperties": false}'},transfer_group_with_transfers_count:{allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"},{$ref:"#/definitions/transfer_group_transfers_count"}]}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},status:{description:"The status of the change to balance",type:["string"],enum:["pending","finished"]},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status","available_balance"]}},additionalProperties:!1};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",anyOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_with_balance"}]}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],$typescript:'{"additionalProperties": false}'},token_with_balance:{type:"object",allOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_balance"}]},token_balance:{type:"object",properties:{balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var kt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var vt={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var kp={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxInput",title:"HealthcheckTxInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_tx_options"}},definitions:{healthcheck_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:[],additionalProperties:!1};var vp={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxOutput",title:"HealthcheckTxOutput",description:"Output of healthcheck",type:"object",properties:{status:{description:"Status of the service",type:"string",enum:["green","yellow","red"]},message:{description:"Error message if some error occurred",type:"string"},database_size:{description:"Size of the database in MB",type:"string"},indexes_size:{description:"Size of all indexes of database in MB",type:"string"},connection_count:{description:"Number of external connections to this database",type:"number"}},required:["status"],additionalProperties:!1};var lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var d=new Hl.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^(?!.*\.\.)[a-zA-Z_][a-zA-Z0-9_.-]*[a-zA-Z0-9_-]$/},strict:!1});d.addFormat("date-time",{validate:uf});function Sp(t,e){if(e!==void 0)return new _e({errors:t},e)}function Vl(t){return function(e){if(t===void 0)return{isValid:!1,inputCopy:e,error:Sp([new Error("Undefined validator")],"Undefined validator")};try{let r=qs(e),n=t(r),a=n?void 0:t.errors,s=n?void 0:d.errorsText(a),i=Sp(a,s);return{isValid:n,inputCopy:r,error:i}}catch(r){return{isValid:!1,inputCopy:e,error:Sp([r],r.message)}}}}function l(t,e){let r=JSON.parse(JSON.stringify(t));return zl(r,e)}function zl(t,e){return typeof t!="object"||Object.keys(t).forEach(r=>{r==="$ref"&&t.$ref.startsWith("#")?t.$ref=e+t.$ref:t[r]=zl(t[r],e)}),t}function Jl(t,e){let r=l(t,e),n=r.properties.options;return x({$id:r.$id.replace("Input","Options"),definitions:r.definitions},n)}function Ql(t,e){let r=l(t,e),n=r.definitions[t.$allowStreamInput];return x({$id:r.$id.replace("Input","StreamChunk"),definitions:r.definitions},n)}var f={};d.addSchema(l(Tp,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");f.JSONRPCRequest=Tp;d.addSchema(l(yp,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");f.JSONRPCResponse=yp;d.addSchema(l(bp,"/client-options.schema.json"),"/client-options.schema.json");f.ClientOptions=bp;d.addSchema(l(ft,"/db/consts.schema.json"),"/db/consts.schema.json");f.Consts=ft;d.addSchema(l(hr,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");f.TokenTableInput=hr;d.addSchema(l(_r,"/db/token/token.schema.json"),"/db/token/token.schema.json");f.TokenTable=_r;d.addSchema(l(Fp,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");f.TokenTableOptional=Fp;d.addSchema(l(gr,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");f.TransferTableInput=gr;d.addSchema(l(Tr,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");f.TransferTable=Tr;d.addSchema(l(xp,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");f.TransferTableOptional=xp;d.addSchema(l(yr,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");f.TransferGroupTableInput=yr;d.addSchema(l(br,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");f.TransferGroupTable=br;d.addSchema(l(Op,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");f.TransferGroupTableOptional=Op;d.addSchema(l(Fr,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");f.TransferLogTableInput=Fr;d.addSchema(l(xr,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");f.TransferLogTable=xr;d.addSchema(l($p,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");f.TransferLogTableOptional=$p;d.addSchema(l(Or,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");f.WalletTableInput=Or;d.addSchema(l($r,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");f.WalletTable=$r;d.addSchema(l(wp,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");f.WalletTableOptional=wp;d.addSchema(l(wr,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");f.WalletTokenSettingTableInput=wr;d.addSchema(l(Ir,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");f.WalletTokenSettingTable=Ir;d.addSchema(l(Ip,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");f.WalletTokenSettingTableOptional=Ip;d.addSchema(l(jr,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");f.WapiSettingTableInput=jr;d.addSchema(l(kr,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");f.WapiSettingTable=kr;d.addSchema(l(jp,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");f.WapiSettingTableOptional=jp;d.addSchema(l(vr,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");f.AggregateTransfersFnInput=vr;d.addSchema(l(Sr,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");f.AggregateTransfersFnOutput=Sr;d.addSchema(l(Cr,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenFnInput=Cr;d.addSchema(l(Gr,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenFnOutput=Gr;d.addSchema(l(Rr,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");f.CreateContractFnInput=Rr;d.addSchema(l(Pr,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");f.CreateContractFnOutput=Pr;d.addSchema(l(Mr,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");f.CreateDepositFnInput=Mr;d.addSchema(l(Er,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");f.CreateDepositFnOutput=Er;d.addSchema(l(Wr,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");f.CreateExchangeFnInput=Wr;d.addSchema(l(Dr,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");f.CreateExchangeFnOutput=Dr;d.addSchema(l(Ar,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");f.CreateTokenFnInput=Ar;d.addSchema(l(Nr,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");f.CreateTokenFnOutput=Nr;d.addSchema(l(Ur,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");f.CreateTransferFnInput=Ur;d.addSchema(l(qr,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");f.CreateTransferFnOutput=qr;d.addSchema(l(Br,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupFnInput=Br;d.addSchema(l(Lr,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupFnOutput=Lr;d.addSchema(l(Vr,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");f.CreateTransfersFnInput=Vr;d.addSchema(l(Hr,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");f.CreateTransfersFnOutput=Hr;d.addSchema(l(zr,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");f.CreateWalletFnInput=zr;d.addSchema(l(Jr,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");f.CreateWalletFnOutput=Jr;d.addSchema(l(Qr,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalFnInput=Qr;d.addSchema(l(Kr,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalFnOutput=Kr;d.addSchema(l(Yr,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");f.FindBalancesFnInput=Yr;d.addSchema(l(Xr,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");f.FindBalancesFnOutput=Xr;d.addSchema(l(Zr,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");f.FindTokensFnInput=Zr;d.addSchema(l(en,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");f.FindTokensFnOutput=en;d.addSchema(l(tn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");f.FindTransferGroupsFnInput=tn;d.addSchema(l(rn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");f.FindTransferGroupsFnOutput=rn;d.addSchema(l(nn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");f.FindTransfersFnInput=nn;d.addSchema(l(an,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");f.FindTransfersFnOutput=an;d.addSchema(l(sn,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");f.FindWalletsFnInput=sn;d.addSchema(l(on,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");f.FindWalletsFnOutput=on;d.addSchema(l(pn,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");f.FnConsts=pn;d.addSchema(l(dn,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");f.GetBalanceFnInput=dn;d.addSchema(l(fn,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");f.GetBalanceFnOutput=fn;d.addSchema(l(un,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryFnInput=un;d.addSchema(l(ln,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryFnOutput=ln;d.addSchema(l(cn,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");f.GetFlagsFnInput=cn;d.addSchema(l(mn,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");f.GetFlagsFnOutput=mn;d.addSchema(l(hn,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");f.GetStatisticsFnInput=hn;d.addSchema(l(_n,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");f.GetStatisticsFnOutput=_n;d.addSchema(l(gn,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");f.GetTokenFnInput=gn;d.addSchema(l(Tn,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");f.GetTokenFnOutput=Tn;d.addSchema(l(yn,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");f.GetTransferFnInput=yn;d.addSchema(l(bn,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");f.GetTransferFnOutput=bn;d.addSchema(l(Fn,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupFnInput=Fn;d.addSchema(l(xn,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupFnOutput=xn;d.addSchema(l(On,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");f.GetWalletFnInput=On;d.addSchema(l($n,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");f.GetWalletFnOutput=$n;d.addSchema(l(wn,"/fns/healthcheck/healthcheck.schema.input.json"),"/fns/healthcheck/healthcheck.schema.input.json");f.HealthcheckFnInput=wn;d.addSchema(l(In,"/fns/healthcheck/healthcheck.schema.output.json"),"/fns/healthcheck/healthcheck.schema.output.json");f.HealthcheckFnOutput=In;d.addSchema(l(ut,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");f.ImportDataFnInput=ut;var Kl=Jl(ut,"/fns/import-data/import-data.schema.input.json");d.addSchema(Kl,"/fns/import-data/import-data.schema.options.json");f.ImportDataFnOptions=Kl;var Yl=Ql(ut,"/fns/import-data/import-data.schema.input.json");d.addSchema(Yl,"/fns/import-data/import-data.schema.chunk.json");f.ImportDataFnStreamChunk=Yl;d.addSchema(l(jn,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");f.ImportDataFnOutput=jn;d.addSchema(l(kn,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferFnInput=kn;d.addSchema(l(vn,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferFnOutput=vn;d.addSchema(l(Sn,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupFnInput=Sn;d.addSchema(l(Cn,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupFnOutput=Cn;d.addSchema(l(Gn,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");f.ReverseTransfersFnInput=Gn;d.addSchema(l(Rn,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");f.ReverseTransfersFnOutput=Rn;d.addSchema(l(Pn,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");f.SetFlagsFnInput=Pn;d.addSchema(l(Mn,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");f.SetFlagsFnOutput=Mn;d.addSchema(l(En,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");f.UpdateTokenFnInput=En;d.addSchema(l(Wn,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");f.UpdateTokenFnOutput=Wn;d.addSchema(l(Dn,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");f.UpdateTransferFnInput=Dn;d.addSchema(l(An,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");f.UpdateTransferFnOutput=An;d.addSchema(l(Nn,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupFnInput=Nn;d.addSchema(l(Un,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupFnOutput=Un;d.addSchema(l(qn,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");f.UpdateTransferGroupsFnInput=qn;d.addSchema(l(Bn,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");f.UpdateTransferGroupsFnOutput=Bn;d.addSchema(l(Ln,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");f.UpdateTransfersFnInput=Ln;d.addSchema(l(Vn,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");f.UpdateTransfersFnOutput=Vn;d.addSchema(l(Hn,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");f.UpdateWalletFnInput=Hn;d.addSchema(l(zn,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");f.UpdateWalletFnOutput=zn;d.addSchema(l(Jn,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");f.AggregateTransferManyTxInput=Jn;d.addSchema(l(Qn,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");f.AggregateTransferManyTxOutput=Qn;d.addSchema(l(Kn,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");f.AuthenticationCheckTxInput=Kn;d.addSchema(l(Yn,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");f.AuthenticationCheckTxOutput=Yn;d.addSchema(l(Xn,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenTxInput=Xn;d.addSchema(l(Zn,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenTxOutput=Zn;d.addSchema(l(ea,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");f.CreateContractTxInput=ea;d.addSchema(l(ta,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");f.CreateContractTxOutput=ta;d.addSchema(l(ra,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");f.CreateDepositTxInput=ra;d.addSchema(l(na,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");f.CreateDepositTxOutput=na;d.addSchema(l(aa,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");f.CreateDistributionTxInput=aa;d.addSchema(l(sa,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");f.CreateDistributionTxOutput=sa;d.addSchema(l(ia,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");f.CreateTokenTxInput=ia;d.addSchema(l(oa,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");f.CreateTokenTxOutput=oa;d.addSchema(l(pa,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");f.CreateTransferTxInput=pa;d.addSchema(l(da,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");f.CreateTransferTxOutput=da;d.addSchema(l(fa,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupTxInput=fa;d.addSchema(l(ua,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupTxOutput=ua;d.addSchema(l(la,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");f.CreateTransferManyTxInput=la;d.addSchema(l(ca,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");f.CreateTransferManyTxOutput=ca;d.addSchema(l(ma,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");f.CreateWalletTxInput=ma;d.addSchema(l(ha,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");f.CreateWalletTxOutput=ha;d.addSchema(l(_a,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalTxInput=_a;d.addSchema(l(ga,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalTxOutput=ga;d.addSchema(l(Ta,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");f.ExportDatabaseTxInput=Ta;d.addSchema(l(ya,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");f.ExportDatabaseTxOutput=ya;d.addSchema(l(ba,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");f.FindBalanceManyTxInput=ba;d.addSchema(l(Fa,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");f.FindBalanceManyTxOutput=Fa;d.addSchema(l(xa,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");f.FindTokenManyTxInput=xa;d.addSchema(l(Oa,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");f.FindTokenManyTxOutput=Oa;d.addSchema(l($a,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");f.FindTransferGroupManyTxInput=$a;d.addSchema(l(wa,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");f.FindTransferGroupManyTxOutput=wa;d.addSchema(l(Ia,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");f.FindTransferManyTxInput=Ia;d.addSchema(l(ja,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");f.FindTransferManyTxOutput=ja;d.addSchema(l(ka,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");f.FindWalletManyTxInput=ka;d.addSchema(l(va,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");f.FindWalletManyTxOutput=va;d.addSchema(l(Sa,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");f.FinishTransactionTxInput=Sa;d.addSchema(l(Ca,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");f.FinishTransactionTxOutput=Ca;d.addSchema(l(Ga,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");f.GetBalanceTxInput=Ga;d.addSchema(l(Ra,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");f.GetBalanceTxOutput=Ra;d.addSchema(l(Pa,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryTxInput=Pa;d.addSchema(l(Ma,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryTxOutput=Ma;d.addSchema(l(Ea,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");f.GetDatabaseExportProgressTxInput=Ea;d.addSchema(l(Wa,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");f.GetDatabaseExportProgressTxOutput=Wa;d.addSchema(l(Da,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");f.GetDatabaseImportProgressTxInput=Da;d.addSchema(l(Aa,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");f.GetDatabaseImportProgressTxOutput=Aa;d.addSchema(l(Na,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");f.GetFlagsTxInput=Na;d.addSchema(l(Ua,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");f.GetFlagsTxOutput=Ua;d.addSchema(l(qa,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");f.GetStatisticsTxInput=qa;d.addSchema(l(Ba,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");f.GetStatisticsTxOutput=Ba;d.addSchema(l(La,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");f.GetTokenTxInput=La;d.addSchema(l(Va,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");f.GetTokenTxOutput=Va;d.addSchema(l(Ha,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");f.GetTokenManyTxInput=Ha;d.addSchema(l(za,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");f.GetTokenManyTxOutput=za;d.addSchema(l(Ja,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");f.GetTransferTxInput=Ja;d.addSchema(l(Qa,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");f.GetTransferTxOutput=Qa;d.addSchema(l(Ka,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupTxInput=Ka;d.addSchema(l(Ya,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupTxOutput=Ya;d.addSchema(l(Xa,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");f.GetWalletTxInput=Xa;d.addSchema(l(Za,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");f.GetWalletTxOutput=Za;d.addSchema(l(kt,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");f.GetWalletManyTxInput=kt;d.addSchema(l(vt,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");f.GetWalletManyTxOutput=vt;d.addSchema(l(kp,"/txs/healthcheck/healthcheck.schema.input.json"),"/txs/healthcheck/healthcheck.schema.input.json");f.HealthcheckTxInput=kp;d.addSchema(l(vp,"/txs/healthcheck/healthcheck.schema.output.json"),"/txs/healthcheck/healthcheck.schema.output.json");f.HealthcheckTxOutput=vp;d.addSchema(l(lt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");f.ImportActionsTxInput=lt;var Xl=Jl(lt,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(Xl,"/txs/import-actions/import-actions.schema.options.json");f.ImportActionsTxOptions=Xl;var Zl=Ql(lt,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(Zl,"/txs/import-actions/import-actions.schema.chunk.json");f.ImportActionsTxStreamChunk=Zl;d.addSchema(l(es,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");f.ImportActionsTxOutput=es;d.addSchema(l(ts,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");f.ImportDatabaseTxInput=ts;d.addSchema(l(rs,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");f.ImportDatabaseTxOutput=rs;d.addSchema(l(ns,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");f.ListDatabaseExportsTxInput=ns;d.addSchema(l(as,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");f.ListDatabaseExportsTxOutput=as;d.addSchema(l(ss,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");f.QueryTxInput=ss;d.addSchema(l(is,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");f.QueryTxOutput=is;d.addSchema(l(os,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");f.QueryLogsTxInput=os;d.addSchema(l(ps,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");f.QueryLogsTxOutput=ps;d.addSchema(l(ds,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");f.ResetDatabaseTxInput=ds;d.addSchema(l(fs,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");f.ResetDatabaseTxOutput=fs;d.addSchema(l(us,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferTxInput=us;d.addSchema(l(ls,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferTxOutput=ls;d.addSchema(l(cs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupTxInput=cs;d.addSchema(l(ms,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupTxOutput=ms;d.addSchema(l(hs,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");f.ReverseTransferGroupManyTxInput=hs;d.addSchema(l(_s,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");f.ReverseTransferGroupManyTxOutput=_s;d.addSchema(l(gs,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");f.ReverseTransferManyTxInput=gs;d.addSchema(l(Ts,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");f.ReverseTransferManyTxOutput=Ts;d.addSchema(l(ys,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");f.SetFlagsTxInput=ys;d.addSchema(l(bs,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");f.SetFlagsTxOutput=bs;d.addSchema(l(Fs,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");f.StartTransactionTxInput=Fs;d.addSchema(l(xs,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");f.StartTransactionTxOutput=xs;d.addSchema(l(Os,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");f.TxConsts=Os;d.addSchema(l($s,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");f.UpdateTokenTxInput=$s;d.addSchema(l(ws,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");f.UpdateTokenTxOutput=ws;d.addSchema(l(Is,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");f.UpdateTransferTxInput=Is;d.addSchema(l(js,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");f.UpdateTransferTxOutput=js;d.addSchema(l(ks,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupTxInput=ks;d.addSchema(l(vs,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupTxOutput=vs;d.addSchema(l(Ss,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");f.UpdateTransferGroupManyTxInput=Ss;d.addSchema(l(Cs,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");f.UpdateTransferGroupManyTxOutput=Cs;d.addSchema(l(Gs,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");f.UpdateTransferManyTxInput=Gs;d.addSchema(l(Rs,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");f.UpdateTransferManyTxOutput=Rs;d.addSchema(l(Ps,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");f.UpdateWalletTxInput=Ps;d.addSchema(l(Ms,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");f.UpdateWalletTxOutput=Ms;var G=(u=>(u.JSONRPCRequest="JSONRPCRequest",u.JSONRPCResponse="JSONRPCResponse",u.ClientOptions="ClientOptions",u.Consts="Consts",u.TokenTableInput="TokenTableInput",u.TokenTable="TokenTable",u.TokenTableOptional="TokenTableOptional",u.TransferTableInput="TransferTableInput",u.TransferTable="TransferTable",u.TransferTableOptional="TransferTableOptional",u.TransferGroupTableInput="TransferGroupTableInput",u.TransferGroupTable="TransferGroupTable",u.TransferGroupTableOptional="TransferGroupTableOptional",u.TransferLogTableInput="TransferLogTableInput",u.TransferLogTable="TransferLogTable",u.TransferLogTableOptional="TransferLogTableOptional",u.WalletTableInput="WalletTableInput",u.WalletTable="WalletTable",u.WalletTableOptional="WalletTableOptional",u.WalletTokenSettingTableInput="WalletTokenSettingTableInput",u.WalletTokenSettingTable="WalletTokenSettingTable",u.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",u.WapiSettingTableInput="WapiSettingTableInput",u.WapiSettingTable="WapiSettingTable",u.WapiSettingTableOptional="WapiSettingTableOptional",u.AggregateTransfersFnInput="AggregateTransfersFnInput",u.AggregateTransfersFnOutput="AggregateTransfersFnOutput",u.CreateAccessTokenFnInput="CreateAccessTokenFnInput",u.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",u.CreateContractFnInput="CreateContractFnInput",u.CreateContractFnOutput="CreateContractFnOutput",u.CreateDepositFnInput="CreateDepositFnInput",u.CreateDepositFnOutput="CreateDepositFnOutput",u.CreateExchangeFnInput="CreateExchangeFnInput",u.CreateExchangeFnOutput="CreateExchangeFnOutput",u.CreateTokenFnInput="CreateTokenFnInput",u.CreateTokenFnOutput="CreateTokenFnOutput",u.CreateTransferFnInput="CreateTransferFnInput",u.CreateTransferFnOutput="CreateTransferFnOutput",u.CreateTransferGroupFnInput="CreateTransferGroupFnInput",u.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",u.CreateTransfersFnInput="CreateTransfersFnInput",u.CreateTransfersFnOutput="CreateTransfersFnOutput",u.CreateWalletFnInput="CreateWalletFnInput",u.CreateWalletFnOutput="CreateWalletFnOutput",u.CreateWithdrawalFnInput="CreateWithdrawalFnInput",u.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",u.FindBalancesFnInput="FindBalancesFnInput",u.FindBalancesFnOutput="FindBalancesFnOutput",u.FindTokensFnInput="FindTokensFnInput",u.FindTokensFnOutput="FindTokensFnOutput",u.FindTransferGroupsFnInput="FindTransferGroupsFnInput",u.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",u.FindTransfersFnInput="FindTransfersFnInput",u.FindTransfersFnOutput="FindTransfersFnOutput",u.FindWalletsFnInput="FindWalletsFnInput",u.FindWalletsFnOutput="FindWalletsFnOutput",u.FnConsts="FnConsts",u.GetBalanceFnInput="GetBalanceFnInput",u.GetBalanceFnOutput="GetBalanceFnOutput",u.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",u.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",u.GetFlagsFnInput="GetFlagsFnInput",u.GetFlagsFnOutput="GetFlagsFnOutput",u.GetStatisticsFnInput="GetStatisticsFnInput",u.GetStatisticsFnOutput="GetStatisticsFnOutput",u.GetTokenFnInput="GetTokenFnInput",u.GetTokenFnOutput="GetTokenFnOutput",u.GetTransferFnInput="GetTransferFnInput",u.GetTransferFnOutput="GetTransferFnOutput",u.GetTransferGroupFnInput="GetTransferGroupFnInput",u.GetTransferGroupFnOutput="GetTransferGroupFnOutput",u.GetWalletFnInput="GetWalletFnInput",u.GetWalletFnOutput="GetWalletFnOutput",u.HealthcheckFnInput="HealthcheckFnInput",u.HealthcheckFnOutput="HealthcheckFnOutput",u.ImportDataFnInput="ImportDataFnInput",u.ImportDataFnOptions="ImportDataFnOptions",u.ImportDataFnStreamChunk="ImportDataFnStreamChunk",u.ImportDataFnOutput="ImportDataFnOutput",u.ReverseTransferFnInput="ReverseTransferFnInput",u.ReverseTransferFnOutput="ReverseTransferFnOutput",u.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",u.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",u.ReverseTransfersFnInput="ReverseTransfersFnInput",u.ReverseTransfersFnOutput="ReverseTransfersFnOutput",u.SetFlagsFnInput="SetFlagsFnInput",u.SetFlagsFnOutput="SetFlagsFnOutput",u.UpdateTokenFnInput="UpdateTokenFnInput",u.UpdateTokenFnOutput="UpdateTokenFnOutput",u.UpdateTransferFnInput="UpdateTransferFnInput",u.UpdateTransferFnOutput="UpdateTransferFnOutput",u.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",u.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",u.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",u.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",u.UpdateTransfersFnInput="UpdateTransfersFnInput",u.UpdateTransfersFnOutput="UpdateTransfersFnOutput",u.UpdateWalletFnInput="UpdateWalletFnInput",u.UpdateWalletFnOutput="UpdateWalletFnOutput",u.AggregateTransferManyTxInput="AggregateTransferManyTxInput",u.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",u.AuthenticationCheckTxInput="AuthenticationCheckTxInput",u.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",u.CreateAccessTokenTxInput="CreateAccessTokenTxInput",u.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",u.CreateContractTxInput="CreateContractTxInput",u.CreateContractTxOutput="CreateContractTxOutput",u.CreateDepositTxInput="CreateDepositTxInput",u.CreateDepositTxOutput="CreateDepositTxOutput",u.CreateDistributionTxInput="CreateDistributionTxInput",u.CreateDistributionTxOutput="CreateDistributionTxOutput",u.CreateTokenTxInput="CreateTokenTxInput",u.CreateTokenTxOutput="CreateTokenTxOutput",u.CreateTransferTxInput="CreateTransferTxInput",u.CreateTransferTxOutput="CreateTransferTxOutput",u.CreateTransferGroupTxInput="CreateTransferGroupTxInput",u.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",u.CreateTransferManyTxInput="CreateTransferManyTxInput",u.CreateTransferManyTxOutput="CreateTransferManyTxOutput",u.CreateWalletTxInput="CreateWalletTxInput",u.CreateWalletTxOutput="CreateWalletTxOutput",u.CreateWithdrawalTxInput="CreateWithdrawalTxInput",u.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",u.ExportDatabaseTxInput="ExportDatabaseTxInput",u.ExportDatabaseTxOutput="ExportDatabaseTxOutput",u.FindBalanceManyTxInput="FindBalanceManyTxInput",u.FindBalanceManyTxOutput="FindBalanceManyTxOutput",u.FindTokenManyTxInput="FindTokenManyTxInput",u.FindTokenManyTxOutput="FindTokenManyTxOutput",u.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",u.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",u.FindTransferManyTxInput="FindTransferManyTxInput",u.FindTransferManyTxOutput="FindTransferManyTxOutput",u.FindWalletManyTxInput="FindWalletManyTxInput",u.FindWalletManyTxOutput="FindWalletManyTxOutput",u.FinishTransactionTxInput="FinishTransactionTxInput",u.FinishTransactionTxOutput="FinishTransactionTxOutput",u.GetBalanceTxInput="GetBalanceTxInput",u.GetBalanceTxOutput="GetBalanceTxOutput",u.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",u.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",u.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",u.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",u.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",u.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",u.GetFlagsTxInput="GetFlagsTxInput",u.GetFlagsTxOutput="GetFlagsTxOutput",u.GetStatisticsTxInput="GetStatisticsTxInput",u.GetStatisticsTxOutput="GetStatisticsTxOutput",u.GetTokenTxInput="GetTokenTxInput",u.GetTokenTxOutput="GetTokenTxOutput",u.GetTokenManyTxInput="GetTokenManyTxInput",u.GetTokenManyTxOutput="GetTokenManyTxOutput",u.GetTransferTxInput="GetTransferTxInput",u.GetTransferTxOutput="GetTransferTxOutput",u.GetTransferGroupTxInput="GetTransferGroupTxInput",u.GetTransferGroupTxOutput="GetTransferGroupTxOutput",u.GetWalletTxInput="GetWalletTxInput",u.GetWalletTxOutput="GetWalletTxOutput",u.GetWalletManyTxInput="GetWalletManyTxInput",u.GetWalletManyTxOutput="GetWalletManyTxOutput",u.HealthcheckTxInput="HealthcheckTxInput",u.HealthcheckTxOutput="HealthcheckTxOutput",u.ImportActionsTxInput="ImportActionsTxInput",u.ImportActionsTxOptions="ImportActionsTxOptions",u.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",u.ImportActionsTxOutput="ImportActionsTxOutput",u.ImportDatabaseTxInput="ImportDatabaseTxInput",u.ImportDatabaseTxOutput="ImportDatabaseTxOutput",u.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",u.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",u.QueryTxInput="QueryTxInput",u.QueryTxOutput="QueryTxOutput",u.QueryLogsTxInput="QueryLogsTxInput",u.QueryLogsTxOutput="QueryLogsTxOutput",u.ResetDatabaseTxInput="ResetDatabaseTxInput",u.ResetDatabaseTxOutput="ResetDatabaseTxOutput",u.ReverseTransferTxInput="ReverseTransferTxInput",u.ReverseTransferTxOutput="ReverseTransferTxOutput",u.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",u.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",u.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",u.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",u.ReverseTransferManyTxInput="ReverseTransferManyTxInput",u.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",u.SetFlagsTxInput="SetFlagsTxInput",u.SetFlagsTxOutput="SetFlagsTxOutput",u.StartTransactionTxInput="StartTransactionTxInput",u.StartTransactionTxOutput="StartTransactionTxOutput",u.TxConsts="TxConsts",u.UpdateTokenTxInput="UpdateTokenTxInput",u.UpdateTokenTxOutput="UpdateTokenTxOutput",u.UpdateTransferTxInput="UpdateTransferTxInput",u.UpdateTransferTxOutput="UpdateTransferTxOutput",u.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",u.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",u.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",u.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",u.UpdateTransferManyTxInput="UpdateTransferManyTxInput",u.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",u.UpdateWalletTxInput="UpdateWalletTxInput",u.UpdateWalletTxOutput="UpdateWalletTxOutput",u))(G||{}),Es={ajv:d,createValidator(t){let e=d.compile(t);return Vl(e)},getValidator(t){let e=d.getSchema(t);return Vl(e)},getSchema(t){return f[t]},Schemas:f,SchemaNames:G},XR=Es.createValidator,_=Es.getValidator;var Ws=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Ws||{}),Cp=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(Cp||{}),Gp=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(Gp||{}),Rp=(r=>(r.replace="replace",r.extend="extend",r))(Rp||{}),Pp=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(Pp||{});var Ux=_("AggregateTransferManyTxInput");var qx=_("AuthenticationCheckTxInput");var Bx=_("CreateAccessTokenTxInput");var Lx=_("CreateContractTxInput");var Vx=_("CreateDepositTxInput");var Hx=_("CreateDistributionTxInput");var zx=_("CreateTokenTxInput");var Jx=_("CreateTransferTxInput");var Qx=_("CreateTransferGroupTxInput");var Kx=_("CreateTransferManyTxInput");var Yx=_("CreateWalletTxInput");var Xx=_("CreateWithdrawalTxInput");var Zx=_("ExportDatabaseTxInput");var eO=_("FindBalanceManyTxInput");var tO=_("FindTokenManyTxInput");var rO=_("FindTransferGroupManyTxInput");var nO=_("FindTransferManyTxInput");var aO=_("FindWalletManyTxInput");var sO=_("FinishTransactionTxInput");var iO=_("GetBalanceTxInput");var oO=_("GetBalanceHistoryTxInput");var pO=_("GetDatabaseExportProgressTxInput");var dO=_("GetDatabaseImportProgressTxInput");var fO=_("GetFlagsTxInput");var uO=_("GetStatisticsTxInput");var lO=_("GetTokenTxInput");var cO=_("GetTokenManyTxInput");var mO=_("GetTransferTxInput");var hO=_("GetTransferGroupTxInput");var _O=_("GetWalletTxInput");var gO=_("GetWalletManyTxInput");var TO=_("HealthcheckTxInput");var yO=_("ImportActionsTxInput");var bO=_("ImportDatabaseTxInput");var FO=_("ListDatabaseExportsTxInput");var xO=_("QueryTxInput");var OO=_("QueryLogsTxInput");var $O=_("ResetDatabaseTxInput");var wO=_("ReverseTransferTxInput");var IO=_("ReverseTransferGroupTxInput");var jO=_("ReverseTransferGroupManyTxInput");var kO=_("ReverseTransferManyTxInput");var vO=_("SetFlagsTxInput");var SO=_("StartTransactionTxInput");var CO=_("UpdateTokenTxInput");var GO=_("UpdateTransferTxInput");var RO=_("UpdateTransferGroupTxInput");var PO=_("UpdateTransferGroupManyTxInput");var MO=_("UpdateTransferManyTxInput");var EO=_("UpdateWalletTxInput"),Mp={aggregateTransferMany:Ux,authenticationCheck:qx,createAccessToken:Bx,createContract:Lx,createDeposit:Vx,createDistribution:Hx,createToken:zx,createTransfer:Jx,createTransferGroup:Qx,createTransferMany:Kx,createWallet:Yx,createWithdrawal:Xx,exportDatabase:Zx,findBalanceMany:eO,findTokenMany:tO,findTransferGroupMany:rO,findTransferMany:nO,findWalletMany:aO,finishTransaction:sO,getBalance:iO,getBalanceHistory:oO,getDatabaseExportProgress:pO,getDatabaseImportProgress:dO,getFlags:fO,getStatistics:uO,getToken:lO,getTokenMany:cO,getTransfer:mO,getTransferGroup:hO,getWallet:_O,getWalletMany:gO,healthcheck:TO,importActions:yO,importDatabase:bO,listDatabaseExports:FO,query:xO,queryLogs:OO,resetDatabase:$O,reverseTransfer:wO,reverseTransferGroup:IO,reverseTransferGroupMany:jO,reverseTransferMany:kO,setFlags:vO,startTransaction:SO,updateToken:CO,updateTransfer:GO,updateTransferGroup:RO,updateTransferGroupMany:PO,updateTransferMany:MO,updateWallet:EO},Ep=(k=>(k.aggregateTransferMany="aggregateTransferMany",k.authenticationCheck="authenticationCheck",k.createAccessToken="createAccessToken",k.createContract="createContract",k.createDeposit="createDeposit",k.createDistribution="createDistribution",k.createToken="createToken",k.createTransfer="createTransfer",k.createTransferGroup="createTransferGroup",k.createTransferMany="createTransferMany",k.createWallet="createWallet",k.createWithdrawal="createWithdrawal",k.exportDatabase="exportDatabase",k.findBalanceMany="findBalanceMany",k.findTokenMany="findTokenMany",k.findTransferGroupMany="findTransferGroupMany",k.findTransferMany="findTransferMany",k.findWalletMany="findWalletMany",k.finishTransaction="finishTransaction",k.getBalance="getBalance",k.getBalanceHistory="getBalanceHistory",k.getDatabaseExportProgress="getDatabaseExportProgress",k.getDatabaseImportProgress="getDatabaseImportProgress",k.getFlags="getFlags",k.getStatistics="getStatistics",k.getToken="getToken",k.getTokenMany="getTokenMany",k.getTransfer="getTransfer",k.getTransferGroup="getTransferGroup",k.getWallet="getWallet",k.getWalletMany="getWalletMany",k.healthcheck="healthcheck",k.importActions="importActions",k.importDatabase="importDatabase",k.listDatabaseExports="listDatabaseExports",k.query="query",k.queryLogs="queryLogs",k.resetDatabase="resetDatabase",k.reverseTransfer="reverseTransfer",k.reverseTransferGroup="reverseTransferGroup",k.reverseTransferGroupMany="reverseTransferGroupMany",k.reverseTransferMany="reverseTransferMany",k.setFlags="setFlags",k.startTransaction="startTransaction",k.updateToken="updateToken",k.updateTransfer="updateTransfer",k.updateTransferGroup="updateTransferGroup",k.updateTransferGroupMany="updateTransferGroupMany",k.updateTransferMany="updateTransferMany",k.updateWallet="updateWallet",k))(Ep||{});var WO=_("ImportActionsTxInput");function ec(t){let{error:e}=WO(t);return e===void 0}var Z0=_("ImportActionsTxOutput");var eM=_("ImportActionsTxStreamChunk");var DO=_("ImportActionsTxOptions");function tc(t){let{error:e}=DO(t);return e===void 0}var St=class{constructor(e,r,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,r,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[r]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=r,this._connection=e,this.connectionType=r,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return ee(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,r)=>{"stream"in e&&e.stream.destroy(new Te("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(r)}),this.socId=void 0}_handleMessage(e){var o,p,c;if(this.hooks.message&&this.hooks.message(e),"method"in e){let m=e;if(m.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:m.id});return}E("Unexpected JSONRPCRequest",e);return}let r=e;if(this.hooks.message&&this.hooks.message(r),r.id===null){E("Unexpected JSONRPCResponse",e);return}if(r.result==="ack"){this._sending.delete(r.id);return}let n=this._requests.get(r.id);if(!n){E("No Request found for incoming",e);return}if("handle"in n){n.handle(r),delete n.handle;return}r.error&&"error"in n&&n.error(r.error);let a=r;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((p=a.result)==null?void 0:p.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((c=a.result)==null?void 0:c.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,r){let{isValid:n,inputCopy:a,error:s}=Mp[e](r);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Ze()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new We:new We(o=>ee(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,r,n,a){let s=Date.now(),i=Ze(),o,p=({method:b,params:g})=>{if(o)return;let T={jsonrpc:"2.0",method:b,params:x({streamId:i},g),id:Ze()};this._sending.add(T.id),this._send(T)},c=(b,g)=>{o||(p({method:"streamError",params:{error:g}}),o=g,b.push({error:g}))},m=new Ls,h=a?m.pipe(a):m,y={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(y)===!1?new Nt:new Nt(b=>ee(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let g=setTimeout(()=>{b.push({error:new Te("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set(y.id,{stream:b,start:s,error(T){o=T,E("stream:error()>",T)},pause(){m.pause()},resume(){m.resume()},handle(T){if(T.error){b.push(T);return}h.on("data",F=>{if(!o){if(g&&(clearTimeout(g),g=null),!r(F)){c(b,new Te("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:F}));return}p({method:"streamData",params:{data:F}})}}).on("error",F=>{o||(g&&(clearTimeout(g),g=null),p({method:"streamError",params:{error:F}}),b.push({error:new Te("INPUT_STREAM_ERROR",{streamId:i,error:F})}))}).on("end",()=>{g&&(clearTimeout(g),g=null),p({method:"streamEnd",params:{}})})}}),this._sending.add(y.id),this._send(y)}),m)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}healthcheck(e){return this._sendTransaction("healthcheck",e!=null?e:{})}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,r){if(e!==void 0&&!tc(e))throw new _e({input:e});return this._streamTransaction("importActions",ec,e,r)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var rc,AO=(rc=window.WAPI_VERSION)!=null?rc:"";function Dp(t){let e=nc(t);return new Wp(e,t)}function nc(t){var b;let e=Object.assign({rejectUnauthorized:(b=t.rejectUnauthorized)!=null?b:!0,clientVersion:AO},t),r=df(e),n=new Zd(...r),a,s,i=!1,o;n.onclose=p,n.onerror=c,n.onmessage=m;function p(g){if(E(`createConnection>close(reason:${g.reason},code:${g.code},wasClean:${g.wasClean})`),g.code===4030)return h(new Ye);h(new Error("WS closed"))}function c(g){E(`createConnection>error(message:${g.message},error:${g.error},type:${g.type})`),h(g.error)}function m(g){E(`createConnection>message(type:${g.type},data:${g.data})`);let{data:T}=g,F;try{F=JSON.parse(T.toString())}catch(O){return E("Invalid JSON response",O),h(new Error("Invalid JSON response"))}if(F.result!=="ready")return E("Invalid first message"),h(new Error("Invalid first message - "+JSON.stringify(F)));h()}function h(g){i||(delete n.onmessage,delete n.onerror,delete n.onclose,g?(s(g),n.close()):a(o),i=!0)}let y=new Promise((g,T)=>{a=g,s=T});return{ws:n,$connect:y}}var Wp=class extends St{constructor(r,n){super(r.ws,"ws",r.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(r){super._setErrored(r),(r instanceof Ye||"code"in r&&r.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=r=>{let{data:n,type:a}=r;if(E(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=r=>{let{message:n,error:a,type:s}=r;E(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=r=>{let{reason:n,code:a,wasClean:s}=r;E(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(E("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){E("reconnect hook returned false");return}let r=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=ee(this,null,function*(){let a;for(let s=0;s<r+1;s++)try{E("Trying to connect, attempt:",s);let{ws:i,$connect:o}=nc(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code||s>r-1)throw i;yield sf(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){E("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return E("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();E("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(r){E("send()",r),this._connection.send(JSON.stringify(r))}close(){return ee(this,null,function*(){return E("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Ap=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Ap!="undefined"&&Ap,Np=Ap.fetch;function qp(t){let e=NO(t);return new Up(e,t)}function NO(t){let e=t.host.replace(/^wss:/,"https:"),r="x-wapi-req-id";function n(o){return ee(this,null,function*(){E("http_createConnection>message(body:$0)",o)})}function a(o,p){return ee(this,null,function*(){let c=JSON.parse(o),h=yield(yield Np(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${p}`,[r]:c==null?void 0:c.id},body:o})).json();this.onmessage(P(x({},h),{id:c.id}))})}let s=Ze(),i=Np(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${t.jwt}`,[r]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var Up=class extends St{constructor(e,r){super(e,"https",e.$connect),this.host=r.host,this.jwt=r.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){E("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>ee(this,null,function*(){E("http_message($0)>",e),this._handleMessage(e)})}close(){return ee(this,null,function*(){E("close()"),this._setConnected(!1)})}_reconnect(){return ee(this,null,function*(){E("reconnect()")})}};var Lp=class t{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,r,n,a){if(typeof r=="object"){let s={};for(let[i,o]of Object.entries(r))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof r=="function"){let s=new t(this.modifierFn);return r.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:r,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[r]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(r,n):n;return this.add({function:e,field:r,value:s})}throw TypeError("Invalid input")}where(e,r,n){return this.addWhere("where",e,r,n)}orWhere(e,r,n){return this.addWhere("orWhere",e,r,n)}whereIn(e,r){return this.add({function:"whereIn",field:e,value:r})}orWhereIn(e,r){return this.add({function:"orWhereIn",field:e,value:r})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,r,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:r}):this.add({function:"whereMetadata",field:e,operator:r,value:n})}orWhereMetadata(e,r,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:r}):this.add({function:"orWhereMetadata",field:e,operator:r,value:n})}whereMetadataIn(e,r){return this.add({function:"whereMetadataIn",field:e,value:r})}orWhereMetadataIn(e,r){return this.add({function:"orWhereMetadataIn",field:e,value:r})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Bp(t){return t.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Gt=class extends Lp{constructor({start:r,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=r,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return P(x({},super.toJSON()),{options:x({},this.optionsObject)})}options(r){if(this.optionsModifiers===void 0)return this.optionsObject=x(x({},this.optionsObject),r),this;this.optionsObject=x({},this.optionsObject);for(let[n,a]of Object.entries(r))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(r,n){return this.start().then(r,n)}catch(r){return this.start().catch(r)}stream(){return this.start().stream()}},he=class extends Gt{constructor({start:e,modifiers:r,optionsModifiers:n}){super({start:a=>e(a),modifiers:r,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,r,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Bp(e),this;if(!e.includes(" "))return this.optionsObject.order=Bp([{column:e,order:r||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let p={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");p.nulls=o}return this.optionsObject.order=Bp([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function Ct(t,e){if(!e)return{function:t,alias:t};if(!e.includes(" "))return{function:t,field:e,alias:t};if(!e.includes(" as "))throw new J("UNCLEAR_AGGREGATOR",{input:e});let[r,n]=e.split(" as ");return{function:t,field:r,alias:n||r}}var wi=class extends Gt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:s=>r(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return P(x({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(r){return this.timezoneString=r,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:r})}),this}groupBy(r,...n){let a={};if(typeof r!="string")throw new TypeError("expected string as input, got"+typeof r);let[s,i]=r.split(" as ");if(Ws.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(r){return this.aggregatorObject.aggregators.push(Ct("count",r)),this}distinct(r){return this.aggregatorObject.aggregators.push(Ct("countDistinct",r)),this}avg(r){return this.aggregatorObject.aggregators.push(Ct("average",r)),this}min(r){return this.aggregatorObject.aggregators.push(Ct("min",r)),this}max(r){return this.aggregatorObject.aggregators.push(Ct("max",r)),this}sum(r){return this.aggregatorObject.aggregators.push(Ct("sum",r)),this}},Rt=class extends Gt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return P(x({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(r){return this.updateObject=Object.assign(this.updateObject,r),this}},Ii=class extends Gt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return P(x({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(r){return this.reverseModifications=Object.assign(this.reverseModifications,r),this}};var UO=_("AggregateTransfersFnInput");function Vp(t,e,r){let{client:n}=t;if(e===void 0)return new wi({start(g){return n.api.aggregateTransferMany({transfer:g.filter,options:g.options,groups:g.groups,aggregators:g.aggregators})},modifiers(g,T){return["token","wallet","from_wallet","to_wallet"].includes(g)?$(T):g==="transfer_group"?U(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:UO});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:c,transfer_group:m,status:h,metadata:y}=a,b={token:$(i),wallet:$(o),from_wallet:$(p),to_wallet:$(c),transfer_group:U(m),status:h,metadata:y};return n.api.aggregateTransferMany({transfer:b,groups:a.groups,aggregators:a.aggregators})}var qO=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),BO=_("CreateAccessTokenFnInput");function Hp(t,e,r){var i;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:BO});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var p;return(p=qO.get(o))!=null?p:o})))),n.api.createAccessToken({token:a.token,options:r})}var LO=_("CreateContractFnInput");function zp(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:LO});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:$(a.owner),deposits:[{token:$(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:$(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:$(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var VO=_("CreateDepositFnInput");function Jp(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:VO});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new J("INPUT_NEEDS_TOKEN",{input:e});let p=s.options;delete s.options;let c=P(x({},s),{identifier:s.identifier,transfer_group:U(s.transfer_group),token:$(o),to_wallet:$(s.wallet),type:"deposit"});return c.identifier||(c.identifier=pe(c)),n.api.createTransfer({transfer:c,options:Bs(p,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Qp=(r=>(r.whereMetadata="whereMetadata",r.orWhereMetadata="orWhereMetadata",r))(Qp||{}),Kp=(r=>(r.where="where",r.orWhere="orWhere",r))(Kp||{}),Yp=(r=>(r.whereIn="whereIn",r.orWhereIn="orWhereIn",r))(Yp||{}),Xp=(r=>(r.whereMetadataIn="whereMetadataIn",r.orWhereMetadataIn="orWhereMetadataIn",r))(Xp||{}),Zp=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Zp||{}),ed=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(ed||{}),td=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t))(td||{}),rd=(r=>(r.like="like",r.ilike="ilike",r))(rd||{}),nd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r.like="like",r.ilike="ilike",r))(nd||{}),ad=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(ad||{}),sd=(r=>(r.active="active",r["dw-only"]="dw-only",r.disabled="disabled",r))(sd||{}),id=(r=>(r.open="open",r.closed="closed",r))(id||{}),od=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(od||{}),pd=(r=>(r.pending="pending",r.finished="finished",r))(pd||{}),dd=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(dd||{}),fd=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(fd||{}),ud=(n=>(n.token="token",n.house="house",n.regular="regular",n))(ud||{}),ld=(r=>(r.active="active",r.disabled="disabled",r))(ld||{}),cd=(r=>(r.flag="flag",r.setting="setting",r))(cd||{}),md=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(md||{});var HO=_("CreateExchangeFnInput");function hd(t,e,r){var o,p,c,m,h;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:HO});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=pe(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(p=a.status)!=null?p:"pending",metadata:a.metadata,children:[{identifier:(c=a.from_identifier)!=null?c:pe(),from_wallet:$(a.from_wallet),to_wallet:$(a.to_wallet),token:$(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(m=a.to_identifier)!=null?m:pe(),from_wallet:$(a.to_wallet),to_wallet:$(a.from_wallet),token:$(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(h=a.to_amount)!=null?h:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var zO=_("CreateTokenFnInput");function _d(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:zO});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:P(x({},a),{belongs_to:$(a.belongs_to)}),options:i})}var JO=_("CreateTransferFnInput");function gd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:JO});if(i)throw i;let o=Ds(s,n.getConfig("token"));return o.identifier||(o.identifier=pe(o)),n.api.createTransfer({transfer:o,options:s.options})}function Ds(t,e){t.type=t.type||"transfer";let r={identifier:t.identifier,token:$(t.token||e),amount:t.amount,metadata:t.metadata,status:t.status,type:t.type,transfer_group:U(t.transfer_group),created_at:t.created_at};if(t.type==="transfer")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),P(x({},r),{from_wallet:$(t.from_wallet),to_wallet:$(t.to_wallet)});if(t.type==="withdrawal")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),P(x({},r),{from_wallet:$(t.wallet)});if(t.type==="deposit")return P(x({},r),{to_wallet:$(t.wallet)})}var QO=_("CreateTransferGroupFnInput");function Td(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:QO});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Ds(o,n.getConfig("token")))),i.identifier||(i.identifier=pe(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var KO=_("CreateTransfersFnInput");function yd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:KO});if(s)throw s;let i=a.transfers.map(o=>Ds(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=pe(o));return n.api.createTransferMany({transfers:i,options:a.options})}var YO=_("CreateWalletFnInput");function bd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:YO});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:x({},a),options:i})}var XO=_("CreateWithdrawalFnInput");function Fd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:XO});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let p=s.token||n.getConfig("token");if(p===void 0)throw new J("INPUT_NEEDS_TOKEN",{input:e});let c=P(x({},s),{identifier:s.identifier,transfer_group:U(s.transfer_group),token:$(p),from_wallet:$(s.wallet),type:"withdrawal"});return c.identifier||(c.identifier=pe(c)),n.api.createTransfer({transfer:c,options:Bs(o,{return_balance:"return_from_balance"})})}var ZO=_("FindBalancesFnInput");function xd(t,e,r){var c,m;let{client:n}=t;if(e===void 0)return new he({start(h){return n.api.findBalanceMany({balance:h.filter,options:h.options})},modifiers(h,y){return["wallet","token"].includes(h)?$(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:ZO});if(s)throw s;let i={};a.wallet&&(i.wallet=$(a.wallet)),a.token&&(i.token=$(a.token));let o=(c=a.options)==null?void 0:c.order_by;(m=a.options)==null||delete m.order_by;let p=x({},a.options);return!p.order&&o&&(p.order=Se(o)),n.api.findBalanceMany({balance:i,options:p})}var e$=_("FindTokensFnInput");function Od(t,e,r){var c,m;let{client:n}=t;if(e===void 0)return new he({start(h){return n.api.findTokenMany({token:h.filter,options:h.options})},modifiers(h,y){return["belongs_to"].includes(h)?$(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:e$});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=$(a.belongs_to));let o=(c=a.options)==null?void 0:c.order_by;(m=a.options)==null||delete m.order_by;let p=x({},a.options);return!p.order&&o&&(p.order=Se(o)),n.api.findTokenMany({token:i,options:p})}var t$=_("FindTransferGroupsFnInput");function $d(t,e,r){var g,T;let{client:n}=t;if(e===void 0)return new he({start(F){return n.api.findTransferGroupMany({transfer_group:F.filter,options:F.options})},modifiers(F,O){return["transfer_group","reverses"].includes(F)?U(O):O}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:t$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:c,type:m}=a,h={identifier:i,transfer_status:o,status:p,metadata:c,type:m};a.reverses&&(h.reverses=U(a.reverses));let y=(g=a.options)==null?void 0:g.order_by;(T=a.options)==null||delete T.order_by;let b=x({},a.options);return!b.order&&y&&(b.order=Se(y)),n.api.findTransferGroupMany({transfer_group:h,options:b})}var r$=_("FindTransfersFnInput");function wd(t,e,r){var T;let{client:n}=t;if(e===void 0)return new he({start(F){return n.api.findTransferMany({transfer:F.filter,options:F.options})},modifiers(F,O){return["token","wallet","from_wallet","to_wallet"].includes(F)?$(O):F==="transfer_group"?U(O):O}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:r$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:c}=a,m={token:$(i),wallet:$(o),from_wallet:$(p),to_wallet:$(c)};a.transfer_group&&(m.transfer_group=U(a.transfer_group)),a.status&&(m.status=a.status),a.metadata&&(m.metadata=a.metadata),(T=a.options)!=null||(a.options={});let h=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new J("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!m.wallet)throw new J("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let y=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new J("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!m.wallet)throw new J("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let b=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=x({},a.options);return!g.order&&h&&(g.order=Se(h)),y&&(g.return_running_balance_for_wallet=$(y)),b&&(g.return_signed_amount_for_wallet=$(b)),n.api.findTransferMany({transfer:m,options:g})}var n$=_("FindWalletsFnInput");function Id(t,e,r){var m;let{client:n}=t;if(e===void 0)return new he({start(h){return n.api.findWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,y){return h==="include_balance_for_token"&&typeof y!="object"?$(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:n$});if(s)throw s;let i=(m=a.options)!=null?m:{};delete a.options;let o=x({},a),p=i.order_by;delete i.order_by;let c=x({},i);return!c.order&&p&&(c.order=Se(p)),n.api.findWalletMany({wallet:o,options:c})}var a$=_("GetBalanceFnInput");function jd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:a$});if(i)throw i;if(s.datetime&&ff(s.datetime))throw new J("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new J("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:$(s.wallet),token:$(o),datetime:s.datetime},options:s.options})}var s$=_("GetBalanceHistoryFnInput");function kd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:s$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new J("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:$(a.wallet),token:$(i)},options:a.options})}var i$=_("GetFlagsFnInput");function vd(t,e,r){let{client:n}=t,{error:a,inputCopy:s}=w({input:e||{},options:r,validate:i$});if(a)throw a;return n.api.getFlags({options:s.options})}var o$=_("GetStatisticsFnInput");function Sd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e||{},options:r,validate:o$});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var p$=_("GetTokenFnInput");function Cd(t,e={},r){let{client:n}=t,a=ve(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:p$});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new J("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:$(o),options:s.options})}var d$=_("GetTransferFnInput");function Gd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:d$});if(s)throw s;return n.api.getTransfer({transfer:U(a.transfer),options:a.options})}var f$=_("GetTransferGroupFnInput");function Rd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:f$});if(s)throw s;return n.api.getTransferGroup({transfer_group:U(a.transfer_group),options:a.options})}var u$=_("GetWalletFnInput");function Pd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:u$});if(s)throw s;return n.api.getWallet({wallet:$(a.wallet),options:a.options})}var l$=_("HealthcheckFnInput");function Md(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:l$});if(s)throw s;return n.api.healthcheck({options:x(x({},a.options),r)})}var c$=_("ImportDataFnInput");function ac(t){let{error:e}=c$(t);return e===void 0}var AW=_("ImportDataFnOutput");var NW=_("ImportDataFnStreamChunk");var m$=_("ImportDataFnOptions");function sc(t){let{error:e}=m$(t);return e===void 0}function Ed(){throw new Error("import-data available only in node client")}var h$=_("ReverseTransferFnInput");function Wd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:h$});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:U(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var _$=_("ReverseTransferGroupFnInput");function Dd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:_$});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:U(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var g$=_("ReverseTransfersFnInput");function Ad(t,e,r){let{client:n}=t;if(e===void 0)return new Ii({start(h){return n.api.reverseTransferMany({transfer:h.filter,reverse:h.reverse,options:h.options})},modifiers(h,y){return["token","wallet","from_wallet","to_wallet"].includes(h)?$(y):h==="transfer_group"?U(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:g$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:c}=a,m={token:$(i),wallet:$(o),from_wallet:$(p),to_wallet:$(c)};return a.transfer_group&&(m.transfer_group=U(a.transfer_group)),a.status&&(m.status=a.status),a.metadata&&(m.metadata=a.metadata),n.api.reverseTransferMany({transfer:m,reverse:a.reverse,options:a.options})}var T$=_("SetFlagsFnInput");function Nd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:T$});if(s)throw s;let i=Object.keys(ft.definitions.Flags.properties),o={};if(i.forEach(p=>{p in a&&(o[p]=a[p])}),Object.keys(o).length<1)throw new J("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var y$=_("UpdateTokenFnInput");function Ud(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:y$});if(s)throw s;return n.api.updateToken({token:$(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var b$=_("UpdateTransferFnInput");function qd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:b$});if(s)throw s;return n.api.updateTransfer({transfer:U(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var F$=_("UpdateTransferGroupFnInput");function Bd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:F$});if(s)throw s;return n.api.updateTransferGroup({transfer_group:U(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var x$=_("UpdateTransferGroupsFnInput");function Ld(t,e,r){let{client:n}=t;if(e===void 0)return new Rt({start(y){return n.api.updateTransferGroupMany({transfer_group:y.filter,update:y.update,options:y.options})},modifiers(y,b){return["transfer_group","reverses"].includes(y)?U(b):b}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:x$});if(s)throw s;let{transfer_status:i,status:o,metadata:p,type:c,update:m}=a,h={transfer_status:i,status:o,metadata:p,type:c};return a.reverses&&(h.reverses=U(a.reverses)),n.api.updateTransferGroupMany({transfer_group:h,update:m,options:a.options})}var O$=_("UpdateTransfersFnInput");function Vd(t,e,r){let{client:n}=t;if(e===void 0)return new Rt({start(h){return n.api.updateTransferMany({transfer:h.filter,update:h.update,options:h.options})},modifiers(h,y){return["token","wallet","from_wallet","to_wallet"].includes(h)?$(y):h==="transfer_group"?U(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:O$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:c}=a,m={token:$(i),wallet:$(o),from_wallet:$(p),to_wallet:$(c)};return a.transfer_group&&(m.transfer_group=U(a.transfer_group)),a.status&&(m.status=a.status),a.metadata&&(m.metadata=a.metadata),n.api.updateTransferMany({transfer:m,update:a.update,options:a.options})}var $$=_("UpdateWalletFnInput");function Hd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:$$});if(s)throw s;return n.api.updateWallet({wallet:$(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var w$={aggregateTransfers:_("AggregateTransfersFnInput"),createAccessToken:_("CreateAccessTokenFnInput"),createContract:_("CreateContractFnInput"),createDeposit:_("CreateDepositFnInput"),createExchange:_("CreateExchangeFnInput"),createToken:_("CreateTokenFnInput"),createTransfer:_("CreateTransferFnInput"),createTransferGroup:_("CreateTransferGroupFnInput"),createTransfers:_("CreateTransfersFnInput"),createWallet:_("CreateWalletFnInput"),createWithdrawal:_("CreateWithdrawalFnInput"),findBalances:_("FindBalancesFnInput"),findTokens:_("FindTokensFnInput"),findTransferGroups:_("FindTransferGroupsFnInput"),findTransfers:_("FindTransfersFnInput"),findWallets:_("FindWalletsFnInput"),getBalance:_("GetBalanceFnInput"),getBalanceHistory:_("GetBalanceHistoryFnInput"),getFlags:_("GetFlagsFnInput"),getStatistics:_("GetStatisticsFnInput"),getToken:_("GetTokenFnInput"),getTransfer:_("GetTransferFnInput"),getTransferGroup:_("GetTransferGroupFnInput"),getWallet:_("GetWalletFnInput"),healthcheck:_("HealthcheckFnInput"),importData:_("ImportDataFnInput"),reverseTransfer:_("ReverseTransferFnInput"),reverseTransferGroup:_("ReverseTransferGroupFnInput"),reverseTransfers:_("ReverseTransfersFnInput"),setFlags:_("SetFlagsFnInput"),updateToken:_("UpdateTokenFnInput"),updateTransfer:_("UpdateTransferFnInput"),updateTransferGroup:_("UpdateTransferGroupFnInput"),updateTransferGroups:_("UpdateTransferGroupsFnInput"),updateTransfers:_("UpdateTransfersFnInput"),updateWallet:_("UpdateWalletFnInput")},v={aggregateTransfers:Vp,createAccessToken:Hp,createContract:zp,createDeposit:Jp,createExchange:hd,createToken:_d,createTransfer:gd,createTransferGroup:Td,createTransfers:yd,createWallet:bd,createWithdrawal:Fd,findBalances:xd,findTokens:Od,findTransferGroups:$d,findTransfers:wd,findWallets:Id,getBalance:jd,getBalanceHistory:kd,getFlags:vd,getStatistics:Sd,getToken:Cd,getTransfer:Gd,getTransferGroup:Rd,getWallet:Pd,healthcheck:Md,importData:Ed,reverseTransfer:Wd,reverseTransferGroup:Dd,reverseTransfers:Ad,setFlags:Nd,updateToken:Ud,updateTransfer:qd,updateTransferGroup:Bd,updateTransferGroups:Ld,updateTransfers:Vd,updateWallet:Hd},ic=(N=>(N.aggregateTransfers="aggregateTransfers",N.createAccessToken="createAccessToken",N.createContract="createContract",N.createDeposit="createDeposit",N.createExchange="createExchange",N.createToken="createToken",N.createTransfer="createTransfer",N.createTransferGroup="createTransferGroup",N.createTransfers="createTransfers",N.createWallet="createWallet",N.createWithdrawal="createWithdrawal",N.findBalances="findBalances",N.findTokens="findTokens",N.findTransferGroups="findTransferGroups",N.findTransfers="findTransfers",N.findWallets="findWallets",N.getBalance="getBalance",N.getBalanceHistory="getBalanceHistory",N.getFlags="getFlags",N.getStatistics="getStatistics",N.getToken="getToken",N.getTransfer="getTransfer",N.getTransferGroup="getTransferGroup",N.getWallet="getWallet",N.healthcheck="healthcheck",N.importData="importData",N.reverseTransfer="reverseTransfer",N.reverseTransferGroup="reverseTransferGroup",N.reverseTransfers="reverseTransfers",N.setFlags="setFlags",N.updateToken="updateToken",N.updateTransfer="updateTransfer",N.updateTransferGroup="updateTransferGroup",N.updateTransferGroups="updateTransferGroups",N.updateTransfers="updateTransfers",N.updateWallet="updateWallet",N))(ic||{}),oc=(r=>(r.findTransfers="findTransfers",r.findWallets="findWallets",r))(oc||{});var pc,I$=(pc=window.WAPI_VERSION)!=null?pc:"",Pt=class{constructor(e,r){this.config={};if(this.api=e,this.$connect=e.$connect,r&&(r.token&&(this.config=P(x({},this.config),{token:r.token})),r.hooks))for(let[n,a]of Object.entries(r.hooks))this.setHook(n,a)}close(){return ee(this,null,function*(){return this.api.close()})}version(){return I$}setHook(e,r){if(typeof r!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=r,this}configure(e){return this.config=x(x({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,r){return e===void 0?v.aggregateTransfers({client:this}):v.aggregateTransfers({client:this},e,r)}createAccessToken(e,r){return v.createAccessToken({client:this},e,r)}createContract(e,r){return v.createContract({client:this},e,r)}createDeposit(e,r){return v.createDeposit({client:this},e,r)}createExchange(e,r){return v.createExchange({client:this},e,r)}createToken(e,r){return v.createToken({client:this},e,r)}createTransfer(e,r){return v.createTransfer({client:this},e,r)}createTransferGroup(e,r){return v.createTransferGroup({client:this},e,r)}createTransfers(e,r){return v.createTransfers({client:this},e,r)}createWallet(e,r){return v.createWallet({client:this},e,r)}createWithdrawal(e,r){return v.createWithdrawal({client:this},e,r)}findBalances(e,r){return e===void 0?v.findBalances({client:this}):v.findBalances({client:this},e,r)}findTokens(e,r){return e===void 0?v.findTokens({client:this}):v.findTokens({client:this},e,r)}findTransferGroups(e,r){return e===void 0?v.findTransferGroups({client:this}):v.findTransferGroups({client:this},e,r)}findTransfers(e,r){return e===void 0?v.findTransfers({client:this}):v.findTransfers({client:this},e,r)}findWallets(e,r){return e===void 0?v.findWallets({client:this}):v.findWallets({client:this},e,r)}getBalance(e,r){return v.getBalance({client:this},e,r)}getBalanceHistory(e,r){return v.getBalanceHistory({client:this},e,r)}getFlags(e,r){return v.getFlags({client:this},e,r)}getStatistics(e,r){return v.getStatistics({client:this},e,r)}getToken(e,r){return v.getToken({client:this},e,r)}getTransfer(e,r){return v.getTransfer({client:this},e,r)}getTransferGroup(e,r){return v.getTransferGroup({client:this},e,r)}getWallet(e,r){return v.getWallet({client:this},e,r)}healthcheck(e,r){return v.healthcheck({client:this},e!=null?e:{},r)}importData(e,r){if(e===void 0&&r===void 0)return v.importData({client:this});if(r===void 0&&sc(e))return v.importData({client:this},e);if(ac(e))return v.importData({client:this},e,r);throw new _e({input:e,options:r})}reverseTransfer(e,r){return v.reverseTransfer({client:this},e,r)}reverseTransferGroup(e,r){return v.reverseTransferGroup({client:this},e,r)}reverseTransfers(e,r){return e===void 0?v.reverseTransfers({client:this}):v.reverseTransfers({client:this},e,r)}setFlags(e,r){return v.setFlags({client:this},e,r)}updateToken(e,r){return v.updateToken({client:this},e,r)}updateTransfer(e,r){return v.updateTransfer({client:this},e,r)}updateTransferGroup(e,r){return v.updateTransferGroup({client:this},e,r)}updateTransferGroups(e,r){return e===void 0?v.updateTransferGroups({client:this}):v.updateTransferGroups({client:this},e,r)}updateTransfers(e,r){return e===void 0?v.updateTransfers({client:this}):v.updateTransfers({client:this},e,r)}updateWallet(e,r){return v.updateWallet({client:this},e,r)}};function dc(t,e){let r=Dp(t);return new Pt(r,e)}function fc(t,e){let r=qp(t);return new Pt(r,e)}var j$=Es.getValidator("ClientOptions"),uc=(r=>(r.ws="ws",r.https="https",r))(uc||{});function k$(t){let e=t.config,{inputCopy:r,error:n}=j$(t);if(n)throw n;if(r.client==="ws")return dc(r.connection,e);if(r.client==="https")return fc(r.connection,e);throw new TypeError("Invalid client type")}var v$={getIdentifier:of};return xc(S$);})();
8
+ deps: ${r}}`};var TT={keyword:"dependencies",type:"object",schemaType:"object",error:Re.error,code(t){let[e,r]=yT(t);Rl(t,e),Ml(t,r)}};function yT({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let a=Array.isArray(t[n])?e:r;a[n]=t[n]}return[e,r]}function Rl(t,e=t.schema){let{gen:r,data:n,it:a}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let p=(0,lr.propertyInData)(r,n,i,a.opts.ownProperties);t.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?r.if(p,()=>{for(let m of o)(0,lr.checkReportMissingProp)(t,m)}):(r.if((0,gp._)`${p} && (${(0,lr.checkMissingProp)(t,o,s)})`),(0,lr.reportMissingProp)(t,s),r.else())}}Re.validatePropertyDeps=Rl;function Ml(t,e=t.schema){let{gen:r,data:n,keyword:a,it:s}=t,i=r.name("valid");for(let o in e)(0,gT.alwaysValidSchema)(s,e[o])||(r.if((0,lr.propertyInData)(r,n,o,s.opts.ownProperties),()=>{let p=t.subschema({keyword:a,schemaProp:o},i);t.mergeValidEvaluated(p,i)},()=>r.var(i,!0)),t.ok(i))}Re.validateSchemaDeps=Ml;Re.default=TT});var Dl=I(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});var Wl=A(),FT=z(),xT={message:"property name must be valid",params:({params:t})=>(0,Wl._)`{propertyName: ${t.propertyName}}`},bT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:xT,code(t){let{gen:e,schema:r,data:n,it:a}=t;if((0,FT.alwaysValidSchema)(a,r))return;let s=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,Wl.not)(s),()=>{t.error(!0),a.allErrors||e.break()})}),t.ok(s)}};Tp.default=bT});var Fp=I(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Wi=xe(),ke=A(),OT=Ne(),Di=z(),$T={message:"must NOT have additional properties",params:({params:t})=>(0,ke._)`{additionalProperty: ${t.additionalProperty}}`},wT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$T,code(t){let{gen:e,schema:r,parentSchema:n,data:a,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:p}=i;if(i.props=!0,p.removeAdditional!=="all"&&(0,Di.alwaysValidSchema)(i,r))return;let m=(0,Wi.allSchemaProperties)(n.properties),c=(0,Wi.allSchemaProperties)(n.patternProperties);h(),t.ok((0,ke._)`${s} === ${OT.default.errors}`);function h(){e.forIn("key",a,F=>{!m.length&&!c.length?g(F):e.if(T(F),()=>g(F))})}function T(F){let $;if(m.length>8){let B=(0,Di.schemaRefOrVal)(i,n.properties,"properties");$=(0,Wi.isOwnProperty)(e,B,F)}else m.length?$=(0,ke.or)(...m.map(B=>(0,ke._)`${F} === ${B}`)):$=ke.nil;return c.length&&($=(0,ke.or)($,...c.map(B=>(0,ke._)`${(0,Wi.usePattern)(t,B)}.test(${F})`))),(0,ke.not)($)}function x(F){e.code((0,ke._)`delete ${a}[${F}]`)}function g(F){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){x(F);return}if(r===!1){t.setParams({additionalProperty:F}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Di.alwaysValidSchema)(i,r)){let $=e.name("valid");p.removeAdditional==="failing"?(y(F,$,!1),e.if((0,ke.not)($),()=>{t.reset(),x(F)})):(y(F,$),o||e.if((0,ke.not)($),()=>e.break()))}}function y(F,$,B){let U={keyword:"additionalProperties",dataProp:F,dataPropType:Di.Type.Str};B===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(U,$)}}};yp.default=wT});var Ul=I(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var IT=Xt(),Al=xe(),xp=z(),Nl=Fp(),jT={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Nl.default.code(new IT.KeywordCxt(s,Nl.default,"additionalProperties"));let i=(0,Al.allSchemaProperties)(r);for(let h of i)s.definedProperties.add(h);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=xp.mergeEvaluated.props(e,(0,xp.toHash)(i),s.props));let o=i.filter(h=>!(0,xp.alwaysValidSchema)(s,r[h]));if(o.length===0)return;let p=e.name("valid");for(let h of o)m(h)?c(h):(e.if((0,Al.propertyInData)(e,a,h,s.opts.ownProperties)),c(h),s.allErrors||e.else().var(p,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(p);function m(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}function c(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},p)}}};bp.default=jT});var Hl=I(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var ql=xe(),Ai=A(),Bl=z(),Ll=z(),kT={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:a,it:s}=t,{opts:i}=s,o=(0,ql.allSchemaProperties)(r),p=o.filter(y=>(0,Bl.alwaysValidSchema)(s,r[y]));if(o.length===0||p.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let m=i.strictSchema&&!i.allowMatchingProperties&&a.properties,c=e.name("valid");s.props!==!0&&!(s.props instanceof Ai.Name)&&(s.props=(0,Ll.evaluatedPropsToName)(e,s.props));let{props:h}=s;T();function T(){for(let y of o)m&&x(y),s.allErrors?g(y):(e.var(c,!0),g(y),e.if(c))}function x(y){for(let F in m)new RegExp(y).test(F)&&(0,Bl.checkStrictMode)(s,`property ${F} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,F=>{e.if((0,Ai._)`${(0,ql.usePattern)(t,y)}.test(${F})`,()=>{let $=p.includes(y);$||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:F,dataPropType:Ll.Type.Str},c),s.opts.unevaluated&&h!==!0?e.assign((0,Ai._)`${h}[${F}]`,!0):!$&&!s.allErrors&&e.if((0,Ai.not)(c),()=>e.break())})})}}};Op.default=kT});var Vl=I($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var ST=z(),vT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,ST.alwaysValidSchema)(n,r)){t.fail();return}let a=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};$p.default=vT});var zl=I(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var ET=xe(),GT={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ET.validateUnion,error:{message:"must match a schema in anyOf"}};wp.default=GT});var Jl=I(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var Ni=A(),CT=z(),RT={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ni._)`{passingSchemas: ${t.passing}}`},MT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:RT,code(t){let{gen:e,schema:r,parentSchema:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=r,i=e.let("valid",!1),o=e.let("passing",null),p=e.name("_valid");t.setParams({passing:o}),e.block(m),t.result(i,()=>t.reset(),()=>t.error(!0));function m(){s.forEach((c,h)=>{let T;(0,CT.alwaysValidSchema)(a,c)?e.var(p,!0):T=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},p),h>0&&e.if((0,Ni._)`${p} && ${i}`).assign(i,!1).assign(o,(0,Ni._)`[${o}, ${h}]`).else(),e.if(p,()=>{e.assign(i,!0),e.assign(o,h),T&&t.mergeEvaluated(T,Ni.Name)})})}}};Ip.default=MT});var Ql=I(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var PT=z(),WT={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let a=e.name("valid");r.forEach((s,i)=>{if((0,PT.alwaysValidSchema)(n,s))return;let o=t.subschema({keyword:"allOf",schemaProp:i},a);t.ok(a),t.mergeEvaluated(o)})}};jp.default=WT});var Xl=I(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var Ui=A(),Yl=z(),DT={message:({params:t})=>(0,Ui.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ui._)`{failingKeyword: ${t.ifClause}}`},AT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:DT,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Yl.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=Kl(n,"then"),s=Kl(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(p(),t.reset(),a&&s){let c=e.let("ifClause");t.setParams({ifClause:c}),e.if(o,m("then",c),m("else",c))}else a?e.if(o,m("then")):e.if((0,Ui.not)(o),m("else"));t.pass(i,()=>t.error(!0));function p(){let c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(c)}function m(c,h){return()=>{let T=t.subschema({keyword:c},o);e.assign(i,o),t.mergeValidEvaluated(T,i),h?e.assign(h,(0,Ui._)`${c}`):t.setParams({ifClause:c})}}}};function Kl(t,e){let r=t.schema[e];return r!==void 0&&!(0,Yl.alwaysValidSchema)(t,r)}kp.default=AT});var Zl=I(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var NT=z(),UT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,NT.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Sp.default=UT});var ec=I(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var qT=lp(),BT=vl(),LT=cp(),HT=Gl(),VT=Cl(),zT=Pl(),JT=Dl(),QT=Fp(),KT=Ul(),YT=Hl(),XT=Vl(),ZT=zl(),ey=Jl(),ty=Ql(),ry=Xl(),ny=Zl();function ay(t=!1){let e=[XT.default,ZT.default,ey.default,ty.default,ry.default,ny.default,JT.default,QT.default,zT.default,KT.default,YT.default];return t?e.push(BT.default,HT.default):e.push(qT.default,LT.default),e.push(VT.default),e}vp.default=ay});var tc=I(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var re=A(),sy={message:({schemaCode:t})=>(0,re.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,re._)`{format: ${t}}`},iy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:sy,code(t,e){let{gen:r,data:n,$data:a,schema:s,schemaCode:i,it:o}=t,{opts:p,errSchemaPath:m,schemaEnv:c,self:h}=o;if(!p.validateFormats)return;a?T():x();function T(){let g=r.scopeValue("formats",{ref:h.formats,code:p.code.formats}),y=r.const("fDef",(0,re._)`${g}[${i}]`),F=r.let("fType"),$=r.let("format");r.if((0,re._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(F,(0,re._)`${y}.type || "string"`).assign($,(0,re._)`${y}.validate`),()=>r.assign(F,(0,re._)`"string"`).assign($,y)),t.fail$data((0,re.or)(B(),U()));function B(){return p.strictSchema===!1?re.nil:(0,re._)`${i} && !${$}`}function U(){let K=c.$async?(0,re._)`(${y}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,re._)`${$}(${n})`,G=(0,re._)`(typeof ${$} == "function" ? ${K} : ${$}.test(${n}))`;return(0,re._)`${$} && ${$} !== true && ${F} === ${e} && !${G}`}}function x(){let g=h.formats[s];if(!g){B();return}if(g===!0)return;let[y,F,$]=U(g);y===e&&t.pass(K());function B(){if(p.strictSchema===!1){h.logger.warn(G());return}throw new Error(G());function G(){return`unknown format "${s}" ignored in schema at path "${m}"`}}function U(G){let Se=G instanceof RegExp?(0,re.regexpCode)(G):p.code.formats?(0,re._)`${p.code.formats}${(0,re.getProperty)(s)}`:void 0,Me=r.scopeValue("formats",{key:s,ref:G,code:Se});return typeof G=="object"&&!(G instanceof RegExp)?[G.type||"string",G.validate,(0,re._)`${Me}.validate`]:["string",G,Me]}function K(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!c.$async)throw new Error("async format in sync schema");return(0,re._)`await ${$}(${n})`}return typeof F=="function"?(0,re._)`${$}(${n})`:(0,re._)`${$}.test(${n})`}}}};Ep.default=iy});var rc=I(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var oy=tc(),py=[oy.default];Gp.default=py});var nc=I($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.contentVocabulary=$t.metadataVocabulary=void 0;$t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var sc=I(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var dy=ll(),fy=Il(),uy=ec(),ly=rc(),ac=nc(),cy=[dy.default,fy.default,(0,uy.default)(),ly.default,ac.metadataVocabulary,ac.contentVocabulary];Cp.default=cy});var oc=I(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.DiscrError=void 0;var ic;(function(t){t.Tag="tag",t.Mapping="mapping"})(ic||(qi.DiscrError=ic={}))});var dc=I(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var wt=A(),Rp=oc(),pc=$i(),my=Zt(),hy=z(),_y={message:({params:{discrError:t,tagName:e}})=>t===Rp.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,wt._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},gy={keyword:"discriminator",type:"object",schemaType:"object",error:_y,code(t){let{gen:e,data:r,schema:n,parentSchema:a,it:s}=t,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let p=e.let("valid",!1),m=e.const("tag",(0,wt._)`${r}${(0,wt.getProperty)(o)}`);e.if((0,wt._)`typeof ${m} == "string"`,()=>c(),()=>t.error(!1,{discrError:Rp.DiscrError.Tag,tag:m,tagName:o})),t.ok(p);function c(){let x=T();e.if(!1);for(let g in x)e.elseIf((0,wt._)`${m} === ${g}`),e.assign(p,h(x[g]));e.else(),t.error(!1,{discrError:Rp.DiscrError.Mapping,tag:m,tagName:o}),e.endIf()}function h(x){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:x},g);return t.mergeEvaluated(y,wt.Name),g}function T(){var x;let g={},y=$(a),F=!0;for(let K=0;K<i.length;K++){let G=i[K];if(G!=null&&G.$ref&&!(0,hy.schemaHasRulesButRef)(G,s.self.RULES)){let Me=G.$ref;if(G=pc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Me),G instanceof pc.SchemaEnv&&(G=G.schema),G===void 0)throw new my.default(s.opts.uriResolver,s.baseId,Me)}let Se=(x=G==null?void 0:G.properties)===null||x===void 0?void 0:x[o];if(typeof Se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);F=F&&(y||$(G)),B(Se,K)}if(!F)throw new Error(`discriminator: "${o}" must be required`);return g;function $({required:K}){return Array.isArray(K)&&K.includes(o)}function B(K,G){if(K.const)U(K.const,G);else if(K.enum)for(let Se of K.enum)U(Se,G);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function U(K,G){if(typeof K!="string"||K in g)throw new Error(`discriminator: "${o}" values must be unique strings`);g[K]=G}}}};Mp.default=gy});var fc=I((bj,Ty)=>{Ty.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var lc=I((X,Pp)=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.MissingRefError=X.ValidationError=X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=X.Ajv=void 0;var yy=il(),Fy=sc(),xy=dc(),uc=fc(),by=["/properties"],Bi="http://json-schema.org/draft-07/schema",It=class extends yy.default{_addVocabularies(){super._addVocabularies(),Fy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(xy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(uc,by):uc;this.addMetaSchema(e,Bi,!1),this.refs["http://json-schema.org/schema"]=Bi}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Bi)?Bi:void 0)}};X.Ajv=It;Pp.exports=X=It;Pp.exports.Ajv=It;Object.defineProperty(X,"__esModule",{value:!0});X.default=It;var Oy=Xt();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return Oy.KeywordCxt}});var jt=A();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return jt._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return jt.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return jt.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return jt.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return jt.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return jt.CodeGen}});var $y=bi();Object.defineProperty(X,"ValidationError",{enumerable:!0,get:function(){return $y.default}});var wy=Zt();Object.defineProperty(X,"MissingRefError",{enumerable:!0,get:function(){return wy.default}})});var ww={};qc(ww,{APIFunctions:()=>Kp,APIValidators:()=>Qp,AggregateTransferManyTxInputSchema:()=>pa,AggregateTransferManyTxOutputSchema:()=>da,AggregateTransfersFnInputSchema:()=>Sr,AggregateTransfersFnOutputSchema:()=>vr,AuthError:()=>Pe,AuthenticationCheckTxInputSchema:()=>fa,AuthenticationCheckTxOutputSchema:()=>ua,AuthenticationError:()=>Ye,AuthorizationError:()=>ai,Client:()=>Gt,ClientFunctions:()=>j,ClientFunctionsEnum:()=>kc,ClientQueryBuilderFunctionsEnum:()=>Sc,ClientValidators:()=>Fw,ConfigError:()=>Mt,ConstraintError:()=>Pt,ConstsSchema:()=>ft,CreateAccessTokenFnInputSchema:()=>Er,CreateAccessTokenFnOutputSchema:()=>Gr,CreateAccessTokenTxInputSchema:()=>la,CreateAccessTokenTxOutputSchema:()=>ca,CreateContractFnInputSchema:()=>Cr,CreateContractFnOutputSchema:()=>Rr,CreateContractTxInputSchema:()=>ma,CreateContractTxOutputSchema:()=>ha,CreateDepositFnInputSchema:()=>Mr,CreateDepositFnOutputSchema:()=>Pr,CreateDepositTxInputSchema:()=>_a,CreateDepositTxOutputSchema:()=>ga,CreateDistributionTxInputSchema:()=>Ta,CreateDistributionTxOutputSchema:()=>ya,CreateExchangeFnInputSchema:()=>Wr,CreateExchangeFnOutputSchema:()=>Dr,CreateTokenFnInputSchema:()=>Ar,CreateTokenFnOutputSchema:()=>Nr,CreateTokenTxInputSchema:()=>Fa,CreateTokenTxOutputSchema:()=>xa,CreateTransferFnInputSchema:()=>Ur,CreateTransferFnOutputSchema:()=>qr,CreateTransferGroupFnInputSchema:()=>Br,CreateTransferGroupFnOutputSchema:()=>Lr,CreateTransferGroupTxInputSchema:()=>$a,CreateTransferGroupTxOutputSchema:()=>wa,CreateTransferManyTxInputSchema:()=>Ia,CreateTransferManyTxOutputSchema:()=>ja,CreateTransferTxInputSchema:()=>ba,CreateTransferTxOutputSchema:()=>Oa,CreateTransfersFnInputSchema:()=>Hr,CreateTransfersFnOutputSchema:()=>Vr,CreateWalletFnInputSchema:()=>zr,CreateWalletFnOutputSchema:()=>Jr,CreateWalletTxInputSchema:()=>ka,CreateWalletTxOutputSchema:()=>Sa,CreateWithdrawalFnInputSchema:()=>Qr,CreateWithdrawalFnOutputSchema:()=>Kr,CreateWithdrawalTxInputSchema:()=>va,CreateWithdrawalTxOutputSchema:()=>Ea,DbFilterFunctionBasicEnum:()=>ud,DbFilterFunctionInEnum:()=>ld,DbFilterFunctionMetadataBasicEnum:()=>fd,DbFilterFunctionMetadataInEnum:()=>cd,DbFilterFunctionMetadataNullEnum:()=>md,DbFilterFunctionNullEnum:()=>hd,DbFilterOperatorEnum:()=>_d,DbFilterOperatorExtendedEnum:()=>Td,DbFilterOperatorStringEnum:()=>gd,DbModelNameEnum:()=>Sd,ErrorDescription:()=>$f,ErrorMessage:()=>Of,ErrorType:()=>si,Errors:()=>Te,ExportBalanceHistoryFnInputSchema:()=>Yr,ExportBalanceHistoryFnOutputSchema:()=>Xr,ExportBalanceHistoryTxInputSchema:()=>Ga,ExportBalanceHistoryTxOutputSchema:()=>Ca,ExportTokenManyTxInputSchema:()=>Ra,ExportTokenManyTxOutputSchema:()=>Ma,ExportTokensFnInputSchema:()=>Zr,ExportTokensFnOutputSchema:()=>en,ExportTransferGroupManyTxInputSchema:()=>Pa,ExportTransferGroupManyTxOutputSchema:()=>Wa,ExportTransferGroupsFnInputSchema:()=>tn,ExportTransferGroupsFnOutputSchema:()=>rn,ExportTransferManyTxInputSchema:()=>Da,ExportTransferManyTxOutputSchema:()=>Aa,ExportTransfersFnInputSchema:()=>nn,ExportTransfersFnOutputSchema:()=>an,ExportWalletManyTxInputSchema:()=>Na,ExportWalletManyTxOutputSchema:()=>Ua,ExportWalletsFnInputSchema:()=>sn,ExportWalletsFnOutputSchema:()=>on,FindBalanceManyTxInputSchema:()=>qa,FindBalanceManyTxOutputSchema:()=>Ba,FindBalancesFnInputSchema:()=>pn,FindBalancesFnOutputSchema:()=>dn,FindTokenManyTxInputSchema:()=>La,FindTokenManyTxOutputSchema:()=>Ha,FindTokensFnInputSchema:()=>fn,FindTokensFnOutputSchema:()=>un,FindTransferGroupManyTxInputSchema:()=>Va,FindTransferGroupManyTxOutputSchema:()=>za,FindTransferGroupsFnInputSchema:()=>ln,FindTransferGroupsFnOutputSchema:()=>cn,FindTransferManyTxInputSchema:()=>Ja,FindTransferManyTxOutputSchema:()=>Qa,FindTransfersFnInputSchema:()=>mn,FindTransfersFnOutputSchema:()=>hn,FindWalletManyTxInputSchema:()=>Ka,FindWalletManyTxOutputSchema:()=>Ya,FindWalletsFnInputSchema:()=>_n,FindWalletsFnOutputSchema:()=>gn,FinishTransactionTxInputSchema:()=>Xa,FinishTransactionTxOutputSchema:()=>Za,FnConstsSchema:()=>Tn,GetBalanceFnInputSchema:()=>yn,GetBalanceFnOutputSchema:()=>Fn,GetBalanceHistoryFnInputSchema:()=>xn,GetBalanceHistoryFnOutputSchema:()=>bn,GetBalanceHistoryTxInputSchema:()=>rs,GetBalanceHistoryTxOutputSchema:()=>ns,GetBalanceTxInputSchema:()=>es,GetBalanceTxOutputSchema:()=>ts,GetExportFnInputSchema:()=>On,GetExportFnOutputSchema:()=>$n,GetExportTxInputSchema:()=>as,GetExportTxOutputSchema:()=>ss,GetFlagsFnInputSchema:()=>wn,GetFlagsFnOutputSchema:()=>In,GetFlagsTxInputSchema:()=>is,GetFlagsTxOutputSchema:()=>os,GetStatisticsFnInputSchema:()=>jn,GetStatisticsFnOutputSchema:()=>kn,GetStatisticsTxInputSchema:()=>ps,GetStatisticsTxOutputSchema:()=>ds,GetTokenFnInputSchema:()=>Sn,GetTokenFnOutputSchema:()=>vn,GetTokenManyTxInputSchema:()=>ls,GetTokenManyTxOutputSchema:()=>cs,GetTokenTxInputSchema:()=>fs,GetTokenTxOutputSchema:()=>us,GetTransferFnInputSchema:()=>En,GetTransferFnOutputSchema:()=>Gn,GetTransferGroupFnInputSchema:()=>Cn,GetTransferGroupFnOutputSchema:()=>Rn,GetTransferGroupTxInputSchema:()=>_s,GetTransferGroupTxOutputSchema:()=>gs,GetTransferTxInputSchema:()=>ms,GetTransferTxOutputSchema:()=>hs,GetWalletFnInputSchema:()=>Mn,GetWalletFnOutputSchema:()=>Pn,GetWalletManyTxInputSchema:()=>Fs,GetWalletManyTxOutputSchema:()=>xs,GetWalletTxInputSchema:()=>Ts,GetWalletTxOutputSchema:()=>ys,HealthcheckFnInputSchema:()=>Wn,HealthcheckFnOutputSchema:()=>Dn,HealthcheckTxInputSchema:()=>bs,HealthcheckTxOutputSchema:()=>Os,ImportActionsTxInputSchema:()=>lt,ImportActionsTxOutputSchema:()=>$s,ImportDataFnInputSchema:()=>ut,ImportDataFnOutputSchema:()=>An,InputError:()=>L,JSONRPCError:()=>Ke,ListExportManyTxInputSchema:()=>ws,ListExportManyTxOutputSchema:()=>Is,ListExportsFnInputSchema:()=>Nn,ListExportsFnOutputSchema:()=>Un,QueryBuilder:()=>te,QueryLogsTxInputSchema:()=>js,QueryLogsTxOutputSchema:()=>ks,ResetDatabaseTxInputSchema:()=>Ss,ResetDatabaseTxOutputSchema:()=>vs,ReverseTransferFnInputSchema:()=>qn,ReverseTransferFnOutputSchema:()=>Bn,ReverseTransferGroupFnInputSchema:()=>Ln,ReverseTransferGroupFnOutputSchema:()=>Hn,ReverseTransferGroupManyTxInputSchema:()=>Ms,ReverseTransferGroupManyTxOutputSchema:()=>Ps,ReverseTransferGroupTxInputSchema:()=>Cs,ReverseTransferGroupTxOutputSchema:()=>Rs,ReverseTransferManyTxInputSchema:()=>Ws,ReverseTransferManyTxOutputSchema:()=>Ds,ReverseTransferTxInputSchema:()=>Es,ReverseTransferTxOutputSchema:()=>Gs,ReverseTransfersFnInputSchema:()=>Vn,ReverseTransfersFnOutputSchema:()=>zn,SetFlagsFnInputSchema:()=>Jn,SetFlagsFnOutputSchema:()=>Qn,SetFlagsTxInputSchema:()=>As,SetFlagsTxOutputSchema:()=>Ns,StartTransactionTxInputSchema:()=>Us,StartTransactionTxOutputSchema:()=>qs,StreamError:()=>ye,StreamPromise:()=>We,TokenStatusEnum:()=>Fd,TokenTableInputSchema:()=>cr,TokenTableSchema:()=>mr,TokenTypeEnum:()=>yd,TransferGroupStatusEnum:()=>xd,TransferGroupTableInputSchema:()=>gr,TransferGroupTableSchema:()=>Tr,TransferGroupTypeEnum:()=>$d,TransferLogTableInputSchema:()=>yr,TransferLogTableSchema:()=>Fr,TransferStatusEnum:()=>bd,TransferStatusInputEnum:()=>Od,TransferTableInputSchema:()=>hr,TransferTableSchema:()=>_r,TransferTypeEnum:()=>wd,TxConstsSchema:()=>Bs,UpdateTokenFnInputSchema:()=>Kn,UpdateTokenFnOutputSchema:()=>Yn,UpdateTokenTxInputSchema:()=>Ls,UpdateTokenTxOutputSchema:()=>Hs,UpdateTransferFnInputSchema:()=>Xn,UpdateTransferFnOutputSchema:()=>Zn,UpdateTransferGroupFnInputSchema:()=>ea,UpdateTransferGroupFnOutputSchema:()=>ta,UpdateTransferGroupManyTxInputSchema:()=>Ks,UpdateTransferGroupManyTxOutputSchema:()=>Ys,UpdateTransferGroupTxInputSchema:()=>Js,UpdateTransferGroupTxOutputSchema:()=>Qs,UpdateTransferGroupsFnInputSchema:()=>ra,UpdateTransferGroupsFnOutputSchema:()=>na,UpdateTransferManyTxInputSchema:()=>Xs,UpdateTransferManyTxOutputSchema:()=>Zs,UpdateTransferTxInputSchema:()=>Vs,UpdateTransferTxOutputSchema:()=>zs,UpdateTransfersFnInputSchema:()=>aa,UpdateTransfersFnOutputSchema:()=>sa,UpdateWalletFnInputSchema:()=>ia,UpdateWalletFnOutputSchema:()=>oa,UpdateWalletTxInputSchema:()=>ei,UpdateWalletTxOutputSchema:()=>ti,ValidationError:()=>ge,Validator:()=>ri,WAPIError:()=>$e,WalletStatusEnum:()=>jd,WalletTableInputSchema:()=>xr,WalletTableSchema:()=>br,WalletTokenSettingTableInputSchema:()=>Or,WalletTokenSettingTableSchema:()=>$r,WalletTypeEnum:()=>Id,WapiClientType:()=>Cc,WapiSettingTableInputSchema:()=>wr,WapiSettingTableSchema:()=>Ir,WapiSettingTypeEnum:()=>kd,WapiStatisticTableInputSchema:()=>jr,WapiStatisticTableSchema:()=>kr,aggregateTransfers:()=>id,create:()=>Ow,createAccessToken:()=>od,createContract:()=>pd,createDeposit:()=>dd,createExchange:()=>vd,createToken:()=>Ed,createTransfer:()=>Gd,createTransferGroup:()=>Cd,createTransfers:()=>Rd,createWallet:()=>Md,createWithdrawal:()=>Pd,exportBalanceHistory:()=>Wd,exportTokens:()=>Dd,exportTransferGroups:()=>Ad,exportTransfers:()=>Nd,exportWallets:()=>Ud,findBalances:()=>qd,findTokens:()=>Bd,findTransferGroups:()=>Ld,findTransfers:()=>Hd,findWallets:()=>Vd,getBalance:()=>zd,getBalanceHistory:()=>Jd,getExport:()=>Qd,getFlags:()=>Kd,getStatistics:()=>Yd,getToken:()=>Xd,getTransfer:()=>Zd,getTransferGroup:()=>ef,getWallet:()=>tf,healthcheck:()=>rf,importData:()=>nf,listExports:()=>af,reverseTransfer:()=>sf,reverseTransferGroup:()=>of,reverseTransfers:()=>pf,setFlags:()=>df,updateToken:()=>ff,updateTransfer:()=>uf,updateTransferGroup:()=>lf,updateTransferGroups:()=>cf,updateTransfers:()=>mf,updateWallet:()=>hf,utils:()=>$w});var bf=WebSocket;function D(...t){window.WAPI_DEBUG&&console.log(...t.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var Z={JSONRPC:{min:-32700,max:-32600,ERRORS:{PARSE_ERROR:{code:-32700,message:"Parse error",description:"Unable to parse JSON input"},INVALID_REQUEST:{code:-32600,message:"Invalid request",description:"JSON input does not match JSONRPC spec"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found",description:"Requested method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params",description:"Invalid params provided for method"},INTERNAL_SERVER_ERROR:{code:-32603,message:"Internal server error",description:"Unknown error occurred"}}},AUTH:{min:-20999,max:-2e4,ERRORS:{AUTHENTICATION_ERROR:{code:-2e4,message:"Authentication error",description:"Invalid authentication credentials"},AUTHORIZATION_ERROR:{code:-20001,message:"AUTHORIZATION_ERROR",description:"Provided credentials lack access rights"}}},STREAM:{min:-10999,max:-1e4,ERRORS:{CONNECTION_LOST:{code:-1e4,message:"CONNECTION_LOST",description:"Lost connection to server"},INPUT_STREAM_INVALID:{code:-10001,message:"INPUT_STREAM_INVALID",description:"Invalid input stream identifier provided"},INVALID_RESPONSE_STREAM_CHUNK:{code:-10002,message:"INVALID_RESPONSE_STREAM_CHUNK",description:"Received multiple chunks for non-array property"},INVALID_INPUT_STREAM_CHUNK:{code:-10003,message:"INVALID_INPUT_STREAM_CHUNK",description:"Invalid chunk sent to input stream"},INPUT_STREAM_TIMEOUT:{code:-10004,message:"INPUT_STREAM_TIMEOUT",description:"Input stream failed to finish in allotted time"},INPUT_STREAM_ERROR:{code:-10005,message:"INPUT_STREAM_ERROR",description:"Unknown error in input stream"},INPUT_STREAM_NOT_ALLOWED:{code:-10006,message:"INPUT_STREAM_NOT_ALLOWED",description:"Stream input not allowed for method"}}},INPUT:{min:-14999,max:-11e3,ERRORS:{HTTP_BODY_SIZE:{code:-11e3,message:"HTTP_BODY_SIZE",description:"Http body size can't be more than 100MB"},DATABASE_EXPORT_CONFLICT:{code:-12e3,message:"DATABASE_EXPORT_CONFLICT",description:"Database export already in progress"},DATABASE_IMPORT_CONFLICT:{code:-12001,message:"DATABASE_IMPORT_CONFLICT",description:"Database import already in progress"},DATABASE_EXPORT_PROGRESS_NOT_FOUND:{code:-12002,message:"DATABASE_EXPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_PROGRESS_NOT_FOUND:{code:-12003,message:"DATABASE_IMPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_NOT_FOUND:{code:-12004,message:"DATABASE_IMPORT_NOT_FOUND",description:"Database import file not found"},TR_CANT_UPDATE_TO_PENDING:{code:-12100,message:"TR_CANT_UPDATE_TO_PENDING",description:"Transfer status can only move from 'pending'->'finished'/'cancelled"},TR_CANT_UPDATE_TIMESTAMP:{code:-12101,message:"TR_CANT_UPDATE_TIMESTAMP",description:"Cant update transfer.updated_at - allow_timestamps flag is set to off"},TR_CANT_INSERT_TIMESTAMP:{code:-12102,message:"TR_CANT_INSERT_TIMESTAMP",description:"Cant insert transfer.created_at - allow_timestamps flag is set to off"},TR_EMPTY_UPDATE_REQUEST:{code:-12103,message:"TR_EMPTY_UPDATE_REQUEST",description:"Update request for transfer is empty"},TR_MISSING_FILTER:{code:-12104,message:"TR_MISSING_FILTER",description:"Transactions can't reversed or updated without valid filter"},TR_TO_WALLET_WITHDRAWAL:{code:-12105,message:"TR_TO_WALLET_WITHDRAWAL",description:"To wallet can't be specified when doing a withdrawal"},TR_FROM_WALLET_DEPOSIT:{code:-12106,message:"TR_FROM_WALLET_DEPOSIT",description:"From wallet can't be specified when doing a deposit"},TR_FROM_TO_CONFLICT:{code:-12107,message:"TR_FROM_TO_CONFLICT",description:"from_wallet and to_wallet can not be the same"},TR_UNABLE_TO_RESOLVE_INPUT:{code:-12108,message:"TR_UNABLE_TO_RESOLVE_INPUT",description:"Unable to resolve references to foreign keys"},TRG_MISSING_FILTER:{code:-12200,message:"TRG_MISSING_FILTER",description:"Transaction groups can't reversed or updated without valid filter"},INVALID_FIELD_AGR_COMB:{code:-12300,message:"INVALID_FIELD_AGR_COMB",description:"Provided aggregation field was not found on Model"},INVALID_FIELD_FOR_MODEL:{code:-12301,message:"INVALID_FIELD_FOR_MODEL",description:"Provided groupBy field was not found on Model"},NO_METADATA_ON_MODEL:{code:-12302,message:"NO_METADATA_ON_MODEL",description:"Can't use metadata field for grouping as current Model does not have metadata"},INVALID_MODEL:{code:-12303,message:"INVALID_MODEL",description:"Provided Model name is invalid"},INVALID_COMPLEX_FILTER:{code:-12304,message:"INVALID_COMPLEX_FILTER",description:"The provided complex filter does not pass validation"},UNCLEAR_AGGREGATOR:{code:-12305,message:"UNCLEAR_AGGREGATOR",description:"Invalid aggregator function provided"},CONTRACT_OWNER_NOT_FOUND:{code:-12306,message:"CONTRACT_OWNER_NOT_FOUND",description:"Unable to find Wallet specified as Contract token owner"},DISTRIBUTION_MISSING_TARGETS:{code:-12307,message:"DISTRIBUTION_MISSING_TARGETS",description:"Unable to resolve all targets (Wallets, Tokens) for distribution request"},TOKEN_INVALID_WALLET:{code:-12308,message:"TOKEN_INVALID_WALLET",description:"Invalid belongs_to wallet provided"},BAL_FUTURE_DATETIME:{code:-12309,message:"BAL_FUTURE_DATETIME",description:"Balance datetime can't be in the future"},INPUT_NEEDS_IDENTIFIER:{code:-12310,message:"INPUT_NEEDS_IDENTIFIER",description:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier"},RESET_INVALID_CONFIRMATION:{code:-12311,message:"RESET_INVALID_CONFIRMATION",description:"Provided reset confirmation code is invalid"},INPUT_NEEDS_TOKEN:{code:-12312,message:"INPUT_NEEDS_TOKEN",description:"token must be specified on input or in client config"},CONFLICTING_OPTIONS_FOR_BALANCE:{code:-12313,message:"CONFLICTING_OPTIONS_FOR_BALANCE",description:"return_running_balance and return_running_balance_for can't be specified together"},CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT:{code:-12314,message:"CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",description:"return_signed_amount and return_signed_amount_for_wallet can't be specified together"},RUNNING_BALANCE_WITHOUT_WALLET:{code:-12315,message:"RUNNING_BALANCE_WITHOUT_WALLET",description:"return_running_balance option requires Wallet filter to be specified"},SIGNED_AMOUNT_WITHOUT_WALLET:{code:-12316,message:"SIGNED_AMOUNT_WITHOUT_WALLET",description:"return_signed_amount option requires Wallet filter to be specified"},REQUIRED_INPUT_MISSING:{code:-12317,message:"REQUIRED_INPUT_MISSING",description:"input does not specify required keys"},TRX_NOT_ALLOWED:{code:-12400,message:"TRX_NOT_ALLOWED",description:"This method can not run in a transaction"},TRANSACTION_NOT_FOUND:{code:-12401,message:"TRANSACTION_NOT_FOUND",description:"Transaction not found"},ONLY_SELECT_ALLOWED:{code:-12402,message:"ONLY_SELECT_ALLOWED",description:"Only select queries are allowed"}}},CONSTRAINT:{min:-19999,max:-19e3,ERRORS:{INVALID_LATEST_HASH:{code:-19e3,message:"INVALID_LATEST_HASH",description:"Http body size can't be more than 100MB"},TOKEN_LIMIT_REACHED:{code:-19001,message:"TOKEN_LIMIT_REACHED",description:"Unable to issue more tokens as Token.limit has been reached"},TR_INVALID_BALANCE:{code:-19101,message:"TR_INVALID_BALANCE",description:"Transfer would result in invalid balance for a Wallet"},TR_AMOUNT_NOT_DIVISIBLE:{code:-19102,message:"TR_AMOUNT_NOT_DIVISIBLE",description:"Transfer amount is not divisible by specified Token.divisor"},TR_TOKEN_DISABLED:{code:-19103,message:"TR_TOKEN_DISABLED",description:"Token status is set to 'disabled' - no new transfers allowed"},TR_TOKEN_DWONLY:{code:-19104,message:"TR_TOKEN_DWONLY",description:"Token status is set to 'dw-only' - only deposits or withdrawals allowed"},TR_TRG_STATUS_MISMATCH:{code:-19105,message:"TR_TRG_STATUS_MISMATCH",description:"Transfers in transfer_group must match transfer_group.transfer_status"},TR_TRG_CLOSED:{code:-19106,message:"TR_TRG_CLOSED",description:"Cant add Transfer to group. TransferGroup is closed"},TR_TIMESTAMP_IN_PAST:{code:-19107,message:"TR_TIMESTAMP_IN_PAST",description:"Transfer.created_at must be the latest"},TR_TIMESTAMP_MUST_BE_LATEST:{code:-19108,message:"TR_TIMESTAMP_MUST_BE_LATEST",description:"Transfer.created_at must be the latest"},TR_INVALID_CANCELLED:{code:-19109,message:"TR_INVALID_CANCELLED",description:"Cant create cancelled transfer"},TR_FROM_WALLET_STATUS_CONSTRAINT:{code:-19110,message:"TR_FROM_WALLET_STATUS_CONSTRAINT",description:"From wallet.status doesn't allow this type of transfers"},TR_TO_WALLET_STATUS_CONSTRAINT:{code:-19111,message:"TR_TO_WALLET_STATUS_CONSTRAINT",description:"To wallet.status doesn't allow this type of transfers"},TR_CANCELLED_CANT_RV:{code:-19112,message:"TR_CANCELLED_CANT_RV",description:"Cancelled Transfer can not be reversed"},TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19113,message:"TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true."},TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19114,message:"TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true."},TR_UNIQUE_IDENTIFIER:{code:-19115,message:"TR_UNIQUE_IDENTIFIER",description:"The identifier for Transfer object must be unique"},TRG_SINGLE_PENDING_TR_CANT_RV:{code:-19200,message:"TRG_SINGLE_PENDING_TR_CANT_RV",description:"Transfer is part of TransferGroup and can not be reversed separately"},TRG_CANCELLED_CANT_RV:{code:-19201,message:"TRG_CANCELLED_CANT_RV",description:"Cancelled TransferGroup can not be reversed"},TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19202,message:"TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true"},TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19203,message:"TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true"},TRG_UNIQUE_IDENTIFIER:{code:-19204,message:"TRG_UNIQUE_IDENTIFIER",description:"The identifier for TransferGroup object must be unique"},TOKEN_UNIQUE_FOREIGN:{code:-19300,message:"TOKEN_UNIQUE_FOREIGN",description:"The foreign for Token object must be unique"},WALLET_UNIQUE_FOREIGN:{code:-19400,message:"WALLET_UNIQUE_FOREIGN",description:"The foreign for Wallet object must be unique"},UNIQUE_CONSTRAINT:{code:-19500,message:"UNIQUE_CONSTRAINT",description:"Insert violates unique constraint"}}},CONFIG:{min:-16e3,max:-15e3,ERRORS:{METHOD_DISABLED:{code:-15e3,message:"METHOD_DISABLED",description:"Method is disabled"},FLAG_PRODUCTION_ON:{code:-15001,message:"FLAG_PRODUCTION_ON",description:'Production flag is "on" - this method is disabled'},FLAG_PRODUCTION_LOCKED:{code:-15002,message:"FLAG_PRODUCTION_LOCKED",description:"Cant update production flag to false in this server"},TRANSACTION_TIMEOUT:{code:-15003,message:"TRANSACTION_TIMEOUT",description:"Database transaction timed out"}}}},Te=b(b(b(b(b(b({},Z.JSONRPC.ERRORS),Z.AUTH.ERRORS),Z.CONFIG.ERRORS),Z.STREAM.ERRORS),Z.INPUT.ERRORS),Z.CONSTRAINT.ERRORS);function Xe(t){return Object.fromEntries(Object.keys(t).map(e=>[e,e]))}var si=Xe(Te),$e=class extends Error{constructor({type:e,code:r,message:n,data:a}){var i;super(n);let s=(i=Te[e])!=null?i:Te.INTERNAL_SERVER_ERROR;this.type=e!=null?e:si.INTERNAL_SERVER_ERROR,this.code=r!=null?r:s.code,this.message=n!=null?n:s.message,this.data=b({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Ke=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.JSONRPC.ERRORS}static get types(){return Xe(Z.JSONRPC.ERRORS)}},ye=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.STREAM.ERRORS}static get types(){return Xe(Z.STREAM.ERRORS)}},L=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.INPUT.ERRORS}static get types(){return Xe(Z.INPUT.ERRORS)}},Mt=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONFIG.ERRORS}static get types(){return Xe(Z.CONFIG.ERRORS)}},Pe=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.AUTH.ERRORS}static get types(){return Xe(Z.AUTH.ERRORS)}},Pt=class extends $e{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONSTRAINT.ERRORS}static get types(){return Xe(Z.CONSTRAINT.ERRORS)}},ge=class extends Ke{constructor(e,r){super(Ke.types.INVALID_PARAMS,e,r)}},Ye=class extends Pe{constructor(e){super(Pe.types.AUTHENTICATION_ERROR,e)}},ai=class extends Pe{constructor(e){super(Pe.types.AUTHORIZATION_ERROR,e)}};var Hc=Object.fromEntries(Object.keys(Te).map(t=>[Te[t].code,t]));function Vc(t){let e=Hc[t];if(!e){let n=Object.entries(Z).find(([a,s])=>t>=s.min&&t<=s.max);return{group:n==null?void 0:n[0],type:void 0}}let r=Object.keys(Z).find(n=>e in Z[n].ERRORS);return r?{group:r,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Qi({code:t,message:e,data:r}){let{group:n,type:a}=Vc(t);e=e&&e!==a?e:Te[a].description;let s;switch(n&&n!=="JSONRPC"&&a===void 0&&(D("Novel error from server",t,e,r),a=e,s=t,e=typeof r=="object"&&"description"in r&&typeof r.description=="string"?r.description:e),n){case"JSONRPC":return new Ke(a,r,e);case"AUTH":return new Pe(a,r,e,s);case"CONFIG":return new Mt(a,r,e,s);case"CONSTRAINT":return new Pt(a,r,e,s);case"INPUT":return new L(a,r,e,s);case"STREAM":return new ye(a,r,e,s);default:return new $e({code:t,message:e,data:r,type:a!=null?a:si.INTERNAL_SERVER_ERROR})}}var Of=Object.fromEntries(Object.keys(Te).map(t=>[t,Te[t].message])),$f=Object.fromEntries(Object.keys(Te).map(t=>[t,Te[t].description]));var ii,zc=new Uint8Array(16);function Ki(){if(!ii&&(ii=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ii))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ii(zc)}var ae=[];for(let t=0;t<256;++t)ae.push((t+256).toString(16).slice(1));function wf(t,e=0){return ae[t[e+0]]+ae[t[e+1]]+ae[t[e+2]]+ae[t[e+3]]+"-"+ae[t[e+4]]+ae[t[e+5]]+"-"+ae[t[e+6]]+ae[t[e+7]]+"-"+ae[t[e+8]]+ae[t[e+9]]+"-"+ae[t[e+10]]+ae[t[e+11]]+ae[t[e+12]]+ae[t[e+13]]+ae[t[e+14]]+ae[t[e+15]]}var Jc=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yi={randomUUID:Jc};function Qc(t,e,r){if(Yi.randomUUID&&!e&&!t)return Yi.randomUUID();t=t||{};let n=t.random||(t.rng||Ki)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return wf(n)}var ct=Qc;function Ze(t=8){return ct().split("-").pop().substr(0,t)}var Xi={timeouts:{},values:{},set(t,e){this.timeouts[t]=setTimeout(()=>this.clear(t),3e4),this.values[t]=e},get(t){return this.values[t]},getKey(t){let e=JSON.parse(JSON.stringify(t)),r="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),r+=n+":"+a}),r},clear(t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),delete this.timeouts[t],delete this.values[t]},clearAll(){Object.keys(this.timeouts).forEach(t=>{clearTimeout(this.timeouts[t])}),this.timeouts={},this.values={}}};function fe(t){if(!t)return ct();let e=Xi.getKey(t);if(Xi.get(e))throw new L("INPUT_NEEDS_IDENTIFIER",{object:t});let r=ct();return Xi.set(e,r),r}function kf(t){return new Promise(e=>setTimeout(e,t))}function Sf(){return fe()}function oi(t){return JSON.parse(JSON.stringify(t))}function ve(t,e,r){if(e in t){if(t[e]===void 0)throw new ge({input:t},`undefined provided for ${e}`);return t}if(!r)throw new ge({input:t},`${e} is required if no default set`);let n=oi(t);return n[e]=r,n}function O(t){let e=vf(t);if(e!=null)return{foreign:e}}function R(t){let e=vf(t);if(e!=null)return{identifier:e}}function w({input:t,options:e,validate:r}){var a;let n=oi(t);return(a=n.options)!=null||(n.options=e!=null?e:{}),r(n)}function vf(t){return t==null?t:t+""}function Kc(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function If(t){return t.host.replace(/^https:/,"wss:")+"?"+Kc({apikey:t.apikey,apisecret:t.apisecret,db:t.database,clientVersion:t.clientVersion})}function Ef(t){return typeof window=="undefined"?[If(t),{rejectUnauthorized:t.rejectUnauthorized}]:[If(t)]}function pi(t,e){let r={};return Object.keys(t).forEach(n=>{e[n]?typeof e[n]=="string"?r[e[n]]=t[n]:r[n]=e[n](t[n]):r[n]=t[n]}),r}function ne(t){return t.split(",").map(e=>e.split(" ")).map(e=>{let[r,n]=e;return{field:r,direction:n==="desc"?"desc":"asc"}})}function Gf(t){return new Date(t).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Yc(t){return t%4===0&&(t%100!==0||t%400===0)}var Xc=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Zc=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jf(t){let e=Xc.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Yc(r)?29:Zc[n])}var em=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function tm(t,e){let r=em.exec(t);if(!r)return!1;let n=+r[1],a=+r[2],s=+r[3],i=r[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var rm=/t|\s/i;function Cf(t){let e=t.split(rm);return e.length===1?jf(e[0]):e.length===2&&jf(e[0])&&tm(e[1])}var Wt=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,r){switch(e){case"data":return this._data.push(r),this;case"end":return this._end.push(r),this;case"error":return this._error.push(r),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(r=>r(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(r=>r(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},di=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var We=class{constructor(e){this.streamObject=new Wt({objectMode:!0});this.outStreamObject=new Wt({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(D("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let r=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(D("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Qi(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){r.push(n);return}if(n.dataArr){let a=b({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(P(b({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{D("stream ended");let n=r.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{D("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(D("streamPromise data",a),a===void 0)return;if(a.error){let o=Qi(a.error);return this.streamObject.destroy(o)}if(!a.prop){r.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{D("streamPromise end");let a=r.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,p)=>{Array.isArray(s[p])?(o.push(...s[p]),s[p]=o):o.length===1?s[p]=o:(this.streamObject.destroy(new ye("INVALID_RESPONSE_STREAM_CHUNK",{property:p,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(D("streamPromise error",a),this.reject(a)))}}then(e,r){return this.start("promise"),this.promise.then(e,r)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Dt=class extends We{constructor(e,r){super(e),this.inputStream=r}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var mc=Bc(lc(),1);var Wp={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var Dp={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var Ap={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var ft={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filter for custom properties",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting","WapiStatistic"]}}};var cr={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var mr={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Np={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var hr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var _r={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var Up={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var gr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var Tr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var qp={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var yr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var Fr={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Bp={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var xr={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var br={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var Lp={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var Or={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var $r={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var Hp={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var wr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var Ir={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Vp={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var jr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableInput",title:"WapiStatisticTableInput",description:"Database statistics",type:"object",properties:{model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"}},additionalProperties:!1,required:["model","type","result","max_id"]};var kr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTable",title:"WapiStatisticTable",description:"Database statistics",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiStatisticTableAccessibleFields:{$id:"WapiStatisticTableAccessibleFields",type:"string",enum:["id","model","type","result","max_id"]},WapiStatisticTableFields:{$id:"WapiStatisticTableFields",type:"string",enum:["id","model","type","result","max_id","created_at","updated_at"]},WapiStatisticTableStringFields:{$id:"WapiStatisticTableStringFields",type:"string",enum:["model","type","created_at","updated_at"]},WapiStatisticTableNumberFields:{$id:"WapiStatisticTableNumberFields",type:"string",enum:["id","result","max_id"]}},required:["id","model","type","result","max_id","created_at","updated_at"]};var zp={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableOptional",title:"WapiStatisticTableOptional",description:"Database statistics Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var Sr={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var vr={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var Er={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var Gr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var Cr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var Rr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Mr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Pr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Wr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Dr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Ar={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Nr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Ur={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var qr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Br={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Lr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Hr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Vr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var zr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Jr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Qr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Kr={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Yr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnInput",title:"ExportBalanceHistoryFnInput",description:"Input for exportBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/export_balance_history_fn_options"}},definitions:{export_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-balance-history/export-balance-history.schema.input.json#/definitions/export_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Xr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnOutput",title:"ExportBalanceHistoryFnOutput",description:"Output of exportBalanceHistory",type:"object",$ref:"/txs/export-balance-history/export-balance-history.schema.output.json"};var Zr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnInput",title:"ExportTokensFnInput",description:"Input for exportTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/export_tokens_fn_options"}},definitions:{export_tokens_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-token-many/export-token-many.schema.input.json#/definitions/export_token_many_tx_options"},{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"}]}},$queryBuilder:!0,additionalProperties:!1};var en={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnOutput",title:"ExportTokensFnOutput",description:"Output of exportTokens",type:"object",$ref:"/txs/export-token-many/export-token-many.schema.output.json"};var tn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnInput",title:"ExportTransferGroupsFnInput",description:"Input for exportTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/export_transfer_groups_fn_options"}},definitions:{export_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/find-transfer-groups/find-transfer-groups.schema.input.json#/definitions/find_transfer_groups_fn_options"}]}},$queryBuilder:!0,additionalProperties:!1};var rn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnOutput",title:"ExportTransferGroupsFnOutput",description:"Output of exportTransferGroups",type:"object",$ref:"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"};var nn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnInput",title:"ExportTransfersFnInput",description:"Input for exportTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/export_transfers_fn_options"}},definitions:{export_transfers_fn_options:{description:"exportTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/fns/find-transfers/find-transfers.schema.input.json#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var an={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnOutput",title:"ExportTransfersFnOutput",description:"Output of exportTransfers",type:"object",$ref:"/txs/export-transfer-many/export-transfer-many.schema.output.json"};var sn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnInput",title:"ExportWalletsFnInput",description:"Input for exportWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/export_wallets_fn_options"}},definitions:{export_wallets_fn_extra_options:{allOf:[{$ref:"/fns/find-wallets/find-wallets.schema.input.json#/definitions/find_wallets_fn_extra_options"}]},export_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/export_wallets_fn_extra_options"}]}},$queryBuilder:!0,additionalProperties:!1};var on={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnOutput",title:"ExportWalletsFnOutput",description:"Output of exportWallets",type:"object",$ref:"/txs/export-wallet-many/export-wallet-many.schema.output.json"};var pn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var dn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var fn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var un={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var ln={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnInput",title:"GetExportFnInput",description:"Input for GetExport",type:"object",properties:{identifier:{description:"File name of the export to get",type:["string"]},options:{$ref:"#/definitions/get_export_fn_options"}},definitions:{get_export_fn_options:{allOf:[{$ref:"/txs/get-export/get-export.schema.input.json#/definitions/get_export_tx_options"}]}},required:["identifier"],additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnOutput",title:"GetExportFnOutput",description:"Output of getExport",type:"object",$ref:"/txs/get-export/get-export.schema.output.json"};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnInput",title:"HealthcheckFnInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_fn_options"}},definitions:{healthcheck_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/healthcheck/healthcheck.schema.input.json#/definitions/healthcheck_tx_options"}]}},required:[],additionalProperties:!1};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnOutput",title:"HealthcheckFnOutput",description:"Output of healthcheck",type:"object",$ref:"/txs/healthcheck/healthcheck.schema.output.json"};var ut={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnInput",title:"ListExportsFnInput",description:"Input for listExports",type:"object",properties:{date:{description:"Date of the export",type:["string"]},options:{$ref:"#/definitions/list_exports_fn_options"}},definitions:{list_exports_fn_options:{$ref:"/txs/list-export-many/list-export-many.schema.input.json#/definitions/list_export_many_tx_options"}},additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnOutput",title:"ListExportsFnOutput",description:"Output of listExports",type:"object",$ref:"/txs/list-export-many/list-export-many.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},required:["aggregators"],additionalProperties:!1};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},required:["token"],additionalProperties:!1};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxInput",title:"ExportBalanceHistoryTxInput",description:"Input for exportBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/export_balance_history_tx_options"}},definitions:{export_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_ordering_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},required:["balance"],additionalProperties:!1};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxOutput",title:"ExportBalanceHistoryTxOutput",description:"Output of exportBalanceHistory",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxInput",title:"ExportTokenManyTxInput",description:"Input for exportTokenMany",type:"object",properties:{token:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/export_token_many_tx_options"}},definitions:{export_token_many_tx_options:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}},additionalProperties:!1};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxOutput",title:"ExportTokenManyTxOutput",description:"Output of exportTokenMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxInput",title:"ExportTransferGroupManyTxInput",description:"Input for exportTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/export_transfer_group_many_tx_options"}},definitions:{export_transfer_group_many_tx_options:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}},additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxOutput",title:"ExportTransferGroupManyTxOutput",description:"Output of exportTransferGroupMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxInput",title:"ExportTransferManyTxInput",description:"Input for ExportTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/export_transfer_many_tx_options"}},definitions:{export_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"}]}},additionalProperties:!1};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxOutput",title:"ExportTransferManyTxOutput",description:"Output of ExportTransferMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxInput",title:"ExportWalletManyTxInput",description:"Input for exportWalletMany",type:"object",properties:{wallet:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/export_wallet_many_tx_options"}},definitions:{export_wallet_many_tx_options:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxOutput",title:"ExportWalletManyTxOutput",description:"Output of exportWalletMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{include_balance:{description:"Return the total system balance of token",type:"boolean"}},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{anyOf:[{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers_count:{description:"Return number of transfers in the transfer_group",type:"boolean",default:!1}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"#/definitions/transfer_group_with_transfers_count"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{transfer_group_transfers_count:{type:"object",properties:{transfers_count:{description:"Number of transfers in the group",type:"number"}},$typescript:'{"additionalProperties": false}'},transfer_group_with_transfers_count:{allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"},{$ref:"#/definitions/transfer_group_transfers_count"}]}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},additionalProperties:!1};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},required:["balance"],additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},status:{description:"The status of the change to balance",type:["string"],enum:["pending","finished"]},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status","available_balance"]}},additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxInput",title:"GetExportTxInput",description:"Input for getExport",type:"object",properties:{export:{$ref:"#/definitions/unique_export_filter"},options:{$ref:"#/definitions/get_export_tx_options"}},definitions:{get_export_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_export_additional_options"}]},get_export_additional_options:{description:"Optional flags for input",type:"object",properties:{return_signed_url:{description:"Return signed url for downloading the export file, will only be returned if status === 'completed'",type:"boolean",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_export_filter:{description:"UNIQUE filtering options for export",type:"object",properties:{identifier:{description:"The name of the exported file",type:"string"}},required:["identifier"]}},required:["export"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxOutput",title:"GetExportTxOutput",description:"Output of getExport",type:"object",properties:{export:{description:"requested export",anyOf:[{$ref:"#/definitions/export"}]}},definitions:{export:{properties:{identifier:{description:"Unique identifier of the export",type:"string"},status:{description:"Status of the export",type:"string",enum:["started","completed","error"]},type:{description:"The type of the export",type:"string"},created_at:{description:"Timestamp when export was initiated",type:"string"},completed_at:{description:"Timestamp when export was finished",type:"string"},fields:{description:"The fields selected for this export",type:"array",items:{type:"string"}},count:{description:"The number of entities exported in this file",type:"number"},signed_url:{description:"Signed URL for downloading the export file",type:"string"},size:{description:"Size of the exported file",type:"string"},message:{description:"Extra information about the state of the file",type:"string"}},required:["identifier"],$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",anyOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_with_balance"}]}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],$typescript:'{"additionalProperties": false}'},token_with_balance:{type:"object",allOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_balance"}]},token_balance:{type:"object",properties:{balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["wallets"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxInput",title:"HealthcheckTxInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_tx_options"}},definitions:{healthcheck_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxOutput",title:"HealthcheckTxOutput",description:"Output of healthcheck",type:"object",properties:{status:{description:"Status of the service",type:"string",enum:["green","yellow","red"]},message:{description:"Error message if some error occurred",type:"string"},database_size:{description:"Size of the database in MB",type:"string"},indexes_size:{description:"Size of all indexes of database in MB",type:"string"},connection_count:{description:"Number of external connections to this database",type:"number"}},required:["status"],additionalProperties:!1};var lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxInput",title:"ListExportManyTxInput",description:"Input for ListExportMany",type:"object",properties:{export:{type:"object",properties:{date:{description:"Date the file was created on",type:"string"},entity:{description:"Entity that was exported",type:"string",enum:["tx"]}}},options:{$ref:"#/definitions/list_export_many_tx_options"}},definitions:{list_export_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/list_export_many_ordering_options"}]},list_export_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/list_export_many_ordering_input"}}}},list_export_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/list_export_many_ordering_input_field"}]},list_export_many_ordering_input_field:{type:"object",properties:{field:{type:"string",enum:["name"]}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxOutput",title:"ListExportManyTxOutput",description:"Output of ListExportMany",type:"object",properties:{exports:{description:"The exports matching the query",type:"array",items:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}}},required:["exports"],additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token","update"],additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer","update"],additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group","update"],additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group","update"],additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet","update"],additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var d=new mc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^(?!.*\.\.)[a-zA-Z_][a-zA-Z0-9_.-]*[a-zA-Z0-9_-]$/},strict:!1});d.addFormat("date-time",{validate:Cf});function Jp(t,e){if(e!==void 0)return new ge({errors:t},e)}function cc(t){return function(e){if(t===void 0)return{isValid:!1,inputCopy:e,error:Jp([new Error("Undefined validator")],"Undefined validator")};try{let r=oi(e),n=t(r),a=n?void 0:t.errors,s=n?void 0:d.errorsText(a),i=Jp(a,s);return{isValid:n,inputCopy:r,error:i}}catch(r){return{isValid:!1,inputCopy:e,error:Jp([r],r.message)}}}}function l(t,e){let r=JSON.parse(JSON.stringify(t));return hc(r,e)}function hc(t,e){return typeof t!="object"||Object.keys(t).forEach(r=>{r==="$ref"&&t.$ref.startsWith("#")?t.$ref=e+t.$ref:t[r]=hc(t[r],e)}),t}function _c(t,e){let r=l(t,e),n=r.properties.options;return b({$id:r.$id.replace("Input","Options"),definitions:r.definitions},n)}function gc(t,e){let r=l(t,e),n=r.definitions[t.$allowStreamInput];return b({$id:r.$id.replace("Input","StreamChunk"),definitions:r.definitions},n)}var f={};d.addSchema(l(Wp,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");f.JSONRPCRequest=Wp;d.addSchema(l(Dp,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");f.JSONRPCResponse=Dp;d.addSchema(l(Ap,"/client-options.schema.json"),"/client-options.schema.json");f.ClientOptions=Ap;d.addSchema(l(ft,"/db/consts.schema.json"),"/db/consts.schema.json");f.Consts=ft;d.addSchema(l(cr,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");f.TokenTableInput=cr;d.addSchema(l(mr,"/db/token/token.schema.json"),"/db/token/token.schema.json");f.TokenTable=mr;d.addSchema(l(Np,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");f.TokenTableOptional=Np;d.addSchema(l(hr,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");f.TransferTableInput=hr;d.addSchema(l(_r,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");f.TransferTable=_r;d.addSchema(l(Up,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");f.TransferTableOptional=Up;d.addSchema(l(gr,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");f.TransferGroupTableInput=gr;d.addSchema(l(Tr,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");f.TransferGroupTable=Tr;d.addSchema(l(qp,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");f.TransferGroupTableOptional=qp;d.addSchema(l(yr,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");f.TransferLogTableInput=yr;d.addSchema(l(Fr,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");f.TransferLogTable=Fr;d.addSchema(l(Bp,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");f.TransferLogTableOptional=Bp;d.addSchema(l(xr,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");f.WalletTableInput=xr;d.addSchema(l(br,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");f.WalletTable=br;d.addSchema(l(Lp,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");f.WalletTableOptional=Lp;d.addSchema(l(Or,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");f.WalletTokenSettingTableInput=Or;d.addSchema(l($r,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");f.WalletTokenSettingTable=$r;d.addSchema(l(Hp,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");f.WalletTokenSettingTableOptional=Hp;d.addSchema(l(wr,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");f.WapiSettingTableInput=wr;d.addSchema(l(Ir,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");f.WapiSettingTable=Ir;d.addSchema(l(Vp,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");f.WapiSettingTableOptional=Vp;d.addSchema(l(jr,"/db/wapi-statistic/wapi-statistic.schema.input.json"),"/db/wapi-statistic/wapi-statistic.schema.input.json");f.WapiStatisticTableInput=jr;d.addSchema(l(kr,"/db/wapi-statistic/wapi-statistic.schema.json"),"/db/wapi-statistic/wapi-statistic.schema.json");f.WapiStatisticTable=kr;d.addSchema(l(zp,"/db/wapi-statistic/wapi-statistic.schema.optional.json"),"/db/wapi-statistic/wapi-statistic.schema.optional.json");f.WapiStatisticTableOptional=zp;d.addSchema(l(Sr,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");f.AggregateTransfersFnInput=Sr;d.addSchema(l(vr,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");f.AggregateTransfersFnOutput=vr;d.addSchema(l(Er,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenFnInput=Er;d.addSchema(l(Gr,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenFnOutput=Gr;d.addSchema(l(Cr,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");f.CreateContractFnInput=Cr;d.addSchema(l(Rr,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");f.CreateContractFnOutput=Rr;d.addSchema(l(Mr,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");f.CreateDepositFnInput=Mr;d.addSchema(l(Pr,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");f.CreateDepositFnOutput=Pr;d.addSchema(l(Wr,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");f.CreateExchangeFnInput=Wr;d.addSchema(l(Dr,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");f.CreateExchangeFnOutput=Dr;d.addSchema(l(Ar,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");f.CreateTokenFnInput=Ar;d.addSchema(l(Nr,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");f.CreateTokenFnOutput=Nr;d.addSchema(l(Ur,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");f.CreateTransferFnInput=Ur;d.addSchema(l(qr,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");f.CreateTransferFnOutput=qr;d.addSchema(l(Br,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupFnInput=Br;d.addSchema(l(Lr,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupFnOutput=Lr;d.addSchema(l(Hr,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");f.CreateTransfersFnInput=Hr;d.addSchema(l(Vr,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");f.CreateTransfersFnOutput=Vr;d.addSchema(l(zr,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");f.CreateWalletFnInput=zr;d.addSchema(l(Jr,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");f.CreateWalletFnOutput=Jr;d.addSchema(l(Qr,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalFnInput=Qr;d.addSchema(l(Kr,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalFnOutput=Kr;d.addSchema(l(Yr,"/fns/export-balance-history/export-balance-history.schema.input.json"),"/fns/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryFnInput=Yr;d.addSchema(l(Xr,"/fns/export-balance-history/export-balance-history.schema.output.json"),"/fns/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryFnOutput=Xr;d.addSchema(l(Zr,"/fns/export-tokens/export-tokens.schema.input.json"),"/fns/export-tokens/export-tokens.schema.input.json");f.ExportTokensFnInput=Zr;d.addSchema(l(en,"/fns/export-tokens/export-tokens.schema.output.json"),"/fns/export-tokens/export-tokens.schema.output.json");f.ExportTokensFnOutput=en;d.addSchema(l(tn,"/fns/export-transfer-groups/export-transfer-groups.schema.input.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.input.json");f.ExportTransferGroupsFnInput=tn;d.addSchema(l(rn,"/fns/export-transfer-groups/export-transfer-groups.schema.output.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.output.json");f.ExportTransferGroupsFnOutput=rn;d.addSchema(l(nn,"/fns/export-transfers/export-transfers.schema.input.json"),"/fns/export-transfers/export-transfers.schema.input.json");f.ExportTransfersFnInput=nn;d.addSchema(l(an,"/fns/export-transfers/export-transfers.schema.output.json"),"/fns/export-transfers/export-transfers.schema.output.json");f.ExportTransfersFnOutput=an;d.addSchema(l(sn,"/fns/export-wallets/export-wallets.schema.input.json"),"/fns/export-wallets/export-wallets.schema.input.json");f.ExportWalletsFnInput=sn;d.addSchema(l(on,"/fns/export-wallets/export-wallets.schema.output.json"),"/fns/export-wallets/export-wallets.schema.output.json");f.ExportWalletsFnOutput=on;d.addSchema(l(pn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");f.FindBalancesFnInput=pn;d.addSchema(l(dn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");f.FindBalancesFnOutput=dn;d.addSchema(l(fn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");f.FindTokensFnInput=fn;d.addSchema(l(un,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");f.FindTokensFnOutput=un;d.addSchema(l(ln,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");f.FindTransferGroupsFnInput=ln;d.addSchema(l(cn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");f.FindTransferGroupsFnOutput=cn;d.addSchema(l(mn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");f.FindTransfersFnInput=mn;d.addSchema(l(hn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");f.FindTransfersFnOutput=hn;d.addSchema(l(_n,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");f.FindWalletsFnInput=_n;d.addSchema(l(gn,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");f.FindWalletsFnOutput=gn;d.addSchema(l(Tn,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");f.FnConsts=Tn;d.addSchema(l(yn,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");f.GetBalanceFnInput=yn;d.addSchema(l(Fn,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");f.GetBalanceFnOutput=Fn;d.addSchema(l(xn,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryFnInput=xn;d.addSchema(l(bn,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryFnOutput=bn;d.addSchema(l(On,"/fns/get-export/get-export.schema.input.json"),"/fns/get-export/get-export.schema.input.json");f.GetExportFnInput=On;d.addSchema(l($n,"/fns/get-export/get-export.schema.output.json"),"/fns/get-export/get-export.schema.output.json");f.GetExportFnOutput=$n;d.addSchema(l(wn,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");f.GetFlagsFnInput=wn;d.addSchema(l(In,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");f.GetFlagsFnOutput=In;d.addSchema(l(jn,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");f.GetStatisticsFnInput=jn;d.addSchema(l(kn,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");f.GetStatisticsFnOutput=kn;d.addSchema(l(Sn,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");f.GetTokenFnInput=Sn;d.addSchema(l(vn,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");f.GetTokenFnOutput=vn;d.addSchema(l(En,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");f.GetTransferFnInput=En;d.addSchema(l(Gn,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");f.GetTransferFnOutput=Gn;d.addSchema(l(Cn,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupFnInput=Cn;d.addSchema(l(Rn,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupFnOutput=Rn;d.addSchema(l(Mn,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");f.GetWalletFnInput=Mn;d.addSchema(l(Pn,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");f.GetWalletFnOutput=Pn;d.addSchema(l(Wn,"/fns/healthcheck/healthcheck.schema.input.json"),"/fns/healthcheck/healthcheck.schema.input.json");f.HealthcheckFnInput=Wn;d.addSchema(l(Dn,"/fns/healthcheck/healthcheck.schema.output.json"),"/fns/healthcheck/healthcheck.schema.output.json");f.HealthcheckFnOutput=Dn;d.addSchema(l(ut,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");f.ImportDataFnInput=ut;var Tc=_c(ut,"/fns/import-data/import-data.schema.input.json");d.addSchema(Tc,"/fns/import-data/import-data.schema.options.json");f.ImportDataFnOptions=Tc;var yc=gc(ut,"/fns/import-data/import-data.schema.input.json");d.addSchema(yc,"/fns/import-data/import-data.schema.chunk.json");f.ImportDataFnStreamChunk=yc;d.addSchema(l(An,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");f.ImportDataFnOutput=An;d.addSchema(l(Nn,"/fns/list-exports/list-exports.schema.input.json"),"/fns/list-exports/list-exports.schema.input.json");f.ListExportsFnInput=Nn;d.addSchema(l(Un,"/fns/list-exports/list-exports.schema.output.json"),"/fns/list-exports/list-exports.schema.output.json");f.ListExportsFnOutput=Un;d.addSchema(l(qn,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferFnInput=qn;d.addSchema(l(Bn,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferFnOutput=Bn;d.addSchema(l(Ln,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupFnInput=Ln;d.addSchema(l(Hn,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupFnOutput=Hn;d.addSchema(l(Vn,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");f.ReverseTransfersFnInput=Vn;d.addSchema(l(zn,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");f.ReverseTransfersFnOutput=zn;d.addSchema(l(Jn,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");f.SetFlagsFnInput=Jn;d.addSchema(l(Qn,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");f.SetFlagsFnOutput=Qn;d.addSchema(l(Kn,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");f.UpdateTokenFnInput=Kn;d.addSchema(l(Yn,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");f.UpdateTokenFnOutput=Yn;d.addSchema(l(Xn,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");f.UpdateTransferFnInput=Xn;d.addSchema(l(Zn,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");f.UpdateTransferFnOutput=Zn;d.addSchema(l(ea,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupFnInput=ea;d.addSchema(l(ta,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupFnOutput=ta;d.addSchema(l(ra,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");f.UpdateTransferGroupsFnInput=ra;d.addSchema(l(na,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");f.UpdateTransferGroupsFnOutput=na;d.addSchema(l(aa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");f.UpdateTransfersFnInput=aa;d.addSchema(l(sa,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");f.UpdateTransfersFnOutput=sa;d.addSchema(l(ia,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");f.UpdateWalletFnInput=ia;d.addSchema(l(oa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");f.UpdateWalletFnOutput=oa;d.addSchema(l(pa,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");f.AggregateTransferManyTxInput=pa;d.addSchema(l(da,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");f.AggregateTransferManyTxOutput=da;d.addSchema(l(fa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");f.AuthenticationCheckTxInput=fa;d.addSchema(l(ua,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");f.AuthenticationCheckTxOutput=ua;d.addSchema(l(la,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenTxInput=la;d.addSchema(l(ca,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenTxOutput=ca;d.addSchema(l(ma,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");f.CreateContractTxInput=ma;d.addSchema(l(ha,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");f.CreateContractTxOutput=ha;d.addSchema(l(_a,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");f.CreateDepositTxInput=_a;d.addSchema(l(ga,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");f.CreateDepositTxOutput=ga;d.addSchema(l(Ta,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");f.CreateDistributionTxInput=Ta;d.addSchema(l(ya,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");f.CreateDistributionTxOutput=ya;d.addSchema(l(Fa,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");f.CreateTokenTxInput=Fa;d.addSchema(l(xa,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");f.CreateTokenTxOutput=xa;d.addSchema(l(ba,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");f.CreateTransferTxInput=ba;d.addSchema(l(Oa,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");f.CreateTransferTxOutput=Oa;d.addSchema(l($a,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupTxInput=$a;d.addSchema(l(wa,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupTxOutput=wa;d.addSchema(l(Ia,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");f.CreateTransferManyTxInput=Ia;d.addSchema(l(ja,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");f.CreateTransferManyTxOutput=ja;d.addSchema(l(ka,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");f.CreateWalletTxInput=ka;d.addSchema(l(Sa,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");f.CreateWalletTxOutput=Sa;d.addSchema(l(va,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalTxInput=va;d.addSchema(l(Ea,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalTxOutput=Ea;d.addSchema(l(Ga,"/txs/export-balance-history/export-balance-history.schema.input.json"),"/txs/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryTxInput=Ga;d.addSchema(l(Ca,"/txs/export-balance-history/export-balance-history.schema.output.json"),"/txs/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryTxOutput=Ca;d.addSchema(l(Ra,"/txs/export-token-many/export-token-many.schema.input.json"),"/txs/export-token-many/export-token-many.schema.input.json");f.ExportTokenManyTxInput=Ra;d.addSchema(l(Ma,"/txs/export-token-many/export-token-many.schema.output.json"),"/txs/export-token-many/export-token-many.schema.output.json");f.ExportTokenManyTxOutput=Ma;d.addSchema(l(Pa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json");f.ExportTransferGroupManyTxInput=Pa;d.addSchema(l(Wa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json");f.ExportTransferGroupManyTxOutput=Wa;d.addSchema(l(Da,"/txs/export-transfer-many/export-transfer-many.schema.input.json"),"/txs/export-transfer-many/export-transfer-many.schema.input.json");f.ExportTransferManyTxInput=Da;d.addSchema(l(Aa,"/txs/export-transfer-many/export-transfer-many.schema.output.json"),"/txs/export-transfer-many/export-transfer-many.schema.output.json");f.ExportTransferManyTxOutput=Aa;d.addSchema(l(Na,"/txs/export-wallet-many/export-wallet-many.schema.input.json"),"/txs/export-wallet-many/export-wallet-many.schema.input.json");f.ExportWalletManyTxInput=Na;d.addSchema(l(Ua,"/txs/export-wallet-many/export-wallet-many.schema.output.json"),"/txs/export-wallet-many/export-wallet-many.schema.output.json");f.ExportWalletManyTxOutput=Ua;d.addSchema(l(qa,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");f.FindBalanceManyTxInput=qa;d.addSchema(l(Ba,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");f.FindBalanceManyTxOutput=Ba;d.addSchema(l(La,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");f.FindTokenManyTxInput=La;d.addSchema(l(Ha,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");f.FindTokenManyTxOutput=Ha;d.addSchema(l(Va,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");f.FindTransferGroupManyTxInput=Va;d.addSchema(l(za,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");f.FindTransferGroupManyTxOutput=za;d.addSchema(l(Ja,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");f.FindTransferManyTxInput=Ja;d.addSchema(l(Qa,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");f.FindTransferManyTxOutput=Qa;d.addSchema(l(Ka,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");f.FindWalletManyTxInput=Ka;d.addSchema(l(Ya,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");f.FindWalletManyTxOutput=Ya;d.addSchema(l(Xa,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");f.FinishTransactionTxInput=Xa;d.addSchema(l(Za,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");f.FinishTransactionTxOutput=Za;d.addSchema(l(es,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");f.GetBalanceTxInput=es;d.addSchema(l(ts,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");f.GetBalanceTxOutput=ts;d.addSchema(l(rs,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryTxInput=rs;d.addSchema(l(ns,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryTxOutput=ns;d.addSchema(l(as,"/txs/get-export/get-export.schema.input.json"),"/txs/get-export/get-export.schema.input.json");f.GetExportTxInput=as;d.addSchema(l(ss,"/txs/get-export/get-export.schema.output.json"),"/txs/get-export/get-export.schema.output.json");f.GetExportTxOutput=ss;d.addSchema(l(is,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");f.GetFlagsTxInput=is;d.addSchema(l(os,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");f.GetFlagsTxOutput=os;d.addSchema(l(ps,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");f.GetStatisticsTxInput=ps;d.addSchema(l(ds,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");f.GetStatisticsTxOutput=ds;d.addSchema(l(fs,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");f.GetTokenTxInput=fs;d.addSchema(l(us,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");f.GetTokenTxOutput=us;d.addSchema(l(ls,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");f.GetTokenManyTxInput=ls;d.addSchema(l(cs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");f.GetTokenManyTxOutput=cs;d.addSchema(l(ms,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");f.GetTransferTxInput=ms;d.addSchema(l(hs,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");f.GetTransferTxOutput=hs;d.addSchema(l(_s,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupTxInput=_s;d.addSchema(l(gs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupTxOutput=gs;d.addSchema(l(Ts,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");f.GetWalletTxInput=Ts;d.addSchema(l(ys,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");f.GetWalletTxOutput=ys;d.addSchema(l(Fs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");f.GetWalletManyTxInput=Fs;d.addSchema(l(xs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");f.GetWalletManyTxOutput=xs;d.addSchema(l(bs,"/txs/healthcheck/healthcheck.schema.input.json"),"/txs/healthcheck/healthcheck.schema.input.json");f.HealthcheckTxInput=bs;d.addSchema(l(Os,"/txs/healthcheck/healthcheck.schema.output.json"),"/txs/healthcheck/healthcheck.schema.output.json");f.HealthcheckTxOutput=Os;d.addSchema(l(lt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");f.ImportActionsTxInput=lt;var Fc=_c(lt,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(Fc,"/txs/import-actions/import-actions.schema.options.json");f.ImportActionsTxOptions=Fc;var xc=gc(lt,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(xc,"/txs/import-actions/import-actions.schema.chunk.json");f.ImportActionsTxStreamChunk=xc;d.addSchema(l($s,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");f.ImportActionsTxOutput=$s;d.addSchema(l(ws,"/txs/list-export-many/list-export-many.schema.input.json"),"/txs/list-export-many/list-export-many.schema.input.json");f.ListExportManyTxInput=ws;d.addSchema(l(Is,"/txs/list-export-many/list-export-many.schema.output.json"),"/txs/list-export-many/list-export-many.schema.output.json");f.ListExportManyTxOutput=Is;d.addSchema(l(js,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");f.QueryLogsTxInput=js;d.addSchema(l(ks,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");f.QueryLogsTxOutput=ks;d.addSchema(l(Ss,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");f.ResetDatabaseTxInput=Ss;d.addSchema(l(vs,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");f.ResetDatabaseTxOutput=vs;d.addSchema(l(Es,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferTxInput=Es;d.addSchema(l(Gs,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferTxOutput=Gs;d.addSchema(l(Cs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupTxInput=Cs;d.addSchema(l(Rs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupTxOutput=Rs;d.addSchema(l(Ms,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");f.ReverseTransferGroupManyTxInput=Ms;d.addSchema(l(Ps,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");f.ReverseTransferGroupManyTxOutput=Ps;d.addSchema(l(Ws,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");f.ReverseTransferManyTxInput=Ws;d.addSchema(l(Ds,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");f.ReverseTransferManyTxOutput=Ds;d.addSchema(l(As,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");f.SetFlagsTxInput=As;d.addSchema(l(Ns,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");f.SetFlagsTxOutput=Ns;d.addSchema(l(Us,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");f.StartTransactionTxInput=Us;d.addSchema(l(qs,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");f.StartTransactionTxOutput=qs;d.addSchema(l(Bs,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");f.TxConsts=Bs;d.addSchema(l(Ls,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");f.UpdateTokenTxInput=Ls;d.addSchema(l(Hs,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");f.UpdateTokenTxOutput=Hs;d.addSchema(l(Vs,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");f.UpdateTransferTxInput=Vs;d.addSchema(l(zs,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");f.UpdateTransferTxOutput=zs;d.addSchema(l(Js,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupTxInput=Js;d.addSchema(l(Qs,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupTxOutput=Qs;d.addSchema(l(Ks,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");f.UpdateTransferGroupManyTxInput=Ks;d.addSchema(l(Ys,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");f.UpdateTransferGroupManyTxOutput=Ys;d.addSchema(l(Xs,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");f.UpdateTransferManyTxInput=Xs;d.addSchema(l(Zs,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");f.UpdateTransferManyTxOutput=Zs;d.addSchema(l(ei,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");f.UpdateWalletTxInput=ei;d.addSchema(l(ti,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");f.UpdateWalletTxOutput=ti;var v=(u=>(u.JSONRPCRequest="JSONRPCRequest",u.JSONRPCResponse="JSONRPCResponse",u.ClientOptions="ClientOptions",u.Consts="Consts",u.TokenTableInput="TokenTableInput",u.TokenTable="TokenTable",u.TokenTableOptional="TokenTableOptional",u.TransferTableInput="TransferTableInput",u.TransferTable="TransferTable",u.TransferTableOptional="TransferTableOptional",u.TransferGroupTableInput="TransferGroupTableInput",u.TransferGroupTable="TransferGroupTable",u.TransferGroupTableOptional="TransferGroupTableOptional",u.TransferLogTableInput="TransferLogTableInput",u.TransferLogTable="TransferLogTable",u.TransferLogTableOptional="TransferLogTableOptional",u.WalletTableInput="WalletTableInput",u.WalletTable="WalletTable",u.WalletTableOptional="WalletTableOptional",u.WalletTokenSettingTableInput="WalletTokenSettingTableInput",u.WalletTokenSettingTable="WalletTokenSettingTable",u.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",u.WapiSettingTableInput="WapiSettingTableInput",u.WapiSettingTable="WapiSettingTable",u.WapiSettingTableOptional="WapiSettingTableOptional",u.WapiStatisticTableInput="WapiStatisticTableInput",u.WapiStatisticTable="WapiStatisticTable",u.WapiStatisticTableOptional="WapiStatisticTableOptional",u.AggregateTransfersFnInput="AggregateTransfersFnInput",u.AggregateTransfersFnOutput="AggregateTransfersFnOutput",u.CreateAccessTokenFnInput="CreateAccessTokenFnInput",u.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",u.CreateContractFnInput="CreateContractFnInput",u.CreateContractFnOutput="CreateContractFnOutput",u.CreateDepositFnInput="CreateDepositFnInput",u.CreateDepositFnOutput="CreateDepositFnOutput",u.CreateExchangeFnInput="CreateExchangeFnInput",u.CreateExchangeFnOutput="CreateExchangeFnOutput",u.CreateTokenFnInput="CreateTokenFnInput",u.CreateTokenFnOutput="CreateTokenFnOutput",u.CreateTransferFnInput="CreateTransferFnInput",u.CreateTransferFnOutput="CreateTransferFnOutput",u.CreateTransferGroupFnInput="CreateTransferGroupFnInput",u.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",u.CreateTransfersFnInput="CreateTransfersFnInput",u.CreateTransfersFnOutput="CreateTransfersFnOutput",u.CreateWalletFnInput="CreateWalletFnInput",u.CreateWalletFnOutput="CreateWalletFnOutput",u.CreateWithdrawalFnInput="CreateWithdrawalFnInput",u.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",u.ExportBalanceHistoryFnInput="ExportBalanceHistoryFnInput",u.ExportBalanceHistoryFnOutput="ExportBalanceHistoryFnOutput",u.ExportTokensFnInput="ExportTokensFnInput",u.ExportTokensFnOutput="ExportTokensFnOutput",u.ExportTransferGroupsFnInput="ExportTransferGroupsFnInput",u.ExportTransferGroupsFnOutput="ExportTransferGroupsFnOutput",u.ExportTransfersFnInput="ExportTransfersFnInput",u.ExportTransfersFnOutput="ExportTransfersFnOutput",u.ExportWalletsFnInput="ExportWalletsFnInput",u.ExportWalletsFnOutput="ExportWalletsFnOutput",u.FindBalancesFnInput="FindBalancesFnInput",u.FindBalancesFnOutput="FindBalancesFnOutput",u.FindTokensFnInput="FindTokensFnInput",u.FindTokensFnOutput="FindTokensFnOutput",u.FindTransferGroupsFnInput="FindTransferGroupsFnInput",u.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",u.FindTransfersFnInput="FindTransfersFnInput",u.FindTransfersFnOutput="FindTransfersFnOutput",u.FindWalletsFnInput="FindWalletsFnInput",u.FindWalletsFnOutput="FindWalletsFnOutput",u.FnConsts="FnConsts",u.GetBalanceFnInput="GetBalanceFnInput",u.GetBalanceFnOutput="GetBalanceFnOutput",u.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",u.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",u.GetExportFnInput="GetExportFnInput",u.GetExportFnOutput="GetExportFnOutput",u.GetFlagsFnInput="GetFlagsFnInput",u.GetFlagsFnOutput="GetFlagsFnOutput",u.GetStatisticsFnInput="GetStatisticsFnInput",u.GetStatisticsFnOutput="GetStatisticsFnOutput",u.GetTokenFnInput="GetTokenFnInput",u.GetTokenFnOutput="GetTokenFnOutput",u.GetTransferFnInput="GetTransferFnInput",u.GetTransferFnOutput="GetTransferFnOutput",u.GetTransferGroupFnInput="GetTransferGroupFnInput",u.GetTransferGroupFnOutput="GetTransferGroupFnOutput",u.GetWalletFnInput="GetWalletFnInput",u.GetWalletFnOutput="GetWalletFnOutput",u.HealthcheckFnInput="HealthcheckFnInput",u.HealthcheckFnOutput="HealthcheckFnOutput",u.ImportDataFnInput="ImportDataFnInput",u.ImportDataFnOptions="ImportDataFnOptions",u.ImportDataFnStreamChunk="ImportDataFnStreamChunk",u.ImportDataFnOutput="ImportDataFnOutput",u.ListExportsFnInput="ListExportsFnInput",u.ListExportsFnOutput="ListExportsFnOutput",u.ReverseTransferFnInput="ReverseTransferFnInput",u.ReverseTransferFnOutput="ReverseTransferFnOutput",u.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",u.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",u.ReverseTransfersFnInput="ReverseTransfersFnInput",u.ReverseTransfersFnOutput="ReverseTransfersFnOutput",u.SetFlagsFnInput="SetFlagsFnInput",u.SetFlagsFnOutput="SetFlagsFnOutput",u.UpdateTokenFnInput="UpdateTokenFnInput",u.UpdateTokenFnOutput="UpdateTokenFnOutput",u.UpdateTransferFnInput="UpdateTransferFnInput",u.UpdateTransferFnOutput="UpdateTransferFnOutput",u.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",u.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",u.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",u.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",u.UpdateTransfersFnInput="UpdateTransfersFnInput",u.UpdateTransfersFnOutput="UpdateTransfersFnOutput",u.UpdateWalletFnInput="UpdateWalletFnInput",u.UpdateWalletFnOutput="UpdateWalletFnOutput",u.AggregateTransferManyTxInput="AggregateTransferManyTxInput",u.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",u.AuthenticationCheckTxInput="AuthenticationCheckTxInput",u.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",u.CreateAccessTokenTxInput="CreateAccessTokenTxInput",u.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",u.CreateContractTxInput="CreateContractTxInput",u.CreateContractTxOutput="CreateContractTxOutput",u.CreateDepositTxInput="CreateDepositTxInput",u.CreateDepositTxOutput="CreateDepositTxOutput",u.CreateDistributionTxInput="CreateDistributionTxInput",u.CreateDistributionTxOutput="CreateDistributionTxOutput",u.CreateTokenTxInput="CreateTokenTxInput",u.CreateTokenTxOutput="CreateTokenTxOutput",u.CreateTransferTxInput="CreateTransferTxInput",u.CreateTransferTxOutput="CreateTransferTxOutput",u.CreateTransferGroupTxInput="CreateTransferGroupTxInput",u.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",u.CreateTransferManyTxInput="CreateTransferManyTxInput",u.CreateTransferManyTxOutput="CreateTransferManyTxOutput",u.CreateWalletTxInput="CreateWalletTxInput",u.CreateWalletTxOutput="CreateWalletTxOutput",u.CreateWithdrawalTxInput="CreateWithdrawalTxInput",u.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",u.ExportBalanceHistoryTxInput="ExportBalanceHistoryTxInput",u.ExportBalanceHistoryTxOutput="ExportBalanceHistoryTxOutput",u.ExportTokenManyTxInput="ExportTokenManyTxInput",u.ExportTokenManyTxOutput="ExportTokenManyTxOutput",u.ExportTransferGroupManyTxInput="ExportTransferGroupManyTxInput",u.ExportTransferGroupManyTxOutput="ExportTransferGroupManyTxOutput",u.ExportTransferManyTxInput="ExportTransferManyTxInput",u.ExportTransferManyTxOutput="ExportTransferManyTxOutput",u.ExportWalletManyTxInput="ExportWalletManyTxInput",u.ExportWalletManyTxOutput="ExportWalletManyTxOutput",u.FindBalanceManyTxInput="FindBalanceManyTxInput",u.FindBalanceManyTxOutput="FindBalanceManyTxOutput",u.FindTokenManyTxInput="FindTokenManyTxInput",u.FindTokenManyTxOutput="FindTokenManyTxOutput",u.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",u.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",u.FindTransferManyTxInput="FindTransferManyTxInput",u.FindTransferManyTxOutput="FindTransferManyTxOutput",u.FindWalletManyTxInput="FindWalletManyTxInput",u.FindWalletManyTxOutput="FindWalletManyTxOutput",u.FinishTransactionTxInput="FinishTransactionTxInput",u.FinishTransactionTxOutput="FinishTransactionTxOutput",u.GetBalanceTxInput="GetBalanceTxInput",u.GetBalanceTxOutput="GetBalanceTxOutput",u.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",u.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",u.GetExportTxInput="GetExportTxInput",u.GetExportTxOutput="GetExportTxOutput",u.GetFlagsTxInput="GetFlagsTxInput",u.GetFlagsTxOutput="GetFlagsTxOutput",u.GetStatisticsTxInput="GetStatisticsTxInput",u.GetStatisticsTxOutput="GetStatisticsTxOutput",u.GetTokenTxInput="GetTokenTxInput",u.GetTokenTxOutput="GetTokenTxOutput",u.GetTokenManyTxInput="GetTokenManyTxInput",u.GetTokenManyTxOutput="GetTokenManyTxOutput",u.GetTransferTxInput="GetTransferTxInput",u.GetTransferTxOutput="GetTransferTxOutput",u.GetTransferGroupTxInput="GetTransferGroupTxInput",u.GetTransferGroupTxOutput="GetTransferGroupTxOutput",u.GetWalletTxInput="GetWalletTxInput",u.GetWalletTxOutput="GetWalletTxOutput",u.GetWalletManyTxInput="GetWalletManyTxInput",u.GetWalletManyTxOutput="GetWalletManyTxOutput",u.HealthcheckTxInput="HealthcheckTxInput",u.HealthcheckTxOutput="HealthcheckTxOutput",u.ImportActionsTxInput="ImportActionsTxInput",u.ImportActionsTxOptions="ImportActionsTxOptions",u.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",u.ImportActionsTxOutput="ImportActionsTxOutput",u.ListExportManyTxInput="ListExportManyTxInput",u.ListExportManyTxOutput="ListExportManyTxOutput",u.QueryLogsTxInput="QueryLogsTxInput",u.QueryLogsTxOutput="QueryLogsTxOutput",u.ResetDatabaseTxInput="ResetDatabaseTxInput",u.ResetDatabaseTxOutput="ResetDatabaseTxOutput",u.ReverseTransferTxInput="ReverseTransferTxInput",u.ReverseTransferTxOutput="ReverseTransferTxOutput",u.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",u.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",u.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",u.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",u.ReverseTransferManyTxInput="ReverseTransferManyTxInput",u.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",u.SetFlagsTxInput="SetFlagsTxInput",u.SetFlagsTxOutput="SetFlagsTxOutput",u.StartTransactionTxInput="StartTransactionTxInput",u.StartTransactionTxOutput="StartTransactionTxOutput",u.TxConsts="TxConsts",u.UpdateTokenTxInput="UpdateTokenTxInput",u.UpdateTokenTxOutput="UpdateTokenTxOutput",u.UpdateTransferTxInput="UpdateTransferTxInput",u.UpdateTransferTxOutput="UpdateTransferTxOutput",u.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",u.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",u.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",u.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",u.UpdateTransferManyTxInput="UpdateTransferManyTxInput",u.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",u.UpdateWalletTxInput="UpdateWalletTxInput",u.UpdateWalletTxOutput="UpdateWalletTxOutput",u))(v||{}),ri={ajv:d,createValidator(t){let e=d.compile(t);return cc(e)},getValidator(t){let e=d.getSchema(t);return cc(e)},getSchema(t){return f[t]},Schemas:f,SchemaNames:v},EM=ri.createValidator,_=ri.getValidator;var kO=_("AggregateTransferManyTxInput");var SO=_("AuthenticationCheckTxInput");var vO=_("CreateAccessTokenTxInput");var EO=_("CreateContractTxInput");var GO=_("CreateDepositTxInput");var CO=_("CreateDistributionTxInput");var RO=_("CreateTokenTxInput");var MO=_("CreateTransferTxInput");var PO=_("CreateTransferGroupTxInput");var WO=_("CreateTransferManyTxInput");var DO=_("CreateWalletTxInput");var AO=_("CreateWithdrawalTxInput");var NO=_("ExportBalanceHistoryTxInput");var UO=_("ExportTokenManyTxInput");var qO=_("ExportTransferGroupManyTxInput");var BO=_("ExportTransferManyTxInput");var LO=_("ExportWalletManyTxInput");var HO=_("FindBalanceManyTxInput");var VO=_("FindTokenManyTxInput");var zO=_("FindTransferGroupManyTxInput");var JO=_("FindTransferManyTxInput");var QO=_("FindWalletManyTxInput");var KO=_("FinishTransactionTxInput");var YO=_("GetBalanceTxInput");var XO=_("GetBalanceHistoryTxInput");var ZO=_("GetExportTxInput");var e$=_("GetFlagsTxInput");var t$=_("GetStatisticsTxInput");var r$=_("GetTokenTxInput");var n$=_("GetTokenManyTxInput");var a$=_("GetTransferTxInput");var s$=_("GetTransferGroupTxInput");var i$=_("GetWalletTxInput");var o$=_("GetWalletManyTxInput");var p$=_("HealthcheckTxInput");var d$=_("ImportActionsTxInput");var f$=_("ListExportManyTxInput");var u$=_("QueryLogsTxInput");var l$=_("ResetDatabaseTxInput");var c$=_("ReverseTransferTxInput");var m$=_("ReverseTransferGroupTxInput");var h$=_("ReverseTransferGroupManyTxInput");var _$=_("ReverseTransferManyTxInput");var g$=_("SetFlagsTxInput");var T$=_("StartTransactionTxInput");var y$=_("UpdateTokenTxInput");var F$=_("UpdateTransferTxInput");var x$=_("UpdateTransferGroupTxInput");var b$=_("UpdateTransferGroupManyTxInput");var O$=_("UpdateTransferManyTxInput");var $$=_("UpdateWalletTxInput"),Qp={aggregateTransferMany:kO,authenticationCheck:SO,createAccessToken:vO,createContract:EO,createDeposit:GO,createDistribution:CO,createToken:RO,createTransfer:MO,createTransferGroup:PO,createTransferMany:WO,createWallet:DO,createWithdrawal:AO,exportBalanceHistory:NO,exportTokenMany:UO,exportTransferGroupMany:qO,exportTransferMany:BO,exportWalletMany:LO,findBalanceMany:HO,findTokenMany:VO,findTransferGroupMany:zO,findTransferMany:JO,findWalletMany:QO,finishTransaction:KO,getBalance:YO,getBalanceHistory:XO,getExport:ZO,getFlags:e$,getStatistics:t$,getToken:r$,getTokenMany:n$,getTransfer:a$,getTransferGroup:s$,getWallet:i$,getWalletMany:o$,healthcheck:p$,importActions:d$,listExportMany:f$,queryLogs:u$,resetDatabase:l$,reverseTransfer:c$,reverseTransferGroup:m$,reverseTransferGroupMany:h$,reverseTransferMany:_$,setFlags:g$,startTransaction:T$,updateToken:y$,updateTransfer:F$,updateTransferGroup:x$,updateTransferGroupMany:b$,updateTransferMany:O$,updateWallet:$$},Kp=(S=>(S.aggregateTransferMany="aggregateTransferMany",S.authenticationCheck="authenticationCheck",S.createAccessToken="createAccessToken",S.createContract="createContract",S.createDeposit="createDeposit",S.createDistribution="createDistribution",S.createToken="createToken",S.createTransfer="createTransfer",S.createTransferGroup="createTransferGroup",S.createTransferMany="createTransferMany",S.createWallet="createWallet",S.createWithdrawal="createWithdrawal",S.exportBalanceHistory="exportBalanceHistory",S.exportTokenMany="exportTokenMany",S.exportTransferGroupMany="exportTransferGroupMany",S.exportTransferMany="exportTransferMany",S.exportWalletMany="exportWalletMany",S.findBalanceMany="findBalanceMany",S.findTokenMany="findTokenMany",S.findTransferGroupMany="findTransferGroupMany",S.findTransferMany="findTransferMany",S.findWalletMany="findWalletMany",S.finishTransaction="finishTransaction",S.getBalance="getBalance",S.getBalanceHistory="getBalanceHistory",S.getExport="getExport",S.getFlags="getFlags",S.getStatistics="getStatistics",S.getToken="getToken",S.getTokenMany="getTokenMany",S.getTransfer="getTransfer",S.getTransferGroup="getTransferGroup",S.getWallet="getWallet",S.getWalletMany="getWalletMany",S.healthcheck="healthcheck",S.importActions="importActions",S.listExportMany="listExportMany",S.queryLogs="queryLogs",S.resetDatabase="resetDatabase",S.reverseTransfer="reverseTransfer",S.reverseTransferGroup="reverseTransferGroup",S.reverseTransferGroupMany="reverseTransferGroupMany",S.reverseTransferMany="reverseTransferMany",S.setFlags="setFlags",S.startTransaction="startTransaction",S.updateToken="updateToken",S.updateTransfer="updateTransfer",S.updateTransferGroup="updateTransferGroup",S.updateTransferGroupMany="updateTransferGroupMany",S.updateTransferMany="updateTransferMany",S.updateWallet="updateWallet",S))(Kp||{});var w$=_("ImportActionsTxInput");function bc(t){let{error:e}=w$(t);return e===void 0}var GW=_("ImportActionsTxOutput");var CW=_("ImportActionsTxStreamChunk");var I$=_("ImportActionsTxOptions");function Oc(t){let{error:e}=I$(t);return e===void 0}var kt=class{constructor(e,r,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,r,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[r]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=r,this._connection=e,this.connectionType=r,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return ee(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,r)=>{"stream"in e&&e.stream.destroy(new ye("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(r)}),this.socId=void 0}_handleMessage(e){var o,p,m;if(this.hooks.message&&this.hooks.message(e),"method"in e){let c=e;if(c.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:c.id});return}D("Unexpected JSONRPCRequest",e);return}let r=e;if(this.hooks.message&&this.hooks.message(r),r.id===null){D("Unexpected JSONRPCResponse",e);return}if(r.result==="ack"){this._sending.delete(r.id);return}let n=this._requests.get(r.id);if(!n){D("No Request found for incoming",e);return}if("handle"in n){n.handle(r),delete n.handle;return}r.error&&"error"in n&&n.error(r.error);let a=r;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((p=a.result)==null?void 0:p.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((m=a.result)==null?void 0:m.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,r){let{isValid:n,inputCopy:a,error:s}=Qp[e](r);if(!n)throw s;return this._sendRaw(e,a)}_sendRaw(e,r){let n={jsonrpc:"2.0",method:e,params:r,id:Ze()};return this.hooks.preflight&&this.hooks.preflight(n)===!1?new We:new We(a=>ee(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(n.id,{stream:a,start:Date.now()}),this._sending.add(n.id),this._send(n)}))}_streamTransaction(e,r,n,a){let s=Date.now(),i=Ze(),o,p=({method:x,params:g})=>{if(o)return;let y={jsonrpc:"2.0",method:x,params:b({streamId:i},g),id:Ze()};this._sending.add(y.id),this._send(y)},m=(x,g)=>{o||(p({method:"streamError",params:{error:g}}),o=g,x.push({error:g}))},c=new di,h=a?c.pipe(a):c,T={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(T)===!1?new Dt:new Dt(x=>ee(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let g=setTimeout(()=>{x.push({error:new ye("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set(T.id,{stream:x,start:s,error(y){o=y,D("stream:error()>",y)},pause(){c.pause()},resume(){c.resume()},handle(y){if(y.error){x.push(y);return}h.on("data",F=>{if(!o){if(g&&(clearTimeout(g),g=null),!r(F)){m(x,new ye("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:F}));return}p({method:"streamData",params:{data:F}})}}).on("error",F=>{o||(g&&(clearTimeout(g),g=null),p({method:"streamError",params:{error:F}}),x.push({error:new ye("INPUT_STREAM_ERROR",{streamId:i,error:F})}))}).on("end",()=>{g&&(clearTimeout(g),g=null),p({method:"streamEnd",params:{}})})}}),this._sending.add(T.id),this._send(T)}),c)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e!=null?e:{})}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e!=null?e:{})}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportBalanceHistory(e){return this._sendTransaction("exportBalanceHistory",e)}exportTokenMany(e){return this._sendTransaction("exportTokenMany",e!=null?e:{})}exportTransferGroupMany(e){return this._sendTransaction("exportTransferGroupMany",e!=null?e:{})}exportTransferMany(e){return this._sendTransaction("exportTransferMany",e!=null?e:{})}exportWalletMany(e){return this._sendTransaction("exportWalletMany",e!=null?e:{})}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e!=null?e:{})}findTokenMany(e){return this._sendTransaction("findTokenMany",e!=null?e:{})}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e!=null?e:{})}findTransferMany(e){return this._sendTransaction("findTransferMany",e!=null?e:{})}findWalletMany(e){return this._sendTransaction("findWalletMany",e!=null?e:{})}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getExport(e){return this._sendTransaction("getExport",e)}getFlags(e){return this._sendTransaction("getFlags",e!=null?e:{})}getStatistics(e){return this._sendTransaction("getStatistics",e!=null?e:{})}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}healthcheck(e){return this._sendTransaction("healthcheck",e!=null?e:{})}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,r){if(e!==void 0&&!Oc(e))throw new ge({input:e});return this._streamTransaction("importActions",bc,e,r)}listExportMany(e){return this._sendTransaction("listExportMany",e!=null?e:{})}queryLogs(e){return this._sendTransaction("queryLogs",e!=null?e:{})}resetDatabase(e){return this._sendTransaction("resetDatabase",e!=null?e:{})}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e!=null?e:{})}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var $c,j$=($c=window.WAPI_VERSION)!=null?$c:"";function Xp(t){let e=wc(t);return new Yp(e,t)}function wc(t){var x;let e=Object.assign({rejectUnauthorized:(x=t.rejectUnauthorized)!=null?x:!0,clientVersion:j$},t),r=Ef(e),n=new bf(...r),a,s,i=!1,o;n.onclose=p,n.onerror=m,n.onmessage=c;function p(g){if(D(`createConnection>close(reason:${g.reason},code:${g.code},wasClean:${g.wasClean})`),g.code===4030)return h(new Ye);h(new Error("WS closed"))}function m(g){D(`createConnection>error(message:${g.message},error:${g.error},type:${g.type})`),h(g.error)}function c(g){D(`createConnection>message(type:${g.type},data:${g.data})`);let{data:y}=g,F;try{F=JSON.parse(y.toString())}catch($){return D("Invalid JSON response",$),h(new Error("Invalid JSON response"))}if(F.result!=="ready")return D("Invalid first message"),h(new Error("Invalid first message - "+JSON.stringify(F)));h()}function h(g){i||(delete n.onmessage,delete n.onerror,delete n.onclose,g?(s(g),n.close()):a(o),i=!0)}let T=new Promise((g,y)=>{a=g,s=y});return{ws:n,$connect:T}}var Yp=class extends kt{constructor(r,n){super(r.ws,"ws",r.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(r){super._setErrored(r),(r instanceof Ye||"code"in r&&r.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=r=>{let{data:n,type:a}=r;if(D(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=r=>{let{message:n,error:a,type:s}=r;D(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=r=>{let{reason:n,code:a,wasClean:s}=r;D(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(D("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){D("reconnect hook returned false");return}let r=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=ee(this,null,function*(){let a;for(let s=0;s<r+1;s++)try{D("Trying to connect, attempt:",s);let{ws:i,$connect:o}=wc(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code||s>r-1)throw i;yield kf(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){D("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return D("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();D("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(r){D("send()",r),this._connection.send(JSON.stringify(r))}close(){return ee(this,null,function*(){return D("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Zp=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Zp!="undefined"&&Zp,ed=Zp.fetch;function rd(t){let e=k$(t);return new td(e,t)}function k$(t){let e=t.host.replace(/^wss:/,"https:"),r="x-wapi-req-id";function n(o){return ee(this,null,function*(){D("http_createConnection>message(body:$0)",o)})}function a(o,p){return ee(this,null,function*(){let m=JSON.parse(o),h=yield(yield ed(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${p}`,[r]:m==null?void 0:m.id},body:o})).json();this.onmessage(P(b({},h),{id:m.id}))})}let s=Ze(),i=ed(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${t.jwt}`,[r]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var td=class extends kt{constructor(e,r){super(e,"https",e.$connect),this.host=r.host,this.jwt=r.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){D("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>ee(this,null,function*(){D("http_message($0)>",e),this._handleMessage(e)})}close(){return ee(this,null,function*(){D("close()"),this._setConnected(!1)})}_reconnect(){return ee(this,null,function*(){D("reconnect()")})}};var nd=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(nd||{});var sd=class t{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,r,n,a){if(typeof r=="object"){let s={};for(let[i,o]of Object.entries(r))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof r=="function"){let s=new t(this.modifierFn);return r.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:r,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[r]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(r,n):n;return this.add({function:e,field:r,value:s})}throw TypeError("Invalid input")}where(e,r,n){return this.addWhere("where",e,r,n)}orWhere(e,r,n){return this.addWhere("orWhere",e,r,n)}whereIn(e,r){return this.add({function:"whereIn",field:e,value:r})}orWhereIn(e,r){return this.add({function:"orWhereIn",field:e,value:r})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,r,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:r}):this.add({function:"whereMetadata",field:e,operator:r,value:n})}orWhereMetadata(e,r,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:r}):this.add({function:"orWhereMetadata",field:e,operator:r,value:n})}whereMetadataIn(e,r){return this.add({function:"whereMetadataIn",field:e,value:r})}orWhereMetadataIn(e,r){return this.add({function:"orWhereMetadataIn",field:e,value:r})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function ad(t){return t.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var vt=class extends sd{constructor({start:r,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=r,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return P(b({},super.toJSON()),{options:b({},this.optionsObject)})}options(r){if(this.optionsModifiers===void 0)return this.optionsObject=b(b({},this.optionsObject),r),this;this.optionsObject=b({},this.optionsObject);for(let[n,a]of Object.entries(r))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(r,n){return this.start().then(r,n)}catch(r){return this.start().catch(r)}stream(){return this.start().stream()}},te=class extends vt{constructor({start:e,modifiers:r,optionsModifiers:n}){super({start:a=>e(a),modifiers:r,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,r,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=ad(e),this;if(!e.includes(" "))return this.optionsObject.order=ad([{column:e,order:r||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let p={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");p.nulls=o}return this.optionsObject.order=ad([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function St(t,e){if(!e)return{function:t,alias:t};if(!e.includes(" "))return{function:t,field:e,alias:t};if(!e.includes(" as "))throw new L("UNCLEAR_AGGREGATOR",{input:e});let[r,n]=e.split(" as ");return{function:t,field:r,alias:n||r}}var Li=class extends vt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:s=>r(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return P(b({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(r){return this.timezoneString=r,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:r})}),this}groupBy(r,...n){let a={};if(typeof r!="string")throw new TypeError("expected string as input, got"+typeof r);let[s,i]=r.split(" as ");if(nd.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(r){return this.aggregatorObject.aggregators.push(St("count",r)),this}distinct(r){return this.aggregatorObject.aggregators.push(St("countDistinct",r)),this}avg(r){return this.aggregatorObject.aggregators.push(St("average",r)),this}min(r){return this.aggregatorObject.aggregators.push(St("min",r)),this}max(r){return this.aggregatorObject.aggregators.push(St("max",r)),this}sum(r){return this.aggregatorObject.aggregators.push(St("sum",r)),this}},Et=class extends vt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return P(b({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(r){return this.updateObject=Object.assign(this.updateObject,r),this}},Hi=class extends vt{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return P(b({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(r){return this.reverseModifications=Object.assign(this.reverseModifications,r),this}};var S$=_("AggregateTransfersFnInput");function id(t,e,r){let{client:n}=t;if(e===void 0)return new Li({start(g){return n.api.aggregateTransferMany({transfer:g.filter,options:g.options,groups:g.groups,aggregators:g.aggregators})},modifiers(g,y){return["token","wallet","from_wallet","to_wallet"].includes(g)?O(y):g==="transfer_group"?R(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:S$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m,transfer_group:c,status:h,metadata:T}=a,x={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m),transfer_group:R(c),status:h,metadata:T};return n.api.aggregateTransferMany({transfer:x,groups:a.groups,aggregators:a.aggregators})}var v$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),E$=_("CreateAccessTokenFnInput");function od(t,e,r){var i;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:E$});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var p;return(p=v$.get(o))!=null?p:o})))),n.api.createAccessToken({token:a.token,options:r})}var G$=_("CreateContractFnInput");function pd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:G$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:O(a.owner),deposits:[{token:O(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:O(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:O(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var C$=_("CreateDepositFnInput");function dd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:C$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let p=s.options;delete s.options;let m=P(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(o),to_wallet:O(s.wallet),type:"deposit"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:pi(p,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var fd=(r=>(r.whereMetadata="whereMetadata",r.orWhereMetadata="orWhereMetadata",r))(fd||{}),ud=(r=>(r.where="where",r.orWhere="orWhere",r))(ud||{}),ld=(r=>(r.whereIn="whereIn",r.orWhereIn="orWhereIn",r))(ld||{}),cd=(r=>(r.whereMetadataIn="whereMetadataIn",r.orWhereMetadataIn="orWhereMetadataIn",r))(cd||{}),md=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(md||{}),hd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(hd||{}),_d=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t))(_d||{}),gd=(r=>(r.like="like",r.ilike="ilike",r))(gd||{}),Td=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r.like="like",r.ilike="ilike",r))(Td||{}),yd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(yd||{}),Fd=(r=>(r.active="active",r["dw-only"]="dw-only",r.disabled="disabled",r))(Fd||{}),xd=(r=>(r.open="open",r.closed="closed",r))(xd||{}),bd=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(bd||{}),Od=(r=>(r.pending="pending",r.finished="finished",r))(Od||{}),$d=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))($d||{}),wd=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(wd||{}),Id=(n=>(n.token="token",n.house="house",n.regular="regular",n))(Id||{}),jd=(r=>(r.active="active",r.disabled="disabled",r))(jd||{}),kd=(r=>(r.flag="flag",r.setting="setting",r))(kd||{}),Sd=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(Sd||{});var R$=_("CreateExchangeFnInput");function vd(t,e,r){var o,p,m,c,h;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:R$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=fe(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(p=a.status)!=null?p:"pending",metadata:a.metadata,children:[{identifier:(m=a.from_identifier)!=null?m:fe(),from_wallet:O(a.from_wallet),to_wallet:O(a.to_wallet),token:O(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(c=a.to_identifier)!=null?c:fe(),from_wallet:O(a.to_wallet),to_wallet:O(a.from_wallet),token:O(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(h=a.to_amount)!=null?h:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var M$=_("CreateTokenFnInput");function Ed(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:M$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:P(b({},a),{belongs_to:O(a.belongs_to)}),options:i})}var P$=_("CreateTransferFnInput");function Gd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:P$});if(i)throw i;let o=ni(s,n.getConfig("token"));return o.identifier||(o.identifier=fe(o)),n.api.createTransfer({transfer:o,options:s.options})}function ni(t,e){t.type=t.type||"transfer";let r={identifier:t.identifier,token:O(t.token||e),amount:t.amount,metadata:t.metadata,status:t.status,type:t.type,transfer_group:R(t.transfer_group),created_at:t.created_at};if(t.type==="transfer")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),P(b({},r),{from_wallet:O(t.from_wallet),to_wallet:O(t.to_wallet)});if(t.type==="withdrawal")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),P(b({},r),{from_wallet:O(t.wallet)});if(t.type==="deposit")return P(b({},r),{to_wallet:O(t.wallet)})}var W$=_("CreateTransferGroupFnInput");function Cd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:W$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>ni(o,n.getConfig("token")))),i.identifier||(i.identifier=fe(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var D$=_("CreateTransfersFnInput");function Rd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:D$});if(s)throw s;let i=a.transfers.map(o=>ni(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=fe(o));return n.api.createTransferMany({transfers:i,options:a.options})}var A$=_("CreateWalletFnInput");function Md(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:A$});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:b({},a),options:i})}var N$=_("CreateWithdrawalFnInput");function Pd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:N$});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let p=s.token||n.getConfig("token");if(p===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let m=P(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(p),from_wallet:O(s.wallet),type:"withdrawal"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:pi(o,{return_balance:"return_from_balance"})})}var U$=_("ExportBalanceHistoryFnInput");function Wd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:U$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.exportBalanceHistory({balance:{wallet:O(a.wallet),token:O(i)},options:r})}var q$=_("ExportTokensFnInput");function Dd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportTokenMany({token:h.filter,options:h.options})},modifiers(h,T){return["belongs_to"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:q$});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.exportTokenMany({token:i,options:p})}var B$=_("ExportTransferGroupsFnInput");function Ad(t,e,r){var g,y;let{client:n}=t;if(e===void 0)return new te({start(F){return n.api.exportTransferGroupMany({transfer_group:F.filter,options:F.options})},modifiers(F,$){return["transfer_group","reverses"].includes(F)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:B$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let T=(g=a.options)==null?void 0:g.order_by;(y=a.options)==null||delete y.order_by;let x=b({},a.options);return!x.order&&T&&(x.order=ne(T)),n.api.exportTransferGroupMany({transfer_group:h,options:x})}var L$=_("ExportTransfersFnInput");function Nd(t,e,r){var y;let{client:n}=t;if(e===void 0)return new te({start(F){return n.api.exportTransferMany({transfer:F.filter,options:F.options})},modifiers(F,$){return["token","wallet","from_wallet","to_wallet"].includes(F)?O($):F==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:L$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(y=a.options)!=null||(a.options={});let h=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let T=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let x=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),T&&(g.return_running_balance_for_wallet=O(T)),x&&(g.return_signed_amount_for_wallet=O(x)),n.api.exportTransferMany({transfer:c,options:g})}var H$=_("ExportWalletsFnInput");function Ud(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,T){return h==="include_balance_for_token"&&typeof T!="object"?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:H$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.exportWalletMany({wallet:o,options:m})}var V$=_("FindBalancesFnInput");function qd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findBalanceMany({balance:h.filter,options:h.options})},modifiers(h,T){return["wallet","token"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:V$});if(s)throw s;let i={};a.wallet&&(i.wallet=O(a.wallet)),a.token&&(i.token=O(a.token));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findBalanceMany({balance:i,options:p})}var z$=_("FindTokensFnInput");function Bd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findTokenMany({token:h.filter,options:h.options})},modifiers(h,T){return["belongs_to"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:z$});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findTokenMany({token:i,options:p})}var J$=_("FindTransferGroupsFnInput");function Ld(t,e,r){var g,y;let{client:n}=t;if(e===void 0)return new te({start(F){return n.api.findTransferGroupMany({transfer_group:F.filter,options:F.options})},modifiers(F,$){return["transfer_group","reverses"].includes(F)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:J$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let T=(g=a.options)==null?void 0:g.order_by;(y=a.options)==null||delete y.order_by;let x=b({},a.options);return!x.order&&T&&(x.order=ne(T)),n.api.findTransferGroupMany({transfer_group:h,options:x})}var Q$=_("FindTransfersFnInput");function Hd(t,e,r){var y;let{client:n}=t;if(e===void 0)return new te({start(F){return n.api.findTransferMany({transfer:F.filter,options:F.options})},modifiers(F,$){return["token","wallet","from_wallet","to_wallet"].includes(F)?O($):F==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Q$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(y=a.options)!=null||(a.options={});let h=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let T=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let x=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),T&&(g.return_running_balance_for_wallet=O(T)),x&&(g.return_signed_amount_for_wallet=O(x)),n.api.findTransferMany({transfer:c,options:g})}var K$=_("FindWalletsFnInput");function Vd(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,T){return h==="include_balance_for_token"&&typeof T!="object"?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:K$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.findWalletMany({wallet:o,options:m})}var Y$=_("GetBalanceFnInput");function zd(t,e,r){let{client:n}=t,a=ve(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:Y$});if(i)throw i;if(s.datetime&&Gf(s.datetime))throw new L("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:O(s.wallet),token:O(o),datetime:s.datetime},options:s.options})}var X$=_("GetBalanceHistoryFnInput");function Jd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:X$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:O(a.wallet),token:O(i)},options:a.options})}var Z$=_("GetExportFnInput");function Qd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:Z$});if(s)throw s;return n.api.getExport({export:{identifier:a.identifier},options:a.options})}var ew=_("GetFlagsFnInput");function Kd(t,e,r){let{client:n}=t,{error:a,inputCopy:s}=w({input:e||{},options:r,validate:ew});if(a)throw a;return n.api.getFlags({options:s.options})}var tw=_("GetStatisticsFnInput");function Yd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e||{},options:r,validate:tw});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var rw=_("GetTokenFnInput");function Xd(t,e={},r){let{client:n}=t,a=ve(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:rw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:O(o),options:s.options})}var nw=_("GetTransferFnInput");function Zd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:nw});if(s)throw s;return n.api.getTransfer({transfer:R(a.transfer),options:a.options})}var aw=_("GetTransferGroupFnInput");function ef(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:aw});if(s)throw s;return n.api.getTransferGroup({transfer_group:R(a.transfer_group),options:a.options})}var sw=_("GetWalletFnInput");function tf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:sw});if(s)throw s;return n.api.getWallet({wallet:O(a.wallet),options:a.options})}var iw=_("HealthcheckFnInput");function rf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:iw});if(s)throw s;return n.api.healthcheck({options:b(b({},a.options),r)})}var ow=_("ImportDataFnInput");function Ic(t){let{error:e}=ow(t);return e===void 0}var zA=_("ImportDataFnOutput");var JA=_("ImportDataFnStreamChunk");var pw=_("ImportDataFnOptions");function jc(t){let{error:e}=pw(t);return e===void 0}function nf(){throw new Error("import-data available only in node client")}var dw=_("ListExportsFnInput");function af(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:dw});if(s)throw s;let i=(()=>{if(typeof a.date=="string")return a.date})();return n.api.listExportMany({export:{date:i},options:r})}var fw=_("ReverseTransferFnInput");function sf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:fw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:R(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var uw=_("ReverseTransferGroupFnInput");function of(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:uw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:R(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var lw=_("ReverseTransfersFnInput");function pf(t,e,r){let{client:n}=t;if(e===void 0)return new Hi({start(h){return n.api.reverseTransferMany({transfer:h.filter,reverse:h.reverse,options:h.options})},modifiers(h,T){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(T):h==="transfer_group"?R(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:lw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.reverseTransferMany({transfer:c,reverse:a.reverse,options:a.options})}var cw=_("SetFlagsFnInput");function df(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:cw});if(s)throw s;let i=Object.keys(ft.definitions.Flags.properties),o={};if(i.forEach(p=>{p in a&&(o[p]=a[p])}),Object.keys(o).length<1)throw new L("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var mw=_("UpdateTokenFnInput");function ff(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:mw});if(s)throw s;return n.api.updateToken({token:O(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var hw=_("UpdateTransferFnInput");function uf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:hw});if(s)throw s;return n.api.updateTransfer({transfer:R(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var _w=_("UpdateTransferGroupFnInput");function lf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:_w});if(s)throw s;return n.api.updateTransferGroup({transfer_group:R(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var gw=_("UpdateTransferGroupsFnInput");function cf(t,e,r){let{client:n}=t;if(e===void 0)return new Et({start(T){return n.api.updateTransferGroupMany({transfer_group:T.filter,update:T.update,options:T.options})},modifiers(T,x){return["transfer_group","reverses"].includes(T)?R(x):x}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:gw});if(s)throw s;let{transfer_status:i,status:o,metadata:p,type:m,update:c}=a,h={transfer_status:i,status:o,metadata:p,type:m};return a.reverses&&(h.reverses=R(a.reverses)),n.api.updateTransferGroupMany({transfer_group:h,update:c,options:a.options})}var Tw=_("UpdateTransfersFnInput");function mf(t,e,r){let{client:n}=t;if(e===void 0)return new Et({start(h){return n.api.updateTransferMany({transfer:h.filter,update:h.update,options:h.options})},modifiers(h,T){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(T):h==="transfer_group"?R(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Tw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.updateTransferMany({transfer:c,update:a.update,options:a.options})}var yw=_("UpdateWalletFnInput");function hf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:yw});if(s)throw s;return n.api.updateWallet({wallet:O(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var Fw={aggregateTransfers:_("AggregateTransfersFnInput"),createAccessToken:_("CreateAccessTokenFnInput"),createContract:_("CreateContractFnInput"),createDeposit:_("CreateDepositFnInput"),createExchange:_("CreateExchangeFnInput"),createToken:_("CreateTokenFnInput"),createTransfer:_("CreateTransferFnInput"),createTransferGroup:_("CreateTransferGroupFnInput"),createTransfers:_("CreateTransfersFnInput"),createWallet:_("CreateWalletFnInput"),createWithdrawal:_("CreateWithdrawalFnInput"),exportBalanceHistory:_("ExportBalanceHistoryFnInput"),exportTokens:_("ExportTokensFnInput"),exportTransferGroups:_("ExportTransferGroupsFnInput"),exportTransfers:_("ExportTransfersFnInput"),exportWallets:_("ExportWalletsFnInput"),findBalances:_("FindBalancesFnInput"),findTokens:_("FindTokensFnInput"),findTransferGroups:_("FindTransferGroupsFnInput"),findTransfers:_("FindTransfersFnInput"),findWallets:_("FindWalletsFnInput"),getBalance:_("GetBalanceFnInput"),getBalanceHistory:_("GetBalanceHistoryFnInput"),getExport:_("GetExportFnInput"),getFlags:_("GetFlagsFnInput"),getStatistics:_("GetStatisticsFnInput"),getToken:_("GetTokenFnInput"),getTransfer:_("GetTransferFnInput"),getTransferGroup:_("GetTransferGroupFnInput"),getWallet:_("GetWalletFnInput"),healthcheck:_("HealthcheckFnInput"),importData:_("ImportDataFnInput"),listExports:_("ListExportsFnInput"),reverseTransfer:_("ReverseTransferFnInput"),reverseTransferGroup:_("ReverseTransferGroupFnInput"),reverseTransfers:_("ReverseTransfersFnInput"),setFlags:_("SetFlagsFnInput"),updateToken:_("UpdateTokenFnInput"),updateTransfer:_("UpdateTransferFnInput"),updateTransferGroup:_("UpdateTransferGroupFnInput"),updateTransferGroups:_("UpdateTransferGroupsFnInput"),updateTransfers:_("UpdateTransfersFnInput"),updateWallet:_("UpdateWalletFnInput")},j={aggregateTransfers:id,createAccessToken:od,createContract:pd,createDeposit:dd,createExchange:vd,createToken:Ed,createTransfer:Gd,createTransferGroup:Cd,createTransfers:Rd,createWallet:Md,createWithdrawal:Pd,exportBalanceHistory:Wd,exportTokens:Dd,exportTransferGroups:Ad,exportTransfers:Nd,exportWallets:Ud,findBalances:qd,findTokens:Bd,findTransferGroups:Ld,findTransfers:Hd,findWallets:Vd,getBalance:zd,getBalanceHistory:Jd,getExport:Qd,getFlags:Kd,getStatistics:Yd,getToken:Xd,getTransfer:Zd,getTransferGroup:ef,getWallet:tf,healthcheck:rf,importData:nf,listExports:af,reverseTransfer:sf,reverseTransferGroup:of,reverseTransfers:pf,setFlags:df,updateToken:ff,updateTransfer:uf,updateTransferGroup:lf,updateTransferGroups:cf,updateTransfers:mf,updateWallet:hf},kc=(C=>(C.aggregateTransfers="aggregateTransfers",C.createAccessToken="createAccessToken",C.createContract="createContract",C.createDeposit="createDeposit",C.createExchange="createExchange",C.createToken="createToken",C.createTransfer="createTransfer",C.createTransferGroup="createTransferGroup",C.createTransfers="createTransfers",C.createWallet="createWallet",C.createWithdrawal="createWithdrawal",C.exportBalanceHistory="exportBalanceHistory",C.exportTokens="exportTokens",C.exportTransferGroups="exportTransferGroups",C.exportTransfers="exportTransfers",C.exportWallets="exportWallets",C.findBalances="findBalances",C.findTokens="findTokens",C.findTransferGroups="findTransferGroups",C.findTransfers="findTransfers",C.findWallets="findWallets",C.getBalance="getBalance",C.getBalanceHistory="getBalanceHistory",C.getExport="getExport",C.getFlags="getFlags",C.getStatistics="getStatistics",C.getToken="getToken",C.getTransfer="getTransfer",C.getTransferGroup="getTransferGroup",C.getWallet="getWallet",C.healthcheck="healthcheck",C.importData="importData",C.listExports="listExports",C.reverseTransfer="reverseTransfer",C.reverseTransferGroup="reverseTransferGroup",C.reverseTransfers="reverseTransfers",C.setFlags="setFlags",C.updateToken="updateToken",C.updateTransfer="updateTransfer",C.updateTransferGroup="updateTransferGroup",C.updateTransferGroups="updateTransferGroups",C.updateTransfers="updateTransfers",C.updateWallet="updateWallet",C))(kc||{}),Sc=(a=>(a.findTokens="findTokens",a.findTransferGroups="findTransferGroups",a.findTransfers="findTransfers",a.findWallets="findWallets",a))(Sc||{});var vc,xw=(vc=window.WAPI_VERSION)!=null?vc:"",Gt=class{constructor(e,r){this.config={};if(this.api=e,this.$connect=e.$connect,r&&(r.token&&(this.config=P(b({},this.config),{token:r.token})),r.hooks))for(let[n,a]of Object.entries(r.hooks))this.setHook(n,a)}close(){return ee(this,null,function*(){return this.api.close()})}version(){return xw}setHook(e,r){if(typeof r!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=r,this}configure(e){return this.config=b(b({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,r){return e===void 0?j.aggregateTransfers({client:this}):j.aggregateTransfers({client:this},e,r)}createAccessToken(e,r){return j.createAccessToken({client:this},e!=null?e:{},r)}createContract(e,r){return j.createContract({client:this},e,r)}createDeposit(e,r){return j.createDeposit({client:this},e,r)}createExchange(e,r){return j.createExchange({client:this},e,r)}createToken(e,r){return j.createToken({client:this},e,r)}createTransfer(e,r){return j.createTransfer({client:this},e,r)}createTransferGroup(e,r){return j.createTransferGroup({client:this},e,r)}createTransfers(e,r){return j.createTransfers({client:this},e,r)}createWallet(e,r){return j.createWallet({client:this},e,r)}createWithdrawal(e,r){return j.createWithdrawal({client:this},e,r)}exportBalanceHistory(e,r){return j.exportBalanceHistory({client:this},e,r)}exportTokens(e,r){return e===void 0?j.exportTokens({client:this}):j.exportTokens({client:this},e,r)}exportTransferGroups(e,r){return e===void 0?j.exportTransferGroups({client:this}):j.exportTransferGroups({client:this},e,r)}exportTransfers(e,r){return e===void 0?j.exportTransfers({client:this}):j.exportTransfers({client:this},e,r)}exportWallets(e,r){return e===void 0?j.exportWallets({client:this}):j.exportWallets({client:this},e,r)}findBalances(e,r){return e===void 0?j.findBalances({client:this}):j.findBalances({client:this},e,r)}findTokens(e,r){return e===void 0?j.findTokens({client:this}):j.findTokens({client:this},e,r)}findTransferGroups(e,r){return e===void 0?j.findTransferGroups({client:this}):j.findTransferGroups({client:this},e,r)}findTransfers(e,r){return e===void 0?j.findTransfers({client:this}):j.findTransfers({client:this},e,r)}findWallets(e,r){return e===void 0?j.findWallets({client:this}):j.findWallets({client:this},e,r)}getBalance(e,r){return j.getBalance({client:this},e,r)}getBalanceHistory(e,r){return j.getBalanceHistory({client:this},e,r)}getExport(e,r){return j.getExport({client:this},e,r)}getFlags(e,r){return j.getFlags({client:this},e!=null?e:{},r)}getStatistics(e,r){return j.getStatistics({client:this},e!=null?e:{},r)}getToken(e,r){return j.getToken({client:this},e!=null?e:{},r)}getTransfer(e,r){return j.getTransfer({client:this},e,r)}getTransferGroup(e,r){return j.getTransferGroup({client:this},e,r)}getWallet(e,r){return j.getWallet({client:this},e,r)}healthcheck(e,r){return j.healthcheck({client:this},e!=null?e:{},r)}importData(e,r){if(e===void 0&&r===void 0)return j.importData({client:this});if(r===void 0&&jc(e))return j.importData({client:this},e);if(Ic(e))return j.importData({client:this},e,r);throw new ge({input:e,options:r})}listExports(e,r){return j.listExports({client:this},e!=null?e:{},r)}reverseTransfer(e,r){return j.reverseTransfer({client:this},e,r)}reverseTransferGroup(e,r){return j.reverseTransferGroup({client:this},e,r)}reverseTransfers(e,r){return e===void 0?j.reverseTransfers({client:this}):j.reverseTransfers({client:this},e,r)}setFlags(e,r){return j.setFlags({client:this},e,r)}updateToken(e,r){return j.updateToken({client:this},e,r)}updateTransfer(e,r){return j.updateTransfer({client:this},e,r)}updateTransferGroup(e,r){return j.updateTransferGroup({client:this},e,r)}updateTransferGroups(e,r){return e===void 0?j.updateTransferGroups({client:this}):j.updateTransferGroups({client:this},e,r)}updateTransfers(e,r){return e===void 0?j.updateTransfers({client:this}):j.updateTransfers({client:this},e,r)}updateWallet(e,r){return j.updateWallet({client:this},e,r)}};function Ec(t,e){let r=Xp(t);return new Gt(r,e)}function Gc(t,e){let r=rd(t);return new Gt(r,e)}var bw=ri.getValidator("ClientOptions"),Cc=(r=>(r.ws="ws",r.https="https",r))(Cc||{});function Ow(t){let e=t.config,{inputCopy:r,error:n}=bw(t);if(n)throw n;if(r.client==="ws")return Ec(r.connection,e);if(r.client==="https")return Gc(r.connection,e);throw new TypeError("Invalid client type")}var $w={getIdentifier:Sf};return Lc(ww);})();