@typus/typus-sdk 1.2.588 → 1.3.1

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 (590) hide show
  1. package/lib/config.json +161 -0
  2. package/lib/mainnet.json +4 -4
  3. package/lib/utils/_dependencies/source/0x1/ascii/structs.d.ts +82 -0
  4. package/lib/utils/_dependencies/source/0x1/ascii/structs.js +352 -0
  5. package/lib/utils/_dependencies/source/0x1/bit-vector/structs.d.ts +50 -0
  6. package/lib/utils/_dependencies/source/0x1/bit-vector/structs.js +239 -0
  7. package/lib/utils/_dependencies/source/0x1/fixed-point32/structs.d.ts +41 -0
  8. package/lib/utils/_dependencies/source/0x1/fixed-point32/structs.js +203 -0
  9. package/lib/utils/_dependencies/source/0x1/index.d.ts +2 -0
  10. package/lib/utils/_dependencies/source/0x1/index.js +5 -0
  11. package/lib/utils/_dependencies/source/0x1/init.d.ts +2 -0
  12. package/lib/utils/_dependencies/source/0x1/init.js +42 -0
  13. package/lib/utils/_dependencies/source/0x1/option/structs.d.ts +46 -0
  14. package/lib/utils/_dependencies/source/0x1/option/structs.js +233 -0
  15. package/lib/utils/_dependencies/source/0x1/string/structs.d.ts +44 -0
  16. package/lib/utils/_dependencies/source/0x1/string/structs.js +227 -0
  17. package/lib/utils/_dependencies/source/0x1/type-name/structs.d.ts +48 -0
  18. package/lib/utils/_dependencies/source/0x1/type-name/structs.js +204 -0
  19. package/lib/utils/_dependencies/source/0x123/discount-mint/structs.d.ts +552 -0
  20. package/lib/utils/_dependencies/source/0x123/discount-mint/structs.js +1068 -0
  21. package/lib/utils/_dependencies/source/0x123/index.d.ts +2 -0
  22. package/lib/utils/_dependencies/source/0x123/index.js +5 -0
  23. package/lib/utils/_dependencies/source/0x123/init.d.ts +2 -0
  24. package/lib/utils/_dependencies/source/0x123/init.js +61 -0
  25. package/lib/utils/_dependencies/source/0x123/royalty-rule/structs.d.ts +85 -0
  26. package/lib/utils/_dependencies/source/0x123/royalty-rule/structs.js +340 -0
  27. package/lib/utils/_dependencies/source/0x123/staking/structs.d.ts +433 -0
  28. package/lib/utils/_dependencies/source/0x123/staking/structs.js +784 -0
  29. package/lib/utils/_dependencies/source/0x123/table-vec/structs.d.ts +63 -0
  30. package/lib/utils/_dependencies/source/0x123/table-vec/structs.js +236 -0
  31. package/lib/utils/_dependencies/source/0x123/typus-nft/structs.d.ts +1006 -0
  32. package/lib/utils/_dependencies/source/0x123/typus-nft/structs.js +1994 -0
  33. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/index.d.ts +2 -0
  34. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/index.js +5 -0
  35. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/init.d.ts +2 -0
  36. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/init.js +38 -0
  37. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/whitelist/structs.d.ts +340 -0
  38. package/lib/utils/_dependencies/source/0x1318fdc90319ec9c24df1456d960a447521b0a658316155895014a6e39b5482f/whitelist/structs.js +1103 -0
  39. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/index.d.ts +2 -0
  40. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/index.js +5 -0
  41. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/init.d.ts +2 -0
  42. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/init.js +40 -0
  43. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/price-feed/structs.d.ts +47 -0
  44. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/price-feed/structs.js +215 -0
  45. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/price-update-policy/structs.d.ts +212 -0
  46. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/price-update-policy/structs.js +525 -0
  47. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/x-oracle/structs.d.ts +471 -0
  48. package/lib/utils/_dependencies/source/0x1478a432123e4b3d61878b629f2c692969fdb375644f1251cd278a4b1e7d7cd6/x-oracle/structs.js +669 -0
  49. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/airdrop/structs.d.ts +463 -0
  50. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/airdrop/structs.js +961 -0
  51. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/big-vector/structs.d.ts +137 -0
  52. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/big-vector/structs.js +401 -0
  53. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/critbit/structs.d.ts +226 -0
  54. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/critbit/structs.js +572 -0
  55. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/ecosystem/structs.d.ts +383 -0
  56. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/ecosystem/structs.js +802 -0
  57. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/index.d.ts +2 -0
  58. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/index.js +5 -0
  59. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/init.d.ts +2 -0
  60. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/init.js +72 -0
  61. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/leaderboard/structs.d.ts +591 -0
  62. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/leaderboard/structs.js +1156 -0
  63. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/linked-object-table/structs.d.ts +152 -0
  64. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/linked-object-table/structs.js +380 -0
  65. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/linked-set/structs.d.ts +138 -0
  66. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/linked-set/structs.js +376 -0
  67. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/tgld/structs.d.ts +261 -0
  68. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/tgld/structs.js +653 -0
  69. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/user/structs.d.ts +194 -0
  70. package/lib/utils/_dependencies/source/0x17117e8e181c236a3d1706f8a60486676cc9a5c82dc58d132a2f8270598271d/user/structs.js +509 -0
  71. package/lib/utils/_dependencies/source/0x2/authenticator-state/structs.d.ts +442 -0
  72. package/lib/utils/_dependencies/source/0x2/authenticator-state/structs.js +807 -0
  73. package/lib/utils/_dependencies/source/0x2/bag/structs.d.ts +56 -0
  74. package/lib/utils/_dependencies/source/0x2/bag/structs.js +210 -0
  75. package/lib/utils/_dependencies/source/0x2/balance/structs.d.ts +79 -0
  76. package/lib/utils/_dependencies/source/0x2/balance/structs.js +332 -0
  77. package/lib/utils/_dependencies/source/0x2/bcs/structs.d.ts +44 -0
  78. package/lib/utils/_dependencies/source/0x2/bcs/structs.js +227 -0
  79. package/lib/utils/_dependencies/source/0x2/bls12381/structs.d.ts +155 -0
  80. package/lib/utils/_dependencies/source/0x2/bls12381/structs.js +578 -0
  81. package/lib/utils/_dependencies/source/0x2/borrow/structs.d.ts +104 -0
  82. package/lib/utils/_dependencies/source/0x2/borrow/structs.js +353 -0
  83. package/lib/utils/_dependencies/source/0x2/clock/structs.d.ts +56 -0
  84. package/lib/utils/_dependencies/source/0x2/clock/structs.js +216 -0
  85. package/lib/utils/_dependencies/source/0x2/coin/structs.d.ts +379 -0
  86. package/lib/utils/_dependencies/source/0x2/coin/structs.js +924 -0
  87. package/lib/utils/_dependencies/source/0x2/deny-list/structs.d.ts +178 -0
  88. package/lib/utils/_dependencies/source/0x2/deny-list/structs.js +386 -0
  89. package/lib/utils/_dependencies/source/0x2/display/structs.d.ts +228 -0
  90. package/lib/utils/_dependencies/source/0x2/display/structs.js +498 -0
  91. package/lib/utils/_dependencies/source/0x2/dynamic-field/structs.d.ts +63 -0
  92. package/lib/utils/_dependencies/source/0x2/dynamic-field/structs.js +226 -0
  93. package/lib/utils/_dependencies/source/0x2/dynamic-object-field/structs.d.ts +42 -0
  94. package/lib/utils/_dependencies/source/0x2/dynamic-object-field/structs.js +208 -0
  95. package/lib/utils/_dependencies/source/0x2/groth16/structs.d.ts +186 -0
  96. package/lib/utils/_dependencies/source/0x2/groth16/structs.js +626 -0
  97. package/lib/utils/_dependencies/source/0x2/group-ops/structs.d.ts +44 -0
  98. package/lib/utils/_dependencies/source/0x2/group-ops/structs.js +229 -0
  99. package/lib/utils/_dependencies/source/0x2/index.d.ts +2 -0
  100. package/lib/utils/_dependencies/source/0x2/index.js +5 -0
  101. package/lib/utils/_dependencies/source/0x2/init.d.ts +2 -0
  102. package/lib/utils/_dependencies/source/0x2/init.js +151 -0
  103. package/lib/utils/_dependencies/source/0x2/kiosk/structs.d.ts +565 -0
  104. package/lib/utils/_dependencies/source/0x2/kiosk/structs.js +1501 -0
  105. package/lib/utils/_dependencies/source/0x2/kiosk-extension/structs.d.ts +112 -0
  106. package/lib/utils/_dependencies/source/0x2/kiosk-extension/structs.js +349 -0
  107. package/lib/utils/_dependencies/source/0x2/linked-table/structs.d.ts +144 -0
  108. package/lib/utils/_dependencies/source/0x2/linked-table/structs.js +380 -0
  109. package/lib/utils/_dependencies/source/0x2/object/structs.d.ts +83 -0
  110. package/lib/utils/_dependencies/source/0x2/object/structs.js +328 -0
  111. package/lib/utils/_dependencies/source/0x2/object-bag/structs.d.ts +56 -0
  112. package/lib/utils/_dependencies/source/0x2/object-bag/structs.js +210 -0
  113. package/lib/utils/_dependencies/source/0x2/object-table/structs.d.ts +56 -0
  114. package/lib/utils/_dependencies/source/0x2/object-table/structs.js +218 -0
  115. package/lib/utils/_dependencies/source/0x2/package/structs.d.ts +262 -0
  116. package/lib/utils/_dependencies/source/0x2/package/structs.js +682 -0
  117. package/lib/utils/_dependencies/source/0x2/priority-queue/structs.d.ts +101 -0
  118. package/lib/utils/_dependencies/source/0x2/priority-queue/structs.js +376 -0
  119. package/lib/utils/_dependencies/source/0x2/random/structs.d.ts +190 -0
  120. package/lib/utils/_dependencies/source/0x2/random/structs.js +533 -0
  121. package/lib/utils/_dependencies/source/0x2/sui/structs.d.ts +41 -0
  122. package/lib/utils/_dependencies/source/0x2/sui/structs.js +203 -0
  123. package/lib/utils/_dependencies/source/0x2/table/structs.d.ts +56 -0
  124. package/lib/utils/_dependencies/source/0x2/table/structs.js +218 -0
  125. package/lib/utils/_dependencies/source/0x2/table-vec/structs.d.ts +63 -0
  126. package/lib/utils/_dependencies/source/0x2/table-vec/structs.js +236 -0
  127. package/lib/utils/_dependencies/source/0x2/token/structs.d.ts +424 -0
  128. package/lib/utils/_dependencies/source/0x2/token/structs.js +937 -0
  129. package/lib/utils/_dependencies/source/0x2/transfer/structs.d.ts +52 -0
  130. package/lib/utils/_dependencies/source/0x2/transfer/structs.js +218 -0
  131. package/lib/utils/_dependencies/source/0x2/transfer-policy/structs.d.ts +345 -0
  132. package/lib/utils/_dependencies/source/0x2/transfer-policy/structs.js +923 -0
  133. package/lib/utils/_dependencies/source/0x2/tx-context/structs.d.ts +68 -0
  134. package/lib/utils/_dependencies/source/0x2/tx-context/structs.js +257 -0
  135. package/lib/utils/_dependencies/source/0x2/url/structs.d.ts +48 -0
  136. package/lib/utils/_dependencies/source/0x2/url/structs.js +204 -0
  137. package/lib/utils/_dependencies/source/0x2/vec-map/structs.d.ts +101 -0
  138. package/lib/utils/_dependencies/source/0x2/vec-map/structs.js +378 -0
  139. package/lib/utils/_dependencies/source/0x2/vec-set/structs.d.ts +45 -0
  140. package/lib/utils/_dependencies/source/0x2/vec-set/structs.js +232 -0
  141. package/lib/utils/_dependencies/source/0x2/versioned/structs.d.ts +104 -0
  142. package/lib/utils/_dependencies/source/0x2/versioned/structs.js +353 -0
  143. package/lib/utils/_dependencies/source/0x2/zklogin-verified-id/structs.d.ts +105 -0
  144. package/lib/utils/_dependencies/source/0x2/zklogin-verified-id/structs.js +241 -0
  145. package/lib/utils/_dependencies/source/0x2/zklogin-verified-issuer/structs.d.ts +69 -0
  146. package/lib/utils/_dependencies/source/0x2/zklogin-verified-issuer/structs.js +223 -0
  147. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +2 -0
  148. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +5 -0
  149. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +2 -0
  150. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +31 -0
  151. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +50 -0
  152. package/lib/utils/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +204 -0
  153. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +2 -0
  154. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +5 -0
  155. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +2 -0
  156. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +34 -0
  157. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +41 -0
  158. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +203 -0
  159. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +112 -0
  160. package/lib/utils/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +359 -0
  161. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/auto-bid/structs.d.ts +1404 -0
  162. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/auto-bid/structs.js +2581 -0
  163. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/index.d.ts +2 -0
  164. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/index.js +5 -0
  165. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/init.d.ts +2 -0
  166. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/init.js +131 -0
  167. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tails-staking/structs.d.ts +1201 -0
  168. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tails-staking/structs.js +2527 -0
  169. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-authorized-entry/structs.d.ts +1622 -0
  170. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-authorized-entry/structs.js +2192 -0
  171. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-fee-pool-entry/structs.d.ts +395 -0
  172. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-fee-pool-entry/structs.js +1094 -0
  173. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-registry-authorized-entry/structs.d.ts +994 -0
  174. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-registry-authorized-entry/structs.js +1358 -0
  175. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-view-function/structs.d.ts +77 -0
  176. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/tds-view-function/structs.js +245 -0
  177. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/typus-dov-single/structs.d.ts +4338 -0
  178. package/lib/utils/_dependencies/source/0x6cddbfa30141e0332f8995a12453fc2cb07a2fa3dad52b342493780c7784f455/typus-dov-single/structs.js +5821 -0
  179. package/lib/utils/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +2 -0
  180. package/lib/utils/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +5 -0
  181. package/lib/utils/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +2 -0
  182. package/lib/utils/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +5 -0
  183. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/ac-table/structs.d.ts +218 -0
  184. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/ac-table/structs.js +524 -0
  185. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/balance-bag/structs.d.ts +77 -0
  186. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/balance-bag/structs.js +217 -0
  187. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/index.d.ts +2 -0
  188. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/index.js +5 -0
  189. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/init.d.ts +2 -0
  190. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/init.js +46 -0
  191. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/one-time-lock-value/structs.d.ts +69 -0
  192. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/one-time-lock-value/structs.js +233 -0
  193. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/ownership/structs.d.ts +60 -0
  194. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/ownership/structs.js +218 -0
  195. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/supply-bag/structs.d.ts +77 -0
  196. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/supply-bag/structs.js +217 -0
  197. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/wit-table/structs.d.ts +103 -0
  198. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/wit-table/structs.js +259 -0
  199. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/witness/structs.d.ts +79 -0
  200. package/lib/utils/_dependencies/source/0x779b5c547976899f5474f3a5bc0db36ddf4697ad7e5a901db0415c2281d28162/witness/structs.js +332 -0
  201. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/index.d.ts +2 -0
  202. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/index.js +5 -0
  203. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/init.d.ts +2 -0
  204. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/init.js +40 -0
  205. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/oracle/structs.d.ts +277 -0
  206. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/oracle/structs.js +553 -0
  207. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/pyth-parser/structs.d.ts +102 -0
  208. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/pyth-parser/structs.js +353 -0
  209. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/supra/structs.d.ts +65 -0
  210. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/supra/structs.js +233 -0
  211. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/switchboard-feed-parser/structs.d.ts +65 -0
  212. package/lib/utils/_dependencies/source/0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a/switchboard-feed-parser/structs.js +233 -0
  213. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +83 -0
  214. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +192 -0
  215. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +333 -0
  216. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +382 -0
  217. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +68 -0
  218. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +176 -0
  219. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +843 -0
  220. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +959 -0
  221. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +41 -0
  222. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +167 -0
  223. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +2 -0
  224. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +5 -0
  225. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +2 -0
  226. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +80 -0
  227. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +146 -0
  228. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +274 -0
  229. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +2272 -0
  230. package/lib/utils/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +4465 -0
  231. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +719 -0
  232. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +1107 -0
  233. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +2 -0
  234. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +5 -0
  235. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +2 -0
  236. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +44 -0
  237. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +81 -0
  238. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +258 -0
  239. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +53 -0
  240. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +221 -0
  241. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +115 -0
  242. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +294 -0
  243. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +50 -0
  244. package/lib/utils/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +204 -0
  245. package/lib/utils/_dependencies/source/0x9c564002970ce40370b0c1a8328d2e91924dab43ca2cb483af67aaf0f7cbe44e/index.d.ts +2 -0
  246. package/lib/utils/_dependencies/source/0x9c564002970ce40370b0c1a8328d2e91924dab43ca2cb483af67aaf0f7cbe44e/index.js +5 -0
  247. package/lib/utils/_dependencies/source/0x9c564002970ce40370b0c1a8328d2e91924dab43ca2cb483af67aaf0f7cbe44e/init.d.ts +2 -0
  248. package/lib/utils/_dependencies/source/0x9c564002970ce40370b0c1a8328d2e91924dab43ca2cb483af67aaf0f7cbe44e/init.js +5 -0
  249. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/authority/structs.d.ts +83 -0
  250. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/authority/structs.js +234 -0
  251. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/balance-pool/structs.d.ts +333 -0
  252. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/balance-pool/structs.js +528 -0
  253. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/big-vector/structs.d.ts +68 -0
  254. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/big-vector/structs.js +230 -0
  255. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/dutch/structs.d.ts +843 -0
  256. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/dutch/structs.js +1573 -0
  257. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/i64/structs.d.ts +41 -0
  258. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/i64/structs.js +203 -0
  259. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/index.d.ts +2 -0
  260. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/index.js +5 -0
  261. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/init.d.ts +2 -0
  262. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/init.js +80 -0
  263. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/linked-list/structs.d.ts +146 -0
  264. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/linked-list/structs.js +386 -0
  265. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/vault/structs.d.ts +2272 -0
  266. package/lib/utils/_dependencies/source/0xa2de2f04907b77ef03800a8969bb4f88c821737ee133aba4bc0485b267ad2118/vault/structs.js +4465 -0
  267. package/lib/utils/_dependencies/source/0xad013d5fde39e15eabda32b3dbdafd67dac32b798ce63237c27a8f73339b9b6f/index.d.ts +2 -0
  268. package/lib/utils/_dependencies/source/0xad013d5fde39e15eabda32b3dbdafd67dac32b798ce63237c27a8f73339b9b6f/index.js +5 -0
  269. package/lib/utils/_dependencies/source/0xad013d5fde39e15eabda32b3dbdafd67dac32b798ce63237c27a8f73339b9b6f/init.d.ts +2 -0
  270. package/lib/utils/_dependencies/source/0xad013d5fde39e15eabda32b3dbdafd67dac32b798ce63237c27a8f73339b9b6f/init.js +5 -0
  271. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +2 -0
  272. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +5 -0
  273. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.d.ts +2 -0
  274. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +37 -0
  275. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +79 -0
  276. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +328 -0
  277. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +85 -0
  278. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.js +340 -0
  279. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +41 -0
  280. package/lib/utils/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +205 -0
  281. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/coin-decimals-registry/structs.d.ts +174 -0
  282. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/coin-decimals-registry/structs.js +511 -0
  283. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/index.d.ts +2 -0
  284. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/index.js +5 -0
  285. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/init.d.ts +2 -0
  286. package/lib/utils/_dependencies/source/0xca5a5a62f01c79a104bf4d31669e29daa387f325c241de4edbe30986a9bc8b0d/init.js +33 -0
  287. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes20/structs.d.ts +44 -0
  288. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes20/structs.js +227 -0
  289. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes32/structs.d.ts +44 -0
  290. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes32/structs.js +227 -0
  291. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/consumed-vaas/structs.d.ts +72 -0
  292. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/consumed-vaas/structs.js +231 -0
  293. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/cursor/structs.d.ts +45 -0
  294. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/cursor/structs.js +232 -0
  295. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.d.ts +140 -0
  296. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.js +466 -0
  297. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/external-address/structs.d.ts +52 -0
  298. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/external-address/structs.js +204 -0
  299. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/fee-collector/structs.d.ts +58 -0
  300. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/fee-collector/structs.js +241 -0
  301. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.d.ts +158 -0
  302. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.js +406 -0
  303. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian/structs.d.ts +52 -0
  304. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian/structs.js +204 -0
  305. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-set/structs.d.ts +75 -0
  306. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-set/structs.js +246 -0
  307. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-signature/structs.d.ts +80 -0
  308. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-signature/structs.js +228 -0
  309. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.d.ts +2 -0
  310. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.js +5 -0
  311. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/init.d.ts +2 -0
  312. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/init.js +91 -0
  313. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/migrate/structs.d.ts +46 -0
  314. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/migrate/structs.js +204 -0
  315. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.d.ts +177 -0
  316. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.js +592 -0
  317. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.d.ts +141 -0
  318. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.js +413 -0
  319. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set/structs.d.ts +101 -0
  320. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set/structs.js +361 -0
  321. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set-fee/structs.d.ts +79 -0
  322. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set-fee/structs.js +328 -0
  323. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/setup/structs.d.ts +50 -0
  324. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/setup/structs.js +204 -0
  325. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.d.ts +269 -0
  326. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.js +413 -0
  327. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/transfer-fee/structs.d.ts +85 -0
  328. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/transfer-fee/structs.js +340 -0
  329. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/update-guardian-set/structs.d.ts +145 -0
  330. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/update-guardian-set/structs.js +490 -0
  331. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.d.ts +143 -0
  332. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.js +467 -0
  333. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/vaa/structs.d.ts +122 -0
  334. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/vaa/structs.js +283 -0
  335. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/version-control/structs.d.ts +79 -0
  336. package/lib/utils/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/version-control/structs.js +328 -0
  337. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/batch-price-attestation/structs.d.ts +279 -0
  338. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/batch-price-attestation/structs.js +407 -0
  339. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/contract-upgrade/structs.d.ts +105 -0
  340. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/contract-upgrade/structs.js +342 -0
  341. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/data-source/structs.d.ts +66 -0
  342. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/data-source/structs.js +216 -0
  343. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/event/structs.d.ts +200 -0
  344. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/event/structs.js +341 -0
  345. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance/structs.d.ts +67 -0
  346. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance/structs.js +246 -0
  347. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-action/structs.d.ts +41 -0
  348. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-action/structs.js +203 -0
  349. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-instruction/structs.d.ts +71 -0
  350. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-instruction/structs.js +252 -0
  351. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/hot-potato-vector/structs.d.ts +45 -0
  352. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/hot-potato-vector/structs.js +232 -0
  353. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/i64/structs.d.ts +47 -0
  354. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/i64/structs.js +215 -0
  355. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.d.ts +2 -0
  356. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.js +5 -0
  357. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/init.d.ts +2 -0
  358. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/init.js +85 -0
  359. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/migrate/structs.d.ts +46 -0
  360. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/migrate/structs.js +204 -0
  361. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price/structs.d.ts +84 -0
  362. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price/structs.js +228 -0
  363. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-feed/structs.d.ts +153 -0
  364. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-feed/structs.js +223 -0
  365. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-identifier/structs.d.ts +44 -0
  366. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-identifier/structs.js +227 -0
  367. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-info/structs.d.ts +351 -0
  368. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-info/structs.js +360 -0
  369. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-status/structs.d.ts +41 -0
  370. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-status/structs.js +203 -0
  371. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set/structs.d.ts +110 -0
  372. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set/structs.js +370 -0
  373. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-data-sources/structs.d.ts +75 -0
  374. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-data-sources/structs.js +228 -0
  375. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-fee-recipient/structs.d.ts +41 -0
  376. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-fee-recipient/structs.js +203 -0
  377. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-governance-data-source/structs.d.ts +72 -0
  378. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-governance-data-source/structs.js +222 -0
  379. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-stale-price-threshold/structs.d.ts +41 -0
  380. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-stale-price-threshold/structs.js +203 -0
  381. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-update-fee/structs.d.ts +47 -0
  382. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-update-fee/structs.js +215 -0
  383. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/setup/structs.d.ts +50 -0
  384. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/setup/structs.js +204 -0
  385. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.d.ts +269 -0
  386. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.js +507 -0
  387. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.d.ts +79 -0
  388. package/lib/utils/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.js +328 -0
  389. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/admin/structs.d.ts +215 -0
  390. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/admin/structs.js +533 -0
  391. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/index.d.ts +2 -0
  392. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/index.js +5 -0
  393. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/init.d.ts +2 -0
  394. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/init.js +44 -0
  395. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/rewards-pool/structs.d.ts +93 -0
  396. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/rewards-pool/structs.js +243 -0
  397. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/spool/structs.d.ts +125 -0
  398. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/spool/structs.js +271 -0
  399. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/spool-account/structs.d.ts +114 -0
  400. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/spool-account/structs.js +250 -0
  401. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/user/structs.d.ts +413 -0
  402. package/lib/utils/_dependencies/source/0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a/user/structs.js +754 -0
  403. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/app/structs.d.ts +210 -0
  404. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/app/structs.js +392 -0
  405. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/asset-active-state/structs.d.ts +250 -0
  406. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/asset-active-state/structs.js +491 -0
  407. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/borrow/structs.d.ts +85 -0
  408. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/borrow/structs.js +235 -0
  409. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/borrow-dynamics/structs.d.ts +106 -0
  410. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/borrow-dynamics/structs.js +353 -0
  411. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/collateral-stats/structs.d.ts +79 -0
  412. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/collateral-stats/structs.js +328 -0
  413. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/deposit-collateral/structs.d.ts +79 -0
  414. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/deposit-collateral/structs.js +229 -0
  415. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/flash-loan/structs.d.ts +132 -0
  416. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/flash-loan/structs.js +365 -0
  417. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/incentive-rewards/structs.d.ts +109 -0
  418. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/incentive-rewards/structs.js +342 -0
  419. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/index.d.ts +2 -0
  420. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/index.js +5 -0
  421. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/init.d.ts +2 -0
  422. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/init.js +114 -0
  423. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/interest-model/structs.d.ts +571 -0
  424. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/interest-model/structs.js +682 -0
  425. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/limiter/structs.d.ts +591 -0
  426. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/limiter/structs.js +1360 -0
  427. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/liquidate/structs.d.ts +111 -0
  428. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/liquidate/structs.js +247 -0
  429. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/lock-obligation/structs.d.ts +67 -0
  430. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/lock-obligation/structs.js +217 -0
  431. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/market/structs.d.ts +854 -0
  432. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/market/structs.js +293 -0
  433. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/mint/structs.d.ts +100 -0
  434. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/mint/structs.js +240 -0
  435. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation/structs.d.ts +628 -0
  436. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation/structs.js +1010 -0
  437. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-access/structs.d.ts +92 -0
  438. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-access/structs.js +224 -0
  439. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-collaterals/structs.d.ts +79 -0
  440. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-collaterals/structs.js +328 -0
  441. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-debts/structs.d.ts +85 -0
  442. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/obligation-debts/structs.js +340 -0
  443. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/open-obligation/structs.d.ts +104 -0
  444. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/open-obligation/structs.js +347 -0
  445. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/redeem/structs.d.ts +100 -0
  446. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/redeem/structs.js +240 -0
  447. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/repay/structs.d.ts +85 -0
  448. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/repay/structs.js +235 -0
  449. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/reserve/structs.d.ts +497 -0
  450. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/reserve/structs.js +927 -0
  451. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/risk-model/structs.d.ts +443 -0
  452. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/risk-model/structs.js +658 -0
  453. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/version/structs.d.ts +102 -0
  454. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/version/structs.js +335 -0
  455. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/withdraw-collateral/structs.d.ts +79 -0
  456. package/lib/utils/_dependencies/source/0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf/withdraw-collateral/structs.js +229 -0
  457. package/lib/utils/_framework/init-source.d.ts +1 -0
  458. package/lib/utils/_framework/init-source.js +81 -0
  459. package/lib/utils/_framework/loader.d.ts +17 -0
  460. package/lib/utils/_framework/loader.js +99 -0
  461. package/lib/utils/_framework/reified.d.ts +100 -0
  462. package/lib/utils/_framework/reified.js +263 -0
  463. package/lib/utils/_framework/util.d.ts +53 -0
  464. package/lib/utils/_framework/util.js +252 -0
  465. package/lib/utils/airdrop/authority-entry.d.ts +22 -0
  466. package/lib/utils/airdrop/authority-entry.js +138 -0
  467. package/lib/utils/airdrop/user-entry.d.ts +10 -0
  468. package/lib/utils/airdrop/user-entry.js +21 -0
  469. package/lib/utils/airdrop/view-functions.d.ts +10 -0
  470. package/lib/utils/airdrop/view-functions.js +72 -0
  471. package/lib/utils/api/defillama/tvl.d.ts +1 -0
  472. package/lib/utils/api/defillama/tvl.js +59 -0
  473. package/lib/utils/{leader-board.d.ts → api/sentio/leader-board.d.ts} +0 -7
  474. package/lib/utils/api/sentio/leader-board.js +104 -0
  475. package/lib/utils/api/sentio/reward-generated.d.ts +16 -0
  476. package/lib/utils/api/sentio/reward-generated.js +524 -0
  477. package/lib/utils/leaderboard/authority-entry.d.ts +22 -0
  478. package/lib/utils/leaderboard/authority-entry.js +91 -0
  479. package/lib/utils/leaderboard/view-function.d.ts +21 -0
  480. package/lib/utils/leaderboard/view-function.js +92 -0
  481. package/lib/utils/locked-period-vault/index.d.ts +3 -0
  482. package/lib/utils/locked-period-vault/index.js +6 -0
  483. package/lib/utils/locked-period-vault/init.d.ts +2 -0
  484. package/lib/utils/locked-period-vault/init.js +44 -0
  485. package/lib/utils/locked-period-vault/locked-period-vault/functions.d.ts +137 -0
  486. package/lib/utils/locked-period-vault/locked-period-vault/functions.js +264 -0
  487. package/lib/utils/locked-period-vault/locked-period-vault/structs.d.ts +1236 -0
  488. package/lib/utils/locked-period-vault/locked-period-vault/structs.js +2400 -0
  489. package/lib/utils/nft-staking/user-entry.d.ts +8 -7
  490. package/lib/utils/nft-staking/user-entry.js +199 -62
  491. package/lib/utils/price.js +3 -1
  492. package/lib/utils/recap2023.js +3 -6
  493. package/lib/utils/tails-exp-dice/fetch.js +1 -1
  494. package/lib/utils/token.js +6 -0
  495. package/lib/utils/tools.d.ts +4 -0
  496. package/lib/utils/tools.js +26 -1
  497. package/lib/utils/typus-dov-single-v2/authorized-entry.js +2 -2
  498. package/lib/utils/typus-dov-single-v2/depositorPnl.js +1 -1
  499. package/lib/utils/typus-dov-single-v2/function/bidding.d.ts +151 -0
  500. package/lib/utils/typus-dov-single-v2/function/bidding.js +834 -0
  501. package/lib/utils/typus-dov-single-v2/function/token.d.ts +21 -0
  502. package/lib/utils/typus-dov-single-v2/function/token.js +38 -0
  503. package/lib/utils/typus-dov-single-v2/function/vault.d.ts +8 -0
  504. package/lib/utils/typus-dov-single-v2/function/vault.js +23 -0
  505. package/lib/utils/typus-dov-single-v2/mfud-user-entry.d.ts +51 -63
  506. package/lib/utils/typus-dov-single-v2/mfud-user-entry.js +171 -231
  507. package/lib/utils/typus-dov-single-v2/user-entry.d.ts +65 -115
  508. package/lib/utils/typus-dov-single-v2/user-entry.js +141 -335
  509. package/lib/utils/typus-dov-single-v2/user-history.d.ts +11 -5
  510. package/lib/utils/typus-dov-single-v2/user-history.js +430 -169
  511. package/lib/utils/typus-dov-single-v2/view-function.d.ts +16 -2
  512. package/lib/utils/typus-dov-single-v2/view-function.js +39 -24
  513. package/lib/utils/typus-nft/fetch.d.ts +13 -8
  514. package/lib/utils/typus-nft/fetch.js +81 -39
  515. package/lib/utils/typus_perp/admin/functions.d.ts +18 -0
  516. package/lib/utils/typus_perp/admin/functions.js +43 -0
  517. package/lib/utils/typus_perp/admin/structs.d.ts +371 -0
  518. package/lib/utils/typus_perp/admin/structs.js +796 -0
  519. package/lib/utils/typus_perp/critbit/functions.d.ts +101 -0
  520. package/lib/utils/typus_perp/critbit/functions.js +186 -0
  521. package/lib/utils/typus_perp/critbit/structs.d.ts +226 -0
  522. package/lib/utils/typus_perp/critbit/structs.js +572 -0
  523. package/lib/utils/typus_perp/index.d.ts +2 -0
  524. package/lib/utils/typus_perp/index.js +5 -0
  525. package/lib/utils/typus_perp/init.d.ts +2 -0
  526. package/lib/utils/typus_perp/init.js +121 -0
  527. package/lib/utils/typus_perp/lp-pool/functions.d.ts +231 -0
  528. package/lib/utils/typus_perp/lp-pool/functions.js +346 -0
  529. package/lib/utils/typus_perp/lp-pool/structs.d.ts +2232 -0
  530. package/lib/utils/typus_perp/lp-pool/structs.js +3300 -0
  531. package/lib/utils/typus_perp/math/functions.d.ts +16 -0
  532. package/lib/utils/typus_perp/math/functions.js +33 -0
  533. package/lib/utils/typus_perp/oracle/functions.d.ts +14 -0
  534. package/lib/utils/typus_perp/oracle/functions.js +23 -0
  535. package/lib/utils/typus_perp/oracle/structs.d.ts +102 -0
  536. package/lib/utils/typus_perp/oracle/structs.js +353 -0
  537. package/lib/utils/typus_perp/position/functions.d.ts +189 -0
  538. package/lib/utils/typus_perp/position/functions.js +307 -0
  539. package/lib/utils/typus_perp/position/structs.d.ts +588 -0
  540. package/lib/utils/typus_perp/position/structs.js +763 -0
  541. package/lib/utils/typus_perp/stake-pool/functions.d.ts +180 -0
  542. package/lib/utils/typus_perp/stake-pool/functions.js +276 -0
  543. package/lib/utils/typus_perp/stake-pool/structs.d.ts +2089 -0
  544. package/lib/utils/typus_perp/stake-pool/structs.js +3539 -0
  545. package/lib/utils/typus_perp/symbol/functions.d.ts +10 -0
  546. package/lib/utils/typus_perp/symbol/functions.js +21 -0
  547. package/lib/utils/typus_perp/symbol/structs.d.ts +76 -0
  548. package/lib/utils/typus_perp/symbol/structs.js +216 -0
  549. package/lib/utils/typus_perp/tlp/functions.d.ts +20 -0
  550. package/lib/utils/typus_perp/tlp/functions.js +36 -0
  551. package/lib/utils/typus_perp/tlp/structs.d.ts +88 -0
  552. package/lib/utils/typus_perp/tlp/structs.js +329 -0
  553. package/lib/utils/typus_perp/token-interface/functions.d.ts +12 -0
  554. package/lib/utils/typus_perp/token-interface/functions.js +21 -0
  555. package/lib/utils/typus_perp/trading/functions.d.ts +234 -0
  556. package/lib/utils/typus_perp/trading/functions.js +329 -0
  557. package/lib/utils/typus_perp/trading/structs.d.ts +2305 -0
  558. package/lib/utils/typus_perp/trading/structs.js +3792 -0
  559. package/lib/utils/typus_perp/treasury-caps/functions.d.ts +10 -0
  560. package/lib/utils/typus_perp/treasury-caps/functions.js +33 -0
  561. package/lib/utils/typus_perp/treasury-caps/structs.d.ts +50 -0
  562. package/lib/utils/typus_perp/treasury-caps/structs.js +204 -0
  563. package/lib/utils/typus_perp/utils/functions.d.ts +24 -0
  564. package/lib/utils/typus_perp/utils/functions.js +41 -0
  565. package/lib/utils/user/view-function.d.ts +9 -0
  566. package/lib/utils/user/view-function.js +72 -0
  567. package/package.json +8 -5
  568. package/lib/utils/leader-board.js +0 -333
  569. package/lib/utils/typus-dov-double/authorized-entry.d.ts +0 -102
  570. package/lib/utils/typus-dov-double/authorized-entry.js +0 -295
  571. package/lib/utils/typus-dov-double/manager-entry.d.ts +0 -219
  572. package/lib/utils/typus-dov-double/manager-entry.js +0 -584
  573. package/lib/utils/typus-dov-double/portfolio-vault.d.ts +0 -68
  574. package/lib/utils/typus-dov-double/portfolio-vault.js +0 -303
  575. package/lib/utils/typus-dov-double/user-entry.d.ts +0 -93
  576. package/lib/utils/typus-dov-double/user-entry.js +0 -280
  577. package/lib/utils/typus-dov-double/view-function.d.ts +0 -11
  578. package/lib/utils/typus-dov-double/view-function.js +0 -213
  579. package/lib/utils/typus-dov-single/db-data.d.ts +0 -19
  580. package/lib/utils/typus-dov-single/db-data.js +0 -226
  581. package/lib/utils/typus-dov-single/portfolio-vault.d.ts +0 -63
  582. package/lib/utils/typus-dov-single/portfolio-vault.js +0 -284
  583. package/lib/utils/typus-dov-single/registry.d.ts +0 -14
  584. package/lib/utils/typus-dov-single/registry.js +0 -126
  585. package/lib/utils/typus-dov-single/user-entry.d.ts +0 -103
  586. package/lib/utils/typus-dov-single/user-entry.js +0 -388
  587. package/lib/utils/typus-dov-single/user-history.d.ts +0 -17
  588. package/lib/utils/typus-dov-single/user-history.js +0 -146
  589. package/lib/utils/typus-dov-single/view-function.d.ts +0 -50
  590. package/lib/utils/typus-dov-single/view-function.js +0 -444
