@typus/typus-sdk 1.4.3-c → 1.4.3-e

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 (248) hide show
  1. package/package.json +10 -2
  2. package/src/_dependencies/source/0x1/ascii/structs.ts +135 -0
  3. package/src/_dependencies/source/0x1/bit-vector/structs.ts +70 -0
  4. package/src/_dependencies/source/0x1/fixed-point32/structs.ts +69 -0
  5. package/src/_dependencies/source/0x1/index.ts +1 -0
  6. package/src/_dependencies/source/0x1/init.ts +16 -0
  7. package/src/_dependencies/source/0x1/option/structs.ts +74 -0
  8. package/src/_dependencies/source/0x1/string/structs.ts +70 -0
  9. package/src/_dependencies/source/0x1/type-name/structs.ts +70 -0
  10. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.ts +1 -0
  11. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.ts +14 -0
  12. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.ts +203 -0
  13. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.ts +317 -0
  14. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.ts +69 -0
  15. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.ts +69 -0
  16. package/src/_dependencies/source/0x2/authenticator-state/structs.ts +332 -0
  17. package/src/_dependencies/source/0x2/bag/structs.ts +70 -0
  18. package/src/_dependencies/source/0x2/balance/structs.ts +134 -0
  19. package/src/_dependencies/source/0x2/bcs/structs.ts +70 -0
  20. package/src/_dependencies/source/0x2/bls12381/structs.ts +264 -0
  21. package/src/_dependencies/source/0x2/borrow/structs.ts +138 -0
  22. package/src/_dependencies/source/0x2/clock/structs.ts +70 -0
  23. package/src/_dependencies/source/0x2/coin/structs.ts +400 -0
  24. package/src/_dependencies/source/0x2/deny-list/structs.ts +139 -0
  25. package/src/_dependencies/source/0x2/display/structs.ts +202 -0
  26. package/src/_dependencies/source/0x2/dynamic-field/structs.ts +70 -0
  27. package/src/_dependencies/source/0x2/dynamic-object-field/structs.ts +71 -0
  28. package/src/_dependencies/source/0x2/groth16/structs.ts +265 -0
  29. package/src/_dependencies/source/0x2/group-ops/structs.ts +70 -0
  30. package/src/_dependencies/source/0x2/index.ts +1 -0
  31. package/src/_dependencies/source/0x2/init.ts +125 -0
  32. package/src/_dependencies/source/0x2/kiosk/structs.ts +658 -0
  33. package/src/_dependencies/source/0x2/kiosk-extension/structs.ts +135 -0
  34. package/src/_dependencies/source/0x2/linked-table/structs.ts +136 -0
  35. package/src/_dependencies/source/0x2/object/structs.ts +134 -0
  36. package/src/_dependencies/source/0x2/object-bag/structs.ts +70 -0
  37. package/src/_dependencies/source/0x2/object-table/structs.ts +70 -0
  38. package/src/_dependencies/source/0x2/package/structs.ts +267 -0
  39. package/src/_dependencies/source/0x2/priority-queue/structs.ts +139 -0
  40. package/src/_dependencies/source/0x2/random/structs.ts +202 -0
  41. package/src/_dependencies/source/0x2/sui/structs.ts +69 -0
  42. package/src/_dependencies/source/0x2/table/structs.ts +70 -0
  43. package/src/_dependencies/source/0x2/table-vec/structs.ts +71 -0
  44. package/src/_dependencies/source/0x2/token/structs.ts +401 -0
  45. package/src/_dependencies/source/0x2/transfer/structs.ts +70 -0
  46. package/src/_dependencies/source/0x2/transfer-policy/structs.ts +400 -0
  47. package/src/_dependencies/source/0x2/tx-context/structs.ts +70 -0
  48. package/src/_dependencies/source/0x2/url/structs.ts +70 -0
  49. package/src/_dependencies/source/0x2/vec-map/structs.ts +135 -0
  50. package/src/_dependencies/source/0x2/vec-set/structs.ts +72 -0
  51. package/src/_dependencies/source/0x2/versioned/structs.ts +135 -0
  52. package/src/_dependencies/source/0x2/zklogin-verified-id/structs.ts +71 -0
  53. package/src/_dependencies/source/0x2/zklogin-verified-issuer/structs.ts +71 -0
  54. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.ts +1 -0
  55. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.ts +5 -0
  56. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.ts +70 -0
  57. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.ts +1 -0
  58. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.ts +8 -0
  59. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.ts +69 -0
  60. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.ts +135 -0
  61. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.ts +400 -0
  62. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.ts +372 -0
  63. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.ts +205 -0
  64. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.ts +333 -0
  65. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.ts +1 -0
  66. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.ts +48 -0
  67. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.ts +465 -0
  68. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.ts +136 -0
  69. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.ts +140 -0
  70. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.ts +268 -0
  71. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.ts +332 -0
  72. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.ts +466 -0
  73. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.ts +1 -0
  74. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.ts +36 -0
  75. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.ts +134 -0
  76. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.ts +333 -0
  77. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.ts +71 -0
  78. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.ts +856 -0
  79. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.ts +1049 -0
  80. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.ts +1 -0
  81. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.ts +104 -0
  82. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.ts +1054 -0
  83. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.ts +592 -0
  84. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.ts +461 -0
  85. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.ts +592 -0
  86. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.ts +69 -0
  87. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.ts +2351 -0
  88. package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.ts +1 -0
  89. package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.ts +3 -0
  90. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.ts +71 -0
  91. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.ts +203 -0
  92. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.ts +70 -0
  93. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.ts +528 -0
  94. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.ts +69 -0
  95. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.ts +1 -0
  96. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.ts +54 -0
  97. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.ts +136 -0
  98. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.ts +1829 -0
  99. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.ts +398 -0
  100. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.ts +1 -0
  101. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.ts +18 -0
  102. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.ts +71 -0
  103. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.ts +69 -0
  104. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.ts +71 -0
  105. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.ts +70 -0
  106. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.ts +1 -0
  107. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.ts +11 -0
  108. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.ts +134 -0
  109. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.ts +134 -0
  110. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.ts +69 -0
  111. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes20/structs.ts +70 -0
  112. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes32/structs.ts +70 -0
  113. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/consumed-vaas/structs.ts +72 -0
  114. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/cursor/structs.ts +72 -0
  115. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.ts +200 -0
  116. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/external-address/structs.ts +70 -0
  117. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/fee-collector/structs.ts +72 -0
  118. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.ts +137 -0
  119. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian/structs.ts +70 -0
  120. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-set/structs.ts +71 -0
  121. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-signature/structs.ts +70 -0
  122. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.ts +1 -0
  123. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/init.ts +65 -0
  124. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/migrate/structs.ts +70 -0
  125. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.ts +266 -0
  126. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.ts +136 -0
  127. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set/structs.ts +136 -0
  128. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set-fee/structs.ts +134 -0
  129. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/setup/structs.ts +70 -0
  130. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.ts +142 -0
  131. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/transfer-fee/structs.ts +134 -0
  132. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/update-guardian-set/structs.ts +201 -0
  133. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.ts +201 -0
  134. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/vaa/structs.ts +72 -0
  135. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/version-control/structs.ts +134 -0
  136. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/batch-price-attestation/structs.ts +136 -0
  137. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/contract-upgrade/structs.ts +136 -0
  138. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/data-source/structs.ts +70 -0
  139. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/event/structs.ts +135 -0
  140. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance/structs.ts +71 -0
  141. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-action/structs.ts +69 -0
  142. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-instruction/structs.ts +71 -0
  143. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/hot-potato-vector/structs.ts +72 -0
  144. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/i64/structs.ts +69 -0
  145. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.ts +1 -0
  146. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/init.ts +59 -0
  147. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/migrate/structs.ts +70 -0
  148. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price/structs.ts +70 -0
  149. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-feed/structs.ts +71 -0
  150. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-identifier/structs.ts +70 -0
  151. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-info/structs.ts +136 -0
  152. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-status/structs.ts +69 -0
  153. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set/structs.ts +138 -0
  154. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-data-sources/structs.ts +71 -0
  155. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-fee-recipient/structs.ts +69 -0
  156. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-governance-data-source/structs.ts +70 -0
  157. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-stale-price-threshold/structs.ts +69 -0
  158. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-update-fee/structs.ts +69 -0
  159. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/setup/structs.ts +70 -0
  160. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.ts +203 -0
  161. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.ts +134 -0
  162. package/src/_framework/init-source.ts +39 -0
  163. package/src/_framework/loader.ts +69 -0
  164. package/src/_framework/reified.ts +442 -0
  165. package/src/_framework/util.ts +265 -0
  166. package/src/airdrop/authority-entry.ts +101 -0
  167. package/src/airdrop/index.ts +3 -0
  168. package/src/airdrop/user-entry.ts +24 -0
  169. package/src/airdrop/view-function.ts +36 -0
  170. package/src/auto-bid/index.ts +2 -0
  171. package/src/auto-bid/user-entry.ts +256 -0
  172. package/src/auto-bid/view-function.ts +285 -0
  173. package/src/constants/constant.ts +32 -0
  174. package/src/constants/index.ts +2 -0
  175. package/src/constants/token.ts +194 -0
  176. package/src/index.ts +11 -0
  177. package/src/leaderboard/authority-entry.ts +63 -0
  178. package/src/leaderboard/index.ts +2 -0
  179. package/src/leaderboard/view-function.ts +66 -0
  180. package/src/tails-exp-dice/api.ts +46 -0
  181. package/src/tails-exp-dice/fetch.ts +347 -0
  182. package/src/tails-exp-dice/index.ts +4 -0
  183. package/src/tails-exp-dice/user-entry.ts +241 -0
  184. package/src/tails-exp-dice/view-function.ts +111 -0
  185. package/src/tails-staking/authority-entry.ts +333 -0
  186. package/src/tails-staking/index.ts +3 -0
  187. package/src/tails-staking/user-entry.ts +401 -0
  188. package/src/tails-staking/view-function.ts +86 -0
  189. package/src/typus-dov-single-v2/entry/authority-entry.ts +171 -0
  190. package/src/typus-dov-single-v2/entry/index.ts +3 -0
  191. package/src/typus-dov-single-v2/entry/mfud-user-entry.ts +591 -0
  192. package/src/typus-dov-single-v2/entry/user-entry.ts +573 -0
  193. package/src/typus-dov-single-v2/function/bidding.ts +823 -0
  194. package/src/typus-dov-single-v2/function/index.ts +3 -0
  195. package/src/typus-dov-single-v2/function/token.ts +38 -0
  196. package/src/typus-dov-single-v2/function/vault.ts +24 -0
  197. package/src/typus-dov-single-v2/history/index.ts +2 -0
  198. package/src/typus-dov-single-v2/history/user-history.ts +929 -0
  199. package/src/typus-dov-single-v2/history/vault-history.ts +452 -0
  200. package/src/typus-dov-single-v2/index.ts +4 -0
  201. package/src/typus-dov-single-v2/view-function.ts +705 -0
  202. package/src/typus-nft/fetch.ts +428 -0
  203. package/src/typus-nft/index.ts +2 -0
  204. package/src/typus-nft/user-entry.ts +113 -0
  205. package/src/typus-perp/admin/functions.ts +141 -0
  206. package/src/typus-perp/admin/structs.ts +793 -0
  207. package/src/typus-perp/fetch.ts +253 -0
  208. package/src/typus-perp/index.ts +9 -0
  209. package/src/typus-perp/init.ts +96 -0
  210. package/src/typus-perp/lp-pool/functions.ts +694 -0
  211. package/src/typus-perp/lp-pool/structs.ts +3884 -0
  212. package/src/typus-perp/math/functions.ts +53 -0
  213. package/src/typus-perp/oracle/functions.ts +32 -0
  214. package/src/typus-perp/oracle/structs.ts +317 -0
  215. package/src/typus-perp/position/functions.ts +887 -0
  216. package/src/typus-perp/position/structs.ts +1637 -0
  217. package/src/typus-perp/readVec.ts +118 -0
  218. package/src/typus-perp/stake-pool/functions.ts +421 -0
  219. package/src/typus-perp/stake-pool/structs.ts +3873 -0
  220. package/src/typus-perp/symbol/functions.ts +24 -0
  221. package/src/typus-perp/symbol/structs.ts +165 -0
  222. package/src/typus-perp/tlp/functions.ts +50 -0
  223. package/src/typus-perp/tlp/structs.ts +287 -0
  224. package/src/typus-perp/token-interface/functions.ts +29 -0
  225. package/src/typus-perp/trading/functions.ts +1046 -0
  226. package/src/typus-perp/trading/structs.ts +4541 -0
  227. package/src/typus-perp/treasury-caps/functions.ts +36 -0
  228. package/src/typus-perp/treasury-caps/structs.ts +151 -0
  229. package/src/typus-perp/user/order.ts +221 -0
  230. package/src/typus-perp/user/orderWithBidReceipt.ts +176 -0
  231. package/src/typus-perp/user/tlp.ts +234 -0
  232. package/src/user/index.ts +1 -0
  233. package/src/user/view-function.ts +33 -0
  234. package/src/utils/.DS_Store +0 -0
  235. package/src/utils/api/defillama/index.ts +1 -0
  236. package/src/utils/api/defillama/tvl.ts +11 -0
  237. package/src/utils/api/index.ts +3 -0
  238. package/src/utils/api/price.ts +101 -0
  239. package/src/utils/api/sentio/index.ts +2 -0
  240. package/src/utils/api/sentio/leader-board.ts +259 -0
  241. package/src/utils/api/sentio/reward-generated.ts +392 -0
  242. package/src/utils/index.ts +5 -0
  243. package/src/utils/load_env.ts +5 -0
  244. package/src/utils/mint.ts +16 -0
  245. package/src/utils/pyth/constant.ts +71 -0
  246. package/src/utils/pyth/index.ts +2 -0
  247. package/src/utils/pyth/pythClient.ts +52 -0
  248. package/src/utils/tools.ts +38 -0
