@typus/typus-sdk 1.5.4 → 1.5.5-b

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