@typus/typus-sdk 1.2.70 → 1.2.72

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