@@ -0,0 +1,1049 @@
1
+ import * as reified from "../../../../_framework/reified";
2
+ import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, Vector, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, fieldToJSON, phantom, ToTypeStr as ToPhantom} from "../../../../_framework/reified";
3
+ import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
4
+ import {ID, UID} from "../../0x2/object/structs";
5
+ import {TableVec} from "../../0x2/table-vec/structs";
6
+ import {VecMap} from "../../0x2/vec-map/structs";
7
+ import {TypusBidReceipt} from "../../0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs";
8
+ import {bcs, fromB64, fromHEX, toHEX} from "@mysten/bcs";
9
+ import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
10
+
11
+ /* ============================== AddAuthorutyEvent =============================== */
12
+
13
+ export function isAddAuthorutyEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AddAuthorutyEvent"; }
14
+
15
+ export interface AddAuthorutyEventFields { newAuthority: ToField<"address">; signer: ToField<"address"> }
16
+
17
+ export type AddAuthorutyEventReified = Reified< AddAuthorutyEvent, AddAuthorutyEventFields >;
18
+
19
+ export class AddAuthorutyEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AddAuthorutyEvent"; static readonly $numTypeParams = 0;
20
+
21
+ readonly $typeName = AddAuthorutyEvent.$typeName;
22
+
23
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AddAuthorutyEvent";
24
+
25
+ readonly $typeArgs: [];
26
+
27
+ readonly newAuthority: ToField<"address">; readonly signer: ToField<"address">
28
+
29
+ private constructor(typeArgs: [], fields: AddAuthorutyEventFields, ) { this.$fullTypeName = composeSuiType( AddAuthorutyEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AddAuthorutyEvent"; this.$typeArgs = typeArgs;
30
+
31
+ this.newAuthority = fields.newAuthority;; this.signer = fields.signer; }
32
+
33
+ static reified( ): AddAuthorutyEventReified { return { typeName: AddAuthorutyEvent.$typeName, fullTypeName: composeSuiType( AddAuthorutyEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AddAuthorutyEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AddAuthorutyEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AddAuthorutyEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AddAuthorutyEvent.fromBcs( data, ), bcs: AddAuthorutyEvent.bcs, fromJSONField: (field: any) => AddAuthorutyEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AddAuthorutyEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AddAuthorutyEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AddAuthorutyEvent.fetch( client, id, ), new: ( fields: AddAuthorutyEventFields, ) => { return new AddAuthorutyEvent( [], fields ) }, kind: "StructClassReified", } }
34
+
35
+ static get r() { return AddAuthorutyEvent.reified() }
36
+
37
+ static phantom( ): PhantomReified<ToTypeStr<AddAuthorutyEvent>> { return phantom(AddAuthorutyEvent.reified( )); } static get p() { return AddAuthorutyEvent.phantom() }
38
+
39
+ static get bcs() { return bcs.struct("AddAuthorutyEvent", {
40
+
41
+ new_authority: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
42
+
43
+ }) };
44
+
45
+ static fromFields( fields: Record<string, any> ): AddAuthorutyEvent { return AddAuthorutyEvent.reified( ).new( { newAuthority: decodeFromFields("address", fields.new_authority), signer: decodeFromFields("address", fields.signer) } ) }
46
+
47
+ static fromFieldsWithTypes( item: FieldsWithTypes ): AddAuthorutyEvent { if (!isAddAuthorutyEvent(item.type)) { throw new Error("not a AddAuthorutyEvent type");
48
+
49
+ }
50
+
51
+ return AddAuthorutyEvent.reified( ).new( { newAuthority: decodeFromFieldsWithTypes("address", item.fields.new_authority), signer: decodeFromFieldsWithTypes("address", item.fields.signer) } ) }
52
+
53
+ static fromBcs( data: Uint8Array ): AddAuthorutyEvent { return AddAuthorutyEvent.fromFields( AddAuthorutyEvent.bcs.parse(data) ) }
54
+
55
+ toJSONField() { return {
56
+
57
+ newAuthority: this.newAuthority,signer: this.signer,
58
+
59
+ } }
60
+
61
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
62
+
63
+ static fromJSONField( field: any ): AddAuthorutyEvent { return AddAuthorutyEvent.reified( ).new( { newAuthority: decodeFromJSONField("address", field.newAuthority), signer: decodeFromJSONField("address", field.signer) } ) }
64
+
65
+ static fromJSON( json: Record<string, any> ): AddAuthorutyEvent { if (json.$typeName !== AddAuthorutyEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
66
+
67
+ return AddAuthorutyEvent.fromJSONField( json, ) }
68
+
69
+ static fromSuiParsedData( content: SuiParsedData ): AddAuthorutyEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAddAuthorutyEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AddAuthorutyEvent object`); } return AddAuthorutyEvent.fromFieldsWithTypes( content ); }
70
+
71
+ static async fetch( client: SuiClient, id: string ): Promise<AddAuthorutyEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AddAuthorutyEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAddAuthorutyEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AddAuthorutyEvent object`); }
72
+ return AddAuthorutyEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
73
+
74
+ }
75
+
76
+ /* ============================== AutoBidEvent =============================== */
77
+
78
+ export function isAutoBidEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AutoBidEvent"; }
79
+
80
+ export interface AutoBidEventFields { dummyField: ToField<"bool"> }
81
+
82
+ export type AutoBidEventReified = Reified< AutoBidEvent, AutoBidEventFields >;
83
+
84
+ export class AutoBidEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AutoBidEvent"; static readonly $numTypeParams = 0;
85
+
86
+ readonly $typeName = AutoBidEvent.$typeName;
87
+
88
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AutoBidEvent";
89
+
90
+ readonly $typeArgs: [];
91
+
92
+ readonly dummyField: ToField<"bool">
93
+
94
+ private constructor(typeArgs: [], fields: AutoBidEventFields, ) { this.$fullTypeName = composeSuiType( AutoBidEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AutoBidEvent"; this.$typeArgs = typeArgs;
95
+
96
+ this.dummyField = fields.dummyField; }
97
+
98
+ static reified( ): AutoBidEventReified { return { typeName: AutoBidEvent.$typeName, fullTypeName: composeSuiType( AutoBidEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::AutoBidEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => AutoBidEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => AutoBidEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => AutoBidEvent.fromBcs( data, ), bcs: AutoBidEvent.bcs, fromJSONField: (field: any) => AutoBidEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => AutoBidEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => AutoBidEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => AutoBidEvent.fetch( client, id, ), new: ( fields: AutoBidEventFields, ) => { return new AutoBidEvent( [], fields ) }, kind: "StructClassReified", } }
99
+
100
+ static get r() { return AutoBidEvent.reified() }
101
+
102
+ static phantom( ): PhantomReified<ToTypeStr<AutoBidEvent>> { return phantom(AutoBidEvent.reified( )); } static get p() { return AutoBidEvent.phantom() }
103
+
104
+ static get bcs() { return bcs.struct("AutoBidEvent", {
105
+
106
+ dummy_field: bcs.bool()
107
+
108
+ }) };
109
+
110
+ static fromFields( fields: Record<string, any> ): AutoBidEvent { return AutoBidEvent.reified( ).new( { dummyField: decodeFromFields("bool", fields.dummy_field) } ) }
111
+
112
+ static fromFieldsWithTypes( item: FieldsWithTypes ): AutoBidEvent { if (!isAutoBidEvent(item.type)) { throw new Error("not a AutoBidEvent type");
113
+
114
+ }
115
+
116
+ return AutoBidEvent.reified( ).new( { dummyField: decodeFromFieldsWithTypes("bool", item.fields.dummy_field) } ) }
117
+
118
+ static fromBcs( data: Uint8Array ): AutoBidEvent { return AutoBidEvent.fromFields( AutoBidEvent.bcs.parse(data) ) }
119
+
120
+ toJSONField() { return {
121
+
122
+ dummyField: this.dummyField,
123
+
124
+ } }
125
+
126
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
127
+
128
+ static fromJSONField( field: any ): AutoBidEvent { return AutoBidEvent.reified( ).new( { dummyField: decodeFromJSONField("bool", field.dummyField) } ) }
129
+
130
+ static fromJSON( json: Record<string, any> ): AutoBidEvent { if (json.$typeName !== AutoBidEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
131
+
132
+ return AutoBidEvent.fromJSONField( json, ) }
133
+
134
+ static fromSuiParsedData( content: SuiParsedData ): AutoBidEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isAutoBidEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a AutoBidEvent object`); } return AutoBidEvent.fromFieldsWithTypes( content ); }
135
+
136
+ static async fetch( client: SuiClient, id: string ): Promise<AutoBidEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching AutoBidEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isAutoBidEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a AutoBidEvent object`); }
137
+ return AutoBidEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
138
+
139
+ }
140
+
141
+ /* ============================== CloseStrategyEvent =============================== */
142
+
143
+ export function isCloseStrategyEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEvent"; }
144
+
145
+ export interface CloseStrategyEventFields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; u64Padding: ToField<Vector<"u64">>; bidTimes: ToField<"u64">; bidRound: ToField<"u64">; bidTsMs: ToField<"u64"> }
146
+
147
+ export type CloseStrategyEventReified = Reified< CloseStrategyEvent, CloseStrategyEventFields >;
148
+
149
+ export class CloseStrategyEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEvent"; static readonly $numTypeParams = 0;
150
+
151
+ readonly $typeName = CloseStrategyEvent.$typeName;
152
+
153
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEvent";
154
+
155
+ readonly $typeArgs: [];
156
+
157
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly u64Padding: ToField<Vector<"u64">>; readonly bidTimes: ToField<"u64">; readonly bidRound: ToField<"u64">; readonly bidTsMs: ToField<"u64">
158
+
159
+ private constructor(typeArgs: [], fields: CloseStrategyEventFields, ) { this.$fullTypeName = composeSuiType( CloseStrategyEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEvent"; this.$typeArgs = typeArgs;
160
+
161
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.u64Padding = fields.u64Padding;; this.bidTimes = fields.bidTimes;; this.bidRound = fields.bidRound;; this.bidTsMs = fields.bidTsMs; }
162
+
163
+ static reified( ): CloseStrategyEventReified { return { typeName: CloseStrategyEvent.$typeName, fullTypeName: composeSuiType( CloseStrategyEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => CloseStrategyEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => CloseStrategyEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => CloseStrategyEvent.fromBcs( data, ), bcs: CloseStrategyEvent.bcs, fromJSONField: (field: any) => CloseStrategyEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => CloseStrategyEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => CloseStrategyEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => CloseStrategyEvent.fetch( client, id, ), new: ( fields: CloseStrategyEventFields, ) => { return new CloseStrategyEvent( [], fields ) }, kind: "StructClassReified", } }
164
+
165
+ static get r() { return CloseStrategyEvent.reified() }
166
+
167
+ static phantom( ): PhantomReified<ToTypeStr<CloseStrategyEvent>> { return phantom(CloseStrategyEvent.reified( )); } static get p() { return CloseStrategyEvent.phantom() }
168
+
169
+ static get bcs() { return bcs.struct("CloseStrategyEvent", {
170
+
171
+ vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), u64_padding: bcs.vector(bcs.u64()), bid_times: bcs.u64(), bid_round: bcs.u64(), bid_ts_ms: bcs.u64()
172
+
173
+ }) };
174
+
175
+ static fromFields( fields: Record<string, any> ): CloseStrategyEvent { return CloseStrategyEvent.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), u64Padding: decodeFromFields(reified.vector("u64"), fields.u64_padding), bidTimes: decodeFromFields("u64", fields.bid_times), bidRound: decodeFromFields("u64", fields.bid_round), bidTsMs: decodeFromFields("u64", fields.bid_ts_ms) } ) }
176
+
177
+ static fromFieldsWithTypes( item: FieldsWithTypes ): CloseStrategyEvent { if (!isCloseStrategyEvent(item.type)) { throw new Error("not a CloseStrategyEvent type");
178
+
179
+ }
180
+
181
+ return CloseStrategyEvent.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), u64Padding: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.u64_padding), bidTimes: decodeFromFieldsWithTypes("u64", item.fields.bid_times), bidRound: decodeFromFieldsWithTypes("u64", item.fields.bid_round), bidTsMs: decodeFromFieldsWithTypes("u64", item.fields.bid_ts_ms) } ) }
182
+
183
+ static fromBcs( data: Uint8Array ): CloseStrategyEvent { return CloseStrategyEvent.fromFields( CloseStrategyEvent.bcs.parse(data) ) }
184
+
185
+ toJSONField() { return {
186
+
187
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),u64Padding: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.u64Padding),bidTimes: this.bidTimes.toString(),bidRound: this.bidRound.toString(),bidTsMs: this.bidTsMs.toString(),
188
+
189
+ } }
190
+
191
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
192
+
193
+ static fromJSONField( field: any ): CloseStrategyEvent { return CloseStrategyEvent.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), u64Padding: decodeFromJSONField(reified.vector("u64"), field.u64Padding), bidTimes: decodeFromJSONField("u64", field.bidTimes), bidRound: decodeFromJSONField("u64", field.bidRound), bidTsMs: decodeFromJSONField("u64", field.bidTsMs) } ) }
194
+
195
+ static fromJSON( json: Record<string, any> ): CloseStrategyEvent { if (json.$typeName !== CloseStrategyEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
196
+
197
+ return CloseStrategyEvent.fromJSONField( json, ) }
198
+
199
+ static fromSuiParsedData( content: SuiParsedData ): CloseStrategyEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isCloseStrategyEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a CloseStrategyEvent object`); } return CloseStrategyEvent.fromFieldsWithTypes( content ); }
200
+
201
+ static async fetch( client: SuiClient, id: string ): Promise<CloseStrategyEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching CloseStrategyEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isCloseStrategyEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a CloseStrategyEvent object`); }
202
+ return CloseStrategyEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
203
+
204
+ }
205
+
206
+ /* ============================== CloseStrategyEventV2 =============================== */
207
+
208
+ export function isCloseStrategyEventV2(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEventV2"; }
209
+
210
+ export interface CloseStrategyEventV2Fields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; u64Padding: ToField<Vector<"u64">>; bidTimes: ToField<"u64">; bidRound: ToField<"u64">; bidTsMs: ToField<"u64">; bidRounds: ToField<Vector<"u64">>; accumulatedProfit: ToField<"u64"> }
211
+
212
+ export type CloseStrategyEventV2Reified = Reified< CloseStrategyEventV2, CloseStrategyEventV2Fields >;
213
+
214
+ export class CloseStrategyEventV2 implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEventV2"; static readonly $numTypeParams = 0;
215
+
216
+ readonly $typeName = CloseStrategyEventV2.$typeName;
217
+
218
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEventV2";
219
+
220
+ readonly $typeArgs: [];
221
+
222
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly u64Padding: ToField<Vector<"u64">>; readonly bidTimes: ToField<"u64">; readonly bidRound: ToField<"u64">; readonly bidTsMs: ToField<"u64">; readonly bidRounds: ToField<Vector<"u64">>; readonly accumulatedProfit: ToField<"u64">
223
+
224
+ private constructor(typeArgs: [], fields: CloseStrategyEventV2Fields, ) { this.$fullTypeName = composeSuiType( CloseStrategyEventV2.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEventV2"; this.$typeArgs = typeArgs;
225
+
226
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.u64Padding = fields.u64Padding;; this.bidTimes = fields.bidTimes;; this.bidRound = fields.bidRound;; this.bidTsMs = fields.bidTsMs;; this.bidRounds = fields.bidRounds;; this.accumulatedProfit = fields.accumulatedProfit; }
227
+
228
+ static reified( ): CloseStrategyEventV2Reified { return { typeName: CloseStrategyEventV2.$typeName, fullTypeName: composeSuiType( CloseStrategyEventV2.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::CloseStrategyEventV2", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => CloseStrategyEventV2.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => CloseStrategyEventV2.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => CloseStrategyEventV2.fromBcs( data, ), bcs: CloseStrategyEventV2.bcs, fromJSONField: (field: any) => CloseStrategyEventV2.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => CloseStrategyEventV2.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => CloseStrategyEventV2.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => CloseStrategyEventV2.fetch( client, id, ), new: ( fields: CloseStrategyEventV2Fields, ) => { return new CloseStrategyEventV2( [], fields ) }, kind: "StructClassReified", } }
229
+
230
+ static get r() { return CloseStrategyEventV2.reified() }
231
+
232
+ static phantom( ): PhantomReified<ToTypeStr<CloseStrategyEventV2>> { return phantom(CloseStrategyEventV2.reified( )); } static get p() { return CloseStrategyEventV2.phantom() }
233
+
234
+ static get bcs() { return bcs.struct("CloseStrategyEventV2", {
235
+
236
+ vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), u64_padding: bcs.vector(bcs.u64()), bid_times: bcs.u64(), bid_round: bcs.u64(), bid_ts_ms: bcs.u64(), bid_rounds: bcs.vector(bcs.u64()), accumulated_profit: bcs.u64()
237
+
238
+ }) };
239
+
240
+ static fromFields( fields: Record<string, any> ): CloseStrategyEventV2 { return CloseStrategyEventV2.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), u64Padding: decodeFromFields(reified.vector("u64"), fields.u64_padding), bidTimes: decodeFromFields("u64", fields.bid_times), bidRound: decodeFromFields("u64", fields.bid_round), bidTsMs: decodeFromFields("u64", fields.bid_ts_ms), bidRounds: decodeFromFields(reified.vector("u64"), fields.bid_rounds), accumulatedProfit: decodeFromFields("u64", fields.accumulated_profit) } ) }
241
+
242
+ static fromFieldsWithTypes( item: FieldsWithTypes ): CloseStrategyEventV2 { if (!isCloseStrategyEventV2(item.type)) { throw new Error("not a CloseStrategyEventV2 type");
243
+
244
+ }
245
+
246
+ return CloseStrategyEventV2.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), u64Padding: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.u64_padding), bidTimes: decodeFromFieldsWithTypes("u64", item.fields.bid_times), bidRound: decodeFromFieldsWithTypes("u64", item.fields.bid_round), bidTsMs: decodeFromFieldsWithTypes("u64", item.fields.bid_ts_ms), bidRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.bid_rounds), accumulatedProfit: decodeFromFieldsWithTypes("u64", item.fields.accumulated_profit) } ) }
247
+
248
+ static fromBcs( data: Uint8Array ): CloseStrategyEventV2 { return CloseStrategyEventV2.fromFields( CloseStrategyEventV2.bcs.parse(data) ) }
249
+
250
+ toJSONField() { return {
251
+
252
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),u64Padding: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.u64Padding),bidTimes: this.bidTimes.toString(),bidRound: this.bidRound.toString(),bidTsMs: this.bidTsMs.toString(),bidRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.bidRounds),accumulatedProfit: this.accumulatedProfit.toString(),
253
+
254
+ } }
255
+
256
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
257
+
258
+ static fromJSONField( field: any ): CloseStrategyEventV2 { return CloseStrategyEventV2.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), u64Padding: decodeFromJSONField(reified.vector("u64"), field.u64Padding), bidTimes: decodeFromJSONField("u64", field.bidTimes), bidRound: decodeFromJSONField("u64", field.bidRound), bidTsMs: decodeFromJSONField("u64", field.bidTsMs), bidRounds: decodeFromJSONField(reified.vector("u64"), field.bidRounds), accumulatedProfit: decodeFromJSONField("u64", field.accumulatedProfit) } ) }
259
+
260
+ static fromJSON( json: Record<string, any> ): CloseStrategyEventV2 { if (json.$typeName !== CloseStrategyEventV2.$typeName) { throw new Error("not a WithTwoGenerics json object") };
261
+
262
+ return CloseStrategyEventV2.fromJSONField( json, ) }
263
+
264
+ static fromSuiParsedData( content: SuiParsedData ): CloseStrategyEventV2 { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isCloseStrategyEventV2(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a CloseStrategyEventV2 object`); } return CloseStrategyEventV2.fromFieldsWithTypes( content ); }
265
+
266
+ static async fetch( client: SuiClient, id: string ): Promise<CloseStrategyEventV2> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching CloseStrategyEventV2 object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isCloseStrategyEventV2(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a CloseStrategyEventV2 object`); }
267
+ return CloseStrategyEventV2.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
268
+
269
+ }
270
+
271
+ /* ============================== NewStrategyEvent =============================== */
272
+
273
+ export function isNewStrategyEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEvent"; }
274
+
275
+ export interface NewStrategyEventFields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">> }
276
+
277
+ export type NewStrategyEventReified = Reified< NewStrategyEvent, NewStrategyEventFields >;
278
+
279
+ export class NewStrategyEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEvent"; static readonly $numTypeParams = 0;
280
+
281
+ readonly $typeName = NewStrategyEvent.$typeName;
282
+
283
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEvent";
284
+
285
+ readonly $typeArgs: [];
286
+
287
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>
288
+
289
+ private constructor(typeArgs: [], fields: NewStrategyEventFields, ) { this.$fullTypeName = composeSuiType( NewStrategyEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEvent"; this.$typeArgs = typeArgs;
290
+
291
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds; }
292
+
293
+ static reified( ): NewStrategyEventReified { return { typeName: NewStrategyEvent.$typeName, fullTypeName: composeSuiType( NewStrategyEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => NewStrategyEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => NewStrategyEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => NewStrategyEvent.fromBcs( data, ), bcs: NewStrategyEvent.bcs, fromJSONField: (field: any) => NewStrategyEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => NewStrategyEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => NewStrategyEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => NewStrategyEvent.fetch( client, id, ), new: ( fields: NewStrategyEventFields, ) => { return new NewStrategyEvent( [], fields ) }, kind: "StructClassReified", } }
294
+
295
+ static get r() { return NewStrategyEvent.reified() }
296
+
297
+ static phantom( ): PhantomReified<ToTypeStr<NewStrategyEvent>> { return phantom(NewStrategyEvent.reified( )); } static get p() { return NewStrategyEvent.phantom() }
298
+
299
+ static get bcs() { return bcs.struct("NewStrategyEvent", {
300
+
301
+ vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64())
302
+
303
+ }) };
304
+
305
+ static fromFields( fields: Record<string, any> ): NewStrategyEvent { return NewStrategyEvent.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds) } ) }
306
+
307
+ static fromFieldsWithTypes( item: FieldsWithTypes ): NewStrategyEvent { if (!isNewStrategyEvent(item.type)) { throw new Error("not a NewStrategyEvent type");
308
+
309
+ }
310
+
311
+ return NewStrategyEvent.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds) } ) }
312
+
313
+ static fromBcs( data: Uint8Array ): NewStrategyEvent { return NewStrategyEvent.fromFields( NewStrategyEvent.bcs.parse(data) ) }
314
+
315
+ toJSONField() { return {
316
+
317
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),
318
+
319
+ } }
320
+
321
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
322
+
323
+ static fromJSONField( field: any ): NewStrategyEvent { return NewStrategyEvent.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds) } ) }
324
+
325
+ static fromJSON( json: Record<string, any> ): NewStrategyEvent { if (json.$typeName !== NewStrategyEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
326
+
327
+ return NewStrategyEvent.fromJSONField( json, ) }
328
+
329
+ static fromSuiParsedData( content: SuiParsedData ): NewStrategyEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isNewStrategyEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a NewStrategyEvent object`); } return NewStrategyEvent.fromFieldsWithTypes( content ); }
330
+
331
+ static async fetch( client: SuiClient, id: string ): Promise<NewStrategyEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching NewStrategyEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isNewStrategyEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a NewStrategyEvent object`); }
332
+ return NewStrategyEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
333
+
334
+ }
335
+
336
+ /* ============================== NewStrategyEventV2 =============================== */
337
+
338
+ export function isNewStrategyEventV2(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEventV2"; }
339
+
340
+ export interface NewStrategyEventV2Fields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; depositAmount: ToField<"u64"> }
341
+
342
+ export type NewStrategyEventV2Reified = Reified< NewStrategyEventV2, NewStrategyEventV2Fields >;
343
+
344
+ export class NewStrategyEventV2 implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEventV2"; static readonly $numTypeParams = 0;
345
+
346
+ readonly $typeName = NewStrategyEventV2.$typeName;
347
+
348
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEventV2";
349
+
350
+ readonly $typeArgs: [];
351
+
352
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly depositAmount: ToField<"u64">
353
+
354
+ private constructor(typeArgs: [], fields: NewStrategyEventV2Fields, ) { this.$fullTypeName = composeSuiType( NewStrategyEventV2.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEventV2"; this.$typeArgs = typeArgs;
355
+
356
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.depositAmount = fields.depositAmount; }
357
+
358
+ static reified( ): NewStrategyEventV2Reified { return { typeName: NewStrategyEventV2.$typeName, fullTypeName: composeSuiType( NewStrategyEventV2.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyEventV2", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => NewStrategyEventV2.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => NewStrategyEventV2.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => NewStrategyEventV2.fromBcs( data, ), bcs: NewStrategyEventV2.bcs, fromJSONField: (field: any) => NewStrategyEventV2.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => NewStrategyEventV2.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => NewStrategyEventV2.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => NewStrategyEventV2.fetch( client, id, ), new: ( fields: NewStrategyEventV2Fields, ) => { return new NewStrategyEventV2( [], fields ) }, kind: "StructClassReified", } }
359
+
360
+ static get r() { return NewStrategyEventV2.reified() }
361
+
362
+ static phantom( ): PhantomReified<ToTypeStr<NewStrategyEventV2>> { return phantom(NewStrategyEventV2.reified( )); } static get p() { return NewStrategyEventV2.phantom() }
363
+
364
+ static get bcs() { return bcs.struct("NewStrategyEventV2", {
365
+
366
+ vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), deposit_amount: bcs.u64()
367
+
368
+ }) };
369
+
370
+ static fromFields( fields: Record<string, any> ): NewStrategyEventV2 { return NewStrategyEventV2.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), depositAmount: decodeFromFields("u64", fields.deposit_amount) } ) }
371
+
372
+ static fromFieldsWithTypes( item: FieldsWithTypes ): NewStrategyEventV2 { if (!isNewStrategyEventV2(item.type)) { throw new Error("not a NewStrategyEventV2 type");
373
+
374
+ }
375
+
376
+ return NewStrategyEventV2.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), depositAmount: decodeFromFieldsWithTypes("u64", item.fields.deposit_amount) } ) }
377
+
378
+ static fromBcs( data: Uint8Array ): NewStrategyEventV2 { return NewStrategyEventV2.fromFields( NewStrategyEventV2.bcs.parse(data) ) }
379
+
380
+ toJSONField() { return {
381
+
382
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),depositAmount: this.depositAmount.toString(),
383
+
384
+ } }
385
+
386
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
387
+
388
+ static fromJSONField( field: any ): NewStrategyEventV2 { return NewStrategyEventV2.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), depositAmount: decodeFromJSONField("u64", field.depositAmount) } ) }
389
+
390
+ static fromJSON( json: Record<string, any> ): NewStrategyEventV2 { if (json.$typeName !== NewStrategyEventV2.$typeName) { throw new Error("not a WithTwoGenerics json object") };
391
+
392
+ return NewStrategyEventV2.fromJSONField( json, ) }
393
+
394
+ static fromSuiParsedData( content: SuiParsedData ): NewStrategyEventV2 { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isNewStrategyEventV2(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a NewStrategyEventV2 object`); } return NewStrategyEventV2.fromFieldsWithTypes( content ); }
395
+
396
+ static async fetch( client: SuiClient, id: string ): Promise<NewStrategyEventV2> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching NewStrategyEventV2 object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isNewStrategyEventV2(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a NewStrategyEventV2 object`); }
397
+ return NewStrategyEventV2.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
398
+
399
+ }
400
+
401
+ /* ============================== NewStrategyPoolEvent =============================== */
402
+
403
+ export function isNewStrategyPoolEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyPoolEvent"; }
404
+
405
+ export interface NewStrategyPoolEventFields { id: ToField<ID>; signer: ToField<"address"> }
406
+
407
+ export type NewStrategyPoolEventReified = Reified< NewStrategyPoolEvent, NewStrategyPoolEventFields >;
408
+
409
+ export class NewStrategyPoolEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyPoolEvent"; static readonly $numTypeParams = 0;
410
+
411
+ readonly $typeName = NewStrategyPoolEvent.$typeName;
412
+
413
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyPoolEvent";
414
+
415
+ readonly $typeArgs: [];
416
+
417
+ readonly id: ToField<ID>; readonly signer: ToField<"address">
418
+
419
+ private constructor(typeArgs: [], fields: NewStrategyPoolEventFields, ) { this.$fullTypeName = composeSuiType( NewStrategyPoolEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyPoolEvent"; this.$typeArgs = typeArgs;
420
+
421
+ this.id = fields.id;; this.signer = fields.signer; }
422
+
423
+ static reified( ): NewStrategyPoolEventReified { return { typeName: NewStrategyPoolEvent.$typeName, fullTypeName: composeSuiType( NewStrategyPoolEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyPoolEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => NewStrategyPoolEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => NewStrategyPoolEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => NewStrategyPoolEvent.fromBcs( data, ), bcs: NewStrategyPoolEvent.bcs, fromJSONField: (field: any) => NewStrategyPoolEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => NewStrategyPoolEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => NewStrategyPoolEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => NewStrategyPoolEvent.fetch( client, id, ), new: ( fields: NewStrategyPoolEventFields, ) => { return new NewStrategyPoolEvent( [], fields ) }, kind: "StructClassReified", } }
424
+
425
+ static get r() { return NewStrategyPoolEvent.reified() }
426
+
427
+ static phantom( ): PhantomReified<ToTypeStr<NewStrategyPoolEvent>> { return phantom(NewStrategyPoolEvent.reified( )); } static get p() { return NewStrategyPoolEvent.phantom() }
428
+
429
+ static get bcs() { return bcs.struct("NewStrategyPoolEvent", {
430
+
431
+ id: ID.bcs, signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
432
+
433
+ }) };
434
+
435
+ static fromFields( fields: Record<string, any> ): NewStrategyPoolEvent { return NewStrategyPoolEvent.reified( ).new( { id: decodeFromFields(ID.reified(), fields.id), signer: decodeFromFields("address", fields.signer) } ) }
436
+
437
+ static fromFieldsWithTypes( item: FieldsWithTypes ): NewStrategyPoolEvent { if (!isNewStrategyPoolEvent(item.type)) { throw new Error("not a NewStrategyPoolEvent type");
438
+
439
+ }
440
+
441
+ return NewStrategyPoolEvent.reified( ).new( { id: decodeFromFieldsWithTypes(ID.reified(), item.fields.id), signer: decodeFromFieldsWithTypes("address", item.fields.signer) } ) }
442
+
443
+ static fromBcs( data: Uint8Array ): NewStrategyPoolEvent { return NewStrategyPoolEvent.fromFields( NewStrategyPoolEvent.bcs.parse(data) ) }
444
+
445
+ toJSONField() { return {
446
+
447
+ id: this.id,signer: this.signer,
448
+
449
+ } }
450
+
451
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
452
+
453
+ static fromJSONField( field: any ): NewStrategyPoolEvent { return NewStrategyPoolEvent.reified( ).new( { id: decodeFromJSONField(ID.reified(), field.id), signer: decodeFromJSONField("address", field.signer) } ) }
454
+
455
+ static fromJSON( json: Record<string, any> ): NewStrategyPoolEvent { if (json.$typeName !== NewStrategyPoolEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
456
+
457
+ return NewStrategyPoolEvent.fromJSONField( json, ) }
458
+
459
+ static fromSuiParsedData( content: SuiParsedData ): NewStrategyPoolEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isNewStrategyPoolEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a NewStrategyPoolEvent object`); } return NewStrategyPoolEvent.fromFieldsWithTypes( content ); }
460
+
461
+ static async fetch( client: SuiClient, id: string ): Promise<NewStrategyPoolEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching NewStrategyPoolEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isNewStrategyPoolEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a NewStrategyPoolEvent object`); }
462
+ return NewStrategyPoolEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
463
+
464
+ }
465
+
466
+ /* ============================== NewStrategySignalEvent =============================== */
467
+
468
+ export function isNewStrategySignalEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategySignalEvent"; }
469
+
470
+ export interface NewStrategySignalEventFields { id: ToField<ID>; vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; signer: ToField<"address"> }
471
+
472
+ export type NewStrategySignalEventReified = Reified< NewStrategySignalEvent, NewStrategySignalEventFields >;
473
+
474
+ export class NewStrategySignalEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategySignalEvent"; static readonly $numTypeParams = 0;
475
+
476
+ readonly $typeName = NewStrategySignalEvent.$typeName;
477
+
478
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategySignalEvent";
479
+
480
+ readonly $typeArgs: [];
481
+
482
+ readonly id: ToField<ID>; readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly signer: ToField<"address">
483
+
484
+ private constructor(typeArgs: [], fields: NewStrategySignalEventFields, ) { this.$fullTypeName = composeSuiType( NewStrategySignalEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategySignalEvent"; this.$typeArgs = typeArgs;
485
+
486
+ this.id = fields.id;; this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.signer = fields.signer; }
487
+
488
+ static reified( ): NewStrategySignalEventReified { return { typeName: NewStrategySignalEvent.$typeName, fullTypeName: composeSuiType( NewStrategySignalEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategySignalEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => NewStrategySignalEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => NewStrategySignalEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => NewStrategySignalEvent.fromBcs( data, ), bcs: NewStrategySignalEvent.bcs, fromJSONField: (field: any) => NewStrategySignalEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => NewStrategySignalEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => NewStrategySignalEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => NewStrategySignalEvent.fetch( client, id, ), new: ( fields: NewStrategySignalEventFields, ) => { return new NewStrategySignalEvent( [], fields ) }, kind: "StructClassReified", } }
489
+
490
+ static get r() { return NewStrategySignalEvent.reified() }
491
+
492
+ static phantom( ): PhantomReified<ToTypeStr<NewStrategySignalEvent>> { return phantom(NewStrategySignalEvent.reified( )); } static get p() { return NewStrategySignalEvent.phantom() }
493
+
494
+ static get bcs() { return bcs.struct("NewStrategySignalEvent", {
495
+
496
+ id: ID.bcs, vault_index: bcs.u64(), signal_index: bcs.u64(), signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
497
+
498
+ }) };
499
+
500
+ static fromFields( fields: Record<string, any> ): NewStrategySignalEvent { return NewStrategySignalEvent.reified( ).new( { id: decodeFromFields(ID.reified(), fields.id), vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), signer: decodeFromFields("address", fields.signer) } ) }
501
+
502
+ static fromFieldsWithTypes( item: FieldsWithTypes ): NewStrategySignalEvent { if (!isNewStrategySignalEvent(item.type)) { throw new Error("not a NewStrategySignalEvent type");
503
+
504
+ }
505
+
506
+ return NewStrategySignalEvent.reified( ).new( { id: decodeFromFieldsWithTypes(ID.reified(), item.fields.id), vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), signer: decodeFromFieldsWithTypes("address", item.fields.signer) } ) }
507
+
508
+ static fromBcs( data: Uint8Array ): NewStrategySignalEvent { return NewStrategySignalEvent.fromFields( NewStrategySignalEvent.bcs.parse(data) ) }
509
+
510
+ toJSONField() { return {
511
+
512
+ id: this.id,vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),signer: this.signer,
513
+
514
+ } }
515
+
516
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
517
+
518
+ static fromJSONField( field: any ): NewStrategySignalEvent { return NewStrategySignalEvent.reified( ).new( { id: decodeFromJSONField(ID.reified(), field.id), vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), signer: decodeFromJSONField("address", field.signer) } ) }
519
+
520
+ static fromJSON( json: Record<string, any> ): NewStrategySignalEvent { if (json.$typeName !== NewStrategySignalEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
521
+
522
+ return NewStrategySignalEvent.fromJSONField( json, ) }
523
+
524
+ static fromSuiParsedData( content: SuiParsedData ): NewStrategySignalEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isNewStrategySignalEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a NewStrategySignalEvent object`); } return NewStrategySignalEvent.fromFieldsWithTypes( content ); }
525
+
526
+ static async fetch( client: SuiClient, id: string ): Promise<NewStrategySignalEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching NewStrategySignalEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isNewStrategySignalEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a NewStrategySignalEvent object`); }
527
+ return NewStrategySignalEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
528
+
529
+ }
530
+
531
+ /* ============================== NewStrategyVaultEvent =============================== */
532
+
533
+ export function isNewStrategyVaultEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyVaultEvent"; }
534
+
535
+ export interface NewStrategyVaultEventFields { id: ToField<ID>; vaultIndex: ToField<"u64">; signer: ToField<"address"> }
536
+
537
+ export type NewStrategyVaultEventReified = Reified< NewStrategyVaultEvent, NewStrategyVaultEventFields >;
538
+
539
+ export class NewStrategyVaultEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyVaultEvent"; static readonly $numTypeParams = 0;
540
+
541
+ readonly $typeName = NewStrategyVaultEvent.$typeName;
542
+
543
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyVaultEvent";
544
+
545
+ readonly $typeArgs: [];
546
+
547
+ readonly id: ToField<ID>; readonly vaultIndex: ToField<"u64">; readonly signer: ToField<"address">
548
+
549
+ private constructor(typeArgs: [], fields: NewStrategyVaultEventFields, ) { this.$fullTypeName = composeSuiType( NewStrategyVaultEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyVaultEvent"; this.$typeArgs = typeArgs;
550
+
551
+ this.id = fields.id;; this.vaultIndex = fields.vaultIndex;; this.signer = fields.signer; }
552
+
553
+ static reified( ): NewStrategyVaultEventReified { return { typeName: NewStrategyVaultEvent.$typeName, fullTypeName: composeSuiType( NewStrategyVaultEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::NewStrategyVaultEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => NewStrategyVaultEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => NewStrategyVaultEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => NewStrategyVaultEvent.fromBcs( data, ), bcs: NewStrategyVaultEvent.bcs, fromJSONField: (field: any) => NewStrategyVaultEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => NewStrategyVaultEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => NewStrategyVaultEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => NewStrategyVaultEvent.fetch( client, id, ), new: ( fields: NewStrategyVaultEventFields, ) => { return new NewStrategyVaultEvent( [], fields ) }, kind: "StructClassReified", } }
554
+
555
+ static get r() { return NewStrategyVaultEvent.reified() }
556
+
557
+ static phantom( ): PhantomReified<ToTypeStr<NewStrategyVaultEvent>> { return phantom(NewStrategyVaultEvent.reified( )); } static get p() { return NewStrategyVaultEvent.phantom() }
558
+
559
+ static get bcs() { return bcs.struct("NewStrategyVaultEvent", {
560
+
561
+ id: ID.bcs, vault_index: bcs.u64(), signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
562
+
563
+ }) };
564
+
565
+ static fromFields( fields: Record<string, any> ): NewStrategyVaultEvent { return NewStrategyVaultEvent.reified( ).new( { id: decodeFromFields(ID.reified(), fields.id), vaultIndex: decodeFromFields("u64", fields.vault_index), signer: decodeFromFields("address", fields.signer) } ) }
566
+
567
+ static fromFieldsWithTypes( item: FieldsWithTypes ): NewStrategyVaultEvent { if (!isNewStrategyVaultEvent(item.type)) { throw new Error("not a NewStrategyVaultEvent type");
568
+
569
+ }
570
+
571
+ return NewStrategyVaultEvent.reified( ).new( { id: decodeFromFieldsWithTypes(ID.reified(), item.fields.id), vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signer: decodeFromFieldsWithTypes("address", item.fields.signer) } ) }
572
+
573
+ static fromBcs( data: Uint8Array ): NewStrategyVaultEvent { return NewStrategyVaultEvent.fromFields( NewStrategyVaultEvent.bcs.parse(data) ) }
574
+
575
+ toJSONField() { return {
576
+
577
+ id: this.id,vaultIndex: this.vaultIndex.toString(),signer: this.signer,
578
+
579
+ } }
580
+
581
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
582
+
583
+ static fromJSONField( field: any ): NewStrategyVaultEvent { return NewStrategyVaultEvent.reified( ).new( { id: decodeFromJSONField(ID.reified(), field.id), vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signer: decodeFromJSONField("address", field.signer) } ) }
584
+
585
+ static fromJSON( json: Record<string, any> ): NewStrategyVaultEvent { if (json.$typeName !== NewStrategyVaultEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
586
+
587
+ return NewStrategyVaultEvent.fromJSONField( json, ) }
588
+
589
+ static fromSuiParsedData( content: SuiParsedData ): NewStrategyVaultEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isNewStrategyVaultEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a NewStrategyVaultEvent object`); } return NewStrategyVaultEvent.fromFieldsWithTypes( content ); }
590
+
591
+ static async fetch( client: SuiClient, id: string ): Promise<NewStrategyVaultEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching NewStrategyVaultEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isNewStrategyVaultEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a NewStrategyVaultEvent object`); }
592
+ return NewStrategyVaultEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
593
+
594
+ }
595
+
596
+ /* ============================== RemoveStrategyVaultEvent =============================== */
597
+
598
+ export function isRemoveStrategyVaultEvent(type: string): boolean { type = compressSuiType(type); return type === "0x197e13a257d67211cd3bc9ff5b93ffd298afedb43f4c7cbdd9438f5e4e823f4f::auto_bid::RemoveStrategyVaultEvent"; }
599
+
600
+ export interface RemoveStrategyVaultEventFields { id: ToField<ID>; vaultIndex: ToField<"u64">; signer: ToField<"address"> }
601
+
602
+ export type RemoveStrategyVaultEventReified = Reified< RemoveStrategyVaultEvent, RemoveStrategyVaultEventFields >;
603
+
604
+ export class RemoveStrategyVaultEvent implements StructClass { static readonly $typeName = "0x197e13a257d67211cd3bc9ff5b93ffd298afedb43f4c7cbdd9438f5e4e823f4f::auto_bid::RemoveStrategyVaultEvent"; static readonly $numTypeParams = 0;
605
+
606
+ readonly $typeName = RemoveStrategyVaultEvent.$typeName;
607
+
608
+ readonly $fullTypeName: "0x197e13a257d67211cd3bc9ff5b93ffd298afedb43f4c7cbdd9438f5e4e823f4f::auto_bid::RemoveStrategyVaultEvent";
609
+
610
+ readonly $typeArgs: [];
611
+
612
+ readonly id: ToField<ID>; readonly vaultIndex: ToField<"u64">; readonly signer: ToField<"address">
613
+
614
+ private constructor(typeArgs: [], fields: RemoveStrategyVaultEventFields, ) { this.$fullTypeName = composeSuiType( RemoveStrategyVaultEvent.$typeName, ...typeArgs ) as "0x197e13a257d67211cd3bc9ff5b93ffd298afedb43f4c7cbdd9438f5e4e823f4f::auto_bid::RemoveStrategyVaultEvent"; this.$typeArgs = typeArgs;
615
+
616
+ this.id = fields.id;; this.vaultIndex = fields.vaultIndex;; this.signer = fields.signer; }
617
+
618
+ static reified( ): RemoveStrategyVaultEventReified { return { typeName: RemoveStrategyVaultEvent.$typeName, fullTypeName: composeSuiType( RemoveStrategyVaultEvent.$typeName, ...[] ) as "0x197e13a257d67211cd3bc9ff5b93ffd298afedb43f4c7cbdd9438f5e4e823f4f::auto_bid::RemoveStrategyVaultEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => RemoveStrategyVaultEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => RemoveStrategyVaultEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => RemoveStrategyVaultEvent.fromBcs( data, ), bcs: RemoveStrategyVaultEvent.bcs, fromJSONField: (field: any) => RemoveStrategyVaultEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => RemoveStrategyVaultEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => RemoveStrategyVaultEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => RemoveStrategyVaultEvent.fetch( client, id, ), new: ( fields: RemoveStrategyVaultEventFields, ) => { return new RemoveStrategyVaultEvent( [], fields ) }, kind: "StructClassReified", } }
619
+
620
+ static get r() { return RemoveStrategyVaultEvent.reified() }
621
+
622
+ static phantom( ): PhantomReified<ToTypeStr<RemoveStrategyVaultEvent>> { return phantom(RemoveStrategyVaultEvent.reified( )); } static get p() { return RemoveStrategyVaultEvent.phantom() }
623
+
624
+ static get bcs() { return bcs.struct("RemoveStrategyVaultEvent", {
625
+
626
+ id: ID.bcs, vault_index: bcs.u64(), signer: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
627
+
628
+ }) };
629
+
630
+ static fromFields( fields: Record<string, any> ): RemoveStrategyVaultEvent { return RemoveStrategyVaultEvent.reified( ).new( { id: decodeFromFields(ID.reified(), fields.id), vaultIndex: decodeFromFields("u64", fields.vault_index), signer: decodeFromFields("address", fields.signer) } ) }
631
+
632
+ static fromFieldsWithTypes( item: FieldsWithTypes ): RemoveStrategyVaultEvent { if (!isRemoveStrategyVaultEvent(item.type)) { throw new Error("not a RemoveStrategyVaultEvent type");
633
+
634
+ }
635
+
636
+ return RemoveStrategyVaultEvent.reified( ).new( { id: decodeFromFieldsWithTypes(ID.reified(), item.fields.id), vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signer: decodeFromFieldsWithTypes("address", item.fields.signer) } ) }
637
+
638
+ static fromBcs( data: Uint8Array ): RemoveStrategyVaultEvent { return RemoveStrategyVaultEvent.fromFields( RemoveStrategyVaultEvent.bcs.parse(data) ) }
639
+
640
+ toJSONField() { return {
641
+
642
+ id: this.id,vaultIndex: this.vaultIndex.toString(),signer: this.signer,
643
+
644
+ } }
645
+
646
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
647
+
648
+ static fromJSONField( field: any ): RemoveStrategyVaultEvent { return RemoveStrategyVaultEvent.reified( ).new( { id: decodeFromJSONField(ID.reified(), field.id), vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signer: decodeFromJSONField("address", field.signer) } ) }
649
+
650
+ static fromJSON( json: Record<string, any> ): RemoveStrategyVaultEvent { if (json.$typeName !== RemoveStrategyVaultEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
651
+
652
+ return RemoveStrategyVaultEvent.fromJSONField( json, ) }
653
+
654
+ static fromSuiParsedData( content: SuiParsedData ): RemoveStrategyVaultEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isRemoveStrategyVaultEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a RemoveStrategyVaultEvent object`); } return RemoveStrategyVaultEvent.fromFieldsWithTypes( content ); }
655
+
656
+ static async fetch( client: SuiClient, id: string ): Promise<RemoveStrategyVaultEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching RemoveStrategyVaultEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isRemoveStrategyVaultEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a RemoveStrategyVaultEvent object`); }
657
+ return RemoveStrategyVaultEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
658
+
659
+ }
660
+
661
+ /* ============================== Strategy =============================== */
662
+
663
+ export function isStrategy(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::Strategy"; }
664
+
665
+ export interface StrategyFields { id: ToField<UID>; vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; receipts: ToField<Vector<TypusBidReceipt>>; active: ToField<"bool">; u64Padding: ToField<Vector<"u64">>; bidTimes: ToField<"u64">; bidRound: ToField<"u64">; bidTsMs: ToField<"u64"> }
666
+
667
+ export type StrategyReified = Reified< Strategy, StrategyFields >;
668
+
669
+ export class Strategy implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::Strategy"; static readonly $numTypeParams = 0;
670
+
671
+ readonly $typeName = Strategy.$typeName;
672
+
673
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::Strategy";
674
+
675
+ readonly $typeArgs: [];
676
+
677
+ readonly id: ToField<UID>; readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly receipts: ToField<Vector<TypusBidReceipt>>; readonly active: ToField<"bool">; readonly u64Padding: ToField<Vector<"u64">>; readonly bidTimes: ToField<"u64">; readonly bidRound: ToField<"u64">; readonly bidTsMs: ToField<"u64">
678
+
679
+ private constructor(typeArgs: [], fields: StrategyFields, ) { this.$fullTypeName = composeSuiType( Strategy.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::Strategy"; this.$typeArgs = typeArgs;
680
+
681
+ this.id = fields.id;; this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.receipts = fields.receipts;; this.active = fields.active;; this.u64Padding = fields.u64Padding;; this.bidTimes = fields.bidTimes;; this.bidRound = fields.bidRound;; this.bidTsMs = fields.bidTsMs; }
682
+
683
+ static reified( ): StrategyReified { return { typeName: Strategy.$typeName, fullTypeName: composeSuiType( Strategy.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::Strategy", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => Strategy.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => Strategy.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => Strategy.fromBcs( data, ), bcs: Strategy.bcs, fromJSONField: (field: any) => Strategy.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => Strategy.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => Strategy.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => Strategy.fetch( client, id, ), new: ( fields: StrategyFields, ) => { return new Strategy( [], fields ) }, kind: "StructClassReified", } }
684
+
685
+ static get r() { return Strategy.reified() }
686
+
687
+ static phantom( ): PhantomReified<ToTypeStr<Strategy>> { return phantom(Strategy.reified( )); } static get p() { return Strategy.phantom() }
688
+
689
+ static get bcs() { return bcs.struct("Strategy", {
690
+
691
+ id: UID.bcs, vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), receipts: bcs.vector(TypusBidReceipt.bcs), active: bcs.bool(), u64_padding: bcs.vector(bcs.u64()), bid_times: bcs.u64(), bid_round: bcs.u64(), bid_ts_ms: bcs.u64()
692
+
693
+ }) };
694
+
695
+ static fromFields( fields: Record<string, any> ): Strategy { return Strategy.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), receipts: decodeFromFields(reified.vector(TypusBidReceipt.reified()), fields.receipts), active: decodeFromFields("bool", fields.active), u64Padding: decodeFromFields(reified.vector("u64"), fields.u64_padding), bidTimes: decodeFromFields("u64", fields.bid_times), bidRound: decodeFromFields("u64", fields.bid_round), bidTsMs: decodeFromFields("u64", fields.bid_ts_ms) } ) }
696
+
697
+ static fromFieldsWithTypes( item: FieldsWithTypes ): Strategy { if (!isStrategy(item.type)) { throw new Error("not a Strategy type");
698
+
699
+ }
700
+
701
+ return Strategy.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), receipts: decodeFromFieldsWithTypes(reified.vector(TypusBidReceipt.reified()), item.fields.receipts), active: decodeFromFieldsWithTypes("bool", item.fields.active), u64Padding: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.u64_padding), bidTimes: decodeFromFieldsWithTypes("u64", item.fields.bid_times), bidRound: decodeFromFieldsWithTypes("u64", item.fields.bid_round), bidTsMs: decodeFromFieldsWithTypes("u64", item.fields.bid_ts_ms) } ) }
702
+
703
+ static fromBcs( data: Uint8Array ): Strategy { return Strategy.fromFields( Strategy.bcs.parse(data) ) }
704
+
705
+ toJSONField() { return {
706
+
707
+ id: this.id,vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),receipts: fieldToJSON<Vector<TypusBidReceipt>>(`vector<0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusBidReceipt>`, this.receipts),active: this.active,u64Padding: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.u64Padding),bidTimes: this.bidTimes.toString(),bidRound: this.bidRound.toString(),bidTsMs: this.bidTsMs.toString(),
708
+
709
+ } }
710
+
711
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
712
+
713
+ static fromJSONField( field: any ): Strategy { return Strategy.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), receipts: decodeFromJSONField(reified.vector(TypusBidReceipt.reified()), field.receipts), active: decodeFromJSONField("bool", field.active), u64Padding: decodeFromJSONField(reified.vector("u64"), field.u64Padding), bidTimes: decodeFromJSONField("u64", field.bidTimes), bidRound: decodeFromJSONField("u64", field.bidRound), bidTsMs: decodeFromJSONField("u64", field.bidTsMs) } ) }
714
+
715
+ static fromJSON( json: Record<string, any> ): Strategy { if (json.$typeName !== Strategy.$typeName) { throw new Error("not a WithTwoGenerics json object") };
716
+
717
+ return Strategy.fromJSONField( json, ) }
718
+
719
+ static fromSuiParsedData( content: SuiParsedData ): Strategy { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isStrategy(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a Strategy object`); } return Strategy.fromFieldsWithTypes( content ); }
720
+
721
+ static async fetch( client: SuiClient, id: string ): Promise<Strategy> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching Strategy object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isStrategy(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a Strategy object`); }
722
+ return Strategy.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
723
+
724
+ }
725
+
726
+ /* ============================== StrategyPool =============================== */
727
+
728
+ export function isStrategyPool(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPool"; }
729
+
730
+ export interface StrategyPoolFields { id: ToField<UID>; strategies: ToField<VecMap<"u64", VecMap<"u64", TableVec<ToPhantom<Strategy>>>>>; authority: ToField<Vector<"address">> }
731
+
732
+ export type StrategyPoolReified = Reified< StrategyPool, StrategyPoolFields >;
733
+
734
+ export class StrategyPool implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPool"; static readonly $numTypeParams = 0;
735
+
736
+ readonly $typeName = StrategyPool.$typeName;
737
+
738
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPool";
739
+
740
+ readonly $typeArgs: [];
741
+
742
+ readonly id: ToField<UID>; readonly strategies: ToField<VecMap<"u64", VecMap<"u64", TableVec<ToPhantom<Strategy>>>>>; readonly authority: ToField<Vector<"address">>
743
+
744
+ private constructor(typeArgs: [], fields: StrategyPoolFields, ) { this.$fullTypeName = composeSuiType( StrategyPool.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPool"; this.$typeArgs = typeArgs;
745
+
746
+ this.id = fields.id;; this.strategies = fields.strategies;; this.authority = fields.authority; }
747
+
748
+ static reified( ): StrategyPoolReified { return { typeName: StrategyPool.$typeName, fullTypeName: composeSuiType( StrategyPool.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPool", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => StrategyPool.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => StrategyPool.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => StrategyPool.fromBcs( data, ), bcs: StrategyPool.bcs, fromJSONField: (field: any) => StrategyPool.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => StrategyPool.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => StrategyPool.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => StrategyPool.fetch( client, id, ), new: ( fields: StrategyPoolFields, ) => { return new StrategyPool( [], fields ) }, kind: "StructClassReified", } }
749
+
750
+ static get r() { return StrategyPool.reified() }
751
+
752
+ static phantom( ): PhantomReified<ToTypeStr<StrategyPool>> { return phantom(StrategyPool.reified( )); } static get p() { return StrategyPool.phantom() }
753
+
754
+ static get bcs() { return bcs.struct("StrategyPool", {
755
+
756
+ id: UID.bcs, strategies: VecMap.bcs(bcs.u64(), VecMap.bcs(bcs.u64(), TableVec.bcs)), authority: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
757
+
758
+ }) };
759
+
760
+ static fromFields( fields: Record<string, any> ): StrategyPool { return StrategyPool.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), strategies: decodeFromFields(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(Strategy.reified())))), fields.strategies), authority: decodeFromFields(reified.vector("address"), fields.authority) } ) }
761
+
762
+ static fromFieldsWithTypes( item: FieldsWithTypes ): StrategyPool { if (!isStrategyPool(item.type)) { throw new Error("not a StrategyPool type");
763
+
764
+ }
765
+
766
+ return StrategyPool.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), strategies: decodeFromFieldsWithTypes(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(Strategy.reified())))), item.fields.strategies), authority: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.authority) } ) }
767
+
768
+ static fromBcs( data: Uint8Array ): StrategyPool { return StrategyPool.fromFields( StrategyPool.bcs.parse(data) ) }
769
+
770
+ toJSONField() { return {
771
+
772
+ id: this.id,strategies: this.strategies.toJSONField(),authority: fieldToJSON<Vector<"address">>(`vector<address>`, this.authority),
773
+
774
+ } }
775
+
776
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
777
+
778
+ static fromJSONField( field: any ): StrategyPool { return StrategyPool.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), strategies: decodeFromJSONField(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(Strategy.reified())))), field.strategies), authority: decodeFromJSONField(reified.vector("address"), field.authority) } ) }
779
+
780
+ static fromJSON( json: Record<string, any> ): StrategyPool { if (json.$typeName !== StrategyPool.$typeName) { throw new Error("not a WithTwoGenerics json object") };
781
+
782
+ return StrategyPool.fromJSONField( json, ) }
783
+
784
+ static fromSuiParsedData( content: SuiParsedData ): StrategyPool { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isStrategyPool(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a StrategyPool object`); } return StrategyPool.fromFieldsWithTypes( content ); }
785
+
786
+ static async fetch( client: SuiClient, id: string ): Promise<StrategyPool> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching StrategyPool object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isStrategyPool(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a StrategyPool object`); }
787
+ return StrategyPool.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
788
+
789
+ }
790
+
791
+ /* ============================== StrategyPoolV2 =============================== */
792
+
793
+ export function isStrategyPoolV2(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPoolV2"; }
794
+
795
+ export interface StrategyPoolV2Fields { id: ToField<UID>; strategies: ToField<VecMap<"u64", VecMap<"u64", TableVec<ToPhantom<StrategyV2>>>>>; authority: ToField<Vector<"address">> }
796
+
797
+ export type StrategyPoolV2Reified = Reified< StrategyPoolV2, StrategyPoolV2Fields >;
798
+
799
+ export class StrategyPoolV2 implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPoolV2"; static readonly $numTypeParams = 0;
800
+
801
+ readonly $typeName = StrategyPoolV2.$typeName;
802
+
803
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPoolV2";
804
+
805
+ readonly $typeArgs: [];
806
+
807
+ readonly id: ToField<UID>; readonly strategies: ToField<VecMap<"u64", VecMap<"u64", TableVec<ToPhantom<StrategyV2>>>>>; readonly authority: ToField<Vector<"address">>
808
+
809
+ private constructor(typeArgs: [], fields: StrategyPoolV2Fields, ) { this.$fullTypeName = composeSuiType( StrategyPoolV2.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPoolV2"; this.$typeArgs = typeArgs;
810
+
811
+ this.id = fields.id;; this.strategies = fields.strategies;; this.authority = fields.authority; }
812
+
813
+ static reified( ): StrategyPoolV2Reified { return { typeName: StrategyPoolV2.$typeName, fullTypeName: composeSuiType( StrategyPoolV2.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyPoolV2", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => StrategyPoolV2.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => StrategyPoolV2.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => StrategyPoolV2.fromBcs( data, ), bcs: StrategyPoolV2.bcs, fromJSONField: (field: any) => StrategyPoolV2.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => StrategyPoolV2.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => StrategyPoolV2.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => StrategyPoolV2.fetch( client, id, ), new: ( fields: StrategyPoolV2Fields, ) => { return new StrategyPoolV2( [], fields ) }, kind: "StructClassReified", } }
814
+
815
+ static get r() { return StrategyPoolV2.reified() }
816
+
817
+ static phantom( ): PhantomReified<ToTypeStr<StrategyPoolV2>> { return phantom(StrategyPoolV2.reified( )); } static get p() { return StrategyPoolV2.phantom() }
818
+
819
+ static get bcs() { return bcs.struct("StrategyPoolV2", {
820
+
821
+ id: UID.bcs, strategies: VecMap.bcs(bcs.u64(), VecMap.bcs(bcs.u64(), TableVec.bcs)), authority: bcs.vector(bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }))
822
+
823
+ }) };
824
+
825
+ static fromFields( fields: Record<string, any> ): StrategyPoolV2 { return StrategyPoolV2.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), strategies: decodeFromFields(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(StrategyV2.reified())))), fields.strategies), authority: decodeFromFields(reified.vector("address"), fields.authority) } ) }
826
+
827
+ static fromFieldsWithTypes( item: FieldsWithTypes ): StrategyPoolV2 { if (!isStrategyPoolV2(item.type)) { throw new Error("not a StrategyPoolV2 type");
828
+
829
+ }
830
+
831
+ return StrategyPoolV2.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), strategies: decodeFromFieldsWithTypes(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(StrategyV2.reified())))), item.fields.strategies), authority: decodeFromFieldsWithTypes(reified.vector("address"), item.fields.authority) } ) }
832
+
833
+ static fromBcs( data: Uint8Array ): StrategyPoolV2 { return StrategyPoolV2.fromFields( StrategyPoolV2.bcs.parse(data) ) }
834
+
835
+ toJSONField() { return {
836
+
837
+ id: this.id,strategies: this.strategies.toJSONField(),authority: fieldToJSON<Vector<"address">>(`vector<address>`, this.authority),
838
+
839
+ } }
840
+
841
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
842
+
843
+ static fromJSONField( field: any ): StrategyPoolV2 { return StrategyPoolV2.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), strategies: decodeFromJSONField(VecMap.reified("u64", VecMap.reified("u64", TableVec.reified(reified.phantom(StrategyV2.reified())))), field.strategies), authority: decodeFromJSONField(reified.vector("address"), field.authority) } ) }
844
+
845
+ static fromJSON( json: Record<string, any> ): StrategyPoolV2 { if (json.$typeName !== StrategyPoolV2.$typeName) { throw new Error("not a WithTwoGenerics json object") };
846
+
847
+ return StrategyPoolV2.fromJSONField( json, ) }
848
+
849
+ static fromSuiParsedData( content: SuiParsedData ): StrategyPoolV2 { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isStrategyPoolV2(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a StrategyPoolV2 object`); } return StrategyPoolV2.fromFieldsWithTypes( content ); }
850
+
851
+ static async fetch( client: SuiClient, id: string ): Promise<StrategyPoolV2> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching StrategyPoolV2 object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isStrategyPoolV2(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a StrategyPoolV2 object`); }
852
+ return StrategyPoolV2.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
853
+
854
+ }
855
+
856
+ /* ============================== StrategyV2 =============================== */
857
+
858
+ export function isStrategyV2(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyV2"; }
859
+
860
+ export interface StrategyV2Fields { id: ToField<UID>; vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; receipts: ToField<Vector<TypusBidReceipt>>; active: ToField<"bool">; u64Padding: ToField<Vector<"u64">>; bidTimes: ToField<"u64">; bidRound: ToField<"u64">; bidTsMs: ToField<"u64">; bidRounds: ToField<Vector<"u64">>; accumulatedProfit: ToField<"u64"> }
861
+
862
+ export type StrategyV2Reified = Reified< StrategyV2, StrategyV2Fields >;
863
+
864
+ export class StrategyV2 implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyV2"; static readonly $numTypeParams = 0;
865
+
866
+ readonly $typeName = StrategyV2.$typeName;
867
+
868
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyV2";
869
+
870
+ readonly $typeArgs: [];
871
+
872
+ readonly id: ToField<UID>; readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly receipts: ToField<Vector<TypusBidReceipt>>; readonly active: ToField<"bool">; readonly u64Padding: ToField<Vector<"u64">>; readonly bidTimes: ToField<"u64">; readonly bidRound: ToField<"u64">; readonly bidTsMs: ToField<"u64">; readonly bidRounds: ToField<Vector<"u64">>; readonly accumulatedProfit: ToField<"u64">
873
+
874
+ private constructor(typeArgs: [], fields: StrategyV2Fields, ) { this.$fullTypeName = composeSuiType( StrategyV2.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyV2"; this.$typeArgs = typeArgs;
875
+
876
+ this.id = fields.id;; this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.receipts = fields.receipts;; this.active = fields.active;; this.u64Padding = fields.u64Padding;; this.bidTimes = fields.bidTimes;; this.bidRound = fields.bidRound;; this.bidTsMs = fields.bidTsMs;; this.bidRounds = fields.bidRounds;; this.accumulatedProfit = fields.accumulatedProfit; }
877
+
878
+ static reified( ): StrategyV2Reified { return { typeName: StrategyV2.$typeName, fullTypeName: composeSuiType( StrategyV2.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::StrategyV2", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => StrategyV2.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => StrategyV2.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => StrategyV2.fromBcs( data, ), bcs: StrategyV2.bcs, fromJSONField: (field: any) => StrategyV2.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => StrategyV2.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => StrategyV2.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => StrategyV2.fetch( client, id, ), new: ( fields: StrategyV2Fields, ) => { return new StrategyV2( [], fields ) }, kind: "StructClassReified", } }
879
+
880
+ static get r() { return StrategyV2.reified() }
881
+
882
+ static phantom( ): PhantomReified<ToTypeStr<StrategyV2>> { return phantom(StrategyV2.reified( )); } static get p() { return StrategyV2.phantom() }
883
+
884
+ static get bcs() { return bcs.struct("StrategyV2", {
885
+
886
+ id: UID.bcs, vault_index: bcs.u64(), signal_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), receipts: bcs.vector(TypusBidReceipt.bcs), active: bcs.bool(), u64_padding: bcs.vector(bcs.u64()), bid_times: bcs.u64(), bid_round: bcs.u64(), bid_ts_ms: bcs.u64(), bid_rounds: bcs.vector(bcs.u64()), accumulated_profit: bcs.u64()
887
+
888
+ }) };
889
+
890
+ static fromFields( fields: Record<string, any> ): StrategyV2 { return StrategyV2.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), receipts: decodeFromFields(reified.vector(TypusBidReceipt.reified()), fields.receipts), active: decodeFromFields("bool", fields.active), u64Padding: decodeFromFields(reified.vector("u64"), fields.u64_padding), bidTimes: decodeFromFields("u64", fields.bid_times), bidRound: decodeFromFields("u64", fields.bid_round), bidTsMs: decodeFromFields("u64", fields.bid_ts_ms), bidRounds: decodeFromFields(reified.vector("u64"), fields.bid_rounds), accumulatedProfit: decodeFromFields("u64", fields.accumulated_profit) } ) }
891
+
892
+ static fromFieldsWithTypes( item: FieldsWithTypes ): StrategyV2 { if (!isStrategyV2(item.type)) { throw new Error("not a StrategyV2 type");
893
+
894
+ }
895
+
896
+ return StrategyV2.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), receipts: decodeFromFieldsWithTypes(reified.vector(TypusBidReceipt.reified()), item.fields.receipts), active: decodeFromFieldsWithTypes("bool", item.fields.active), u64Padding: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.u64_padding), bidTimes: decodeFromFieldsWithTypes("u64", item.fields.bid_times), bidRound: decodeFromFieldsWithTypes("u64", item.fields.bid_round), bidTsMs: decodeFromFieldsWithTypes("u64", item.fields.bid_ts_ms), bidRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.bid_rounds), accumulatedProfit: decodeFromFieldsWithTypes("u64", item.fields.accumulated_profit) } ) }
897
+
898
+ static fromBcs( data: Uint8Array ): StrategyV2 { return StrategyV2.fromFields( StrategyV2.bcs.parse(data) ) }
899
+
900
+ toJSONField() { return {
901
+
902
+ id: this.id,vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),receipts: fieldToJSON<Vector<TypusBidReceipt>>(`vector<0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded::vault::TypusBidReceipt>`, this.receipts),active: this.active,u64Padding: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.u64Padding),bidTimes: this.bidTimes.toString(),bidRound: this.bidRound.toString(),bidTsMs: this.bidTsMs.toString(),bidRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.bidRounds),accumulatedProfit: this.accumulatedProfit.toString(),
903
+
904
+ } }
905
+
906
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
907
+
908
+ static fromJSONField( field: any ): StrategyV2 { return StrategyV2.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), receipts: decodeFromJSONField(reified.vector(TypusBidReceipt.reified()), field.receipts), active: decodeFromJSONField("bool", field.active), u64Padding: decodeFromJSONField(reified.vector("u64"), field.u64Padding), bidTimes: decodeFromJSONField("u64", field.bidTimes), bidRound: decodeFromJSONField("u64", field.bidRound), bidTsMs: decodeFromJSONField("u64", field.bidTsMs), bidRounds: decodeFromJSONField(reified.vector("u64"), field.bidRounds), accumulatedProfit: decodeFromJSONField("u64", field.accumulatedProfit) } ) }
909
+
910
+ static fromJSON( json: Record<string, any> ): StrategyV2 { if (json.$typeName !== StrategyV2.$typeName) { throw new Error("not a WithTwoGenerics json object") };
911
+
912
+ return StrategyV2.fromJSONField( json, ) }
913
+
914
+ static fromSuiParsedData( content: SuiParsedData ): StrategyV2 { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isStrategyV2(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a StrategyV2 object`); } return StrategyV2.fromFieldsWithTypes( content ); }
915
+
916
+ static async fetch( client: SuiClient, id: string ): Promise<StrategyV2> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching StrategyV2 object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isStrategyV2(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a StrategyV2 object`); }
917
+ return StrategyV2.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
918
+
919
+ }
920
+
921
+ /* ============================== UpdateStrategyEvent =============================== */
922
+
923
+ export function isUpdateStrategyEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::UpdateStrategyEvent"; }
924
+
925
+ export interface UpdateStrategyEventFields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; strategyIndex: ToField<"u64">; user: ToField<"address">; pricePercentage: ToField<"u64">; size: ToField<"u64">; maxTimes: ToField<"u64">; targetRounds: ToField<Vector<"u64">>; depositAmount: ToField<"u64"> }
926
+
927
+ export type UpdateStrategyEventReified = Reified< UpdateStrategyEvent, UpdateStrategyEventFields >;
928
+
929
+ export class UpdateStrategyEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::UpdateStrategyEvent"; static readonly $numTypeParams = 0;
930
+
931
+ readonly $typeName = UpdateStrategyEvent.$typeName;
932
+
933
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::UpdateStrategyEvent";
934
+
935
+ readonly $typeArgs: [];
936
+
937
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly strategyIndex: ToField<"u64">; readonly user: ToField<"address">; readonly pricePercentage: ToField<"u64">; readonly size: ToField<"u64">; readonly maxTimes: ToField<"u64">; readonly targetRounds: ToField<Vector<"u64">>; readonly depositAmount: ToField<"u64">
938
+
939
+ private constructor(typeArgs: [], fields: UpdateStrategyEventFields, ) { this.$fullTypeName = composeSuiType( UpdateStrategyEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::UpdateStrategyEvent"; this.$typeArgs = typeArgs;
940
+
941
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.strategyIndex = fields.strategyIndex;; this.user = fields.user;; this.pricePercentage = fields.pricePercentage;; this.size = fields.size;; this.maxTimes = fields.maxTimes;; this.targetRounds = fields.targetRounds;; this.depositAmount = fields.depositAmount; }
942
+
943
+ static reified( ): UpdateStrategyEventReified { return { typeName: UpdateStrategyEvent.$typeName, fullTypeName: composeSuiType( UpdateStrategyEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::UpdateStrategyEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => UpdateStrategyEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => UpdateStrategyEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => UpdateStrategyEvent.fromBcs( data, ), bcs: UpdateStrategyEvent.bcs, fromJSONField: (field: any) => UpdateStrategyEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => UpdateStrategyEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => UpdateStrategyEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => UpdateStrategyEvent.fetch( client, id, ), new: ( fields: UpdateStrategyEventFields, ) => { return new UpdateStrategyEvent( [], fields ) }, kind: "StructClassReified", } }
944
+
945
+ static get r() { return UpdateStrategyEvent.reified() }
946
+
947
+ static phantom( ): PhantomReified<ToTypeStr<UpdateStrategyEvent>> { return phantom(UpdateStrategyEvent.reified( )); } static get p() { return UpdateStrategyEvent.phantom() }
948
+
949
+ static get bcs() { return bcs.struct("UpdateStrategyEvent", {
950
+
951
+ vault_index: bcs.u64(), signal_index: bcs.u64(), strategy_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), price_percentage: bcs.u64(), size: bcs.u64(), max_times: bcs.u64(), target_rounds: bcs.vector(bcs.u64()), deposit_amount: bcs.u64()
952
+
953
+ }) };
954
+
955
+ static fromFields( fields: Record<string, any> ): UpdateStrategyEvent { return UpdateStrategyEvent.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), strategyIndex: decodeFromFields("u64", fields.strategy_index), user: decodeFromFields("address", fields.user), pricePercentage: decodeFromFields("u64", fields.price_percentage), size: decodeFromFields("u64", fields.size), maxTimes: decodeFromFields("u64", fields.max_times), targetRounds: decodeFromFields(reified.vector("u64"), fields.target_rounds), depositAmount: decodeFromFields("u64", fields.deposit_amount) } ) }
956
+
957
+ static fromFieldsWithTypes( item: FieldsWithTypes ): UpdateStrategyEvent { if (!isUpdateStrategyEvent(item.type)) { throw new Error("not a UpdateStrategyEvent type");
958
+
959
+ }
960
+
961
+ return UpdateStrategyEvent.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), strategyIndex: decodeFromFieldsWithTypes("u64", item.fields.strategy_index), user: decodeFromFieldsWithTypes("address", item.fields.user), pricePercentage: decodeFromFieldsWithTypes("u64", item.fields.price_percentage), size: decodeFromFieldsWithTypes("u64", item.fields.size), maxTimes: decodeFromFieldsWithTypes("u64", item.fields.max_times), targetRounds: decodeFromFieldsWithTypes(reified.vector("u64"), item.fields.target_rounds), depositAmount: decodeFromFieldsWithTypes("u64", item.fields.deposit_amount) } ) }
962
+
963
+ static fromBcs( data: Uint8Array ): UpdateStrategyEvent { return UpdateStrategyEvent.fromFields( UpdateStrategyEvent.bcs.parse(data) ) }
964
+
965
+ toJSONField() { return {
966
+
967
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),strategyIndex: this.strategyIndex.toString(),user: this.user,pricePercentage: this.pricePercentage.toString(),size: this.size.toString(),maxTimes: this.maxTimes.toString(),targetRounds: fieldToJSON<Vector<"u64">>(`vector<u64>`, this.targetRounds),depositAmount: this.depositAmount.toString(),
968
+
969
+ } }
970
+
971
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
972
+
973
+ static fromJSONField( field: any ): UpdateStrategyEvent { return UpdateStrategyEvent.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), strategyIndex: decodeFromJSONField("u64", field.strategyIndex), user: decodeFromJSONField("address", field.user), pricePercentage: decodeFromJSONField("u64", field.pricePercentage), size: decodeFromJSONField("u64", field.size), maxTimes: decodeFromJSONField("u64", field.maxTimes), targetRounds: decodeFromJSONField(reified.vector("u64"), field.targetRounds), depositAmount: decodeFromJSONField("u64", field.depositAmount) } ) }
974
+
975
+ static fromJSON( json: Record<string, any> ): UpdateStrategyEvent { if (json.$typeName !== UpdateStrategyEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
976
+
977
+ return UpdateStrategyEvent.fromJSONField( json, ) }
978
+
979
+ static fromSuiParsedData( content: SuiParsedData ): UpdateStrategyEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isUpdateStrategyEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a UpdateStrategyEvent object`); } return UpdateStrategyEvent.fromFieldsWithTypes( content ); }
980
+
981
+ static async fetch( client: SuiClient, id: string ): Promise<UpdateStrategyEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching UpdateStrategyEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isUpdateStrategyEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a UpdateStrategyEvent object`); }
982
+ return UpdateStrategyEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
983
+
984
+ }
985
+
986
+ /* ============================== WithdrawProfitEvent =============================== */
987
+
988
+ export function isWithdrawProfitEvent(type: string): boolean { type = compressSuiType(type); return type === "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::WithdrawProfitEvent"; }
989
+
990
+ export interface WithdrawProfitEventFields { vaultIndex: ToField<"u64">; signalIndex: ToField<"u64">; strategyIndex: ToField<"u64">; user: ToField<"address">; profit: ToField<"u64"> }
991
+
992
+ export type WithdrawProfitEventReified = Reified< WithdrawProfitEvent, WithdrawProfitEventFields >;
993
+
994
+ export class WithdrawProfitEvent implements StructClass { static readonly $typeName = "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::WithdrawProfitEvent"; static readonly $numTypeParams = 0;
995
+
996
+ readonly $typeName = WithdrawProfitEvent.$typeName;
997
+
998
+ readonly $fullTypeName: "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::WithdrawProfitEvent";
999
+
1000
+ readonly $typeArgs: [];
1001
+
1002
+ readonly vaultIndex: ToField<"u64">; readonly signalIndex: ToField<"u64">; readonly strategyIndex: ToField<"u64">; readonly user: ToField<"address">; readonly profit: ToField<"u64">
1003
+
1004
+ private constructor(typeArgs: [], fields: WithdrawProfitEventFields, ) { this.$fullTypeName = composeSuiType( WithdrawProfitEvent.$typeName, ...typeArgs ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::WithdrawProfitEvent"; this.$typeArgs = typeArgs;
1005
+
1006
+ this.vaultIndex = fields.vaultIndex;; this.signalIndex = fields.signalIndex;; this.strategyIndex = fields.strategyIndex;; this.user = fields.user;; this.profit = fields.profit; }
1007
+
1008
+ static reified( ): WithdrawProfitEventReified { return { typeName: WithdrawProfitEvent.$typeName, fullTypeName: composeSuiType( WithdrawProfitEvent.$typeName, ...[] ) as "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f::auto_bid::WithdrawProfitEvent", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => WithdrawProfitEvent.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => WithdrawProfitEvent.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => WithdrawProfitEvent.fromBcs( data, ), bcs: WithdrawProfitEvent.bcs, fromJSONField: (field: any) => WithdrawProfitEvent.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => WithdrawProfitEvent.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => WithdrawProfitEvent.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => WithdrawProfitEvent.fetch( client, id, ), new: ( fields: WithdrawProfitEventFields, ) => { return new WithdrawProfitEvent( [], fields ) }, kind: "StructClassReified", } }
1009
+
1010
+ static get r() { return WithdrawProfitEvent.reified() }
1011
+
1012
+ static phantom( ): PhantomReified<ToTypeStr<WithdrawProfitEvent>> { return phantom(WithdrawProfitEvent.reified( )); } static get p() { return WithdrawProfitEvent.phantom() }
1013
+
1014
+ static get bcs() { return bcs.struct("WithdrawProfitEvent", {
1015
+
1016
+ vault_index: bcs.u64(), signal_index: bcs.u64(), strategy_index: bcs.u64(), user: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), }), profit: bcs.u64()
1017
+
1018
+ }) };
1019
+
1020
+ static fromFields( fields: Record<string, any> ): WithdrawProfitEvent { return WithdrawProfitEvent.reified( ).new( { vaultIndex: decodeFromFields("u64", fields.vault_index), signalIndex: decodeFromFields("u64", fields.signal_index), strategyIndex: decodeFromFields("u64", fields.strategy_index), user: decodeFromFields("address", fields.user), profit: decodeFromFields("u64", fields.profit) } ) }
1021
+
1022
+ static fromFieldsWithTypes( item: FieldsWithTypes ): WithdrawProfitEvent { if (!isWithdrawProfitEvent(item.type)) { throw new Error("not a WithdrawProfitEvent type");
1023
+
1024
+ }
1025
+
1026
+ return WithdrawProfitEvent.reified( ).new( { vaultIndex: decodeFromFieldsWithTypes("u64", item.fields.vault_index), signalIndex: decodeFromFieldsWithTypes("u64", item.fields.signal_index), strategyIndex: decodeFromFieldsWithTypes("u64", item.fields.strategy_index), user: decodeFromFieldsWithTypes("address", item.fields.user), profit: decodeFromFieldsWithTypes("u64", item.fields.profit) } ) }
1027
+
1028
+ static fromBcs( data: Uint8Array ): WithdrawProfitEvent { return WithdrawProfitEvent.fromFields( WithdrawProfitEvent.bcs.parse(data) ) }
1029
+
1030
+ toJSONField() { return {
1031
+
1032
+ vaultIndex: this.vaultIndex.toString(),signalIndex: this.signalIndex.toString(),strategyIndex: this.strategyIndex.toString(),user: this.user,profit: this.profit.toString(),
1033
+
1034
+ } }
1035
+
1036
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
1037
+
1038
+ static fromJSONField( field: any ): WithdrawProfitEvent { return WithdrawProfitEvent.reified( ).new( { vaultIndex: decodeFromJSONField("u64", field.vaultIndex), signalIndex: decodeFromJSONField("u64", field.signalIndex), strategyIndex: decodeFromJSONField("u64", field.strategyIndex), user: decodeFromJSONField("address", field.user), profit: decodeFromJSONField("u64", field.profit) } ) }
1039
+
1040
+ static fromJSON( json: Record<string, any> ): WithdrawProfitEvent { if (json.$typeName !== WithdrawProfitEvent.$typeName) { throw new Error("not a WithTwoGenerics json object") };
1041
+
1042
+ return WithdrawProfitEvent.fromJSONField( json, ) }
1043
+
1044
+ static fromSuiParsedData( content: SuiParsedData ): WithdrawProfitEvent { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isWithdrawProfitEvent(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a WithdrawProfitEvent object`); } return WithdrawProfitEvent.fromFieldsWithTypes( content ); }
1045
+
1046
+ static async fetch( client: SuiClient, id: string ): Promise<WithdrawProfitEvent> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching WithdrawProfitEvent object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isWithdrawProfitEvent(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a WithdrawProfitEvent object`); }
1047
+ return WithdrawProfitEvent.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
1048
+
1049
+ }