@typus/typus-sdk 1.4.84 → 1.5.1

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 (572) hide show
  1. package/dist/src/auto-bid/token-user-entry.d.ts +9 -9
  2. package/dist/src/auto-bid/token-user-entry.js +24 -24
  3. package/dist/src/auto-bid/user-entry.d.ts +9 -9
  4. package/dist/src/auto-bid/user-entry.js +46 -46
  5. package/dist/src/auto-bid/view-function.js +14 -14
  6. package/dist/src/constants/constant.d.ts +1 -1
  7. package/dist/src/constants/constant.js +1 -1
  8. package/dist/src/constants/token.d.ts +4 -1
  9. package/dist/src/constants/token.js +4 -1
  10. package/dist/src/dice/fetch.js +1 -1
  11. package/dist/src/dice/user-entry.d.ts +11 -11
  12. package/dist/src/dice/user-entry.js +34 -34
  13. package/dist/src/typus/airdrop/authority-entry.d.ts +5 -5
  14. package/dist/src/typus/airdrop/authority-entry.js +10 -10
  15. package/dist/src/typus/airdrop/user-entry.d.ts +3 -3
  16. package/dist/src/typus/airdrop/user-entry.js +2 -2
  17. package/dist/src/typus/airdrop/view-function.js +10 -10
  18. package/dist/src/typus/leaderboard/authority-entry.d.ts +5 -5
  19. package/dist/src/typus/leaderboard/authority-entry.js +9 -4
  20. package/dist/src/typus/leaderboard/view-function.js +13 -13
  21. package/dist/src/typus/tails-staking/authority-entry.d.ts +29 -27
  22. package/dist/src/typus/tails-staking/authority-entry.js +22 -20
  23. package/dist/src/typus/tails-staking/user-entry.d.ts +23 -23
  24. package/dist/src/typus/tails-staking/user-entry.js +30 -30
  25. package/dist/src/typus/tails-staking/view-function.js +14 -14
  26. package/dist/src/typus/user/view-function.js +9 -9
  27. package/dist/src/typus-dov-single-v2/authority-entry.d.ts +4 -4
  28. package/dist/src/typus-dov-single-v2/authority-entry.js +21 -21
  29. package/dist/src/typus-dov-single-v2/function/bidding.d.ts +1 -83
  30. package/dist/src/typus-dov-single-v2/function/bidding.js +9 -182
  31. package/dist/src/typus-dov-single-v2/function/token.js +3 -1
  32. package/dist/src/typus-dov-single-v2/history/user-history.d.ts +1 -1
  33. package/dist/src/typus-dov-single-v2/history/vault-history.d.ts +1 -2
  34. package/dist/src/typus-dov-single-v2/history/vault-history.js +1 -99
  35. package/dist/src/typus-dov-single-v2/token-user-entry.d.ts +13 -13
  36. package/dist/src/typus-dov-single-v2/token-user-entry.js +29 -29
  37. package/dist/src/typus-dov-single-v2/user-entry.d.ts +20 -20
  38. package/dist/src/typus-dov-single-v2/user-entry.js +61 -59
  39. package/dist/src/typus-dov-single-v2/view-function.js +55 -55
  40. package/dist/src/typus-launch/airdrop/authority-entry.d.ts +3 -3
  41. package/dist/src/typus-launch/airdrop/authority-entry.js +7 -7
  42. package/dist/src/typus-launch/airdrop/user-entry.d.ts +2 -2
  43. package/dist/src/typus-launch/airdrop/user-entry.js +2 -2
  44. package/dist/src/typus-launch/airdrop/view-function.d.ts +1 -0
  45. package/dist/src/typus-launch/airdrop/view-function.js +12 -10
  46. package/dist/src/typus-launch/auction/entry.d.ts +5 -5
  47. package/dist/src/typus-launch/auction/entry.js +4 -4
  48. package/dist/src/typus-launch/auction/view-function.js +17 -17
  49. package/dist/src/typus-launch/funding-vault/authority-entry.d.ts +11 -11
  50. package/dist/src/typus-launch/funding-vault/authority-entry.js +32 -24
  51. package/dist/src/typus-launch/funding-vault/user-entry.d.ts +3 -3
  52. package/dist/src/typus-launch/funding-vault/user-entry.js +6 -6
  53. package/dist/src/typus-launch/funding-vault/view-function.js +29 -29
  54. package/dist/src/typus-launch/improvement-proposal/authority-entry.d.ts +11 -9
  55. package/dist/src/typus-launch/improvement-proposal/authority-entry.js +23 -21
  56. package/dist/src/typus-launch/improvement-proposal/user-entry.d.ts +3 -3
  57. package/dist/src/typus-launch/improvement-proposal/user-entry.js +2 -2
  58. package/dist/src/typus-launch/improvement-proposal/view-function.d.ts +6 -1
  59. package/dist/src/typus-launch/improvement-proposal/view-function.js +51 -39
  60. package/dist/src/typus-launch/option-airdrop/authority-entry.d.ts +5 -5
  61. package/dist/src/typus-launch/option-airdrop/authority-entry.js +6 -6
  62. package/dist/src/typus-launch/ve-typus/authority-entry.d.ts +5 -5
  63. package/dist/src/typus-launch/ve-typus/authority-entry.js +10 -10
  64. package/dist/src/typus-launch/ve-typus/user-entry.d.ts +4 -4
  65. package/dist/src/typus-launch/ve-typus/user-entry.js +9 -6
  66. package/dist/src/typus-launch/ve-typus/view-function.js +20 -19
  67. package/dist/src/typus-nft/fetch.d.ts +2 -2
  68. package/dist/src/typus-nft/user-entry.d.ts +11 -11
  69. package/dist/src/typus-nft/user-entry.js +3 -3
  70. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/ascii/structs.d.ts +16 -6
  71. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/ascii/structs.js +161 -45
  72. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/bit-vector/structs.d.ts +10 -4
  73. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/bit-vector/structs.js +90 -25
  74. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/fixed-point32/structs.d.ts +8 -3
  75. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/fixed-point32/structs.js +84 -23
  76. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/index.d.ts +1 -0
  77. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/index.js +2 -1
  78. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/init.js +4 -0
  79. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/option/structs.d.ts +10 -4
  80. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/option/structs.js +94 -25
  81. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/string/structs.d.ts +10 -4
  82. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/string/structs.js +84 -23
  83. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/type-name/structs.d.ts +8 -3
  84. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/type-name/structs.js +84 -23
  85. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.d.ts +46 -0
  86. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.js +228 -0
  87. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.d.ts +46 -0
  88. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.js +228 -0
  89. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +5 -0
  90. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +8 -0
  91. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.js +1 -0
  92. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.d.ts +86 -13
  93. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +793 -0
  94. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.d.ts +14 -5
  95. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.js +52 -10
  96. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.d.ts +8 -3
  97. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.js +105 -28
  98. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.d.ts +8 -3
  99. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.js +108 -28
  100. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/authenticator-state/structs.d.ts +34 -12
  101. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.js +894 -0
  102. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bag/structs.d.ts +8 -3
  103. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bag/structs.js +90 -25
  104. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/balance/structs.d.ts +14 -5
  105. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/balance/structs.js +183 -45
  106. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bcs/structs.d.ts +10 -4
  107. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bcs/structs.js +84 -23
  108. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/bls12381/structs.d.ts +68 -9
  109. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.js +820 -0
  110. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/borrow/structs.d.ts +13 -4
  111. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.js +410 -0
  112. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/clock/structs.d.ts +8 -3
  113. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/clock/structs.js +90 -25
  114. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/coin/structs.d.ts +94 -13
  115. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.js +1259 -0
  116. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.d.ts +179 -0
  117. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.js +577 -0
  118. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.d.ts +430 -0
  119. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.js +1177 -0
  120. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/display/structs.d.ts +20 -7
  121. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.js +584 -0
  122. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-field/structs.d.ts +12 -7
  123. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-field/structs.js +110 -28
  124. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-object-field/structs.d.ts +10 -5
  125. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/dynamic-object-field/structs.js +94 -24
  126. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/groth16/structs.d.ts +28 -10
  127. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.js +710 -0
  128. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/group-ops/structs.d.ts +10 -4
  129. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/group-ops/structs.js +93 -23
  130. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/index.d.ts +1 -0
  131. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/index.js +2 -1
  132. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/init.js +16 -5
  133. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk/structs.d.ts +62 -21
  134. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.js +1724 -0
  135. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk-extension/structs.d.ts +14 -5
  136. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/kiosk-extension/structs.js +185 -48
  137. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/linked-table/structs.d.ts +15 -6
  138. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.js +438 -0
  139. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object/structs.d.ts +14 -5
  140. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object/structs.js +166 -45
  141. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-bag/structs.d.ts +8 -3
  142. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-bag/structs.js +90 -25
  143. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-table/structs.d.ts +8 -3
  144. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/object-table/structs.js +101 -25
  145. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/package/structs.d.ts +28 -10
  146. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.js +752 -0
  147. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/priority-queue/structs.d.ts +19 -9
  148. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/priority-queue/structs.js +192 -50
  149. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/random/structs.d.ts +22 -8
  150. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.js +586 -0
  151. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/sui/structs.d.ts +8 -3
  152. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/sui/structs.js +84 -23
  153. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table/structs.d.ts +8 -3
  154. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table/structs.js +101 -25
  155. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table-vec/structs.d.ts +8 -3
  156. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/table-vec/structs.js +93 -23
  157. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/token/structs.d.ts +38 -13
  158. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.js +1107 -0
  159. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer/structs.d.ts +8 -3
  160. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer/structs.js +99 -25
  161. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/transfer-policy/structs.d.ts +38 -13
  162. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.js +1099 -0
  163. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/tx-context/structs.d.ts +10 -4
  164. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/tx-context/structs.js +108 -28
  165. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/url/structs.d.ts +8 -3
  166. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/url/structs.js +84 -23
  167. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-map/structs.d.ts +23 -13
  168. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.js +436 -0
  169. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-set/structs.d.ts +10 -4
  170. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/vec-set/structs.js +94 -24
  171. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/versioned/structs.d.ts +14 -5
  172. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/versioned/structs.js +177 -49
  173. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-id/structs.d.ts +8 -3
  174. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-id/structs.js +113 -29
  175. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-issuer/structs.d.ts +8 -3
  176. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/zklogin-verified-issuer/structs.js +98 -26
  177. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +1 -0
  178. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +2 -1
  179. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +8 -3
  180. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +84 -23
  181. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +2 -0
  182. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +3 -1
  183. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +8 -3
  184. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +84 -23
  185. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +14 -5
  186. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +186 -50
  187. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.d.ts +40 -14
  188. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +1092 -0
  189. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.d.ts +15 -5
  190. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.js +52 -7
  191. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.d.ts +20 -7
  192. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +643 -0
  193. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.d.ts +34 -12
  194. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +898 -0
  195. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +8 -0
  196. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +11 -0
  197. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.js +20 -1
  198. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.d.ts +227 -0
  199. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.js +622 -0
  200. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.d.ts +124 -16
  201. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +1476 -0
  202. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.d.ts +13 -4
  203. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +438 -0
  204. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.d.ts +13 -4
  205. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +430 -0
  206. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.d.ts +1071 -0
  207. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.js +2275 -0
  208. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.d.ts +68 -50
  209. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +732 -0
  210. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.d.ts +34 -12
  211. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +900 -0
  212. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.d.ts +46 -16
  213. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +1335 -0
  214. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +9 -0
  215. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +12 -0
  216. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.js +4 -3
  217. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.d.ts +50 -41
  218. package/dist/src/{_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585 → typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828}/royalty-rule/structs.js +227 -103
  219. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.d.ts +76 -55
  220. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +886 -0
  221. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.d.ts +8 -3
  222. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.js +93 -23
  223. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.d.ts +247 -136
  224. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +2407 -0
  225. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.d.ts +100 -34
  226. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +3052 -0
  227. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +10 -0
  228. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +13 -0
  229. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.js +23 -17
  230. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.d.ts +213 -147
  231. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +2846 -0
  232. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.d.ts +58 -20
  233. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +1669 -0
  234. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.d.ts +46 -16
  235. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +1249 -0
  236. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.d.ts +244 -82
  237. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +1869 -0
  238. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.d.ts +8 -3
  239. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.js +115 -30
  240. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.d.ts +534 -74
  241. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +7680 -0
  242. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +1 -0
  243. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +2 -1
  244. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +8 -3
  245. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +87 -23
  246. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +22 -8
  247. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +581 -0
  248. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +8 -3
  249. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +109 -27
  250. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +50 -17
  251. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +1735 -0
  252. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +8 -3
  253. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +80 -23
  254. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +3 -0
  255. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +6 -0
  256. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +15 -6
  257. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +444 -0
  258. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +172 -58
  259. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +5014 -0
  260. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +40 -14
  261. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +1229 -0
  262. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +1 -0
  263. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +2 -1
  264. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +10 -4
  265. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +105 -28
  266. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +8 -3
  267. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +95 -26
  268. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +10 -4
  269. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +322 -0
  270. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +8 -3
  271. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +84 -23
  272. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/batch-price-attestation/structs.d.ts +22 -12
  273. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/batch-price-attestation/structs.js +202 -54
  274. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/contract-upgrade/structs.d.ts +21 -12
  275. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/contract-upgrade/structs.js +172 -48
  276. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/data-source/structs.d.ts +12 -7
  277. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/data-source/structs.js +91 -26
  278. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/event/structs.d.ts +20 -11
  279. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/event/structs.js +171 -47
  280. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance/structs.d.ts +14 -8
  281. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance/structs.js +96 -27
  282. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-action/structs.d.ts +11 -6
  283. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-action/structs.js +84 -23
  284. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-instruction/structs.d.ts +13 -7
  285. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/governance-instruction/structs.js +100 -27
  286. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/hot-potato-vector/structs.d.ts +12 -6
  287. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/hot-potato-vector/structs.js +94 -24
  288. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/i64/structs.d.ts +11 -6
  289. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/i64/structs.js +90 -25
  290. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.d.ts +3 -0
  291. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.js +6 -0
  292. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/init.js +1 -0
  293. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/migrate/structs.d.ts +11 -6
  294. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/migrate/structs.js +84 -23
  295. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price/structs.d.ts +11 -6
  296. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price/structs.js +100 -27
  297. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-feed/structs.d.ts +11 -6
  298. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-feed/structs.js +95 -26
  299. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-identifier/structs.d.ts +13 -7
  300. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-identifier/structs.js +84 -23
  301. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-info/structs.d.ts +20 -11
  302. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-info/structs.js +182 -50
  303. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-status/structs.d.ts +11 -6
  304. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/price-status/structs.js +84 -23
  305. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set/structs.d.ts +20 -10
  306. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set/structs.js +181 -48
  307. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-data-sources/structs.d.ts +13 -7
  308. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-data-sources/structs.js +85 -24
  309. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-fee-recipient/structs.d.ts +11 -6
  310. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-fee-recipient/structs.js +87 -23
  311. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-governance-data-source/structs.d.ts +12 -7
  312. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-governance-data-source/structs.js +96 -27
  313. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-stale-price-threshold/structs.d.ts +11 -6
  314. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-stale-price-threshold/structs.js +84 -23
  315. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-update-fee/structs.d.ts +11 -6
  316. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/set-update-fee/structs.js +90 -25
  317. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/setup/structs.d.ts +11 -6
  318. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/setup/structs.js +84 -23
  319. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/state/structs.d.ts +30 -17
  320. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.js +573 -0
  321. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.d.ts +130 -0
  322. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.js +524 -0
  323. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +1 -0
  324. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +2 -1
  325. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +48 -39
  326. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +217 -97
  327. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +50 -41
  328. package/dist/src/{_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828 → typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585}/royalty-rule/structs.js +227 -103
  329. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +8 -3
  330. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +93 -23
  331. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes20/structs.d.ts +13 -7
  332. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes20/structs.js +84 -23
  333. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes32/structs.d.ts +13 -7
  334. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/bytes32/structs.js +84 -23
  335. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/consumed-vaas/structs.d.ts +11 -6
  336. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/consumed-vaas/structs.js +84 -23
  337. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/cursor/structs.d.ts +12 -6
  338. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/cursor/structs.js +94 -24
  339. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/emitter/structs.d.ts +29 -16
  340. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.js +531 -0
  341. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/external-address/structs.d.ts +11 -6
  342. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/external-address/structs.js +84 -23
  343. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/fee-collector/structs.d.ts +11 -6
  344. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/fee-collector/structs.js +90 -25
  345. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/governance-message/structs.d.ts +20 -10
  346. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.js +460 -0
  347. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian/structs.d.ts +11 -6
  348. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian/structs.js +84 -23
  349. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-set/structs.d.ts +13 -7
  350. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-set/structs.js +95 -26
  351. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-signature/structs.d.ts +11 -6
  352. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/guardian-signature/structs.js +100 -27
  353. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.d.ts +3 -0
  354. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.js +6 -0
  355. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/migrate/structs.d.ts +11 -6
  356. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/migrate/structs.js +84 -23
  357. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/package-utils/structs.d.ts +38 -21
  358. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.js +680 -0
  359. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/publish-message/structs.d.ts +22 -12
  360. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.js +449 -0
  361. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set/structs.d.ts +52 -43
  362. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set/structs.js +232 -103
  363. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set-fee/structs.d.ts +20 -11
  364. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/set-fee/structs.js +165 -45
  365. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/setup/structs.d.ts +11 -6
  366. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/setup/structs.js +84 -23
  367. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/state/structs.d.ts +20 -11
  368. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.js +455 -0
  369. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/transfer-fee/structs.d.ts +20 -11
  370. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/transfer-fee/structs.js +174 -47
  371. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/update-guardian-set/structs.d.ts +31 -17
  372. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/update-guardian-set/structs.js +252 -69
  373. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/upgrade-contract/structs.d.ts +62 -49
  374. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.js +532 -0
  375. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/vaa/structs.d.ts +13 -7
  376. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/vaa/structs.js +125 -32
  377. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/version-control/structs.d.ts +20 -11
  378. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/version-control/structs.js +165 -45
  379. package/dist/src/typus-perp/_framework/init-loader.d.ts +2 -0
  380. package/dist/src/typus-perp/_framework/init-loader.js +63 -0
  381. package/dist/src/{_framework → typus-perp/_framework}/loader.d.ts +3 -3
  382. package/dist/src/{_framework → typus-perp/_framework}/loader.js +14 -5
  383. package/dist/src/{_framework → typus-perp/_framework}/reified.d.ts +28 -20
  384. package/dist/src/{_framework → typus-perp/_framework}/reified.js +11 -37
  385. package/dist/src/typus-perp/_framework/util.d.ts +35 -0
  386. package/dist/src/typus-perp/_framework/util.js +396 -0
  387. package/dist/src/typus-perp/_framework/vector.d.ts +35 -0
  388. package/dist/src/typus-perp/_framework/vector.js +112 -0
  389. package/dist/src/typus-perp/fetch.d.ts +5 -5
  390. package/dist/src/typus-perp/fetch.js +16 -16
  391. package/dist/src/typus-perp/index.d.ts +2 -4
  392. package/dist/src/typus-perp/index.js +5 -64
  393. package/dist/src/typus-perp/readVec.js +9 -9
  394. package/dist/src/typus-perp/typus_perp/admin/functions.d.ts +50 -0
  395. package/dist/src/typus-perp/typus_perp/admin/functions.js +116 -0
  396. package/dist/src/typus-perp/{admin → typus_perp/admin}/structs.d.ts +49 -27
  397. package/dist/src/typus-perp/{admin → typus_perp/admin}/structs.js +117 -21
  398. package/dist/src/typus-perp/typus_perp/index.d.ts +3 -0
  399. package/dist/src/typus-perp/typus_perp/index.js +6 -0
  400. package/dist/src/typus-perp/{init.js → typus_perp/init.js} +13 -26
  401. package/dist/src/typus-perp/typus_perp/lp-pool/functions.d.ts +342 -0
  402. package/dist/src/typus-perp/typus_perp/lp-pool/functions.js +517 -0
  403. package/dist/src/typus-perp/{lp-pool → typus_perp/lp-pool}/structs.d.ts +698 -148
  404. package/dist/src/typus-perp/{lp-pool → typus_perp/lp-pool}/structs.js +1457 -172
  405. package/dist/src/typus-perp/typus_perp/math/functions.d.ts +18 -0
  406. package/dist/src/typus-perp/typus_perp/math/functions.js +49 -0
  407. package/dist/src/typus-perp/typus_perp/oracle/functions.d.ts +13 -0
  408. package/dist/src/typus-perp/typus_perp/oracle/functions.js +25 -0
  409. package/dist/src/typus-perp/{oracle → typus_perp/oracle}/structs.d.ts +20 -11
  410. package/dist/src/typus-perp/{oracle → typus_perp/oracle}/structs.js +52 -10
  411. package/dist/src/typus-perp/typus_perp/position/functions.d.ts +343 -0
  412. package/dist/src/typus-perp/typus_perp/position/functions.js +659 -0
  413. package/dist/src/typus-perp/{position → typus_perp/position}/structs.d.ts +73 -43
  414. package/dist/src/typus-perp/{position → typus_perp/position}/structs.js +177 -38
  415. package/dist/src/typus-perp/typus_perp/symbol/functions.d.ts +9 -0
  416. package/dist/src/typus-perp/typus_perp/symbol/functions.js +33 -0
  417. package/dist/src/typus-perp/{symbol → typus_perp/symbol}/structs.d.ts +11 -6
  418. package/dist/src/typus-perp/{symbol → typus_perp/symbol}/structs.js +23 -4
  419. package/dist/src/typus-perp/typus_perp/tlp/functions.d.ts +19 -0
  420. package/dist/src/typus-perp/typus_perp/tlp/functions.js +41 -0
  421. package/dist/src/typus-perp/{tlp → typus_perp/tlp}/structs.d.ts +20 -11
  422. package/dist/src/typus-perp/{tlp → typus_perp/tlp}/structs.js +61 -13
  423. package/dist/src/typus-perp/typus_perp/token-interface/functions.d.ts +11 -0
  424. package/dist/src/typus-perp/{token-interface → typus_perp/token-interface}/functions.js +6 -6
  425. package/dist/src/typus-perp/typus_perp/trading/functions.d.ts +493 -0
  426. package/dist/src/typus-perp/typus_perp/trading/functions.js +711 -0
  427. package/dist/src/typus-perp/{trading → typus_perp/trading}/structs.d.ts +523 -161
  428. package/dist/src/typus-perp/{trading → typus_perp/trading}/structs.js +1042 -107
  429. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.d.ts +9 -0
  430. package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/functions.js +14 -11
  431. package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/structs.d.ts +11 -6
  432. package/dist/src/typus-perp/{treasury-caps → typus_perp/treasury-caps}/structs.js +32 -7
  433. package/dist/src/typus-perp/typus_stake_pool/admin/functions.d.ts +50 -0
  434. package/dist/src/typus-perp/typus_stake_pool/admin/functions.js +116 -0
  435. package/dist/src/typus-perp/typus_stake_pool/admin/structs.d.ts +447 -0
  436. package/dist/src/typus-perp/typus_stake_pool/admin/structs.js +898 -0
  437. package/dist/src/typus-perp/typus_stake_pool/index.d.ts +3 -0
  438. package/dist/src/typus-perp/typus_stake_pool/index.js +6 -0
  439. package/dist/src/typus-perp/typus_stake_pool/init.d.ts +2 -0
  440. package/dist/src/typus-perp/typus_stake_pool/init.js +57 -0
  441. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.d.ts +175 -0
  442. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.js +275 -0
  443. package/dist/src/typus-perp/{stake-pool → typus_stake_pool/stake-pool}/structs.d.ts +293 -185
  444. package/dist/src/typus-perp/{stake-pool → typus_stake_pool/stake-pool}/structs.js +659 -235
  445. package/dist/src/typus-perp/user/order.d.ts +10 -10
  446. package/dist/src/typus-perp/user/order.js +6 -5
  447. package/dist/src/typus-perp/user/orderWithBidReceipt.d.ts +5 -5
  448. package/dist/src/typus-perp/user/orderWithBidReceipt.js +3 -3
  449. package/dist/src/typus-perp/user/tlp.d.ts +12 -12
  450. package/dist/src/typus-perp/user/tlp.js +13 -11
  451. package/dist/src/typus-safu/user-entry.d.ts +9 -9
  452. package/dist/src/typus-safu/user-entry.js +18 -18
  453. package/dist/src/typus-safu/user-history.d.ts +1 -1
  454. package/dist/src/typus-safu/user-history.js +1 -1
  455. package/dist/src/typus-safu/view-function.js +17 -17
  456. package/dist/src/utils/api/price.js +18 -2
  457. package/dist/src/utils/api/sentio/reward-generated.d.ts +1 -1
  458. package/dist/src/utils/mint.d.ts +2 -2
  459. package/dist/src/utils/mint.js +3 -3
  460. package/dist/src/utils/pyth/constant.d.ts +2 -0
  461. package/dist/src/utils/pyth/constant.js +2 -0
  462. package/dist/src/utils/pyth/pythClient.d.ts +3 -3
  463. package/dist/src/utils/typusConfig.d.ts +8 -2
  464. package/package.json +4 -5
  465. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +0 -2
  466. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +0 -5
  467. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +0 -377
  468. package/dist/src/_dependencies/source/0x2/authenticator-state/structs.js +0 -565
  469. package/dist/src/_dependencies/source/0x2/bls12381/structs.js +0 -434
  470. package/dist/src/_dependencies/source/0x2/borrow/structs.js +0 -267
  471. package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -648
  472. package/dist/src/_dependencies/source/0x2/deny-list/structs.d.ts +0 -178
  473. package/dist/src/_dependencies/source/0x2/deny-list/structs.js +0 -290
  474. package/dist/src/_dependencies/source/0x2/display/structs.js +0 -362
  475. package/dist/src/_dependencies/source/0x2/groth16/structs.js +0 -464
  476. package/dist/src/_dependencies/source/0x2/kiosk/structs.js +0 -1033
  477. package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -272
  478. package/dist/src/_dependencies/source/0x2/package/structs.js +0 -478
  479. package/dist/src/_dependencies/source/0x2/random/structs.js +0 -383
  480. package/dist/src/_dependencies/source/0x2/token/structs.js +0 -651
  481. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -665
  482. package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -286
  483. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +0 -669
  484. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +0 -402
  485. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +0 -566
  486. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -2
  487. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -5
  488. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +0 -774
  489. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +0 -272
  490. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +0 -276
  491. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +0 -471
  492. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +0 -563
  493. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +0 -789
  494. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +0 -2
  495. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +0 -5
  496. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +0 -562
  497. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +0 -1331
  498. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +0 -1706
  499. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +0 -2
  500. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +0 -5
  501. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +0 -1643
  502. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +0 -971
  503. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +0 -750
  504. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +0 -933
  505. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +0 -3796
  506. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +0 -382
  507. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +0 -959
  508. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -2
  509. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -5
  510. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +0 -274
  511. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +0 -2830
  512. package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +0 -711
  513. package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +0 -212
  514. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.js +0 -348
  515. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.js +0 -298
  516. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.d.ts +0 -2
  517. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.js +0 -5
  518. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.js +0 -438
  519. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.js +0 -297
  520. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.js +0 -303
  521. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.js +0 -349
  522. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.d.ts +0 -2
  523. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.js +0 -5
  524. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.js +0 -363
  525. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.d.ts +0 -79
  526. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.js +0 -256
  527. package/dist/src/_framework/init-source.d.ts +0 -1
  528. package/dist/src/_framework/init-source.js +0 -64
  529. package/dist/src/_framework/util.d.ts +0 -53
  530. package/dist/src/_framework/util.js +0 -251
  531. package/dist/src/typus-perp/admin/functions.d.ts +0 -51
  532. package/dist/src/typus-perp/admin/functions.js +0 -100
  533. package/dist/src/typus-perp/lp-pool/functions.d.ts +0 -283
  534. package/dist/src/typus-perp/lp-pool/functions.js +0 -418
  535. package/dist/src/typus-perp/math/functions.d.ts +0 -18
  536. package/dist/src/typus-perp/math/functions.js +0 -40
  537. package/dist/src/typus-perp/oracle/functions.d.ts +0 -14
  538. package/dist/src/typus-perp/oracle/functions.js +0 -22
  539. package/dist/src/typus-perp/position/functions.d.ts +0 -339
  540. package/dist/src/typus-perp/position/functions.js +0 -564
  541. package/dist/src/typus-perp/stake-pool/functions.d.ts +0 -169
  542. package/dist/src/typus-perp/stake-pool/functions.js +0 -258
  543. package/dist/src/typus-perp/symbol/functions.d.ts +0 -10
  544. package/dist/src/typus-perp/symbol/functions.js +0 -20
  545. package/dist/src/typus-perp/tlp/functions.d.ts +0 -20
  546. package/dist/src/typus-perp/tlp/functions.js +0 -35
  547. package/dist/src/typus-perp/token-interface/functions.d.ts +0 -12
  548. package/dist/src/typus-perp/trading/functions.d.ts +0 -427
  549. package/dist/src/typus-perp/trading/functions.js +0 -612
  550. package/dist/src/typus-perp/treasury-caps/functions.d.ts +0 -10
  551. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1/init.d.ts +0 -0
  552. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.d.ts +0 -0
  553. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2/init.d.ts +0 -0
  554. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +0 -0
  555. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +0 -0
  556. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +0 -0
  557. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +0 -0
  558. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.d.ts +0 -0
  559. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.d.ts +0 -0
  560. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.d.ts +0 -0
  561. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +0 -0
  562. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +0 -0
  563. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +0 -0
  564. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +0 -0
  565. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +0 -0
  566. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +0 -0
  567. package/dist/src/{_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585 → typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837}/init.d.ts +0 -0
  568. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585}/init.d.ts +0 -0
  569. package/dist/src/{_dependencies → typus-perp/_dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +2 -2
  570. package/dist/src/{_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3 → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/init.d.ts +0 -0
  571. package/dist/src/{_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e → typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94}/init.js +4 -4
  572. /package/dist/src/typus-perp/{init.d.ts → typus_perp/init.d.ts} +0 -0
@@ -0,0 +1,2407 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __generator = (this && this.__generator) || function (thisArg, body) {
46
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
+ function verb(n) { return function (v) { return step([n, v]); }; }
49
+ function step(op) {
50
+ if (f) throw new TypeError("Generator is already executing.");
51
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
52
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
+ if (y = 0, t) op = [op[0] & 2, t.value];
54
+ switch (op[0]) {
55
+ case 0: case 1: t = op; break;
56
+ case 4: _.label++; return { value: op[1], done: false };
57
+ case 5: _.label++; y = op[1]; op = [0]; continue;
58
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
+ default:
60
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
+ if (t[2]) _.ops.pop();
65
+ _.trys.pop(); continue;
66
+ }
67
+ op = body.call(thisArg, _);
68
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
+ }
71
+ };
72
+ var __read = (this && this.__read) || function (o, n) {
73
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
74
+ if (!m) return o;
75
+ var i = m.call(o), r, ar = [], e;
76
+ try {
77
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
78
+ }
79
+ catch (error) { e = { error: error }; }
80
+ finally {
81
+ try {
82
+ if (r && !r.done && (m = i["return"])) m.call(i);
83
+ }
84
+ finally { if (e) throw e.error; }
85
+ }
86
+ return ar;
87
+ };
88
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
89
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
90
+ if (ar || !(i in from)) {
91
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
92
+ ar[i] = from[i];
93
+ }
94
+ }
95
+ return to.concat(ar || Array.prototype.slice.call(from));
96
+ };
97
+ Object.defineProperty(exports, "__esModule", { value: true });
98
+ exports.Whitelist = exports.Tails = exports.TYPUS_NFT = exports.RoyaltyUpdateEvent = exports.Royalty = exports.Pool = exports.NewManagerCapEvent = exports.MintEvent = exports.LevelUpEvent = exports.FirstDepositEvent = exports.FirstBidEvent = exports.ExpUpEvent = exports.ExpDownEvent = exports.ManagerCap = void 0;
99
+ exports.isManagerCap = isManagerCap;
100
+ exports.isExpDownEvent = isExpDownEvent;
101
+ exports.isExpUpEvent = isExpUpEvent;
102
+ exports.isFirstBidEvent = isFirstBidEvent;
103
+ exports.isFirstDepositEvent = isFirstDepositEvent;
104
+ exports.isLevelUpEvent = isLevelUpEvent;
105
+ exports.isMintEvent = isMintEvent;
106
+ exports.isNewManagerCapEvent = isNewManagerCapEvent;
107
+ exports.isPool = isPool;
108
+ exports.isRoyalty = isRoyalty;
109
+ exports.isRoyaltyUpdateEvent = isRoyaltyUpdateEvent;
110
+ exports.isTYPUS_NFT = isTYPUS_NFT;
111
+ exports.isTails = isTails;
112
+ exports.isWhitelist = isWhitelist;
113
+ var reified = __importStar(require("../../../../_framework/reified"));
114
+ var reified_1 = require("../../../../_framework/reified");
115
+ var util_1 = require("../../../../_framework/util");
116
+ var structs_1 = require("../../0x1/string/structs");
117
+ var structs_2 = require("../../0x2/object/structs");
118
+ var structs_3 = require("../../0x2/transfer-policy/structs");
119
+ var structs_4 = require("../../0x2/url/structs");
120
+ var structs_5 = require("../../0x2/vec-map/structs");
121
+ var index_1 = require("../index");
122
+ var structs_6 = require("../table-vec/structs");
123
+ var bcs_1 = require("@mysten/sui/bcs");
124
+ var utils_1 = require("@mysten/sui/utils");
125
+ /* ============================== ManagerCap =============================== */
126
+ function isManagerCap(type) {
127
+ type = (0, util_1.compressSuiType)(type);
128
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::ManagerCap");
129
+ }
130
+ var ManagerCap = /** @class */ (function () {
131
+ function ManagerCap(typeArgs, fields) {
132
+ this.__StructClass = true;
133
+ this.$typeName = ManagerCap.$typeName;
134
+ this.$isPhantom = ManagerCap.$isPhantom;
135
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ManagerCap.$typeName], __read(typeArgs), false));
136
+ this.$typeArgs = typeArgs;
137
+ this.id = fields.id;
138
+ }
139
+ ManagerCap.reified = function () {
140
+ var _this = this;
141
+ return {
142
+ typeName: ManagerCap.$typeName,
143
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ManagerCap.$typeName], [], false)),
144
+ typeArgs: [],
145
+ isPhantom: ManagerCap.$isPhantom,
146
+ reifiedTypeArgs: [],
147
+ fromFields: function (fields) { return ManagerCap.fromFields(fields); },
148
+ fromFieldsWithTypes: function (item) { return ManagerCap.fromFieldsWithTypes(item); },
149
+ fromBcs: function (data) { return ManagerCap.fromBcs(data); },
150
+ bcs: ManagerCap.bcs,
151
+ fromJSONField: function (field) { return ManagerCap.fromJSONField(field); },
152
+ fromJSON: function (json) { return ManagerCap.fromJSON(json); },
153
+ fromSuiParsedData: function (content) { return ManagerCap.fromSuiParsedData(content); },
154
+ fromSuiObjectData: function (content) { return ManagerCap.fromSuiObjectData(content); },
155
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
156
+ return [2 /*return*/, ManagerCap.fetch(client, id)];
157
+ }); }); },
158
+ new: function (fields) {
159
+ return new ManagerCap([], fields);
160
+ },
161
+ kind: "StructClassReified",
162
+ };
163
+ };
164
+ Object.defineProperty(ManagerCap, "r", {
165
+ get: function () {
166
+ return ManagerCap.reified();
167
+ },
168
+ enumerable: false,
169
+ configurable: true
170
+ });
171
+ ManagerCap.phantom = function () {
172
+ return (0, reified_1.phantom)(ManagerCap.reified());
173
+ };
174
+ Object.defineProperty(ManagerCap, "p", {
175
+ get: function () {
176
+ return ManagerCap.phantom();
177
+ },
178
+ enumerable: false,
179
+ configurable: true
180
+ });
181
+ Object.defineProperty(ManagerCap, "bcs", {
182
+ get: function () {
183
+ return bcs_1.bcs.struct("ManagerCap", {
184
+ id: structs_2.UID.bcs,
185
+ });
186
+ },
187
+ enumerable: false,
188
+ configurable: true
189
+ });
190
+ ManagerCap.fromFields = function (fields) {
191
+ return ManagerCap.reified().new({
192
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
193
+ });
194
+ };
195
+ ManagerCap.fromFieldsWithTypes = function (item) {
196
+ if (!isManagerCap(item.type)) {
197
+ throw new Error("not a ManagerCap type");
198
+ }
199
+ return ManagerCap.reified().new({
200
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
201
+ });
202
+ };
203
+ ManagerCap.fromBcs = function (data) {
204
+ return ManagerCap.fromFields(ManagerCap.bcs.parse(data));
205
+ };
206
+ ManagerCap.prototype.toJSONField = function () {
207
+ return {
208
+ id: this.id,
209
+ };
210
+ };
211
+ ManagerCap.prototype.toJSON = function () {
212
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
213
+ };
214
+ ManagerCap.fromJSONField = function (field) {
215
+ return ManagerCap.reified().new({
216
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
217
+ });
218
+ };
219
+ ManagerCap.fromJSON = function (json) {
220
+ if (json.$typeName !== ManagerCap.$typeName) {
221
+ throw new Error("not a WithTwoGenerics json object");
222
+ }
223
+ return ManagerCap.fromJSONField(json);
224
+ };
225
+ ManagerCap.fromSuiParsedData = function (content) {
226
+ if (content.dataType !== "moveObject") {
227
+ throw new Error("not an object");
228
+ }
229
+ if (!isManagerCap(content.type)) {
230
+ throw new Error("object at ".concat(content.fields.id, " is not a ManagerCap object"));
231
+ }
232
+ return ManagerCap.fromFieldsWithTypes(content);
233
+ };
234
+ ManagerCap.fromSuiObjectData = function (data) {
235
+ if (data.bcs) {
236
+ if (data.bcs.dataType !== "moveObject" || !isManagerCap(data.bcs.type)) {
237
+ throw new Error("object at is not a ManagerCap object");
238
+ }
239
+ return ManagerCap.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
240
+ }
241
+ if (data.content) {
242
+ return ManagerCap.fromSuiParsedData(data.content);
243
+ }
244
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
245
+ };
246
+ ManagerCap.fetch = function (client, id) {
247
+ return __awaiter(this, void 0, void 0, function () {
248
+ var res;
249
+ var _a, _b;
250
+ return __generator(this, function (_c) {
251
+ switch (_c.label) {
252
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
253
+ case 1:
254
+ res = _c.sent();
255
+ if (res.error) {
256
+ throw new Error("error fetching ManagerCap object at id ".concat(id, ": ").concat(res.error.code));
257
+ }
258
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isManagerCap(res.data.bcs.type)) {
259
+ throw new Error("object at id ".concat(id, " is not a ManagerCap object"));
260
+ }
261
+ return [2 /*return*/, ManagerCap.fromSuiObjectData(res.data)];
262
+ }
263
+ });
264
+ });
265
+ };
266
+ ManagerCap.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::ManagerCap");
267
+ ManagerCap.$numTypeParams = 0;
268
+ ManagerCap.$isPhantom = [];
269
+ return ManagerCap;
270
+ }());
271
+ exports.ManagerCap = ManagerCap;
272
+ /* ============================== ExpDownEvent =============================== */
273
+ function isExpDownEvent(type) {
274
+ type = (0, util_1.compressSuiType)(type);
275
+ return type === "".concat(index_1.PKG_V17, "::typus_nft::ExpDownEvent");
276
+ }
277
+ var ExpDownEvent = /** @class */ (function () {
278
+ function ExpDownEvent(typeArgs, fields) {
279
+ this.__StructClass = true;
280
+ this.$typeName = ExpDownEvent.$typeName;
281
+ this.$isPhantom = ExpDownEvent.$isPhantom;
282
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ExpDownEvent.$typeName], __read(typeArgs), false));
283
+ this.$typeArgs = typeArgs;
284
+ this.nftId = fields.nftId;
285
+ this.number = fields.number;
286
+ this.expRemove = fields.expRemove;
287
+ }
288
+ ExpDownEvent.reified = function () {
289
+ var _this = this;
290
+ return {
291
+ typeName: ExpDownEvent.$typeName,
292
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ExpDownEvent.$typeName], [], false)),
293
+ typeArgs: [],
294
+ isPhantom: ExpDownEvent.$isPhantom,
295
+ reifiedTypeArgs: [],
296
+ fromFields: function (fields) { return ExpDownEvent.fromFields(fields); },
297
+ fromFieldsWithTypes: function (item) { return ExpDownEvent.fromFieldsWithTypes(item); },
298
+ fromBcs: function (data) { return ExpDownEvent.fromBcs(data); },
299
+ bcs: ExpDownEvent.bcs,
300
+ fromJSONField: function (field) { return ExpDownEvent.fromJSONField(field); },
301
+ fromJSON: function (json) { return ExpDownEvent.fromJSON(json); },
302
+ fromSuiParsedData: function (content) { return ExpDownEvent.fromSuiParsedData(content); },
303
+ fromSuiObjectData: function (content) { return ExpDownEvent.fromSuiObjectData(content); },
304
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
305
+ return [2 /*return*/, ExpDownEvent.fetch(client, id)];
306
+ }); }); },
307
+ new: function (fields) {
308
+ return new ExpDownEvent([], fields);
309
+ },
310
+ kind: "StructClassReified",
311
+ };
312
+ };
313
+ Object.defineProperty(ExpDownEvent, "r", {
314
+ get: function () {
315
+ return ExpDownEvent.reified();
316
+ },
317
+ enumerable: false,
318
+ configurable: true
319
+ });
320
+ ExpDownEvent.phantom = function () {
321
+ return (0, reified_1.phantom)(ExpDownEvent.reified());
322
+ };
323
+ Object.defineProperty(ExpDownEvent, "p", {
324
+ get: function () {
325
+ return ExpDownEvent.phantom();
326
+ },
327
+ enumerable: false,
328
+ configurable: true
329
+ });
330
+ Object.defineProperty(ExpDownEvent, "bcs", {
331
+ get: function () {
332
+ return bcs_1.bcs.struct("ExpDownEvent", {
333
+ nft_id: structs_2.ID.bcs,
334
+ number: bcs_1.bcs.u64(),
335
+ exp_remove: bcs_1.bcs.u64(),
336
+ });
337
+ },
338
+ enumerable: false,
339
+ configurable: true
340
+ });
341
+ ExpDownEvent.fromFields = function (fields) {
342
+ return ExpDownEvent.reified().new({
343
+ nftId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.nft_id),
344
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
345
+ expRemove: (0, reified_1.decodeFromFields)("u64", fields.exp_remove),
346
+ });
347
+ };
348
+ ExpDownEvent.fromFieldsWithTypes = function (item) {
349
+ if (!isExpDownEvent(item.type)) {
350
+ throw new Error("not a ExpDownEvent type");
351
+ }
352
+ return ExpDownEvent.reified().new({
353
+ nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.nft_id),
354
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
355
+ expRemove: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_remove),
356
+ });
357
+ };
358
+ ExpDownEvent.fromBcs = function (data) {
359
+ return ExpDownEvent.fromFields(ExpDownEvent.bcs.parse(data));
360
+ };
361
+ ExpDownEvent.prototype.toJSONField = function () {
362
+ return {
363
+ nftId: this.nftId,
364
+ number: this.number.toString(),
365
+ expRemove: this.expRemove.toString(),
366
+ };
367
+ };
368
+ ExpDownEvent.prototype.toJSON = function () {
369
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
370
+ };
371
+ ExpDownEvent.fromJSONField = function (field) {
372
+ return ExpDownEvent.reified().new({
373
+ nftId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.nftId),
374
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
375
+ expRemove: (0, reified_1.decodeFromJSONField)("u64", field.expRemove),
376
+ });
377
+ };
378
+ ExpDownEvent.fromJSON = function (json) {
379
+ if (json.$typeName !== ExpDownEvent.$typeName) {
380
+ throw new Error("not a WithTwoGenerics json object");
381
+ }
382
+ return ExpDownEvent.fromJSONField(json);
383
+ };
384
+ ExpDownEvent.fromSuiParsedData = function (content) {
385
+ if (content.dataType !== "moveObject") {
386
+ throw new Error("not an object");
387
+ }
388
+ if (!isExpDownEvent(content.type)) {
389
+ throw new Error("object at ".concat(content.fields.id, " is not a ExpDownEvent object"));
390
+ }
391
+ return ExpDownEvent.fromFieldsWithTypes(content);
392
+ };
393
+ ExpDownEvent.fromSuiObjectData = function (data) {
394
+ if (data.bcs) {
395
+ if (data.bcs.dataType !== "moveObject" || !isExpDownEvent(data.bcs.type)) {
396
+ throw new Error("object at is not a ExpDownEvent object");
397
+ }
398
+ return ExpDownEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
399
+ }
400
+ if (data.content) {
401
+ return ExpDownEvent.fromSuiParsedData(data.content);
402
+ }
403
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
404
+ };
405
+ ExpDownEvent.fetch = function (client, id) {
406
+ return __awaiter(this, void 0, void 0, function () {
407
+ var res;
408
+ var _a, _b;
409
+ return __generator(this, function (_c) {
410
+ switch (_c.label) {
411
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
412
+ case 1:
413
+ res = _c.sent();
414
+ if (res.error) {
415
+ throw new Error("error fetching ExpDownEvent object at id ".concat(id, ": ").concat(res.error.code));
416
+ }
417
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isExpDownEvent(res.data.bcs.type)) {
418
+ throw new Error("object at id ".concat(id, " is not a ExpDownEvent object"));
419
+ }
420
+ return [2 /*return*/, ExpDownEvent.fromSuiObjectData(res.data)];
421
+ }
422
+ });
423
+ });
424
+ };
425
+ ExpDownEvent.$typeName = "".concat(index_1.PKG_V17, "::typus_nft::ExpDownEvent");
426
+ ExpDownEvent.$numTypeParams = 0;
427
+ ExpDownEvent.$isPhantom = [];
428
+ return ExpDownEvent;
429
+ }());
430
+ exports.ExpDownEvent = ExpDownEvent;
431
+ /* ============================== ExpUpEvent =============================== */
432
+ function isExpUpEvent(type) {
433
+ type = (0, util_1.compressSuiType)(type);
434
+ return type === "".concat(index_1.PKG_V2, "::typus_nft::ExpUpEvent");
435
+ }
436
+ var ExpUpEvent = /** @class */ (function () {
437
+ function ExpUpEvent(typeArgs, fields) {
438
+ this.__StructClass = true;
439
+ this.$typeName = ExpUpEvent.$typeName;
440
+ this.$isPhantom = ExpUpEvent.$isPhantom;
441
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ExpUpEvent.$typeName], __read(typeArgs), false));
442
+ this.$typeArgs = typeArgs;
443
+ this.nftId = fields.nftId;
444
+ this.number = fields.number;
445
+ this.expEarn = fields.expEarn;
446
+ }
447
+ ExpUpEvent.reified = function () {
448
+ var _this = this;
449
+ return {
450
+ typeName: ExpUpEvent.$typeName,
451
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ExpUpEvent.$typeName], [], false)),
452
+ typeArgs: [],
453
+ isPhantom: ExpUpEvent.$isPhantom,
454
+ reifiedTypeArgs: [],
455
+ fromFields: function (fields) { return ExpUpEvent.fromFields(fields); },
456
+ fromFieldsWithTypes: function (item) { return ExpUpEvent.fromFieldsWithTypes(item); },
457
+ fromBcs: function (data) { return ExpUpEvent.fromBcs(data); },
458
+ bcs: ExpUpEvent.bcs,
459
+ fromJSONField: function (field) { return ExpUpEvent.fromJSONField(field); },
460
+ fromJSON: function (json) { return ExpUpEvent.fromJSON(json); },
461
+ fromSuiParsedData: function (content) { return ExpUpEvent.fromSuiParsedData(content); },
462
+ fromSuiObjectData: function (content) { return ExpUpEvent.fromSuiObjectData(content); },
463
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
464
+ return [2 /*return*/, ExpUpEvent.fetch(client, id)];
465
+ }); }); },
466
+ new: function (fields) {
467
+ return new ExpUpEvent([], fields);
468
+ },
469
+ kind: "StructClassReified",
470
+ };
471
+ };
472
+ Object.defineProperty(ExpUpEvent, "r", {
473
+ get: function () {
474
+ return ExpUpEvent.reified();
475
+ },
476
+ enumerable: false,
477
+ configurable: true
478
+ });
479
+ ExpUpEvent.phantom = function () {
480
+ return (0, reified_1.phantom)(ExpUpEvent.reified());
481
+ };
482
+ Object.defineProperty(ExpUpEvent, "p", {
483
+ get: function () {
484
+ return ExpUpEvent.phantom();
485
+ },
486
+ enumerable: false,
487
+ configurable: true
488
+ });
489
+ Object.defineProperty(ExpUpEvent, "bcs", {
490
+ get: function () {
491
+ return bcs_1.bcs.struct("ExpUpEvent", {
492
+ nft_id: structs_2.ID.bcs,
493
+ number: bcs_1.bcs.u64(),
494
+ exp_earn: bcs_1.bcs.u64(),
495
+ });
496
+ },
497
+ enumerable: false,
498
+ configurable: true
499
+ });
500
+ ExpUpEvent.fromFields = function (fields) {
501
+ return ExpUpEvent.reified().new({
502
+ nftId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.nft_id),
503
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
504
+ expEarn: (0, reified_1.decodeFromFields)("u64", fields.exp_earn),
505
+ });
506
+ };
507
+ ExpUpEvent.fromFieldsWithTypes = function (item) {
508
+ if (!isExpUpEvent(item.type)) {
509
+ throw new Error("not a ExpUpEvent type");
510
+ }
511
+ return ExpUpEvent.reified().new({
512
+ nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.nft_id),
513
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
514
+ expEarn: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_earn),
515
+ });
516
+ };
517
+ ExpUpEvent.fromBcs = function (data) {
518
+ return ExpUpEvent.fromFields(ExpUpEvent.bcs.parse(data));
519
+ };
520
+ ExpUpEvent.prototype.toJSONField = function () {
521
+ return {
522
+ nftId: this.nftId,
523
+ number: this.number.toString(),
524
+ expEarn: this.expEarn.toString(),
525
+ };
526
+ };
527
+ ExpUpEvent.prototype.toJSON = function () {
528
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
529
+ };
530
+ ExpUpEvent.fromJSONField = function (field) {
531
+ return ExpUpEvent.reified().new({
532
+ nftId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.nftId),
533
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
534
+ expEarn: (0, reified_1.decodeFromJSONField)("u64", field.expEarn),
535
+ });
536
+ };
537
+ ExpUpEvent.fromJSON = function (json) {
538
+ if (json.$typeName !== ExpUpEvent.$typeName) {
539
+ throw new Error("not a WithTwoGenerics json object");
540
+ }
541
+ return ExpUpEvent.fromJSONField(json);
542
+ };
543
+ ExpUpEvent.fromSuiParsedData = function (content) {
544
+ if (content.dataType !== "moveObject") {
545
+ throw new Error("not an object");
546
+ }
547
+ if (!isExpUpEvent(content.type)) {
548
+ throw new Error("object at ".concat(content.fields.id, " is not a ExpUpEvent object"));
549
+ }
550
+ return ExpUpEvent.fromFieldsWithTypes(content);
551
+ };
552
+ ExpUpEvent.fromSuiObjectData = function (data) {
553
+ if (data.bcs) {
554
+ if (data.bcs.dataType !== "moveObject" || !isExpUpEvent(data.bcs.type)) {
555
+ throw new Error("object at is not a ExpUpEvent object");
556
+ }
557
+ return ExpUpEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
558
+ }
559
+ if (data.content) {
560
+ return ExpUpEvent.fromSuiParsedData(data.content);
561
+ }
562
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
563
+ };
564
+ ExpUpEvent.fetch = function (client, id) {
565
+ return __awaiter(this, void 0, void 0, function () {
566
+ var res;
567
+ var _a, _b;
568
+ return __generator(this, function (_c) {
569
+ switch (_c.label) {
570
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
571
+ case 1:
572
+ res = _c.sent();
573
+ if (res.error) {
574
+ throw new Error("error fetching ExpUpEvent object at id ".concat(id, ": ").concat(res.error.code));
575
+ }
576
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isExpUpEvent(res.data.bcs.type)) {
577
+ throw new Error("object at id ".concat(id, " is not a ExpUpEvent object"));
578
+ }
579
+ return [2 /*return*/, ExpUpEvent.fromSuiObjectData(res.data)];
580
+ }
581
+ });
582
+ });
583
+ };
584
+ ExpUpEvent.$typeName = "".concat(index_1.PKG_V2, "::typus_nft::ExpUpEvent");
585
+ ExpUpEvent.$numTypeParams = 0;
586
+ ExpUpEvent.$isPhantom = [];
587
+ return ExpUpEvent;
588
+ }());
589
+ exports.ExpUpEvent = ExpUpEvent;
590
+ /* ============================== FirstBidEvent =============================== */
591
+ function isFirstBidEvent(type) {
592
+ type = (0, util_1.compressSuiType)(type);
593
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::FirstBidEvent");
594
+ }
595
+ var FirstBidEvent = /** @class */ (function () {
596
+ function FirstBidEvent(typeArgs, fields) {
597
+ this.__StructClass = true;
598
+ this.$typeName = FirstBidEvent.$typeName;
599
+ this.$isPhantom = FirstBidEvent.$isPhantom;
600
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([FirstBidEvent.$typeName], __read(typeArgs), false));
601
+ this.$typeArgs = typeArgs;
602
+ this.nftId = fields.nftId;
603
+ this.number = fields.number;
604
+ this.expEarn = fields.expEarn;
605
+ }
606
+ FirstBidEvent.reified = function () {
607
+ var _this = this;
608
+ return {
609
+ typeName: FirstBidEvent.$typeName,
610
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([FirstBidEvent.$typeName], [], false)),
611
+ typeArgs: [],
612
+ isPhantom: FirstBidEvent.$isPhantom,
613
+ reifiedTypeArgs: [],
614
+ fromFields: function (fields) { return FirstBidEvent.fromFields(fields); },
615
+ fromFieldsWithTypes: function (item) { return FirstBidEvent.fromFieldsWithTypes(item); },
616
+ fromBcs: function (data) { return FirstBidEvent.fromBcs(data); },
617
+ bcs: FirstBidEvent.bcs,
618
+ fromJSONField: function (field) { return FirstBidEvent.fromJSONField(field); },
619
+ fromJSON: function (json) { return FirstBidEvent.fromJSON(json); },
620
+ fromSuiParsedData: function (content) { return FirstBidEvent.fromSuiParsedData(content); },
621
+ fromSuiObjectData: function (content) { return FirstBidEvent.fromSuiObjectData(content); },
622
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
623
+ return [2 /*return*/, FirstBidEvent.fetch(client, id)];
624
+ }); }); },
625
+ new: function (fields) {
626
+ return new FirstBidEvent([], fields);
627
+ },
628
+ kind: "StructClassReified",
629
+ };
630
+ };
631
+ Object.defineProperty(FirstBidEvent, "r", {
632
+ get: function () {
633
+ return FirstBidEvent.reified();
634
+ },
635
+ enumerable: false,
636
+ configurable: true
637
+ });
638
+ FirstBidEvent.phantom = function () {
639
+ return (0, reified_1.phantom)(FirstBidEvent.reified());
640
+ };
641
+ Object.defineProperty(FirstBidEvent, "p", {
642
+ get: function () {
643
+ return FirstBidEvent.phantom();
644
+ },
645
+ enumerable: false,
646
+ configurable: true
647
+ });
648
+ Object.defineProperty(FirstBidEvent, "bcs", {
649
+ get: function () {
650
+ return bcs_1.bcs.struct("FirstBidEvent", {
651
+ nft_id: structs_2.ID.bcs,
652
+ number: bcs_1.bcs.u64(),
653
+ exp_earn: bcs_1.bcs.u64(),
654
+ });
655
+ },
656
+ enumerable: false,
657
+ configurable: true
658
+ });
659
+ FirstBidEvent.fromFields = function (fields) {
660
+ return FirstBidEvent.reified().new({
661
+ nftId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.nft_id),
662
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
663
+ expEarn: (0, reified_1.decodeFromFields)("u64", fields.exp_earn),
664
+ });
665
+ };
666
+ FirstBidEvent.fromFieldsWithTypes = function (item) {
667
+ if (!isFirstBidEvent(item.type)) {
668
+ throw new Error("not a FirstBidEvent type");
669
+ }
670
+ return FirstBidEvent.reified().new({
671
+ nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.nft_id),
672
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
673
+ expEarn: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_earn),
674
+ });
675
+ };
676
+ FirstBidEvent.fromBcs = function (data) {
677
+ return FirstBidEvent.fromFields(FirstBidEvent.bcs.parse(data));
678
+ };
679
+ FirstBidEvent.prototype.toJSONField = function () {
680
+ return {
681
+ nftId: this.nftId,
682
+ number: this.number.toString(),
683
+ expEarn: this.expEarn.toString(),
684
+ };
685
+ };
686
+ FirstBidEvent.prototype.toJSON = function () {
687
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
688
+ };
689
+ FirstBidEvent.fromJSONField = function (field) {
690
+ return FirstBidEvent.reified().new({
691
+ nftId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.nftId),
692
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
693
+ expEarn: (0, reified_1.decodeFromJSONField)("u64", field.expEarn),
694
+ });
695
+ };
696
+ FirstBidEvent.fromJSON = function (json) {
697
+ if (json.$typeName !== FirstBidEvent.$typeName) {
698
+ throw new Error("not a WithTwoGenerics json object");
699
+ }
700
+ return FirstBidEvent.fromJSONField(json);
701
+ };
702
+ FirstBidEvent.fromSuiParsedData = function (content) {
703
+ if (content.dataType !== "moveObject") {
704
+ throw new Error("not an object");
705
+ }
706
+ if (!isFirstBidEvent(content.type)) {
707
+ throw new Error("object at ".concat(content.fields.id, " is not a FirstBidEvent object"));
708
+ }
709
+ return FirstBidEvent.fromFieldsWithTypes(content);
710
+ };
711
+ FirstBidEvent.fromSuiObjectData = function (data) {
712
+ if (data.bcs) {
713
+ if (data.bcs.dataType !== "moveObject" || !isFirstBidEvent(data.bcs.type)) {
714
+ throw new Error("object at is not a FirstBidEvent object");
715
+ }
716
+ return FirstBidEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
717
+ }
718
+ if (data.content) {
719
+ return FirstBidEvent.fromSuiParsedData(data.content);
720
+ }
721
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
722
+ };
723
+ FirstBidEvent.fetch = function (client, id) {
724
+ return __awaiter(this, void 0, void 0, function () {
725
+ var res;
726
+ var _a, _b;
727
+ return __generator(this, function (_c) {
728
+ switch (_c.label) {
729
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
730
+ case 1:
731
+ res = _c.sent();
732
+ if (res.error) {
733
+ throw new Error("error fetching FirstBidEvent object at id ".concat(id, ": ").concat(res.error.code));
734
+ }
735
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isFirstBidEvent(res.data.bcs.type)) {
736
+ throw new Error("object at id ".concat(id, " is not a FirstBidEvent object"));
737
+ }
738
+ return [2 /*return*/, FirstBidEvent.fromSuiObjectData(res.data)];
739
+ }
740
+ });
741
+ });
742
+ };
743
+ FirstBidEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::FirstBidEvent");
744
+ FirstBidEvent.$numTypeParams = 0;
745
+ FirstBidEvent.$isPhantom = [];
746
+ return FirstBidEvent;
747
+ }());
748
+ exports.FirstBidEvent = FirstBidEvent;
749
+ /* ============================== FirstDepositEvent =============================== */
750
+ function isFirstDepositEvent(type) {
751
+ type = (0, util_1.compressSuiType)(type);
752
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::FirstDepositEvent");
753
+ }
754
+ var FirstDepositEvent = /** @class */ (function () {
755
+ function FirstDepositEvent(typeArgs, fields) {
756
+ this.__StructClass = true;
757
+ this.$typeName = FirstDepositEvent.$typeName;
758
+ this.$isPhantom = FirstDepositEvent.$isPhantom;
759
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([FirstDepositEvent.$typeName], __read(typeArgs), false));
760
+ this.$typeArgs = typeArgs;
761
+ this.nftId = fields.nftId;
762
+ this.number = fields.number;
763
+ this.expEarn = fields.expEarn;
764
+ }
765
+ FirstDepositEvent.reified = function () {
766
+ var _this = this;
767
+ return {
768
+ typeName: FirstDepositEvent.$typeName,
769
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([FirstDepositEvent.$typeName], [], false)),
770
+ typeArgs: [],
771
+ isPhantom: FirstDepositEvent.$isPhantom,
772
+ reifiedTypeArgs: [],
773
+ fromFields: function (fields) { return FirstDepositEvent.fromFields(fields); },
774
+ fromFieldsWithTypes: function (item) { return FirstDepositEvent.fromFieldsWithTypes(item); },
775
+ fromBcs: function (data) { return FirstDepositEvent.fromBcs(data); },
776
+ bcs: FirstDepositEvent.bcs,
777
+ fromJSONField: function (field) { return FirstDepositEvent.fromJSONField(field); },
778
+ fromJSON: function (json) { return FirstDepositEvent.fromJSON(json); },
779
+ fromSuiParsedData: function (content) { return FirstDepositEvent.fromSuiParsedData(content); },
780
+ fromSuiObjectData: function (content) { return FirstDepositEvent.fromSuiObjectData(content); },
781
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
782
+ return [2 /*return*/, FirstDepositEvent.fetch(client, id)];
783
+ }); }); },
784
+ new: function (fields) {
785
+ return new FirstDepositEvent([], fields);
786
+ },
787
+ kind: "StructClassReified",
788
+ };
789
+ };
790
+ Object.defineProperty(FirstDepositEvent, "r", {
791
+ get: function () {
792
+ return FirstDepositEvent.reified();
793
+ },
794
+ enumerable: false,
795
+ configurable: true
796
+ });
797
+ FirstDepositEvent.phantom = function () {
798
+ return (0, reified_1.phantom)(FirstDepositEvent.reified());
799
+ };
800
+ Object.defineProperty(FirstDepositEvent, "p", {
801
+ get: function () {
802
+ return FirstDepositEvent.phantom();
803
+ },
804
+ enumerable: false,
805
+ configurable: true
806
+ });
807
+ Object.defineProperty(FirstDepositEvent, "bcs", {
808
+ get: function () {
809
+ return bcs_1.bcs.struct("FirstDepositEvent", {
810
+ nft_id: structs_2.ID.bcs,
811
+ number: bcs_1.bcs.u64(),
812
+ exp_earn: bcs_1.bcs.u64(),
813
+ });
814
+ },
815
+ enumerable: false,
816
+ configurable: true
817
+ });
818
+ FirstDepositEvent.fromFields = function (fields) {
819
+ return FirstDepositEvent.reified().new({
820
+ nftId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.nft_id),
821
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
822
+ expEarn: (0, reified_1.decodeFromFields)("u64", fields.exp_earn),
823
+ });
824
+ };
825
+ FirstDepositEvent.fromFieldsWithTypes = function (item) {
826
+ if (!isFirstDepositEvent(item.type)) {
827
+ throw new Error("not a FirstDepositEvent type");
828
+ }
829
+ return FirstDepositEvent.reified().new({
830
+ nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.nft_id),
831
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
832
+ expEarn: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_earn),
833
+ });
834
+ };
835
+ FirstDepositEvent.fromBcs = function (data) {
836
+ return FirstDepositEvent.fromFields(FirstDepositEvent.bcs.parse(data));
837
+ };
838
+ FirstDepositEvent.prototype.toJSONField = function () {
839
+ return {
840
+ nftId: this.nftId,
841
+ number: this.number.toString(),
842
+ expEarn: this.expEarn.toString(),
843
+ };
844
+ };
845
+ FirstDepositEvent.prototype.toJSON = function () {
846
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
847
+ };
848
+ FirstDepositEvent.fromJSONField = function (field) {
849
+ return FirstDepositEvent.reified().new({
850
+ nftId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.nftId),
851
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
852
+ expEarn: (0, reified_1.decodeFromJSONField)("u64", field.expEarn),
853
+ });
854
+ };
855
+ FirstDepositEvent.fromJSON = function (json) {
856
+ if (json.$typeName !== FirstDepositEvent.$typeName) {
857
+ throw new Error("not a WithTwoGenerics json object");
858
+ }
859
+ return FirstDepositEvent.fromJSONField(json);
860
+ };
861
+ FirstDepositEvent.fromSuiParsedData = function (content) {
862
+ if (content.dataType !== "moveObject") {
863
+ throw new Error("not an object");
864
+ }
865
+ if (!isFirstDepositEvent(content.type)) {
866
+ throw new Error("object at ".concat(content.fields.id, " is not a FirstDepositEvent object"));
867
+ }
868
+ return FirstDepositEvent.fromFieldsWithTypes(content);
869
+ };
870
+ FirstDepositEvent.fromSuiObjectData = function (data) {
871
+ if (data.bcs) {
872
+ if (data.bcs.dataType !== "moveObject" || !isFirstDepositEvent(data.bcs.type)) {
873
+ throw new Error("object at is not a FirstDepositEvent object");
874
+ }
875
+ return FirstDepositEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
876
+ }
877
+ if (data.content) {
878
+ return FirstDepositEvent.fromSuiParsedData(data.content);
879
+ }
880
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
881
+ };
882
+ FirstDepositEvent.fetch = function (client, id) {
883
+ return __awaiter(this, void 0, void 0, function () {
884
+ var res;
885
+ var _a, _b;
886
+ return __generator(this, function (_c) {
887
+ switch (_c.label) {
888
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
889
+ case 1:
890
+ res = _c.sent();
891
+ if (res.error) {
892
+ throw new Error("error fetching FirstDepositEvent object at id ".concat(id, ": ").concat(res.error.code));
893
+ }
894
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isFirstDepositEvent(res.data.bcs.type)) {
895
+ throw new Error("object at id ".concat(id, " is not a FirstDepositEvent object"));
896
+ }
897
+ return [2 /*return*/, FirstDepositEvent.fromSuiObjectData(res.data)];
898
+ }
899
+ });
900
+ });
901
+ };
902
+ FirstDepositEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::FirstDepositEvent");
903
+ FirstDepositEvent.$numTypeParams = 0;
904
+ FirstDepositEvent.$isPhantom = [];
905
+ return FirstDepositEvent;
906
+ }());
907
+ exports.FirstDepositEvent = FirstDepositEvent;
908
+ /* ============================== LevelUpEvent =============================== */
909
+ function isLevelUpEvent(type) {
910
+ type = (0, util_1.compressSuiType)(type);
911
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::LevelUpEvent");
912
+ }
913
+ var LevelUpEvent = /** @class */ (function () {
914
+ function LevelUpEvent(typeArgs, fields) {
915
+ this.__StructClass = true;
916
+ this.$typeName = LevelUpEvent.$typeName;
917
+ this.$isPhantom = LevelUpEvent.$isPhantom;
918
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([LevelUpEvent.$typeName], __read(typeArgs), false));
919
+ this.$typeArgs = typeArgs;
920
+ this.nftId = fields.nftId;
921
+ this.level = fields.level;
922
+ }
923
+ LevelUpEvent.reified = function () {
924
+ var _this = this;
925
+ return {
926
+ typeName: LevelUpEvent.$typeName,
927
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([LevelUpEvent.$typeName], [], false)),
928
+ typeArgs: [],
929
+ isPhantom: LevelUpEvent.$isPhantom,
930
+ reifiedTypeArgs: [],
931
+ fromFields: function (fields) { return LevelUpEvent.fromFields(fields); },
932
+ fromFieldsWithTypes: function (item) { return LevelUpEvent.fromFieldsWithTypes(item); },
933
+ fromBcs: function (data) { return LevelUpEvent.fromBcs(data); },
934
+ bcs: LevelUpEvent.bcs,
935
+ fromJSONField: function (field) { return LevelUpEvent.fromJSONField(field); },
936
+ fromJSON: function (json) { return LevelUpEvent.fromJSON(json); },
937
+ fromSuiParsedData: function (content) { return LevelUpEvent.fromSuiParsedData(content); },
938
+ fromSuiObjectData: function (content) { return LevelUpEvent.fromSuiObjectData(content); },
939
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
940
+ return [2 /*return*/, LevelUpEvent.fetch(client, id)];
941
+ }); }); },
942
+ new: function (fields) {
943
+ return new LevelUpEvent([], fields);
944
+ },
945
+ kind: "StructClassReified",
946
+ };
947
+ };
948
+ Object.defineProperty(LevelUpEvent, "r", {
949
+ get: function () {
950
+ return LevelUpEvent.reified();
951
+ },
952
+ enumerable: false,
953
+ configurable: true
954
+ });
955
+ LevelUpEvent.phantom = function () {
956
+ return (0, reified_1.phantom)(LevelUpEvent.reified());
957
+ };
958
+ Object.defineProperty(LevelUpEvent, "p", {
959
+ get: function () {
960
+ return LevelUpEvent.phantom();
961
+ },
962
+ enumerable: false,
963
+ configurable: true
964
+ });
965
+ Object.defineProperty(LevelUpEvent, "bcs", {
966
+ get: function () {
967
+ return bcs_1.bcs.struct("LevelUpEvent", {
968
+ nft_id: structs_2.ID.bcs,
969
+ level: bcs_1.bcs.u64(),
970
+ });
971
+ },
972
+ enumerable: false,
973
+ configurable: true
974
+ });
975
+ LevelUpEvent.fromFields = function (fields) {
976
+ return LevelUpEvent.reified().new({
977
+ nftId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.nft_id),
978
+ level: (0, reified_1.decodeFromFields)("u64", fields.level),
979
+ });
980
+ };
981
+ LevelUpEvent.fromFieldsWithTypes = function (item) {
982
+ if (!isLevelUpEvent(item.type)) {
983
+ throw new Error("not a LevelUpEvent type");
984
+ }
985
+ return LevelUpEvent.reified().new({
986
+ nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.nft_id),
987
+ level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
988
+ });
989
+ };
990
+ LevelUpEvent.fromBcs = function (data) {
991
+ return LevelUpEvent.fromFields(LevelUpEvent.bcs.parse(data));
992
+ };
993
+ LevelUpEvent.prototype.toJSONField = function () {
994
+ return {
995
+ nftId: this.nftId,
996
+ level: this.level.toString(),
997
+ };
998
+ };
999
+ LevelUpEvent.prototype.toJSON = function () {
1000
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1001
+ };
1002
+ LevelUpEvent.fromJSONField = function (field) {
1003
+ return LevelUpEvent.reified().new({
1004
+ nftId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.nftId),
1005
+ level: (0, reified_1.decodeFromJSONField)("u64", field.level),
1006
+ });
1007
+ };
1008
+ LevelUpEvent.fromJSON = function (json) {
1009
+ if (json.$typeName !== LevelUpEvent.$typeName) {
1010
+ throw new Error("not a WithTwoGenerics json object");
1011
+ }
1012
+ return LevelUpEvent.fromJSONField(json);
1013
+ };
1014
+ LevelUpEvent.fromSuiParsedData = function (content) {
1015
+ if (content.dataType !== "moveObject") {
1016
+ throw new Error("not an object");
1017
+ }
1018
+ if (!isLevelUpEvent(content.type)) {
1019
+ throw new Error("object at ".concat(content.fields.id, " is not a LevelUpEvent object"));
1020
+ }
1021
+ return LevelUpEvent.fromFieldsWithTypes(content);
1022
+ };
1023
+ LevelUpEvent.fromSuiObjectData = function (data) {
1024
+ if (data.bcs) {
1025
+ if (data.bcs.dataType !== "moveObject" || !isLevelUpEvent(data.bcs.type)) {
1026
+ throw new Error("object at is not a LevelUpEvent object");
1027
+ }
1028
+ return LevelUpEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1029
+ }
1030
+ if (data.content) {
1031
+ return LevelUpEvent.fromSuiParsedData(data.content);
1032
+ }
1033
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1034
+ };
1035
+ LevelUpEvent.fetch = function (client, id) {
1036
+ return __awaiter(this, void 0, void 0, function () {
1037
+ var res;
1038
+ var _a, _b;
1039
+ return __generator(this, function (_c) {
1040
+ switch (_c.label) {
1041
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1042
+ case 1:
1043
+ res = _c.sent();
1044
+ if (res.error) {
1045
+ throw new Error("error fetching LevelUpEvent object at id ".concat(id, ": ").concat(res.error.code));
1046
+ }
1047
+ 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)) {
1048
+ throw new Error("object at id ".concat(id, " is not a LevelUpEvent object"));
1049
+ }
1050
+ return [2 /*return*/, LevelUpEvent.fromSuiObjectData(res.data)];
1051
+ }
1052
+ });
1053
+ });
1054
+ };
1055
+ LevelUpEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::LevelUpEvent");
1056
+ LevelUpEvent.$numTypeParams = 0;
1057
+ LevelUpEvent.$isPhantom = [];
1058
+ return LevelUpEvent;
1059
+ }());
1060
+ exports.LevelUpEvent = LevelUpEvent;
1061
+ /* ============================== MintEvent =============================== */
1062
+ function isMintEvent(type) {
1063
+ type = (0, util_1.compressSuiType)(type);
1064
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::MintEvent");
1065
+ }
1066
+ var MintEvent = /** @class */ (function () {
1067
+ function MintEvent(typeArgs, fields) {
1068
+ this.__StructClass = true;
1069
+ this.$typeName = MintEvent.$typeName;
1070
+ this.$isPhantom = MintEvent.$isPhantom;
1071
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([MintEvent.$typeName], __read(typeArgs), false));
1072
+ this.$typeArgs = typeArgs;
1073
+ this.id = fields.id;
1074
+ this.name = fields.name;
1075
+ this.description = fields.description;
1076
+ this.number = fields.number;
1077
+ this.url = fields.url;
1078
+ this.attributes = fields.attributes;
1079
+ this.sender = fields.sender;
1080
+ }
1081
+ MintEvent.reified = function () {
1082
+ var _this = this;
1083
+ return {
1084
+ typeName: MintEvent.$typeName,
1085
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([MintEvent.$typeName], [], false)),
1086
+ typeArgs: [],
1087
+ isPhantom: MintEvent.$isPhantom,
1088
+ reifiedTypeArgs: [],
1089
+ fromFields: function (fields) { return MintEvent.fromFields(fields); },
1090
+ fromFieldsWithTypes: function (item) { return MintEvent.fromFieldsWithTypes(item); },
1091
+ fromBcs: function (data) { return MintEvent.fromBcs(data); },
1092
+ bcs: MintEvent.bcs,
1093
+ fromJSONField: function (field) { return MintEvent.fromJSONField(field); },
1094
+ fromJSON: function (json) { return MintEvent.fromJSON(json); },
1095
+ fromSuiParsedData: function (content) { return MintEvent.fromSuiParsedData(content); },
1096
+ fromSuiObjectData: function (content) { return MintEvent.fromSuiObjectData(content); },
1097
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1098
+ return [2 /*return*/, MintEvent.fetch(client, id)];
1099
+ }); }); },
1100
+ new: function (fields) {
1101
+ return new MintEvent([], fields);
1102
+ },
1103
+ kind: "StructClassReified",
1104
+ };
1105
+ };
1106
+ Object.defineProperty(MintEvent, "r", {
1107
+ get: function () {
1108
+ return MintEvent.reified();
1109
+ },
1110
+ enumerable: false,
1111
+ configurable: true
1112
+ });
1113
+ MintEvent.phantom = function () {
1114
+ return (0, reified_1.phantom)(MintEvent.reified());
1115
+ };
1116
+ Object.defineProperty(MintEvent, "p", {
1117
+ get: function () {
1118
+ return MintEvent.phantom();
1119
+ },
1120
+ enumerable: false,
1121
+ configurable: true
1122
+ });
1123
+ Object.defineProperty(MintEvent, "bcs", {
1124
+ get: function () {
1125
+ return bcs_1.bcs.struct("MintEvent", {
1126
+ id: structs_2.ID.bcs,
1127
+ name: structs_1.String.bcs,
1128
+ description: structs_1.String.bcs,
1129
+ number: bcs_1.bcs.u64(),
1130
+ url: structs_4.Url.bcs,
1131
+ attributes: structs_5.VecMap.bcs(structs_1.String.bcs, structs_1.String.bcs),
1132
+ sender: bcs_1.bcs.bytes(32).transform({
1133
+ input: function (val) { return (0, utils_1.fromHEX)(val); },
1134
+ output: function (val) { return (0, utils_1.toHEX)(val); },
1135
+ }),
1136
+ });
1137
+ },
1138
+ enumerable: false,
1139
+ configurable: true
1140
+ });
1141
+ MintEvent.fromFields = function (fields) {
1142
+ return MintEvent.reified().new({
1143
+ id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1144
+ name: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.name),
1145
+ description: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.description),
1146
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
1147
+ url: (0, reified_1.decodeFromFields)(structs_4.Url.reified(), fields.url),
1148
+ attributes: (0, reified_1.decodeFromFields)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), fields.attributes),
1149
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1150
+ });
1151
+ };
1152
+ MintEvent.fromFieldsWithTypes = function (item) {
1153
+ if (!isMintEvent(item.type)) {
1154
+ throw new Error("not a MintEvent type");
1155
+ }
1156
+ return MintEvent.reified().new({
1157
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1158
+ name: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.name),
1159
+ description: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.description),
1160
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
1161
+ url: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.Url.reified(), item.fields.url),
1162
+ attributes: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), item.fields.attributes),
1163
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1164
+ });
1165
+ };
1166
+ MintEvent.fromBcs = function (data) {
1167
+ return MintEvent.fromFields(MintEvent.bcs.parse(data));
1168
+ };
1169
+ MintEvent.prototype.toJSONField = function () {
1170
+ return {
1171
+ id: this.id,
1172
+ name: this.name,
1173
+ description: this.description,
1174
+ number: this.number.toString(),
1175
+ url: this.url,
1176
+ attributes: this.attributes.toJSONField(),
1177
+ sender: this.sender,
1178
+ };
1179
+ };
1180
+ MintEvent.prototype.toJSON = function () {
1181
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1182
+ };
1183
+ MintEvent.fromJSONField = function (field) {
1184
+ return MintEvent.reified().new({
1185
+ id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1186
+ name: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.name),
1187
+ description: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.description),
1188
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
1189
+ url: (0, reified_1.decodeFromJSONField)(structs_4.Url.reified(), field.url),
1190
+ attributes: (0, reified_1.decodeFromJSONField)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), field.attributes),
1191
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1192
+ });
1193
+ };
1194
+ MintEvent.fromJSON = function (json) {
1195
+ if (json.$typeName !== MintEvent.$typeName) {
1196
+ throw new Error("not a WithTwoGenerics json object");
1197
+ }
1198
+ return MintEvent.fromJSONField(json);
1199
+ };
1200
+ MintEvent.fromSuiParsedData = function (content) {
1201
+ if (content.dataType !== "moveObject") {
1202
+ throw new Error("not an object");
1203
+ }
1204
+ if (!isMintEvent(content.type)) {
1205
+ throw new Error("object at ".concat(content.fields.id, " is not a MintEvent object"));
1206
+ }
1207
+ return MintEvent.fromFieldsWithTypes(content);
1208
+ };
1209
+ MintEvent.fromSuiObjectData = function (data) {
1210
+ if (data.bcs) {
1211
+ if (data.bcs.dataType !== "moveObject" || !isMintEvent(data.bcs.type)) {
1212
+ throw new Error("object at is not a MintEvent object");
1213
+ }
1214
+ return MintEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1215
+ }
1216
+ if (data.content) {
1217
+ return MintEvent.fromSuiParsedData(data.content);
1218
+ }
1219
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1220
+ };
1221
+ MintEvent.fetch = function (client, id) {
1222
+ return __awaiter(this, void 0, void 0, function () {
1223
+ var res;
1224
+ var _a, _b;
1225
+ return __generator(this, function (_c) {
1226
+ switch (_c.label) {
1227
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1228
+ case 1:
1229
+ res = _c.sent();
1230
+ if (res.error) {
1231
+ throw new Error("error fetching MintEvent object at id ".concat(id, ": ").concat(res.error.code));
1232
+ }
1233
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isMintEvent(res.data.bcs.type)) {
1234
+ throw new Error("object at id ".concat(id, " is not a MintEvent object"));
1235
+ }
1236
+ return [2 /*return*/, MintEvent.fromSuiObjectData(res.data)];
1237
+ }
1238
+ });
1239
+ });
1240
+ };
1241
+ MintEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::MintEvent");
1242
+ MintEvent.$numTypeParams = 0;
1243
+ MintEvent.$isPhantom = [];
1244
+ return MintEvent;
1245
+ }());
1246
+ exports.MintEvent = MintEvent;
1247
+ /* ============================== NewManagerCapEvent =============================== */
1248
+ function isNewManagerCapEvent(type) {
1249
+ type = (0, util_1.compressSuiType)(type);
1250
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::NewManagerCapEvent");
1251
+ }
1252
+ var NewManagerCapEvent = /** @class */ (function () {
1253
+ function NewManagerCapEvent(typeArgs, fields) {
1254
+ this.__StructClass = true;
1255
+ this.$typeName = NewManagerCapEvent.$typeName;
1256
+ this.$isPhantom = NewManagerCapEvent.$isPhantom;
1257
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NewManagerCapEvent.$typeName], __read(typeArgs), false));
1258
+ this.$typeArgs = typeArgs;
1259
+ this.id = fields.id;
1260
+ this.sender = fields.sender;
1261
+ }
1262
+ NewManagerCapEvent.reified = function () {
1263
+ var _this = this;
1264
+ return {
1265
+ typeName: NewManagerCapEvent.$typeName,
1266
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NewManagerCapEvent.$typeName], [], false)),
1267
+ typeArgs: [],
1268
+ isPhantom: NewManagerCapEvent.$isPhantom,
1269
+ reifiedTypeArgs: [],
1270
+ fromFields: function (fields) { return NewManagerCapEvent.fromFields(fields); },
1271
+ fromFieldsWithTypes: function (item) { return NewManagerCapEvent.fromFieldsWithTypes(item); },
1272
+ fromBcs: function (data) { return NewManagerCapEvent.fromBcs(data); },
1273
+ bcs: NewManagerCapEvent.bcs,
1274
+ fromJSONField: function (field) { return NewManagerCapEvent.fromJSONField(field); },
1275
+ fromJSON: function (json) { return NewManagerCapEvent.fromJSON(json); },
1276
+ fromSuiParsedData: function (content) { return NewManagerCapEvent.fromSuiParsedData(content); },
1277
+ fromSuiObjectData: function (content) { return NewManagerCapEvent.fromSuiObjectData(content); },
1278
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1279
+ return [2 /*return*/, NewManagerCapEvent.fetch(client, id)];
1280
+ }); }); },
1281
+ new: function (fields) {
1282
+ return new NewManagerCapEvent([], fields);
1283
+ },
1284
+ kind: "StructClassReified",
1285
+ };
1286
+ };
1287
+ Object.defineProperty(NewManagerCapEvent, "r", {
1288
+ get: function () {
1289
+ return NewManagerCapEvent.reified();
1290
+ },
1291
+ enumerable: false,
1292
+ configurable: true
1293
+ });
1294
+ NewManagerCapEvent.phantom = function () {
1295
+ return (0, reified_1.phantom)(NewManagerCapEvent.reified());
1296
+ };
1297
+ Object.defineProperty(NewManagerCapEvent, "p", {
1298
+ get: function () {
1299
+ return NewManagerCapEvent.phantom();
1300
+ },
1301
+ enumerable: false,
1302
+ configurable: true
1303
+ });
1304
+ Object.defineProperty(NewManagerCapEvent, "bcs", {
1305
+ get: function () {
1306
+ return bcs_1.bcs.struct("NewManagerCapEvent", {
1307
+ id: structs_2.ID.bcs,
1308
+ sender: bcs_1.bcs.bytes(32).transform({
1309
+ input: function (val) { return (0, utils_1.fromHEX)(val); },
1310
+ output: function (val) { return (0, utils_1.toHEX)(val); },
1311
+ }),
1312
+ });
1313
+ },
1314
+ enumerable: false,
1315
+ configurable: true
1316
+ });
1317
+ NewManagerCapEvent.fromFields = function (fields) {
1318
+ return NewManagerCapEvent.reified().new({
1319
+ id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1320
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1321
+ });
1322
+ };
1323
+ NewManagerCapEvent.fromFieldsWithTypes = function (item) {
1324
+ if (!isNewManagerCapEvent(item.type)) {
1325
+ throw new Error("not a NewManagerCapEvent type");
1326
+ }
1327
+ return NewManagerCapEvent.reified().new({
1328
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1329
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1330
+ });
1331
+ };
1332
+ NewManagerCapEvent.fromBcs = function (data) {
1333
+ return NewManagerCapEvent.fromFields(NewManagerCapEvent.bcs.parse(data));
1334
+ };
1335
+ NewManagerCapEvent.prototype.toJSONField = function () {
1336
+ return {
1337
+ id: this.id,
1338
+ sender: this.sender,
1339
+ };
1340
+ };
1341
+ NewManagerCapEvent.prototype.toJSON = function () {
1342
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1343
+ };
1344
+ NewManagerCapEvent.fromJSONField = function (field) {
1345
+ return NewManagerCapEvent.reified().new({
1346
+ id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1347
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1348
+ });
1349
+ };
1350
+ NewManagerCapEvent.fromJSON = function (json) {
1351
+ if (json.$typeName !== NewManagerCapEvent.$typeName) {
1352
+ throw new Error("not a WithTwoGenerics json object");
1353
+ }
1354
+ return NewManagerCapEvent.fromJSONField(json);
1355
+ };
1356
+ NewManagerCapEvent.fromSuiParsedData = function (content) {
1357
+ if (content.dataType !== "moveObject") {
1358
+ throw new Error("not an object");
1359
+ }
1360
+ if (!isNewManagerCapEvent(content.type)) {
1361
+ throw new Error("object at ".concat(content.fields.id, " is not a NewManagerCapEvent object"));
1362
+ }
1363
+ return NewManagerCapEvent.fromFieldsWithTypes(content);
1364
+ };
1365
+ NewManagerCapEvent.fromSuiObjectData = function (data) {
1366
+ if (data.bcs) {
1367
+ if (data.bcs.dataType !== "moveObject" || !isNewManagerCapEvent(data.bcs.type)) {
1368
+ throw new Error("object at is not a NewManagerCapEvent object");
1369
+ }
1370
+ return NewManagerCapEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1371
+ }
1372
+ if (data.content) {
1373
+ return NewManagerCapEvent.fromSuiParsedData(data.content);
1374
+ }
1375
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1376
+ };
1377
+ NewManagerCapEvent.fetch = function (client, id) {
1378
+ return __awaiter(this, void 0, void 0, function () {
1379
+ var res;
1380
+ var _a, _b;
1381
+ return __generator(this, function (_c) {
1382
+ switch (_c.label) {
1383
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1384
+ case 1:
1385
+ res = _c.sent();
1386
+ if (res.error) {
1387
+ throw new Error("error fetching NewManagerCapEvent object at id ".concat(id, ": ").concat(res.error.code));
1388
+ }
1389
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNewManagerCapEvent(res.data.bcs.type)) {
1390
+ throw new Error("object at id ".concat(id, " is not a NewManagerCapEvent object"));
1391
+ }
1392
+ return [2 /*return*/, NewManagerCapEvent.fromSuiObjectData(res.data)];
1393
+ }
1394
+ });
1395
+ });
1396
+ };
1397
+ NewManagerCapEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::NewManagerCapEvent");
1398
+ NewManagerCapEvent.$numTypeParams = 0;
1399
+ NewManagerCapEvent.$isPhantom = [];
1400
+ return NewManagerCapEvent;
1401
+ }());
1402
+ exports.NewManagerCapEvent = NewManagerCapEvent;
1403
+ /* ============================== Pool =============================== */
1404
+ function isPool(type) {
1405
+ type = (0, util_1.compressSuiType)(type);
1406
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::Pool");
1407
+ }
1408
+ var Pool = /** @class */ (function () {
1409
+ function Pool(typeArgs, fields) {
1410
+ this.__StructClass = true;
1411
+ this.$typeName = Pool.$typeName;
1412
+ this.$isPhantom = Pool.$isPhantom;
1413
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Pool.$typeName], __read(typeArgs), false));
1414
+ this.$typeArgs = typeArgs;
1415
+ this.id = fields.id;
1416
+ this.tails = fields.tails;
1417
+ this.num = fields.num;
1418
+ this.isLive = fields.isLive;
1419
+ this.startMs = fields.startMs;
1420
+ }
1421
+ Pool.reified = function () {
1422
+ var _this = this;
1423
+ return {
1424
+ typeName: Pool.$typeName,
1425
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Pool.$typeName], [], false)),
1426
+ typeArgs: [],
1427
+ isPhantom: Pool.$isPhantom,
1428
+ reifiedTypeArgs: [],
1429
+ fromFields: function (fields) { return Pool.fromFields(fields); },
1430
+ fromFieldsWithTypes: function (item) { return Pool.fromFieldsWithTypes(item); },
1431
+ fromBcs: function (data) { return Pool.fromBcs(data); },
1432
+ bcs: Pool.bcs,
1433
+ fromJSONField: function (field) { return Pool.fromJSONField(field); },
1434
+ fromJSON: function (json) { return Pool.fromJSON(json); },
1435
+ fromSuiParsedData: function (content) { return Pool.fromSuiParsedData(content); },
1436
+ fromSuiObjectData: function (content) { return Pool.fromSuiObjectData(content); },
1437
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1438
+ return [2 /*return*/, Pool.fetch(client, id)];
1439
+ }); }); },
1440
+ new: function (fields) {
1441
+ return new Pool([], fields);
1442
+ },
1443
+ kind: "StructClassReified",
1444
+ };
1445
+ };
1446
+ Object.defineProperty(Pool, "r", {
1447
+ get: function () {
1448
+ return Pool.reified();
1449
+ },
1450
+ enumerable: false,
1451
+ configurable: true
1452
+ });
1453
+ Pool.phantom = function () {
1454
+ return (0, reified_1.phantom)(Pool.reified());
1455
+ };
1456
+ Object.defineProperty(Pool, "p", {
1457
+ get: function () {
1458
+ return Pool.phantom();
1459
+ },
1460
+ enumerable: false,
1461
+ configurable: true
1462
+ });
1463
+ Object.defineProperty(Pool, "bcs", {
1464
+ get: function () {
1465
+ return bcs_1.bcs.struct("Pool", {
1466
+ id: structs_2.UID.bcs,
1467
+ tails: structs_6.TableVec.bcs,
1468
+ num: bcs_1.bcs.u64(),
1469
+ is_live: bcs_1.bcs.bool(),
1470
+ start_ms: bcs_1.bcs.u64(),
1471
+ });
1472
+ },
1473
+ enumerable: false,
1474
+ configurable: true
1475
+ });
1476
+ Pool.fromFields = function (fields) {
1477
+ return Pool.reified().new({
1478
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1479
+ tails: (0, reified_1.decodeFromFields)(structs_6.TableVec.reified(reified.phantom(Tails.reified())), fields.tails),
1480
+ num: (0, reified_1.decodeFromFields)("u64", fields.num),
1481
+ isLive: (0, reified_1.decodeFromFields)("bool", fields.is_live),
1482
+ startMs: (0, reified_1.decodeFromFields)("u64", fields.start_ms),
1483
+ });
1484
+ };
1485
+ Pool.fromFieldsWithTypes = function (item) {
1486
+ if (!isPool(item.type)) {
1487
+ throw new Error("not a Pool type");
1488
+ }
1489
+ return Pool.reified().new({
1490
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1491
+ tails: (0, reified_1.decodeFromFieldsWithTypes)(structs_6.TableVec.reified(reified.phantom(Tails.reified())), item.fields.tails),
1492
+ num: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.num),
1493
+ isLive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_live),
1494
+ startMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.start_ms),
1495
+ });
1496
+ };
1497
+ Pool.fromBcs = function (data) {
1498
+ return Pool.fromFields(Pool.bcs.parse(data));
1499
+ };
1500
+ Pool.prototype.toJSONField = function () {
1501
+ return {
1502
+ id: this.id,
1503
+ tails: this.tails.toJSONField(),
1504
+ num: this.num.toString(),
1505
+ isLive: this.isLive,
1506
+ startMs: this.startMs.toString(),
1507
+ };
1508
+ };
1509
+ Pool.prototype.toJSON = function () {
1510
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1511
+ };
1512
+ Pool.fromJSONField = function (field) {
1513
+ return Pool.reified().new({
1514
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1515
+ tails: (0, reified_1.decodeFromJSONField)(structs_6.TableVec.reified(reified.phantom(Tails.reified())), field.tails),
1516
+ num: (0, reified_1.decodeFromJSONField)("u64", field.num),
1517
+ isLive: (0, reified_1.decodeFromJSONField)("bool", field.isLive),
1518
+ startMs: (0, reified_1.decodeFromJSONField)("u64", field.startMs),
1519
+ });
1520
+ };
1521
+ Pool.fromJSON = function (json) {
1522
+ if (json.$typeName !== Pool.$typeName) {
1523
+ throw new Error("not a WithTwoGenerics json object");
1524
+ }
1525
+ return Pool.fromJSONField(json);
1526
+ };
1527
+ Pool.fromSuiParsedData = function (content) {
1528
+ if (content.dataType !== "moveObject") {
1529
+ throw new Error("not an object");
1530
+ }
1531
+ if (!isPool(content.type)) {
1532
+ throw new Error("object at ".concat(content.fields.id, " is not a Pool object"));
1533
+ }
1534
+ return Pool.fromFieldsWithTypes(content);
1535
+ };
1536
+ Pool.fromSuiObjectData = function (data) {
1537
+ if (data.bcs) {
1538
+ if (data.bcs.dataType !== "moveObject" || !isPool(data.bcs.type)) {
1539
+ throw new Error("object at is not a Pool object");
1540
+ }
1541
+ return Pool.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1542
+ }
1543
+ if (data.content) {
1544
+ return Pool.fromSuiParsedData(data.content);
1545
+ }
1546
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1547
+ };
1548
+ Pool.fetch = function (client, id) {
1549
+ return __awaiter(this, void 0, void 0, function () {
1550
+ var res;
1551
+ var _a, _b;
1552
+ return __generator(this, function (_c) {
1553
+ switch (_c.label) {
1554
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1555
+ case 1:
1556
+ res = _c.sent();
1557
+ if (res.error) {
1558
+ throw new Error("error fetching Pool object at id ".concat(id, ": ").concat(res.error.code));
1559
+ }
1560
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPool(res.data.bcs.type)) {
1561
+ throw new Error("object at id ".concat(id, " is not a Pool object"));
1562
+ }
1563
+ return [2 /*return*/, Pool.fromSuiObjectData(res.data)];
1564
+ }
1565
+ });
1566
+ });
1567
+ };
1568
+ Pool.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::Pool");
1569
+ Pool.$numTypeParams = 0;
1570
+ Pool.$isPhantom = [];
1571
+ return Pool;
1572
+ }());
1573
+ exports.Pool = Pool;
1574
+ /* ============================== Royalty =============================== */
1575
+ function isRoyalty(type) {
1576
+ type = (0, util_1.compressSuiType)(type);
1577
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::Royalty");
1578
+ }
1579
+ var Royalty = /** @class */ (function () {
1580
+ function Royalty(typeArgs, fields) {
1581
+ this.__StructClass = true;
1582
+ this.$typeName = Royalty.$typeName;
1583
+ this.$isPhantom = Royalty.$isPhantom;
1584
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Royalty.$typeName], __read(typeArgs), false));
1585
+ this.$typeArgs = typeArgs;
1586
+ this.id = fields.id;
1587
+ this.recipients = fields.recipients;
1588
+ this.policyCap = fields.policyCap;
1589
+ }
1590
+ Royalty.reified = function () {
1591
+ var _this = this;
1592
+ return {
1593
+ typeName: Royalty.$typeName,
1594
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Royalty.$typeName], [], false)),
1595
+ typeArgs: [],
1596
+ isPhantom: Royalty.$isPhantom,
1597
+ reifiedTypeArgs: [],
1598
+ fromFields: function (fields) { return Royalty.fromFields(fields); },
1599
+ fromFieldsWithTypes: function (item) { return Royalty.fromFieldsWithTypes(item); },
1600
+ fromBcs: function (data) { return Royalty.fromBcs(data); },
1601
+ bcs: Royalty.bcs,
1602
+ fromJSONField: function (field) { return Royalty.fromJSONField(field); },
1603
+ fromJSON: function (json) { return Royalty.fromJSON(json); },
1604
+ fromSuiParsedData: function (content) { return Royalty.fromSuiParsedData(content); },
1605
+ fromSuiObjectData: function (content) { return Royalty.fromSuiObjectData(content); },
1606
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1607
+ return [2 /*return*/, Royalty.fetch(client, id)];
1608
+ }); }); },
1609
+ new: function (fields) {
1610
+ return new Royalty([], fields);
1611
+ },
1612
+ kind: "StructClassReified",
1613
+ };
1614
+ };
1615
+ Object.defineProperty(Royalty, "r", {
1616
+ get: function () {
1617
+ return Royalty.reified();
1618
+ },
1619
+ enumerable: false,
1620
+ configurable: true
1621
+ });
1622
+ Royalty.phantom = function () {
1623
+ return (0, reified_1.phantom)(Royalty.reified());
1624
+ };
1625
+ Object.defineProperty(Royalty, "p", {
1626
+ get: function () {
1627
+ return Royalty.phantom();
1628
+ },
1629
+ enumerable: false,
1630
+ configurable: true
1631
+ });
1632
+ Object.defineProperty(Royalty, "bcs", {
1633
+ get: function () {
1634
+ return bcs_1.bcs.struct("Royalty", {
1635
+ id: structs_2.UID.bcs,
1636
+ recipients: structs_5.VecMap.bcs(bcs_1.bcs.bytes(32).transform({
1637
+ input: function (val) { return (0, utils_1.fromHEX)(val); },
1638
+ output: function (val) { return (0, utils_1.toHEX)(val); },
1639
+ }), bcs_1.bcs.u64()),
1640
+ policy_cap: structs_3.TransferPolicyCap.bcs,
1641
+ });
1642
+ },
1643
+ enumerable: false,
1644
+ configurable: true
1645
+ });
1646
+ Royalty.fromFields = function (fields) {
1647
+ return Royalty.reified().new({
1648
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1649
+ recipients: (0, reified_1.decodeFromFields)(structs_5.VecMap.reified("address", "u64"), fields.recipients),
1650
+ policyCap: (0, reified_1.decodeFromFields)(structs_3.TransferPolicyCap.reified(reified.phantom(Tails.reified())), fields.policy_cap),
1651
+ });
1652
+ };
1653
+ Royalty.fromFieldsWithTypes = function (item) {
1654
+ if (!isRoyalty(item.type)) {
1655
+ throw new Error("not a Royalty type");
1656
+ }
1657
+ return Royalty.reified().new({
1658
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1659
+ recipients: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.VecMap.reified("address", "u64"), item.fields.recipients),
1660
+ policyCap: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.TransferPolicyCap.reified(reified.phantom(Tails.reified())), item.fields.policy_cap),
1661
+ });
1662
+ };
1663
+ Royalty.fromBcs = function (data) {
1664
+ return Royalty.fromFields(Royalty.bcs.parse(data));
1665
+ };
1666
+ Royalty.prototype.toJSONField = function () {
1667
+ return {
1668
+ id: this.id,
1669
+ recipients: this.recipients.toJSONField(),
1670
+ policyCap: this.policyCap.toJSONField(),
1671
+ };
1672
+ };
1673
+ Royalty.prototype.toJSON = function () {
1674
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1675
+ };
1676
+ Royalty.fromJSONField = function (field) {
1677
+ return Royalty.reified().new({
1678
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1679
+ recipients: (0, reified_1.decodeFromJSONField)(structs_5.VecMap.reified("address", "u64"), field.recipients),
1680
+ policyCap: (0, reified_1.decodeFromJSONField)(structs_3.TransferPolicyCap.reified(reified.phantom(Tails.reified())), field.policyCap),
1681
+ });
1682
+ };
1683
+ Royalty.fromJSON = function (json) {
1684
+ if (json.$typeName !== Royalty.$typeName) {
1685
+ throw new Error("not a WithTwoGenerics json object");
1686
+ }
1687
+ return Royalty.fromJSONField(json);
1688
+ };
1689
+ Royalty.fromSuiParsedData = function (content) {
1690
+ if (content.dataType !== "moveObject") {
1691
+ throw new Error("not an object");
1692
+ }
1693
+ if (!isRoyalty(content.type)) {
1694
+ throw new Error("object at ".concat(content.fields.id, " is not a Royalty object"));
1695
+ }
1696
+ return Royalty.fromFieldsWithTypes(content);
1697
+ };
1698
+ Royalty.fromSuiObjectData = function (data) {
1699
+ if (data.bcs) {
1700
+ if (data.bcs.dataType !== "moveObject" || !isRoyalty(data.bcs.type)) {
1701
+ throw new Error("object at is not a Royalty object");
1702
+ }
1703
+ return Royalty.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1704
+ }
1705
+ if (data.content) {
1706
+ return Royalty.fromSuiParsedData(data.content);
1707
+ }
1708
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1709
+ };
1710
+ Royalty.fetch = function (client, id) {
1711
+ return __awaiter(this, void 0, void 0, function () {
1712
+ var res;
1713
+ var _a, _b;
1714
+ return __generator(this, function (_c) {
1715
+ switch (_c.label) {
1716
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1717
+ case 1:
1718
+ res = _c.sent();
1719
+ if (res.error) {
1720
+ throw new Error("error fetching Royalty object at id ".concat(id, ": ").concat(res.error.code));
1721
+ }
1722
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRoyalty(res.data.bcs.type)) {
1723
+ throw new Error("object at id ".concat(id, " is not a Royalty object"));
1724
+ }
1725
+ return [2 /*return*/, Royalty.fromSuiObjectData(res.data)];
1726
+ }
1727
+ });
1728
+ });
1729
+ };
1730
+ Royalty.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::Royalty");
1731
+ Royalty.$numTypeParams = 0;
1732
+ Royalty.$isPhantom = [];
1733
+ return Royalty;
1734
+ }());
1735
+ exports.Royalty = Royalty;
1736
+ /* ============================== RoyaltyUpdateEvent =============================== */
1737
+ function isRoyaltyUpdateEvent(type) {
1738
+ type = (0, util_1.compressSuiType)(type);
1739
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::RoyaltyUpdateEvent");
1740
+ }
1741
+ var RoyaltyUpdateEvent = /** @class */ (function () {
1742
+ function RoyaltyUpdateEvent(typeArgs, fields) {
1743
+ this.__StructClass = true;
1744
+ this.$typeName = RoyaltyUpdateEvent.$typeName;
1745
+ this.$isPhantom = RoyaltyUpdateEvent.$isPhantom;
1746
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([RoyaltyUpdateEvent.$typeName], __read(typeArgs), false));
1747
+ this.$typeArgs = typeArgs;
1748
+ this.sender = fields.sender;
1749
+ this.recipients = fields.recipients;
1750
+ }
1751
+ RoyaltyUpdateEvent.reified = function () {
1752
+ var _this = this;
1753
+ return {
1754
+ typeName: RoyaltyUpdateEvent.$typeName,
1755
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([RoyaltyUpdateEvent.$typeName], [], false)),
1756
+ typeArgs: [],
1757
+ isPhantom: RoyaltyUpdateEvent.$isPhantom,
1758
+ reifiedTypeArgs: [],
1759
+ fromFields: function (fields) { return RoyaltyUpdateEvent.fromFields(fields); },
1760
+ fromFieldsWithTypes: function (item) { return RoyaltyUpdateEvent.fromFieldsWithTypes(item); },
1761
+ fromBcs: function (data) { return RoyaltyUpdateEvent.fromBcs(data); },
1762
+ bcs: RoyaltyUpdateEvent.bcs,
1763
+ fromJSONField: function (field) { return RoyaltyUpdateEvent.fromJSONField(field); },
1764
+ fromJSON: function (json) { return RoyaltyUpdateEvent.fromJSON(json); },
1765
+ fromSuiParsedData: function (content) { return RoyaltyUpdateEvent.fromSuiParsedData(content); },
1766
+ fromSuiObjectData: function (content) { return RoyaltyUpdateEvent.fromSuiObjectData(content); },
1767
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1768
+ return [2 /*return*/, RoyaltyUpdateEvent.fetch(client, id)];
1769
+ }); }); },
1770
+ new: function (fields) {
1771
+ return new RoyaltyUpdateEvent([], fields);
1772
+ },
1773
+ kind: "StructClassReified",
1774
+ };
1775
+ };
1776
+ Object.defineProperty(RoyaltyUpdateEvent, "r", {
1777
+ get: function () {
1778
+ return RoyaltyUpdateEvent.reified();
1779
+ },
1780
+ enumerable: false,
1781
+ configurable: true
1782
+ });
1783
+ RoyaltyUpdateEvent.phantom = function () {
1784
+ return (0, reified_1.phantom)(RoyaltyUpdateEvent.reified());
1785
+ };
1786
+ Object.defineProperty(RoyaltyUpdateEvent, "p", {
1787
+ get: function () {
1788
+ return RoyaltyUpdateEvent.phantom();
1789
+ },
1790
+ enumerable: false,
1791
+ configurable: true
1792
+ });
1793
+ Object.defineProperty(RoyaltyUpdateEvent, "bcs", {
1794
+ get: function () {
1795
+ return bcs_1.bcs.struct("RoyaltyUpdateEvent", {
1796
+ sender: bcs_1.bcs.bytes(32).transform({
1797
+ input: function (val) { return (0, utils_1.fromHEX)(val); },
1798
+ output: function (val) { return (0, utils_1.toHEX)(val); },
1799
+ }),
1800
+ recipients: structs_5.VecMap.bcs(bcs_1.bcs.bytes(32).transform({
1801
+ input: function (val) { return (0, utils_1.fromHEX)(val); },
1802
+ output: function (val) { return (0, utils_1.toHEX)(val); },
1803
+ }), bcs_1.bcs.u64()),
1804
+ });
1805
+ },
1806
+ enumerable: false,
1807
+ configurable: true
1808
+ });
1809
+ RoyaltyUpdateEvent.fromFields = function (fields) {
1810
+ return RoyaltyUpdateEvent.reified().new({
1811
+ sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1812
+ recipients: (0, reified_1.decodeFromFields)(structs_5.VecMap.reified("address", "u64"), fields.recipients),
1813
+ });
1814
+ };
1815
+ RoyaltyUpdateEvent.fromFieldsWithTypes = function (item) {
1816
+ if (!isRoyaltyUpdateEvent(item.type)) {
1817
+ throw new Error("not a RoyaltyUpdateEvent type");
1818
+ }
1819
+ return RoyaltyUpdateEvent.reified().new({
1820
+ sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1821
+ recipients: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.VecMap.reified("address", "u64"), item.fields.recipients),
1822
+ });
1823
+ };
1824
+ RoyaltyUpdateEvent.fromBcs = function (data) {
1825
+ return RoyaltyUpdateEvent.fromFields(RoyaltyUpdateEvent.bcs.parse(data));
1826
+ };
1827
+ RoyaltyUpdateEvent.prototype.toJSONField = function () {
1828
+ return {
1829
+ sender: this.sender,
1830
+ recipients: this.recipients.toJSONField(),
1831
+ };
1832
+ };
1833
+ RoyaltyUpdateEvent.prototype.toJSON = function () {
1834
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1835
+ };
1836
+ RoyaltyUpdateEvent.fromJSONField = function (field) {
1837
+ return RoyaltyUpdateEvent.reified().new({
1838
+ sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1839
+ recipients: (0, reified_1.decodeFromJSONField)(structs_5.VecMap.reified("address", "u64"), field.recipients),
1840
+ });
1841
+ };
1842
+ RoyaltyUpdateEvent.fromJSON = function (json) {
1843
+ if (json.$typeName !== RoyaltyUpdateEvent.$typeName) {
1844
+ throw new Error("not a WithTwoGenerics json object");
1845
+ }
1846
+ return RoyaltyUpdateEvent.fromJSONField(json);
1847
+ };
1848
+ RoyaltyUpdateEvent.fromSuiParsedData = function (content) {
1849
+ if (content.dataType !== "moveObject") {
1850
+ throw new Error("not an object");
1851
+ }
1852
+ if (!isRoyaltyUpdateEvent(content.type)) {
1853
+ throw new Error("object at ".concat(content.fields.id, " is not a RoyaltyUpdateEvent object"));
1854
+ }
1855
+ return RoyaltyUpdateEvent.fromFieldsWithTypes(content);
1856
+ };
1857
+ RoyaltyUpdateEvent.fromSuiObjectData = function (data) {
1858
+ if (data.bcs) {
1859
+ if (data.bcs.dataType !== "moveObject" || !isRoyaltyUpdateEvent(data.bcs.type)) {
1860
+ throw new Error("object at is not a RoyaltyUpdateEvent object");
1861
+ }
1862
+ return RoyaltyUpdateEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1863
+ }
1864
+ if (data.content) {
1865
+ return RoyaltyUpdateEvent.fromSuiParsedData(data.content);
1866
+ }
1867
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1868
+ };
1869
+ RoyaltyUpdateEvent.fetch = function (client, id) {
1870
+ return __awaiter(this, void 0, void 0, function () {
1871
+ var res;
1872
+ var _a, _b;
1873
+ return __generator(this, function (_c) {
1874
+ switch (_c.label) {
1875
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1876
+ case 1:
1877
+ res = _c.sent();
1878
+ if (res.error) {
1879
+ throw new Error("error fetching RoyaltyUpdateEvent object at id ".concat(id, ": ").concat(res.error.code));
1880
+ }
1881
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isRoyaltyUpdateEvent(res.data.bcs.type)) {
1882
+ throw new Error("object at id ".concat(id, " is not a RoyaltyUpdateEvent object"));
1883
+ }
1884
+ return [2 /*return*/, RoyaltyUpdateEvent.fromSuiObjectData(res.data)];
1885
+ }
1886
+ });
1887
+ });
1888
+ };
1889
+ RoyaltyUpdateEvent.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::RoyaltyUpdateEvent");
1890
+ RoyaltyUpdateEvent.$numTypeParams = 0;
1891
+ RoyaltyUpdateEvent.$isPhantom = [];
1892
+ return RoyaltyUpdateEvent;
1893
+ }());
1894
+ exports.RoyaltyUpdateEvent = RoyaltyUpdateEvent;
1895
+ /* ============================== TYPUS_NFT =============================== */
1896
+ function isTYPUS_NFT(type) {
1897
+ type = (0, util_1.compressSuiType)(type);
1898
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::TYPUS_NFT");
1899
+ }
1900
+ var TYPUS_NFT = /** @class */ (function () {
1901
+ function TYPUS_NFT(typeArgs, fields) {
1902
+ this.__StructClass = true;
1903
+ this.$typeName = TYPUS_NFT.$typeName;
1904
+ this.$isPhantom = TYPUS_NFT.$isPhantom;
1905
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TYPUS_NFT.$typeName], __read(typeArgs), false));
1906
+ this.$typeArgs = typeArgs;
1907
+ this.dummyField = fields.dummyField;
1908
+ }
1909
+ TYPUS_NFT.reified = function () {
1910
+ var _this = this;
1911
+ return {
1912
+ typeName: TYPUS_NFT.$typeName,
1913
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TYPUS_NFT.$typeName], [], false)),
1914
+ typeArgs: [],
1915
+ isPhantom: TYPUS_NFT.$isPhantom,
1916
+ reifiedTypeArgs: [],
1917
+ fromFields: function (fields) { return TYPUS_NFT.fromFields(fields); },
1918
+ fromFieldsWithTypes: function (item) { return TYPUS_NFT.fromFieldsWithTypes(item); },
1919
+ fromBcs: function (data) { return TYPUS_NFT.fromBcs(data); },
1920
+ bcs: TYPUS_NFT.bcs,
1921
+ fromJSONField: function (field) { return TYPUS_NFT.fromJSONField(field); },
1922
+ fromJSON: function (json) { return TYPUS_NFT.fromJSON(json); },
1923
+ fromSuiParsedData: function (content) { return TYPUS_NFT.fromSuiParsedData(content); },
1924
+ fromSuiObjectData: function (content) { return TYPUS_NFT.fromSuiObjectData(content); },
1925
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1926
+ return [2 /*return*/, TYPUS_NFT.fetch(client, id)];
1927
+ }); }); },
1928
+ new: function (fields) {
1929
+ return new TYPUS_NFT([], fields);
1930
+ },
1931
+ kind: "StructClassReified",
1932
+ };
1933
+ };
1934
+ Object.defineProperty(TYPUS_NFT, "r", {
1935
+ get: function () {
1936
+ return TYPUS_NFT.reified();
1937
+ },
1938
+ enumerable: false,
1939
+ configurable: true
1940
+ });
1941
+ TYPUS_NFT.phantom = function () {
1942
+ return (0, reified_1.phantom)(TYPUS_NFT.reified());
1943
+ };
1944
+ Object.defineProperty(TYPUS_NFT, "p", {
1945
+ get: function () {
1946
+ return TYPUS_NFT.phantom();
1947
+ },
1948
+ enumerable: false,
1949
+ configurable: true
1950
+ });
1951
+ Object.defineProperty(TYPUS_NFT, "bcs", {
1952
+ get: function () {
1953
+ return bcs_1.bcs.struct("TYPUS_NFT", {
1954
+ dummy_field: bcs_1.bcs.bool(),
1955
+ });
1956
+ },
1957
+ enumerable: false,
1958
+ configurable: true
1959
+ });
1960
+ TYPUS_NFT.fromFields = function (fields) {
1961
+ return TYPUS_NFT.reified().new({
1962
+ dummyField: (0, reified_1.decodeFromFields)("bool", fields.dummy_field),
1963
+ });
1964
+ };
1965
+ TYPUS_NFT.fromFieldsWithTypes = function (item) {
1966
+ if (!isTYPUS_NFT(item.type)) {
1967
+ throw new Error("not a TYPUS_NFT type");
1968
+ }
1969
+ return TYPUS_NFT.reified().new({
1970
+ dummyField: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.dummy_field),
1971
+ });
1972
+ };
1973
+ TYPUS_NFT.fromBcs = function (data) {
1974
+ return TYPUS_NFT.fromFields(TYPUS_NFT.bcs.parse(data));
1975
+ };
1976
+ TYPUS_NFT.prototype.toJSONField = function () {
1977
+ return {
1978
+ dummyField: this.dummyField,
1979
+ };
1980
+ };
1981
+ TYPUS_NFT.prototype.toJSON = function () {
1982
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1983
+ };
1984
+ TYPUS_NFT.fromJSONField = function (field) {
1985
+ return TYPUS_NFT.reified().new({
1986
+ dummyField: (0, reified_1.decodeFromJSONField)("bool", field.dummyField),
1987
+ });
1988
+ };
1989
+ TYPUS_NFT.fromJSON = function (json) {
1990
+ if (json.$typeName !== TYPUS_NFT.$typeName) {
1991
+ throw new Error("not a WithTwoGenerics json object");
1992
+ }
1993
+ return TYPUS_NFT.fromJSONField(json);
1994
+ };
1995
+ TYPUS_NFT.fromSuiParsedData = function (content) {
1996
+ if (content.dataType !== "moveObject") {
1997
+ throw new Error("not an object");
1998
+ }
1999
+ if (!isTYPUS_NFT(content.type)) {
2000
+ throw new Error("object at ".concat(content.fields.id, " is not a TYPUS_NFT object"));
2001
+ }
2002
+ return TYPUS_NFT.fromFieldsWithTypes(content);
2003
+ };
2004
+ TYPUS_NFT.fromSuiObjectData = function (data) {
2005
+ if (data.bcs) {
2006
+ if (data.bcs.dataType !== "moveObject" || !isTYPUS_NFT(data.bcs.type)) {
2007
+ throw new Error("object at is not a TYPUS_NFT object");
2008
+ }
2009
+ return TYPUS_NFT.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2010
+ }
2011
+ if (data.content) {
2012
+ return TYPUS_NFT.fromSuiParsedData(data.content);
2013
+ }
2014
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2015
+ };
2016
+ TYPUS_NFT.fetch = function (client, id) {
2017
+ return __awaiter(this, void 0, void 0, function () {
2018
+ var res;
2019
+ var _a, _b;
2020
+ return __generator(this, function (_c) {
2021
+ switch (_c.label) {
2022
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2023
+ case 1:
2024
+ res = _c.sent();
2025
+ if (res.error) {
2026
+ throw new Error("error fetching TYPUS_NFT object at id ".concat(id, ": ").concat(res.error.code));
2027
+ }
2028
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTYPUS_NFT(res.data.bcs.type)) {
2029
+ throw new Error("object at id ".concat(id, " is not a TYPUS_NFT object"));
2030
+ }
2031
+ return [2 /*return*/, TYPUS_NFT.fromSuiObjectData(res.data)];
2032
+ }
2033
+ });
2034
+ });
2035
+ };
2036
+ TYPUS_NFT.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::TYPUS_NFT");
2037
+ TYPUS_NFT.$numTypeParams = 0;
2038
+ TYPUS_NFT.$isPhantom = [];
2039
+ return TYPUS_NFT;
2040
+ }());
2041
+ exports.TYPUS_NFT = TYPUS_NFT;
2042
+ /* ============================== Tails =============================== */
2043
+ function isTails(type) {
2044
+ type = (0, util_1.compressSuiType)(type);
2045
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::Tails");
2046
+ }
2047
+ var Tails = /** @class */ (function () {
2048
+ function Tails(typeArgs, fields) {
2049
+ this.__StructClass = true;
2050
+ this.$typeName = Tails.$typeName;
2051
+ this.$isPhantom = Tails.$isPhantom;
2052
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Tails.$typeName], __read(typeArgs), false));
2053
+ this.$typeArgs = typeArgs;
2054
+ this.id = fields.id;
2055
+ this.name = fields.name;
2056
+ this.description = fields.description;
2057
+ this.number = fields.number;
2058
+ this.url = fields.url;
2059
+ this.attributes = fields.attributes;
2060
+ this.level = fields.level;
2061
+ this.exp = fields.exp;
2062
+ this.firstBid = fields.firstBid;
2063
+ this.firstDeposit = fields.firstDeposit;
2064
+ this.firstDepositNft = fields.firstDepositNft;
2065
+ this.u64Padding = fields.u64Padding;
2066
+ }
2067
+ Tails.reified = function () {
2068
+ var _this = this;
2069
+ return {
2070
+ typeName: Tails.$typeName,
2071
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Tails.$typeName], [], false)),
2072
+ typeArgs: [],
2073
+ isPhantom: Tails.$isPhantom,
2074
+ reifiedTypeArgs: [],
2075
+ fromFields: function (fields) { return Tails.fromFields(fields); },
2076
+ fromFieldsWithTypes: function (item) { return Tails.fromFieldsWithTypes(item); },
2077
+ fromBcs: function (data) { return Tails.fromBcs(data); },
2078
+ bcs: Tails.bcs,
2079
+ fromJSONField: function (field) { return Tails.fromJSONField(field); },
2080
+ fromJSON: function (json) { return Tails.fromJSON(json); },
2081
+ fromSuiParsedData: function (content) { return Tails.fromSuiParsedData(content); },
2082
+ fromSuiObjectData: function (content) { return Tails.fromSuiObjectData(content); },
2083
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2084
+ return [2 /*return*/, Tails.fetch(client, id)];
2085
+ }); }); },
2086
+ new: function (fields) {
2087
+ return new Tails([], fields);
2088
+ },
2089
+ kind: "StructClassReified",
2090
+ };
2091
+ };
2092
+ Object.defineProperty(Tails, "r", {
2093
+ get: function () {
2094
+ return Tails.reified();
2095
+ },
2096
+ enumerable: false,
2097
+ configurable: true
2098
+ });
2099
+ Tails.phantom = function () {
2100
+ return (0, reified_1.phantom)(Tails.reified());
2101
+ };
2102
+ Object.defineProperty(Tails, "p", {
2103
+ get: function () {
2104
+ return Tails.phantom();
2105
+ },
2106
+ enumerable: false,
2107
+ configurable: true
2108
+ });
2109
+ Object.defineProperty(Tails, "bcs", {
2110
+ get: function () {
2111
+ return bcs_1.bcs.struct("Tails", {
2112
+ id: structs_2.UID.bcs,
2113
+ name: structs_1.String.bcs,
2114
+ description: structs_1.String.bcs,
2115
+ number: bcs_1.bcs.u64(),
2116
+ url: structs_4.Url.bcs,
2117
+ attributes: structs_5.VecMap.bcs(structs_1.String.bcs, structs_1.String.bcs),
2118
+ level: bcs_1.bcs.u64(),
2119
+ exp: bcs_1.bcs.u64(),
2120
+ first_bid: bcs_1.bcs.bool(),
2121
+ first_deposit: bcs_1.bcs.bool(),
2122
+ first_deposit_nft: bcs_1.bcs.bool(),
2123
+ u64_padding: structs_5.VecMap.bcs(structs_1.String.bcs, bcs_1.bcs.u64()),
2124
+ });
2125
+ },
2126
+ enumerable: false,
2127
+ configurable: true
2128
+ });
2129
+ Tails.fromFields = function (fields) {
2130
+ return Tails.reified().new({
2131
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
2132
+ name: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.name),
2133
+ description: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.description),
2134
+ number: (0, reified_1.decodeFromFields)("u64", fields.number),
2135
+ url: (0, reified_1.decodeFromFields)(structs_4.Url.reified(), fields.url),
2136
+ attributes: (0, reified_1.decodeFromFields)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), fields.attributes),
2137
+ level: (0, reified_1.decodeFromFields)("u64", fields.level),
2138
+ exp: (0, reified_1.decodeFromFields)("u64", fields.exp),
2139
+ firstBid: (0, reified_1.decodeFromFields)("bool", fields.first_bid),
2140
+ firstDeposit: (0, reified_1.decodeFromFields)("bool", fields.first_deposit),
2141
+ firstDepositNft: (0, reified_1.decodeFromFields)("bool", fields.first_deposit_nft),
2142
+ u64Padding: (0, reified_1.decodeFromFields)(structs_5.VecMap.reified(structs_1.String.reified(), "u64"), fields.u64_padding),
2143
+ });
2144
+ };
2145
+ Tails.fromFieldsWithTypes = function (item) {
2146
+ if (!isTails(item.type)) {
2147
+ throw new Error("not a Tails type");
2148
+ }
2149
+ return Tails.reified().new({
2150
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
2151
+ name: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.name),
2152
+ description: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.description),
2153
+ number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2154
+ url: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.Url.reified(), item.fields.url),
2155
+ attributes: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), item.fields.attributes),
2156
+ level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
2157
+ exp: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp),
2158
+ firstBid: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.first_bid),
2159
+ firstDeposit: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.first_deposit),
2160
+ firstDepositNft: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.first_deposit_nft),
2161
+ u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.VecMap.reified(structs_1.String.reified(), "u64"), item.fields.u64_padding),
2162
+ });
2163
+ };
2164
+ Tails.fromBcs = function (data) {
2165
+ return Tails.fromFields(Tails.bcs.parse(data));
2166
+ };
2167
+ Tails.prototype.toJSONField = function () {
2168
+ return {
2169
+ id: this.id,
2170
+ name: this.name,
2171
+ description: this.description,
2172
+ number: this.number.toString(),
2173
+ url: this.url,
2174
+ attributes: this.attributes.toJSONField(),
2175
+ level: this.level.toString(),
2176
+ exp: this.exp.toString(),
2177
+ firstBid: this.firstBid,
2178
+ firstDeposit: this.firstDeposit,
2179
+ firstDepositNft: this.firstDepositNft,
2180
+ u64Padding: this.u64Padding.toJSONField(),
2181
+ };
2182
+ };
2183
+ Tails.prototype.toJSON = function () {
2184
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2185
+ };
2186
+ Tails.fromJSONField = function (field) {
2187
+ return Tails.reified().new({
2188
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
2189
+ name: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.name),
2190
+ description: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.description),
2191
+ number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2192
+ url: (0, reified_1.decodeFromJSONField)(structs_4.Url.reified(), field.url),
2193
+ attributes: (0, reified_1.decodeFromJSONField)(structs_5.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), field.attributes),
2194
+ level: (0, reified_1.decodeFromJSONField)("u64", field.level),
2195
+ exp: (0, reified_1.decodeFromJSONField)("u64", field.exp),
2196
+ firstBid: (0, reified_1.decodeFromJSONField)("bool", field.firstBid),
2197
+ firstDeposit: (0, reified_1.decodeFromJSONField)("bool", field.firstDeposit),
2198
+ firstDepositNft: (0, reified_1.decodeFromJSONField)("bool", field.firstDepositNft),
2199
+ u64Padding: (0, reified_1.decodeFromJSONField)(structs_5.VecMap.reified(structs_1.String.reified(), "u64"), field.u64Padding),
2200
+ });
2201
+ };
2202
+ Tails.fromJSON = function (json) {
2203
+ if (json.$typeName !== Tails.$typeName) {
2204
+ throw new Error("not a WithTwoGenerics json object");
2205
+ }
2206
+ return Tails.fromJSONField(json);
2207
+ };
2208
+ Tails.fromSuiParsedData = function (content) {
2209
+ if (content.dataType !== "moveObject") {
2210
+ throw new Error("not an object");
2211
+ }
2212
+ if (!isTails(content.type)) {
2213
+ throw new Error("object at ".concat(content.fields.id, " is not a Tails object"));
2214
+ }
2215
+ return Tails.fromFieldsWithTypes(content);
2216
+ };
2217
+ Tails.fromSuiObjectData = function (data) {
2218
+ if (data.bcs) {
2219
+ if (data.bcs.dataType !== "moveObject" || !isTails(data.bcs.type)) {
2220
+ throw new Error("object at is not a Tails object");
2221
+ }
2222
+ return Tails.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2223
+ }
2224
+ if (data.content) {
2225
+ return Tails.fromSuiParsedData(data.content);
2226
+ }
2227
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2228
+ };
2229
+ Tails.fetch = function (client, id) {
2230
+ return __awaiter(this, void 0, void 0, function () {
2231
+ var res;
2232
+ var _a, _b;
2233
+ return __generator(this, function (_c) {
2234
+ switch (_c.label) {
2235
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2236
+ case 1:
2237
+ res = _c.sent();
2238
+ if (res.error) {
2239
+ throw new Error("error fetching Tails object at id ".concat(id, ": ").concat(res.error.code));
2240
+ }
2241
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTails(res.data.bcs.type)) {
2242
+ throw new Error("object at id ".concat(id, " is not a Tails object"));
2243
+ }
2244
+ return [2 /*return*/, Tails.fromSuiObjectData(res.data)];
2245
+ }
2246
+ });
2247
+ });
2248
+ };
2249
+ Tails.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::Tails");
2250
+ Tails.$numTypeParams = 0;
2251
+ Tails.$isPhantom = [];
2252
+ return Tails;
2253
+ }());
2254
+ exports.Tails = Tails;
2255
+ /* ============================== Whitelist =============================== */
2256
+ function isWhitelist(type) {
2257
+ type = (0, util_1.compressSuiType)(type);
2258
+ return type === "".concat(index_1.PKG_V1, "::typus_nft::Whitelist");
2259
+ }
2260
+ var Whitelist = /** @class */ (function () {
2261
+ function Whitelist(typeArgs, fields) {
2262
+ this.__StructClass = true;
2263
+ this.$typeName = Whitelist.$typeName;
2264
+ this.$isPhantom = Whitelist.$isPhantom;
2265
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Whitelist.$typeName], __read(typeArgs), false));
2266
+ this.$typeArgs = typeArgs;
2267
+ this.id = fields.id;
2268
+ this.for = fields.for;
2269
+ }
2270
+ Whitelist.reified = function () {
2271
+ var _this = this;
2272
+ return {
2273
+ typeName: Whitelist.$typeName,
2274
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Whitelist.$typeName], [], false)),
2275
+ typeArgs: [],
2276
+ isPhantom: Whitelist.$isPhantom,
2277
+ reifiedTypeArgs: [],
2278
+ fromFields: function (fields) { return Whitelist.fromFields(fields); },
2279
+ fromFieldsWithTypes: function (item) { return Whitelist.fromFieldsWithTypes(item); },
2280
+ fromBcs: function (data) { return Whitelist.fromBcs(data); },
2281
+ bcs: Whitelist.bcs,
2282
+ fromJSONField: function (field) { return Whitelist.fromJSONField(field); },
2283
+ fromJSON: function (json) { return Whitelist.fromJSON(json); },
2284
+ fromSuiParsedData: function (content) { return Whitelist.fromSuiParsedData(content); },
2285
+ fromSuiObjectData: function (content) { return Whitelist.fromSuiObjectData(content); },
2286
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2287
+ return [2 /*return*/, Whitelist.fetch(client, id)];
2288
+ }); }); },
2289
+ new: function (fields) {
2290
+ return new Whitelist([], fields);
2291
+ },
2292
+ kind: "StructClassReified",
2293
+ };
2294
+ };
2295
+ Object.defineProperty(Whitelist, "r", {
2296
+ get: function () {
2297
+ return Whitelist.reified();
2298
+ },
2299
+ enumerable: false,
2300
+ configurable: true
2301
+ });
2302
+ Whitelist.phantom = function () {
2303
+ return (0, reified_1.phantom)(Whitelist.reified());
2304
+ };
2305
+ Object.defineProperty(Whitelist, "p", {
2306
+ get: function () {
2307
+ return Whitelist.phantom();
2308
+ },
2309
+ enumerable: false,
2310
+ configurable: true
2311
+ });
2312
+ Object.defineProperty(Whitelist, "bcs", {
2313
+ get: function () {
2314
+ return bcs_1.bcs.struct("Whitelist", {
2315
+ id: structs_2.UID.bcs,
2316
+ for: structs_2.ID.bcs,
2317
+ });
2318
+ },
2319
+ enumerable: false,
2320
+ configurable: true
2321
+ });
2322
+ Whitelist.fromFields = function (fields) {
2323
+ return Whitelist.reified().new({
2324
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
2325
+ for: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.for),
2326
+ });
2327
+ };
2328
+ Whitelist.fromFieldsWithTypes = function (item) {
2329
+ if (!isWhitelist(item.type)) {
2330
+ throw new Error("not a Whitelist type");
2331
+ }
2332
+ return Whitelist.reified().new({
2333
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
2334
+ for: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.for),
2335
+ });
2336
+ };
2337
+ Whitelist.fromBcs = function (data) {
2338
+ return Whitelist.fromFields(Whitelist.bcs.parse(data));
2339
+ };
2340
+ Whitelist.prototype.toJSONField = function () {
2341
+ return {
2342
+ id: this.id,
2343
+ for: this.for,
2344
+ };
2345
+ };
2346
+ Whitelist.prototype.toJSON = function () {
2347
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2348
+ };
2349
+ Whitelist.fromJSONField = function (field) {
2350
+ return Whitelist.reified().new({
2351
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
2352
+ for: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.for),
2353
+ });
2354
+ };
2355
+ Whitelist.fromJSON = function (json) {
2356
+ if (json.$typeName !== Whitelist.$typeName) {
2357
+ throw new Error("not a WithTwoGenerics json object");
2358
+ }
2359
+ return Whitelist.fromJSONField(json);
2360
+ };
2361
+ Whitelist.fromSuiParsedData = function (content) {
2362
+ if (content.dataType !== "moveObject") {
2363
+ throw new Error("not an object");
2364
+ }
2365
+ if (!isWhitelist(content.type)) {
2366
+ throw new Error("object at ".concat(content.fields.id, " is not a Whitelist object"));
2367
+ }
2368
+ return Whitelist.fromFieldsWithTypes(content);
2369
+ };
2370
+ Whitelist.fromSuiObjectData = function (data) {
2371
+ if (data.bcs) {
2372
+ if (data.bcs.dataType !== "moveObject" || !isWhitelist(data.bcs.type)) {
2373
+ throw new Error("object at is not a Whitelist object");
2374
+ }
2375
+ return Whitelist.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2376
+ }
2377
+ if (data.content) {
2378
+ return Whitelist.fromSuiParsedData(data.content);
2379
+ }
2380
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2381
+ };
2382
+ Whitelist.fetch = function (client, id) {
2383
+ return __awaiter(this, void 0, void 0, function () {
2384
+ var res;
2385
+ var _a, _b;
2386
+ return __generator(this, function (_c) {
2387
+ switch (_c.label) {
2388
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2389
+ case 1:
2390
+ res = _c.sent();
2391
+ if (res.error) {
2392
+ throw new Error("error fetching Whitelist object at id ".concat(id, ": ").concat(res.error.code));
2393
+ }
2394
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWhitelist(res.data.bcs.type)) {
2395
+ throw new Error("object at id ".concat(id, " is not a Whitelist object"));
2396
+ }
2397
+ return [2 /*return*/, Whitelist.fromSuiObjectData(res.data)];
2398
+ }
2399
+ });
2400
+ });
2401
+ };
2402
+ Whitelist.$typeName = "".concat(index_1.PKG_V1, "::typus_nft::Whitelist");
2403
+ Whitelist.$numTypeParams = 0;
2404
+ Whitelist.$isPhantom = [];
2405
+ return Whitelist;
2406
+ }());
2407
+ exports.Whitelist = Whitelist;