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