@typus/typus-sdk 1.5.3 → 1.5.5-a

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