@typus/typus-sdk 1.5.4 → 1.5.5-a

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