@typus/typus-perp-sdk 1.0.0 → 1.0.3

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