@@ -0,0 +1,3300 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __generator = (this && this.__generator) || function (thisArg, body) {
46
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
+ function verb(n) { return function (v) { return step([n, v]); }; }
49
+ function step(op) {
50
+ if (f) throw new TypeError("Generator is already executing.");
51
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
52
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
+ if (y = 0, t) op = [op[0] & 2, t.value];
54
+ switch (op[0]) {
55
+ case 0: case 1: t = op; break;
56
+ case 4: _.label++; return { value: op[1], done: false };
57
+ case 5: _.label++; y = op[1]; op = [0]; continue;
58
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
+ default:
60
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
+ if (t[2]) _.ops.pop();
65
+ _.trys.pop(); continue;
66
+ }
67
+ op = body.call(thisArg, _);
68
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
+ }
71
+ };
72
+ var __read = (this && this.__read) || function (o, n) {
73
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
74
+ if (!m) return o;
75
+ var i = m.call(o), r, ar = [], e;
76
+ try {
77
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
78
+ }
79
+ catch (error) { e = { error: error }; }
80
+ finally {
81
+ try {
82
+ if (r && !r.done && (m = i["return"])) m.call(i);
83
+ }
84
+ finally { if (e) throw e.error; }
85
+ }
86
+ return ar;
87
+ };
88
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
89
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
90
+ if (ar || !(i in from)) {
91
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
92
+ ar[i] = from[i];
93
+ }
94
+ }
95
+ return to.concat(ar || Array.prototype.slice.call(from));
96
+ };
97
+ Object.defineProperty(exports, "__esModule", { value: true });
98
+ exports.UpdateSpotConfigEvent = exports.isUpdateSpotConfigEvent = exports.UpdateMarginConfigEvent = exports.isUpdateMarginConfigEvent = exports.UpdateFundingInfoEvent = exports.isUpdateFundingInfoEvent = exports.TokenPool = exports.isTokenPool = exports.SwapEvent = exports.isSwapEvent = exports.SuspendTokenPoolEvent = exports.isSuspendTokenPoolEvent = exports.SuspendPoolEvent = exports.isSuspendPoolEvent = exports.SpotConfig = exports.isSpotConfig = exports.ResumeTokenPoolEvent = exports.isResumeTokenPoolEvent = exports.ResumePoolEvent = exports.isResumePoolEvent = exports.Registry = exports.isRegistry = exports.NewLiquidityPoolEvent = exports.isNewLiquidityPoolEvent = exports.MintLpEvent = exports.isMintLpEvent = exports.MarginConfig = exports.isMarginConfig = exports.LiquidityPoolInfo = exports.isLiquidityPoolInfo = exports.LiquidityPool = exports.isLiquidityPool = exports.Config = exports.isConfig = exports.BurnLpEvent = exports.isBurnLpEvent = exports.AddLiquidityTokenEvent = exports.isAddLiquidityTokenEvent = exports.State = exports.isState = void 0;
99
+ var reified = __importStar(require("../../_framework/reified"));
100
+ var structs_1 = require("../../_dependencies/source/0x1/type-name/structs");
101
+ var structs_2 = require("../../_dependencies/source/0x2/object/structs");
102
+ var reified_1 = require("../../_framework/reified");
103
+ var util_1 = require("../../_framework/util");
104
+ var bcs_1 = require("@mysten/bcs");
105
+ /* ============================== State =============================== */
106
+ function isState(type) {
107
+ type = (0, util_1.compressSuiType)(type);
108
+ return type === "0x0::lp_pool::State";
109
+ }
110
+ exports.isState = isState;
111
+ var State = /** @class */ (function () {
112
+ function State(typeArgs, fields) {
113
+ this.$typeName = State.$typeName;
114
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([State.$typeName], __read(typeArgs), false));
115
+ this.$typeArgs = typeArgs;
116
+ this.liquidityAmount = fields.liquidityAmount;
117
+ this.valueInUsd = fields.valueInUsd;
118
+ this.reservedAmount = fields.reservedAmount;
119
+ this.updateTsMs = fields.updateTsMs;
120
+ this.lastFundingTsMs = fields.lastFundingTsMs;
121
+ this.cumulativeFundingRate = fields.cumulativeFundingRate;
122
+ this.isActive = fields.isActive;
123
+ this.u64Padding = fields.u64Padding;
124
+ }
125
+ State.reified = function () {
126
+ var _this = this;
127
+ return {
128
+ typeName: State.$typeName,
129
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([State.$typeName], [], false)),
130
+ typeArgs: [],
131
+ reifiedTypeArgs: [],
132
+ fromFields: function (fields) { return State.fromFields(fields); },
133
+ fromFieldsWithTypes: function (item) { return State.fromFieldsWithTypes(item); },
134
+ fromBcs: function (data) { return State.fromBcs(data); },
135
+ bcs: State.bcs,
136
+ fromJSONField: function (field) { return State.fromJSONField(field); },
137
+ fromJSON: function (json) { return State.fromJSON(json); },
138
+ fromSuiParsedData: function (content) { return State.fromSuiParsedData(content); },
139
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
140
+ return [2 /*return*/, State.fetch(client, id)];
141
+ }); }); },
142
+ new: function (fields) {
143
+ return new State([], fields);
144
+ },
145
+ kind: "StructClassReified",
146
+ };
147
+ };
148
+ Object.defineProperty(State, "r", {
149
+ get: function () {
150
+ return State.reified();
151
+ },
152
+ enumerable: false,
153
+ configurable: true
154
+ });
155
+ State.phantom = function () {
156
+ return (0, reified_1.phantom)(State.reified());
157
+ };
158
+ Object.defineProperty(State, "p", {
159
+ get: function () {
160
+ return State.phantom();
161
+ },
162
+ enumerable: false,
163
+ configurable: true
164
+ });
165
+ Object.defineProperty(State, "bcs", {
166
+ get: function () {
167
+ return bcs_1.bcs.struct("State", {
168
+ liquidity_amount: bcs_1.bcs.u64(),
169
+ value_in_usd: bcs_1.bcs.u64(),
170
+ reserved_amount: bcs_1.bcs.u64(),
171
+ update_ts_ms: bcs_1.bcs.u64(),
172
+ last_funding_ts_ms: bcs_1.bcs.u64(),
173
+ cumulative_funding_rate: bcs_1.bcs.u64(),
174
+ is_active: bcs_1.bcs.bool(),
175
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
176
+ });
177
+ },
178
+ enumerable: false,
179
+ configurable: true
180
+ });
181
+ State.fromFields = function (fields) {
182
+ return State.reified().new({
183
+ liquidityAmount: (0, reified_1.decodeFromFields)("u64", fields.liquidity_amount),
184
+ valueInUsd: (0, reified_1.decodeFromFields)("u64", fields.value_in_usd),
185
+ reservedAmount: (0, reified_1.decodeFromFields)("u64", fields.reserved_amount),
186
+ updateTsMs: (0, reified_1.decodeFromFields)("u64", fields.update_ts_ms),
187
+ lastFundingTsMs: (0, reified_1.decodeFromFields)("u64", fields.last_funding_ts_ms),
188
+ cumulativeFundingRate: (0, reified_1.decodeFromFields)("u64", fields.cumulative_funding_rate),
189
+ isActive: (0, reified_1.decodeFromFields)("bool", fields.is_active),
190
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
191
+ });
192
+ };
193
+ State.fromFieldsWithTypes = function (item) {
194
+ if (!isState(item.type)) {
195
+ throw new Error("not a State type");
196
+ }
197
+ return State.reified().new({
198
+ liquidityAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.liquidity_amount),
199
+ valueInUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value_in_usd),
200
+ reservedAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.reserved_amount),
201
+ updateTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.update_ts_ms),
202
+ lastFundingTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.last_funding_ts_ms),
203
+ cumulativeFundingRate: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.cumulative_funding_rate),
204
+ isActive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_active),
205
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
206
+ });
207
+ };
208
+ State.fromBcs = function (data) {
209
+ return State.fromFields(State.bcs.parse(data));
210
+ };
211
+ State.prototype.toJSONField = function () {
212
+ return {
213
+ liquidityAmount: this.liquidityAmount.toString(),
214
+ valueInUsd: this.valueInUsd.toString(),
215
+ reservedAmount: this.reservedAmount.toString(),
216
+ updateTsMs: this.updateTsMs.toString(),
217
+ lastFundingTsMs: this.lastFundingTsMs.toString(),
218
+ cumulativeFundingRate: this.cumulativeFundingRate.toString(),
219
+ isActive: this.isActive,
220
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
221
+ };
222
+ };
223
+ State.prototype.toJSON = function () {
224
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
225
+ };
226
+ State.fromJSONField = function (field) {
227
+ return State.reified().new({
228
+ liquidityAmount: (0, reified_1.decodeFromJSONField)("u64", field.liquidityAmount),
229
+ valueInUsd: (0, reified_1.decodeFromJSONField)("u64", field.valueInUsd),
230
+ reservedAmount: (0, reified_1.decodeFromJSONField)("u64", field.reservedAmount),
231
+ updateTsMs: (0, reified_1.decodeFromJSONField)("u64", field.updateTsMs),
232
+ lastFundingTsMs: (0, reified_1.decodeFromJSONField)("u64", field.lastFundingTsMs),
233
+ cumulativeFundingRate: (0, reified_1.decodeFromJSONField)("u64", field.cumulativeFundingRate),
234
+ isActive: (0, reified_1.decodeFromJSONField)("bool", field.isActive),
235
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
236
+ });
237
+ };
238
+ State.fromJSON = function (json) {
239
+ if (json.$typeName !== State.$typeName) {
240
+ throw new Error("not a WithTwoGenerics json object");
241
+ }
242
+ return State.fromJSONField(json);
243
+ };
244
+ State.fromSuiParsedData = function (content) {
245
+ if (content.dataType !== "moveObject") {
246
+ throw new Error("not an object");
247
+ }
248
+ if (!isState(content.type)) {
249
+ throw new Error("object at ".concat(content.fields.id, " is not a State object"));
250
+ }
251
+ return State.fromFieldsWithTypes(content);
252
+ };
253
+ State.fetch = function (client, id) {
254
+ return __awaiter(this, void 0, void 0, function () {
255
+ var res;
256
+ var _a, _b;
257
+ return __generator(this, function (_c) {
258
+ switch (_c.label) {
259
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
260
+ case 1:
261
+ res = _c.sent();
262
+ if (res.error) {
263
+ throw new Error("error fetching State object at id ".concat(id, ": ").concat(res.error.code));
264
+ }
265
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isState(res.data.bcs.type)) {
266
+ throw new Error("object at id ".concat(id, " is not a State object"));
267
+ }
268
+ return [2 /*return*/, State.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
269
+ }
270
+ });
271
+ });
272
+ };
273
+ State.$typeName = "0x0::lp_pool::State";
274
+ State.$numTypeParams = 0;
275
+ return State;
276
+ }());
277
+ exports.State = State;
278
+ /* ============================== AddLiquidityTokenEvent =============================== */
279
+ function isAddLiquidityTokenEvent(type) {
280
+ type = (0, util_1.compressSuiType)(type);
281
+ return type === "0x0::lp_pool::AddLiquidityTokenEvent";
282
+ }
283
+ exports.isAddLiquidityTokenEvent = isAddLiquidityTokenEvent;
284
+ var AddLiquidityTokenEvent = /** @class */ (function () {
285
+ function AddLiquidityTokenEvent(typeArgs, fields) {
286
+ this.$typeName = AddLiquidityTokenEvent.$typeName;
287
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([AddLiquidityTokenEvent.$typeName], __read(typeArgs), false));
288
+ this.$typeArgs = typeArgs;
289
+ this.sender = fields.sender;
290
+ this.index = fields.index;
291
+ this.tokenType = fields.tokenType;
292
+ this.config = fields.config;
293
+ this.state = fields.state;
294
+ this.u64Padding = fields.u64Padding;
295
+ }
296
+ AddLiquidityTokenEvent.reified = function () {
297
+ var _this = this;
298
+ return {
299
+ typeName: AddLiquidityTokenEvent.$typeName,
300
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([AddLiquidityTokenEvent.$typeName], [], false)),
301
+ typeArgs: [],
302
+ reifiedTypeArgs: [],
303
+ fromFields: function (fields) { return AddLiquidityTokenEvent.fromFields(fields); },
304
+ fromFieldsWithTypes: function (item) { return AddLiquidityTokenEvent.fromFieldsWithTypes(item); },
305
+ fromBcs: function (data) { return AddLiquidityTokenEvent.fromBcs(data); },
306
+ bcs: AddLiquidityTokenEvent.bcs,
307
+ fromJSONField: function (field) { return AddLiquidityTokenEvent.fromJSONField(field); },
308
+ fromJSON: function (json) { return AddLiquidityTokenEvent.fromJSON(json); },
309
+ fromSuiParsedData: function (content) { return AddLiquidityTokenEvent.fromSuiParsedData(content); },
310
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
311
+ return [2 /*return*/, AddLiquidityTokenEvent.fetch(client, id)];
312
+ }); }); },
313
+ new: function (fields) {
314
+ return new AddLiquidityTokenEvent([], fields);
315
+ },
316
+ kind: "StructClassReified",
317
+ };
318
+ };
319
+ Object.defineProperty(AddLiquidityTokenEvent, "r", {
320
+ get: function () {
321
+ return AddLiquidityTokenEvent.reified();
322
+ },
323
+ enumerable: false,
324
+ configurable: true
325
+ });
326
+ AddLiquidityTokenEvent.phantom = function () {
327
+ return (0, reified_1.phantom)(AddLiquidityTokenEvent.reified());
328
+ };
329
+ Object.defineProperty(AddLiquidityTokenEvent, "p", {
330
+ get: function () {
331
+ return AddLiquidityTokenEvent.phantom();
332
+ },
333
+ enumerable: false,
334
+ configurable: true
335
+ });
336
+ Object.defineProperty(AddLiquidityTokenEvent, "bcs", {
337
+ get: function () {
338
+ return bcs_1.bcs.struct("AddLiquidityTokenEvent", {
339
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
340
+ index: bcs_1.bcs.u64(),
341
+ token_type: structs_1.TypeName.bcs,
342
+ config: Config.bcs,
343
+ state: State.bcs,
344
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
345
+ });
346
+ },
347
+ enumerable: false,
348
+ configurable: true
349
+ });
350
+ AddLiquidityTokenEvent.fromFields = function (fields) {
351
+ return AddLiquidityTokenEvent.reified().new({
352
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
353
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
354
+ tokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.token_type),
355
+ config: (0, reified_1.decodeFromFields)(Config.reified(), fields.config),
356
+ state: (0, reified_1.decodeFromFields)(State.reified(), fields.state),
357
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
358
+ });
359
+ };
360
+ AddLiquidityTokenEvent.fromFieldsWithTypes = function (item) {
361
+ if (!isAddLiquidityTokenEvent(item.type)) {
362
+ throw new Error("not a AddLiquidityTokenEvent type");
363
+ }
364
+ return AddLiquidityTokenEvent.reified().new({
365
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
366
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
367
+ tokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.token_type),
368
+ config: (0, reified_1.decodeFromFieldsWithTypes)(Config.reified(), item.fields.config),
369
+ state: (0, reified_1.decodeFromFieldsWithTypes)(State.reified(), item.fields.state),
370
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
371
+ });
372
+ };
373
+ AddLiquidityTokenEvent.fromBcs = function (data) {
374
+ return AddLiquidityTokenEvent.fromFields(AddLiquidityTokenEvent.bcs.parse(data));
375
+ };
376
+ AddLiquidityTokenEvent.prototype.toJSONField = function () {
377
+ return {
378
+ sender: this.sender,
379
+ index: this.index.toString(),
380
+ tokenType: this.tokenType.toJSONField(),
381
+ config: this.config.toJSONField(),
382
+ state: this.state.toJSONField(),
383
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
384
+ };
385
+ };
386
+ AddLiquidityTokenEvent.prototype.toJSON = function () {
387
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
388
+ };
389
+ AddLiquidityTokenEvent.fromJSONField = function (field) {
390
+ return AddLiquidityTokenEvent.reified().new({
391
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
392
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
393
+ tokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.tokenType),
394
+ config: (0, reified_1.decodeFromJSONField)(Config.reified(), field.config),
395
+ state: (0, reified_1.decodeFromJSONField)(State.reified(), field.state),
396
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
397
+ });
398
+ };
399
+ AddLiquidityTokenEvent.fromJSON = function (json) {
400
+ if (json.$typeName !== AddLiquidityTokenEvent.$typeName) {
401
+ throw new Error("not a WithTwoGenerics json object");
402
+ }
403
+ return AddLiquidityTokenEvent.fromJSONField(json);
404
+ };
405
+ AddLiquidityTokenEvent.fromSuiParsedData = function (content) {
406
+ if (content.dataType !== "moveObject") {
407
+ throw new Error("not an object");
408
+ }
409
+ if (!isAddLiquidityTokenEvent(content.type)) {
410
+ throw new Error("object at ".concat(content.fields.id, " is not a AddLiquidityTokenEvent object"));
411
+ }
412
+ return AddLiquidityTokenEvent.fromFieldsWithTypes(content);
413
+ };
414
+ AddLiquidityTokenEvent.fetch = function (client, id) {
415
+ return __awaiter(this, void 0, void 0, function () {
416
+ var res;
417
+ var _a, _b;
418
+ return __generator(this, function (_c) {
419
+ switch (_c.label) {
420
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
421
+ case 1:
422
+ res = _c.sent();
423
+ if (res.error) {
424
+ throw new Error("error fetching AddLiquidityTokenEvent object at id ".concat(id, ": ").concat(res.error.code));
425
+ }
426
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isAddLiquidityTokenEvent(res.data.bcs.type)) {
427
+ throw new Error("object at id ".concat(id, " is not a AddLiquidityTokenEvent object"));
428
+ }
429
+ return [2 /*return*/, AddLiquidityTokenEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
430
+ }
431
+ });
432
+ });
433
+ };
434
+ AddLiquidityTokenEvent.$typeName = "0x0::lp_pool::AddLiquidityTokenEvent";
435
+ AddLiquidityTokenEvent.$numTypeParams = 0;
436
+ return AddLiquidityTokenEvent;
437
+ }());
438
+ exports.AddLiquidityTokenEvent = AddLiquidityTokenEvent;
439
+ /* ============================== BurnLpEvent =============================== */
440
+ function isBurnLpEvent(type) {
441
+ type = (0, util_1.compressSuiType)(type);
442
+ return type === "0x0::lp_pool::BurnLpEvent";
443
+ }
444
+ exports.isBurnLpEvent = isBurnLpEvent;
445
+ var BurnLpEvent = /** @class */ (function () {
446
+ function BurnLpEvent(typeArgs, fields) {
447
+ this.$typeName = BurnLpEvent.$typeName;
448
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BurnLpEvent.$typeName], __read(typeArgs), false));
449
+ this.$typeArgs = typeArgs;
450
+ this.sender = fields.sender;
451
+ this.index = fields.index;
452
+ this.lpTokenType = fields.lpTokenType;
453
+ this.burnLpAmount = fields.burnLpAmount;
454
+ this.burnAmountUsd = fields.burnAmountUsd;
455
+ this.burnFeeUsd = fields.burnFeeUsd;
456
+ this.liquidityTokenType = fields.liquidityTokenType;
457
+ this.withdrawTokenAmount = fields.withdrawTokenAmount;
458
+ this.u64Padding = fields.u64Padding;
459
+ }
460
+ BurnLpEvent.reified = function () {
461
+ var _this = this;
462
+ return {
463
+ typeName: BurnLpEvent.$typeName,
464
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BurnLpEvent.$typeName], [], false)),
465
+ typeArgs: [],
466
+ reifiedTypeArgs: [],
467
+ fromFields: function (fields) { return BurnLpEvent.fromFields(fields); },
468
+ fromFieldsWithTypes: function (item) { return BurnLpEvent.fromFieldsWithTypes(item); },
469
+ fromBcs: function (data) { return BurnLpEvent.fromBcs(data); },
470
+ bcs: BurnLpEvent.bcs,
471
+ fromJSONField: function (field) { return BurnLpEvent.fromJSONField(field); },
472
+ fromJSON: function (json) { return BurnLpEvent.fromJSON(json); },
473
+ fromSuiParsedData: function (content) { return BurnLpEvent.fromSuiParsedData(content); },
474
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
475
+ return [2 /*return*/, BurnLpEvent.fetch(client, id)];
476
+ }); }); },
477
+ new: function (fields) {
478
+ return new BurnLpEvent([], fields);
479
+ },
480
+ kind: "StructClassReified",
481
+ };
482
+ };
483
+ Object.defineProperty(BurnLpEvent, "r", {
484
+ get: function () {
485
+ return BurnLpEvent.reified();
486
+ },
487
+ enumerable: false,
488
+ configurable: true
489
+ });
490
+ BurnLpEvent.phantom = function () {
491
+ return (0, reified_1.phantom)(BurnLpEvent.reified());
492
+ };
493
+ Object.defineProperty(BurnLpEvent, "p", {
494
+ get: function () {
495
+ return BurnLpEvent.phantom();
496
+ },
497
+ enumerable: false,
498
+ configurable: true
499
+ });
500
+ Object.defineProperty(BurnLpEvent, "bcs", {
501
+ get: function () {
502
+ return bcs_1.bcs.struct("BurnLpEvent", {
503
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
504
+ index: bcs_1.bcs.u64(),
505
+ lp_token_type: structs_1.TypeName.bcs,
506
+ burn_lp_amount: bcs_1.bcs.u64(),
507
+ burn_amount_usd: bcs_1.bcs.u64(),
508
+ burn_fee_usd: bcs_1.bcs.u64(),
509
+ liquidity_token_type: structs_1.TypeName.bcs,
510
+ withdraw_token_amount: bcs_1.bcs.u64(),
511
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
512
+ });
513
+ },
514
+ enumerable: false,
515
+ configurable: true
516
+ });
517
+ BurnLpEvent.fromFields = function (fields) {
518
+ return BurnLpEvent.reified().new({
519
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
520
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
521
+ lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
522
+ burnLpAmount: (0, reified_1.decodeFromFields)("u64", fields.burn_lp_amount),
523
+ burnAmountUsd: (0, reified_1.decodeFromFields)("u64", fields.burn_amount_usd),
524
+ burnFeeUsd: (0, reified_1.decodeFromFields)("u64", fields.burn_fee_usd),
525
+ liquidityTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token_type),
526
+ withdrawTokenAmount: (0, reified_1.decodeFromFields)("u64", fields.withdraw_token_amount),
527
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
528
+ });
529
+ };
530
+ BurnLpEvent.fromFieldsWithTypes = function (item) {
531
+ if (!isBurnLpEvent(item.type)) {
532
+ throw new Error("not a BurnLpEvent type");
533
+ }
534
+ return BurnLpEvent.reified().new({
535
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
536
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
537
+ lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
538
+ burnLpAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.burn_lp_amount),
539
+ burnAmountUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.burn_amount_usd),
540
+ burnFeeUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.burn_fee_usd),
541
+ liquidityTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token_type),
542
+ withdrawTokenAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.withdraw_token_amount),
543
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
544
+ });
545
+ };
546
+ BurnLpEvent.fromBcs = function (data) {
547
+ return BurnLpEvent.fromFields(BurnLpEvent.bcs.parse(data));
548
+ };
549
+ BurnLpEvent.prototype.toJSONField = function () {
550
+ return {
551
+ sender: this.sender,
552
+ index: this.index.toString(),
553
+ lpTokenType: this.lpTokenType.toJSONField(),
554
+ burnLpAmount: this.burnLpAmount.toString(),
555
+ burnAmountUsd: this.burnAmountUsd.toString(),
556
+ burnFeeUsd: this.burnFeeUsd.toString(),
557
+ liquidityTokenType: this.liquidityTokenType.toJSONField(),
558
+ withdrawTokenAmount: this.withdrawTokenAmount.toString(),
559
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
560
+ };
561
+ };
562
+ BurnLpEvent.prototype.toJSON = function () {
563
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
564
+ };
565
+ BurnLpEvent.fromJSONField = function (field) {
566
+ return BurnLpEvent.reified().new({
567
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
568
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
569
+ lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
570
+ burnLpAmount: (0, reified_1.decodeFromJSONField)("u64", field.burnLpAmount),
571
+ burnAmountUsd: (0, reified_1.decodeFromJSONField)("u64", field.burnAmountUsd),
572
+ burnFeeUsd: (0, reified_1.decodeFromJSONField)("u64", field.burnFeeUsd),
573
+ liquidityTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityTokenType),
574
+ withdrawTokenAmount: (0, reified_1.decodeFromJSONField)("u64", field.withdrawTokenAmount),
575
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
576
+ });
577
+ };
578
+ BurnLpEvent.fromJSON = function (json) {
579
+ if (json.$typeName !== BurnLpEvent.$typeName) {
580
+ throw new Error("not a WithTwoGenerics json object");
581
+ }
582
+ return BurnLpEvent.fromJSONField(json);
583
+ };
584
+ BurnLpEvent.fromSuiParsedData = function (content) {
585
+ if (content.dataType !== "moveObject") {
586
+ throw new Error("not an object");
587
+ }
588
+ if (!isBurnLpEvent(content.type)) {
589
+ throw new Error("object at ".concat(content.fields.id, " is not a BurnLpEvent object"));
590
+ }
591
+ return BurnLpEvent.fromFieldsWithTypes(content);
592
+ };
593
+ BurnLpEvent.fetch = function (client, id) {
594
+ return __awaiter(this, void 0, void 0, function () {
595
+ var res;
596
+ var _a, _b;
597
+ return __generator(this, function (_c) {
598
+ switch (_c.label) {
599
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
600
+ case 1:
601
+ res = _c.sent();
602
+ if (res.error) {
603
+ throw new Error("error fetching BurnLpEvent object at id ".concat(id, ": ").concat(res.error.code));
604
+ }
605
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBurnLpEvent(res.data.bcs.type)) {
606
+ throw new Error("object at id ".concat(id, " is not a BurnLpEvent object"));
607
+ }
608
+ return [2 /*return*/, BurnLpEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
609
+ }
610
+ });
611
+ });
612
+ };
613
+ BurnLpEvent.$typeName = "0x0::lp_pool::BurnLpEvent";
614
+ BurnLpEvent.$numTypeParams = 0;
615
+ return BurnLpEvent;
616
+ }());
617
+ exports.BurnLpEvent = BurnLpEvent;
618
+ /* ============================== Config =============================== */
619
+ function isConfig(type) {
620
+ type = (0, util_1.compressSuiType)(type);
621
+ return type === "0x0::lp_pool::Config";
622
+ }
623
+ exports.isConfig = isConfig;
624
+ var Config = /** @class */ (function () {
625
+ function Config(typeArgs, fields) {
626
+ this.$typeName = Config.$typeName;
627
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], __read(typeArgs), false));
628
+ this.$typeArgs = typeArgs;
629
+ this.oracleId = fields.oracleId;
630
+ this.liquidityTokenDecimal = fields.liquidityTokenDecimal;
631
+ this.spotConfig = fields.spotConfig;
632
+ this.marginConfig = fields.marginConfig;
633
+ this.u64Padding = fields.u64Padding;
634
+ }
635
+ Config.reified = function () {
636
+ var _this = this;
637
+ return {
638
+ typeName: Config.$typeName,
639
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Config.$typeName], [], false)),
640
+ typeArgs: [],
641
+ reifiedTypeArgs: [],
642
+ fromFields: function (fields) { return Config.fromFields(fields); },
643
+ fromFieldsWithTypes: function (item) { return Config.fromFieldsWithTypes(item); },
644
+ fromBcs: function (data) { return Config.fromBcs(data); },
645
+ bcs: Config.bcs,
646
+ fromJSONField: function (field) { return Config.fromJSONField(field); },
647
+ fromJSON: function (json) { return Config.fromJSON(json); },
648
+ fromSuiParsedData: function (content) { return Config.fromSuiParsedData(content); },
649
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
650
+ return [2 /*return*/, Config.fetch(client, id)];
651
+ }); }); },
652
+ new: function (fields) {
653
+ return new Config([], fields);
654
+ },
655
+ kind: "StructClassReified",
656
+ };
657
+ };
658
+ Object.defineProperty(Config, "r", {
659
+ get: function () {
660
+ return Config.reified();
661
+ },
662
+ enumerable: false,
663
+ configurable: true
664
+ });
665
+ Config.phantom = function () {
666
+ return (0, reified_1.phantom)(Config.reified());
667
+ };
668
+ Object.defineProperty(Config, "p", {
669
+ get: function () {
670
+ return Config.phantom();
671
+ },
672
+ enumerable: false,
673
+ configurable: true
674
+ });
675
+ Object.defineProperty(Config, "bcs", {
676
+ get: function () {
677
+ return bcs_1.bcs.struct("Config", {
678
+ oracle_id: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
679
+ liquidity_token_decimal: bcs_1.bcs.u64(),
680
+ spot_config: SpotConfig.bcs,
681
+ margin_config: MarginConfig.bcs,
682
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
683
+ });
684
+ },
685
+ enumerable: false,
686
+ configurable: true
687
+ });
688
+ Config.fromFields = function (fields) {
689
+ return Config.reified().new({
690
+ oracleId: (0, reified_1.decodeFromFields)("address", fields.oracle_id),
691
+ liquidityTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.liquidity_token_decimal),
692
+ spotConfig: (0, reified_1.decodeFromFields)(SpotConfig.reified(), fields.spot_config),
693
+ marginConfig: (0, reified_1.decodeFromFields)(MarginConfig.reified(), fields.margin_config),
694
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
695
+ });
696
+ };
697
+ Config.fromFieldsWithTypes = function (item) {
698
+ if (!isConfig(item.type)) {
699
+ throw new Error("not a Config type");
700
+ }
701
+ return Config.reified().new({
702
+ oracleId: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.oracle_id),
703
+ liquidityTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.liquidity_token_decimal),
704
+ spotConfig: (0, reified_1.decodeFromFieldsWithTypes)(SpotConfig.reified(), item.fields.spot_config),
705
+ marginConfig: (0, reified_1.decodeFromFieldsWithTypes)(MarginConfig.reified(), item.fields.margin_config),
706
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
707
+ });
708
+ };
709
+ Config.fromBcs = function (data) {
710
+ return Config.fromFields(Config.bcs.parse(data));
711
+ };
712
+ Config.prototype.toJSONField = function () {
713
+ return {
714
+ oracleId: this.oracleId,
715
+ liquidityTokenDecimal: this.liquidityTokenDecimal.toString(),
716
+ spotConfig: this.spotConfig.toJSONField(),
717
+ marginConfig: this.marginConfig.toJSONField(),
718
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
719
+ };
720
+ };
721
+ Config.prototype.toJSON = function () {
722
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
723
+ };
724
+ Config.fromJSONField = function (field) {
725
+ return Config.reified().new({
726
+ oracleId: (0, reified_1.decodeFromJSONField)("address", field.oracleId),
727
+ liquidityTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.liquidityTokenDecimal),
728
+ spotConfig: (0, reified_1.decodeFromJSONField)(SpotConfig.reified(), field.spotConfig),
729
+ marginConfig: (0, reified_1.decodeFromJSONField)(MarginConfig.reified(), field.marginConfig),
730
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
731
+ });
732
+ };
733
+ Config.fromJSON = function (json) {
734
+ if (json.$typeName !== Config.$typeName) {
735
+ throw new Error("not a WithTwoGenerics json object");
736
+ }
737
+ return Config.fromJSONField(json);
738
+ };
739
+ Config.fromSuiParsedData = function (content) {
740
+ if (content.dataType !== "moveObject") {
741
+ throw new Error("not an object");
742
+ }
743
+ if (!isConfig(content.type)) {
744
+ throw new Error("object at ".concat(content.fields.id, " is not a Config object"));
745
+ }
746
+ return Config.fromFieldsWithTypes(content);
747
+ };
748
+ Config.fetch = function (client, id) {
749
+ return __awaiter(this, void 0, void 0, function () {
750
+ var res;
751
+ var _a, _b;
752
+ return __generator(this, function (_c) {
753
+ switch (_c.label) {
754
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
755
+ case 1:
756
+ res = _c.sent();
757
+ if (res.error) {
758
+ throw new Error("error fetching Config object at id ".concat(id, ": ").concat(res.error.code));
759
+ }
760
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isConfig(res.data.bcs.type)) {
761
+ throw new Error("object at id ".concat(id, " is not a Config object"));
762
+ }
763
+ return [2 /*return*/, Config.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
764
+ }
765
+ });
766
+ });
767
+ };
768
+ Config.$typeName = "0x0::lp_pool::Config";
769
+ Config.$numTypeParams = 0;
770
+ return Config;
771
+ }());
772
+ exports.Config = Config;
773
+ /* ============================== LiquidityPool =============================== */
774
+ function isLiquidityPool(type) {
775
+ type = (0, util_1.compressSuiType)(type);
776
+ return type === "0x0::lp_pool::LiquidityPool";
777
+ }
778
+ exports.isLiquidityPool = isLiquidityPool;
779
+ var LiquidityPool = /** @class */ (function () {
780
+ function LiquidityPool(typeArgs, fields) {
781
+ this.$typeName = LiquidityPool.$typeName;
782
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([LiquidityPool.$typeName], __read(typeArgs), false));
783
+ this.$typeArgs = typeArgs;
784
+ this.id = fields.id;
785
+ this.index = fields.index;
786
+ this.lpTokenType = fields.lpTokenType;
787
+ this.liquidityTokens = fields.liquidityTokens;
788
+ this.tokenPools = fields.tokenPools;
789
+ this.poolInfo = fields.poolInfo;
790
+ this.u64Padding = fields.u64Padding;
791
+ this.bcsPadding = fields.bcsPadding;
792
+ }
793
+ LiquidityPool.reified = function () {
794
+ var _this = this;
795
+ return {
796
+ typeName: LiquidityPool.$typeName,
797
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([LiquidityPool.$typeName], [], false)),
798
+ typeArgs: [],
799
+ reifiedTypeArgs: [],
800
+ fromFields: function (fields) { return LiquidityPool.fromFields(fields); },
801
+ fromFieldsWithTypes: function (item) { return LiquidityPool.fromFieldsWithTypes(item); },
802
+ fromBcs: function (data) { return LiquidityPool.fromBcs(data); },
803
+ bcs: LiquidityPool.bcs,
804
+ fromJSONField: function (field) { return LiquidityPool.fromJSONField(field); },
805
+ fromJSON: function (json) { return LiquidityPool.fromJSON(json); },
806
+ fromSuiParsedData: function (content) { return LiquidityPool.fromSuiParsedData(content); },
807
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
808
+ return [2 /*return*/, LiquidityPool.fetch(client, id)];
809
+ }); }); },
810
+ new: function (fields) {
811
+ return new LiquidityPool([], fields);
812
+ },
813
+ kind: "StructClassReified",
814
+ };
815
+ };
816
+ Object.defineProperty(LiquidityPool, "r", {
817
+ get: function () {
818
+ return LiquidityPool.reified();
819
+ },
820
+ enumerable: false,
821
+ configurable: true
822
+ });
823
+ LiquidityPool.phantom = function () {
824
+ return (0, reified_1.phantom)(LiquidityPool.reified());
825
+ };
826
+ Object.defineProperty(LiquidityPool, "p", {
827
+ get: function () {
828
+ return LiquidityPool.phantom();
829
+ },
830
+ enumerable: false,
831
+ configurable: true
832
+ });
833
+ Object.defineProperty(LiquidityPool, "bcs", {
834
+ get: function () {
835
+ return bcs_1.bcs.struct("LiquidityPool", {
836
+ id: structs_2.UID.bcs,
837
+ index: bcs_1.bcs.u64(),
838
+ lp_token_type: structs_1.TypeName.bcs,
839
+ liquidity_tokens: bcs_1.bcs.vector(structs_1.TypeName.bcs),
840
+ token_pools: bcs_1.bcs.vector(TokenPool.bcs),
841
+ pool_info: LiquidityPoolInfo.bcs,
842
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
843
+ bcs_padding: bcs_1.bcs.vector(bcs_1.bcs.u8()),
844
+ });
845
+ },
846
+ enumerable: false,
847
+ configurable: true
848
+ });
849
+ LiquidityPool.fromFields = function (fields) {
850
+ return LiquidityPool.reified().new({
851
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
852
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
853
+ lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
854
+ liquidityTokens: (0, reified_1.decodeFromFields)(reified.vector(structs_1.TypeName.reified()), fields.liquidity_tokens),
855
+ tokenPools: (0, reified_1.decodeFromFields)(reified.vector(TokenPool.reified()), fields.token_pools),
856
+ poolInfo: (0, reified_1.decodeFromFields)(LiquidityPoolInfo.reified(), fields.pool_info),
857
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
858
+ bcsPadding: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.bcs_padding),
859
+ });
860
+ };
861
+ LiquidityPool.fromFieldsWithTypes = function (item) {
862
+ if (!isLiquidityPool(item.type)) {
863
+ throw new Error("not a LiquidityPool type");
864
+ }
865
+ return LiquidityPool.reified().new({
866
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
867
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
868
+ lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
869
+ liquidityTokens: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(structs_1.TypeName.reified()), item.fields.liquidity_tokens),
870
+ tokenPools: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(TokenPool.reified()), item.fields.token_pools),
871
+ poolInfo: (0, reified_1.decodeFromFieldsWithTypes)(LiquidityPoolInfo.reified(), item.fields.pool_info),
872
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
873
+ bcsPadding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.bcs_padding),
874
+ });
875
+ };
876
+ LiquidityPool.fromBcs = function (data) {
877
+ return LiquidityPool.fromFields(LiquidityPool.bcs.parse(data));
878
+ };
879
+ LiquidityPool.prototype.toJSONField = function () {
880
+ return {
881
+ id: this.id,
882
+ index: this.index.toString(),
883
+ lpTokenType: this.lpTokenType.toJSONField(),
884
+ liquidityTokens: (0, reified_1.fieldToJSON)("vector<0x1::type_name::TypeName>", this.liquidityTokens),
885
+ tokenPools: (0, reified_1.fieldToJSON)("vector<0x0::lp_pool::TokenPool>", this.tokenPools),
886
+ poolInfo: this.poolInfo.toJSONField(),
887
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
888
+ bcsPadding: (0, reified_1.fieldToJSON)("vector<u8>", this.bcsPadding),
889
+ };
890
+ };
891
+ LiquidityPool.prototype.toJSON = function () {
892
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
893
+ };
894
+ LiquidityPool.fromJSONField = function (field) {
895
+ return LiquidityPool.reified().new({
896
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
897
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
898
+ lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
899
+ liquidityTokens: (0, reified_1.decodeFromJSONField)(reified.vector(structs_1.TypeName.reified()), field.liquidityTokens),
900
+ tokenPools: (0, reified_1.decodeFromJSONField)(reified.vector(TokenPool.reified()), field.tokenPools),
901
+ poolInfo: (0, reified_1.decodeFromJSONField)(LiquidityPoolInfo.reified(), field.poolInfo),
902
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
903
+ bcsPadding: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.bcsPadding),
904
+ });
905
+ };
906
+ LiquidityPool.fromJSON = function (json) {
907
+ if (json.$typeName !== LiquidityPool.$typeName) {
908
+ throw new Error("not a WithTwoGenerics json object");
909
+ }
910
+ return LiquidityPool.fromJSONField(json);
911
+ };
912
+ LiquidityPool.fromSuiParsedData = function (content) {
913
+ if (content.dataType !== "moveObject") {
914
+ throw new Error("not an object");
915
+ }
916
+ if (!isLiquidityPool(content.type)) {
917
+ throw new Error("object at ".concat(content.fields.id, " is not a LiquidityPool object"));
918
+ }
919
+ return LiquidityPool.fromFieldsWithTypes(content);
920
+ };
921
+ LiquidityPool.fetch = function (client, id) {
922
+ return __awaiter(this, void 0, void 0, function () {
923
+ var res;
924
+ var _a, _b;
925
+ return __generator(this, function (_c) {
926
+ switch (_c.label) {
927
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
928
+ case 1:
929
+ res = _c.sent();
930
+ if (res.error) {
931
+ throw new Error("error fetching LiquidityPool object at id ".concat(id, ": ").concat(res.error.code));
932
+ }
933
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isLiquidityPool(res.data.bcs.type)) {
934
+ throw new Error("object at id ".concat(id, " is not a LiquidityPool object"));
935
+ }
936
+ return [2 /*return*/, LiquidityPool.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
937
+ }
938
+ });
939
+ });
940
+ };
941
+ LiquidityPool.$typeName = "0x0::lp_pool::LiquidityPool";
942
+ LiquidityPool.$numTypeParams = 0;
943
+ return LiquidityPool;
944
+ }());
945
+ exports.LiquidityPool = LiquidityPool;
946
+ /* ============================== LiquidityPoolInfo =============================== */
947
+ function isLiquidityPoolInfo(type) {
948
+ type = (0, util_1.compressSuiType)(type);
949
+ return type === "0x0::lp_pool::LiquidityPoolInfo";
950
+ }
951
+ exports.isLiquidityPoolInfo = isLiquidityPoolInfo;
952
+ var LiquidityPoolInfo = /** @class */ (function () {
953
+ function LiquidityPoolInfo(typeArgs, fields) {
954
+ this.$typeName = LiquidityPoolInfo.$typeName;
955
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([LiquidityPoolInfo.$typeName], __read(typeArgs), false));
956
+ this.$typeArgs = typeArgs;
957
+ this.lpTokenDecimal = fields.lpTokenDecimal;
958
+ this.totalShareSupply = fields.totalShareSupply;
959
+ this.tvlUsd = fields.tvlUsd;
960
+ this.isActive = fields.isActive;
961
+ }
962
+ LiquidityPoolInfo.reified = function () {
963
+ var _this = this;
964
+ return {
965
+ typeName: LiquidityPoolInfo.$typeName,
966
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([LiquidityPoolInfo.$typeName], [], false)),
967
+ typeArgs: [],
968
+ reifiedTypeArgs: [],
969
+ fromFields: function (fields) { return LiquidityPoolInfo.fromFields(fields); },
970
+ fromFieldsWithTypes: function (item) { return LiquidityPoolInfo.fromFieldsWithTypes(item); },
971
+ fromBcs: function (data) { return LiquidityPoolInfo.fromBcs(data); },
972
+ bcs: LiquidityPoolInfo.bcs,
973
+ fromJSONField: function (field) { return LiquidityPoolInfo.fromJSONField(field); },
974
+ fromJSON: function (json) { return LiquidityPoolInfo.fromJSON(json); },
975
+ fromSuiParsedData: function (content) { return LiquidityPoolInfo.fromSuiParsedData(content); },
976
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
977
+ return [2 /*return*/, LiquidityPoolInfo.fetch(client, id)];
978
+ }); }); },
979
+ new: function (fields) {
980
+ return new LiquidityPoolInfo([], fields);
981
+ },
982
+ kind: "StructClassReified",
983
+ };
984
+ };
985
+ Object.defineProperty(LiquidityPoolInfo, "r", {
986
+ get: function () {
987
+ return LiquidityPoolInfo.reified();
988
+ },
989
+ enumerable: false,
990
+ configurable: true
991
+ });
992
+ LiquidityPoolInfo.phantom = function () {
993
+ return (0, reified_1.phantom)(LiquidityPoolInfo.reified());
994
+ };
995
+ Object.defineProperty(LiquidityPoolInfo, "p", {
996
+ get: function () {
997
+ return LiquidityPoolInfo.phantom();
998
+ },
999
+ enumerable: false,
1000
+ configurable: true
1001
+ });
1002
+ Object.defineProperty(LiquidityPoolInfo, "bcs", {
1003
+ get: function () {
1004
+ return bcs_1.bcs.struct("LiquidityPoolInfo", {
1005
+ lp_token_decimal: bcs_1.bcs.u64(),
1006
+ total_share_supply: bcs_1.bcs.u64(),
1007
+ tvl_usd: bcs_1.bcs.u64(),
1008
+ is_active: bcs_1.bcs.bool(),
1009
+ });
1010
+ },
1011
+ enumerable: false,
1012
+ configurable: true
1013
+ });
1014
+ LiquidityPoolInfo.fromFields = function (fields) {
1015
+ return LiquidityPoolInfo.reified().new({
1016
+ lpTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.lp_token_decimal),
1017
+ totalShareSupply: (0, reified_1.decodeFromFields)("u64", fields.total_share_supply),
1018
+ tvlUsd: (0, reified_1.decodeFromFields)("u64", fields.tvl_usd),
1019
+ isActive: (0, reified_1.decodeFromFields)("bool", fields.is_active),
1020
+ });
1021
+ };
1022
+ LiquidityPoolInfo.fromFieldsWithTypes = function (item) {
1023
+ if (!isLiquidityPoolInfo(item.type)) {
1024
+ throw new Error("not a LiquidityPoolInfo type");
1025
+ }
1026
+ return LiquidityPoolInfo.reified().new({
1027
+ lpTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.lp_token_decimal),
1028
+ totalShareSupply: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total_share_supply),
1029
+ tvlUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.tvl_usd),
1030
+ isActive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_active),
1031
+ });
1032
+ };
1033
+ LiquidityPoolInfo.fromBcs = function (data) {
1034
+ return LiquidityPoolInfo.fromFields(LiquidityPoolInfo.bcs.parse(data));
1035
+ };
1036
+ LiquidityPoolInfo.prototype.toJSONField = function () {
1037
+ return {
1038
+ lpTokenDecimal: this.lpTokenDecimal.toString(),
1039
+ totalShareSupply: this.totalShareSupply.toString(),
1040
+ tvlUsd: this.tvlUsd.toString(),
1041
+ isActive: this.isActive,
1042
+ };
1043
+ };
1044
+ LiquidityPoolInfo.prototype.toJSON = function () {
1045
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1046
+ };
1047
+ LiquidityPoolInfo.fromJSONField = function (field) {
1048
+ return LiquidityPoolInfo.reified().new({
1049
+ lpTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.lpTokenDecimal),
1050
+ totalShareSupply: (0, reified_1.decodeFromJSONField)("u64", field.totalShareSupply),
1051
+ tvlUsd: (0, reified_1.decodeFromJSONField)("u64", field.tvlUsd),
1052
+ isActive: (0, reified_1.decodeFromJSONField)("bool", field.isActive),
1053
+ });
1054
+ };
1055
+ LiquidityPoolInfo.fromJSON = function (json) {
1056
+ if (json.$typeName !== LiquidityPoolInfo.$typeName) {
1057
+ throw new Error("not a WithTwoGenerics json object");
1058
+ }
1059
+ return LiquidityPoolInfo.fromJSONField(json);
1060
+ };
1061
+ LiquidityPoolInfo.fromSuiParsedData = function (content) {
1062
+ if (content.dataType !== "moveObject") {
1063
+ throw new Error("not an object");
1064
+ }
1065
+ if (!isLiquidityPoolInfo(content.type)) {
1066
+ throw new Error("object at ".concat(content.fields.id, " is not a LiquidityPoolInfo object"));
1067
+ }
1068
+ return LiquidityPoolInfo.fromFieldsWithTypes(content);
1069
+ };
1070
+ LiquidityPoolInfo.fetch = function (client, id) {
1071
+ return __awaiter(this, void 0, void 0, function () {
1072
+ var res;
1073
+ var _a, _b;
1074
+ return __generator(this, function (_c) {
1075
+ switch (_c.label) {
1076
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1077
+ case 1:
1078
+ res = _c.sent();
1079
+ if (res.error) {
1080
+ throw new Error("error fetching LiquidityPoolInfo object at id ".concat(id, ": ").concat(res.error.code));
1081
+ }
1082
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isLiquidityPoolInfo(res.data.bcs.type)) {
1083
+ throw new Error("object at id ".concat(id, " is not a LiquidityPoolInfo object"));
1084
+ }
1085
+ return [2 /*return*/, LiquidityPoolInfo.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1086
+ }
1087
+ });
1088
+ });
1089
+ };
1090
+ LiquidityPoolInfo.$typeName = "0x0::lp_pool::LiquidityPoolInfo";
1091
+ LiquidityPoolInfo.$numTypeParams = 0;
1092
+ return LiquidityPoolInfo;
1093
+ }());
1094
+ exports.LiquidityPoolInfo = LiquidityPoolInfo;
1095
+ /* ============================== MarginConfig =============================== */
1096
+ function isMarginConfig(type) {
1097
+ type = (0, util_1.compressSuiType)(type);
1098
+ return type === "0x0::lp_pool::MarginConfig";
1099
+ }
1100
+ exports.isMarginConfig = isMarginConfig;
1101
+ var MarginConfig = /** @class */ (function () {
1102
+ function MarginConfig(typeArgs, fields) {
1103
+ this.$typeName = MarginConfig.$typeName;
1104
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([MarginConfig.$typeName], __read(typeArgs), false));
1105
+ this.$typeArgs = typeArgs;
1106
+ this.basicFundingRate = fields.basicFundingRate;
1107
+ this.fundingIntervalTsMs = fields.fundingIntervalTsMs;
1108
+ this.u64Padding = fields.u64Padding;
1109
+ }
1110
+ MarginConfig.reified = function () {
1111
+ var _this = this;
1112
+ return {
1113
+ typeName: MarginConfig.$typeName,
1114
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([MarginConfig.$typeName], [], false)),
1115
+ typeArgs: [],
1116
+ reifiedTypeArgs: [],
1117
+ fromFields: function (fields) { return MarginConfig.fromFields(fields); },
1118
+ fromFieldsWithTypes: function (item) { return MarginConfig.fromFieldsWithTypes(item); },
1119
+ fromBcs: function (data) { return MarginConfig.fromBcs(data); },
1120
+ bcs: MarginConfig.bcs,
1121
+ fromJSONField: function (field) { return MarginConfig.fromJSONField(field); },
1122
+ fromJSON: function (json) { return MarginConfig.fromJSON(json); },
1123
+ fromSuiParsedData: function (content) { return MarginConfig.fromSuiParsedData(content); },
1124
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1125
+ return [2 /*return*/, MarginConfig.fetch(client, id)];
1126
+ }); }); },
1127
+ new: function (fields) {
1128
+ return new MarginConfig([], fields);
1129
+ },
1130
+ kind: "StructClassReified",
1131
+ };
1132
+ };
1133
+ Object.defineProperty(MarginConfig, "r", {
1134
+ get: function () {
1135
+ return MarginConfig.reified();
1136
+ },
1137
+ enumerable: false,
1138
+ configurable: true
1139
+ });
1140
+ MarginConfig.phantom = function () {
1141
+ return (0, reified_1.phantom)(MarginConfig.reified());
1142
+ };
1143
+ Object.defineProperty(MarginConfig, "p", {
1144
+ get: function () {
1145
+ return MarginConfig.phantom();
1146
+ },
1147
+ enumerable: false,
1148
+ configurable: true
1149
+ });
1150
+ Object.defineProperty(MarginConfig, "bcs", {
1151
+ get: function () {
1152
+ return bcs_1.bcs.struct("MarginConfig", {
1153
+ basic_funding_rate: bcs_1.bcs.u64(),
1154
+ funding_interval_ts_ms: bcs_1.bcs.u64(),
1155
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1156
+ });
1157
+ },
1158
+ enumerable: false,
1159
+ configurable: true
1160
+ });
1161
+ MarginConfig.fromFields = function (fields) {
1162
+ return MarginConfig.reified().new({
1163
+ basicFundingRate: (0, reified_1.decodeFromFields)("u64", fields.basic_funding_rate),
1164
+ fundingIntervalTsMs: (0, reified_1.decodeFromFields)("u64", fields.funding_interval_ts_ms),
1165
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
1166
+ });
1167
+ };
1168
+ MarginConfig.fromFieldsWithTypes = function (item) {
1169
+ if (!isMarginConfig(item.type)) {
1170
+ throw new Error("not a MarginConfig type");
1171
+ }
1172
+ return MarginConfig.reified().new({
1173
+ basicFundingRate: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.basic_funding_rate),
1174
+ fundingIntervalTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.funding_interval_ts_ms),
1175
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
1176
+ });
1177
+ };
1178
+ MarginConfig.fromBcs = function (data) {
1179
+ return MarginConfig.fromFields(MarginConfig.bcs.parse(data));
1180
+ };
1181
+ MarginConfig.prototype.toJSONField = function () {
1182
+ return {
1183
+ basicFundingRate: this.basicFundingRate.toString(),
1184
+ fundingIntervalTsMs: this.fundingIntervalTsMs.toString(),
1185
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
1186
+ };
1187
+ };
1188
+ MarginConfig.prototype.toJSON = function () {
1189
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1190
+ };
1191
+ MarginConfig.fromJSONField = function (field) {
1192
+ return MarginConfig.reified().new({
1193
+ basicFundingRate: (0, reified_1.decodeFromJSONField)("u64", field.basicFundingRate),
1194
+ fundingIntervalTsMs: (0, reified_1.decodeFromJSONField)("u64", field.fundingIntervalTsMs),
1195
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
1196
+ });
1197
+ };
1198
+ MarginConfig.fromJSON = function (json) {
1199
+ if (json.$typeName !== MarginConfig.$typeName) {
1200
+ throw new Error("not a WithTwoGenerics json object");
1201
+ }
1202
+ return MarginConfig.fromJSONField(json);
1203
+ };
1204
+ MarginConfig.fromSuiParsedData = function (content) {
1205
+ if (content.dataType !== "moveObject") {
1206
+ throw new Error("not an object");
1207
+ }
1208
+ if (!isMarginConfig(content.type)) {
1209
+ throw new Error("object at ".concat(content.fields.id, " is not a MarginConfig object"));
1210
+ }
1211
+ return MarginConfig.fromFieldsWithTypes(content);
1212
+ };
1213
+ MarginConfig.fetch = function (client, id) {
1214
+ return __awaiter(this, void 0, void 0, function () {
1215
+ var res;
1216
+ var _a, _b;
1217
+ return __generator(this, function (_c) {
1218
+ switch (_c.label) {
1219
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1220
+ case 1:
1221
+ res = _c.sent();
1222
+ if (res.error) {
1223
+ throw new Error("error fetching MarginConfig object at id ".concat(id, ": ").concat(res.error.code));
1224
+ }
1225
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isMarginConfig(res.data.bcs.type)) {
1226
+ throw new Error("object at id ".concat(id, " is not a MarginConfig object"));
1227
+ }
1228
+ return [2 /*return*/, MarginConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1229
+ }
1230
+ });
1231
+ });
1232
+ };
1233
+ MarginConfig.$typeName = "0x0::lp_pool::MarginConfig";
1234
+ MarginConfig.$numTypeParams = 0;
1235
+ return MarginConfig;
1236
+ }());
1237
+ exports.MarginConfig = MarginConfig;
1238
+ /* ============================== MintLpEvent =============================== */
1239
+ function isMintLpEvent(type) {
1240
+ type = (0, util_1.compressSuiType)(type);
1241
+ return type === "0x0::lp_pool::MintLpEvent";
1242
+ }
1243
+ exports.isMintLpEvent = isMintLpEvent;
1244
+ var MintLpEvent = /** @class */ (function () {
1245
+ function MintLpEvent(typeArgs, fields) {
1246
+ this.$typeName = MintLpEvent.$typeName;
1247
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([MintLpEvent.$typeName], __read(typeArgs), false));
1248
+ this.$typeArgs = typeArgs;
1249
+ this.sender = fields.sender;
1250
+ this.index = fields.index;
1251
+ this.liquidityTokenType = fields.liquidityTokenType;
1252
+ this.depositAmount = fields.depositAmount;
1253
+ this.depositAmountUsd = fields.depositAmountUsd;
1254
+ this.mintFeeUsd = fields.mintFeeUsd;
1255
+ this.lpTokenType = fields.lpTokenType;
1256
+ this.mintedLpAmount = fields.mintedLpAmount;
1257
+ this.u64Padding = fields.u64Padding;
1258
+ }
1259
+ MintLpEvent.reified = function () {
1260
+ var _this = this;
1261
+ return {
1262
+ typeName: MintLpEvent.$typeName,
1263
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([MintLpEvent.$typeName], [], false)),
1264
+ typeArgs: [],
1265
+ reifiedTypeArgs: [],
1266
+ fromFields: function (fields) { return MintLpEvent.fromFields(fields); },
1267
+ fromFieldsWithTypes: function (item) { return MintLpEvent.fromFieldsWithTypes(item); },
1268
+ fromBcs: function (data) { return MintLpEvent.fromBcs(data); },
1269
+ bcs: MintLpEvent.bcs,
1270
+ fromJSONField: function (field) { return MintLpEvent.fromJSONField(field); },
1271
+ fromJSON: function (json) { return MintLpEvent.fromJSON(json); },
1272
+ fromSuiParsedData: function (content) { return MintLpEvent.fromSuiParsedData(content); },
1273
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1274
+ return [2 /*return*/, MintLpEvent.fetch(client, id)];
1275
+ }); }); },
1276
+ new: function (fields) {
1277
+ return new MintLpEvent([], fields);
1278
+ },
1279
+ kind: "StructClassReified",
1280
+ };
1281
+ };
1282
+ Object.defineProperty(MintLpEvent, "r", {
1283
+ get: function () {
1284
+ return MintLpEvent.reified();
1285
+ },
1286
+ enumerable: false,
1287
+ configurable: true
1288
+ });
1289
+ MintLpEvent.phantom = function () {
1290
+ return (0, reified_1.phantom)(MintLpEvent.reified());
1291
+ };
1292
+ Object.defineProperty(MintLpEvent, "p", {
1293
+ get: function () {
1294
+ return MintLpEvent.phantom();
1295
+ },
1296
+ enumerable: false,
1297
+ configurable: true
1298
+ });
1299
+ Object.defineProperty(MintLpEvent, "bcs", {
1300
+ get: function () {
1301
+ return bcs_1.bcs.struct("MintLpEvent", {
1302
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
1303
+ index: bcs_1.bcs.u64(),
1304
+ liquidity_token_type: structs_1.TypeName.bcs,
1305
+ deposit_amount: bcs_1.bcs.u64(),
1306
+ deposit_amount_usd: bcs_1.bcs.u64(),
1307
+ mint_fee_usd: bcs_1.bcs.u64(),
1308
+ lp_token_type: structs_1.TypeName.bcs,
1309
+ minted_lp_amount: bcs_1.bcs.u64(),
1310
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1311
+ });
1312
+ },
1313
+ enumerable: false,
1314
+ configurable: true
1315
+ });
1316
+ MintLpEvent.fromFields = function (fields) {
1317
+ return MintLpEvent.reified().new({
1318
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1319
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
1320
+ liquidityTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token_type),
1321
+ depositAmount: (0, reified_1.decodeFromFields)("u64", fields.deposit_amount),
1322
+ depositAmountUsd: (0, reified_1.decodeFromFields)("u64", fields.deposit_amount_usd),
1323
+ mintFeeUsd: (0, reified_1.decodeFromFields)("u64", fields.mint_fee_usd),
1324
+ lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
1325
+ mintedLpAmount: (0, reified_1.decodeFromFields)("u64", fields.minted_lp_amount),
1326
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
1327
+ });
1328
+ };
1329
+ MintLpEvent.fromFieldsWithTypes = function (item) {
1330
+ if (!isMintLpEvent(item.type)) {
1331
+ throw new Error("not a MintLpEvent type");
1332
+ }
1333
+ return MintLpEvent.reified().new({
1334
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1335
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
1336
+ liquidityTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token_type),
1337
+ depositAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_amount),
1338
+ depositAmountUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.deposit_amount_usd),
1339
+ mintFeeUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.mint_fee_usd),
1340
+ lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
1341
+ mintedLpAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.minted_lp_amount),
1342
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
1343
+ });
1344
+ };
1345
+ MintLpEvent.fromBcs = function (data) {
1346
+ return MintLpEvent.fromFields(MintLpEvent.bcs.parse(data));
1347
+ };
1348
+ MintLpEvent.prototype.toJSONField = function () {
1349
+ return {
1350
+ sender: this.sender,
1351
+ index: this.index.toString(),
1352
+ liquidityTokenType: this.liquidityTokenType.toJSONField(),
1353
+ depositAmount: this.depositAmount.toString(),
1354
+ depositAmountUsd: this.depositAmountUsd.toString(),
1355
+ mintFeeUsd: this.mintFeeUsd.toString(),
1356
+ lpTokenType: this.lpTokenType.toJSONField(),
1357
+ mintedLpAmount: this.mintedLpAmount.toString(),
1358
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
1359
+ };
1360
+ };
1361
+ MintLpEvent.prototype.toJSON = function () {
1362
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1363
+ };
1364
+ MintLpEvent.fromJSONField = function (field) {
1365
+ return MintLpEvent.reified().new({
1366
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1367
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
1368
+ liquidityTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityTokenType),
1369
+ depositAmount: (0, reified_1.decodeFromJSONField)("u64", field.depositAmount),
1370
+ depositAmountUsd: (0, reified_1.decodeFromJSONField)("u64", field.depositAmountUsd),
1371
+ mintFeeUsd: (0, reified_1.decodeFromJSONField)("u64", field.mintFeeUsd),
1372
+ lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
1373
+ mintedLpAmount: (0, reified_1.decodeFromJSONField)("u64", field.mintedLpAmount),
1374
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
1375
+ });
1376
+ };
1377
+ MintLpEvent.fromJSON = function (json) {
1378
+ if (json.$typeName !== MintLpEvent.$typeName) {
1379
+ throw new Error("not a WithTwoGenerics json object");
1380
+ }
1381
+ return MintLpEvent.fromJSONField(json);
1382
+ };
1383
+ MintLpEvent.fromSuiParsedData = function (content) {
1384
+ if (content.dataType !== "moveObject") {
1385
+ throw new Error("not an object");
1386
+ }
1387
+ if (!isMintLpEvent(content.type)) {
1388
+ throw new Error("object at ".concat(content.fields.id, " is not a MintLpEvent object"));
1389
+ }
1390
+ return MintLpEvent.fromFieldsWithTypes(content);
1391
+ };
1392
+ MintLpEvent.fetch = function (client, id) {
1393
+ return __awaiter(this, void 0, void 0, function () {
1394
+ var res;
1395
+ var _a, _b;
1396
+ return __generator(this, function (_c) {
1397
+ switch (_c.label) {
1398
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1399
+ case 1:
1400
+ res = _c.sent();
1401
+ if (res.error) {
1402
+ throw new Error("error fetching MintLpEvent object at id ".concat(id, ": ").concat(res.error.code));
1403
+ }
1404
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isMintLpEvent(res.data.bcs.type)) {
1405
+ throw new Error("object at id ".concat(id, " is not a MintLpEvent object"));
1406
+ }
1407
+ return [2 /*return*/, MintLpEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1408
+ }
1409
+ });
1410
+ });
1411
+ };
1412
+ MintLpEvent.$typeName = "0x0::lp_pool::MintLpEvent";
1413
+ MintLpEvent.$numTypeParams = 0;
1414
+ return MintLpEvent;
1415
+ }());
1416
+ exports.MintLpEvent = MintLpEvent;
1417
+ /* ============================== NewLiquidityPoolEvent =============================== */
1418
+ function isNewLiquidityPoolEvent(type) {
1419
+ type = (0, util_1.compressSuiType)(type);
1420
+ return type === "0x0::lp_pool::NewLiquidityPoolEvent";
1421
+ }
1422
+ exports.isNewLiquidityPoolEvent = isNewLiquidityPoolEvent;
1423
+ var NewLiquidityPoolEvent = /** @class */ (function () {
1424
+ function NewLiquidityPoolEvent(typeArgs, fields) {
1425
+ this.$typeName = NewLiquidityPoolEvent.$typeName;
1426
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewLiquidityPoolEvent.$typeName], __read(typeArgs), false));
1427
+ this.$typeArgs = typeArgs;
1428
+ this.sender = fields.sender;
1429
+ this.index = fields.index;
1430
+ this.lpTokenType = fields.lpTokenType;
1431
+ this.lpTokenDecimal = fields.lpTokenDecimal;
1432
+ this.u64Padding = fields.u64Padding;
1433
+ }
1434
+ NewLiquidityPoolEvent.reified = function () {
1435
+ var _this = this;
1436
+ return {
1437
+ typeName: NewLiquidityPoolEvent.$typeName,
1438
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewLiquidityPoolEvent.$typeName], [], false)),
1439
+ typeArgs: [],
1440
+ reifiedTypeArgs: [],
1441
+ fromFields: function (fields) { return NewLiquidityPoolEvent.fromFields(fields); },
1442
+ fromFieldsWithTypes: function (item) { return NewLiquidityPoolEvent.fromFieldsWithTypes(item); },
1443
+ fromBcs: function (data) { return NewLiquidityPoolEvent.fromBcs(data); },
1444
+ bcs: NewLiquidityPoolEvent.bcs,
1445
+ fromJSONField: function (field) { return NewLiquidityPoolEvent.fromJSONField(field); },
1446
+ fromJSON: function (json) { return NewLiquidityPoolEvent.fromJSON(json); },
1447
+ fromSuiParsedData: function (content) { return NewLiquidityPoolEvent.fromSuiParsedData(content); },
1448
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1449
+ return [2 /*return*/, NewLiquidityPoolEvent.fetch(client, id)];
1450
+ }); }); },
1451
+ new: function (fields) {
1452
+ return new NewLiquidityPoolEvent([], fields);
1453
+ },
1454
+ kind: "StructClassReified",
1455
+ };
1456
+ };
1457
+ Object.defineProperty(NewLiquidityPoolEvent, "r", {
1458
+ get: function () {
1459
+ return NewLiquidityPoolEvent.reified();
1460
+ },
1461
+ enumerable: false,
1462
+ configurable: true
1463
+ });
1464
+ NewLiquidityPoolEvent.phantom = function () {
1465
+ return (0, reified_1.phantom)(NewLiquidityPoolEvent.reified());
1466
+ };
1467
+ Object.defineProperty(NewLiquidityPoolEvent, "p", {
1468
+ get: function () {
1469
+ return NewLiquidityPoolEvent.phantom();
1470
+ },
1471
+ enumerable: false,
1472
+ configurable: true
1473
+ });
1474
+ Object.defineProperty(NewLiquidityPoolEvent, "bcs", {
1475
+ get: function () {
1476
+ return bcs_1.bcs.struct("NewLiquidityPoolEvent", {
1477
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
1478
+ index: bcs_1.bcs.u64(),
1479
+ lp_token_type: structs_1.TypeName.bcs,
1480
+ lp_token_decimal: bcs_1.bcs.u64(),
1481
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1482
+ });
1483
+ },
1484
+ enumerable: false,
1485
+ configurable: true
1486
+ });
1487
+ NewLiquidityPoolEvent.fromFields = function (fields) {
1488
+ return NewLiquidityPoolEvent.reified().new({
1489
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1490
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
1491
+ lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
1492
+ lpTokenDecimal: (0, reified_1.decodeFromFields)("u64", fields.lp_token_decimal),
1493
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
1494
+ });
1495
+ };
1496
+ NewLiquidityPoolEvent.fromFieldsWithTypes = function (item) {
1497
+ if (!isNewLiquidityPoolEvent(item.type)) {
1498
+ throw new Error("not a NewLiquidityPoolEvent type");
1499
+ }
1500
+ return NewLiquidityPoolEvent.reified().new({
1501
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1502
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
1503
+ lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
1504
+ lpTokenDecimal: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.lp_token_decimal),
1505
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
1506
+ });
1507
+ };
1508
+ NewLiquidityPoolEvent.fromBcs = function (data) {
1509
+ return NewLiquidityPoolEvent.fromFields(NewLiquidityPoolEvent.bcs.parse(data));
1510
+ };
1511
+ NewLiquidityPoolEvent.prototype.toJSONField = function () {
1512
+ return {
1513
+ sender: this.sender,
1514
+ index: this.index.toString(),
1515
+ lpTokenType: this.lpTokenType.toJSONField(),
1516
+ lpTokenDecimal: this.lpTokenDecimal.toString(),
1517
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
1518
+ };
1519
+ };
1520
+ NewLiquidityPoolEvent.prototype.toJSON = function () {
1521
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1522
+ };
1523
+ NewLiquidityPoolEvent.fromJSONField = function (field) {
1524
+ return NewLiquidityPoolEvent.reified().new({
1525
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1526
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
1527
+ lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
1528
+ lpTokenDecimal: (0, reified_1.decodeFromJSONField)("u64", field.lpTokenDecimal),
1529
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
1530
+ });
1531
+ };
1532
+ NewLiquidityPoolEvent.fromJSON = function (json) {
1533
+ if (json.$typeName !== NewLiquidityPoolEvent.$typeName) {
1534
+ throw new Error("not a WithTwoGenerics json object");
1535
+ }
1536
+ return NewLiquidityPoolEvent.fromJSONField(json);
1537
+ };
1538
+ NewLiquidityPoolEvent.fromSuiParsedData = function (content) {
1539
+ if (content.dataType !== "moveObject") {
1540
+ throw new Error("not an object");
1541
+ }
1542
+ if (!isNewLiquidityPoolEvent(content.type)) {
1543
+ throw new Error("object at ".concat(content.fields.id, " is not a NewLiquidityPoolEvent object"));
1544
+ }
1545
+ return NewLiquidityPoolEvent.fromFieldsWithTypes(content);
1546
+ };
1547
+ NewLiquidityPoolEvent.fetch = function (client, id) {
1548
+ return __awaiter(this, void 0, void 0, function () {
1549
+ var res;
1550
+ var _a, _b;
1551
+ return __generator(this, function (_c) {
1552
+ switch (_c.label) {
1553
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1554
+ case 1:
1555
+ res = _c.sent();
1556
+ if (res.error) {
1557
+ throw new Error("error fetching NewLiquidityPoolEvent object at id ".concat(id, ": ").concat(res.error.code));
1558
+ }
1559
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewLiquidityPoolEvent(res.data.bcs.type)) {
1560
+ throw new Error("object at id ".concat(id, " is not a NewLiquidityPoolEvent object"));
1561
+ }
1562
+ return [2 /*return*/, NewLiquidityPoolEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1563
+ }
1564
+ });
1565
+ });
1566
+ };
1567
+ NewLiquidityPoolEvent.$typeName = "0x0::lp_pool::NewLiquidityPoolEvent";
1568
+ NewLiquidityPoolEvent.$numTypeParams = 0;
1569
+ return NewLiquidityPoolEvent;
1570
+ }());
1571
+ exports.NewLiquidityPoolEvent = NewLiquidityPoolEvent;
1572
+ /* ============================== Registry =============================== */
1573
+ function isRegistry(type) {
1574
+ type = (0, util_1.compressSuiType)(type);
1575
+ return type === "0x0::lp_pool::Registry";
1576
+ }
1577
+ exports.isRegistry = isRegistry;
1578
+ var Registry = /** @class */ (function () {
1579
+ function Registry(typeArgs, fields) {
1580
+ this.$typeName = Registry.$typeName;
1581
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Registry.$typeName], __read(typeArgs), false));
1582
+ this.$typeArgs = typeArgs;
1583
+ this.id = fields.id;
1584
+ this.numPool = fields.numPool;
1585
+ this.liquidityPoolRegistry = fields.liquidityPoolRegistry;
1586
+ }
1587
+ Registry.reified = function () {
1588
+ var _this = this;
1589
+ return {
1590
+ typeName: Registry.$typeName,
1591
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Registry.$typeName], [], false)),
1592
+ typeArgs: [],
1593
+ reifiedTypeArgs: [],
1594
+ fromFields: function (fields) { return Registry.fromFields(fields); },
1595
+ fromFieldsWithTypes: function (item) { return Registry.fromFieldsWithTypes(item); },
1596
+ fromBcs: function (data) { return Registry.fromBcs(data); },
1597
+ bcs: Registry.bcs,
1598
+ fromJSONField: function (field) { return Registry.fromJSONField(field); },
1599
+ fromJSON: function (json) { return Registry.fromJSON(json); },
1600
+ fromSuiParsedData: function (content) { return Registry.fromSuiParsedData(content); },
1601
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1602
+ return [2 /*return*/, Registry.fetch(client, id)];
1603
+ }); }); },
1604
+ new: function (fields) {
1605
+ return new Registry([], fields);
1606
+ },
1607
+ kind: "StructClassReified",
1608
+ };
1609
+ };
1610
+ Object.defineProperty(Registry, "r", {
1611
+ get: function () {
1612
+ return Registry.reified();
1613
+ },
1614
+ enumerable: false,
1615
+ configurable: true
1616
+ });
1617
+ Registry.phantom = function () {
1618
+ return (0, reified_1.phantom)(Registry.reified());
1619
+ };
1620
+ Object.defineProperty(Registry, "p", {
1621
+ get: function () {
1622
+ return Registry.phantom();
1623
+ },
1624
+ enumerable: false,
1625
+ configurable: true
1626
+ });
1627
+ Object.defineProperty(Registry, "bcs", {
1628
+ get: function () {
1629
+ return bcs_1.bcs.struct("Registry", {
1630
+ id: structs_2.UID.bcs,
1631
+ num_pool: bcs_1.bcs.u64(),
1632
+ liquidity_pool_registry: structs_2.UID.bcs,
1633
+ });
1634
+ },
1635
+ enumerable: false,
1636
+ configurable: true
1637
+ });
1638
+ Registry.fromFields = function (fields) {
1639
+ return Registry.reified().new({
1640
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1641
+ numPool: (0, reified_1.decodeFromFields)("u64", fields.num_pool),
1642
+ liquidityPoolRegistry: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.liquidity_pool_registry),
1643
+ });
1644
+ };
1645
+ Registry.fromFieldsWithTypes = function (item) {
1646
+ if (!isRegistry(item.type)) {
1647
+ throw new Error("not a Registry type");
1648
+ }
1649
+ return Registry.reified().new({
1650
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1651
+ numPool: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.num_pool),
1652
+ liquidityPoolRegistry: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.liquidity_pool_registry),
1653
+ });
1654
+ };
1655
+ Registry.fromBcs = function (data) {
1656
+ return Registry.fromFields(Registry.bcs.parse(data));
1657
+ };
1658
+ Registry.prototype.toJSONField = function () {
1659
+ return {
1660
+ id: this.id,
1661
+ numPool: this.numPool.toString(),
1662
+ liquidityPoolRegistry: this.liquidityPoolRegistry,
1663
+ };
1664
+ };
1665
+ Registry.prototype.toJSON = function () {
1666
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1667
+ };
1668
+ Registry.fromJSONField = function (field) {
1669
+ return Registry.reified().new({
1670
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1671
+ numPool: (0, reified_1.decodeFromJSONField)("u64", field.numPool),
1672
+ liquidityPoolRegistry: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.liquidityPoolRegistry),
1673
+ });
1674
+ };
1675
+ Registry.fromJSON = function (json) {
1676
+ if (json.$typeName !== Registry.$typeName) {
1677
+ throw new Error("not a WithTwoGenerics json object");
1678
+ }
1679
+ return Registry.fromJSONField(json);
1680
+ };
1681
+ Registry.fromSuiParsedData = function (content) {
1682
+ if (content.dataType !== "moveObject") {
1683
+ throw new Error("not an object");
1684
+ }
1685
+ if (!isRegistry(content.type)) {
1686
+ throw new Error("object at ".concat(content.fields.id, " is not a Registry object"));
1687
+ }
1688
+ return Registry.fromFieldsWithTypes(content);
1689
+ };
1690
+ Registry.fetch = function (client, id) {
1691
+ return __awaiter(this, void 0, void 0, function () {
1692
+ var res;
1693
+ var _a, _b;
1694
+ return __generator(this, function (_c) {
1695
+ switch (_c.label) {
1696
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1697
+ case 1:
1698
+ res = _c.sent();
1699
+ if (res.error) {
1700
+ throw new Error("error fetching Registry object at id ".concat(id, ": ").concat(res.error.code));
1701
+ }
1702
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRegistry(res.data.bcs.type)) {
1703
+ throw new Error("object at id ".concat(id, " is not a Registry object"));
1704
+ }
1705
+ return [2 /*return*/, Registry.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1706
+ }
1707
+ });
1708
+ });
1709
+ };
1710
+ Registry.$typeName = "0x0::lp_pool::Registry";
1711
+ Registry.$numTypeParams = 0;
1712
+ return Registry;
1713
+ }());
1714
+ exports.Registry = Registry;
1715
+ /* ============================== ResumePoolEvent =============================== */
1716
+ function isResumePoolEvent(type) {
1717
+ type = (0, util_1.compressSuiType)(type);
1718
+ return type === "0x0::lp_pool::ResumePoolEvent";
1719
+ }
1720
+ exports.isResumePoolEvent = isResumePoolEvent;
1721
+ var ResumePoolEvent = /** @class */ (function () {
1722
+ function ResumePoolEvent(typeArgs, fields) {
1723
+ this.$typeName = ResumePoolEvent.$typeName;
1724
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ResumePoolEvent.$typeName], __read(typeArgs), false));
1725
+ this.$typeArgs = typeArgs;
1726
+ this.sender = fields.sender;
1727
+ this.index = fields.index;
1728
+ this.u64Padding = fields.u64Padding;
1729
+ }
1730
+ ResumePoolEvent.reified = function () {
1731
+ var _this = this;
1732
+ return {
1733
+ typeName: ResumePoolEvent.$typeName,
1734
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ResumePoolEvent.$typeName], [], false)),
1735
+ typeArgs: [],
1736
+ reifiedTypeArgs: [],
1737
+ fromFields: function (fields) { return ResumePoolEvent.fromFields(fields); },
1738
+ fromFieldsWithTypes: function (item) { return ResumePoolEvent.fromFieldsWithTypes(item); },
1739
+ fromBcs: function (data) { return ResumePoolEvent.fromBcs(data); },
1740
+ bcs: ResumePoolEvent.bcs,
1741
+ fromJSONField: function (field) { return ResumePoolEvent.fromJSONField(field); },
1742
+ fromJSON: function (json) { return ResumePoolEvent.fromJSON(json); },
1743
+ fromSuiParsedData: function (content) { return ResumePoolEvent.fromSuiParsedData(content); },
1744
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1745
+ return [2 /*return*/, ResumePoolEvent.fetch(client, id)];
1746
+ }); }); },
1747
+ new: function (fields) {
1748
+ return new ResumePoolEvent([], fields);
1749
+ },
1750
+ kind: "StructClassReified",
1751
+ };
1752
+ };
1753
+ Object.defineProperty(ResumePoolEvent, "r", {
1754
+ get: function () {
1755
+ return ResumePoolEvent.reified();
1756
+ },
1757
+ enumerable: false,
1758
+ configurable: true
1759
+ });
1760
+ ResumePoolEvent.phantom = function () {
1761
+ return (0, reified_1.phantom)(ResumePoolEvent.reified());
1762
+ };
1763
+ Object.defineProperty(ResumePoolEvent, "p", {
1764
+ get: function () {
1765
+ return ResumePoolEvent.phantom();
1766
+ },
1767
+ enumerable: false,
1768
+ configurable: true
1769
+ });
1770
+ Object.defineProperty(ResumePoolEvent, "bcs", {
1771
+ get: function () {
1772
+ return bcs_1.bcs.struct("ResumePoolEvent", {
1773
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
1774
+ index: bcs_1.bcs.u64(),
1775
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1776
+ });
1777
+ },
1778
+ enumerable: false,
1779
+ configurable: true
1780
+ });
1781
+ ResumePoolEvent.fromFields = function (fields) {
1782
+ return ResumePoolEvent.reified().new({
1783
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1784
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
1785
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
1786
+ });
1787
+ };
1788
+ ResumePoolEvent.fromFieldsWithTypes = function (item) {
1789
+ if (!isResumePoolEvent(item.type)) {
1790
+ throw new Error("not a ResumePoolEvent type");
1791
+ }
1792
+ return ResumePoolEvent.reified().new({
1793
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1794
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
1795
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
1796
+ });
1797
+ };
1798
+ ResumePoolEvent.fromBcs = function (data) {
1799
+ return ResumePoolEvent.fromFields(ResumePoolEvent.bcs.parse(data));
1800
+ };
1801
+ ResumePoolEvent.prototype.toJSONField = function () {
1802
+ return {
1803
+ sender: this.sender,
1804
+ index: this.index.toString(),
1805
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
1806
+ };
1807
+ };
1808
+ ResumePoolEvent.prototype.toJSON = function () {
1809
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1810
+ };
1811
+ ResumePoolEvent.fromJSONField = function (field) {
1812
+ return ResumePoolEvent.reified().new({
1813
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1814
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
1815
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
1816
+ });
1817
+ };
1818
+ ResumePoolEvent.fromJSON = function (json) {
1819
+ if (json.$typeName !== ResumePoolEvent.$typeName) {
1820
+ throw new Error("not a WithTwoGenerics json object");
1821
+ }
1822
+ return ResumePoolEvent.fromJSONField(json);
1823
+ };
1824
+ ResumePoolEvent.fromSuiParsedData = function (content) {
1825
+ if (content.dataType !== "moveObject") {
1826
+ throw new Error("not an object");
1827
+ }
1828
+ if (!isResumePoolEvent(content.type)) {
1829
+ throw new Error("object at ".concat(content.fields.id, " is not a ResumePoolEvent object"));
1830
+ }
1831
+ return ResumePoolEvent.fromFieldsWithTypes(content);
1832
+ };
1833
+ ResumePoolEvent.fetch = function (client, id) {
1834
+ return __awaiter(this, void 0, void 0, function () {
1835
+ var res;
1836
+ var _a, _b;
1837
+ return __generator(this, function (_c) {
1838
+ switch (_c.label) {
1839
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1840
+ case 1:
1841
+ res = _c.sent();
1842
+ if (res.error) {
1843
+ throw new Error("error fetching ResumePoolEvent object at id ".concat(id, ": ").concat(res.error.code));
1844
+ }
1845
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isResumePoolEvent(res.data.bcs.type)) {
1846
+ throw new Error("object at id ".concat(id, " is not a ResumePoolEvent object"));
1847
+ }
1848
+ return [2 /*return*/, ResumePoolEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1849
+ }
1850
+ });
1851
+ });
1852
+ };
1853
+ ResumePoolEvent.$typeName = "0x0::lp_pool::ResumePoolEvent";
1854
+ ResumePoolEvent.$numTypeParams = 0;
1855
+ return ResumePoolEvent;
1856
+ }());
1857
+ exports.ResumePoolEvent = ResumePoolEvent;
1858
+ /* ============================== ResumeTokenPoolEvent =============================== */
1859
+ function isResumeTokenPoolEvent(type) {
1860
+ type = (0, util_1.compressSuiType)(type);
1861
+ return type === "0x0::lp_pool::ResumeTokenPoolEvent";
1862
+ }
1863
+ exports.isResumeTokenPoolEvent = isResumeTokenPoolEvent;
1864
+ var ResumeTokenPoolEvent = /** @class */ (function () {
1865
+ function ResumeTokenPoolEvent(typeArgs, fields) {
1866
+ this.$typeName = ResumeTokenPoolEvent.$typeName;
1867
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ResumeTokenPoolEvent.$typeName], __read(typeArgs), false));
1868
+ this.$typeArgs = typeArgs;
1869
+ this.sender = fields.sender;
1870
+ this.index = fields.index;
1871
+ this.liquidityToken = fields.liquidityToken;
1872
+ this.u64Padding = fields.u64Padding;
1873
+ }
1874
+ ResumeTokenPoolEvent.reified = function () {
1875
+ var _this = this;
1876
+ return {
1877
+ typeName: ResumeTokenPoolEvent.$typeName,
1878
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ResumeTokenPoolEvent.$typeName], [], false)),
1879
+ typeArgs: [],
1880
+ reifiedTypeArgs: [],
1881
+ fromFields: function (fields) { return ResumeTokenPoolEvent.fromFields(fields); },
1882
+ fromFieldsWithTypes: function (item) { return ResumeTokenPoolEvent.fromFieldsWithTypes(item); },
1883
+ fromBcs: function (data) { return ResumeTokenPoolEvent.fromBcs(data); },
1884
+ bcs: ResumeTokenPoolEvent.bcs,
1885
+ fromJSONField: function (field) { return ResumeTokenPoolEvent.fromJSONField(field); },
1886
+ fromJSON: function (json) { return ResumeTokenPoolEvent.fromJSON(json); },
1887
+ fromSuiParsedData: function (content) { return ResumeTokenPoolEvent.fromSuiParsedData(content); },
1888
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1889
+ return [2 /*return*/, ResumeTokenPoolEvent.fetch(client, id)];
1890
+ }); }); },
1891
+ new: function (fields) {
1892
+ return new ResumeTokenPoolEvent([], fields);
1893
+ },
1894
+ kind: "StructClassReified",
1895
+ };
1896
+ };
1897
+ Object.defineProperty(ResumeTokenPoolEvent, "r", {
1898
+ get: function () {
1899
+ return ResumeTokenPoolEvent.reified();
1900
+ },
1901
+ enumerable: false,
1902
+ configurable: true
1903
+ });
1904
+ ResumeTokenPoolEvent.phantom = function () {
1905
+ return (0, reified_1.phantom)(ResumeTokenPoolEvent.reified());
1906
+ };
1907
+ Object.defineProperty(ResumeTokenPoolEvent, "p", {
1908
+ get: function () {
1909
+ return ResumeTokenPoolEvent.phantom();
1910
+ },
1911
+ enumerable: false,
1912
+ configurable: true
1913
+ });
1914
+ Object.defineProperty(ResumeTokenPoolEvent, "bcs", {
1915
+ get: function () {
1916
+ return bcs_1.bcs.struct("ResumeTokenPoolEvent", {
1917
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
1918
+ index: bcs_1.bcs.u64(),
1919
+ liquidity_token: structs_1.TypeName.bcs,
1920
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1921
+ });
1922
+ },
1923
+ enumerable: false,
1924
+ configurable: true
1925
+ });
1926
+ ResumeTokenPoolEvent.fromFields = function (fields) {
1927
+ return ResumeTokenPoolEvent.reified().new({
1928
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1929
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
1930
+ liquidityToken: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token),
1931
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
1932
+ });
1933
+ };
1934
+ ResumeTokenPoolEvent.fromFieldsWithTypes = function (item) {
1935
+ if (!isResumeTokenPoolEvent(item.type)) {
1936
+ throw new Error("not a ResumeTokenPoolEvent type");
1937
+ }
1938
+ return ResumeTokenPoolEvent.reified().new({
1939
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1940
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
1941
+ liquidityToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token),
1942
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
1943
+ });
1944
+ };
1945
+ ResumeTokenPoolEvent.fromBcs = function (data) {
1946
+ return ResumeTokenPoolEvent.fromFields(ResumeTokenPoolEvent.bcs.parse(data));
1947
+ };
1948
+ ResumeTokenPoolEvent.prototype.toJSONField = function () {
1949
+ return {
1950
+ sender: this.sender,
1951
+ index: this.index.toString(),
1952
+ liquidityToken: this.liquidityToken.toJSONField(),
1953
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
1954
+ };
1955
+ };
1956
+ ResumeTokenPoolEvent.prototype.toJSON = function () {
1957
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1958
+ };
1959
+ ResumeTokenPoolEvent.fromJSONField = function (field) {
1960
+ return ResumeTokenPoolEvent.reified().new({
1961
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1962
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
1963
+ liquidityToken: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityToken),
1964
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
1965
+ });
1966
+ };
1967
+ ResumeTokenPoolEvent.fromJSON = function (json) {
1968
+ if (json.$typeName !== ResumeTokenPoolEvent.$typeName) {
1969
+ throw new Error("not a WithTwoGenerics json object");
1970
+ }
1971
+ return ResumeTokenPoolEvent.fromJSONField(json);
1972
+ };
1973
+ ResumeTokenPoolEvent.fromSuiParsedData = function (content) {
1974
+ if (content.dataType !== "moveObject") {
1975
+ throw new Error("not an object");
1976
+ }
1977
+ if (!isResumeTokenPoolEvent(content.type)) {
1978
+ throw new Error("object at ".concat(content.fields.id, " is not a ResumeTokenPoolEvent object"));
1979
+ }
1980
+ return ResumeTokenPoolEvent.fromFieldsWithTypes(content);
1981
+ };
1982
+ ResumeTokenPoolEvent.fetch = function (client, id) {
1983
+ return __awaiter(this, void 0, void 0, function () {
1984
+ var res;
1985
+ var _a, _b;
1986
+ return __generator(this, function (_c) {
1987
+ switch (_c.label) {
1988
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1989
+ case 1:
1990
+ res = _c.sent();
1991
+ if (res.error) {
1992
+ throw new Error("error fetching ResumeTokenPoolEvent object at id ".concat(id, ": ").concat(res.error.code));
1993
+ }
1994
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isResumeTokenPoolEvent(res.data.bcs.type)) {
1995
+ throw new Error("object at id ".concat(id, " is not a ResumeTokenPoolEvent object"));
1996
+ }
1997
+ return [2 /*return*/, ResumeTokenPoolEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
1998
+ }
1999
+ });
2000
+ });
2001
+ };
2002
+ ResumeTokenPoolEvent.$typeName = "0x0::lp_pool::ResumeTokenPoolEvent";
2003
+ ResumeTokenPoolEvent.$numTypeParams = 0;
2004
+ return ResumeTokenPoolEvent;
2005
+ }());
2006
+ exports.ResumeTokenPoolEvent = ResumeTokenPoolEvent;
2007
+ /* ============================== SpotConfig =============================== */
2008
+ function isSpotConfig(type) {
2009
+ type = (0, util_1.compressSuiType)(type);
2010
+ return type === "0x0::lp_pool::SpotConfig";
2011
+ }
2012
+ exports.isSpotConfig = isSpotConfig;
2013
+ var SpotConfig = /** @class */ (function () {
2014
+ function SpotConfig(typeArgs, fields) {
2015
+ this.$typeName = SpotConfig.$typeName;
2016
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SpotConfig.$typeName], __read(typeArgs), false));
2017
+ this.$typeArgs = typeArgs;
2018
+ this.minDeposit = fields.minDeposit;
2019
+ this.maxCapacity = fields.maxCapacity;
2020
+ this.targetWeightBp = fields.targetWeightBp;
2021
+ this.basicMintFeeBp = fields.basicMintFeeBp;
2022
+ this.additionalMintFeeBp = fields.additionalMintFeeBp;
2023
+ this.basicBurnFeeBp = fields.basicBurnFeeBp;
2024
+ this.additionalBurnFeeBp = fields.additionalBurnFeeBp;
2025
+ this.swapFeeBp = fields.swapFeeBp;
2026
+ this.u64Padding = fields.u64Padding;
2027
+ }
2028
+ SpotConfig.reified = function () {
2029
+ var _this = this;
2030
+ return {
2031
+ typeName: SpotConfig.$typeName,
2032
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SpotConfig.$typeName], [], false)),
2033
+ typeArgs: [],
2034
+ reifiedTypeArgs: [],
2035
+ fromFields: function (fields) { return SpotConfig.fromFields(fields); },
2036
+ fromFieldsWithTypes: function (item) { return SpotConfig.fromFieldsWithTypes(item); },
2037
+ fromBcs: function (data) { return SpotConfig.fromBcs(data); },
2038
+ bcs: SpotConfig.bcs,
2039
+ fromJSONField: function (field) { return SpotConfig.fromJSONField(field); },
2040
+ fromJSON: function (json) { return SpotConfig.fromJSON(json); },
2041
+ fromSuiParsedData: function (content) { return SpotConfig.fromSuiParsedData(content); },
2042
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2043
+ return [2 /*return*/, SpotConfig.fetch(client, id)];
2044
+ }); }); },
2045
+ new: function (fields) {
2046
+ return new SpotConfig([], fields);
2047
+ },
2048
+ kind: "StructClassReified",
2049
+ };
2050
+ };
2051
+ Object.defineProperty(SpotConfig, "r", {
2052
+ get: function () {
2053
+ return SpotConfig.reified();
2054
+ },
2055
+ enumerable: false,
2056
+ configurable: true
2057
+ });
2058
+ SpotConfig.phantom = function () {
2059
+ return (0, reified_1.phantom)(SpotConfig.reified());
2060
+ };
2061
+ Object.defineProperty(SpotConfig, "p", {
2062
+ get: function () {
2063
+ return SpotConfig.phantom();
2064
+ },
2065
+ enumerable: false,
2066
+ configurable: true
2067
+ });
2068
+ Object.defineProperty(SpotConfig, "bcs", {
2069
+ get: function () {
2070
+ return bcs_1.bcs.struct("SpotConfig", {
2071
+ min_deposit: bcs_1.bcs.u64(),
2072
+ max_capacity: bcs_1.bcs.u64(),
2073
+ target_weight_bp: bcs_1.bcs.u64(),
2074
+ basic_mint_fee_bp: bcs_1.bcs.u64(),
2075
+ additional_mint_fee_bp: bcs_1.bcs.u64(),
2076
+ basic_burn_fee_bp: bcs_1.bcs.u64(),
2077
+ additional_burn_fee_bp: bcs_1.bcs.u64(),
2078
+ swap_fee_bp: bcs_1.bcs.u64(),
2079
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
2080
+ });
2081
+ },
2082
+ enumerable: false,
2083
+ configurable: true
2084
+ });
2085
+ SpotConfig.fromFields = function (fields) {
2086
+ return SpotConfig.reified().new({
2087
+ minDeposit: (0, reified_1.decodeFromFields)("u64", fields.min_deposit),
2088
+ maxCapacity: (0, reified_1.decodeFromFields)("u64", fields.max_capacity),
2089
+ targetWeightBp: (0, reified_1.decodeFromFields)("u64", fields.target_weight_bp),
2090
+ basicMintFeeBp: (0, reified_1.decodeFromFields)("u64", fields.basic_mint_fee_bp),
2091
+ additionalMintFeeBp: (0, reified_1.decodeFromFields)("u64", fields.additional_mint_fee_bp),
2092
+ basicBurnFeeBp: (0, reified_1.decodeFromFields)("u64", fields.basic_burn_fee_bp),
2093
+ additionalBurnFeeBp: (0, reified_1.decodeFromFields)("u64", fields.additional_burn_fee_bp),
2094
+ swapFeeBp: (0, reified_1.decodeFromFields)("u64", fields.swap_fee_bp),
2095
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
2096
+ });
2097
+ };
2098
+ SpotConfig.fromFieldsWithTypes = function (item) {
2099
+ if (!isSpotConfig(item.type)) {
2100
+ throw new Error("not a SpotConfig type");
2101
+ }
2102
+ return SpotConfig.reified().new({
2103
+ minDeposit: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_deposit),
2104
+ maxCapacity: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.max_capacity),
2105
+ targetWeightBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.target_weight_bp),
2106
+ basicMintFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.basic_mint_fee_bp),
2107
+ additionalMintFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.additional_mint_fee_bp),
2108
+ basicBurnFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.basic_burn_fee_bp),
2109
+ additionalBurnFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.additional_burn_fee_bp),
2110
+ swapFeeBp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.swap_fee_bp),
2111
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
2112
+ });
2113
+ };
2114
+ SpotConfig.fromBcs = function (data) {
2115
+ return SpotConfig.fromFields(SpotConfig.bcs.parse(data));
2116
+ };
2117
+ SpotConfig.prototype.toJSONField = function () {
2118
+ return {
2119
+ minDeposit: this.minDeposit.toString(),
2120
+ maxCapacity: this.maxCapacity.toString(),
2121
+ targetWeightBp: this.targetWeightBp.toString(),
2122
+ basicMintFeeBp: this.basicMintFeeBp.toString(),
2123
+ additionalMintFeeBp: this.additionalMintFeeBp.toString(),
2124
+ basicBurnFeeBp: this.basicBurnFeeBp.toString(),
2125
+ additionalBurnFeeBp: this.additionalBurnFeeBp.toString(),
2126
+ swapFeeBp: this.swapFeeBp.toString(),
2127
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
2128
+ };
2129
+ };
2130
+ SpotConfig.prototype.toJSON = function () {
2131
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2132
+ };
2133
+ SpotConfig.fromJSONField = function (field) {
2134
+ return SpotConfig.reified().new({
2135
+ minDeposit: (0, reified_1.decodeFromJSONField)("u64", field.minDeposit),
2136
+ maxCapacity: (0, reified_1.decodeFromJSONField)("u64", field.maxCapacity),
2137
+ targetWeightBp: (0, reified_1.decodeFromJSONField)("u64", field.targetWeightBp),
2138
+ basicMintFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.basicMintFeeBp),
2139
+ additionalMintFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.additionalMintFeeBp),
2140
+ basicBurnFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.basicBurnFeeBp),
2141
+ additionalBurnFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.additionalBurnFeeBp),
2142
+ swapFeeBp: (0, reified_1.decodeFromJSONField)("u64", field.swapFeeBp),
2143
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
2144
+ });
2145
+ };
2146
+ SpotConfig.fromJSON = function (json) {
2147
+ if (json.$typeName !== SpotConfig.$typeName) {
2148
+ throw new Error("not a WithTwoGenerics json object");
2149
+ }
2150
+ return SpotConfig.fromJSONField(json);
2151
+ };
2152
+ SpotConfig.fromSuiParsedData = function (content) {
2153
+ if (content.dataType !== "moveObject") {
2154
+ throw new Error("not an object");
2155
+ }
2156
+ if (!isSpotConfig(content.type)) {
2157
+ throw new Error("object at ".concat(content.fields.id, " is not a SpotConfig object"));
2158
+ }
2159
+ return SpotConfig.fromFieldsWithTypes(content);
2160
+ };
2161
+ SpotConfig.fetch = function (client, id) {
2162
+ return __awaiter(this, void 0, void 0, function () {
2163
+ var res;
2164
+ var _a, _b;
2165
+ return __generator(this, function (_c) {
2166
+ switch (_c.label) {
2167
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2168
+ case 1:
2169
+ res = _c.sent();
2170
+ if (res.error) {
2171
+ throw new Error("error fetching SpotConfig object at id ".concat(id, ": ").concat(res.error.code));
2172
+ }
2173
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSpotConfig(res.data.bcs.type)) {
2174
+ throw new Error("object at id ".concat(id, " is not a SpotConfig object"));
2175
+ }
2176
+ return [2 /*return*/, SpotConfig.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2177
+ }
2178
+ });
2179
+ });
2180
+ };
2181
+ SpotConfig.$typeName = "0x0::lp_pool::SpotConfig";
2182
+ SpotConfig.$numTypeParams = 0;
2183
+ return SpotConfig;
2184
+ }());
2185
+ exports.SpotConfig = SpotConfig;
2186
+ /* ============================== SuspendPoolEvent =============================== */
2187
+ function isSuspendPoolEvent(type) {
2188
+ type = (0, util_1.compressSuiType)(type);
2189
+ return type === "0x0::lp_pool::SuspendPoolEvent";
2190
+ }
2191
+ exports.isSuspendPoolEvent = isSuspendPoolEvent;
2192
+ var SuspendPoolEvent = /** @class */ (function () {
2193
+ function SuspendPoolEvent(typeArgs, fields) {
2194
+ this.$typeName = SuspendPoolEvent.$typeName;
2195
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SuspendPoolEvent.$typeName], __read(typeArgs), false));
2196
+ this.$typeArgs = typeArgs;
2197
+ this.sender = fields.sender;
2198
+ this.index = fields.index;
2199
+ this.u64Padding = fields.u64Padding;
2200
+ }
2201
+ SuspendPoolEvent.reified = function () {
2202
+ var _this = this;
2203
+ return {
2204
+ typeName: SuspendPoolEvent.$typeName,
2205
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SuspendPoolEvent.$typeName], [], false)),
2206
+ typeArgs: [],
2207
+ reifiedTypeArgs: [],
2208
+ fromFields: function (fields) { return SuspendPoolEvent.fromFields(fields); },
2209
+ fromFieldsWithTypes: function (item) { return SuspendPoolEvent.fromFieldsWithTypes(item); },
2210
+ fromBcs: function (data) { return SuspendPoolEvent.fromBcs(data); },
2211
+ bcs: SuspendPoolEvent.bcs,
2212
+ fromJSONField: function (field) { return SuspendPoolEvent.fromJSONField(field); },
2213
+ fromJSON: function (json) { return SuspendPoolEvent.fromJSON(json); },
2214
+ fromSuiParsedData: function (content) { return SuspendPoolEvent.fromSuiParsedData(content); },
2215
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2216
+ return [2 /*return*/, SuspendPoolEvent.fetch(client, id)];
2217
+ }); }); },
2218
+ new: function (fields) {
2219
+ return new SuspendPoolEvent([], fields);
2220
+ },
2221
+ kind: "StructClassReified",
2222
+ };
2223
+ };
2224
+ Object.defineProperty(SuspendPoolEvent, "r", {
2225
+ get: function () {
2226
+ return SuspendPoolEvent.reified();
2227
+ },
2228
+ enumerable: false,
2229
+ configurable: true
2230
+ });
2231
+ SuspendPoolEvent.phantom = function () {
2232
+ return (0, reified_1.phantom)(SuspendPoolEvent.reified());
2233
+ };
2234
+ Object.defineProperty(SuspendPoolEvent, "p", {
2235
+ get: function () {
2236
+ return SuspendPoolEvent.phantom();
2237
+ },
2238
+ enumerable: false,
2239
+ configurable: true
2240
+ });
2241
+ Object.defineProperty(SuspendPoolEvent, "bcs", {
2242
+ get: function () {
2243
+ return bcs_1.bcs.struct("SuspendPoolEvent", {
2244
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
2245
+ index: bcs_1.bcs.u64(),
2246
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
2247
+ });
2248
+ },
2249
+ enumerable: false,
2250
+ configurable: true
2251
+ });
2252
+ SuspendPoolEvent.fromFields = function (fields) {
2253
+ return SuspendPoolEvent.reified().new({
2254
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2255
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
2256
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
2257
+ });
2258
+ };
2259
+ SuspendPoolEvent.fromFieldsWithTypes = function (item) {
2260
+ if (!isSuspendPoolEvent(item.type)) {
2261
+ throw new Error("not a SuspendPoolEvent type");
2262
+ }
2263
+ return SuspendPoolEvent.reified().new({
2264
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2265
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
2266
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
2267
+ });
2268
+ };
2269
+ SuspendPoolEvent.fromBcs = function (data) {
2270
+ return SuspendPoolEvent.fromFields(SuspendPoolEvent.bcs.parse(data));
2271
+ };
2272
+ SuspendPoolEvent.prototype.toJSONField = function () {
2273
+ return {
2274
+ sender: this.sender,
2275
+ index: this.index.toString(),
2276
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
2277
+ };
2278
+ };
2279
+ SuspendPoolEvent.prototype.toJSON = function () {
2280
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2281
+ };
2282
+ SuspendPoolEvent.fromJSONField = function (field) {
2283
+ return SuspendPoolEvent.reified().new({
2284
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2285
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
2286
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
2287
+ });
2288
+ };
2289
+ SuspendPoolEvent.fromJSON = function (json) {
2290
+ if (json.$typeName !== SuspendPoolEvent.$typeName) {
2291
+ throw new Error("not a WithTwoGenerics json object");
2292
+ }
2293
+ return SuspendPoolEvent.fromJSONField(json);
2294
+ };
2295
+ SuspendPoolEvent.fromSuiParsedData = function (content) {
2296
+ if (content.dataType !== "moveObject") {
2297
+ throw new Error("not an object");
2298
+ }
2299
+ if (!isSuspendPoolEvent(content.type)) {
2300
+ throw new Error("object at ".concat(content.fields.id, " is not a SuspendPoolEvent object"));
2301
+ }
2302
+ return SuspendPoolEvent.fromFieldsWithTypes(content);
2303
+ };
2304
+ SuspendPoolEvent.fetch = function (client, id) {
2305
+ return __awaiter(this, void 0, void 0, function () {
2306
+ var res;
2307
+ var _a, _b;
2308
+ return __generator(this, function (_c) {
2309
+ switch (_c.label) {
2310
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2311
+ case 1:
2312
+ res = _c.sent();
2313
+ if (res.error) {
2314
+ throw new Error("error fetching SuspendPoolEvent object at id ".concat(id, ": ").concat(res.error.code));
2315
+ }
2316
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSuspendPoolEvent(res.data.bcs.type)) {
2317
+ throw new Error("object at id ".concat(id, " is not a SuspendPoolEvent object"));
2318
+ }
2319
+ return [2 /*return*/, SuspendPoolEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2320
+ }
2321
+ });
2322
+ });
2323
+ };
2324
+ SuspendPoolEvent.$typeName = "0x0::lp_pool::SuspendPoolEvent";
2325
+ SuspendPoolEvent.$numTypeParams = 0;
2326
+ return SuspendPoolEvent;
2327
+ }());
2328
+ exports.SuspendPoolEvent = SuspendPoolEvent;
2329
+ /* ============================== SuspendTokenPoolEvent =============================== */
2330
+ function isSuspendTokenPoolEvent(type) {
2331
+ type = (0, util_1.compressSuiType)(type);
2332
+ return type === "0x0::lp_pool::SuspendTokenPoolEvent";
2333
+ }
2334
+ exports.isSuspendTokenPoolEvent = isSuspendTokenPoolEvent;
2335
+ var SuspendTokenPoolEvent = /** @class */ (function () {
2336
+ function SuspendTokenPoolEvent(typeArgs, fields) {
2337
+ this.$typeName = SuspendTokenPoolEvent.$typeName;
2338
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SuspendTokenPoolEvent.$typeName], __read(typeArgs), false));
2339
+ this.$typeArgs = typeArgs;
2340
+ this.sender = fields.sender;
2341
+ this.index = fields.index;
2342
+ this.liquidityToken = fields.liquidityToken;
2343
+ this.u64Padding = fields.u64Padding;
2344
+ }
2345
+ SuspendTokenPoolEvent.reified = function () {
2346
+ var _this = this;
2347
+ return {
2348
+ typeName: SuspendTokenPoolEvent.$typeName,
2349
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SuspendTokenPoolEvent.$typeName], [], false)),
2350
+ typeArgs: [],
2351
+ reifiedTypeArgs: [],
2352
+ fromFields: function (fields) { return SuspendTokenPoolEvent.fromFields(fields); },
2353
+ fromFieldsWithTypes: function (item) { return SuspendTokenPoolEvent.fromFieldsWithTypes(item); },
2354
+ fromBcs: function (data) { return SuspendTokenPoolEvent.fromBcs(data); },
2355
+ bcs: SuspendTokenPoolEvent.bcs,
2356
+ fromJSONField: function (field) { return SuspendTokenPoolEvent.fromJSONField(field); },
2357
+ fromJSON: function (json) { return SuspendTokenPoolEvent.fromJSON(json); },
2358
+ fromSuiParsedData: function (content) { return SuspendTokenPoolEvent.fromSuiParsedData(content); },
2359
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2360
+ return [2 /*return*/, SuspendTokenPoolEvent.fetch(client, id)];
2361
+ }); }); },
2362
+ new: function (fields) {
2363
+ return new SuspendTokenPoolEvent([], fields);
2364
+ },
2365
+ kind: "StructClassReified",
2366
+ };
2367
+ };
2368
+ Object.defineProperty(SuspendTokenPoolEvent, "r", {
2369
+ get: function () {
2370
+ return SuspendTokenPoolEvent.reified();
2371
+ },
2372
+ enumerable: false,
2373
+ configurable: true
2374
+ });
2375
+ SuspendTokenPoolEvent.phantom = function () {
2376
+ return (0, reified_1.phantom)(SuspendTokenPoolEvent.reified());
2377
+ };
2378
+ Object.defineProperty(SuspendTokenPoolEvent, "p", {
2379
+ get: function () {
2380
+ return SuspendTokenPoolEvent.phantom();
2381
+ },
2382
+ enumerable: false,
2383
+ configurable: true
2384
+ });
2385
+ Object.defineProperty(SuspendTokenPoolEvent, "bcs", {
2386
+ get: function () {
2387
+ return bcs_1.bcs.struct("SuspendTokenPoolEvent", {
2388
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
2389
+ index: bcs_1.bcs.u64(),
2390
+ liquidity_token: structs_1.TypeName.bcs,
2391
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
2392
+ });
2393
+ },
2394
+ enumerable: false,
2395
+ configurable: true
2396
+ });
2397
+ SuspendTokenPoolEvent.fromFields = function (fields) {
2398
+ return SuspendTokenPoolEvent.reified().new({
2399
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2400
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
2401
+ liquidityToken: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token),
2402
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
2403
+ });
2404
+ };
2405
+ SuspendTokenPoolEvent.fromFieldsWithTypes = function (item) {
2406
+ if (!isSuspendTokenPoolEvent(item.type)) {
2407
+ throw new Error("not a SuspendTokenPoolEvent type");
2408
+ }
2409
+ return SuspendTokenPoolEvent.reified().new({
2410
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2411
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
2412
+ liquidityToken: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token),
2413
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
2414
+ });
2415
+ };
2416
+ SuspendTokenPoolEvent.fromBcs = function (data) {
2417
+ return SuspendTokenPoolEvent.fromFields(SuspendTokenPoolEvent.bcs.parse(data));
2418
+ };
2419
+ SuspendTokenPoolEvent.prototype.toJSONField = function () {
2420
+ return {
2421
+ sender: this.sender,
2422
+ index: this.index.toString(),
2423
+ liquidityToken: this.liquidityToken.toJSONField(),
2424
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
2425
+ };
2426
+ };
2427
+ SuspendTokenPoolEvent.prototype.toJSON = function () {
2428
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2429
+ };
2430
+ SuspendTokenPoolEvent.fromJSONField = function (field) {
2431
+ return SuspendTokenPoolEvent.reified().new({
2432
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2433
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
2434
+ liquidityToken: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityToken),
2435
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
2436
+ });
2437
+ };
2438
+ SuspendTokenPoolEvent.fromJSON = function (json) {
2439
+ if (json.$typeName !== SuspendTokenPoolEvent.$typeName) {
2440
+ throw new Error("not a WithTwoGenerics json object");
2441
+ }
2442
+ return SuspendTokenPoolEvent.fromJSONField(json);
2443
+ };
2444
+ SuspendTokenPoolEvent.fromSuiParsedData = function (content) {
2445
+ if (content.dataType !== "moveObject") {
2446
+ throw new Error("not an object");
2447
+ }
2448
+ if (!isSuspendTokenPoolEvent(content.type)) {
2449
+ throw new Error("object at ".concat(content.fields.id, " is not a SuspendTokenPoolEvent object"));
2450
+ }
2451
+ return SuspendTokenPoolEvent.fromFieldsWithTypes(content);
2452
+ };
2453
+ SuspendTokenPoolEvent.fetch = function (client, id) {
2454
+ return __awaiter(this, void 0, void 0, function () {
2455
+ var res;
2456
+ var _a, _b;
2457
+ return __generator(this, function (_c) {
2458
+ switch (_c.label) {
2459
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2460
+ case 1:
2461
+ res = _c.sent();
2462
+ if (res.error) {
2463
+ throw new Error("error fetching SuspendTokenPoolEvent object at id ".concat(id, ": ").concat(res.error.code));
2464
+ }
2465
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSuspendTokenPoolEvent(res.data.bcs.type)) {
2466
+ throw new Error("object at id ".concat(id, " is not a SuspendTokenPoolEvent object"));
2467
+ }
2468
+ return [2 /*return*/, SuspendTokenPoolEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2469
+ }
2470
+ });
2471
+ });
2472
+ };
2473
+ SuspendTokenPoolEvent.$typeName = "0x0::lp_pool::SuspendTokenPoolEvent";
2474
+ SuspendTokenPoolEvent.$numTypeParams = 0;
2475
+ return SuspendTokenPoolEvent;
2476
+ }());
2477
+ exports.SuspendTokenPoolEvent = SuspendTokenPoolEvent;
2478
+ /* ============================== SwapEvent =============================== */
2479
+ function isSwapEvent(type) {
2480
+ type = (0, util_1.compressSuiType)(type);
2481
+ return type === "0x0::lp_pool::SwapEvent";
2482
+ }
2483
+ exports.isSwapEvent = isSwapEvent;
2484
+ var SwapEvent = /** @class */ (function () {
2485
+ function SwapEvent(typeArgs, fields) {
2486
+ this.$typeName = SwapEvent.$typeName;
2487
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SwapEvent.$typeName], __read(typeArgs), false));
2488
+ this.$typeArgs = typeArgs;
2489
+ this.sender = fields.sender;
2490
+ this.index = fields.index;
2491
+ this.fromTokenType = fields.fromTokenType;
2492
+ this.fromAmount = fields.fromAmount;
2493
+ this.toTokenType = fields.toTokenType;
2494
+ this.minToAmount = fields.minToAmount;
2495
+ this.actualToAmount = fields.actualToAmount;
2496
+ this.feeAmount = fields.feeAmount;
2497
+ this.feeAmountUsd = fields.feeAmountUsd;
2498
+ this.u64Padding = fields.u64Padding;
2499
+ }
2500
+ SwapEvent.reified = function () {
2501
+ var _this = this;
2502
+ return {
2503
+ typeName: SwapEvent.$typeName,
2504
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SwapEvent.$typeName], [], false)),
2505
+ typeArgs: [],
2506
+ reifiedTypeArgs: [],
2507
+ fromFields: function (fields) { return SwapEvent.fromFields(fields); },
2508
+ fromFieldsWithTypes: function (item) { return SwapEvent.fromFieldsWithTypes(item); },
2509
+ fromBcs: function (data) { return SwapEvent.fromBcs(data); },
2510
+ bcs: SwapEvent.bcs,
2511
+ fromJSONField: function (field) { return SwapEvent.fromJSONField(field); },
2512
+ fromJSON: function (json) { return SwapEvent.fromJSON(json); },
2513
+ fromSuiParsedData: function (content) { return SwapEvent.fromSuiParsedData(content); },
2514
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2515
+ return [2 /*return*/, SwapEvent.fetch(client, id)];
2516
+ }); }); },
2517
+ new: function (fields) {
2518
+ return new SwapEvent([], fields);
2519
+ },
2520
+ kind: "StructClassReified",
2521
+ };
2522
+ };
2523
+ Object.defineProperty(SwapEvent, "r", {
2524
+ get: function () {
2525
+ return SwapEvent.reified();
2526
+ },
2527
+ enumerable: false,
2528
+ configurable: true
2529
+ });
2530
+ SwapEvent.phantom = function () {
2531
+ return (0, reified_1.phantom)(SwapEvent.reified());
2532
+ };
2533
+ Object.defineProperty(SwapEvent, "p", {
2534
+ get: function () {
2535
+ return SwapEvent.phantom();
2536
+ },
2537
+ enumerable: false,
2538
+ configurable: true
2539
+ });
2540
+ Object.defineProperty(SwapEvent, "bcs", {
2541
+ get: function () {
2542
+ return bcs_1.bcs.struct("SwapEvent", {
2543
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
2544
+ index: bcs_1.bcs.u64(),
2545
+ from_token_type: structs_1.TypeName.bcs,
2546
+ from_amount: bcs_1.bcs.u64(),
2547
+ to_token_type: structs_1.TypeName.bcs,
2548
+ min_to_amount: bcs_1.bcs.u64(),
2549
+ actual_to_amount: bcs_1.bcs.u64(),
2550
+ fee_amount: bcs_1.bcs.u64(),
2551
+ fee_amount_usd: bcs_1.bcs.u64(),
2552
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
2553
+ });
2554
+ },
2555
+ enumerable: false,
2556
+ configurable: true
2557
+ });
2558
+ SwapEvent.fromFields = function (fields) {
2559
+ return SwapEvent.reified().new({
2560
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2561
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
2562
+ fromTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.from_token_type),
2563
+ fromAmount: (0, reified_1.decodeFromFields)("u64", fields.from_amount),
2564
+ toTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.to_token_type),
2565
+ minToAmount: (0, reified_1.decodeFromFields)("u64", fields.min_to_amount),
2566
+ actualToAmount: (0, reified_1.decodeFromFields)("u64", fields.actual_to_amount),
2567
+ feeAmount: (0, reified_1.decodeFromFields)("u64", fields.fee_amount),
2568
+ feeAmountUsd: (0, reified_1.decodeFromFields)("u64", fields.fee_amount_usd),
2569
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
2570
+ });
2571
+ };
2572
+ SwapEvent.fromFieldsWithTypes = function (item) {
2573
+ if (!isSwapEvent(item.type)) {
2574
+ throw new Error("not a SwapEvent type");
2575
+ }
2576
+ return SwapEvent.reified().new({
2577
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2578
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
2579
+ fromTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.from_token_type),
2580
+ fromAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.from_amount),
2581
+ toTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.to_token_type),
2582
+ minToAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_to_amount),
2583
+ actualToAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.actual_to_amount),
2584
+ feeAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_amount),
2585
+ feeAmountUsd: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.fee_amount_usd),
2586
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
2587
+ });
2588
+ };
2589
+ SwapEvent.fromBcs = function (data) {
2590
+ return SwapEvent.fromFields(SwapEvent.bcs.parse(data));
2591
+ };
2592
+ SwapEvent.prototype.toJSONField = function () {
2593
+ return {
2594
+ sender: this.sender,
2595
+ index: this.index.toString(),
2596
+ fromTokenType: this.fromTokenType.toJSONField(),
2597
+ fromAmount: this.fromAmount.toString(),
2598
+ toTokenType: this.toTokenType.toJSONField(),
2599
+ minToAmount: this.minToAmount.toString(),
2600
+ actualToAmount: this.actualToAmount.toString(),
2601
+ feeAmount: this.feeAmount.toString(),
2602
+ feeAmountUsd: this.feeAmountUsd.toString(),
2603
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
2604
+ };
2605
+ };
2606
+ SwapEvent.prototype.toJSON = function () {
2607
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2608
+ };
2609
+ SwapEvent.fromJSONField = function (field) {
2610
+ return SwapEvent.reified().new({
2611
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2612
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
2613
+ fromTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.fromTokenType),
2614
+ fromAmount: (0, reified_1.decodeFromJSONField)("u64", field.fromAmount),
2615
+ toTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.toTokenType),
2616
+ minToAmount: (0, reified_1.decodeFromJSONField)("u64", field.minToAmount),
2617
+ actualToAmount: (0, reified_1.decodeFromJSONField)("u64", field.actualToAmount),
2618
+ feeAmount: (0, reified_1.decodeFromJSONField)("u64", field.feeAmount),
2619
+ feeAmountUsd: (0, reified_1.decodeFromJSONField)("u64", field.feeAmountUsd),
2620
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
2621
+ });
2622
+ };
2623
+ SwapEvent.fromJSON = function (json) {
2624
+ if (json.$typeName !== SwapEvent.$typeName) {
2625
+ throw new Error("not a WithTwoGenerics json object");
2626
+ }
2627
+ return SwapEvent.fromJSONField(json);
2628
+ };
2629
+ SwapEvent.fromSuiParsedData = function (content) {
2630
+ if (content.dataType !== "moveObject") {
2631
+ throw new Error("not an object");
2632
+ }
2633
+ if (!isSwapEvent(content.type)) {
2634
+ throw new Error("object at ".concat(content.fields.id, " is not a SwapEvent object"));
2635
+ }
2636
+ return SwapEvent.fromFieldsWithTypes(content);
2637
+ };
2638
+ SwapEvent.fetch = function (client, id) {
2639
+ return __awaiter(this, void 0, void 0, function () {
2640
+ var res;
2641
+ var _a, _b;
2642
+ return __generator(this, function (_c) {
2643
+ switch (_c.label) {
2644
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2645
+ case 1:
2646
+ res = _c.sent();
2647
+ if (res.error) {
2648
+ throw new Error("error fetching SwapEvent object at id ".concat(id, ": ").concat(res.error.code));
2649
+ }
2650
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSwapEvent(res.data.bcs.type)) {
2651
+ throw new Error("object at id ".concat(id, " is not a SwapEvent object"));
2652
+ }
2653
+ return [2 /*return*/, SwapEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2654
+ }
2655
+ });
2656
+ });
2657
+ };
2658
+ SwapEvent.$typeName = "0x0::lp_pool::SwapEvent";
2659
+ SwapEvent.$numTypeParams = 0;
2660
+ return SwapEvent;
2661
+ }());
2662
+ exports.SwapEvent = SwapEvent;
2663
+ /* ============================== TokenPool =============================== */
2664
+ function isTokenPool(type) {
2665
+ type = (0, util_1.compressSuiType)(type);
2666
+ return type === "0x0::lp_pool::TokenPool";
2667
+ }
2668
+ exports.isTokenPool = isTokenPool;
2669
+ var TokenPool = /** @class */ (function () {
2670
+ function TokenPool(typeArgs, fields) {
2671
+ this.$typeName = TokenPool.$typeName;
2672
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TokenPool.$typeName], __read(typeArgs), false));
2673
+ this.$typeArgs = typeArgs;
2674
+ this.tokenType = fields.tokenType;
2675
+ this.config = fields.config;
2676
+ this.state = fields.state;
2677
+ }
2678
+ TokenPool.reified = function () {
2679
+ var _this = this;
2680
+ return {
2681
+ typeName: TokenPool.$typeName,
2682
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TokenPool.$typeName], [], false)),
2683
+ typeArgs: [],
2684
+ reifiedTypeArgs: [],
2685
+ fromFields: function (fields) { return TokenPool.fromFields(fields); },
2686
+ fromFieldsWithTypes: function (item) { return TokenPool.fromFieldsWithTypes(item); },
2687
+ fromBcs: function (data) { return TokenPool.fromBcs(data); },
2688
+ bcs: TokenPool.bcs,
2689
+ fromJSONField: function (field) { return TokenPool.fromJSONField(field); },
2690
+ fromJSON: function (json) { return TokenPool.fromJSON(json); },
2691
+ fromSuiParsedData: function (content) { return TokenPool.fromSuiParsedData(content); },
2692
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2693
+ return [2 /*return*/, TokenPool.fetch(client, id)];
2694
+ }); }); },
2695
+ new: function (fields) {
2696
+ return new TokenPool([], fields);
2697
+ },
2698
+ kind: "StructClassReified",
2699
+ };
2700
+ };
2701
+ Object.defineProperty(TokenPool, "r", {
2702
+ get: function () {
2703
+ return TokenPool.reified();
2704
+ },
2705
+ enumerable: false,
2706
+ configurable: true
2707
+ });
2708
+ TokenPool.phantom = function () {
2709
+ return (0, reified_1.phantom)(TokenPool.reified());
2710
+ };
2711
+ Object.defineProperty(TokenPool, "p", {
2712
+ get: function () {
2713
+ return TokenPool.phantom();
2714
+ },
2715
+ enumerable: false,
2716
+ configurable: true
2717
+ });
2718
+ Object.defineProperty(TokenPool, "bcs", {
2719
+ get: function () {
2720
+ return bcs_1.bcs.struct("TokenPool", {
2721
+ token_type: structs_1.TypeName.bcs,
2722
+ config: Config.bcs,
2723
+ state: State.bcs,
2724
+ });
2725
+ },
2726
+ enumerable: false,
2727
+ configurable: true
2728
+ });
2729
+ TokenPool.fromFields = function (fields) {
2730
+ return TokenPool.reified().new({
2731
+ tokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.token_type),
2732
+ config: (0, reified_1.decodeFromFields)(Config.reified(), fields.config),
2733
+ state: (0, reified_1.decodeFromFields)(State.reified(), fields.state),
2734
+ });
2735
+ };
2736
+ TokenPool.fromFieldsWithTypes = function (item) {
2737
+ if (!isTokenPool(item.type)) {
2738
+ throw new Error("not a TokenPool type");
2739
+ }
2740
+ return TokenPool.reified().new({
2741
+ tokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.token_type),
2742
+ config: (0, reified_1.decodeFromFieldsWithTypes)(Config.reified(), item.fields.config),
2743
+ state: (0, reified_1.decodeFromFieldsWithTypes)(State.reified(), item.fields.state),
2744
+ });
2745
+ };
2746
+ TokenPool.fromBcs = function (data) {
2747
+ return TokenPool.fromFields(TokenPool.bcs.parse(data));
2748
+ };
2749
+ TokenPool.prototype.toJSONField = function () {
2750
+ return {
2751
+ tokenType: this.tokenType.toJSONField(),
2752
+ config: this.config.toJSONField(),
2753
+ state: this.state.toJSONField(),
2754
+ };
2755
+ };
2756
+ TokenPool.prototype.toJSON = function () {
2757
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2758
+ };
2759
+ TokenPool.fromJSONField = function (field) {
2760
+ return TokenPool.reified().new({
2761
+ tokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.tokenType),
2762
+ config: (0, reified_1.decodeFromJSONField)(Config.reified(), field.config),
2763
+ state: (0, reified_1.decodeFromJSONField)(State.reified(), field.state),
2764
+ });
2765
+ };
2766
+ TokenPool.fromJSON = function (json) {
2767
+ if (json.$typeName !== TokenPool.$typeName) {
2768
+ throw new Error("not a WithTwoGenerics json object");
2769
+ }
2770
+ return TokenPool.fromJSONField(json);
2771
+ };
2772
+ TokenPool.fromSuiParsedData = function (content) {
2773
+ if (content.dataType !== "moveObject") {
2774
+ throw new Error("not an object");
2775
+ }
2776
+ if (!isTokenPool(content.type)) {
2777
+ throw new Error("object at ".concat(content.fields.id, " is not a TokenPool object"));
2778
+ }
2779
+ return TokenPool.fromFieldsWithTypes(content);
2780
+ };
2781
+ TokenPool.fetch = function (client, id) {
2782
+ return __awaiter(this, void 0, void 0, function () {
2783
+ var res;
2784
+ var _a, _b;
2785
+ return __generator(this, function (_c) {
2786
+ switch (_c.label) {
2787
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2788
+ case 1:
2789
+ res = _c.sent();
2790
+ if (res.error) {
2791
+ throw new Error("error fetching TokenPool object at id ".concat(id, ": ").concat(res.error.code));
2792
+ }
2793
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTokenPool(res.data.bcs.type)) {
2794
+ throw new Error("object at id ".concat(id, " is not a TokenPool object"));
2795
+ }
2796
+ return [2 /*return*/, TokenPool.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2797
+ }
2798
+ });
2799
+ });
2800
+ };
2801
+ TokenPool.$typeName = "0x0::lp_pool::TokenPool";
2802
+ TokenPool.$numTypeParams = 0;
2803
+ return TokenPool;
2804
+ }());
2805
+ exports.TokenPool = TokenPool;
2806
+ /* ============================== UpdateFundingInfoEvent =============================== */
2807
+ function isUpdateFundingInfoEvent(type) {
2808
+ type = (0, util_1.compressSuiType)(type);
2809
+ return type === "0x0::lp_pool::UpdateFundingInfoEvent";
2810
+ }
2811
+ exports.isUpdateFundingInfoEvent = isUpdateFundingInfoEvent;
2812
+ var UpdateFundingInfoEvent = /** @class */ (function () {
2813
+ function UpdateFundingInfoEvent(typeArgs, fields) {
2814
+ this.$typeName = UpdateFundingInfoEvent.$typeName;
2815
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFundingInfoEvent.$typeName], __read(typeArgs), false));
2816
+ this.$typeArgs = typeArgs;
2817
+ this.index = fields.index;
2818
+ this.liquidityTokenType = fields.liquidityTokenType;
2819
+ this.previousFundingTsMs = fields.previousFundingTsMs;
2820
+ this.previousCumulativeFundingRate = fields.previousCumulativeFundingRate;
2821
+ this.fundingIntervalTsMs = fields.fundingIntervalTsMs;
2822
+ this.lastFundingTsMs = fields.lastFundingTsMs;
2823
+ this.lastCumulativeFundingRate = fields.lastCumulativeFundingRate;
2824
+ this.u64Padding = fields.u64Padding;
2825
+ }
2826
+ UpdateFundingInfoEvent.reified = function () {
2827
+ var _this = this;
2828
+ return {
2829
+ typeName: UpdateFundingInfoEvent.$typeName,
2830
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateFundingInfoEvent.$typeName], [], false)),
2831
+ typeArgs: [],
2832
+ reifiedTypeArgs: [],
2833
+ fromFields: function (fields) { return UpdateFundingInfoEvent.fromFields(fields); },
2834
+ fromFieldsWithTypes: function (item) { return UpdateFundingInfoEvent.fromFieldsWithTypes(item); },
2835
+ fromBcs: function (data) { return UpdateFundingInfoEvent.fromBcs(data); },
2836
+ bcs: UpdateFundingInfoEvent.bcs,
2837
+ fromJSONField: function (field) { return UpdateFundingInfoEvent.fromJSONField(field); },
2838
+ fromJSON: function (json) { return UpdateFundingInfoEvent.fromJSON(json); },
2839
+ fromSuiParsedData: function (content) { return UpdateFundingInfoEvent.fromSuiParsedData(content); },
2840
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2841
+ return [2 /*return*/, UpdateFundingInfoEvent.fetch(client, id)];
2842
+ }); }); },
2843
+ new: function (fields) {
2844
+ return new UpdateFundingInfoEvent([], fields);
2845
+ },
2846
+ kind: "StructClassReified",
2847
+ };
2848
+ };
2849
+ Object.defineProperty(UpdateFundingInfoEvent, "r", {
2850
+ get: function () {
2851
+ return UpdateFundingInfoEvent.reified();
2852
+ },
2853
+ enumerable: false,
2854
+ configurable: true
2855
+ });
2856
+ UpdateFundingInfoEvent.phantom = function () {
2857
+ return (0, reified_1.phantom)(UpdateFundingInfoEvent.reified());
2858
+ };
2859
+ Object.defineProperty(UpdateFundingInfoEvent, "p", {
2860
+ get: function () {
2861
+ return UpdateFundingInfoEvent.phantom();
2862
+ },
2863
+ enumerable: false,
2864
+ configurable: true
2865
+ });
2866
+ Object.defineProperty(UpdateFundingInfoEvent, "bcs", {
2867
+ get: function () {
2868
+ return bcs_1.bcs.struct("UpdateFundingInfoEvent", {
2869
+ index: bcs_1.bcs.u64(),
2870
+ liquidity_token_type: structs_1.TypeName.bcs,
2871
+ previous_funding_ts_ms: bcs_1.bcs.u64(),
2872
+ previous_cumulative_funding_rate: bcs_1.bcs.u64(),
2873
+ funding_interval_ts_ms: bcs_1.bcs.u64(),
2874
+ last_funding_ts_ms: bcs_1.bcs.u64(),
2875
+ last_cumulative_funding_rate: bcs_1.bcs.u64(),
2876
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
2877
+ });
2878
+ },
2879
+ enumerable: false,
2880
+ configurable: true
2881
+ });
2882
+ UpdateFundingInfoEvent.fromFields = function (fields) {
2883
+ return UpdateFundingInfoEvent.reified().new({
2884
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
2885
+ liquidityTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token_type),
2886
+ previousFundingTsMs: (0, reified_1.decodeFromFields)("u64", fields.previous_funding_ts_ms),
2887
+ previousCumulativeFundingRate: (0, reified_1.decodeFromFields)("u64", fields.previous_cumulative_funding_rate),
2888
+ fundingIntervalTsMs: (0, reified_1.decodeFromFields)("u64", fields.funding_interval_ts_ms),
2889
+ lastFundingTsMs: (0, reified_1.decodeFromFields)("u64", fields.last_funding_ts_ms),
2890
+ lastCumulativeFundingRate: (0, reified_1.decodeFromFields)("u64", fields.last_cumulative_funding_rate),
2891
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
2892
+ });
2893
+ };
2894
+ UpdateFundingInfoEvent.fromFieldsWithTypes = function (item) {
2895
+ if (!isUpdateFundingInfoEvent(item.type)) {
2896
+ throw new Error("not a UpdateFundingInfoEvent type");
2897
+ }
2898
+ return UpdateFundingInfoEvent.reified().new({
2899
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
2900
+ liquidityTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token_type),
2901
+ previousFundingTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.previous_funding_ts_ms),
2902
+ previousCumulativeFundingRate: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.previous_cumulative_funding_rate),
2903
+ fundingIntervalTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.funding_interval_ts_ms),
2904
+ lastFundingTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.last_funding_ts_ms),
2905
+ lastCumulativeFundingRate: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.last_cumulative_funding_rate),
2906
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
2907
+ });
2908
+ };
2909
+ UpdateFundingInfoEvent.fromBcs = function (data) {
2910
+ return UpdateFundingInfoEvent.fromFields(UpdateFundingInfoEvent.bcs.parse(data));
2911
+ };
2912
+ UpdateFundingInfoEvent.prototype.toJSONField = function () {
2913
+ return {
2914
+ index: this.index.toString(),
2915
+ liquidityTokenType: this.liquidityTokenType.toJSONField(),
2916
+ previousFundingTsMs: this.previousFundingTsMs.toString(),
2917
+ previousCumulativeFundingRate: this.previousCumulativeFundingRate.toString(),
2918
+ fundingIntervalTsMs: this.fundingIntervalTsMs.toString(),
2919
+ lastFundingTsMs: this.lastFundingTsMs.toString(),
2920
+ lastCumulativeFundingRate: this.lastCumulativeFundingRate.toString(),
2921
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
2922
+ };
2923
+ };
2924
+ UpdateFundingInfoEvent.prototype.toJSON = function () {
2925
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2926
+ };
2927
+ UpdateFundingInfoEvent.fromJSONField = function (field) {
2928
+ return UpdateFundingInfoEvent.reified().new({
2929
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
2930
+ liquidityTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityTokenType),
2931
+ previousFundingTsMs: (0, reified_1.decodeFromJSONField)("u64", field.previousFundingTsMs),
2932
+ previousCumulativeFundingRate: (0, reified_1.decodeFromJSONField)("u64", field.previousCumulativeFundingRate),
2933
+ fundingIntervalTsMs: (0, reified_1.decodeFromJSONField)("u64", field.fundingIntervalTsMs),
2934
+ lastFundingTsMs: (0, reified_1.decodeFromJSONField)("u64", field.lastFundingTsMs),
2935
+ lastCumulativeFundingRate: (0, reified_1.decodeFromJSONField)("u64", field.lastCumulativeFundingRate),
2936
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
2937
+ });
2938
+ };
2939
+ UpdateFundingInfoEvent.fromJSON = function (json) {
2940
+ if (json.$typeName !== UpdateFundingInfoEvent.$typeName) {
2941
+ throw new Error("not a WithTwoGenerics json object");
2942
+ }
2943
+ return UpdateFundingInfoEvent.fromJSONField(json);
2944
+ };
2945
+ UpdateFundingInfoEvent.fromSuiParsedData = function (content) {
2946
+ if (content.dataType !== "moveObject") {
2947
+ throw new Error("not an object");
2948
+ }
2949
+ if (!isUpdateFundingInfoEvent(content.type)) {
2950
+ throw new Error("object at ".concat(content.fields.id, " is not a UpdateFundingInfoEvent object"));
2951
+ }
2952
+ return UpdateFundingInfoEvent.fromFieldsWithTypes(content);
2953
+ };
2954
+ UpdateFundingInfoEvent.fetch = function (client, id) {
2955
+ return __awaiter(this, void 0, void 0, function () {
2956
+ var res;
2957
+ var _a, _b;
2958
+ return __generator(this, function (_c) {
2959
+ switch (_c.label) {
2960
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2961
+ case 1:
2962
+ res = _c.sent();
2963
+ if (res.error) {
2964
+ throw new Error("error fetching UpdateFundingInfoEvent object at id ".concat(id, ": ").concat(res.error.code));
2965
+ }
2966
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateFundingInfoEvent(res.data.bcs.type)) {
2967
+ throw new Error("object at id ".concat(id, " is not a UpdateFundingInfoEvent object"));
2968
+ }
2969
+ return [2 /*return*/, UpdateFundingInfoEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
2970
+ }
2971
+ });
2972
+ });
2973
+ };
2974
+ UpdateFundingInfoEvent.$typeName = "0x0::lp_pool::UpdateFundingInfoEvent";
2975
+ UpdateFundingInfoEvent.$numTypeParams = 0;
2976
+ return UpdateFundingInfoEvent;
2977
+ }());
2978
+ exports.UpdateFundingInfoEvent = UpdateFundingInfoEvent;
2979
+ /* ============================== UpdateMarginConfigEvent =============================== */
2980
+ function isUpdateMarginConfigEvent(type) {
2981
+ type = (0, util_1.compressSuiType)(type);
2982
+ return type === "0x0::lp_pool::UpdateMarginConfigEvent";
2983
+ }
2984
+ exports.isUpdateMarginConfigEvent = isUpdateMarginConfigEvent;
2985
+ var UpdateMarginConfigEvent = /** @class */ (function () {
2986
+ function UpdateMarginConfigEvent(typeArgs, fields) {
2987
+ this.$typeName = UpdateMarginConfigEvent.$typeName;
2988
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateMarginConfigEvent.$typeName], __read(typeArgs), false));
2989
+ this.$typeArgs = typeArgs;
2990
+ this.sender = fields.sender;
2991
+ this.index = fields.index;
2992
+ this.liquidityTokenType = fields.liquidityTokenType;
2993
+ this.previousMarginConfig = fields.previousMarginConfig;
2994
+ this.newMarginConfig = fields.newMarginConfig;
2995
+ this.u64Padding = fields.u64Padding;
2996
+ }
2997
+ UpdateMarginConfigEvent.reified = function () {
2998
+ var _this = this;
2999
+ return {
3000
+ typeName: UpdateMarginConfigEvent.$typeName,
3001
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateMarginConfigEvent.$typeName], [], false)),
3002
+ typeArgs: [],
3003
+ reifiedTypeArgs: [],
3004
+ fromFields: function (fields) { return UpdateMarginConfigEvent.fromFields(fields); },
3005
+ fromFieldsWithTypes: function (item) { return UpdateMarginConfigEvent.fromFieldsWithTypes(item); },
3006
+ fromBcs: function (data) { return UpdateMarginConfigEvent.fromBcs(data); },
3007
+ bcs: UpdateMarginConfigEvent.bcs,
3008
+ fromJSONField: function (field) { return UpdateMarginConfigEvent.fromJSONField(field); },
3009
+ fromJSON: function (json) { return UpdateMarginConfigEvent.fromJSON(json); },
3010
+ fromSuiParsedData: function (content) { return UpdateMarginConfigEvent.fromSuiParsedData(content); },
3011
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
3012
+ return [2 /*return*/, UpdateMarginConfigEvent.fetch(client, id)];
3013
+ }); }); },
3014
+ new: function (fields) {
3015
+ return new UpdateMarginConfigEvent([], fields);
3016
+ },
3017
+ kind: "StructClassReified",
3018
+ };
3019
+ };
3020
+ Object.defineProperty(UpdateMarginConfigEvent, "r", {
3021
+ get: function () {
3022
+ return UpdateMarginConfigEvent.reified();
3023
+ },
3024
+ enumerable: false,
3025
+ configurable: true
3026
+ });
3027
+ UpdateMarginConfigEvent.phantom = function () {
3028
+ return (0, reified_1.phantom)(UpdateMarginConfigEvent.reified());
3029
+ };
3030
+ Object.defineProperty(UpdateMarginConfigEvent, "p", {
3031
+ get: function () {
3032
+ return UpdateMarginConfigEvent.phantom();
3033
+ },
3034
+ enumerable: false,
3035
+ configurable: true
3036
+ });
3037
+ Object.defineProperty(UpdateMarginConfigEvent, "bcs", {
3038
+ get: function () {
3039
+ return bcs_1.bcs.struct("UpdateMarginConfigEvent", {
3040
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
3041
+ index: bcs_1.bcs.u64(),
3042
+ liquidity_token_type: structs_1.TypeName.bcs,
3043
+ previous_margin_config: MarginConfig.bcs,
3044
+ new_margin_config: MarginConfig.bcs,
3045
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
3046
+ });
3047
+ },
3048
+ enumerable: false,
3049
+ configurable: true
3050
+ });
3051
+ UpdateMarginConfigEvent.fromFields = function (fields) {
3052
+ return UpdateMarginConfigEvent.reified().new({
3053
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
3054
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
3055
+ liquidityTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token_type),
3056
+ previousMarginConfig: (0, reified_1.decodeFromFields)(MarginConfig.reified(), fields.previous_margin_config),
3057
+ newMarginConfig: (0, reified_1.decodeFromFields)(MarginConfig.reified(), fields.new_margin_config),
3058
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
3059
+ });
3060
+ };
3061
+ UpdateMarginConfigEvent.fromFieldsWithTypes = function (item) {
3062
+ if (!isUpdateMarginConfigEvent(item.type)) {
3063
+ throw new Error("not a UpdateMarginConfigEvent type");
3064
+ }
3065
+ return UpdateMarginConfigEvent.reified().new({
3066
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
3067
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
3068
+ liquidityTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token_type),
3069
+ previousMarginConfig: (0, reified_1.decodeFromFieldsWithTypes)(MarginConfig.reified(), item.fields.previous_margin_config),
3070
+ newMarginConfig: (0, reified_1.decodeFromFieldsWithTypes)(MarginConfig.reified(), item.fields.new_margin_config),
3071
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
3072
+ });
3073
+ };
3074
+ UpdateMarginConfigEvent.fromBcs = function (data) {
3075
+ return UpdateMarginConfigEvent.fromFields(UpdateMarginConfigEvent.bcs.parse(data));
3076
+ };
3077
+ UpdateMarginConfigEvent.prototype.toJSONField = function () {
3078
+ return {
3079
+ sender: this.sender,
3080
+ index: this.index.toString(),
3081
+ liquidityTokenType: this.liquidityTokenType.toJSONField(),
3082
+ previousMarginConfig: this.previousMarginConfig.toJSONField(),
3083
+ newMarginConfig: this.newMarginConfig.toJSONField(),
3084
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
3085
+ };
3086
+ };
3087
+ UpdateMarginConfigEvent.prototype.toJSON = function () {
3088
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
3089
+ };
3090
+ UpdateMarginConfigEvent.fromJSONField = function (field) {
3091
+ return UpdateMarginConfigEvent.reified().new({
3092
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
3093
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
3094
+ liquidityTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityTokenType),
3095
+ previousMarginConfig: (0, reified_1.decodeFromJSONField)(MarginConfig.reified(), field.previousMarginConfig),
3096
+ newMarginConfig: (0, reified_1.decodeFromJSONField)(MarginConfig.reified(), field.newMarginConfig),
3097
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
3098
+ });
3099
+ };
3100
+ UpdateMarginConfigEvent.fromJSON = function (json) {
3101
+ if (json.$typeName !== UpdateMarginConfigEvent.$typeName) {
3102
+ throw new Error("not a WithTwoGenerics json object");
3103
+ }
3104
+ return UpdateMarginConfigEvent.fromJSONField(json);
3105
+ };
3106
+ UpdateMarginConfigEvent.fromSuiParsedData = function (content) {
3107
+ if (content.dataType !== "moveObject") {
3108
+ throw new Error("not an object");
3109
+ }
3110
+ if (!isUpdateMarginConfigEvent(content.type)) {
3111
+ throw new Error("object at ".concat(content.fields.id, " is not a UpdateMarginConfigEvent object"));
3112
+ }
3113
+ return UpdateMarginConfigEvent.fromFieldsWithTypes(content);
3114
+ };
3115
+ UpdateMarginConfigEvent.fetch = function (client, id) {
3116
+ return __awaiter(this, void 0, void 0, function () {
3117
+ var res;
3118
+ var _a, _b;
3119
+ return __generator(this, function (_c) {
3120
+ switch (_c.label) {
3121
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
3122
+ case 1:
3123
+ res = _c.sent();
3124
+ if (res.error) {
3125
+ throw new Error("error fetching UpdateMarginConfigEvent object at id ".concat(id, ": ").concat(res.error.code));
3126
+ }
3127
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateMarginConfigEvent(res.data.bcs.type)) {
3128
+ throw new Error("object at id ".concat(id, " is not a UpdateMarginConfigEvent object"));
3129
+ }
3130
+ return [2 /*return*/, UpdateMarginConfigEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
3131
+ }
3132
+ });
3133
+ });
3134
+ };
3135
+ UpdateMarginConfigEvent.$typeName = "0x0::lp_pool::UpdateMarginConfigEvent";
3136
+ UpdateMarginConfigEvent.$numTypeParams = 0;
3137
+ return UpdateMarginConfigEvent;
3138
+ }());
3139
+ exports.UpdateMarginConfigEvent = UpdateMarginConfigEvent;
3140
+ /* ============================== UpdateSpotConfigEvent =============================== */
3141
+ function isUpdateSpotConfigEvent(type) {
3142
+ type = (0, util_1.compressSuiType)(type);
3143
+ return type === "0x0::lp_pool::UpdateSpotConfigEvent";
3144
+ }
3145
+ exports.isUpdateSpotConfigEvent = isUpdateSpotConfigEvent;
3146
+ var UpdateSpotConfigEvent = /** @class */ (function () {
3147
+ function UpdateSpotConfigEvent(typeArgs, fields) {
3148
+ this.$typeName = UpdateSpotConfigEvent.$typeName;
3149
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateSpotConfigEvent.$typeName], __read(typeArgs), false));
3150
+ this.$typeArgs = typeArgs;
3151
+ this.sender = fields.sender;
3152
+ this.index = fields.index;
3153
+ this.liquidityTokenType = fields.liquidityTokenType;
3154
+ this.previousSpotConfig = fields.previousSpotConfig;
3155
+ this.newSpotConfig = fields.newSpotConfig;
3156
+ this.u64Padding = fields.u64Padding;
3157
+ }
3158
+ UpdateSpotConfigEvent.reified = function () {
3159
+ var _this = this;
3160
+ return {
3161
+ typeName: UpdateSpotConfigEvent.$typeName,
3162
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateSpotConfigEvent.$typeName], [], false)),
3163
+ typeArgs: [],
3164
+ reifiedTypeArgs: [],
3165
+ fromFields: function (fields) { return UpdateSpotConfigEvent.fromFields(fields); },
3166
+ fromFieldsWithTypes: function (item) { return UpdateSpotConfigEvent.fromFieldsWithTypes(item); },
3167
+ fromBcs: function (data) { return UpdateSpotConfigEvent.fromBcs(data); },
3168
+ bcs: UpdateSpotConfigEvent.bcs,
3169
+ fromJSONField: function (field) { return UpdateSpotConfigEvent.fromJSONField(field); },
3170
+ fromJSON: function (json) { return UpdateSpotConfigEvent.fromJSON(json); },
3171
+ fromSuiParsedData: function (content) { return UpdateSpotConfigEvent.fromSuiParsedData(content); },
3172
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
3173
+ return [2 /*return*/, UpdateSpotConfigEvent.fetch(client, id)];
3174
+ }); }); },
3175
+ new: function (fields) {
3176
+ return new UpdateSpotConfigEvent([], fields);
3177
+ },
3178
+ kind: "StructClassReified",
3179
+ };
3180
+ };
3181
+ Object.defineProperty(UpdateSpotConfigEvent, "r", {
3182
+ get: function () {
3183
+ return UpdateSpotConfigEvent.reified();
3184
+ },
3185
+ enumerable: false,
3186
+ configurable: true
3187
+ });
3188
+ UpdateSpotConfigEvent.phantom = function () {
3189
+ return (0, reified_1.phantom)(UpdateSpotConfigEvent.reified());
3190
+ };
3191
+ Object.defineProperty(UpdateSpotConfigEvent, "p", {
3192
+ get: function () {
3193
+ return UpdateSpotConfigEvent.phantom();
3194
+ },
3195
+ enumerable: false,
3196
+ configurable: true
3197
+ });
3198
+ Object.defineProperty(UpdateSpotConfigEvent, "bcs", {
3199
+ get: function () {
3200
+ return bcs_1.bcs.struct("UpdateSpotConfigEvent", {
3201
+ sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, bcs_1.fromHEX)(val); }, output: function (val) { return (0, bcs_1.toHEX)(val); } }),
3202
+ index: bcs_1.bcs.u64(),
3203
+ liquidity_token_type: structs_1.TypeName.bcs,
3204
+ previous_spot_config: SpotConfig.bcs,
3205
+ new_spot_config: SpotConfig.bcs,
3206
+ u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
3207
+ });
3208
+ },
3209
+ enumerable: false,
3210
+ configurable: true
3211
+ });
3212
+ UpdateSpotConfigEvent.fromFields = function (fields) {
3213
+ return UpdateSpotConfigEvent.reified().new({
3214
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
3215
+ index: (0, reified_1.decodeFromFields)("u64", fields.index),
3216
+ liquidityTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.liquidity_token_type),
3217
+ previousSpotConfig: (0, reified_1.decodeFromFields)(SpotConfig.reified(), fields.previous_spot_config),
3218
+ newSpotConfig: (0, reified_1.decodeFromFields)(SpotConfig.reified(), fields.new_spot_config),
3219
+ u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
3220
+ });
3221
+ };
3222
+ UpdateSpotConfigEvent.fromFieldsWithTypes = function (item) {
3223
+ if (!isUpdateSpotConfigEvent(item.type)) {
3224
+ throw new Error("not a UpdateSpotConfigEvent type");
3225
+ }
3226
+ return UpdateSpotConfigEvent.reified().new({
3227
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
3228
+ index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
3229
+ liquidityTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.liquidity_token_type),
3230
+ previousSpotConfig: (0, reified_1.decodeFromFieldsWithTypes)(SpotConfig.reified(), item.fields.previous_spot_config),
3231
+ newSpotConfig: (0, reified_1.decodeFromFieldsWithTypes)(SpotConfig.reified(), item.fields.new_spot_config),
3232
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
3233
+ });
3234
+ };
3235
+ UpdateSpotConfigEvent.fromBcs = function (data) {
3236
+ return UpdateSpotConfigEvent.fromFields(UpdateSpotConfigEvent.bcs.parse(data));
3237
+ };
3238
+ UpdateSpotConfigEvent.prototype.toJSONField = function () {
3239
+ return {
3240
+ sender: this.sender,
3241
+ index: this.index.toString(),
3242
+ liquidityTokenType: this.liquidityTokenType.toJSONField(),
3243
+ previousSpotConfig: this.previousSpotConfig.toJSONField(),
3244
+ newSpotConfig: this.newSpotConfig.toJSONField(),
3245
+ u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
3246
+ };
3247
+ };
3248
+ UpdateSpotConfigEvent.prototype.toJSON = function () {
3249
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
3250
+ };
3251
+ UpdateSpotConfigEvent.fromJSONField = function (field) {
3252
+ return UpdateSpotConfigEvent.reified().new({
3253
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
3254
+ index: (0, reified_1.decodeFromJSONField)("u64", field.index),
3255
+ liquidityTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.liquidityTokenType),
3256
+ previousSpotConfig: (0, reified_1.decodeFromJSONField)(SpotConfig.reified(), field.previousSpotConfig),
3257
+ newSpotConfig: (0, reified_1.decodeFromJSONField)(SpotConfig.reified(), field.newSpotConfig),
3258
+ u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
3259
+ });
3260
+ };
3261
+ UpdateSpotConfigEvent.fromJSON = function (json) {
3262
+ if (json.$typeName !== UpdateSpotConfigEvent.$typeName) {
3263
+ throw new Error("not a WithTwoGenerics json object");
3264
+ }
3265
+ return UpdateSpotConfigEvent.fromJSONField(json);
3266
+ };
3267
+ UpdateSpotConfigEvent.fromSuiParsedData = function (content) {
3268
+ if (content.dataType !== "moveObject") {
3269
+ throw new Error("not an object");
3270
+ }
3271
+ if (!isUpdateSpotConfigEvent(content.type)) {
3272
+ throw new Error("object at ".concat(content.fields.id, " is not a UpdateSpotConfigEvent object"));
3273
+ }
3274
+ return UpdateSpotConfigEvent.fromFieldsWithTypes(content);
3275
+ };
3276
+ UpdateSpotConfigEvent.fetch = function (client, id) {
3277
+ return __awaiter(this, void 0, void 0, function () {
3278
+ var res;
3279
+ var _a, _b;
3280
+ return __generator(this, function (_c) {
3281
+ switch (_c.label) {
3282
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
3283
+ case 1:
3284
+ res = _c.sent();
3285
+ if (res.error) {
3286
+ throw new Error("error fetching UpdateSpotConfigEvent object at id ".concat(id, ": ").concat(res.error.code));
3287
+ }
3288
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateSpotConfigEvent(res.data.bcs.type)) {
3289
+ throw new Error("object at id ".concat(id, " is not a UpdateSpotConfigEvent object"));
3290
+ }
3291
+ return [2 /*return*/, UpdateSpotConfigEvent.fromBcs((0, bcs_1.fromB64)(res.data.bcs.bcsBytes))];
3292
+ }
3293
+ });
3294
+ });
3295
+ };
3296
+ UpdateSpotConfigEvent.$typeName = "0x0::lp_pool::UpdateSpotConfigEvent";
3297
+ UpdateSpotConfigEvent.$numTypeParams = 0;
3298
+ return UpdateSpotConfigEvent;
3299
+ }());
3300
+ exports.UpdateSpotConfigEvent = UpdateSpotConfigEvent;